Download QCChart2D CF Charting Library for the .Net Compact Framework

Transcript
Axes 163
ticdir
The direction of the tick marks. Use one of the tick mark direction
constants: AXIS_MIN, AXIS_CENTER, or AXIS_MAX.
The SetColor method is used to customize the drawing properties of the lines used to
draw the axis line and tick marks.
Simple log axis example
[C#]
double xMin = 0;
double xMax = 1000;
double yMin = 0.2;
double yMax =
2000;
CartesianCoordinates logYScale =
new CartesianCoordinates(ChartObj.LINEAR_SCALE,
ChartObj.LOG_SCALE);
logYScale.SetCoordinateBounds(xMin, yMin, xMax, yMax);
// Create a linear x-axis and a logarithmic y-axis
LinearAxis xAxis = new LinearAxis (logYScale, ChartObj.X_AXIS);
LogAxis yAxis = new LogAxis (logYScale, ChartObj.Y_AXIS);
// Create the ChartView object to place graph objects in.
ChartView chartVu
= chartView1;
// Add the x- and y-axes to the chartVu object
chartVu.AddChartObject(xAxis);
chartVu.AddChartObject(yAxis);
[Visual Basic]
Dim xMin As Double = 0
Dim xMax As Double = 1000
Dim yMin As Double = 0.2
Dim yMax As Double = 2000
Dim logYScale As CartesianCoordinates = _
New CartesianCoordinates(ChartObj.LINEAR_SCALE, ChartObj.LOG_SCALE)
logYScale.SetCoordinateBounds(xMin, yMin, xMax, yMax)
' Create a linear x-axis and a logarithmic y-axis
Dim xAxis As LinearAxis = New LinearAxis(logYScale, ChartObj.X_AXIS)
Dim yAxis As LogAxis = New LogAxis(logYScale, ChartObj.Y_AXIS)