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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

how to disable interactive cursor..

Thread ID:





74831 Jun 30,2008 11:29 AM UTC Jul 1,2008 07:14 PM UTC WinForms 1
Tags: Chart
Administrator [Syncfusion]
Asked On June 30, 2008 11:29 AM UTC

hi Experts...

i need to show the lines corresponding to x-axis and y-axis alonge with a point. i m using interactive cursor for that. but i m just unable to disable to cursor so that i can show only the lines across the axes but not let the user to interacte with it.
if any other way is possible plz let me know. the attached image will show u more what i need.
dalvir singh

lines across point_2b7ff22c.zip

Manohari [Syncfusion]
Replied On July 1, 2008 07:14 PM UTC

Hi Dalvir,

Thanks for the screenshot. It is not possible to disable the dragging of interactive cursor. However it is possible to show lines along a particular point by drawing custom line using ChartAreaPaint event handler as given below.

Sample Code:

void chartControl1_ChartAreaPaint(object sender, PaintEventArgs e)
minLeft = this.chartControl1.ChartArea.RenderBounds.Left;
maxRight = this.chartControl1.ChartArea.RenderBounds.Right;
maxY = this.chartControl1.ChartArea.RenderBounds.Bottom;
minY = this.chartControl1.ChartArea.RenderBounds.Top;
using (Pen pen = new Pen(Color.FromArgb(220,60,60)))
{ pen.Width = 2;
float x = this.chartControl1.PrimaryXAxis.GetCoordinateFromValue(this.chartControl1.Series[0].Points[CustomLinesPointIndex].X);
float y = this.chartControl1.PrimaryYAxis.GetCoordinateFromValue(this.chartControl1.Series[0].Points[CustomLinesPointIndex].YValues[0]);
if (x >= minLeft && x <= maxRight) // Condition to disallow CustomGrid lines to draw outside the visible chartarea region
e.Graphics.DrawLine(pen, x, maxY, x, minY);// to draw Custom lines
if (y >= minY && y <= maxY) // Condition to Disallow labels to be drawn for the point that are ouside the visible chart area ( when chart is zoomed in).
e.Graphics.DrawLine(pen, minLeft, y, maxRight, y);// to draw Customlines

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


Kindly let us know if this meets your requirement. Thanks for your patience.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon