node-red / node-red-dashboard

A dashboard UI for Node-RED
Other
1.3k stars 450 forks source link

Changing graph type with the chart node causes display issues #794

Open ZackRobertson opened 1 year ago

ZackRobertson commented 1 year ago

What are the steps to reproduce?

Using the radar graph within the chart node, when setting an existing charts type from bar to radar the fill is opaque. This issue does not occur when going from line to radar. The included flow demonstrates this.

The radar chart will also overlap UI elements when its horizontal width is set too wide. It will not scale to fit page height, only the width.

Using the line graph within the chart node, when swapping from bar to line or from line to bar requires an additional message to display data. Included flow demonstrates this.

What happens?

The radar graph issue causes the graph to be displayed improperly. Instead of the regular partially transparent visual, a completely opaque shape is shown. This only occurs when displaying a bar chart and swapping to a radar chart using the msg.ui_control method.

The line graph issue occurs in the same circumstances but instead does not show any data until the message to swap chart type is sent again.

What do you expect to happen?

The radar chart should display correctly when a msg.ui_control message is sent to the chart node and will scale correctly. The line graph will display data without having to send the same message twice.

Please tell us about your environment:

flows.zip