Lables are cutoff in timeseries line chart

99 views
Skip to first unread message

kishore kumar

unread,
Aug 7, 2024, 1:06:15 AM8/7/24
to c3js
Hi Team,
when we are rendering timeseries line chart and the values are huge then the labels are getting cut off, tried with padding and other options but had no luck.
Is there a way to fix this issue?


var chart = c3.generate({
    data: {
        x: 'x',
        columns: [
            ['x', '2013-01-01', '2013-01-02', '2013-01-03', '2013-01-04', '2013-01-05', '2013-01-06', '2013-01-07', '2013-01-08', '2013-01-09', '2013-01-10', '2013-01-11', '2013-01-12'],
            ['sample', 130, 200, 100, 400, 150, 250, 30, 200, 100, 400, 150, 1234567890]
        ],
        labels:true
    },
    axis: {
        x: {
            type: 'timeseries',
            tick: {
                // this also works for non timeseries data
                values: ['2013-01-05', '2013-01-10']
            }
        }
    }
});

Screenshot 2024-08-07 at 10.34.30 AM.png
Reply all
Reply to author
Forward
0 new messages