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#)
 Setting Tick Marks
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

bechbd

15 Posts

Posted - 13 Oct 2005 :  16:22:03  Show Profile  Reply with Quote
I am having problems setting the X Axis major tick marks. The X axis is a time axis and I would like it to have major tick marks every 5 seconds. It has major tick marks every 10 seconds and I cannot figure out how to change this. Here is the relevant code I am using:

xAxis = New TimeAxis(pTransform1, ChartObj.TIMEAXIS_5SECONDSECOND)
xAxis.SetColor(Color.LightGoldenrodYellow)
chartVu.AddChartObject(xAxis)

yAxis = New LinearAxis(pTransform1, ChartObj.Y_AXIS)
yAxis.SetColor(Color.LightGoldenrodYellow)
yAxis.SetAxisMin(0)
yAxis.SetAxisMax(0.6)
yAxis.SetAxisMajorNthTick(1)
yAxis.SetAxisMinorNthTick(1)
chartVu.AddChartObject(yAxis)

Dim yAxisGrid As New Grid(xAxis, yAxis, ChartObj.Y_AXIS, ChartObj.GRID_MAJOR)
yAxisGrid.SetColor(Color.LightGoldenrodYellow)
yAxisGrid.SetLineWidth(1)
yAxisGrid.SetLineStyle(DashStyle.Solid)
chartVu.AddChartObject(yAxisGrid)

Dim xAxisGrid As New Grid(xAxis, yAxis, ChartObj.X_AXIS, ChartObj.GRID_MAJOR)
xAxisGrid.SetColor(Color.LightGoldenrodYellow)
xAxisGrid.SetLineWidth(1)
xAxisGrid.SetGridXAxis(xAxis)
xAxisGrid.SetLineStyle(DashStyle.Solid)
chartVu.AddChartObject(xAxisGrid)

quinncurtis

1164 Posts

Posted - 14 Oct 2005 :  10:14:29  Show Profile  Reply with Quote
We can't reproduce the problem you describe. The ChartTabDemo example program has a chart that explicity creates a ChartObj.TIMEAXIS_5SECONDSECOND axis. It is found under the Axes | Date and Time Axes tab. The bottom-most right axis uses the ChartObj.TIMEAXIS_5SECONDSECOND tick mark time base and it displays correctly, at least for us. Check it out on your system. The source for that tab page is TimeAxes.

In your program, does changing the axis tick mark time base to any OTHER value have any effect, i.e. TIMEAXIS_30SECONDSECOND, TIMEAXIS_15SECONDSECOND ?

There may be something else going on in your program that you do not show.
Go to Top of Page

bechbd

15 Posts

Posted - 14 Oct 2005 :  11:02:08  Show Profile  Reply with Quote
No changing the Time Base does not seem to make a difference. Any ideas what I should look for that maybe causing this?
Go to Top of Page

quinncurtis

1164 Posts

Posted - 14 Oct 2005 :  11:18:39  Show Profile  Reply with Quote
My guess is that somewhere else you are setting the axis SetAxisTickMarkTimeBase property, or more likely, you are invoking the axis CalcAutoAxis method, which is selecting the TIMEAXIS_10SECONDSECOND tick mark time base based on the range of the x-axis.

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