Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Chart creation
Davolio
Hello,
I use BIRT 2.2.1 .
I'm trying to figure out a way to dynamically create a chart.
The best way I could think of this:
have a table
Food
Total
Total
owned
eaten
owned
|-Beer -| ----10----|
12----|
|- Chips -|---500---|---10000---|
|-Pizza -|----4---- |----10----|
Now that my table is created correctly, I want to dynamically create a single bar, bar chart to represent each of these with one bar for total eaten and the other for total owned. Thus I would end up with 3 charts. I need it dynamic because I may have different users who eat different foods, but need a single chart for each.
so it'd look like this:
chart beer
||||||||||||||||||||||||||
||||||||||||
chart pizza
||||||||||||
||||||||||||||||||||||||
chart chips
||||||||||||
||||||||||||||||||||||||
Is there anyway I could dynamically create these with Javascript? or am I looking at a Java Handler or something.... any advice would be greatly appreciated.
Thanks,
Dave
Find more posts tagged with
Comments
mwilliams
Hi Dave,
I don't think I'm quite understanding what you're going for. Can you explain a little more? Thanks.
Davolio
Ok,
Basically, I need to figure out a way to create a chart for each Item I have.
I don't know how many items I'll have because they are queried from the database.
So Lets go back to Beer Chips and Pizza.
I "select foods, num_consumed, num_Planned_to_consume from food_t "
This could give me a variety of different foods but lets say I get
Beer 12 24
Pizza 2 4
Chips 4 12
Now I need to create a bar chart for Beer, one for Chips and one for Pizza which plots the num_consumed vs the num_Planned_to_consume.
My problem is, I can't figure out how to create a Chart via Javascript, If i could do that , then my problems would be solved because I know how to add series modify axis's etc.
Or if you could point me to or post a sample report that you create a chart in Java or Javascript without using the Report Designer (drag and drop) that would be extremely helpful.
Thanks for any help you could provide.
Dave
mwilliams
Dave,<br />
<br />
These devShare items may be of some help with creating and modifying charts with java:<br />
<br />
<a class='bbc_url' href='
http://www.birt-exchange.com/devshare/interactive-reporting/145-standalone-chart-engine-and-builder-examples/#description'>Standalone
Chart Engine and Builder Examples - Designs & Code - BIRT Exchange</a><br />
<br />
<a class='bbc_url' href='
http://www.birt-exchange.com/devshare/designing-birt-reports/340-birt-charting-api-report-and-api-examples-eclipsecon2008/#description'>BIRT
Charting API Report and API Examples EclipseCon2008 - Designs & Code - BIRT Exchange</a><br />
<br />
Let me know.
Davolio
Hey man great links I got the stand alone chart up and running, from that I found this webinar that helped me out alot.<br />
<br />
<a class='bbc_url' href='
http://www.birt-exchange.com/news-events/webinar/designing-birt-reports/453-using-the-birt-charting-apis/'>Using
the BIRT Charting APIs - BIRT Exchange</a><br />
<br />
We decided to go with a different approach because I was taking too long on trying to figure out dynamic charts
. So now my 'self-learning' exercise will be to try to figure out how to integrate some of that stuff back into BIRT eclipse. <br />
<br />
Overall though a great learning day, <br />
<br />
Thanks for the help Mike!
mwilliams
Dave,
No problem. As always, let us know if you have any other questions.