Chart.LinearGauge.js
Chart.LinearGauge.js copied to clipboard
Upgrade to be compatible with Chart.js 2.5, 2.6
Not compatible with 2.x according to #1
any plans on supporting 2.x?
I hired a freelancer to create the LinearGauge chart for a project I was working on at the time. I'd also like to upgrade to v2.x of Chart.js and could still make use of this... but it's not in my budget at the moment to hire someone to update this to work with v2.x
My hope was that by contributing it to the community, someone might pick it up and make it better (including updating it to work with newer versions of Chart.js). It seems that hasn't happened yet. :(
@scottmcculloch Totally understandable. If I get enough pressure and need to do it maybe I'll, but the chance looks low right now (priorities)
It turns out we've just decided to update everything to v2.x... which means we will need to try to get the LinearGauge extension updated to work with v2.x as part of that.
@MrCsabaToth - any chance you do freelance work and would consider this? :-)
@scottmcculloch It's not about money, but about time. I wish I could buy time in a shop. Preferably bulk
@MrCsabaToth - you and me both! :-)
FYI - I ended up needing this for v2.x, so I've hired someone to update it. It's in final testing now, and once that's complete and the documentation is updated I'll be contributing it back to the community.
I may need help figuring out exactly how to do that (technically, getting the repository into the right place).
In case I'll make use of that (it's uncertain right now) I'd like to donate a small amount
Thanks for the offer... but it really wasn't very expensive... I'm happy to be able to contribute it -- besides, once it's available you may see opportunities to improve upon it. ;-)
I'm not a git expert, so I'm not sure what would be the best way to get the updated LinearGauge extension into the repo for the community... Should a pull request be sent? Or better to have someone here clone it from the repo it's in?
I'd create a new branch for it and push it there. Or rather a new branch for the current version and the 2.6 would be the main branch.
I'm not sure how to create a new branch -- I don't see it as an option (perhaps because it's not my repository?) The v2.x is ready to be pushed/pulled to this repo any time.
Oh, sorry. You need to fork this repository, then create the branch and then submit the PR. In the PR comment add "fixes #8", that will be picked up by GitHub and will tell it fixes this issue. To be more precise I'd create a branch (let's say name it "v1.x" or something which then would hold this older version and then commit the newer version against the master branch. Then submit the PR. If the owner of the repo does not react to the PR, then the only thing you can do is that you have your fork of this repo with your changes and you own that, noone can take that away. You can advertise that fork here or everyone can see it through the submitted PR. If this is mumbo-jumbo to you, you can provide the source to me and I'll perform these actions.
I think I kind of understand. ;-)
I've got a fork of this repository, so I'll try to get it all set up properly there... then I'll post the url to that repository here and perhaps you can help me figure it out from there.
Thanks!
The updated Linear Gauge is here: https://github.com/scottmcculloch/Chart.LinearGauge.js
Ready for whatever review is necessary and to be merged into the official repo.
Thanks, Scott
@scottmcculloch I can help you merge it into the official repo. Would you like to open a pull request?
Thanks @benmccann -- I've taken a quick look at the page you referenced... do I just open the pull request to the master branch? Or do I need to create a new branch first?
It's generally best to develop on a new branch. If you do git checkout -b new-branch-name
it will create the new branch for you. Then git push
will push it to github. Then if you visit your repo or this repo within a couple seconds GitHub should show a button to create a pull request from your newly created branch.
You then may want to remove the commits from your master branch by going back to the master branch with git checkout master
and git reset HEAD~18
to unstage the last 18 commits and then reset --hard HEAD
to drop the changes. Then you check do git checkout new-branch-name
to go back to your new feature branch. Dropping the commits from master isn't required for submitting the pull request, but if you want to sync your repo with this one after the pull request is merged then it would probably be required.
I was looking at the code and noticed some style issues such as a mix of tabs and spaces. Could you setup the Chart.js style rules before we merge it? There's an example change implementing that here: https://github.com/chartjs/chartjs-plugin-annotation/commit/b09902277a74844d910329177262396f450c3e00
Hi @benmccann -- I'm not sure I follow... I hired someone to create this for me, and want to make it available to the community... I don't have time to learn how to make sure it's just right before doing a merge. I'm happy to give whatever access is necessary for someone else to do what's needed and then merge it.
Ok, thanks, Scott. Since you're open to contributing the code, anyone from the community should be able to grab the code from your repo, clean it up a bit, and send the PR to merge the code in. I'll leave this ticket open for the time being to track that
I sent a PR to your repo to get the process started https://github.com/scottmcculloch/Chart.LinearGauge.js/pull/2. If you merge that PR I may send some follow ups as I get time
Hi, i downloaded the project and try to use it, but can't add datasets in any way... maybe the format is specific to the linear gauge ? Can you detail which format is expected for datas on this chart type ? Thanks a lot!