Home Forums Chart Support Intermediate divisions on the axes

Intermediate divisions on the axes

Viewing 3 posts - 1 through 3 (of 3 total)
  • #45600

    Is it possible to add intermediate divisions on the axes? For example, like in this photo https://go.screenpal.com/watch/cZivQEVPHvr
    The main interval lines intersect the entire area, but the small intermediate ticks do not intersect the main display area.

    Thank you!

    #45615

    @diano4ka,

    It is not possible to add intermediate divisions on the axes, as of now. However, you can set the interval at which intermediate ticks will be displayed and use the labelFormatter function to display labels selectively based on a custom property called majorInterval. Please check the code snippet below:

     axisX: {
        interval: 1,
        gridThickness: 0,
        majorInterval: 10,
        labelFormatter: function (e) {
          if(e.value % e.axis.majorInterval == 0)
            return e.value
          else
            return "";
        },
        stripLines: xGridLines
      },

    You can use stripLines to show gridlines wherever an axis label is shown. Please check this JSFiddle for a working example.


    Thangaraj Raman
    Team CanvasJS

    #45628

    @thangaraj-raman Thank you!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.