Hi Steema,
When I zoom into a chart I'd like to get the zoomed MinX , MinY, MaxX, and MaxY values and thought it would be in the Zoomed event but am finding it challenging to figure this out. Please see attached screenshots. I'm doing something wrong.
Thanks as always!
Joseph
Read Zoomed Values
Read Zoomed Values
- Attachments
-
- results.jpg (31.28 KiB) Viewed 7276 times
-
- Code.jpg (82.22 KiB) Viewed 7276 times
Re: Read Zoomed Values
Hello,
using the following code works fine. Could you please check?
using the following code works fine. Could you please check?
Code: Select all
Steema.TeeChart.TChart _chart = new Steema.TeeChart.TChart();
private void Form1_Load(object sender, EventArgs e)
{
Controls.Add(_chart);
var line = new Steema.TeeChart.Styles.Line(_chart.Chart);
line.XValues.DateTime = true;
line.FillSampleValues();
_chart.Axes.Bottom.Labels.Angle = 90;
_chart.Zoomed += _chart_Zoomed;
}
private void _chart_Zoomed(object? sender, EventArgs e)
{
MessageBox.Show("Min YVal:" + _chart.Axes.Left.Minimum.ToString() +
" | Max YVal:" + _chart.Axes.Left.Maximum.ToString());
MessageBox.Show("Min XVal:" + DateTime.FromOADate(_chart.Axes.Bottom.Minimum).ToString() +
" | Max XVal:" + DateTime.FromOADate(_chart.Axes.Bottom.Maximum).ToString());
}
Pep Jorge
http://support.steema.com
http://support.steema.com
Re: Read Zoomed Values
Thanks, I will try this.