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)
- Connecting scatter points HOT 4
- Safari 12.1.2 getting error Unexpected token '='. Expected an opening '(' before a method's parameter list HOT 2
- Line Chart backgroundColor looks scratched when assigning segment borderColor, 200~ points on dataset
- Filled areas of the graph are distorted when adding tension HOT 1
- Official Discord Server ? HOT 4
- Cannot see ticks lines when grid > display = false HOT 2
- Dynamic data not updating HOT 1
- Lines partially missing after upgrade from 4.3.0 to 4.3.1 HOT 1
- Moving from 4.3.0 to 4.3.1 break most of my already existing code due to types HOT 11
- Non-static registry HOT 2
- Doughnut chart legends issue in chart.js
- Partially missing line on time axis, regression in 4.3.1 HOT 11
- Toggle doughnut vs. label resizing HOT 4
- BorderRadius of Bar Chart issue on Firefox 116 HOT 5
- Release 4.3.3 missing tgz file HOT 7
- Rendering flowchart is wrong
- Superfluous value copies inside plugin options
- Vite giving chart.js ActiveElement import error HOT 1
- PackedCircle HOT 4
- Multiple charts freeze Firefox tab with maintainAspectRatio: false HOT 8
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.