Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Candles degrade into lines on some data #47

Open
Pinelab opened this issue Jan 21, 2019 · 6 comments
Open

Candles degrade into lines on some data #47

Pinelab opened this issue Jan 21, 2019 · 6 comments

Comments

@Pinelab
Copy link

Pinelab commented Jan 21, 2019

Browser Google Chrome 71.0.3578.98
download
download2

In MS Edge on Windows 10 the similar
full test folder in app. below::

Test.zip

@benmccann
Copy link
Collaborator

Thanks for sharing this! I'm pretty busy at the moment working on fixes and improvements in the main Chart.js repo in order to improve the finance chart, so it may be quite awhile before I get a chance to look at this. If you're able to track down the problem I'd be happy to help in reviewing any fixes

@benmccann
Copy link
Collaborator

@Pinelab can you describe what the difference between the first and second charts are? I'm not sure why it'd work on the second, but not the first

@FLYBYME
Copy link

FLYBYME commented Aug 5, 2019

I seem to be having the same problem.

graph

@cyberluke
Copy link

I have same problem.

@FelixTrulsson
Copy link

FelixTrulsson commented May 24, 2020

This occurred in my app when I had multiple dataset entries with identical time value. End result being the horizontal bar size is clamped to 0 as Chart.js attempts to calculate the geometry. Filter for unique time / x values resolved issue.

@ewmailing
Copy link

ewmailing commented Nov 3, 2021

I have a similar problem, but with some additional criteria.

I have a chart with 2148 bars (can be thought of as 8 years of daily stock data). Obviously, with so much data, the bars will be small when drawing everything to fit. So this part is acceptable. And they do not look like single lines at this point, which is good.

However, I am also using the zoom plugin so I can zoom in to user selected parts of the graph. When zooming in, things start looking better, up until a certain point. Things start looking good zooming in to around 3-6 months of data.

But once you zoom in to around less than 1.5 months worth of data, the bars then degrade into single vertical lines.

Unlike the post above, I do not believe there are any problems with my dataset, such as identical time values. I am able to use the parsing:false option for my graphs and get the same results either way.

UPDATE: If I use a substantially smaller data set, I can reproduce this problem if I zoom in really, really close. For example, if I take the above data set, and then delete everything except say the first 70 elements, the graph seems to behaves fine. I can zoom in close that I can get a single fat bar on my screen. But if I really push it, and zoom in even further where I select a range that is less than that width of that fat bar, the bar degrades into a single vertical line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants