Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix toggling showLine option on scatter controller #11334

Merged
merged 1 commit into from
Jun 8, 2023

Conversation

stockiNail
Copy link
Contributor

Fix #11333

@etimberg etimberg merged commit ec7be48 into chartjs:master Jun 8, 2023
5 checks passed
@etimberg etimberg added this to the Version 4.3.1 milestone Jun 8, 2023
@stockiNail stockiNail deleted the fixShowLine branch June 8, 2023 13:15
@stockiNail
Copy link
Contributor Author

@LeeLenaleee apologize, don't hate me.... can you set the label to bug in order to have a consistent release note? Thank youuu

@azmike11
Copy link

azmike11 commented Jul 23, 2023

I ran into a similar problem with a scatter chart using version 4.3.0. When I tried to change the "showLine" property of my 2nd dataset (id=1) to true, and then do a update() to update the chart, The error occurred after trying to perform an update.

obj_chart["chart_1"].data.datasets[1].showLine = true;
obj_chart["chart_1"].update();

The error in the console looked something like this:

index.umd.ts:50 Uncaught TypeError: Cannot set properties of null (setting '_chart')
at ScatterController.update (index.umd.ts:50:18)
at ScatterController._update (index.umd.ts:50:18)
at On._updateDataset (index.umd.ts:50:18)
at On._updateDatasets (index.umd.ts:50:18)
at On.update (index.umd.ts:50:18)
at f_show_line (graph2.php:176:23)
at HTMLInputElement.onchange (graph2.php:209:76)
update @ index.umd.ts:50
_update @ index.umd.ts:50
_updateDataset @ index.umd.ts:50
_updateDatasets @ index.umd.ts:50
update @ index.umd.ts:50
f_show_line @ graph2.php:176
onchange @ graph2.php:209

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Toggling showLine only adds the line and does not remove it fully
4 participants