Chart.js icon indicating copy to clipboard operation
Chart.js copied to clipboard

"Common Pitfalls" in docs

Open igorlukanin opened this issue 1 year ago • 2 comments

Documentation Is:

  • [X] Missing or needed?
  • [ ] Confusing
  • [ ] Not sure?

Please Explain in Detail...

In this Slack conversation with @LeeLenaleee, it was revealed that there's a substantial volume of repeated questions or support issues, often addressed similarly (e.g., by providing a link to 3.x Migration Guide).

Your Proposal for Changes

We can add a new section to the docs, linked from the sidebar, that would provide concise pieces of guidance.

"Known Issues" is probably not the best name since it "feels like it shows known issues in the code instead of user migration errors". So, "Common Pitfalls" might be a better name.

We can use this issue to collect cases.

Example

No response

igorlukanin avatar Aug 23 '22 12:08 igorlukanin

Top 3 issues that come to mind at the moment are:

  • Using import Chart from 'chart.js'; instead of import Chart from 'chart.js/auto';
  • Using arrays for scale config
  • Not importing Filler plugin when using treeshaking

LeeLenaleee avatar Aug 23 '22 19:08 LeeLenaleee

A few others that come to my mind:

  • Expecting the axis type to be auto determined (time vs number vs category, etc)
  • Using the old v2 types (via @types/chart.js) with v3
  • Expecting the customizability of a DOM base solution (i.e. want to use CSS to style axis labels)

etimberg avatar Aug 24 '22 23:08 etimberg