var m_Chart = new TChart();
m_Chart.Aspect.View3D = false;
m_Chart.Legend.Visible = false;
m_Chart.Chart.Name = "TestChart";
m_Chart.Chart.Dock = DockStyle.Fill;
m_Chart.Chart.Header.Text = "";
m_Chart.Chart.Aspect.SmoothingMode = SmoothingMode.AntiAlias;
m_Chart.Chart.Series.Clear();
m_Chart.Chart.Tools.Clear();
m_Chart.Chart.Series.Add(line); // some line series with IsoHorizAxes = true;
m_Chart.Chart.Axes.Bottom.Automatic = true;
m_Chart.Chart.Axes.Bottom.Visible = false;
m_Chart.Chart.Axes.Left.Automatic = true;
m_Chart.Chart.Axes.Left.Visible = false;
Chart.Zoom.ZoomPercent(90.0); // This is not working rather shows empty chart. But if I unzoom using mouse chart appears again.
Why ZoomPercent(double value) is not working?
Cant' set the zoom to the chart
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Cant' set the zoom to the chart
Hello,
Firstly, apologies for the lateness in this reply.
I think your issue can be resolved by calling the TChart.Draw method, as in the example below:
Firstly, apologies for the lateness in this reply.
I think your issue can be resolved by calling the TChart.Draw method, as in the example below:
Code: Select all
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
tChart1.Legend.Visible = false;
tChart1.Name = "TestChart";
tChart1.Dock = DockStyle.Fill;
tChart1.Header.Text = "";
tChart1.Aspect.SmoothingMode = SmoothingMode.AntiAlias;
tChart1.Series.Clear();
tChart1.Tools.Clear();
Line line = new Line(tChart1.Chart);
line.FillSampleValues();
line.IsoHorizAxes = true;
tChart1.Series.Add(line); // some line series with IsoHorizAxes = true;
tChart1.Axes.Bottom.Automatic = true;
tChart1.Axes.Bottom.Visible = false;
tChart1.Axes.Left.Automatic = true;
tChart1.Axes.Left.Visible = false;
tChart1.Draw(); //<- this new line
tChart1.Zoom.ZoomPercent(90.0); // This is not working rather shows empty chart. But if I unzoom using mouse chart appears again.
}
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 |