3

I have recently update chart.js from 2.9.4 to 3.6.0 and ng2-chart from 2.4.3 to 3.0.8.

I have followed the migration guide from chart.js to migrate to v3.X

I've update my imported module from import { ChartsModule } from 'ng2-charts'; to import { NgChartsModule } from 'ng2-charts'; as provided in the ng2-charts documentation

But since i've update thoses package some imports seems to be missing.

For example before updating i've used to import import { Label, PluginServiceGlobalRegistrationAndOptions } from 'ng2-charts'; but since the update those import are missing from ng2-charts package, and I havn't found any information about this in ng2charts website / github or chart.js.

Does anyone face the same issue concerning missing import due to the migration ?

NB: I'm using angular@13.1.4

Thank you

E-Mohamed
  • 105
  • 9

1 Answers1

1

They took away the labels and color and some schemas i guess we have to declare those in component.ts... eg: labels:[] and then declare them to your own

I dont know how to post the code but here is a link to the new charts in github

https://github.com/valor-software/ng2-charts.git

KidRomesh
  • 11
  • 3
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Mar 09 '22 at 06:47
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/late-answers/31245958) – sno2 Mar 14 '22 at 03:29
  • Ok bro I will try to be more descriptive from now on ....! – KidRomesh Jul 06 '22 at 10:01