Page 1 of 1
Custom Vertical Axis changes .Minimum when FastLine.Add(X,Y)
Posted: Mon Jan 07, 2013 8:37 pm
by 13052810
Hi,
I'm having no luck solving this by myself, I'm hoping someone can help!
The problem occurs after setting up the grid and setting scaling of the custom Vertical axis 0 to 100.
Then using a pushbutton- FastL(0).Add(111458, 30.2);
Some code fragments I'm using:
Code: Select all
public static Steema.TeeChart.Styles.FastLine[] FastL = new Steema.TeeChart.Styles.FastLine[128];
FastL[Index] = new Steema.TeeChart.Styles.FastLine(tChart1.Chart);
I have a small test project to demonstrate the problem that I can upload for reference.
Thanks!
Re: Custom Vertical Axis changes .Minimum when FastLine.Add(X,Y)
Posted: Tue Jan 08, 2013 11:42 am
by 10050769
Hello Tirby,
Using last version Build 4.1.2012.09283 and next code the mÃnim custom vertical axis isn't change for me:
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
Steema.TeeChart.Axis axis1;
Random rnd = new Random();
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
//Custom Vertical Axis
axis1 = new Steema.TeeChart.Axis(tChart1.Chart);
tChart1.Axes.Custom.Add(axis1);
axis1.Horizontal = false;
axis1.StartPosition = 0;
axis1.EndPosition = 48;
axis1.AxisPen.Color = Color.Red;
axis1.SetMinMax(0, 100);
//Left Axis.
tChart1.Axes.Left.StartPosition = 50;
tChart1.Axes.Left.EndPosition = 100;
tChart1.Axes.Left.SetMinMax(0, 100);
for (int i = 0; i < 128; i++)
{
new FastLine(tChart1.Chart);
for (int j = 100000; j < 111458; j = j + 100)
{
tChart1[i].Add(j, rnd.Next(100));
}
if (i % 2 == 0)
{
tChart1[i].CustomVertAxis = axis1;
}
else
{
tChart1[i].VertAxis = VerticalAxis.Left;
}
}
}
private void button1_Click(object sender, EventArgs e)
{
tChart1[0].Add(111458, 30.2);
}
Could you tell us if previous code works for you? If previous code doesn't behave as you want, please could you send us your project because we can reproduce your problem and try to suggest you a good solution for you.
Thanks,
Re: Custom Vertical Axis changes .Minimum when FastLine.Add(X,Y)
Posted: Tue Jan 08, 2013 3:13 pm
by 13052810
Sandra,
Thanks for looking at this, I'll try the code.
The version I'm running is the latest available from the Customer Download section.
My version is 3.5.3700.30575
Re: Custom Vertical Axis changes .Minimum when FastLine.Add(X,Y)
Posted: Wed Jan 09, 2013 2:37 am
by 13052810
Sandra,
Using your example, I was able to modify my program and correct the problem.
I think it was probably the way I was doing things.
Thanks for getting me on the right track!
Re: Custom Vertical Axis changes .Minimum when FastLine.Add(X,Y)
Posted: Wed Jan 09, 2013 12:28 pm
by 10050769
Hello Tirby,
I am glad my solution help you
.
Thanks,