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
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 : Will check this and let you know..Thanks
OK. Let me know if you have any 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.
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.