divyarathore Posted August 23, 2010 Share Posted August 23, 2010 hi people! i am having a query in which there is a calculation and the result for that calculation is negative values. i want to plot these negative numbers on pie chart.when i run this report then it gives me no error but blank chart is displayed. i want these negative values to be display on pie chart. how can i do this????please tell me.. Link to comment Share on other sites More sharing options...
thangalin Posted September 10, 2010 Share Posted September 10, 2010 Try making the values positive (Math.abs($F{field})) and change the label to show a negative number. Link to comment Share on other sites More sharing options...
divyarathore Posted September 17, 2010 Author Share Posted September 17, 2010 i tried converting the values into positive one by absolute function..but now wat happens is that if in the result set there are mixed values such as-20,-30,10,20,50,-70then if i take there absolute value as 20,30,10,20,50,70then the display of there percentage in the pie slice will show the equal percent for -20 and 20which is wrong... so how to plot the correct percentage in the pie chart??? hope u all wil understand the problem and wil help me out. Thanks in advance. Link to comment Share on other sites More sharing options...
svenn Posted September 17, 2010 Share Posted September 17, 2010 I don't have the answer but this might help you find it. Jasper uses the JFreeChart package. Many times when I've had charting questions I've Googled JFreeChart and the info I'm looking for. You may be able to figure out what you need to do. Link to comment Share on other sites More sharing options...
thangalin Posted September 20, 2010 Share Posted September 20, 2010 Sven has a good answer.What is it, exactly, that you are trying to represent in a pie chart with negative numbers?Post Edited by thangalin at 09/20/2010 13:14 Link to comment Share on other sites More sharing options...
app Posted August 13, 2012 Share Posted August 13, 2012 Even i m facing same problem , eg. suppose my client liabilities is 1000 and his networth is -1000 by using absolute value the pie will show 50/50 which is logically wrong Link to comment Share on other sites More sharing options...
hardcorefs Posted August 13, 2012 Share Posted August 13, 2012 Try re-scaling them.find out the largest negative number, work out an offset to make it positive, then add that offset to ALL numbers.(A bit like moving a decimal point, that way all the numbers will still have the same relationship to each other, but they will be positive and can be plotted.) 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