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)
Format point label
Tonio
Hi, <br />
I want to format the label of the point displayed in my chart. Ive got 2 differents series and i want to format just one, so i use a script. But i can't find the right condition to get the point of the curve i need to treat. For the Label Axis i found this condition <br />
axis.getTitle().getCaption().getValue() == "axe_name" but i can't fing the same for this method :<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
function beforeDrawDataPointLabel(dph, label, icsc)
{
if ( condition to get the serie i need to treat)
{
var str =label.getCaption().getValue();
str = str+'';
str = str.replace(/\s+/g, "");
var seconds = parseInt(str);
var hours = 0;
var minutes = 0;
if (seconds / 3600 >= 1) {
hours = Math.floor(seconds / 3600);
seconds = seconds % 3600;
}
if (seconds / 60 >= 1) {
minutes = Math.floor(seconds / 60);
seconds = seconds % 60;
}
if (hours < 10)
hours = "0"+hours;
if (minutes < 10)
minutes = "0"+minutes;
if (seconds < 10)
seconds = "0"+seconds;
label.getCaption().setValue(hours+":"+minutes);
}
}
</pre>
<br />
Any ideas? Thx
Find more posts tagged with
Comments
Tonio
good i found smthg! The condition :
dph.getSeriesValue()=="serie2"
regards