Hello,
Your latest dotnet version 2.0.2179.21121 fix the Bugfixes/changes n° 24 "Series Labels and DateTime values were not properly displayed when using DBNull values in databases. Fixed.".
For this reason, I use this new version.
But in the same time, you insert the new functionnality n°3 "Axis.StartPosition and Axis.EndPosition can now be defined in Pixels using Axis.PositionUnits."!
If you use the simple application above, you will see that when you click on the button (Set the PositionUnits in pixel):
- The axe is correctly positionned at -10 pixel of the left axe.
- BUT the startposition and endposition are translated in pixel with the default values 0 and 100!
The customvertical axis in then positionned at 0 pixel (Upper left corner -10 pixels) and with a lenght of 100 pixels!
For my application, I would like to have the RelativePosition in pixel and the Start/EndPosition in percent (In fact 0/100).
Can you tel me if its possible to do this or if the next version can contains this functionnality.
Thanks in advance.
Example:
TChart1.Series(0).FillSampleValues(50)
Dim SerieAxis As Steema.TeeChart.Axis
SerieAxis = New Steema.TeeChart.Axis(False, False, TChart1.Chart)
TChart1.Axes.Custom.Add(SerieAxis)
TChart1.Series(0).CustomVertAxis = SerieAxis
TChart1.Panel.MarginLeft = 30
SerieAxis.RelativePosition = -10
SerieAxis.PositionUnits = Steema.TeeChart.PositionUnits.Pixels
PositionUnits --> Start/EndPosition and RelativePosition.
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
Hi -
You're right, this is a problem which we will look into before the next maintenance release. In the meantime, you can workaround the issue using code similar to the following:
You're right, this is a problem which we will look into before the next maintenance release. In the meantime, you can workaround the issue using code similar to the following:
Code: Select all
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
TChart1.Series(0).FillSampleValues(50)
Dim SerieAxis As Steema.TeeChart.Axis
SerieAxis = New Steema.TeeChart.Axis(False, False, TChart1.Chart)
TChart1.Axes.Custom.Add(SerieAxis)
TChart1.Series(0).CustomVertAxis = SerieAxis
TChart1.Panel.MarginLeft = 30
SerieAxis.RelativePosition = GetPercentageFromPixels(10) * -1
End Sub
Private Function GetPercentageFromPixels(ByVal pixels As Double) As Double
Dim bmp As Bitmap = TChart1.Bitmap 'to recalculate chartrect
Dim rect As Rectangle = TChart1.Chart.ChartRect
Return pixels / (rect.Width / 100)
End Function
Thank you!
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/