Home
Analytics
Dynamic Marker Line in BarChart different for each group
unknown
Hi,
In this example, a dynamic marker line is putted on the bar chart.
By script I find the value I want to put on the chart :
reportContext.setPersistentGlobalVariable("MAX_PRODUCT", this.getValue());
on "onCreate"
and use with onRender script on the graph.
But
I would to group my report by productlines and made the dynamic value change to being the max of each product line...
But I don't find how to change the value in each group
Any Idea ?
Thanks in advance for your answer.
Vincent
Find more posts tagged with
Comments
Migrateduser
Hi<br />
<br />
Answer to myself ;-)<br />
I put the <pre class='_prettyXprint _lang-auto _linenums:0'>reportContext.setPersistentGlobalVariable("MAX_PRODUCT", this.getValue());</pre> in onRender instead of "onCreate"<br />
<br />
The first time I run the script I have an error...but now It seems to be good...<br />
<br />
Regards
Migrateduser
Sorry ;-)<br />
<br />
in onCreate method, I declare the Variable :<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>reportContext.setPersistentGlobalVariable("MAX_PRODUCT", "");</pre>
<br />
in onRender method, I find the good value :<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>reportContext.setPersistentGlobalVariable("MAX_PRODUCT", this.getValue());</pre>
<br />
And it's good<br />
<br />
Regards