# Data label customization

## Use Metric Formatting <a href="#use-metric-formatting" id="use-metric-formatting"></a>

When we activate data labels in any of the Vitara charts, the data labels are displayed in shortened format by default.

<figure><img src="https://230207405-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOuiTPVEbVQnzR38vviPf%2Fuploads%2FLAzDe02YA3oH7gQOpzHL%2FuseMetricFormatting9.png?alt=media&#x26;token=a38625fb-10b2-4b4a-bbac-51c26e0ed21b" alt=""><figcaption></figcaption></figure>

To show the data labels in the same format as the metric’s data format, pick the Use Metric Formatting option from the data labels menu. The screenshot below was taken after enabling the Use Metric Formatting option.

<figure><img src="https://230207405-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOuiTPVEbVQnzR38vviPf%2Fuploads%2FKi9x30mIAYElJkATJzUM%2FuseMetricFormatting10.png?alt=media&#x26;token=9f90ab55-031a-4385-aea5-09a6c9d67030" alt=""><figcaption></figcaption></figure>

**If the metric’s data don’t have currency symbols, then how to display currency symbols in the data labels.**

Lets consider the data as shown in the below screenshot. Here the metric **Sales** does not have dollar sign.

<figure><img src="https://230207405-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOuiTPVEbVQnzR38vviPf%2Fuploads%2FV6wUex26TI4eHXQnnf9i%2FuseMetricFormatting1.png?alt=media&#x26;token=ce552dd0-b858-4534-b3e3-2173ae00356e" alt=""><figcaption></figcaption></figure>

If we wish to display this data using vitara charts and include the dollar symbol in the data labels, we must first add the dollar sign to the data. Edit the metric’s number format in the MicroStartegy and select the appropriate format.<br>

<figure><img src="https://230207405-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOuiTPVEbVQnzR38vviPf%2Fuploads%2FnM6nxwPoquXg0t4BP6o8%2FuseMetricFormatting2.png?alt=media&#x26;token=4c60b618-0bf6-4511-bc60-277ff5cb6e1e" alt=""><figcaption></figcaption></figure>

Below is the screenshot of the data after selecting currency number format with dollar sign.<br>

<figure><img src="https://230207405-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOuiTPVEbVQnzR38vviPf%2Fuploads%2F6B2hVfyW8qL3VgaArCPW%2FuseMetricFormatting3.png?alt=media&#x26;token=582fb4a6-2655-4cd8-9954-d66a8fbff504" alt=""><figcaption></figcaption></figure>

Now apply vitara chart, for example, vitara column chart.

<figure><img src="https://230207405-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOuiTPVEbVQnzR38vviPf%2Fuploads%2FGcb8ueCcIHQWIX7AlW5b%2FuseMetricFormatting4.png?alt=media&#x26;token=8aea897d-23d3-4d3b-b749-7b806fa6f446" alt=""><figcaption></figcaption></figure>

When we enable data labels, by default vitara chart will display data labels in its own format i.e. short format. If we want to the values in the MicroStrategy format we have to enable the *use metric formatting* option.<br>

<figure><img src="https://230207405-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOuiTPVEbVQnzR38vviPf%2Fuploads%2FSf2rGuzdJTxMaeFsyBUL%2FuseMetricFormatting5.png?alt=media&#x26;token=558caf5c-f5eb-49ed-b19e-acd46a95b3cf" alt=""><figcaption></figcaption></figure>

Below is the screenshot of the vitara column chart after enabling the *use metric formatting*. Now we can see the dollar sign in the data labels.<br>

<figure><img src="https://230207405-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOuiTPVEbVQnzR38vviPf%2Fuploads%2F2IIZQ6YflYXDy4TlOG0z%2FuseMetricFormatting6.png?alt=media&#x26;token=a5492115-c345-45ee-ae1f-b645493220f4" alt=""><figcaption></figcaption></figure>

&#x20;**Note:** When we enable the *use metric formatting* option in the data labels menu, the tooltip also will be displayed in the same format as the data labels.

## **Display axis labels in MicroStrategy number format.**

To display axis labels in MicroStrategy number format, first activate the utilize metric formatting option in the data labels menu, and then enable it in the axis labels menu. The screenshot below shows how to enable metric formatting in the axis labels menu.

<figure><img src="https://230207405-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOuiTPVEbVQnzR38vviPf%2Fuploads%2FNhBSa6ZlEQUCK1hSoLxv%2FuseMetricFormatting7.png?alt=media&#x26;token=d8621a85-61c7-4a8a-b966-706e7becc220" alt=""><figcaption></figcaption></figure>

<figure><img src="https://230207405-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOuiTPVEbVQnzR38vviPf%2Fuploads%2FzxAQlxbUCLdeJKopaRV4%2FuseMetricFormatting8.png?alt=media&#x26;token=a1940dd9-6d6b-4da3-99a8-7d904c11bdba" alt=""><figcaption></figcaption></figure>

## Data label customization

In 4.2 release customization of data, labels has been introduced. We can modify the default data labels using text and dynamic macros for data. Below is the screenshot of the data labels editor window.

<figure><img src="https://230207405-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOuiTPVEbVQnzR38vviPf%2Fuploads%2FgVpPYARQOR0NKcFWNFWp%2FdataLabels1.png?alt=media&#x26;token=f7fbc4df-2a72-41bd-8807-e2e37cdd94a0" alt=""><figcaption></figcaption></figure>

Hover the cursor over the ‘i’ symbol to see the available macros for any particular chart. Below is the screenshot.

<figure><img src="https://230207405-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOuiTPVEbVQnzR38vviPf%2Fuploads%2FYttQH1NjoyadsZaSuMlw%2FdataLabels2.png?alt=media&#x26;token=4fe33ec4-0698-44a8-95b0-50c40fe240b0" alt=""><figcaption></figcaption></figure>

&#x20;Starting from version 5.3.10, macro suggestions are displayed with a new look. Refer to the screenshot below.

![](https://230207405-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOuiTPVEbVQnzR38vviPf%2Fuploads%2Fm0O474C2L6EIhpt3akrF%2Funknown.png?alt=media\&token=56e5934f-9f91-4c8d-b9d9-bfe965c1e721)

In the editor window type ‘&’ character and you will see macro suggestions. Select the macros and click on ‘“Apply” tab.

For example, the default macros in the above screenshot is &\[point.value], So the chart shows the metric value at each data-point. See the screenshot below:

<figure><img src="https://230207405-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOuiTPVEbVQnzR38vviPf%2Fuploads%2FJojXeGezCUpCsOq2OegO%2FD_macros1.png?alt=media&#x26;token=40557912-45cb-47d7-baf8-4958ecadd5ec" alt=""><figcaption></figcaption></figure>

Now we will use custom macros in this way &\[point.metricName]: &\[point.value], point.metricname is colored red. And the data labels will display this way now. See the screenshot below:

<figure><img src="https://230207405-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOuiTPVEbVQnzR38vviPf%2Fuploads%2F7tNpd9ECiXb4HnuDn560%2FD_macros2.png?alt=media&#x26;token=3b088b3b-40b7-4981-9e0a-3380451371bd" alt=""><figcaption></figcaption></figure>

In this way, users can use either text or other macros or combination of both in many possible ways.

## Show Overlapping Data Labels <a href="#show-overlapping-data-labels" id="show-overlapping-data-labels"></a>

From 4.1 version, all vitara charts are added with the support to show the overlapping data labels. This feature is added in data labels tab with ‘Show Overlapping Labels’ checkbox.

<figure><img src="https://230207405-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOuiTPVEbVQnzR38vviPf%2Fuploads%2FuCIgAB3YUf083lbLWPkk%2FOverlap_labels1.png?alt=media&#x26;token=8cf369fc-b713-4323-8f4c-59c916d07e94" alt=""><figcaption></figcaption></figure>

For example, in line chart when you enable data labels, only few labels are shown on the chart respective to the space available between the datapoints. See the screenshot below:

<figure><img src="https://230207405-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOuiTPVEbVQnzR38vviPf%2Fuploads%2F5cS4hIAU8FXE1lv3urNA%2Fimage.png?alt=media&#x26;token=aea9e5a3-1e8c-4ded-bdd2-9846694e6782" alt=""><figcaption></figcaption></figure>

Now, the new feature allows to forcefully show all the data labels. To do this, go to data labels tab and enable the ‘Show Overlapping Labels’ checkbox. See the screenshot below:

<figure><img src="https://230207405-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOuiTPVEbVQnzR38vviPf%2Fuploads%2F7zBdolayOSfVdPBMw6BG%2FOverlap_labels3.png?alt=media&#x26;token=c84e334c-6876-4b3f-8d28-ffcc5323b443" alt=""><figcaption></figcaption></figure>

### Label display Format <a href="#attribute-forms-in-data-labels" id="attribute-forms-in-data-labels"></a>

Three label display formats are available. The reference screenshot is provided below

![](https://230207405-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOuiTPVEbVQnzR38vviPf%2Fuploads%2FMbHmmaEaUHVTAc96wGUm%2Funknown.png?alt=media\&token=84949888-654e-41fc-a42a-318b853bd8c7)

## Attribute forms in Data labels <a href="#attribute-forms-in-data-labels" id="attribute-forms-in-data-labels"></a>

We may now select a certain attribute form to display on the chart for Data labels. And we can only select the attribute form macros for the chart’s last attribute. For example, suppose there are two attribute forms enabled attributes, ‘category’ and ‘subcategory’. Then, if necessary, we can display the attribute forms for both attributes. Use &\[point.category\@DESC] or &\[point.category\@ID] or both macros depending on the necessity to display the chart’s default attribute forms in the data labels. Take a look at the image below.&#x20;

<figure><img src="https://230207405-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOuiTPVEbVQnzR38vviPf%2Fuploads%2F3g7QCoBs9dfk1OcIWtTr%2FAttr_forms_DLS.png?alt=media&#x26;token=a60f09ae-b4b2-4e1d-81aa-8fb266e475f5" alt=""><figcaption></figcaption></figure>

To display attribute forms only for a specific attribute, then choose it from data label macros list. e.g, Category\@DESC, Category\@ID, Subcategory\@DESC, Subcategory\@ID.
