line 2 « Component « JFreeChart Q&A





3. Angles between lines    jfree.org

Things are going great with the charts development. But I have run into a new challenge. I need to calculate the angle of divergence between two lines. I automatically assumed this would be easy. The two lines represent the hypotenuse of two right angle triangles. Simple trig. Not so fast!! The angles are not based directly on the data values. The ...

5. Blank lines in title causes StringIndexOutOfBoundsException    jfree.org

Blank lines in title causes StringIndexOutOfBoundsException by grimlock Tue Jul 07, 2009 9:01 am This modified version of the Pie Chart 3D Demo 1 causes the following exception. I added three consecutive \n to the title of the chart. Two consecutive \n are okay, and if there are characters in between the \n it works as well. Since this is ...

6. Data Line    jfree.org

7. Line adjustments    jfree.org

Hello everbody! Excuse me for my english, please, but I have some questions and I have not find answers for them in the forum: I use JFreeChart for LineChart. How can I write Renderer so that it will paint a bigger line on the x-axis where the value is 0 so that one can better compare between positive and negative. Second ...

9. Lines between pairs of points    jfree.org

Lines between pairs of points by dev777 Thu Aug 13, 2009 1:32 pm I'm trying to plot lines between pairs of points but *only* between pairs of points e.g. XYSeries series = new XYSeries("Average Size"); series.add(20.0, 10.0); series.add(40.0, 20.0); series.add(70.0, 50.0); XYDataset xyDataset = new XYSeriesCollection(series); JFreeChart chart = ChartFactory.createAreaXYChart ("Sample XY Chart", // Title "Height", // X-Axis label "Weight", ...





10. Show average line    jfree.org

11. Threshold line - how to create one?    jfree.org

Hi all, Well, i have a graph and i want to add a threshold line. After the threshold line i have to change the color of the graph lines which passed it and to back it again when they are under the threshold line... A.k.a. line of limit and if the limit is passed to get painted in different (maybe red) ...

14. white vertical lines - updates?    jfree.org

16. Set a Line at MousePoint?    jfree.org





17. drawing line in ChartingHighLowRenderer.drawItem()    jfree.org

Hello, I've added an annotation in the drawItem() method and it shows when the chart finally displays. I've also drawn a vertical line over the annotation that shows immediately and then I see it disappear. For the line I create a Shape object and added it to the EntityCollection: Shape entityArea = new Rectangle2D.Double(xx - 1.0, Math.min(topLeftY, lowerRightY), 2.0, Math.abs(topLeftY - ...

18. Line Style of XYLine chart    jfree.org

I want to display two line belongs to two different data set in different style in a plot. But when I'm trying to do so it is applying the same line style for both d lines. Please help me to sort out the problem. Your kind attention and help would be greatly appreciated. Thanks in advance.

19. Drawing lines over shapes - how?    jfree.org

Hello, I am drawing simple chart with many values and a trend line. My problem is, that the more points there is, the less visible the trend line is, as shown on pics below. Quite ok here: But problem here: When digging in the code, it seems to me, that the rendering has fixed order, i.e. (1) draw lines of all ...

20. Logarithmic Trend Line    jfree.org

21. setDrawSeriesLineAsPath(true) causes lines to disappear    jfree.org

Which version of JFreeChart are you using? There was a problem in the initial versions where this happened but it should be fixed now. I cannot remember on the top of my head the broken version nor where it started to work. You should be able to find similar threads with the Search, though...

22. line from left to right and back    jfree.org

line from left to right and back by bhzunami Tue Jul 20, 2010 2:05 pm Hi, I want to make a plot like this: Code: Select all ... final XYSeries series = new XYSeries("Char - Test"); ...

23. different line styles and background    jfree.org

We need to have a chart that has multiple lines that are different in style (1 may be dashed, 1 may be straight, 1 may be a different color, etc.) and we need the background to have different colors for different levels, so for example, 0-35 may be a red background, 35-70 may be blue background and 70-100 may be gray ...

24. Add a line to CONNECT the Dual-Axis Line.    jfree.org

My JFreeChart is 1.0.13. I have created a dual axis line chart. The y axis are 'Sales' and 'Margin' As the business, I must add a line to connect the two different lines at the same domain axis value. Would you please explain me how to do. I have a demo as well, but I can't attach it here. If need, ...

25. line that goes back on itself    jfree.org

26. Gradient line ?    jfree.org

My suggestion is for creating a new GradientXYLineAndShapeRenderer like this: Code: Select all package org.jfree.chart.demo; import java.awt.Color; import java.awt.GradientPaint; import java.awt.Graphics2D; import java.awt.Paint; import java.awt.geom.Rectangle2D; import org.jfree.chart.plot.PlotRenderingInfo; import org.jfree.chart.plot.XYPlot; import org.jfree.chart.renderer.xy.XYItemRendererState; import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; import org.jfree.data.xy.XYDataset; import org.jfree.util.PaintList; public class GradientXYLineRenderer extends XYLineAndShapeRenderer { private PaintList paintList2; private Rectangle2D dataArea; ...

27. Adding dot lines in the grid    jfree.org

28. No Domain Grid Lines visible    jfree.org

XYPlot plot = (XYPlot) chart.getPlot(); plot.setDomainGridlinesVisible(true); plot.setDomainMinorGridlinesVisible(true); plot.setDomainCrosshairVisible(true); plot.setDomainCrosshairLockedOnData(true); plot.setDomainZeroBaselineVisible(true); plot.setRangeGridlinesVisible(false); plot.setRangeMinorGridlinesVisible(false); ...

29. Line separator in grouping    jfree.org

30. StepChart without vertical lines    jfree.org

32. drawing a diagonal line    jfree.org

33. XYAreaRenderer - how to shade on the other side of the line?    jfree.org

I am trying to use the XYAreaRenderer to shade everything under the line in my graph. The problem I am running into is that my range is set to inverted so that 0 starts from the top and max value is at the bottom. When I try to use XYAreaRenderer in the setup up it shades from line to 0 when ...

34. Dashed Line Problems    jfree.org

Hi, I'm having some trouble using a dashed line in a line graph. It appears that the dashed pattern restarts at each data point, so if there are lots of points close together and their values are not very far apart the line still appears solid. Is there anyway to have the dashed pattern continue across the whole series so the ...

35. JFreechart:Is there a way to get all the lengends in individual lines    forums.oracle.com

Hi, This is the first time am using JFreechart. If we have multiple line grpahs then each will have individual grpahs and corresponding legends. These lengends depeneding on their string length are displayed one after other in same line or in the next line. Is there a way to force JFreeChart to draw each lengends in new line? Please advice. Thanks ...