c3js / c3

:bar_chart: A D3-based reusable chart library
http://c3js.org
MIT License
9.35k stars 1.39k forks source link

Proper y/y2 axis ticks as per the given tick count #2851

Open AbeykoonOshan opened 3 years ago

AbeykoonOshan commented 3 years ago

When we define a tick count for y axis, then ticks for y axis become odd.

var chart = c3.generate({
    data: {
        columns: [
            ['data1', 30, 200, 100, 400, 150, 250],
            ['data2', 50, 20, 10, 40, 15, 25]
        ]
    },
    axis: {
        y: {
            tick: {
                count: 6
            }
        }
    }
});

image

Can we have proper logical y axis ticks for the given tick count?

Expected behaviour