crowther
-
Posts
2 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by crowther
-
-
Hi,
I have a chart with datetimes on the X axis and decimal values on the Y. The X axis is configured as follows:
chartA.DataSourceSettings.Style = chartA.DataSourceSettings.Style |
DataSourceStyles.DatesAsLabels;chartA.AxisX.DataFormat.Format = AxisFormat.DateTime;chartA.AxisX.LabelsFormat.Format =
AxisFormat.DateTime;I want the user to be able to change the values on the graph by dragging the markers. I have set the AllowDrag property to true and the markers can now be moved but they can be moved horizontally as well as vertically (i.e. both the datetime and value can be changed!). Is there anyway of restricting the change to the Y-axis only?
Chris.
Dragging markers on a date-time axis
in Windows Forms
Posted
Thanks Frank. That works perfectly.
private void chartA_DataChangedByUser(object sender, PointLabelEventArgs e)
{
if (e.Axis == chartA.AxisX)e.Handled =
true;}