Page 1 of 1

CandlestickChart not working with ValueMarker?

Posted: Fri Aug 09, 2013 4:12 pm
by jimmy6
The following code cant manage to show marker. Why?

Code: Select all

final JFreeChart chart = ChartFactory.createCandlestickChart("Candlestick Demo", "Time", "Price", dataset,
				true);
.............
		final Hour hour = new Hour(1, new Day(1, 7, 2013));
		  
	        final Marker originalEnd = new ValueMarker(hour.getFirstMillisecond());
	        originalEnd.setPaint(Color.green);
	        originalEnd.setLabel("Original Close (02:00)");
	        originalEnd.setLabelAnchor(RectangleAnchor.TOP_LEFT);
	        originalEnd.setLabelTextAnchor(TextAnchor.TOP_RIGHT);
	        plot.addRangeMarker(originalEnd);
    

Re: CandlestickChart not working with ValueMarker?

Posted: Sun Aug 18, 2013 6:47 am
by jimmy6
why this is sooo hard to answer???
Anyone got sample for this?

Re: CandlestickChart not working with ValueMarker?

Posted: Thu Aug 29, 2013 8:40 pm
by david.gilbert
It's usually better if you provide a small, self-contained, and compilable example, otherwise guess work is involved. That said, my guess is that you want addDomainMarker() rather than addRangeMarker().