Obviously there’s no GUI control for this, but you should be able to do it via a theme (if you’re using Highcharts) or a filter hook in either case.
https://github.com/methnen/m-chart/wiki/Action-and-filter-hooks#m_chart_chart_args
This hook allows you to change the chart arguments right before they are passed to either charting library. Chart.js/Highcharts.
The chart args are in the form of a PHP array that gets converted to a JS object that the charting library then uses.
https://www.chartjs.org/docs/latest/
https://www.highcharts.com/docs/index
Thread Starter
poleg
(@poleg)
Yes, I use Highcharts, could you please provide details (may be simple example) how I can control grid via a theme?
I tried use this file
<?php
/**
* Theme Name: Limeaid
*/
return array(
'colors' => array(
'#59a80f',
'#9ed54c',
'#c4ed68',
'#e2ff9e',
'#f0F2dd',
),
);
and it works, but how I can control axis grid?
Thank you!
-
This reply was modified 4 years, 11 months ago by
poleg.
-
This reply was modified 4 years, 11 months ago by
poleg.
-
This reply was modified 4 years, 11 months ago by
poleg.
Thread Starter
poleg
(@poleg)
This works!
<?php
return array(
'xAxis' => array(
'tickInterval' => '15',
),
);
Yep you got it. I’d still give it a name so you know what the theme does:
<?php
/**
* Theme Name: Tick Interval
*/
return array(
'xAxis' => array(
'tickInterval' => '15',
),
);