Comments (11)
Yeah its a bug fix so that would sound good to me
from chart.js.
Interesting, this only happens if the min
is set on the axis 🤔
@stockiNail I'm guessing this is somehow related to https://github.com/chartjs/Chart.js/pull/11377/files
from chart.js.
@etimberg @StephanTLavavej I'll have a look.
EDIT: The issue is related to line.element draw where start and count are related to total amount of points and not the subset.
from chart.js.
@etimberg @LeeLenaleee PR #11432
from chart.js.
If it makes the investigation easier, I've simplified the repro to a plain linear axis, instead of needing a time axis. The new repro: https://codepen.io/StephanTLavavej/pen/QWJzqWg
from chart.js.
Based on "https://codepen.io/StephanTLavavej/pen/QWJzqWg" the line is not displayed when:
(xmin>4) && (x<(xmin*2)-4)
from chart.js.
@etimberg @StephanTLavavej @ErikDorstel I have seen where the issue is. To fix #11273 the line dataset element is fill with only the points to show to calculate correctly the control points.
Unfortunately the draw
method (but also others to calculate the paths and segments) are invoked passing the start index of the points which is related to the whole amount of points, instead the points in the line element are always starting from.
I need a bit of time to find out the best fix to solve both issues.
from chart.js.
I have same issue: https://stackblitz.com/edit/stackblitz-starters-ngv2t8?file=src%2Fapp%2Fapp.component.ts
Bug happens with both wheel and drag and on all axis modes. I have linear scales and no limits. Downgrading to Chartjs 4.3.0 fixed it.
I also noticed that same issue happens in chartjs-plugin-zoom Click-to-zoom sample (only sample with linear scale): https://www.chartjs.org/chartjs-plugin-zoom/latest/samples/wheel/click-zoom.html, even though it says be using 4.2.1.
from chart.js.
@elinake thanks! Under the hood the zoom plugin changes the scale limits to do the zooming so I could see it breaking once a zoom starts
from chart.js.
@etimberg I think the best thing could be to revert the previous PR to solve this issue. Tee other issue (no blocking) needs more investigation, in my opinion. What do you think? if agree, I'll prepare the PR.
from chart.js.
Sure, lets revert the PR. @LeeLenaleee what do you think about making that into a v4.3.3?
from chart.js.
Related Issues (20)
- Chart.js packages documentation along with actual source code, bloating node_modules HOT 1
- Funnel Chart Please HOT 2
- Doughnut chart has an active element when hovering out
- Label font style not rendering due to having some 'null' points in the array.
- Line chart type time data is being grouped incorrectly
- CDN version of the plain (esm) chart.js cannot be imported? HOT 8
- Bottom line under 0 (zero) is drawn in line chart but shouldn't if tick beginAtZero is set to 0
- "pie": Runtime errors when setting legend position to "left" or "right" HOT 5
- Tick stepSize error HOT 2
- local Chart (chart.js / chart.min.js) HOT 1
- #4.x.x / About chart area zero line HOT 1
- Type error with BubbleDataPoint when using ChartData<'bubble'>
- Type error with font weight as a number
- Polar line plot
- Add boolean property to match the Datalabels color with the corresponding line/bar color HOT 2
- Type error related to 'cutout' in chart options
- How to create custom legend/ How to provide line break in the legend if it is long text?
- 2 Bar and 2 Line chart are not aligning with each other. HOT 2
- TimePoint support for time series HOT 1
- Resposive chart infinitely shrinking with certain zoom levels HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chart.js.