I have a scatter chart in which I need to set the size of the icon of one particular point to a larger size. What is the best way to go about this? I will need to determine which point to make larger dynamically based on x & y value.
Hi,
You could achieve the desired behavior when add a new larger icon element over the desired point one using the FillSceneGraph event as follows:
private void Form1_Load(object sender, EventArgs e){ ultraChart1.FillSceneGraph += new Infragistics.UltraChart.Shared.Events.FillSceneGraphEventHandler(ultraChart1_FillSceneGraph);}void ultraChart1_FillSceneGraph(object sender, Infragistics.UltraChart.Shared.Events.FillSceneGraphEventArgs e){ Symbol symbol = null; foreach (Primitive primitive in e.SceneGraph) { PointSet pointSet = primitive as PointSet; if (pointSet == null) { continue; } //get the desired point you want with different icon -> you could determine it based on x & y values DataPoint dataPoint = pointSet.points[0]; //add a new icon with the desired settings over the point's default icon symbol = new Symbol(dataPoint.point, pointSet.icon, SymbolIconSize.Large); } if (symbol != null) { e.SceneGraph.Add(symbol); }}
I implemented this solution last week (thank you for confirming that the method I came up with was the best way), but the added symbol moves off of the line when printing the chart. Why is that? What would you recommend to fix this issue?