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)
Bar Chart percentage,size of the bar issue
rajkishore
<p>Hi,</p>
<p> </p>
<p>I was trying fulfill a requirement to show percentage on bar chart, but some how it showing different than what I expect. if any body has knowledge please share.</p>
<p> </p>
<p>1. Actuate iHub3 , Currently the series percentage is calculated by over all chart, but I need percentage by category. for example in report by "category-1" having "A,B,C,D" with values 1,2,3,4.. I need calculate percentage and show in that chart.</p>
<p> </p>
<p>2. Bar chart height is truncating the values.</p>
<p>3. Bar chart is showing very "thin", could we increase the size of the bar.</p>
<p>4. Gap between the bar chart is very less.</p>
<p> </p>
<p>Please find the attached report and sample ds to reproduce this issue.</p>
<p> </p>
<p>Regards</p>
<p>Kishore G</p>
<p> </p>
<p> </p>
Find more posts tagged with
Comments
rajkishore
any help or suggestions appreciate.
mwilliams
1. I can calculate this, but I haven't been able to get it into the chart labels with the way highcharts uses a formatter callback function or a format string.<br><br>2. In the chart script, make this modification:<br><br><pre class="_prettyXprint _lang-auto _linenums:0">
if (lMaxValue <= 0) {
lMaxValue = 100;
yAxis.getScale().setMax(NumberDataElementImpl.create(lMaxValue));
}
/*****************This was added******************/
else{
lMaxValue = Math.floor(lMaxValue * 1.2);
yAxis.getScale().setMax(NumberDataElementImpl.create(lMaxValue));
}
/*****************End addition******************/
</pre>3 & 4. Go to format chart in the chart editor, go to the chart area section, scroll to the bottom to the general properties, and set the unit spacing to like 10.<br><br>I'll let you know if I figure out a way to get #1.
rajkishore
<p>Thanks Williams, It will be very helpful if you can give a desired solution for #1. I didn't find any solution to fix the gap between two bars. I already tried the option to set unit spacing, it increases the bar width and decrease the gap the data may vary presently it is showing 7 or 8 categories the actual i have in work environment it has 10 or more. if you have any recommendations or suggestion please let me know.</p>
mwilliams
Ah. I guess I didn't understand the gap width. Can you explain that more?
rajkishore
I mean now it appears that each bar closed together of individual category. if we can increase the gap between them that looks good appearance. Please check my earlier screen shot.
mwilliams
So, we've got two of four, so far. Not sure we'll be able to manage that gap you're wanting to widen. I'll see if there's something I can figure out on the client side for that. I'll keep looking on the labels thing, but we might just have to come up with another way of creating your chart.
mwilliams
Would you be okay with doing your label in a tooltip vs the dataLabel? I THINK that might be possible as more options are available there.
rajkishore
William user is requested only in datalabels to dhow percentage #1. if this is not possible let me know I will raise the case actuate
mwilliams
Unfortunately, it's a limitation of highcharts, not of Actuate/OpenText or BIRT. If you were to use the standard charts (not html5), it'd be easy.
rajkishore
<p>Ok thanks. If you use tool tip it will show only in actuate webviewer, the other formats this feature will not available as chart are converted to images.</p>
mwilliams
If using standard charts, we could use the data point label and not the tooltip.
rajkishore
<p>Hi willams,</p>
<p> </p>
<p><u>Gap</u></p>
<p>I found that article "add spacing to stacked bar optional group chart" (dev share). As per this we can able to add "Gap" between optional group chart. But some how I could not able to replicate this in ihub3. Can we able to achieve same thing in ihub3.</p>
<p> </p>
<p><u>Chart Percentage</u></p>
<p> </p>
<p>Thanks for the help, I am interested only in HTML5 Chart. if we can show as a datapoint that should fine.</p>
<p> </p>
<p>Regards</p>
<p>Kishore G</p>
mwilliams
What about something like this?<br><br>
rajkishore
<p>Williams,</p>
<p> </p>
<p>Thank you, This will be helpful can please attached latest report so that i can check.</p>
<p> </p>
<p>1.Will this impact any client script that i write in future?</p>
<p>2.Are the legends working as default as they are?</p>
<p>3.Does the report work in export to excel and other formats?</p>
<p> </p>
<p> </p>
<p>Regards</p>
<p>Kishore G</p>
mwilliams
1. I don't think this should impact any future script, but I'll let you determine that.<br>2. The legend is going to be custom. You'll have to set colors manually, so this shouldn't be hard to automate.<br>3. It exports properly to all outputs except Excel, it seems. You could possibly use your original chart for exporting to Excel since the Excel emitter turns them into Live Excel charts anyways.<br><br>This is definitely a hack to get the desired output since there are limitations in high charts on setting data point labels.