treeski
treeski

Reputation: 5

angular-chart.js tickmark issue

I created a line graph using the following library: http://jtblin.github.io/angular-chart.js/ My graph contains 17 tick marks on the Y Axis. Although there are multiple options available for modifying the chart, I have trouble figuring out how to reduce the number of tick marks on the Y axis from 17 to about 5 or 7 to make the labels look less cluttered in chart.js.

Upvotes: 0

Views: 850

Answers (1)

zsn
zsn

Reputation: 155

You can set your options for y axis to have max number of ticks on display like this.`

options : {
        scales: {
            yAxes: [{
                ticks: {
                beginAtZero: true,
                minTicksLimit: 5,
                maxTicksLimit: 7,
                autoSkip: true
                }
            }],

        },
        responsive: true
    },`

be mindful of axEs not axIs...

Upvotes: 1

Related Questions