View the sum of active series in a DOM element #3765
Unanswered
faselunare
asked this question in
Q&A
Replies: 1 comment
-
There is a typo in your code. Let me know if you find the solution. Also, do you have any idea how to recount the Totals when chart is zoomed in? So it would get the totals for the active time range only. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have been trying all possible solutions for days to have a card in my dashboard where on top of the graph I see the sum of the active series.
I figured out that I can have the sum with this code
var total = config.globals.seriesTotals.reduce((acc, val) => acc + val);
with this code I can view the total of the series when I load the card and scale the value as I disable the series by clicking on the legends
but when i go to reactivate the series, i have this error
caught TypeError: Reduce of empty array with no initial value
is there a method to do this? Chart type AREA (but i need the same also with LINE and BAR)
Beta Was this translation helpful? Give feedback.
All reactions