How to control chart, configured as pie?

It's not an ideal situation but Colin has done a lot to get the chart widget working, including the ability to tweek it via ui_update.

I think the failure of the legend to display unless something is in Series is a non-positive feature of the underlying code library.

@jbudd and @Colin,

I tested @Colin 's "Inject" node, but it did not work for me, in spite of changing the value in the "Inject" node.

I think, I leave it for the moment and move to a standard gauge, that has been proposed earlier.

Both of you, thanks for all your efforts and investment of time.

Regards

What do you mean 'it didn't work'. Did it do anything? Did you try clicking the inject node? What happens if you set the 65 to 10?

Also restart Node-red and clear your browser cache after changing chart settings.

(Full deploy in Node-red is not sufficient.
At the client side, Ctrl-F5 to reload the page might be enough, clearing the cache is safest.)

For me, clearing the cache is rarely necessary. It is sometimes necessary to restart node red, though, if refreshing the page is not enough.

Hi @Colin

Sorry, I had to be more precise.

With 'it didn´t work', I mean that it was not the solution.
It gave exactly the same result as before (without the legend)

Did it do anything?

Yes, I think it did once.
This probably related to the config of the Inject node?

Did you try clicking the inject node

Yes, of course, otherwise I would not need an 'Inject' node :slight_smile:

What happens if you set the 65 to 10?

I did not use 10, but I used 50 and then 40.
But will try with 10.
I will report later.

@jbudd

Also restart Node-red and clear your browser cache after changing chart settings.

I did. It was necessary, because after trying @Colin's "Inject" node, the work aroud with
the empty string in "Series did not work anymore.

I do some more test now and report back.

Regards

@Colin

I did some more tests with a clean flow.

  1. Radius 65%, as created by you
    Result: Legend and texts are visible. So what is expected.

  2. New data injected
    Result as above Okay

  3. Cleared the widget.
    Result: Widget cleared.

  4. New data injected
    Result: Legend is visible, but lower test (freemem) is missing.
    The new data "Inject" gives a doughnut instead of a pie
    Re-Inject your "Inject" node did not solve this.

  5. Changed radius to 10% from 65%^ followed by a NR restart
    Result as 4

Whatever I do now, I do not get a pie, always a doughnut.

Is there anything I can try? Anything you want to know?

I have decided to focus on the classic gauge node: node-red-dashboard-2-ui-gauge-classic (node) - Node-RED
I assume you are familiar with that :wink:

Regards

A doughnut shape indicates that the chart thinks it is dealing with two (or more) series, one of them may be left over from a previous test.

If the widget has "series" set to a space, restart node- red and clear the browser cache.

I found it best not to "append" data sets but to "overwrite", which is why i previously suggested you should combine readings into a single message as an array of objects.

It may help to send an empty array before each inject to clear the chart.

Sending msg.ui_update options is not a one-time thing, it needs to be added to every message.

Yes it is a one off. You should not send it with every message, otherwise the browser will eventually clog up.

An excellent choice I think, though the default gauge would also be ok.