Skip to main content Skip to footer

Adding DataLabels in Charts of C1Reports

Charts is one of the important features offered by C1Reports that is added as a 'Custom Field' in the reports. The Charts were included in C1Reports in 2004v3 release and since then many up-gradations in the same have been done from time to time. In order to get complete information about charting in C1Reports, you may refer to the following blog: Charting In C1Reports One of the latest features added in the Charts of C1Reports is 'DataLabels.' This blog deals with the implementation of the same. Many of our customers were required to show the labels in the Charts added in C1Reports as shown in the following figure depicting the exact values in the ChartArea: In the earlier builds of the control the same was not possible and the only workaround for the users was adding labels explicitly against each bar/column/point/line/pie of the chart in the chart area. To make things easy for our users, a set of properties has been added in the control to implement the same. All you have to do is add a 'Chart' field in the report and set the Chart's DataX and DataY properties to the values you want to display on the chart. Then you need to change the 'LabelAutoArrangeOptions' and 'LabelCompass' properties from 'None' to a desired value. The labels will automatically be added in the charts depicting the values in the chart. The labels can also be customized by setting other properties like: 'LabelConnected,' 'LabelAutoArrangeMethod' and 'LabelOffset.' _ Note: When using Pie Charts, you need to set the 'RadialLabels' property to 'True.'_ You can Download the report xml that shows the implementation of the labels with the following properties: LabelAutoArrangeMethod : Decimation LabelAutoArrangeOptions : Top LabelCompass : Auto LabelConnected : True LabelOffset : 20 RadialLabels : False And the following would be the output generated:

MESCIUS inc.

comments powered by Disqus