Hi

Is it possible to use if then statement in frx svg?

I use the charts option to display some dat, but there will be sometimes / 0. This is displayed with NaN in the table but when using svg graph, it doesn't show.

   <svg frx:label="labelname"
frx:series_1="{=round((row1 div row2) * 10000) div 100 }"
...

Sometimes row2 contains 0 (zero). Is it possible to do this or do I need to make a sql that do that?

Comments

hgkris created an issue.

metzlerd’s picture

I am away from code for a few weeks, so it's not easy for me to confirm the order, but I do believe you can put an frx:if and it will be evaluated first. So basically you could use an frx:if to totally suppress the graph, but not to alter the series calculation. The trick will be getting expression in the if to return a non-zero number if rows are found that have a zero number. Probably best to use a count expression to achieve this.