Skip to content

Fix toggling showLine option on scatter controller#11334

Merged
etimberg merged 1 commit into
chartjs:masterfrom
pepstock-org:fixShowLine
Jun 8, 2023
Merged

Fix toggling showLine option on scatter controller#11334
etimberg merged 1 commit into
chartjs:masterfrom
pepstock-org:fixShowLine

Conversation

@stockiNail

Copy link
Copy Markdown
Contributor

Fix #11333

@etimberg
etimberg merged commit ec7be48 into chartjs:master Jun 8, 2023
@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
Copy Markdown
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

azmike11 commented Jul 23, 2023

Copy link
Copy Markdown

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