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.

Scriptables' context is missing elements and options

See original GitHub issue

I’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’s element member is completely missing.
  • The second time it’s called, element is present, but it has no options 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:closed
  • Created 2 years ago
  • Comments:11 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
joshkelcommented, Apr 14, 2021

I created #388 to track the options.type discrepancy. I apologize for the delay in getting back to this. Thanks for your help!

0reactions
kurklecommented, Mar 27, 2021

I can open a separate issue for this or try and open a PR for this as well if you like.

Separate issue would be good. This can be closed after that?

Read more comments on GitHub >

github_iconTop 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 >

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