Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Change label value only for one serie
egau
Hello everyone,<br />
<br />
I m trying to do something that doesn't seem to complicated but I can"t make it. <br />
<br />
Here is the problem :<br />
<br />
- I have a chart with 2 axis and 1 serie for each axis.<br />
- the serie on the 2nd axis represent time ( millisecond ) , I have a nice function that convert millisecond into days,hours, min sec.. and i want to apply this function only on label that belong to this serie.<br />
<br />
I have tried to do that into the "beforeDrawDataPointLabel()" function but I can"t manage to get the serie related to the label I'm trying to modify. Here is the algo/code :<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
function beforeDrawDataPointLabel(dph, label, icsc)
{
if(SerieRelatedToTheCurrentLabel==mySecondAxisFirstSerie){
var current_label = dph.getOrthogonalValue()
icsc.getExternalContext().getScriptable().setGlobalVariable("label_value", current_label);
var value = icsc.getExternalContext().getScriptable().evaluate("stringDuration(label_value);");
label.getCaption().setValue(value);
}
}</pre>
<br />
As you probably already guess, I want to know how create this if : <br />
<pre class='_prettyXprint _lang-auto _linenums:0'>if(SerieRelatedToTheCurrentLabel==mySecondAxisFirstSerie)</pre>
<br />
Thanks in advance !
Find more posts tagged with
Comments
There are no comments yet