Chart.js
Chart.js copied to clipboard
"Common Pitfalls" in docs
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
Top 3 issues that come to mind at the moment are:
- Using
import Chart from 'chart.js';
instead ofimport Chart from 'chart.js/auto';
- Using arrays for scale config
- Not importing
Filler
plugin when using treeshaking
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)