Search found 93 matches

by RoyW
Sun Jul 26, 2009 6:37 pm
Forum: JFreeChart
Topic: Interactive JFreeChart
Replies: 2
Views: 7306

Interactive JFreeChart

I have not posted for a while. Nor Have I looked at JFreeChart since 1.09. I have been following the forum posts and have seen questions about JFreeChart and interactivity. Interactive zooming, drawing panning. I just wanted to post an example of a program I created in my last job that had to includ...
by RoyW
Fri Mar 20, 2009 5:10 pm
Forum: JFreeChart
Topic: panning code example
Replies: 23
Views: 22148

Re: panning code example

Hi uvoigt, I just had a look at your patch. It seems to be straightforward and effective. I just wonder about the best way to make these additional functions accessible to the user. What about the following approach: - Define a set of classes that extend AbstractAction and implement the methods dec...
by RoyW
Wed Mar 04, 2009 3:13 pm
Forum: JFreeChart - Stockmarket
Topic: Add Drawing Figure Capability To JFreeChart
Replies: 5
Views: 13339

Re: Add Drawing Figure Capability To JFreeChart

The code I have is very specific to the project I am working on. I will try and seperate code just for charting to see if I can come up with a single example. The problem is I created my own chart panel (InteractiveChartPanel) that extended JComponent and was specific to the financial charts I was c...
by RoyW
Fri Feb 27, 2009 8:23 pm
Forum: JFreeChart
Topic: [patch] special chart entities for axes and text titles
Replies: 4
Views: 4809

Re: [patch] special chart entities for axes and text titles

Thanks, I'll give it a try this weekend.
by RoyW
Fri Feb 27, 2009 8:22 pm
Forum: JFreeChart
Topic: How to auto-zoom the Range
Replies: 2
Views: 3115

Re: How to auto-zoom the Range

NumberAxis.setAutoRangeIncludesZero(false);
by RoyW
Tue Feb 24, 2009 7:34 pm
Forum: JFreeChart - Stockmarket
Topic: Add Drawing Figure Capability To JFreeChart
Replies: 5
Views: 13339

I implemented tecnical tools, trendline, trendchannel, fibonacii fan lines, fibonacii retracement lines, Text with arrow, Speedlines, Pitchfork. This was done by creating classes that implement the XYAnnotation interface and then simply do the drawing using Java2D. Interactivity was achieved by dete...
by RoyW
Tue Feb 24, 2009 7:19 pm
Forum: JFreeChart
Topic: [patch] special chart entities for axes and text titles
Replies: 4
Views: 4809

This looks like it could be interesting. I was able to add contect sensitive menus to the domain axis, range axis and chart area but I did this by extending the chart info object. This was limiting because you could only have one range axis. I also implemented dragging within the axis to implement z...
by RoyW
Fri Feb 06, 2009 6:10 pm
Forum: JFreeChart - Stockmarket
Topic: OHLC edit shape
Replies: 1
Views: 6674

You will have to extend HighLowRenderer and implement the functionality you require.

Take a look at this post
http://www.jfree.org/phpBB2/viewtopic.php?t=24755
by RoyW
Wed Jan 21, 2009 11:48 pm
Forum: JFreeChart
Topic: How to locate zero base lines to x=0 and y=0 lines on graph.
Replies: 3
Views: 4599

The code that does the centering is here xAxis = new NumberAxis("X Values"){ protected AxisState drawTickMarksAndLabels(Graphics2D g2, double cursor, Rectangle2D plotArea, Rectangle2D dataArea, RectangleEdge edge) { double y = yAxis.valueToJava2D(0, dataArea, RectangleEdge.LEFT); AxisState state = s...
by RoyW
Wed Jan 21, 2009 5:41 pm
Forum: JFreeChart
Topic: How to locate zero base lines to x=0 and y=0 lines on graph.
Replies: 3
Views: 4599

Does this work for you? import org.jfree.chart.ChartPanel; import org.jfree.chart.JFreeChart; import org.jfree.chart.axis.AxisState; import org.jfree.chart.axis.NumberAxis; import org.jfree.chart.plot.XYPlot; import org.jfree.chart.renderer.xy.XYItemRenderer; import org.jfree.chart.renderer.xy.XYLin...
by RoyW
Fri Jan 16, 2009 9:33 pm
Forum: JFreeChart - Stockmarket
Topic: Price and volume chart demo
Replies: 5
Views: 14959

What you want is a combined line and bar chart. Search the forum for "line AND bar"

XYLineAndShapeRenderer is the renderer for drawing lines. You should be able to set the series stroke (which defines the width). Check the JavaDoc.
by RoyW
Fri Jan 16, 2009 3:25 pm
Forum: JFreeChart - Stockmarket
Topic: Moving Averages - where am I going wrong?
Replies: 1
Views: 6785

http://www.assi73.dsl.pipex.com/Index.html I cannot see the image because it is still on your C: drive <img alt="ohlcWithMA" src="file:///C:/Documents%20and%20Settings/user/Desktop/ohlcWithMA.jpg" style="width: 1280px; height: 1200px;"> How do you create your ohlcData dataset from your data? What ty...
by RoyW
Fri Jan 16, 2009 3:12 pm
Forum: JFreeChart - Stockmarket
Topic: Price and volume chart demo
Replies: 5
Views: 14959

This was written for version 1.0.10
http://www.jfree.org/phpBB2/viewtopic.php?t=23534

What version are you using?
by RoyW
Thu Jan 15, 2009 4:00 pm
Forum: JFreeChart - Stockmarket
Topic: create a candlestick chart
Replies: 9
Views: 67267

Replace this line XYPlot mainPlot = new XYPlot(dataset, domainAxis, rangeAxis, renderer); with this code XYPlot mainPlot = new XYPlot(dataset, domainAxis, rangeAxis, renderer); final long ONE_DAY = 24 * 60 * 60 * 1000; XYLineAndShapeRenderer maRenderer = new XYLineAndShapeRenderer(true, false); XYDa...
by RoyW
Fri Dec 19, 2008 9:36 pm
Forum: JFreeChart - Stockmarket
Topic: newbie: will JFreeChart be able to do these for me ?
Replies: 1
Views: 6787

Take a look at the demo in this post
http://www.jfree.org/phpBB2/viewtopic.php?t=24606

It demo's points 1 & 2.

For #3 you would just need to create 2 datasets that represent the count/day, count/year and call plot.setDataset() to change the data.