Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » 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: 1925
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

Developer Evangelist, Silanis
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: 1925
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

Developer Evangelist, Silanis
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: 1925
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

Developer Evangelist, Silanis

[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: Fri Mar 29 10:33:22 GMT 2024

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

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

Back to the top