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.

Wrong dataShadow for axis type time

See original GitHub issue

One-line summary [问题简述]

The dataShadow of the dataZoom is plotted with incorrect x-axis position when axis type is ‘time’.

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]: 3.7.2
  • Browser version [浏览器类型和版本]: Firefox 59.0.2 (64bit)
  • OS Version [操作系统类型和版本]: Windows 7

Expected behaviour [期望结果]

When the axis type is ‘time’, the dataShadow in the dataZoom should be plotted depending on the time. However, the data points are plotted with a constant offset in the dataShadow, even when there are huge jumps in time. The example below should be pretty self-explanatory.

ECharts option [ECharts配置项]

option = {
    title : {
        text: 'DEBUG',
        x: 'center',
    },
    grid: {
        bottom: 80
    },
   
    dataZoom: {
        type: 'slider',
        //showDataShadow: false,
        show: true,
        realtime: true,
        xAxisIndex: 0,
    } ,
    xAxis : {
        type: 'time',
        boundaryGap : false,
        axisLine: {onZero: false},
    } ,
    yAxis: {
        type: 'value',
    },
    series: {
        name:'seriesName',
        type:'line',
        yAxisIndex:0,
        animation: false,
        data: [ ['2009/6/12 2:00', 0], 
                ['2009/7/1 0:00', 0], 
                ['2009/7/1 1:00', 100], 
                ['2009/7/1 2:00', 0], 
                ['2009/7/1 3:00', 0], 
                ['2009/7/1 4:00', 0], 
                ['2009/7/1 5:00', 0], 
                ['2009/7/1 6:00', 0], 
                ['2009/7/1 7:00', 0], 
                ['2009/7/1 8:00', 0], 
                ['2009/7/1 9:00', 0], 
        ]
    }
};

Other comments [其他信息]

Use online editor for fast testing: https://ecomfe.github.io/echarts-examples/public/editor.html

e-charts bug

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:4
  • Comments:5

github_iconTop GitHub Comments

1reaction
sirkalmicommented, Nov 12, 2021

This problem also occurs with me, it is very annoying.

0reactions
github-actions[bot]commented, Sep 11, 2021

This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Wrong dataShadow for axis type time · Issue #8186 - GitHub
One-line summary [问题简述] The dataShadow of the dataZoom is plotted with incorrect x-axis position when axis type is 'time'.
Read more >
chart.js 3 and time axis displays wrong date data
When including the latest 3.4.0 chart.js the time axis is not correctly formatted (the datapoints are evenly distributed on the x-axis). However ...
Read more >
Display or change dates on a category axis - Microsoft Support
Under Axis Options, click Fixed for Base Unit and then, in the Base Unit box, click Days, Months, or Years.
Read more >
Customization — hvPlot 0.8.2 documentation
This section will outline the valid options to control the axes of a plot, to control datashading and to modify the style of...
Read more >
Date Axis in Excel Chart is wrong - AuditExcel
You've built your chart, it all makes sense and suddenly you look at your horizontal axis, and the date axis is wrong. This...
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