NodeRED Dashboard chart title tooltip formating error

I finally figured out, how to format tooltips on my charts. There is one catch though, I get total nonsense values on their titles instead of the time (HH:mm - DD.MM). Here is a picture about the issue. I saw others have asked about this on the forum, yet they didn't get any answers.

Thank you for your help in advance.


This is how my code looks like in the "function" node:

Welcome to forum.

Sadly you can't change the tooltip options this way. Thing is - whole default tooltip configuration will be lost. What you see at the top is timestamp but as the callback function to format it properly is lost, it is displayed as is. On top of that, you can not give your own callback because it takes to have reference to chart but that is not possible at the server side.

Only possible way is to create the chart from scratch using the ui_template node. Then you can make configuration options to satisfy all your needs. Of course that takes much more to configure than just the tooltip.

There is many examples about how to create it with ui_template. And the docs are available here: Chart.js · Chart.js documentation

1 Like

Thank you for your reply.
You said that I can't change it this way, is there other way to change it? With template node and CSS?
If I can't modify this, I rather stay then with the charts current (default) state.

The tooltip isn't available in DOM , it is drawn inside canvas, you can't access it with CSS also so there isn't any easy ways.

1 Like

Okay, thank you once again. We can consider this as closed discussion then.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.