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 Microsoft .Net & .Net Compact Framework
 QCChart2D and QCChart2D CF (VB and C#)
 X-Axis labels
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

ahang

8 Posts

Posted - 16 Jun 2009 :  21:49:01  Show Profile  Reply with Quote
Hi QC~



Current axis labels show only 4 points(0, 10, 20, 30),
However I wanna display labels of all data points.

How can i do that ?

[Reference]

dataset = new SimpleDataset("Dataset", xValueList, yValueList);

pTransform = new CartesianCoordinates(ChartObj.LINEAR_SCALE, ChartObj.LINEAR_SCALE);
pTransform.SetScaleStartX(xChartNumericMin);
pTransform.SetScaleStopX(xChartNumericMax);
pTransform.SetScaleStartY(yMinValue);
pTransform.SetScaleStopY(yMaxValue);

xAxis = new LinearAxis(pTransform, ChartObj.X_AXIS);
xAxisLab = new NumericAxisLabels(xAxis);


Thanks ...

SMILE

quinncurtis

1164 Posts

Posted - 17 Jun 2009 :  10:15:04  Show Profile  Reply with Quote
You need to override the automatic formatting of the axis by setting some properties of the axis object. You want a tick space of 1, and a major tick mark, and hence a label, at every tick mark.

xAxis = new LinearAxis(pTransform, ChartObj.X_AXIS);
xAxis.AxisTickSpace = 1;
xAxis.AxisMinorTicksPerMajor = 1;
Go to Top of Page

ahang

8 Posts

Posted - 18 Jun 2009 :  04:38:31  Show Profile  Reply with Quote
Thanks.

but I still have rest of the problems.

// LinearAxis doesn't have this function
xAxis.AxisTickSpace = 1;

// It works
xAxis.AxisMinorTicksPerMajor = 1;



This is remain problem as below



I want to display like [Pic1] always ...
(Pic2 doesn't show point labels include 1,3,5, ...)
How can I do this ?

SMILE

Edited by - ahang on 18 Jun 2009 04:48:24
Go to Top of Page

quinncurtis

1164 Posts

Posted - 18 Jun 2009 :  09:49:24  Show Profile  Reply with Quote
What do you mean by the comment:

// LinearAxis doesn't have this function
xAxis.AxisTickSpace = 1;


because the LinearAxis does have the AxisTickSpace property, and you need to set it to 1.0.

You can also try the SetAxisTickSpace method, instead of the property. We tested both in one of our example programs and we know both are accessible.

LinearAxis xAxis = new LinearAxis(pTransform1, ChartObj.X_AXIS);
// the following two lines do the same thing
 xAxis.SetAxisTickSpace(1.0);
 xAxis.AxisTickSpace = 1.0;
 chartVu.AddChartObject(xAxis);


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