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.

New scriptable options context - breaking changes?

See original GitHub issue

Documentation Is:

  • Missing or needed
  • Confusing
  • Not Sure?

Please Explain in Detail…

The PR #7981 changed the structure of the scriptable options context.

Now, doing some tests applying a callback to backgroudColor to a dataset, the chart instance is missing.

Your Proposal for Changes

In my opinion, the context should contain always a reference to the chart in order to leave the coder to apply whatever logic he/she wants.

Furthermore I think this is a breaking change and it should be documented into migration guide.

Last but not least, the documentation is unclear because, if I have understood correct, the context can have different contents but you must specify well when the different types (chart, dataset, data, scale and tick) are used, for which options node

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
theRod15commented, Nov 4, 2020

Thats a good point tho.I got you. Upvote!

0reactions
stockiNailcommented, Nov 5, 2020

@kurkle as promised, let me share my feedback.

I have changed my code (mix of JSINTEROP and JS injection) and it’s working perfectly. I don’t use any type because at the end of the day I don’t need it. Furthermore, I can use the same context for DataLabels plugin.

I don’t need to know which context is used anymore, because in my project there is only 1 context which can map whatever structure has got and it is used for all callbacks.

THANK you very much

Read more comments on GitHub >

github_iconTop Results From Across the Web

3.x Migration Guide - Chart.js
Chart.js 3.0 introduces a number of breaking changes. ... different contexts, it allows using other resolved options in scriptable options.
Read more >
Migrating Breaking Changes in SvelteKit - Netlify
SvelteKit has gone through a few breaking changes recently including an entire routing overhaul, changes to the load API, and a switch to ......
Read more >
State of Chart.js & V3.0 · Issue #6598 - GitHub
js 3.0 introduces a number of breaking changes. Chart.js 2.0 was released in April 2016. In the years since then, as Chart.js has...
Read more >
Breaking changes in 7.9 | Elasticsearch Guide [7.17] | Elastic
This section discusses the changes that you need to be aware of when migrating your application to Elasticsearch 7.9. See also What's new...
Read more >
Breaking changes in v5 - Pester
Pester v5 included an all-new runtime which lead to some breaking changes in syntax and features for existing users. See this list of...
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