react-chartjs icon indicating copy to clipboard operation
react-chartjs copied to clipboard

What's the plan to upgrade to chart.js 2.0?

Open ttyao opened this issue 8 years ago • 37 comments

ttyao avatar Mar 04 '16 01:03 ttyao

+1

RamonBeast avatar Mar 07 '16 16:03 RamonBeast

+1

flgarrid avatar Mar 08 '16 00:03 flgarrid

Every body can start a new branch

jbmeslin avatar Mar 14 '16 11:03 jbmeslin

~~yep I guess this repo is dead~~

RamonBeast avatar Mar 23 '16 16:03 RamonBeast

Got a PR here: https://github.com/jhudson8/react-chartjs/pull/87

Take the initiative and help test this PR out so we can get it merged.

austinpray avatar Mar 27 '16 20:03 austinpray

Here's the plan:

  1. Create a branch to consolidate V2 development (https://github.com/jhudson8/react-chartjs/tree/chartjs-v2)
  2. Release current master as 1.0.0. 1.0.0 will accept backports of bug fixes and perhaps react version compatibility updates.
  3. Release 2.0.0 and onward as chartjs v2 compatible.

austinpray avatar Mar 27 '16 21:03 austinpray

The faster you guys test https://github.com/jhudson8/react-chartjs/tree/chartjs-v2 the faster this can get consolidated into a 2.0 release

austinpray avatar Apr 06 '16 17:04 austinpray

I'd be very happy to help. I'm trying to integrate it into my project and so far I get:

core.js:63Uncaught TypeError: (intermediate value)[chartType] is not a function

I guess I'm using it wrong: I cloned the v2 repo and temporarily replaced it in my node_modules directory, chart.js is updated to version 2.0.0. Can you please point me to what I'm doing wrong so I can make all required tests?

Thanks

RamonBeast avatar Apr 11 '16 15:04 RamonBeast

@RamonBeast I think someone else encountered the same issue - see #102.

Interested to see resolution to this myself.

leighghunt avatar Apr 14 '16 04:04 leighghunt

I noticed that when I upgraded, the fillColor for a line was no longer honored. It is just a default grey. Any insights on this? I can't seem to find and deprecations in the Chart.js upgrade notes.

ianks avatar Apr 15 '16 23:04 ianks

Another issue, the label in the datasets key does not update in the canvas when it is changed.

EDIT: What I mean by label can be shown in the Line chart. The switches at the top (I suppose they are called legends?), do not correlate with the current label.

Imgur

ianks avatar Apr 16 '16 03:04 ianks

@ianks did everything work out of the box after the upgrade? Because I'm still having the same issue as past week. Can I ask you how you've made it work?

RamonBeast avatar Apr 19 '16 16:04 RamonBeast

@RamonBeast Things worked, but there were also the issues that I described above. Did you make sure to update ChartJS to 2.0.0?

ianks avatar Apr 19 '16 16:04 ianks

re: my comment in about the label; It seems the label option in the Object in the datasets array is not being updated despite new props being passed in.

ianks avatar Apr 19 '16 16:04 ianks

I made a PR which addresses some of the issues experiencing: #109

However, many of the options from chart.js v1 are different from v2. It took me a little bit to realize the documentation is now located at a new place: http://nnnick.github.io/Chart.js/docs-v2/

Use the new documentation to help transition.

ianks avatar Apr 19 '16 18:04 ianks

Hi guys, I appreciate all the help here.

Firstly, after transitioning from Charts.js 1.x, I am getting an error that looks like this: TypeError: Cannot read property 'datasets' of undefined I have upgraded charts.js and I am using the chartjs-v2 branch of this repo. It looks like the URL that @ianks mentioned there isn't working unfortunately.

Not quite sure if what the problem is, but either way I am willing to help test this branch out further :)

Best regards, Doug

dougmolineux avatar Apr 28 '16 16:04 dougmolineux

@dougmolineux The new docs reflect 2.0

http://www.chartjs.org/docs/

ianks avatar Apr 28 '16 16:04 ianks

What's the status of v2? Please let me know where the help is required so I can jump in. cheers.

gor181 avatar Apr 28 '16 22:04 gor181

@gor181 please checkout #109 and test it, you can reference it in your package.json like so:

"react-chartjs": "git+https://github.com/ianks/react-chartjs.git#label-fix-v2",

ianks avatar Apr 28 '16 22:04 ianks

Any news on a 2.0 release? I have been using the branch for awhile now, and it seems pretty stable.

stevewillard avatar Jun 12 '16 18:06 stevewillard

@ianks is this repo still valid? I get an error in npm install, and when I tried to open this url I get Page Not Found Error https://github.com/ianks/react-chartjs

RezaRahmati avatar Jun 15 '16 13:06 RezaRahmati

@RezaRahmati It got merged into the v2 branch here:

https://github.com/jhudson8/react-chartjs/tree/chartjs-v2

You should be able to npm install jhudson8/react-chartjs#chartjs-v2

stevewillard avatar Jun 15 '16 15:06 stevewillard

@stevewillard Thanks, it works now

RezaRahmati avatar Jun 15 '16 15:06 RezaRahmati

Do I have to install chart.js alongside the chartjs-v2 branch? If so, how do I install 2.0.0 of chartjs? I tried `npm i -D [email protected]" but got:

npm ERR! No compatible version found: [email protected]
npm ERR! Valid install targets:
npm ERR! 0.3.24, 0.3.23, 0.3.22, 0.3.21, 0.3.20, 0.3.19, 0.3.18, 0.3.17, 0.3.16, 
0.3.15, 0.3.14, 0.3.13, 0.3.12, 0.3.11, 0.3.10, 0.3.9, 0.3.8, 0.3.7, 0.3.6, 0.3.5, 
0.3.4, 0.3.3, 0.3.2, 0.3.1, 0.3.0, 0.2.6, 0.2.5, 0.2.4, 0.2.3, 0.2.2, 0.2.1, 0.2.0, 
0.1.1, 0.0.8, 0.0.7, 0.0.6, 0.0.4, 0.0.3, 0.0.2

EDIT: Nevermind, it's chart.js not chartjs. Somehow got it in my head that I couldn't allow periods in module names.

rublev avatar Jun 24 '16 21:06 rublev

The chartjs is a other npm package. Please try npm i -D chart.js

ledsun avatar Jun 25 '16 01:06 ledsun

What's the progress on this? v2.1.0 introduced plugins for ChartJS and I would really like to use it. Unfortunately, I've looked around the chartjs-v2 branch of this project and I can't find the version number of ChartJS that it references.

That being said, since the last commit was a while ago, I'm going to assume that this project hasn't caught up to 2.1.x yet. Am I correct?

adrianmcli avatar Jul 13 '16 11:07 adrianmcli

We may need to consider forking this repo to get it to 2. There doesnt seem to be much interest in the maintainers for getting us up to 2.

ianks avatar Jul 13 '16 18:07 ianks

@ianks plenty of interest. Pull requests accepted.

austinpray avatar Jul 13 '16 19:07 austinpray

@austinpray should we open a PR for chartjs-v2 branch against master as a way of tracking all the changes/things that need to be done for 2.0? I have been using that branch heavily in production with no issues, and I am sure others have as well. I propose that we get the ball rollings by making a PR and resolving any outstanding issues there.

ianks avatar Jul 13 '16 21:07 ianks

I think there is 2 options.

  1. Merge the chartjs-v2 branch and publish the v2.0.0-beta npm package, now
  2. More test to confirm the chartjs-v2 branch work with the Chart.js v2

I think the 1st option is better.

Reason 1

The package.json of user applications will be more simple.

I do not want to write:

"react-chartjs": "git://github.com/jhudson8/react-chartjs.git#chartjs-v2"

or

"react-chartjs": "git://github.com/jhudson8/react-chartjs.git#c711d75"

If you do not want to update the latest version of the npm repository, you can use beta tag.

Publish Beta Versions of NPM Modules (Example)

Reason 2

Test needs long time.

When the 2nd option is selected, the goal of test should be defined, I think. Because test is endless.

For example, I am writing samples of react-chartjs with the Chart.js v2. ledsun/react-chartjs-example: react-chartjs sample with Chart.js v2 This will not be completed for a while.

Reason 3

The Chart.js is actively developed. v2.2.0-rc.1 is released today. I am afraid of that the chartjs-v2 branch will not completed forever.

ledsun avatar Jul 14 '16 06:07 ledsun