# Expression in XY Chart Bullet Label Text

**URL:** <https://forum.inductiveautomation.com/t/expression-in-xy-chart-bullet-label-text/53467>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [November 25, 2021, 6:42pm UTC](https://forum.inductiveautomation.com/t/expression-in-xy-chart-bullet-label-text/53467 "2021-11-25T18:42:27Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![declan.mccarthy](https://avatars.discourse-cdn.com/v4/letter/d/dec6dc/32.png) [@declan.mccarthy](https://forum.inductiveautomation.com/u/declan.mccarthy)\
**Post date:** [November 25, 2021, 6:42pm UTC](https://forum.inductiveautomation.com/t/expression-in-xy-chart-bullet-label-text/53467/1 "2021-11-25T18:42:27Z")

</div>

Is it possible to use an expression to only show labels when they are over a certain x value or y value, i.e. using {valueX} inside an expression?

current json below (without expression)  
[  
{  
“enabled”: true,  
“render”: “label”,  
“width”: 1,  
“height”: 1,  
“label”: {  
“text”: “{valueX}”,  
“position”: {  
“dx”: 1,  
“dy”: -5  
}  
},  
“tooltip”: {  
“enabled”: true,  
“text”: “{name}: [bold]{valueY}[/]”,  
“cornerRadius”: 3,  
“pointerLength”: 4,  
“background”: {  
“color”: “”,  
“opacity”: 1  
}  
},  
“fill”: {  
“color”: “”,  
“opacity”: 1  
},  
“stroke”: {  
“color”: “”,  
“width”: 1,  
“opacity”: 1  
},  
“rotation”: 0,  
“deriveFieldsFromData”: {  
“fill”: {  
“color”: “”,  
“opacity”: “”  
},  
“stroke”: {  
“color”: “”,  
“opacity”: “”,  
“width”: “”  
},  
“rotation”: “”  
},  
“heatRules”: {  
“enabled”: false,  
“max”: 100,  
“min”: 2,  
“dataField”: “”  
}  
}  
]

---

<div class="post-metadata">

**Author:** ![augusto.junior](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@augusto.junior](https://forum.inductiveautomation.com/u/augusto.junior)\
**Post date:** [September 21, 2022, 3:34pm UTC](https://forum.inductiveautomation.com/t/expression-in-xy-chart-bullet-label-text/53467/2 "2022-09-21T15:34:55Z")

</div>

Did you get this solved?  
I have the same issue. Not sure how we can use logic with y / x value.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [September 21, 2022, 3:40pm UTC](https://forum.inductiveautomation.com/t/expression-in-xy-chart-bullet-label-text/53467/3 "2022-09-21T15:40:02Z")

</div>

Did you try an expression binding on the text property to return the value? Something like:

```auto
if(
    {someTagValue} > 10,
    “{valueX}”,
    ""
)
```

---

<div class="post-metadata">

**Author:** ![augusto.junior](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@augusto.junior](https://forum.inductiveautomation.com/u/augusto.junior)\
**Post date:** [September 21, 2022, 3:49pm UTC](https://forum.inductiveautomation.com/t/expression-in-xy-chart-bullet-label-text/53467/4 "2022-09-21T15:49:27Z")

</div>

Hi @Transistor ,

I tried that, but I’m getting a null first argument.

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/e/7e0908ecc09b87e18190a8aba99120bd77eade94.png)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/7/777dd0407ae2d525f554b88933eaa22c60063a83.png)

---

<div class="post-metadata">

**Author:** ![declan.mccarthy](https://avatars.discourse-cdn.com/v4/letter/d/dec6dc/32.png) [@declan.mccarthy](https://forum.inductiveautomation.com/u/declan.mccarthy)\
**Post date:** [September 21, 2022, 4:02pm UTC](https://forum.inductiveautomation.com/t/expression-in-xy-chart-bullet-label-text/53467/5 "2022-09-21T16:02:24Z")

</div>

No I ended up switching to ApexCharts

> **[GitHub - Kyvis-Labs/ignition-apexcharts-module: The module provides...](https://github.com/Kyvis-Labs/ignition-apexcharts-module)**
>
> The module provides Perspective ApexCharts components - GitHub - Kyvis-Labs/ignition-apexcharts-module: The module provides Perspective ApexCharts components

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [September 21, 2022, 4:05pm UTC](https://forum.inductiveautomation.com/t/expression-in-xy-chart-bullet-label-text/53467/6 "2022-09-21T16:05:57Z")

</div>

> [@augusto.junior](#):
>
> I tried that, but I’m getting a null first argument.

Sorry, in the method I'm suggesting you would bind the text to another tag or property, not the `{valueY}` and that would turn on or off the text for all the points in that plot.

---

<div class="post-metadata">

**Author:** ![augusto.junior](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@augusto.junior](https://forum.inductiveautomation.com/u/augusto.junior)\
**Post date:** [September 21, 2022, 4:19pm UTC](https://forum.inductiveautomation.com/t/expression-in-xy-chart-bullet-label-text/53467/7 "2022-09-21T16:19:44Z")

</div>

I wondering if it could read the values (valueY) and use the logic for each one.  
The expression works fine if I need to reference it to a tag or specific value.

Thanks anyway.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [September 21, 2022, 5:04pm UTC](https://forum.inductiveautomation.com/t/expression-in-xy-chart-bullet-label-text/53467/8 "2022-09-21T17:04:08Z")

</div>

The XY Chart component is based on  
[https://www.amcharts.com/docs/v4/chart-types/xy-chart/](https://www.amcharts.com/docs/v4/chart-types/xy-chart/)

It won’t support logic on the built-in variables.

---

<div class="post-metadata">

**Author:** ![augusto.junior](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@augusto.junior](https://forum.inductiveautomation.com/u/augusto.junior)\
**Post date:** [September 21, 2022, 5:36pm UTC](https://forum.inductiveautomation.com/t/expression-in-xy-chart-bullet-label-text/53467/9 "2022-09-21T17:36:50Z")

</div>

Sadly. But I understand.  
I’ll find a workaround.

Thanks again!
