C1 Community
ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

X-axis scaling

rated by 0 users
This post has 4 Replies | 2 Followers

Not Ranked
Posts 6
gerrod Posted: Mon, Dec 22 2008 9:51 AM
Other than changing the scale, is there anything else that I need to do in order to "zoom" on the X-Axis? We have a custom control to set the zoom level on this axis, and each time the user adjusts the zoom I want to double the zoom level, hence I'm doing:
    chart.View.AxisX.Scale /= 2;
However this doesn't seem to have any effect. Any clues as to what I may be missing? Thanks.
Not Ranked
Posts 6
gerrod replied on Mon, Dec 22 2008 11:42 AM
OK, so it turns out that you have to define the Min and Max of the AxisX in order for scaling to work, or use AutoMin / AutoMax.

So the next question is - if I don't want to use AutoMin and AutoMax, and my X-Axis are time values, what should I set the Min and Max to?
Not Ranked
Posts 1

Hello? C1? Anybody there?

This is a good question that we would all like an answer to.

Tom

Top 10 Contributor
Posts 1,004
C1_AlexT replied on Tue, Mar 31 2009 8:30 AM

 Hello Tom,

Sorry for the delay. Chart uses OLE datetime presentation so to convert datetime to double you should use ToOADate() method. E.g.

  c1Chart1.View.AxisX.Min = dateTime1.ToOADate();
  c1Chart1.View.AxisX.Max = dateTime2.ToOADate();

--
Best regards,
Alex

 

Top 500 Contributor
Posts 13
pltaylor3 replied on Tue, May 12 2009 1:51 PM
I can't seem to be able to set the scaling on a x-axis either. My plot code is as follows and none of the AxisX commands seem to be having any effect. public void fillplot1(string x_axis, string y_axis, C1Chart chart) { chart.Data.Children.Clear(); double[] xdata = new double[sim1.Tables["data"].Rows.Count - 1]; double[] ydata = new double[sim1.Tables["data"].Rows.Count - 1]; for (int i = 0; i
Page 1 of 1 (5 items) | RSS
Contact ComponentOne: 1.800.858.2739 ©1987-2010 ComponentOne LLC All Rights Reserved.