BootstrapChartLegendSettings.OnClientCustomizeItems Property

Allows you to change the order, text, and visibility of legend items.

Namespace: DevExpress.Web.Bootstrap

Assembly: DevExpress.Web.Bootstrap.v20.2.dll

Declaration

[DefaultValue("")]
public string OnClientCustomizeItems { get; set; }
<DefaultValue("")>
Public Property OnClientCustomizeItems As String

Property Value

Type Default Description
String

String.Empty

A string that represents either the name of a JavaScript function or the entire JavaScript function code that returns legend items after customizations.

Property Paths

You can access this nested property as listed below:

Object Type Path to OnClientCustomizeItems
BootstrapChart
.SettingsLegend.OnClientCustomizeItems
BootstrapChartBase
.SettingsLegend.OnClientCustomizeItems
BootstrapCoordinateSystemChart
.SettingsLegend.OnClientCustomizeItems
BootstrapPieChart
.SettingsLegend.OnClientCustomizeItems
BootstrapPolarChart
.SettingsLegend.OnClientCustomizeItems

Remarks

chart.SettingsLegend.OnClientCustomizeItems= @"function(items) {
  return items.sort(function(a, b) {
    var itemA = a.text.toLowerCase();
    var itemB = b.text.toLowerCase();
    if(itemA < itemB) return -1;
    if(itemA > itemB) return 1;
    return 0;
  });
}";
See Also