-
Notifications
You must be signed in to change notification settings - Fork 12k
Description
Documentation Is:
- Missing or needed
- Confusing
- Not Sure?
Current documentation
Having a look to the current documentation, the chain to set the datasets options is:
- per dataset: dataset.*
- per chart: options.datasets[type].*
- or globally: Chart.defaults.global.datasets[type].*
What's not clear
There is another default setting for chart type, where global chart settings are stored in Chart.defaults[type]
.
Does it mean that you can set the datasets options also at global chart level?
If yes, with Chart.defaults[type].dataset
object?
If not, is this missing or not applicable?
In my personal (and not relevant) opinion, the datasets object related to chart type should be defined into global chart options (Chart.defaults[type].dataset
) and not into default options (Chart.defaults.global.datasets[type]
) because you have already options for chart type.
Am I wrong?
About the chain, element
objects are always overlap by datasets
ones, therefore my understanding is datasets options are evaluated with the following priority:
- per dataset: dataset.*
- per chart: options.datasets[type].*
- per globally: Chart.defaults.global.datasets[type].*
- per chart: options.elements.*
- per global chart: Chart.defaults[type].elements.*
- per global options: Chart.defaults.global.elements.*
Correct?