Hi Steema Support,
For zooming chart we use
tChart1.Zoom.Allow=true;
tChart1.Zoom.History=true;
So it saves all steps in historySteps automatically on every zoom.
My query is that is it possible to modify/change History step list without performing zoom/unzoom or we want to insert some value in history step without zooming.
Note- we donot want to use tChart1.Zoom.ZoomRect() for this.
Please provide any solution asap
Thanks in advance.
Thanks&Regards
Modifying HistorySteps without Zoom/Unzoom
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Modifying HistorySteps without Zoom/Unzoom
Hello,
Yes, you can modify the values of the HistorySteps property, e.g.
to see this work, run the a chart with the above code, zoom twice on the chart, click the button, and then do an unzoom.
Yes, you can modify the values of the HistorySteps property, e.g.
Code: Select all
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
tChart1.Series.Add(typeof(Line)).FillSampleValues();
tChart1.Zoom.History = true;
}
private void button4_Click(object sender, EventArgs e)
{
List<ZoomSnapshot> steps = tChart1.Zoom.HistorySteps;
if(steps.Count > 0)
{
ZoomSnapshot snap = steps[0];
//snapshot.AxesMinMax = new double[] { chart.axes.Left.Minimum,
// chart.axes.Left.Maximum,
// chart.axes.Top.Minimum,
// chart.axes.Top.Maximum,
// chart.axes.Right.Minimum,
// chart.axes.Right.Maximum,
// chart.axes.Bottom.Minimum,
// chart.axes.Bottom.Maximum };
snap.AxesMinMax[6] = 1.5;
snap.AxesMinMax[7] = 2.5;
}
}
Best Regards,
Christopher Ireland / 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 |
Re: Modifying HistorySteps without Zoom/Unzoom
Thanks for prompt and valueable reply.
This code update the history steps successfully.
I have one more query in this. If we does not zoomed any time then history step count is 0.
Now if we want to add some value in history step container(when history step is zero).Is its possible?
Please suggest any solution asap.
Thanks in advance.
Thanks,
This code update the history steps successfully.
I have one more query in this. If we does not zoomed any time then history step count is 0.
Now if we want to add some value in history step container(when history step is zero).Is its possible?
Please suggest any solution asap.
Thanks in advance.
Thanks,
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Modifying HistorySteps without Zoom/Unzoom
Yes. HistorySteps is a property of type List<T> where T is ZoomSnapshot: simply create a new instance of ZoomSnapshot, specify the values of the AxesMinMax array as shown and then add it to the HistorySteps using the Add method.amol wrote: I have one more query in this. If we does not zoomed any time then history step count is 0.
Now if we want to add some value in history step container(when history step is zero).Is its possible?
Best Regards,
Christopher Ireland / 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 |