I couldnt find a way to offset the standard labels so these you can see here are done by adding text to a new layer at each of the points (with an offset). Based on an example i found somewhere on the infragistics help site ....
public class CustomSplatterChartPointLabel : ILayer
{
public void FillSceneGraph(SceneGraph scene)
// Find all the point Primitives
ArrayList pointSets = new ArrayList();
foreach (Primitive p in scene) { PointSet ps = p as PointSet;
if (ps != null) { pointSets.Add(ps); } }
// Reset so we can draw anywhere on the chart
GraphicsContext gc = new GraphicsContext(); gc.ResetClip(); scene.Add(gc);
// Loop through points and add custom labels
foreach (PointSet ps in pointSets)
Point p = ps.points[0].point; int xpos = p.X + 15; int ypos = p.Y;
myText.labelStyle.Font = new Font(myText.labelStyle.Font.FontFamily, 11, FontStyle.Regular, GraphicsUnit.Pixel);
myText.labelStyle.FontColor = Color.Black;
scene.Add(myText);
}
[ ... Standard ILayer Implementation ... ]
Id like to know if there's a straight forward way of doign this? is there something built in that i can use that i may have overlooked rather than going ahead with some custom layer stuff ?
Right now im thinking of figuring out where the point is in relation to the edges (quadrant) and then offsetting the label accordingly. But im not sure that will full solve the issue since it seems like many of the points will be landing ontop of each other. A more complicated solution would be to plot the labels further away from their points but connect a line back to the point.
Any Ideas? thoughts? suggestion? solutions?
Thanks, Jeffrey
You can achieve something similar by adding CalloutAnnotation(s) to the Annotations collection. However, I would stick with the layer as it is a more flexible solution. Using the Callout primitive to surround your text might be a good option.