Code Monkey home page Code Monkey logo

Comments (9)

leighquince avatar leighquince commented on July 20, 2024

have you got the link to issue in nnick/chart.js where the modifications are

from chart.js.

Mokette avatar Mokette commented on July 20, 2024

I don't get it right now :s i've forgot to add it to my bookmarks :s
i'll try to find it again as soon as i can :)
but all the modification that nnnick submit are those i've added in the chart.js file attach to my comment (if you read the .txt file you can see where i've add it (i also comment the line beofre and after my modification to highlight them more easilly ;) )

from chart.js.

Mokette avatar Mokette commented on July 20, 2024

Oh if i remmeber well, i'll probably get some help of that fix too ;)
https://github.com/ahrex/Chart.js/commit/75e9a64cd74656c37ae2e9044ebdeb9f5a566712
(and it's probably those modification that i've add in your fork chart.js file to try to make it works with negatives values)
and this came from the Issue chartjs#669 of nnnick fork
chartjs#669

from chart.js.

leighquince avatar leighquince commented on July 20, 2024

ah ok if there are comments i can see what has been added cheers

from chart.js.

leighquince avatar leighquince commented on July 20, 2024

so it was just missing some code from one place in your example, where i have the option of drawing stacked bars and normal bars you had only added it to the stacked bars part, also added in checking for showing tooltips when hovering over labels here is an example - http://fiddle.jshell.net/leighking2/6p4fo0tb/

i have added a commit to a dev branch where you can grab the built Chart.js file (07e6e78) as im not entirely happy with this solution, i would like it to automatically detect the need to display in negative values without having to setup the overrides in the options. also when using the overlay and having a fill on the line it doesn't take into account the fact that 0 is no longer at the bottom so fills all the way from the bottom which looks weird.

so ill keep having a look at this but for the moment it does now work like the fix from nnick/chart.js's repo. when i have everything ready ill commit this to the master but for now just going to leave it on the dev branch.

from chart.js.

Mokette avatar Mokette commented on July 20, 2024

Oh ok that's why it didn't work correctly when i try to use it.
I've retrieve your new built from your commit in the dev branch and try it on my project, it wokrs really good ! :)
Yes i've seen that when you set up a fillCOlor for the line type it look really weird ^^ but i'm glad that in my case, the fillColor got an alpha 0 so it's appears transparent on the canvas and make it works not so bad and not so weird ;)

Thank you so much for your help ! :)

(juste a little question for ask if it's possible to do something ^^ on my graph the two line are both constant define by the user, so it always display a straight line, is it possible for that usecase that the line will be draw from the left side to the right side of canvas without space between the side of canvas ? :) space is due to X label/value and because dot of line graph spawn in the middle of each Bars in the bar graph but will it be possibel to draw the line directly from the y axis to the complete right side of the canvas ? Just for asking ;) )
Thanks for your answer :)

from chart.js.

leighquince avatar leighquince commented on July 20, 2024

ok ive just pushed a commit to the dev branch again for this issue which makes it so that you do;t have to override the scale and line charts display better with the negative values. you just have to make sure the beginFromZero option is false. I'm going to do some mroe testing on it but then ill merge into the master branch. if you take a look let me know if you spot anything weird with it.

from chart.js.

Mokette avatar Mokette commented on July 20, 2024

Ok really thank you ! :)
Sure, i'll take a look at it and gonna tell you if i spot something ;)

from chart.js.

leighquince avatar leighquince commented on July 20, 2024

ok ive tested it against all the charts and it seems to be working well, im going to merge the dev branch into master so if you do spot anything just add another issue, cheers

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.