From: SourceForge.net <no...@so...> - 2009-03-16 16:14:41
|
Bugs item #2688792, was opened at 2009-03-16 16:14 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=115494&aid=2688792&group_id=15494 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Noé Rodríguez González (eonrglez) Assigned to: Nobody/Anonymous (nobody) Summary: Negative XYStackedAreaChart Wrong Initial Comment: When you try to create a XYStackedAreaChart which contains series with negative values the chart is wrong because the graph goes to zero in the middle of each value of the series. E.G. if you have a value for x=2 of -5 and the rest of the series is zero you should have a graph that is zero in point x=1, zero in x=3 and -5 in x=2 however you obtain a graph that is zero in point x=1.5 and zero in x=3.5. that doesn't have sense because you haven't got values for the series at this points. Due to this error if you have more that one series the stacked area is calculated wrongly. And if you have series with values at the same point all negatives this creates holes in the graph and funny results. Here is an example with two series: DefaultTableXYDataset dataset = new DefaultTableXYDataset(); XYSeries s1 = new XYSeries(1, true, false); XYSeries s2 = new XYSeries(2, true, false); XYSeries s3 = new XYSeries(3, true, false); s1.add (0,0); s1.add (1,-3); s1.add (2,0); s1.add (3,0); s2.add (1,0); s2.add (0,0); s2.add (2,-4); s2.add (3,0); s3.add (1,0); s3.add (0,0); s3.add (2,-4); s3.add (3,0); dataset.addSeries(s1); dataset.addSeries(s2); dataset.addSeries(s3); final JFreeChart chart = ChartFactory.createStackedXYAreaChart( "Network Throughput Per IP", // chart title "Category", // domain axis label "Value", // range axis label dataset, // data PlotOrientation.VERTICAL, // orientation true, // include legend true, false); ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=115494&aid=2688792&group_id=15494 |
From: SourceForge.net <no...@so...> - 2009-04-03 08:51:15
|
Bugs item #2688792, was opened at 2009-03-16 16:14 Message generated for change (Comment added) made by eonrglez You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=115494&aid=2688792&group_id=15494 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Noé Rodríguez González (eonrglez) Assigned to: Nobody/Anonymous (nobody) Summary: Negative XYStackedAreaChart Wrong Initial Comment: When you try to create a XYStackedAreaChart which contains series with negative values the chart is wrong because the graph goes to zero in the middle of each value of the series. E.G. if you have a value for x=2 of -5 and the rest of the series is zero you should have a graph that is zero in point x=1, zero in x=3 and -5 in x=2 however you obtain a graph that is zero in point x=1.5 and zero in x=3.5. that doesn't have sense because you haven't got values for the series at this points. Due to this error if you have more that one series the stacked area is calculated wrongly. And if you have series with values at the same point all negatives this creates holes in the graph and funny results. Here is an example with two series: DefaultTableXYDataset dataset = new DefaultTableXYDataset(); XYSeries s1 = new XYSeries(1, true, false); XYSeries s2 = new XYSeries(2, true, false); XYSeries s3 = new XYSeries(3, true, false); s1.add (0,0); s1.add (1,-3); s1.add (2,0); s1.add (3,0); s2.add (1,0); s2.add (0,0); s2.add (2,-4); s2.add (3,0); s3.add (1,0); s3.add (0,0); s3.add (2,-4); s3.add (3,0); dataset.addSeries(s1); dataset.addSeries(s2); dataset.addSeries(s3); final JFreeChart chart = ChartFactory.createStackedXYAreaChart( "Network Throughput Per IP", // chart title "Category", // domain axis label "Value", // range axis label dataset, // data PlotOrientation.VERTICAL, // orientation true, // include legend true, false); ---------------------------------------------------------------------- >Comment By: Noé Rodríguez González (eonrglez) Date: 2009-04-03 09:51 Message: Hi: I have solved this problem. Here is a patch. I would be very happy if you contact me or check the patch and accept it and change the state of the Bug to solved. Noe A. Rodriguez Glez. cheers ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=115494&aid=2688792&group_id=15494 |