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.

Global datasets options thought

See original GitHub issue

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?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:18 (18 by maintainers)

github_iconTop GitHub Comments

1reaction
benmccanncommented, Jan 13, 2020

Yes, I agree we should remove the options.elements.*

Regarding Chart.defaults[type].dataset vs Chart.defaults.datasets[type] - One nice thing about the Chart.defaults.datasets[type] version is that the code to resolve the options can easily get the chart-level and dataset-level defaults separately and apply them in the correct order. Though I suppose it should be easy enough either way really

0reactions
stockiNailcommented, Nov 25, 2020

@stockiNail FYI this change was reverted by #8090. See #8073 for explanation.

Thank you @kurkle I have seen and not a big deal. I’m gonna change the code with new specification in next weeks, together with the other changes (like font color, tooltip/legend/title). I want to wait for while because I:

  1. need to work on documentation for new version
  2. am working on Annotation plugin (some PRs could come)
Read more comments on GitHub >

github_iconTop Results From Across the Web

Discover Global Datasets for Public Use - Gallup
Explore datasets made freely available to the public by Gallup's clients. Powered by the Gallup World Poll, these datasets, collected on behalf of...
Read more >
Where to Find Free Datasets & How to Know if They're Good ...
7 Sources for Free Datasets Anyone Can Use · Google Dataset Search · Kaggle · GitHub · Government Sources · FiveThirtyEight · data.world....
Read more >
Datasets - S&P Global Marketplace
The S&P Global Marketplace provides solutions to complement your datasets. Get the best out of your datasets through our range of solutions. MORE...
Read more >
A spatially-explicit harmonized global dataset of critical ...
In this study, we: (1) collect and harmonize detailed geospatial data of the world's main CI systems into a single geospatial database; and...
Read more >
GlobalData: Home
GlobalData provides unique data, expert analysis & innovative solutions to companies in the world's largest industries.
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