question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Time series min/max on x axis doesn't work

See original GitHub issue

The following code throws an error (getTime function not defined on Number). If I change the numbers into Date objects (in both the data and the min/max setting) - the min/max values are ignored.

var chart = c3.generate({
    bindto: '#chart',
    data: {
        x: "date",
        rows: [
            ["date", 'data1', 'data2', 'data3'],
            [1398154158000, 10, 70, 20],
            [1398154159000, 10, 70, 20],
            [1398154160000, 10, 70, 20],
            [1398154161000, 10, 70, 20],
        ]
    },
    axis: {
        x: {
            type: 'timeseries',
            tick: {
                format: '%Y-%m-%d %H:%M:%S'
            },
            min: 1398154158000,
            max: 1398155158000,
        },
    },
});

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:14 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
danelkhencommented, Apr 28, 2014

Hey, sorry for the delay, tried it, works perfectly! When fit=false works as expected, when fit=true (default) only shows ticks on actual values. Thanks a lot for the amazing work!

1reaction
danelkhencommented, Apr 24, 2014

Correction, setting axis.x.tick.fit = false fixes the ticks issue, but another problem remains (forgot to mention it previously) - the tooltip works only for the last set of vertical points, and doesn’t change for any other point in the graph.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to set the xAxes min and max values of time cartesian ...
I wanted to set a min and max value for the axes. I tried some varietions but nothing really worked.
Read more >
min and max x Axis datetime issue - Highcharts
Hello, I've got issue with setting the min and max values for the Axis datetime. When I set them my charts doesn't show...
Read more >
Can't change the X-axis scale - Microsoft Tech Community
Re: Can't change the X-axis scale​​ set second series on secondary axis, double click on X-axis and set min, max and interval.
Read more >
Range and scale on visual types in QuickSight
To change the scale of the values shown on the visual, you can use the Format Visual pane to set the range for...
Read more >
How to change x-axis min/max of Column chart in Excel?
Right click on the chart and choose Select Data. Select your series and choose Edit. Instead of having a "Series Values" of A1:A235, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found