StripLine has annoying behavior

Hi there, first of all I have a question. Is there a cursor available which can follow the mouse automatically? If so, how can I implement it? At the moment I am using the StripLine to generate a cursor on the chart. If the charts shows a X Axis section from 10 to 20 and i set stripLine.start = 5; stripLine.end = 6; stripLine.width = 1; I will see the stripline outside of my chart! This behavior is same all of the time, no matter if one was zooming on the chart or not. Is there a way to avoid such a behavior? Timo

4 Replies

GM Geetha M Syncfusion Team February 8, 2006 12:19 PM UTC

Hi Timo, Yes. Essential Chart supports InteractiveCursors - the cursor that follows the mouse automatically. Please refer the sample under [Installed Drive]:\Program Files\Syncfusion\Essential Studio\version number\windows\Chart.Windows\Samples\User Interaction\ChartInteractiveCursor Note: This feature has been included only from Essential Chart version 3.3.0.0 onwards. To set the stripline within the chart region use the following code snippet: private ChartStripLine optimalZone = new ChartStripLine(); if((this.optimalZone.Start >= this.chartControl1.PrimaryXAxis.VisibleRange.Min )&& (this.optimalZone.End <= this.chartControl1.PrimaryXAxis.VisibleRange.Max)) this.optimalZone.Enabled = true; else this.optimalZone.Enabled = false; Note: In case of zooming this coding should be included within the VisibleRangeChanged event of the chartControl. There is a KB article on this available at the following link: KB Link I hope this helps you. Thanks and Regards, Geetha


TG Timo Günther February 9, 2006 07:24 AM UTC

Hi, thanks for your quick reply. Your solution didnt match exactly my needs but maybe I can implement something with your little hint. Maybe you can have a look onto my example. the hScrollBar is moving the StripLine which is used as a cursor. If you scroll into the negativ X-Axis you can see the cursor out of the bounds of the chart. Also I dont want to switch off the cursor while zooming. If the cursor if outside the zoomed area it must be shown when it enters the zoomed area. Thanks in advance Timo

SF_Chart.zip


GM Geetha M Syncfusion Team February 9, 2006 03:06 PM UTC

Hi Timo, Thanks for the sample. I made some modifications in the sample to set the cursor within the bounds of Chart. Please find attached the modified code and the explanation and do let me know if it helps you. changes.zip Regards, Geetha.


TG Timo Günther February 13, 2006 07:09 AM UTC

Hi, thanks a lot, that helped (I did a few more modifications also :-)). Greetings, Timo

Loader.
Up arrow icon