CandlestickChart not working with ValueMarker?

Discussion about JFreeChart related to stockmarket charts.

CandlestickChart not working with ValueMarker?

Postby jimmy6 » Fri Aug 09, 2013 4:12 pm

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);
   
jimmy6
 
Posts: 5
Joined: Fri Aug 09, 2013 3:58 pm

Re: CandlestickChart not working with ValueMarker?

Postby jimmy6 » Sun Aug 18, 2013 6:47 am

why this is sooo hard to answer???
Anyone got sample for this?
jimmy6
 
Posts: 5
Joined: Fri Aug 09, 2013 3:58 pm

Re: CandlestickChart not working with ValueMarker?

Postby david.gilbert » Thu Aug 29, 2013 8:40 pm

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().
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Ask your company to buy the JFreeChart Developer Guide
:idea: Check out other products sold by my company Object Refinery Limited
david.gilbert
JFreeChart Project Leader
 
Posts: 11653
Joined: Fri Mar 14, 2003 10:29 am


Return to JFreeChart - Stockmarket

Who is online

Users browsing this forum: No registered users and 2 guests