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.

Bar chart with time axis doesn't use correct "min" and "max" axis options.

See original GitHub issue

Version

4.9.0

Steps to reproduce

Put the code bellow into Echarts exemple page like https://echarts.apache.org/examples/en/editor.html?c=line-simple

option = {
    yAxis: [
        {
            type: "value"
        },
        {
            gridIndex: 1,
            type: value
        }
    ],
    xAxis: [
        {
            min: 1572883414563,
            max: 1604505814563,
            type: "time"
        },
        {
            min: 1572883414563,
            max: 1604505814563,
            gridIndex: 1,
            type: "time"
        }
    ],
    series: [
        {
            type: "line"
        },
        {
            data: [[1575068400000,89938],[1577746800000,467048]],
            xAxisIndex: 1,
            type: "bar",
            yAxisIndex: 1
        }
    ],
    grid:[{bottom: "54%"},{top: "54%"}],
    dataZoom: [
        {
            realtime: true,
            xAxisIndex: [0,1]
        },
        {
            realtime: true,
            xAxisIndex: [0,1],
            type: "inside"
        }
    ]
}

What is expected?

Min for the two xAxis should be 11-04-2019 (1572883414563 value in option) and Max for the two xAxis should be 11-04-2020 (1604505814563 value in option).

What is actually happening?

Ok for the first xAxis, but not the second. Second axis has 10-22-2019 for Min and 11-18-2020 for Max.


If you set the second series to be type: “line”, the problem does not occur. So it may be a problem with bar series…

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:11

github_iconTop GitHub Comments

1reaction
kayijyccommented, Sep 1, 2022

Same problem here 😞

1reaction
DaoNguyenTrongcommented, Jun 25, 2022

I’m having the same problem

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bar chart with time axis doesn't use correct "min" and "max ...
Ok for the first xAxis, but not the second. Second axis has 10-22-2019 for Min and 11-18-2020 for Max. If you set the...
Read more >
Display or change dates on a category axis - Microsoft Support
In the chart, right-click the category axis, and then click Format Axis. In the Format Axis pane, select the Axis Options tab. Expand...
Read more >
The time (vertical) axis is showing random seconds vs
Click anywhere in the vertical axis to select it. Right-click and select Format Axis. In the Axis Options: Minimum: Select Fixed and enter...
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 >
Changing the Axis Scale - Excel Ribbon Tips
Choose Format Axis from the Context menu. (If there is no Format Axis choice, then you did not right-click on an axis in...
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