Title: Axis grid frequency
Last modified: April 9, 2021

---

# Axis grid frequency

 *  Resolved [poleg](https://wordpress.org/support/users/poleg/)
 * (@poleg)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/axis-grid-frequency/)
 * Hi!
    Is it possible to change the frequency of grid on the x axis? For example,
   to show the date on the axis twice less often – not every year, but for example
   in three years – 1986, 1989, 1992 etc.?
    -  This topic was modified 5 years, 2 months ago by [poleg](https://wordpress.org/support/users/poleg/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Faxis-grid-frequency%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [methnen](https://wordpress.org/support/users/methnen/)
 * (@methnen)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/axis-grid-frequency/#post-14298853)
 * 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](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.chartjs.org/docs/latest/)
 * [https://www.highcharts.com/docs/index](https://www.highcharts.com/docs/index)
 *  Thread Starter [poleg](https://wordpress.org/support/users/poleg/)
 * (@poleg)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/axis-grid-frequency/#post-14306318)
 * 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 5 years, 2 months ago by [poleg](https://wordpress.org/support/users/poleg/).
    -  This reply was modified 5 years, 2 months ago by [poleg](https://wordpress.org/support/users/poleg/).
    -  This reply was modified 5 years, 2 months ago by [poleg](https://wordpress.org/support/users/poleg/).
 *  Thread Starter [poleg](https://wordpress.org/support/users/poleg/)
 * (@poleg)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/axis-grid-frequency/#post-14307962)
 * This works!
 *     ```
       <?php
       return array(
           'xAxis' => array(
               'tickInterval' =>  '15',
           ),	
       );
       ```
   
 *  Plugin Author [methnen](https://wordpress.org/support/users/methnen/)
 * (@methnen)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/axis-grid-frequency/#post-14308133)
 * 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',
           ),	
       );
       ```
   

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Axis grid frequency’ is closed to new replies.

 * ![](https://ps.w.org/m-chart/assets/icon-256x256.png?rev=3472197)
 * [M Chart](https://wordpress.org/plugins/m-chart/)
 * [Support Threads](https://wordpress.org/support/plugin/m-chart/)
 * [Active Topics](https://wordpress.org/support/plugin/m-chart/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/m-chart/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/m-chart/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [methnen](https://wordpress.org/support/users/methnen/)
 * Last activity: [5 years, 2 months ago](https://wordpress.org/support/topic/axis-grid-frequency/#post-14308133)
 * Status: resolved