We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Possible To move axes on the Tick

Hi

Is it possible that we move the axes whether it x Axes or y Axes move on the Tick For Eg:If we have 10 tick And user give 3 my x axes should move on the 4 tick

Plz help me

Thanx


3 Replies

MA Manohari Syncfusion Team July 8, 2008 07:55 AM UTC

Hi Pankaj,

We regret very much for the delay in updating you. Could you provide more information on your requirement?

Do you mean to move chartAxis labels such that it starts from 3 as given in the attched screenshot?

SampleScreenShot.png

If not could you please provide us with a screenshot of what you need exactly? So that it would be more helpful for us to provide you with a better solution at the earliest.

Kindly let us know if you have any questions. Thanks for your patience.

Regards,
Manohari.R





AD Administrator Syncfusion Team July 8, 2008 08:27 AM UTC

Hi
Thanks for your reply.I am sending u my images (see attached images) in images-1 the graph is shown in which x Axis is shown below when the enter 300 then the x axis move to the 300 of y axis simalar apporach is also used in y axis also

Thanks
Pankaj Sardana



ImageTick-1_1761183a.zip


MA Manohari Syncfusion Team July 8, 2008 11:05 AM UTC

Hi Pankaj,

Thanks for the screenshot.

It is possible to move the Primary X axis to the Specified Y axis value using the chartControl1.PrimaryXAxis.Location property in the LayoutComplete event as follows.

Sample Code:

void chartControl1_LayoutCompleted(object sender, EventArgs e)
{
chartControl1.PrimaryXAxis.LocationType = ChartAxisLocationType.Set;
chartControl1.PrimaryYAxis.Range = new MinMaxInfo(-100, 100, 20);
float RequiredAxisPosition = this.chartControl1.PrimaryYAxis.GetCoordinateFromValue(300); // Gets the location at Y
axis value 300.
chartControl1.PrimaryXAxis.Location = new PointF(chartControl1.PrimaryXAxis.Location.X, RequiredAxisPosition );
}

I have attached the sample illustrating the same in the below link.

http://websamples.syncfusion.com/samples/Chart.Windows/I74944/main.htm

Please let me know if this meets your requirements. Thanks for your patience.

Regards,
Manohari.R


Loader.
Live Chat Icon For mobile
Up arrow icon