Hi,
I'm adding a number of custom vertical axis and associated series at run time to achieve a stacked effect but have noticed that the leftmost extent of the axes labels are not visible. I see how I can increase the Panel LeftMargin to rectify this but is there anyway of autosizing the panel so that all labels are automatically visible?
Thanks,
Norman
Panel margins and custom axis labels
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Norman,
Yes, you could try setting label's CustomSize, for example:
Also please notice that some series styles already support stacking. If you could provide some details about what you are trying to achieve we could suggest how to make it with TeeChart.
Yes, you could try setting label's CustomSize, for example:
Code: Select all
tChart1.Axes.Left.Labels.CustomSize = 50;
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Hi Narcís,
Thanks for the reply and the tip. When I applied the setting to my custom axis I see it had the affect of moving the series title closer to the vertical axis - which is useful and good to know. The axis value labels (i.e. those whose format is determined by the labels.valueformat property) remain unaffected. Is it possible to set the size of these also? It's not so important as I've added end user functionality to allow authorized users set the value format and panel margins preferences to address this type of thing.
In order to achieve the stacked affect (i.e. where a number of series share a common x-axis [datetime] but have their own y axis) I'm use the following logic:
1. Create a new line series
2. Add the series to the chart
3. Create a new axis defining a start and end position (e.g series #1 may have settings of 0 and 50 and series #2 may have settings of 50 and 100)
4. Add the axis to the chart
5. Set the series CustomVertAxis property to the axis created in step 3
It seems to work however I'd be happy to know of any other possible stacking capabilities.
Thanks again,
Norman
Thanks for the reply and the tip. When I applied the setting to my custom axis I see it had the affect of moving the series title closer to the vertical axis - which is useful and good to know. The axis value labels (i.e. those whose format is determined by the labels.valueformat property) remain unaffected. Is it possible to set the size of these also? It's not so important as I've added end user functionality to allow authorized users set the value format and panel margins preferences to address this type of thing.
In order to achieve the stacked affect (i.e. where a number of series share a common x-axis [datetime] but have their own y axis) I'm use the following logic:
1. Create a new line series
2. Add the series to the chart
3. Create a new axis defining a start and end position (e.g series #1 may have settings of 0 and 50 and series #2 may have settings of 50 and 100)
4. Add the axis to the chart
5. Set the series CustomVertAxis property to the axis created in step 3
It seems to work however I'd be happy to know of any other possible stacking capabilities.
Thanks again,
Norman
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Norman,
I'm afraid I don't understand what you mean here as I think CustomSize should do this.The axis value labels (i.e. those whose format is determined by the labels.valueformat property) remain unaffected. Is it possible to set the size of these also?
This seems fine to me. You can find more example of this at All Features\Welcome !\Axes in the features demo available at TeeChart's program group. I thought you were trying to stack series as in the following examples in the features demo: All Features\Welcome !\Chart styles\Standard\Line(Strip)\Stack and Overlap, Welcome !\Chart styles\Standard\Bar\Negative stacked and All Features\Welcome !\Chart styles\Standard\Area\Stack Groups.It seems to work however I'd be happy to know of any other possible stacking capabilities.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Hi Narcís,
Mmmm not sure what's up
I have the following
If I omit the customsize property "my series" will appear to the left of the axis value labels (i.e. from left to right you have caption, value labels and then axis). If I include the customsize property the caption moves right closer to the axis and actually appears behind the value labels.
Mmmm not sure what's up
I have the following
Code: Select all
dim myaxis as steema.teechart.axis
with myaxis
.title.angle = 90
.title.caption = "my series"
.labels.valueformat = "#,###.00"
.labels.customsize = 10
end with
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi norman,
Ok, thanks for the information.
In that case you can combine panel's left margin and CustomSize as in the code example below.
Ok, thanks for the information.
In that case you can combine panel's left margin and CustomSize as in the code example below.
Code: Select all
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim line1 As New Steema.TeeChart.Styles.Line(TChart1.Chart)
line1.FillSampleValues()
Dim myaxis As New Steema.TeeChart.Axis(False, False, TChart1.Chart)
TChart1.Axes.Custom.Add(myaxis)
line1.CustomVertAxis = myaxis
TChart1.Panel.MarginUnits = Steema.TeeChart.PanelMarginUnits.Pixels
TChart1.Panel.MarginLeft = 90
With myaxis
.Title.Angle = 90
.Title.Caption = "my series"
.Labels.ValueFormat = "#,###.00"
.Labels.CustomSize = 60
End With
End Sub
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |