A newer version of this page is available. Switch to the current version.

Call Methods

To call a widget method, pass its name to the jQuery plugin.

var allSeries = $("#chartContainer").dxChart("getAllSeries");

If a method accepts arguments, pass them right after the method's name.

var fruitsSeries = $("#chartContainer").dxChart("getSeriesByName", "fruits");

As an alternative, you can obtain the widget instance first, and then call any method of this instance.

var chartInstance =$("#chartContainer").dxChart("instance");
var allSeries = chartInstance.getAllSeries();
var fruitsSeries = chartInstance.getSeriesByName("fruits");
See Also
  • API Reference.WidgetName.Methods, for example, API Reference.Chart.Methods