Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Pie Chart to Bar Chart Conversion At Runtime - Using Script(Chart Type Converison at runtime using Script)
icon5.gif  Pie Chart to Bar Chart Conversion At Runtime - Using Script [message #994787] Fri, 28 December 2012 09:09 Go to next message
azad kalakoti is currently offline azad kalakotiFriend
Messages: 6
Registered: December 2012
Location: Pune, India
Junior Member
Hi : I am facing this issue :

I have a pie chart, this works fine with lesser data, but as soon as my data size increase, the chart looks really weired, I want to convert pie-chart to a Bar chart.


Does anyone know solution for this? It will be really appriciable. index.php/fa/12832/0/
Re: Pie Chart to Bar Chart Conversion At Runtime - Using Script [message #994933 is a reply to message #994787] Fri, 28 December 2012 17:15 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1663
Registered: July 2009
Senior Member

One thing you could do would be to make both, then hide the one you don't want to see based on the number of points.

Michael

Add interactivity, scheduling, sharing, live Excel export, and JS integration to your BIRT app with the new, free BIRT server, BIRT iHub F-Type.
Re: Pie Chart to Bar Chart Conversion At Runtime - Using Script [message #995152 is a reply to message #994933] Sat, 29 December 2012 07:51 Go to previous messageGo to next message
azad kalakoti is currently offline azad kalakotiFriend
Messages: 6
Registered: December 2012
Location: Pune, India
Junior Member
Hi Michael, Thanks for reply, I appriciate your response, but in my case I want to use the same widget and want to change it at run time. Is it possible?
Re: Pie Chart to Bar Chart Conversion At Runtime - Using Script [message #995975 is a reply to message #995152] Mon, 31 December 2012 17:33 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1663
Registered: July 2009
Senior Member

You could use the data engine api, in the beforeFactory method, to find out how many groups you're dealing with. Then, you could either build your chart from scratch or have two built and drop the unneeded one, based on your findings.

Michael

Add interactivity, scheduling, sharing, live Excel export, and JS integration to your BIRT app with the new, free BIRT server, BIRT iHub F-Type.
Re: Pie Chart to Bar Chart Conversion At Runtime - Using Script [message #1012696 is a reply to message #995975] Fri, 22 February 2013 03:40 Go to previous messageGo to next message
azad kalakoti is currently offline azad kalakotiFriend
Messages: 6
Registered: December 2012
Location: Pune, India
Junior Member
Hi Williams, Sorry for late reply! I was dealing with some other issues, of higher priority so could not reply!

Thanks for your answer can you please give me any sample code or some sample report where Pie-Chart converts into Bar-Chart?
Need your help! Thanks again!

[Updated on: Tue, 23 April 2013 07:00]

Report message to a moderator

Re: Pie Chart to Bar Chart Conversion At Runtime - Using Script [message #1013073 is a reply to message #1012696] Fri, 22 February 2013 18:18 Go to previous message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1663
Registered: July 2009
Senior Member

Here's an example from BIRT Exchange that shows how to use the data engine api:

BIRT Exchange DevShare - Data Engine API Example

For the issue of which chart to show, you could create a bar chart with the designer as the default chart in your report. If your check of the data shows less than x groups, you could build a pie chart from scratch and drop the bar chart:

BIRT Exchange DevShare - Add Pie Chart to Report

Or you could do the opposite. Let me know if you need more info.


Michael

Add interactivity, scheduling, sharing, live Excel export, and JS integration to your BIRT app with the new, free BIRT server, BIRT iHub F-Type.

[Updated on: Fri, 22 February 2013 18:19]

Report message to a moderator

Previous Topic:Skip level in TOC tree???
Next Topic:Using the BIRT Excel Emitter
Goto Forum:
  


Current Time: Sun Nov 23 13:37:58 GMT 2014

Powered by FUDForum. Page generated in 0.03388 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software