Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Tools for Java
 QCChart2D for Java
 setAxisIntercept Problem

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
martin.rooney Posted - 16 Dec 2010 : 11:19:24
I have the following graph:
- 1 TimeAxis (x) initially set to a 1 hour scale
- 2 LinearAxis (y), 1 left and 1 right with different scales
- right y-axis is set to the right hand side by:
- .setAxisIntercept(xAxis.getAxisMax())
Everything, including axes labels are displayed correctly.

User intervention changes the time scale from 1 to 1.5 hours, but when I call setAxisIntercept again it has no impact, the right y-axis moves back with the time.

I have tried various methods to set the scale so that setAxisIntercept corrects this, but none have worked (setTimeCoordinateBounds, setScaleStop, setTimeAxisMax, setAxisLimits, etc).

It seems that I am missing a step before setAxisIntercept will interpret the changes correctly, I would be grateful for any input as to what this might be.
2   L A T E S T    R E P L I E S    (Newest First)
martin.rooney Posted - 16 Dec 2010 : 16:38:48
Thanks, it was the calcAutoAxis and calcAutoAxisLabels calls that I was missing. I was already calling the repaint() method.
quinncurtis Posted - 16 Dec 2010 : 12:39:20
After you change the intercept, you must call the ChartView repaint (or updateDraw) method, to redraw the graph using the new intercept. See the examples in the example program MultipleAxes. Are you doing that?

From MultipleAxes.FinOHLCPlot.updateScaleAndAxes

yAxis3.calcAutoAxis();
yAxisLab3.calcAutoAxisLabels();
yAxis3.setAxisIntercept(pTransform3.getStopX());
yAxis3.setAxisTickDir(ChartConstants.AXIS_MAX);

this.repaint();

Quinn-Curtis Forums © 2000-07 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07