Comments (9)
have you got the link to issue in nnick/chart.js where the modifications are
from chart.js.
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.
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.
ah ok if there are comments i can see what has been added cheers
from chart.js.
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.
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.
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.
Ok really thank you ! :)
Sure, i'll take a look at it and gonna tell you if i spot something ;)
from chart.js.
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)
- ScaleBeginAtZero not working when null values passed to line graph
- sparse data sets produce curvey lines HOT 1
- positionning stacked bars HOT 2
- scaleShowLines not working HOT 2
- Enabling tooltip when hovering over labels. HOT 4
- labelsFilter no longer seems to work HOT 2
- Double Y axis HOT 4
- Target Line HOT 1
- missing destroy() function in Overlay HOT 1
- Fix rotate when use labelsFilter HOT 1
- Is there a chance to port overlay as as chart.js plugin? HOT 1
- ScaleOverride not working HOT 3
- Enhancement request: Pie chart tooltips always displayed by default
- Horizontal line missing on responsive HOT 3
- Possible Mobile problem HOT 10
- When the chart data is updated, the y axis is not update to match the data
- Stack chart? HOT 4
- is it possible to hide the dot if the value is same as previous HOT 1
- Add horizontal bar chart
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.