Search found 9 matches

by gerlun
Fri Mar 14, 2008 7:04 pm
Forum: JFreeChart
Topic: How can I define a domain axis of the current day only?
Replies: 1
Views: 3180

How can I define a domain axis of the current day only?

Code: Select all

SimpleDataFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
xAxis.setRange(sdf.parse("2008-03-08 10:00"), sdf.parse("2008-03-08 16:00"));
It always returns with the exception: java.lang.IllegalArgumentException: Requires 'lower' < 'upper'.

How can I solve it? Thx a lot!!
by gerlun
Sun Mar 09, 2008 10:46 am
Forum: JFreeChart
Topic: Question about XYDifferenceRenderer
Replies: 5
Views: 4243

so how can I use mutilple datasets on the same chart? As I used ChartFactory to create a timeseries chart and it accepts only ONE dataset/TimeSeriesCollection with multiple TimeSeries You will have to create the plot manually (see the API for XYPlot ). XYPlot plot = new XYPlot(); // two datasets an...
by gerlun
Sun Mar 09, 2008 6:25 am
Forum: JFreeChart
Topic: Question about XYDifferenceRenderer
Replies: 5
Views: 4243

Actually, this is a bug in the XYDifferenceRenderer algorithm I introduced when I rewrote the algorithm to make it more flexible. The XYDifferenceRenderer should only accept one or two series. A greater number of series than two does not make sense for the renderer because you cannot intuitively di...
by gerlun
Sat Mar 08, 2008 7:04 pm
Forum: JFreeChart
Topic: Question about XYDifferenceRenderer
Replies: 5
Views: 4243

Question about XYDifferenceRenderer

I created a Bollinger bands by retrieving data from database. Therefore, in a chart I hv a upper band and a lower band. In between I plotted the stock price of a particular stock. Totally three time series. The problem is that when I use XYDifferenceRenderer to color the area bounded by two series, ...
by gerlun
Sat Mar 08, 2008 4:06 pm
Forum: JFreeChart
Topic: Please help!! can't refresh chart after dataset update...
Replies: 0
Views: 1592

Please help!! can't refresh chart after dataset update...

public class LineChart { TimeSeries ts; TimeSeriesCollection tsCollection; XYDataset xydataset, rsiSeries; StandardXYItemRenderer xyRenderer = new StandardXYItemRenderer(); StandardXYItemRenderer rsiRenderer = new StandardXYItemRenderer(); DateAxis xAxis; NumberAxis yAxis; XYPlot plot1, plot2; publ...
by gerlun
Tue Feb 12, 2008 6:35 pm
Forum: JFreeChart - Stockmarket
Topic: problem with Moving average
Replies: 3
Views: 7503

hmm...I never use XYDataset...
maybe I'll try it later... :wink:
by gerlun
Mon Feb 11, 2008 4:43 pm
Forum: JFreeChart - Stockmarket
Topic: problem with Moving average
Replies: 3
Views: 7503

I created my line chart as shown below: ts = new TimeSeries("Stock", Minute.class); And I created the 10-day moving average as below: TimeSeries ma10 = MovingAverage.createMovingAverage(ts, "10 day", 14400, 0); 14400 is the no. of minutes in 10 days It seems the graph is correct. Please notify me if...
by gerlun
Mon Feb 11, 2008 4:37 pm
Forum: JFreeChart - Stockmarket
Topic: Update datasets of Candlestick chart
Replies: 2
Views: 12870

Update datasets of Candlestick chart

I used ohlcSeries to draw the candlestick chart but I can't update the datasets. So, how to update the datasets of candlestick chart? For another Line chart. I used TimeSeries to draw. There is a method AddOrUpdate() to update the dataset and I can also remove the timeseries by clear() whether there...