Hello -
I have an ultrachart [infragistics version 12.1] that displays weight for age. I have age on the X axis and weight on the y axis. I am using calloutAnnotations to display text on each data point as seen in the attached image file. But the problem is that the callouts overlap when x axis has almost same data point. Is there a way around it, something like AnnotationSmartLabelStyle that we have in DataVisualization.Charting.
I have set the Callout.Location.Type = Infragistics.UltraChart.Shared.Styles.LocationType.DataValues;
Thanks
Rajesh
Hello Rahesh,
In this case, you could try the code below:
Infragistics.UltraChart.Resources.Appearance.ChartTextAppearance chartTextAppearance1 = new Infragistics.UltraChart.Resources.Appearance.ChartTextAppearance();
chartTextAppearance1.ChartTextFont = new System.Drawing.Font("Arial", 7F);
chartTextAppearance1.ClipText = false;
chartTextAppearance1.Column = -2;
chartTextAppearance1.ItemFormatString = "My Text <DATA_VALUE:00.00>";
chartTextAppearance1.Row = -2;
chartTextAppearance1.Visible = true;
LineChartAppearance lca = new LineChartAppearance();
lca.ChartText.Add(chartTextAppearance1);
myColumnLayer.ChartTypeAppearance = lca;
Let me know if you have any questions.
Georgi : Appreciate the assistance. Option 2 cannot be considered because its already a complicated code and I don't want to complicate it further. :) . I am not sure of the first approach..is there any sample piece for that and does it require recreating the chart? What I mean is can, it be added to the existing chart logic and design ..?
Hello Rajesh,
If you need any additional assistance don’t hesitate to ask.
Regards
You could try one of these options:
Option 1: Using default functionality in our chart to show data values (you could use Chart Wizard or ChartText collection)
Option 2: If you want you could use your annotations and specify their location on a Pixels base instead of DataValues. Of course this is more complicate scenario because you should calculate annotation`s location manually
Georgi : Tooltip is fine , but then the user wants the point values to be dispayed always. Not just on hover..
thanks