On some use cases , we would like to show the values of chart items. for example:
You can do that by adding an Item labels component into your chart’s game object. This article is a reference to the properties of item labels.
- Text Prefab sets the text prefabs that is used with the item labels. You can find many text prefabs under the folder Prefabs/Text some text prefabs contain additional graphics.
- TextFormat Prefix/Suffix allows you to set a suffix and prefix to the item name. This can help the user understand more about the chart. You can set this to a string such as “Item:”
- Font size is the size of the font used for the item labels.
- Font sharpness allows you to tweak the sharpness of the item labels.
- Separation is the separation of the item labels from their base position. the larger this value is , the further the label is from the chart.
- Location completes the Separation property by allowing you to set separation on all coordinate axis.
- Alignment selects the base position of the labels. Top means the labels are at the edge the chart item , Base means they are at the base.
- Fraction digits is the number of fraction digits shown in the label. The real number is rounded to fit the specified number , you can set this to 0 to show only integers.
All the properties described in this article can also be changed from script Obtaining a chart object for scripting