User (Legacy) Posted July 25, 2006 Report Posted July 25, 2006 Hello, If I create a Line chart without specifying X-coordinates, AllowDrag is constrained to changes of Y-values, and this is reflected by the SizeNS cursor; however if X-coordinates are specified, AllowDrag is unconstrained, and the cursor is SizeAll. Ideally, I would like to allow users to change Y-values while keeping X-values fixed, even though the chart may have unevenly distributed X-values. Is there some means of achieving this? Turning AllowDrag off and overriding the control's behaviour using mouse events and coordinate transformations seems a wee bit hairy. Many thanks (and my apologies if there's an AllowDrag.YOnly property I missed!)
Software FX Posted July 25, 2006 Report Posted July 25, 2006 The way to achieve what you want is by processing the DataChangedByUser event as follows: private void chart1_DataChangedByUser (object sender,PointLabelEventArgs e) { if (e.Axis == chart1.AxisX) e.Handled = true; // Prevent change of X-Axis values } -- Francisco Padron www.chartfx.com
Recommended Posts
Archived
This topic is now archived and is closed to further replies.