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)
meter gadget
AsmitaS
<p>In ihub3 I am using meter gadget.</p>
<p>how to give dynamic range for regions property of meter gadget based on column value.</p>
<p> </p>
Find more posts tagged with
Comments
JFreeman
<p>You can set the start and end values of the regions in the beforeDrawRegion method of the meter gadget.</p>
<p>For example:</p>
<pre class="_prettyXprint _lang-js">
x = 0;
function beforeDrawRegion( region, fgsc )
{
if(x==0){
setRegionValues(0, 10);
}else if(x==1){
setRegionValues(11,20);
}else if(x==2){
setRegionValues(21,50);
}
x++;
function setRegionValues(start, end){
region.setStartValue(start);
region.setEndValue(end);
}
}
</pre>
<p>I've hard coded the values in the example. However, you can use some logic based on column values in your data set with this code instead.</p>