wpdatatables_filter_google_charts_render_data

Contents

Description

This filter is used to modify the Google Charts options before the rendering data is passed to the Google Charts renderer.

Usage

add_filter( 'wpdatatables_filter_google_charts_render_data', 'modify_google_charts_render_data', 10, 3 );

Parameters

  • $renderData array
    The array containing chart configuration data that will be used to render the chart.
  • $chartId int
    The ID of the chart.
  • $chartObject object
    The instance of the chart class.

Examples

// Callback function for the wpdatatables_filter_google_charts_render_data filter hook
function modify_google_charts_render_data($renderData, $chartId, $chartObject) {
    // Modify tooltip settings for all Google Charts
    $renderData['options']['tooltip']['trigger'] = 'focus';

    return $renderData;
}

add_filter( 'wpdatatables_filter_google_charts_render_data', 'modify_google_charts_render_data', 10, 3 );