problem with charts

Hi,
I want to draw a bar graph as per attached document.
Please go through attached document.
problem is that i want date on Y-axis but ireport throws an exception that it can not convert date to a number.

second problem is that how can i show these bars in only two colors as per my attached document.



third problem is that I want also display legends with some text(discription) as shown in attached documnet.

Please do some favour for me it's urgent.
thanx in advance.:( :( [file name=doubt.xls size=113664]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/dou...

Attachments: 
rajesh's picture
103
Joined: Aug 8 2006 - 7:59pm
Last seen: 16 years 1 month ago

4 Answers:

Here are my suggestions, please keep in mind that I haven't tested since I have no sample db with data to test:

1. For dates in the Y axis there's a problem, y axis should be values and looks like no way around it. Not sure if that's even possible in Excel. Look for another approach like a time series chart.

2. The colors is achived with the category expresion in the chart data category series definition. One color is assigned for each different category there.

3. Use label expression in the category series definition (see 2 above)
javydreamercsw's picture
Joined: Jul 17 2006 - 9:46pm
Last seen: 5 years 11 months ago
Hi,
thanx for your prompt reply.
In series defination how can i set color perameter.
And what is use of label expression(optional) in chart data details can you give me an example.
rajesh's picture
103
Joined: Aug 8 2006 - 7:59pm
Last seen: 16 years 1 month ago
Sorry for the late answer but somehow I didn't receive an email about your response.

Anyway, the color parameter is defined at runtime and can't be setted unlees you code it.

I have no idea about the label expression. It must have it's uses but I don't know yet.
javydreamercsw's picture
Joined: Jul 17 2006 - 9:46pm
Last seen: 5 years 11 months ago
The ability to specify series colors in charts is coming soon, hopefully 1.2.7. Then you can specify bar colors without writting any Java code.

The Label expression allows you to specify an optional description of the axis, for example "Total Freight", "Country", etc. It gets displayed next to the axis line in the chart.

Finally, our charting engine doesn't allow you plot dates, only values. On the other hand, dates really are numeric - try plotting $F{datefield}.getTime(). Currently the y axis won't show the value as a date, but the same release with color support will add the ability to format the axis tick mark labels, so then you will be able to convert the long back into a time.

-Barry
bklawans's picture
3520
Joined: Jul 6 2006 - 1:21pm
Last seen: 5 years 6 months ago
Feedback
randomness