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

When using Chart.js to display data in a bar chart, there is an issue with overlapping data, especially when the datasets array contains a large number of objects. Some bars are rendered incorrectly, overlapping each other. When the dataset becomes even larger (e.g., several thousand objects), the plugin stops rendering the chart entirely, showing only an empty space or a placeholder square. #12000

Open
WineRBK opened this issue Jan 14, 2025 · 0 comments

Comments

@WineRBK
Copy link

WineRBK commented Jan 14, 2025

Expected behavior

Each bar should be displayed separately, without overlapping other bars, even with a large amount of data.

The X-axis should correctly display labels, and the data should be visualized without distortion.

For very large datasets, the chart should either render correctly or provide a warning about exceeding limits, rather than failing silently.

Current behavior

With a moderate amount of data (e.g., a few hundred objects), bars overlap each other, making the chart unreadable.
image

With a large amount of data (e.g., several thousand objects), the chart stops rendering entirely. Instead, an empty space or a placeholder square is displayed, as if something went wrong.

Reproducible sample

https://codesandbox.io/p/sandbox/chartjs-issue-forked-77v3w2

Optional extra steps/info to reproduce

No response

Possible solution

No response

Context

No response

chart.js version

^4.4.6

Browser name and version

Google Chrome 131.0.6778.265

Link to your project

No response

@WineRBK WineRBK changed the title При использовании Chart.js для отображения данных в виде столбчатой диаграммы (bar chart) возникает проблема с наложением данных, особенно при большом количестве объектов в массиве datasets. На графике некоторые столбцы отображаются некорректно, перекрывая друг друга. При еще большем количестве данных (например, несколько тысяч объектов) плагин перестает отображать график вовсе, показывая только пустое пространство или квадратик. When using Chart.js to display data in a bar chart, there is an issue with overlapping data, especially when the datasets array contains a large number of objects. Some bars are rendered incorrectly, overlapping each other. When the dataset becomes even larger (e.g., several thousand objects), the plugin stops rendering the chart entirely, showing only an empty space or a placeholder square. Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant