Assigning vertical axis changes Chart width.
Posted: Wed Feb 02, 2005 4:53 pm
Hi TChart,
I have a Chart with six standard line series. Each series has a separate vertical axis and a common bottom axis. I have three axes on the left and three on the right that correspond to each series.
TChartz.Axes.Bottom.Automatic = False
TChartz.Axes.Bottom.SetMinMax(StartDate, EndDate)
TChartz.Axes.Bottom.LabelsOnAxis = True
TChartz.Axes.Bottom.Labels.ExactDateTime = True
TChartz.Axes.Bottom.Labels.DateTimeFormat = "yyyy"
TChartz.Axes.Bottom.Increment = Steema.TeeChart.Utils.GetDateTimeStep(DateTimeSteps.OneYear)
The user selects a series and places a drawline over a portion of that series.
Based on the endpoints of the drawline item the app creates a new series based on a certain function that will match the endpoints of the drawline item. The newly created series must be matched to the same vertical scale as the drawline item.
Dim NewLine as Short
Line1.CustomVertAxis = Me.Axis1
Line1.VertAxis = Steema.TeeChart.Styles.VerticalAxis.Custom
TChartz.Series(NewLine).VertAxis = Line.VertAxis
This appears to work as far as the scaling goes but the entire chart redraws and either removes or pushes all the right axis of the screen and expands the bottom axis so TChartz.Axes.Bottom.Maximum is now to the far right of the screen.
Other than the initial scaling I never change the bottom axis and I can’t see what I have done wrong the assign a vertical axis would change the horizontal width.
PS. My other option was to use custom function to define the new series. This may still be an option?
Thanks
I have a Chart with six standard line series. Each series has a separate vertical axis and a common bottom axis. I have three axes on the left and three on the right that correspond to each series.
TChartz.Axes.Bottom.Automatic = False
TChartz.Axes.Bottom.SetMinMax(StartDate, EndDate)
TChartz.Axes.Bottom.LabelsOnAxis = True
TChartz.Axes.Bottom.Labels.ExactDateTime = True
TChartz.Axes.Bottom.Labels.DateTimeFormat = "yyyy"
TChartz.Axes.Bottom.Increment = Steema.TeeChart.Utils.GetDateTimeStep(DateTimeSteps.OneYear)
The user selects a series and places a drawline over a portion of that series.
Based on the endpoints of the drawline item the app creates a new series based on a certain function that will match the endpoints of the drawline item. The newly created series must be matched to the same vertical scale as the drawline item.
Dim NewLine as Short
Line1.CustomVertAxis = Me.Axis1
Line1.VertAxis = Steema.TeeChart.Styles.VerticalAxis.Custom
TChartz.Series(NewLine).VertAxis = Line.VertAxis
This appears to work as far as the scaling goes but the entire chart redraws and either removes or pushes all the right axis of the screen and expands the bottom axis so TChartz.Axes.Bottom.Maximum is now to the far right of the screen.
Other than the initial scaling I never change the bottom axis and I can’t see what I have done wrong the assign a vertical axis would change the horizontal width.
PS. My other option was to use custom function to define the new series. This may still be an option?
Thanks