'Amcharts 4: Addition value1 + value2 as tooltipText

There is this example:

https://www.amcharts.com/demos-v4/cylinder-gauge-v4/

I want a tooltip for the black cylinder, so I added this

series2.columns.template.tooltipText = "{value1}+{value2}";

But instead of adding the numbers, the text of this operations is written. Example "30+70" (instead of "100")

series2.columns.template.tooltipText = "{value1}"+"{value2}" returns "3070"

But I would like to add up "value1" and "value2" and display it as tooltipText.

Any help?

P.S.: I know it would ALWAYS be "100" in this example. That's not the point. :-)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source