Ewon Technical Forum

Full Version: Dynamically adjusting the legend in ViewON
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Good Day 

I am trying to make the legend of the trend dynamic 
when I simulate the viewon page it works but when I load it on the eWON it does not work 
I have attached some screen shots  

1. is the ViewON the eWON
2. is simulated
3. Setup 

Thanks 

Sean
Hi Sean,

Weird, this may be caused because there is no data yet...
Have you tried by displaying data in the chart ?

Simon
Hi Simon

There is data as when I fix the legend (constants) It shows me the data to the graph, as soon as I go dynamic I get the above problem.
Hi Simon, Hi Sean,
I have the same issue, did you find a solution ?
Thanks !
From what I can gather about how the trend objects get created, the problem is that the structure of the trend - legends, background, etc, get drawn when the page is initially loaded. At that time, since your tags are viewon tags, they are automatically 0 and 0 so it doesn't bother adding a legend. When you finally set those values to something other than 0, it's too late.

I could make it work for me when I added a javascript section to my page that runs once when the page loads to set those values. Once that was done, then when I changed the values in the page from my number editor, the graph axis changed accordingly.