Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Tools for Java
 QCChart2D for Java
 AxisTitle and AxisLabels overlap
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

johnbutler

23 Posts

Posted - 14 Nov 2005 :  09:03:29  Show Profile  Reply with Quote
I am using the following code to create an x-axis at the top of the graph. When I attempt to add the axis title, it is at the same position as the axis labels and is therefore illegible. Does it have something to do with the AxisTickDir? Any ideas to fix it?

_xAxis = new LinearAxis(_pTransform1, ChartConstants.X_AXIS);
_xAxis.setColor(Color.white);
_xAxis.setAxisTickDir( ChartConstants.AXIS_MAX);
_xAxis.setAxisIntercept(_yAxis.getAxisMin());
this.addChartObject(_xAxis);

_xAxisLab = new NumericAxisLabels(_xAxis);
_xAxisLab.setColor(Color.white);
this.addChartObject(_xAxisLab);

AxisTitle xAxisTitle = new AxisTitle();
xAxisTitle.setTitleAxis(_xAxis);
xAxisTitle.setColor(Color.white);
xAxisTitle.setTextString("Frequency (Hz)");
this.addChartObject(xAxisTitle);

quinncurtis

1164 Posts

Posted - 14 Nov 2005 :  13:35:03  Show Profile  Reply with Quote
Sounds like a good time to call the AxisTitle.setYJust method.

AxisTitle xaxistitle2 = new AxisTitle( xAxis2, titleFont, "Collector-Emitter Voltage");
xaxistitle2.setYJust(ChartObj.JUSTIFY_MIN);
gWG.addChartObject(xaxistitle2);
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-07 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07