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 Rajesh,
I`m not sure why you choose approach with annotations, but maybe, will be better to use tooltip. By this way you could display the same information when you hover over your line.
Let me know if you have any questions
Georgi : Tooltip is fine , but then the user wants the point values to be dispayed always. Not just on hover..
thanks
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
Let me know if you have any questions.
Regards
If you need any additional assistance don’t hesitate to ask.
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 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;
The code that I upload in my previous response is applicable for composite chart and custom layers . Please take a look at the end on myColumnLayer this is my custom layer. More details you could find in our documentation:
http://help.infragistics.com/Help/Doc/WinForms/2013.2/CLR4.0/html/WinChart.html
http://help.infragistics.com/Help/Doc/WinForms/2013.2/CLR4.0/html/Chart_Annotations.html
http://help.infragistics.com/Help/Doc/WinForms/2013.2/CLR4.0/html/Chart_Composite_Chart.html
Let me know if you have any further questions.
Georgi - We are using Custom layers in the chart. So does it support ChartTextAppearance ?. Couldn't find any article or posts related to this.
OK. Let me know if you have any questions.
Georgi : Will check this and let you know..Thanks