Comments (12)
I also have this issue.
from chart.js.
+1 this would be great to have!
from chart.js.
I tried to replace some value by NaN
, but it didn't work. This would definitly be useful.
from chart.js.
+1 - it would be extremely useful!
from chart.js.
+1
from chart.js.
+1
from chart.js.
This would be great
from chart.js.
You can just make it skip over doing the drawing iteration for that line if its null. (Took me forever to find where its doing the line drawing.) The way it works before this is it will interpret null as zero.
822: for (var j=1; j<data.datasets[i].data.length; j++){
if (!data.datasets[i].data[j]) { continue; }
823: if (config.bezierCurve){
845: for (var k=0; k<data.datasets[i].data.length; k++){
if (!data.datasets[i].data[k]) { continue; }
846: ctx.beginPath();
from chart.js.
The proposed solution by Linagee has some problems (curve and filling are not correct; solution not valid when the first value is missing).
In the alternate version that you will find at https://github.com/FVANCOP/ChartNew.js, I have implemented a solution that is more accurate. This version is down compatible with Nick's version.
Sample data that works in the alternate version :
var mydata1 = {
labels : ["January","February","March","April","May","June","July"],
datasets : [
{
fillColor : "rgba(220,220,220,0.5)",
strokeColor : "rgba(220,220,220,1)",
pointColor : "rgba(220,220,220,1)",
pointStrokeColor : "#fff",
data : [0.65,0.59,0.90,0.81,0.56,0.55,1.00],
title : "pFirst data"
},
{
fillColor : "rgba(151,187,205,0.5)",
strokeColor : "rgba(151,187,205,1)",
pointColor : "rgba(151,187,205,1)",
pointStrokeColor : "#fff",
data : [,0.34,,"0.19",0.96,0.27,],
title : "pSecond data"
}
]
}
The alternate version also support negative values (which is not the case in Nick's version).
from chart.js.
Would also like to see this feature in the main Chartjs. The new Chartjs has some nice new features. Both together would be great.
from chart.js.
+1
from chart.js.
Being worked on here: #435
Closing this as duplicate of this.
from chart.js.
Related Issues (20)
- skipNulls is not working with dataset parsing
- Zoom plugin is not registered exception HOT 1
- "borderRadius" at bottom is ignored, when using "borderSkipped: 'middle'"
- Timeline / Gantt Style Charts HOT 1
- Data-labels not rendering. Bar Element element coordinate properties 'y' and 'base' are assigned 'NaN' when all values for that dataset are zero. HOT 3
- Error on IPHONE 5s running 12.9.7 HOT 4
- Add more styles for legends
- Configuration "animation: false" doesn't load point icon images HOT 2
- Floating Stacked Bar Chart problem + Duplicate legend problem
- Allow setting constant width for bars and variable width for categories
- Setting Y-Min for bar chart messes with interactions/tooltips
- ticks padding does not work as expected
- padding for the legend
- Clip option on scale doesn't do anything
- Cannot read properties of null (reading 'getContext')
- Radial Bar Chart Label Issue HOT 3
- Y-labels cropped way too early for vertically stacked axes
- Ticks callback function don't return initial value labels HOT 2
- floating point on y axis HOT 8
- Easy API for setting background color on each dataset's tooltip
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.