Hi,
Axis positioning does not work in TeeChart V3 build 12.July 2007
if Units="Pixels" is selected.
Result:
Axis height is not absolutely positioned. (try to resize the window).
Reproduce:
- Choose Left Axis in TeeChart Editor.
- Set Position Units to "Pixels"
- Set Position to 0
- Set Start to 0
- Set End to 120
Can you please fix this bug.. i strongly depend on this functionality.
Best Regards,
Stefan
Bug Axis Start/End Position with Units = Pixels
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
Hello!
I'm sorry to say that you are right, this has got broken in the transition from teechart.net v2 to teechart.net v3 (or at least it was broken in the penultimate release as well). I'll see if I can fix it this afternoon and incorporate it into the next maintenance release. In the meantime, you can use the following workaround:
I'm sorry to say that you are right, this has got broken in the transition from teechart.net v2 to teechart.net v3 (or at least it was broken in the penultimate release as well). I'll see if I can fix it this afternoon and incorporate it into the next maintenance release. In the meantime, you can use the following workaround:
Code: Select all
Steema.TeeChart.Styles.Line line1;
private void InitializeChart()
{
tChart1.BeforeDraw += new PaintChartEventHandler(tChart1_BeforeDraw);
tChart1.Series.Add(line1 = new Steema.TeeChart.Styles.Line());
line1.FillSampleValues();
tChart1.Axes.Left.PositionUnits = PositionUnits.Percent;
}
void tChart1_BeforeDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
Rectangle rect = tChart1.Chart.ChartRect;
double rheight = rect.Height;
double endPos = 120;
double percent = endPos / rheight;
percent *= 100;
tChart1.Axes.Left.EndPosition = percent;
}
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/
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
Hello,
Well, we've now added a new property, StartEndPositionUnits, which enables StartPosition and EndPosition to use different units to RelativePosition, to which the PositionUnits property now exclusively applies. The following code will therefore work ok in the next maintenance release:
Well, we've now added a new property, StartEndPositionUnits, which enables StartPosition and EndPosition to use different units to RelativePosition, to which the PositionUnits property now exclusively applies. The following code will therefore work ok in the next maintenance release:
Code: Select all
Steema.TeeChart.Styles.Line line1;
private void InitializeChart()
{
tChart1.Series.Add(line1 = new Steema.TeeChart.Styles.Line());
line1.FillSampleValues();
tChart1.Axes.Left.StartEndPositionUnits = PositionUnits.Pixels;
tChart1.Axes.Left.StartPosition = 0;
tChart1.Axes.Left.EndPosition = 120;
tChart1.Axes.Left.PositionUnits = PositionUnits.Percent;
tChart1.Axes.Left.RelativePosition = 20;
}
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/