Scriptables' context is missing elements and options
See original GitHub issueI’m using a scriptable display
property to control when annotations can be shown, based on their options. (This is the same use case I’d originally asked about in #244.) This was working in an earlier copy of chartjs-plugin-annotation (circa December 2020), but in the current 1.0.0-rc, it’s giving problems:
- The first time
display
is called, the context parameter’selement
member is completely missing. - The second time it’s called,
element
is present, but it has nooptions
member.
If display
is called again (for example, because the chart updates from showing or hiding a dataset), then element.options
is correctly populated.
See https://codesandbox.io/s/chartjs-annotation-context-c95k6 for a demo. The console will show error messages when the page is first loaded. Clicking a dataset’s legend item to show or hide the dataset will cause the annotations to be correctly shown or hidden.
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (8 by maintainers)
Top Results From Across the Web
React-chartjs-2 gradient fill error on canvas context
I have a react-chart-js2 component that I am trying to make a gradient on the fill however I am getting a few different...
Read more >Manual: Scheduling and executing rendering commands in ...
Scheduling and executing rendering commands in the Scriptable Render Pipeline. This page explains how to schedule and execute rendering commands in the ...
Read more >Scriptable service catalog variables
You can use scripting to reference any request item variable from a table in scoped and non-scoped environment.
Read more >Line Chart - Chart.js
data.datasets[index] - options for this dataset only ... Context for the scriptable segment contains the following properties:.
Read more >NetSuite Applications Suite - Oracle Help Center
Creating Customer-Facing Messages from Scriptable Cart ... Troubleshooting Missing Retrieved Products in NetSuite Connector · Troubleshooting Wrong Values ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I created #388 to track the
options.type
discrepancy. I apologize for the delay in getting back to this. Thanks for your help!Separate issue would be good. This can be closed after that?