Author |
Topic  |
|
n/a
10 Posts |
Posted - 15 Jan 2004 : 19:01:14
|
I created two Y Axises Y1 and Y2. Y1 is lacated at the left of plot and Y2 is at right side. Both are LogAxis. If Y1 starts at 0 and stops at 1000, the major grid label of Y1 shows as 1, 10, 100, and 1000. At the same time if Y2 start at 0 and stops at 100000 then the major grid label for Y2 is 1, 10, 100, 1000, 10000, 100000. If Y1 is not changed while Changing Y1 from 100 to 100000. Then Y1 and Y2 will have same number of major grid labels. But after the change the major grid labels for Y2 shows as 99, 990, 9900, 99000 instead of 100, 1000, 10000, 100000. How to fix it. Thanks.
|
|
quinncurtis
1164 Posts |
Posted - 15 Jan 2004 : 20:57:29
|
First correct the most obvious mistake that you have: You cannot have a log scale from 0 to anything. All log scales must start at positive non-zero numbers. You must design your program to not allow invalid ranges for the log scales. Then run your tests again.
|
 |
|
n/a
10 Posts |
Posted - 16 Jan 2004 : 11:50:36
|
quote: Originally posted by quinncurtis
First correct the most obvious mistake that you have: You cannot have a log scale from 0 to anything. All log scales must start at positive non-zero numbers. You must design your program to not allow invalid ranges for the log scales. Then run your tests again.
First, if I put 0 as the Log Axis Y's start point it automatically start at 1. There is no error message popup. It sould.
Second, when I changed to start at 1 instead of 0 it is the same.
I test again, even I only use one Y axis but starts at 10 and stops at 1000, then the major grid labels show as 10,99,990.
the code is as following:
Dim pTransform1 As TimeCoordinates pTransform1 = New TimeCoordinates(mdtStart, 10, mdtEnd, 1000, ChartObj.X_AXIS, ChartObj.WEEK_7D) pTransform1.SetWeekType(ChartObj.DATE) pTransform1.SetTimeScaleTransforms(ChartObj.TIME_SCALE, ChartObj.LOG_SCALE) pTransform1.SetGraphBorderDiagonal(0.1,0.1,0.8,0.8) pTransform1.SetScaleStartY(10) pTransform1.SetScaleStopY(1000)
... Dim yAxis1 As New LogAxis(pTransform1, ChartObj.Y_AXIS) 'SetYLogAxisAttributes(yAxis1, 0, xAxis1, 0, ChartObj.AXIS_MIN) yAxis1.SetAxisMin(10) yAxis1.SetAxisMax(1000) yAxis1.SetLogTickFormat(2) yAxis1.SetAxisTicks(1, 0, 5, 10, 0) yAxis1.SetAxisIntercept(xAxis1.GetAxisMin()) yAxis1.SetAxisTickDir(ChartObj.AXIS_MIN) chartVu.AddChartObject(yAxis1)
where mdtStart, mdtEnd is ChartCalendar
The major grid lable shows as 10, 99, 990.
Could you help me to figure out the problem? Thanks.
|
 |
|
quinncurtis
1164 Posts |
Posted - 16 Jan 2004 : 13:56:09
|
We trap and correct hundreds of programming errors in the software. We cannot popup error messages for all of these.
If you are going to explicitly set the axis range as you are doing, you will also need to set the axis tick mark origin.
yAxis1.SetAxisMin(10) yAxis1.SetAxisMax(1000) yAxis1.SetAxisTickOrigin(10) This specifies the starting point of the first major tick mark, 10 in your example.
|
 |
|
n/a
10 Posts |
Posted - 19 Jan 2004 : 17:46:26
|
It works. Thanks you very much. |
 |
|
|
Topic  |
|
|
|