Methods
This section describes the methods that can be used in code to manipulate the PieChart widget.
Use the dxPieChart
registered method to access the PieChart widget, as demonstrated in the code below.
var pieChart = $("#pieChartContainer").dxPieChart("instance");
beginUpdate()
Prevents the widget from refreshing until the endUpdate() method is called.
The beginUpdate() and endUpdate() methods prevent the widget from excessive updates when you are changing multiple widget settings at once. After the beginUpdate() method is called, the widget does not update its UI until the endUpdate() method is called.
See Also
- Call Methods: jQuery | Angular | AngularJS | Knockout | ASP.NET MVC
clearSelection()
Deselects the chart's selected series. The series is displayed in an initial style.
To learn about series selection, refer to the Selection Handling help section.
See Also
- Call Methods: jQuery | Angular | AngularJS | Knockout | ASP.NET MVC
element()
Gets the root element of the widget.
The root element of the widget.
See Also
- Call Methods: jQuery | Angular | AngularJS | Knockout | ASP.NET MVC
endUpdate()
Refreshes the widget after a call of the beginUpdate() method.
Main article: beginUpdate()
See Also
- Call Methods: jQuery | Angular | AngularJS | Knockout | ASP.NET MVC
exportTo(fileName, format)
Exports the widget into a document with a specified name and format.
See Also
- Call Methods: jQuery | Angular | AngularJS | Knockout | ASP.NET MVC
- DevExpress.viz.exportFromMarkup(markup, options) - exports the widget using its SVG markup.
- export - configures client-side export and printing.
- print() - opens the browser's print window.
getAllSeries()
Returns an array of all series in the chart.
The series from the chart's series collection.
getDataSource()
Returns the DataSource instance.
The DataSource instance.
See Also
- Call Methods: jQuery | Angular | AngularJS | Knockout | ASP.NET MVC
- Data Layer - Overview
- Data Layer - DataSource Examples
getSeries()
Use the getAllSeries() method instead.
Provides access to the PieChart series.
The PieChart series.
getSeriesByName(seriesName)
Gets a series within the chart's series collection by the specified name (see the name option).
The name of the series to be found.
The series that is found by the specified name.
getSeriesByPos(seriesIndex)
Gets a series within the chart's series collection by its position number.
The index of the series to be found within the chart's series collection.
The series that is found by the specified position index.
Series in the chart's series collection are arranged as they are defined in the series array of the chart's configuration object. Note that the series are numbered from zero in the series collection.
To learn about series' members that you can use, refer to the description of the Series object.
See Also
- Call Methods: jQuery | Angular | AngularJS | Knockout | ASP.NET MVC
getSize()
Gets the current size of the widget.
The current size of the widget.
Returns an object with the following fields.
- width
The width of the widget in pixels. - height
The height of the widget in pixels.
See Also
- Call Methods: jQuery | Angular | AngularJS | Knockout | ASP.NET MVC
hideLoadingIndicator()
Conceals the loading indicator.
Although the loading indicator hides automatically when the widget is ready, you can hide it from code at the required time using the hideLoadingIndicator() method.
If you need to show the loading indicator, invoke the showLoadingIndicator() method.
See Also
- Call Methods: jQuery | Angular | AngularJS | Knockout | ASP.NET MVC
hideTooltip()
Hides all widget tooltips.
Use this method to hide all widget tooltips programmatically.
See Also
- Call Methods: jQuery | Angular | AngularJS | Knockout | ASP.NET MVC
instance()
Returns this widget's instance. Use it to access other methods of the widget.
This widget's instance.
See Also
- Call Methods: jQuery | Angular | AngularJS | Knockout | ASP.NET MVC
off(eventName)
Detaches all event handlers from the specified event.
The name of the event to unsubscribe from.
The object for which this method is called.
See Also
- Handle Events: jQuery | Angular | AngularJS | Knockout | ASP.NET MVC
off(eventName, eventHandler)
Detaches a particular event handler from the specified event.
The object for which this method is called.
See Also
- Handle Events: jQuery | Angular | AngularJS | Knockout | ASP.NET MVC
on(eventName, eventHandler)
Subscribes to a specified event.
The object for which this method is called.
on(events)
Subscribes to the specified events.
An object of the following structure: { "eventName1": handler1, "eventName2": handler2, ...}
The object for which this method is called.
option()
Gets the widget's options.
The widget's options.
See Also
- Get and Set Options
- Call Methods: jQuery | Angular | AngularJS | Knockout | ASP.NET MVC
option(optionName)
Gets a specific option value.
The option name or the full path to the option.
This option value.
See Also
- Get and Set Options
- Call Methods: jQuery | Angular | AngularJS | Knockout | ASP.NET MVC
option(optionName, optionValue)
Assigns a new value to a specific option.
The option name or the full path to the option.
A new value for this option.
See Also
- Get and Set Options
- Call Methods: jQuery | Angular | AngularJS | Knockout | ASP.NET MVC
option(options)
Sets one or more options.
The options along with their new values.
See Also
- Get and Set Options
- Call Methods: jQuery | Angular | AngularJS | Knockout | ASP.NET MVC
print()
Opens the browser's print window.
See Also
- Call Methods: jQuery | Angular | AngularJS | Knockout | ASP.NET MVC
- exportTo(fileName, format) - exports the widget.
render()
Redraws the widget.
Normally, the widget will redraw itself automatically after the browser window is resized. But on rare occasions, you may need to request the redrawing, e.g., after the widget container is resized. For this purpose, call the render() method.
See Also
- Call Methods: jQuery | Angular | AngularJS | Knockout | ASP.NET MVC
render(renderOptions)
Redraws a widget.
An object containing rerendering options.
You can call the render method without parameters after the size or visibility of the widget container is changed. Alternatively, call the render method passing an object as the parameter. This object must contain the force field set to 'true'. In addition, you can use this object to specify whether or not to perform animation on redrawing with the animate field, and whether or not to redraw the widget in an asynchronous mode with the asyncSeriesRendering field.
The following code sample illustrates the example of the object that can be passed to the render method.
var renderOptions = { force: true, // forces redrawing animate: false, // redraws the widget without animation asyncSeriesRendering: false // redraws the widget synchronously }
See Also
- Call Methods: jQuery | Angular | AngularJS | Knockout | ASP.NET MVC
showLoadingIndicator()
Displays the loading indicator.
This method shows the loading indicator. To hide it, call the hideLoadingIndicator() method.
See Also
- Call Methods: jQuery | Angular | AngularJS | Knockout | ASP.NET MVC
svg()
Returns the widget's SVG markup.
The widget's SVG markup.
See Also
- Call Methods: jQuery | Angular | AngularJS | Knockout | ASP.NET MVC
- DevExpress.viz.getMarkup(widgetInstances)
If you have technical questions, please create a support ticket in the DevExpress Support Center.
We appreciate your feedback.