Giter Site home page Giter Site logo

Comments (12)

davidblurton avatar davidblurton commented on April 29, 2024

I also have this issue.

from chart.js.

timclipsham avatar timclipsham commented on April 29, 2024

+1 this would be great to have!

from chart.js.

thibault avatar thibault commented on April 29, 2024

I tried to replace some value by NaN, but it didn't work. This would definitly be useful.

from chart.js.

djogopatrao avatar djogopatrao commented on April 29, 2024

+1 - it would be extremely useful!

from chart.js.

achudars avatar achudars commented on April 29, 2024

+1

from chart.js.

linagee avatar linagee commented on April 29, 2024

+1

from chart.js.

warksit avatar warksit commented on April 29, 2024

This would be great

from chart.js.

linagee avatar linagee commented on April 29, 2024

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.

FVANCOP avatar FVANCOP commented on April 29, 2024

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.

turbobuilt avatar turbobuilt commented on April 29, 2024

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.

Aelios avatar Aelios commented on April 29, 2024

+1

from chart.js.

nnnick avatar nnnick commented on April 29, 2024

Being worked on here: #435

Closing this as duplicate of this.

from chart.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.