wpdatatables_filter_highcharts_render_data

Contents

Description

This filter is used to modify the chart options of the HighCharts chart before it is rendered.

Usage

add_filter( 'wpdatatables_filter_highcharts_render_data', 'updateHighchartsRenderData', 10, 3 );

Parameters

  • $highcharts_render_data array
    The array of chart data, containing all of the current chart options, the wdtNumberFormat, wdtDecimalPlaces, and the chart type.
  • $chartID integer
    The ID of the chart.
  • $chart object
    The instance of the chart class.

Examples

// Callback function for the wpdatatables_filter_highcharts_render_data filter hook
function updateHighchartsRenderData ($highcharts_render_data, $chartID, $chart){
    // Modify the Zoom Button position for all Highcharts charts
    $highcharts_render_data['options']['chart']['resetZoomButton']['position']['align'] = 'left';
    return $highcharts_render_data;
}
add_filter( 'wpdatatables_filter_highcharts_render_data', 'updateHighchartsRenderData', 10, 3 );