Skip to content

Options.datasets[type] sounds to do not exist #8334

@stockiNail

Description

@stockiNail

The PR #8090 should restore the old format to manage options.datasets object and, as written in the documentation, the dataset options can be changed at 3 different levels and are evaluated with the following priority:

  • per dataset: dataset.*
  • per chart: options.datasets[type].*
  • or globally: Chart.defaults.controllers[type].datasets.*

My expectation is to have in my bar chart instance the chart.options.datasets.bar with all options of bar dataset.

Instead, see the console of CodePen https://codepen.io/stockinail/pen/GRjZGRK, chart.options.datasets.bar doesn't exist and the node chart.options.datasets doesn't contains any dataset type but the options of bar dataset.

I'm not sure if this is a bug or if I misunderstood the PR #8090.

Chart.js version: dist/master

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions