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#)
 Numeric Axis Labels
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

marco

18 Posts

Posted - 04 Nov 2003 :  10:39:56  Show Profile  Reply with Quote
Hi,

I'm creating a bar graph with 54 bars. Major ticks are set to 9, minor ticks are set to 6. My problem is with the axis labels. I want the label to start at 200 and go up one hundred at each major tick. ie: first major tick = 200, next major tick 300 ect.

the code I'm using:
LinearAxis xAxis = new LinearAxis();
xAxis.SetColor(Color.Black);
xAxis.SetAxisMin(0);
xAxis.SetAxisMax(54);
xAxis.SetAxisMajorNthTick(9);
xAxis.SetAxisMinorTicksPerMajor(6);
chartVu.AddChartObject(xAxis);

NumericAxisLabels xAxisLab = new NumericAxisLabels(xAxis);
xAxisLab.SetColor(Color.Black);
chartVu.AddChartObject(xAxisLab);

I cant find any method in the AxisLabels or LinearAxis that will let me specify the value on each major tick mark, or at least specify a min max value of 200-1100. Is there a way to do this?

Thanks and regards,

Marco

quinncurtis

1164 Posts

Posted - 04 Nov 2003 :  12:05:21  Show Profile  Reply with Quote
The axis labels of the NumericAxisLabels follow the plot area scaling and label all major tick marks except for the first, last and the intercept label, which are optional. If you want axis labels different than this you must use the StringAxisLabels class instead of the NumericAxisLabels class, where you pass in a string array of the major tick mark labels. Some of the strings can be null strings if you want major tick marks without labels.
Go to Top of Page

quinncurtis

1164 Posts

Posted - 04 Nov 2003 :  12:34:02  Show Profile  Reply with Quote
You may find it easier to scale the plotting are for the range that you want your axis labels to use. You can easily calculate each bars x-value to position them properly.
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