Chart.js: Any docs on how to migrate from version 1 to 2.0(beta)?

Created on 21 Jan 2016  路  8Comments  路  Source: chartjs/Chart.js

Hi, I just tried to drop in the Chart.js 2.0 beta code into an existing site (just replacing Chart.js file entirely) to see if anything would break, and it did. (I get "Uncaught TypeError: (intermediate value).Doughnut is not a function" warning). Are there any docs specifically about how to migrate existing code, with some examples?

won't fix documentation

Most helpful comment

Hello I have a similar question, I would like to migrate from 1.0.1 to 2.7.1 but I can see there is quite a huge gap in the definition of Chart object between the two, any documentation about migrating ?
All the past documentation are inaccessible and the latest doc as not information about migration (at least from what I read).

All 8 comments

Seeing as V2 is a complete rewrite, I think a migration is not easy out-of-the-box

@ssuess there aren't currently any specific migration docs. The thing to use right now are: http://nnnick.github.io/Chart.js/docs-v2/

There was great feature in version one which was RemoveData() that helps to have a moving chart like a time labled chart which based on the time ( e.g every 1 seconds ) , one of the data will be removed and new one added.
How can I do the same in new Version ?
Thanks

Another issue I am facing is , having all four quadrant being shown, it is possible in scatter or bubble chart, but what about line charts ? how can I have all 4 quadrants ?

@makarbasi to remove data points, you can change the original data object that you passed into the chart. Then call update()

Hi, it's quite old issue but maybe I found some help to not reinvent a wheel... ;)

Is there anybody out there who migrate from 1.x to 2.x version (x = any) slightly easy?

Hello I have a similar question, I would like to migrate from 1.0.1 to 2.7.1 but I can see there is quite a huge gap in the definition of Chart object between the two, any documentation about migrating ?
All the past documentation are inaccessible and the latest doc as not information about migration (at least from what I read).

You can find a few resources on Google (e.g. "How to Migrate From Chart.js 1.x to 2.x") but nothing has been written officially here and since there is no plan to write one by actual maintainers, I will close this issue. If anyone wants to write a migration guide, please submit a PR.

@AKFourSeven documentation for version 1.0.2 is still available as Markdown files.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nanospeck picture nanospeck  路  3Comments

HeinPauwelyn picture HeinPauwelyn  路  3Comments

JewelsJLF picture JewelsJLF  路  3Comments

joebirkin picture joebirkin  路  3Comments

srijitcoder picture srijitcoder  路  3Comments