Author |
Topic  |
|
bechbd
15 Posts |
Posted - 13 Oct 2005 : 16:22:03
|
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
|
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.
|
 |
|
bechbd
15 Posts |
Posted - 14 Oct 2005 : 11:02:08
|
No changing the Time Base does not seem to make a difference. Any ideas what I should look for that maybe causing this? |
 |
|
quinncurtis
1164 Posts |
Posted - 14 Oct 2005 : 11:18:39
|
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.
|
 |
|
|
Topic  |
|
|
|