apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.2k stars 19.61k forks source link

bar chart display abnormal when setting stack [Bug] #16552

Closed zhaoxuhui1122 closed 6 months ago

zhaoxuhui1122 commented 2 years ago

Version

5.3.0

Link to Minimal Reproduction

https://codesandbox.io/s/admiring-leftpad-h8jcdk?file=/src/App.tsx

Steps to Reproduce

  1. set stack property as xxx
  2. set xAxis type as time

Current Behavior

  1. yAxis Start position is not zero
  2. some data are not display

The display is normal after switching to version 5.2.2

image

Expected Behavior

  1. yAxis Start position is zero
  2. all data are display

image

Environment

- OS:Mac OS
- Browser: Chrome
- Framework: React

Any additional comments?

No response

echarts-bot[bot] commented 2 years ago

I'm sorry to close this issue for it lacks the necessary title. Please provide a descriptive and as concise as possible title to describe your problems or requests and then the maintainers or I will reopen this issue.

Every good bug report or feature request starts with a title. Your issue title is a critical element as it's the first thing maintainers see.

A good issue title makes it easier for maintainers to understand what the issue is, easily locate it, and know what steps they'll need to take to fix it.

Moreover, it's better to include keywords, as this makes it easier to find the issue self and similar issues in searches.

echarts-bot[bot] commented 2 years ago

@zhaoxuhui1122 It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗

TRANSLATED
**TITLE** When setting the stack property of the histogram, the display is abnormal in some scenarios [Bug] **BODY** ### Version 5.3.0 ### Link to Minimal Reproduction https://codesandbox.io/s/admiring-leftpad-h8jcdk?file=/src/App.tsx ### Steps to Reproduce 1. Set the histogram data stack parameter 2. xAxis is type is time 3. There is no data at some time points in the series ### Current Behavior 1. The starting position of the histogram stack is not 0 2. Some histograms cannot be displayed For details, please refer to the codesandbox link, **Switching to version 5.2.2 and below is normal** ![image](https://user-images.githubusercontent.com/23182684/154913553-46c6ad9c-3656-444c-83fe-1440a9a7f922.png) ### Expected Behavior 1. The starting position of the histogram is close to the horizontal axis 2. All data can be displayed normally ![image](https://user-images.githubusercontent.com/23182684/154913807-64a60bc5-85a3-4ced-acb9-720e0267ffb2.png) ### Environment ````markdown - OS: Mac OS - Browser: Chrome - Framework: React ```` ### Any additional comments? _No response_
pissang commented 2 years ago

You can add '-' in the missing data to fix this issue.


        {
          name: "Union Ads",
          type: "bar",
          stack: "Ad",
          emphasis: {
            focus: "series"
          },
          data: [
            [1645426533000, 1],
            [1645426534000, '-'],
            [1645426535000, 1]
          ]
        },
zhaoxuhui1122 commented 2 years ago

This approach is not suitable for my current scenario, where the data to render is pulled from the log server,

It is impossible to know exactly whether there is data at a certain point in time, so I don't want to conduct too much analysis and processing on the obtained data.

I switched to version 5.2.2 first

use youdao translation 😄

github-actions[bot] commented 7 months ago

This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.

github-actions[bot] commented 6 months ago

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!