Marker + Mouse_Up event
Posted: Mon Jun 03, 2019 10:16 am
Hi Team,
I am using ChartEventMarker. I attach events to it like "PositionChanged,MouseClick ". Both work. However MouseUp event is not fired at all. When should I expect the event to be fired? Why is it not triggering?
private void CreateChart()
{
// Disable rendering, strongly recommended before updating chart properties.
Chart.BeginUpdate();
Chart.Name = "PointLineSeries chart";
// Configure x-axis.
AxisX axisX = Chart.ViewXY.XAxes[0];
axisX.SetRange(0, 20);
// Configure y-axis.
Chart.ViewXY.YAxes[0].SetRange(0, 100);
PointShapeStyle symbol = new PointShapeStyle(
null,
Shape.Rectangle,
Color.Black,
Color.FromArgb(0, Color.Black),
Color.White,
Color.FromArgb(160, Color.Black),
3,
Chart.ViewXY.GetGraphSegmentInfo().GraphHeight - 30,
0,
0,
1,
GradientFillPoint.Solid,
Direction.None,
null);
//Marker on top of graph
ChartEventMarker chartMarker = new ChartEventMarker
{
XValue = 2,
Visible = true
};
chartMarker.Label.Text = "Marker";
chartMarker.Label.Color = Color.Black;
chartMarker.Label.VerticalAlign = AlignmentVertical.Top;
chartMarker.BindToXAxis = true;
chartMarker.Symbol = symbol;
chartMarker.Tag = 0;
chartMarker.MouseInteraction = true;
Chart.ViewXY.ChartEventMarkers.Add(chartMarker);
chartMarker.MouseUp += ChartMarker_MouseUp;
chartMarker.PositionChanged += ChartMarker_PositionChanged;
Chart.EndUpdate();
}
I am using ChartEventMarker. I attach events to it like "PositionChanged,MouseClick ". Both work. However MouseUp event is not fired at all. When should I expect the event to be fired? Why is it not triggering?
private void CreateChart()
{
// Disable rendering, strongly recommended before updating chart properties.
Chart.BeginUpdate();
Chart.Name = "PointLineSeries chart";
// Configure x-axis.
AxisX axisX = Chart.ViewXY.XAxes[0];
axisX.SetRange(0, 20);
// Configure y-axis.
Chart.ViewXY.YAxes[0].SetRange(0, 100);
PointShapeStyle symbol = new PointShapeStyle(
null,
Shape.Rectangle,
Color.Black,
Color.FromArgb(0, Color.Black),
Color.White,
Color.FromArgb(160, Color.Black),
3,
Chart.ViewXY.GetGraphSegmentInfo().GraphHeight - 30,
0,
0,
1,
GradientFillPoint.Solid,
Direction.None,
null);
//Marker on top of graph
ChartEventMarker chartMarker = new ChartEventMarker
{
XValue = 2,
Visible = true
};
chartMarker.Label.Text = "Marker";
chartMarker.Label.Color = Color.Black;
chartMarker.Label.VerticalAlign = AlignmentVertical.Top;
chartMarker.BindToXAxis = true;
chartMarker.Symbol = symbol;
chartMarker.Tag = 0;
chartMarker.MouseInteraction = true;
Chart.ViewXY.ChartEventMarkers.Add(chartMarker);
chartMarker.MouseUp += ChartMarker_MouseUp;
chartMarker.PositionChanged += ChartMarker_PositionChanged;
Chart.EndUpdate();
}