Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » format of data for a bar chart(how should my sql table look to create a bar chart)
format of data for a bar chart [message #734344] Fri, 07 October 2011 14:00 Go to next message
Missing name Missing name is currently offline Missing name Missing name
Messages: 5
Registered: September 2011
Junior Member
Hi All,

I have a simple chart I would like to display from my JBOSS application.
For each day, I keep track of events and I want to display the number of events each day in a bar chart. The number of events can be zero events to 30ish events.
The bar should represent the day of the week, and be either 0 or up to 30 high.

If I create a sql tabel with just one int column and put each days data in a separate row and create 7 rows, then use the int column as the x axis it does not draw the chart correctly.
It appears I need some way to index the day as well as the data for that day.
Do I need a separate column, called dayIndex that would that references the day?

Sorry if this question seems vague, I don't have any working exampls of the sql data to look at to draw a simple bar chart.

Thanks

Bruce
Re: format of data for a bar chart [message #734405 is a reply to message #734344] Fri, 07 October 2011 16:08 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Bruce

the int column should be on the y axis and then either use RowNum as the
x-axis or add a new column for the day of the week.

Jason

On 10/7/2011 10:00 AM, heathb wrote:
> Hi All,
>
> I have a simple chart I would like to display from my JBOSS application.
> For each day, I keep track of events and I want to display the number of
> events each day in a bar chart. The number of events can be zero events
> to 30ish events.
> The bar should represent the day of the week, and be either 0 or up to
> 30 high.
>
> If I create a sql tabel with just one int column and put each days data
> in a separate row and create 7 rows, then use the int column as the x
> axis it does not draw the chart correctly.
> It appears I need some way to index the day as well as the data for that
> day.
> Do I need a separate column, called dayIndex that would that references
> the day?
>
> Sorry if this question seems vague, I don't have any working exampls of
> the sql data to look at to draw a simple bar chart.
> Thanks
>
> Bruce
Re: format of data for a bar chart [message #734413 is a reply to message #734405] Fri, 07 October 2011 16:51 Go to previous message
Missing name Missing name is currently offline Missing name Missing name
Messages: 5
Registered: September 2011
Junior Member
Thanks a lot Jason, it worked like a charm!
Previous Topic:Perspective
Next Topic:WebViewer 3.7.1: HTML bookmarks say bad link: no stack trace
Goto Forum:
  


Current Time: Tue Oct 21 20:12:27 GMT 2014

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

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