Skip to main content

BootstrapChartLegendSettings.OnClientCustomizeItems Property

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

Namespace: DevExpress.Web.Bootstrap

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

NuGet Package: DevExpress.Web.Bootstrap

Declaration

[DefaultValue("")]
public string OnClientCustomizeItems { get; set; }

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
BootstrapChartBase
.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