Page 1 of 1

Zoom out is not working on certain charts

Posted: Wed Feb 21, 2018 11:25 am
by 15682836
Hello,

We have recently migrated our application from TeeChart .Net 3.x to TeeChart for .Net Pro.

However now it seems that zooming is not working in some charts. In the old version zooming worked without problems. However, if I now open the Chart editor, Tab General I see that zoom is not "Allowed". I can activate it manually:
ZoomAllow1.png
ZoomAllow1.png (71.61 KiB) Viewed 6553 times
However zooming is still not possible.

When I reopen the Chart Editor, I see that the "Allow"-Flag was reset.
ZoomAllow2.png
ZoomAllow2.png (75.71 KiB) Viewed 6553 times
What can I do (either manually or programmatically), to allow zooming again?

Best regards

Wallenstein

Re: Zoom out is not working on certain charts

Posted: Wed Feb 21, 2018 6:18 pm
by Christopher
Hello!
Wallenstein wrote: What can I do (either manually or programmatically), to allow zooming again?
The Allow property still works programmatically, although it has been deprecated. You can use the Direction property to enable or disable zooming for a particular direction, e.g.

Code: Select all

		public Form1()
		{
			InitializeComponent();
			InitializeChart();
		}

		private void InitializeChart()
		{
			tChart1.Series.Add(typeof(Line)).FillSampleValues();
		}

		private void button1_Click(object sender, EventArgs e)
		{
			//tChart1.Zoom.Allow = !tChart1.Zoom.Allow; <-deprecated

			tChart1.Zoom.Direction = tChart1.Zoom.Direction == ZoomDirections.Both ? ZoomDirections.None : ZoomDirections.Both;
		}