Filter for Chart ID
Any Visualizer charts have a specific chart ID that can be rendered on the post where the chart was added. This can be done by enabling some of the Frontend Actions or adding a custom code. This article will present the second method of adding the Chart ID.
⏪ Before
⏩ After
Navigate to the active theme's functions.php file and paste the code below:
add_filter(
'visualizer_container_attributes',
function( $attributes, $chart_id ) {
$attributes['data-visualizer-chart-id'] = $chart_id;
return $attributes;
},
10,
2
);

