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.

Bars do not render when data is large (billions, trillions, etc) and the linear scale min/max ticks are adjusted to match the range of data.

See original GitHub issue

When the min/max for linear scales is adjusted to be scaled to the data the bars do not render.

When I chart the data - data: [2222222222, 2222222221] and adjust the scale min/max to this - ticks: { min: 2222222220, max: 2222222224 } The bars do not render on the screen. What we noticed is that the larger the numbers (billion, trillion, etc). The larger the range could be.

Expected Behavior: The bars render on the screen.

Actual Behavior: The bars are not rendered to the screen.

Here is a codepen showing the undesired results. https://codepen.io/Garvice/pen/QQGMzg

Seems be happening in Chrome browsers for all OSs. However, for some it happens on Vertical Bar, some on Horizontal bar and some on both. We have tried versions 2.6, 2.7 and 2.7.1

This Bug is having a major impact on a year long project expected to release to production this month. I have not had a chance to dig-in and see if I can discover the root cause, but will do so and would love any help, support, or direction to this effect.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
loicbourgoiscommented, Feb 8, 2018

Adding vm.base = 0; to Chart.elements.Rectangle.prototype.draw() makes it work. No idea why. See line 11 in jsfiddle.

0reactions
garvice-smartsheetcommented, Mar 5, 2018

@simonbrunel the recommended solution from @loicbourgois seems to work for this case, but not really sure what effect this would have on the whole of ChartJS if we always set vm.base = 0; Seems like this might cause issues elsewhere.

Could you please advise - thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Labels: anchor, align, in mixed charts · Issue #15 - GitHub
Bars do not render when data is large (billions, trillions, etc) and the linear scale min/max ticks are adjusted to match the range...
Read more >
Display Y Axis Label in Millions or Billions - YouTube
If you're dealing with " big " data and charting it, you'd want the labeling to reflect it in words with the shortened...
Read more >
Customizing Axes | Charts - Google Developers
Dimensions in the data are often displayed on axes, horizontal and vertical. Such is the case for: Area Chart, Bar Chart, Candlestick Chart,...
Read more >
ui.igFinancialChart - Ignite UI™ API Documentation
The igFinancialChart is a lightweight, high-performance chart. This chart can be easily configured to display financial data using an extremely simple and ...
Read more >
Previous - ChartIQ SDK Documentation
ChartEngine#clear has been aded as a convenience function to prevent interaction on charts with no valid data. CIQ.Renderer.Heatmap was enhanced so opacity can ......
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