question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Options.datasets[type] sounds to do not exist

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
stockiNailcommented, Mar 6, 2021

Should be ok after #8563

I confirm it works as expected! Thank you @kurkle

1reaction
kurklecommented, Jan 21, 2021

But looking at the output: image

There might be something wrong still (the animations, barPercentage and categoryPercentage seem misplaced).

Read more comments on GitHub >

github_iconTop Results From Across the Web

I am having this error in charts v3 chartjs-chart-treemap ...
options.elements.treemap.labels.color. Since it looks like you want it in the dataset, your datasets array would look like this:
Read more >
Options | Chart.js
Options are resolved from top to bottom, using a context dependent route. ... dataset.type defaults to config.type , if not specified.
Read more >
Types of synthetic data and 4 real-life examples (2022) - Statice
There are different types of synthetic data: media, text, and tabular. This article presents examples of companies using synthetic data, from Amazon's Alexa ......
Read more >
Synthetic Data for Machine Learning: its Nature, Types, and ...
But collecting real data is not always an option due to the cost, ... Regarding its composition, there are two types of synthetic...
Read more >
Datasets Documentation - Kaggle
Not only are open, accessible data formats better supported on the platform, ... The simplest and best-supported file type available on Kaggle is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found