0
votes

I want to achieve the addition, multiplication, division of the data in the jsrender template. For example,

{{:num1 * (-1.0)}} - {{:num2}} + {{:num3}}

The above just doesn't work in my below case:

<circle r="25%" cx="50%" cy="50%" style="stroke-dasharray: {{:num3}} 100; stroke: orange; stroke-dashoffset: {{:num1 * (-1.0)}} - {{:num2}}- {{:num3}}">
    </circle>
1

1 Answers

0
votes

See the examples of expressions here https://www.jsviews.com/#paths

You can write, for example:

...stroke-dashoffset: {{:num1 * (-1.0) - num2 - num3}}...

or

...stroke-dashoffset: {{:num1*(-1.0)-num2-num3}}...

if you want it to render the result of the expression, not the separate values.