wpDataCharts callbacks

Contents

All wpDataCharts existing on the page are reflected in the global JavaScript object called ‘wpDataCharts’. If you check this variable in the JS developer console you will see the wpDataCharts as properties of this object:

 

Every chart exposes several options that customize its look and feel. Charts usually support custom options appropriate to that visualization. We introduced a simple method that allows adding options that are available in Google Charts API, Highcharts API, ApexCharts API, and Chart.js API. This method is called:

wpDataChartsCallbacks[chart_id]

 

Let’s see an example.