rajesh Posted August 11, 2006 Share Posted August 11, 2006 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/doubt.xls[/file] Link to comment Share on other sites More sharing options...
javydreamercsw Posted August 11, 2006 Share Posted August 11, 2006 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) Link to comment Share on other sites More sharing options...
rajesh Posted August 17, 2006 Author Share Posted August 17, 2006 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. Link to comment Share on other sites More sharing options...
javydreamercsw Posted August 29, 2006 Share Posted August 29, 2006 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. Link to comment Share on other sites More sharing options...
bklawans Posted August 30, 2006 Share Posted August 30, 2006 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now