How to remove entries with zero values from chart tooltips?

Getting started with charts, and running into a challenge where I want to show tooltips for subtotals in a stacked bar chart, but there are so many subtotals with zero or “-” values that the tool tip is useless, it extends far outside the boundary of the screen and can’t be scrolled.

Is there a way to remove the zero entries from the tooltip, perhaps with custom code?

This screenshot is an example that is a bit silly (subtotals for each timestamps), but it does show the behavior I am hoping to stop. The tooltip should only show entries where the number value is greater than zero.
Screenshot 2024-01-19 223347

1 Like

There appears to be a way to do this with echarts (the underlying chart library used by Softr) via the tooltips formatter setting, as described here:

QUESTION: Is it possible to use custom code to override the chart settings that come from javascript loaded from the Softr servers? In browser dev tools, this code can be found by setting a breakpoint on the dom element for the tool tip and then exploring the minified javascript, which seems to be an inline script (“source##” in firefox or “VM##” in chrome) and not a regular .js file.

Thanks for any pointers