ehdrnsep wrote:Mouse events for SeriesEventMarker and Label do not work.
7.2.4.3 version seems to be unresolved.
Please check it out.
viewtopic.php?f=15&t=1048
Hello, I was responsible for verification about issue status. I have created a sample application for testing and found that issue is fixed in 7.2.4.3 comparing to previous versions.
If you are using Windows Forms designer for chart component configuration, be sure that you have
reset a VisualStudio toolbox properly and added LC items from correct path by pressing "Choose items.." and select path with
new downloaded assemblies. In this case, Windows Forms designer might found wrong assemblies.
Initialization code:
Code: Select all
var rand = new Random();
int pointCounter = 70;
var data = new SeriesPoint[pointCounter];
for (int i = 0; i < pointCounter; i++)
{
data[i].X = (double)i;
data[i].Y = rand.Next(0, 100);
}
var series = new PointLineSeries(chart.ViewXY, chart.ViewXY.XAxes[0], chart.ViewXY.YAxes[0]);
series.LineStyle.Color = Color.Orange;
series.Points = data;
chart.ViewXY.PointLineSeries.Add(series);
var cursorLegend = new SeriesEventMarker(series);
cursorLegend.Symbol.Shape = Shape.Rectangle;
cursorLegend.Symbol.GradientFill = GradientFillPoint.Solid;
cursorLegend.Symbol.Color1 = series.LineStyle.Color;
cursorLegend.Symbol.Antialiasing = false;
cursorLegend.Label.Text = "test marker";
cursorLegend.Label.VerticalAlign = AlignmentVertical.Center;
cursorLegend.VerticalPosition = SeriesEventMarkerVerticalPosition.YAxisTop;
cursorLegend.HorizontalPosition = SeriesEventMarkerHorizontalPosition.AtXValue;
cursorLegend.Offset.Y = -8;
cursorLegend.MouseInteraction = true;
cursorLegend.MoveByMouse = false;
cursorLegend.ClipInsideGraph = false;
cursorLegend.Label.Distance = 5;
cursorLegend.Label.Font = chart.Font;
cursorLegend.Label.Color = Color.White;
cursorLegend.Label.MouseInteraction = true;
cursorLegend.Label.MouseHighlight = cursorLegend.MouseHighlight;
cursorLegend.Label.MouseClick += CursorLegend_MouseClick;
cursorLegend.MouseClick += cursorLegend_MouseClick;
series.SeriesEventMarkers.Add(cursorLegend);
Event handlers with break points:
Code: Select all
private void cursorLegend_MouseClick(object sender, MouseEventArgs e)
{
int a;
a = 0;
}
private void CursorLegend_MouseClick(object sender, MouseEventArgs e)
{
int a;
a = 0;
}
Could you please verify the fixes once again by reassigning DLLs to your project?
I am looking forward your feedback.
If it didn't help, I will need more information from you about platform (WinForms / WPF, designer usage, which series type..)