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.
I also tried your exact code to generate the larger icon AND printing the chart with chart.PrintChart() and I still have the same issue with the new larger symbol printing in the wrong location.
Thank you Petia. All I'm doing differently is using the print preview:
// GET PRINT DOCUMENT FROM CHART
this.Chart.PrintDocument;
// SHOW PRINT PREVIEW DIALOG
Hi,
I have try to reproduce the issue calling ultraChart1.PrintChart(); but with no luck. Do you have some custom settings changing the resolution or the dpi when printing? If so, please, give them to us so we could reproduce the problem locally and advise you further.
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?
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); }}