# Perspective XY Chart xAxes tooltip text {dateX}

**URL:** <https://forum.inductiveautomation.com/t/perspective-xy-chart-xaxes-tooltip-text-datex/53580>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [November 30, 2021, 5:35pm UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-xaxes-tooltip-text-datex/53580 "2021-11-30T17:35:55Z")\
**Posts on this page:** 20\
**Page:** 1

<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:** [November 30, 2021, 5:35pm UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-xaxes-tooltip-text-datex/53580/1 "2021-11-30T17:35:55Z")

</div>

Can anyone see why the date is not appearing in the Tooltip?

 ![XY chart dateX](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/a/1aa66bc91af3ba9de80f2733f46ea2c42b5b5748.png)

Reference: [X-Value in XY Chart Bullet Tooltip - #5 by PGriffith](https://forum.inductiveautomation.com/t/x-value-in-xy-chart-bullet-tooltip/29998/5)

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [November 30, 2021, 8:19pm UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-xaxes-tooltip-text-datex/53580/2 "2021-11-30T20:19:50Z")

</div>

Only thing I can come up with is that it doesn’t know which data item to reference and so returns an empty string as it can’t find the key.

If you hover over a data point directly does it behave the same way?

---

<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:** [November 30, 2021, 11:20pm UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-xaxes-tooltip-text-datex/53580/3 "2021-11-30T23:20:48Z")

</div>

Thanks, Irose. The Y bullet tooltips are behaving correctly.

![XY chart Y tooltips](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/3/33db5e51cc4582059fcf785c3ca59adeb185fc8e.png)

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [December 1, 2021, 7:39am UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-xaxes-tooltip-text-datex/53580/4 "2021-12-01T07:39:05Z")

</div>

try one of the other 2 things listed in the post i guess (categoryX or valueX)

---

<div class="post-metadata">

**Author:** ![tamerplc](https://avatars.discourse-cdn.com/v4/letter/t/d78d45/32.png) [@tamerplc](https://forum.inductiveautomation.com/u/tamerplc)\
**Post date:** [December 1, 2021, 7:47am UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-xaxes-tooltip-text-datex/53580/5 "2021-12-01T07:47:10Z")

</div>

For more details about tooltip formatting tooltip.text  
[https://www.amcharts.com/docs/v4/concepts/formatters/formatting-strings/](https://www.amcharts.com/docs/v4/concepts/formatters/formatting-strings/)

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [December 1, 2021, 1:05pm UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-xaxes-tooltip-text-datex/53580/6 "2021-12-01T13:05:07Z")

</div>

From what I can tell, your formatting string is correct, the issue is that the chart isn't finding a reference to any object which has a date value key.

From amCharts4 documentation:

> Basically, when some object in the chart is trying to format a label, and its TextFormatter encounters a data placeholder, it goes like this:
> 
> 1. Can I find a value with such key in my own `dataItem` ? (if there's one)
> 2. Can I find a value with such key in my immediate parent's `dataItem` ? (if there's a parent and it has a data item)
> 3. Can I find a value with such key among my own properties?
> 4. Can I find a value with such key among my parent's properties? What about other ancestors in the ascendancy ladder?

And if you were to change the bullet tooltip text it will actually display the date as expected.

```auto
{name}: [bold]{valueY}[/]\nDate: [bold]{dateX}[/]

```

NOTE: where I have the newline you have to actually hit enter, because (at least in 8.1.7) for some reason it doesn't actually honor either the newline or html tags. This might be a bug.

Perhaps @paul-griffith has some better insight into why the Axis tooltip doesn't have a reference to `{dateX}`.

---

<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:** [December 1, 2021, 2:39pm UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-xaxes-tooltip-text-datex/53580/7 "2021-12-01T14:39:04Z")

</div>

Thanks! I had read the documentation but wasn’t much wiser. I tried the `\n` for a line break but that didn’t seem to do anything.

![XY chart dateX fix](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/3/7322ab16a707a5035432fd6a586389497f7b1df5.png)

Your post prompted me to add the date into the bullet tooltip rather than the X-axis labels. This works and to effect the line break you need to enter the text then edit the text via the dropdown text editor and add in a line break without the `\n`.

This solves the problem satisfactorily and I can delete the X-axis tooltip.

---

<div class="post-metadata">

**Author:** ![tamerplc](https://avatars.discourse-cdn.com/v4/letter/t/d78d45/32.png) [@tamerplc](https://forum.inductiveautomation.com/u/tamerplc)\
**Post date:** [December 2, 2021, 8:39pm UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-xaxes-tooltip-text-datex/53580/8 "2021-12-02T20:39:11Z")

</div>

Just only add new line and it working \n not functionally

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/2/c24f16ab69f9b1f625f70498ac85b9e16cb7c1fb.png)

---

<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:** [February 5, 2022, 11:46am UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-xaxes-tooltip-text-datex/53580/9 "2022-02-05T11:46:12Z")

</div>

Further examples:

 ![AM Charts dateX](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/5/f5275bad00dfa6b26bc40c1ac785dde38fc280e9.png)

```auto
Count: [bold]{valueY}[/]
Time: [bold]{dateX.formatDate('HH:mm')}[/]
{dateX.formatDate('yyyy-MMM-dd')}
{dateX.formatDate('EEE')}

```

This is specified in `props.series.0.line.appearance.bullets.0.tooltip.text`, etc.

See the AM Charts [Formatting date and time](https://www.amcharts.com/docs/v4/concepts/formatters/formatting-date-time/) for more details.

---

<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:** [July 4, 2022, 3:33pm UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-xaxes-tooltip-text-datex/53580/10 "2022-07-04T15:33:41Z")

</div>

An example tooltip with date, time and day of week.

![XY Chart tooltip with time](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/8/48490a6735bfd0302440514a3324a96c33879a93.png)

```auto
Machine: [bold]{name}[/]
Count: [bold]{valueY}[/]
Date: [bold]{dateX.formatDate('yyyy-MMM-dd')}[/]
Time: [bold]{dateX.formatDate('HH:mm EEE')}[/]

```

---

<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:** [July 15, 2022, 2:41pm UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-xaxes-tooltip-text-datex/53580/11 "2022-07-15T14:41:57Z")

</div>

For anyone wanting to format the number on a tooltip …

![Tooltip cpm](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/f/dfbb998f6fe4c19bdcf895ea9b002670f71c168e.png)

```auto
Machine: [bold]{name}[/]
CPM: [bold]{valueY.formatNumber("0.0")}[/]
Date: [bold]{dateX.formatDate('yyyy-MMM-dd')}[/]
Time: [bold]{dateX.formatDate('HH:mm EEE')}[/]

```

More on the AM Charts website at [Formatters – amCharts 4 Documentation](https://www.amcharts.com/docs/v4/concepts/formatters/).

---

<div class="post-metadata">

**Author:** ![zacharyw.larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zacharyw.larson/32/23749_2.png) [@zacharyw.larson](https://forum.inductiveautomation.com/u/zacharyw.larson)\
**Post date:** [March 9, 2023, 6:32pm UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-xaxes-tooltip-text-datex/53580/12 "2023-03-09T18:32:10Z")

</div>

[Formatting Strings – amCharts 4 Documentation](https://www.amcharts.com/docs/v4/concepts/formatters/formatting-strings/)]

They mention getting the high and low values.  
I have not been able to get that to work.  
Have you been able to?  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/c/ecb824bfb96c2c3b28d24016369030573b4ddc6f.png)

---

<div class="post-metadata">

**Author:** ![Jonathan\_Bennett](https://avatars.discourse-cdn.com/v4/letter/j/cab0a1/32.png) [@Jonathan\_Bennett](https://forum.inductiveautomation.com/u/Jonathan_Bennett)\
**Post date:** [April 12, 2023, 6:39pm UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-xaxes-tooltip-text-datex/53580/13 "2023-04-12T18:39:47Z")

</div>

> [@zacharyw.larson](#):
>
> They mention getting the high and low values.

I can only get it to work on the actual value column not ones from a different column.

For example:

This works --\> _{valueY.high}_

This and other variations don't --\> _{otherColumn.high}_

If you need the high values, maybe you could add a max column to the data set for each one (if that isn't too cumbersome).

---

<div class="post-metadata">

**Author:** ![zacharyw.larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zacharyw.larson/32/23749_2.png) [@zacharyw.larson](https://forum.inductiveautomation.com/u/zacharyw.larson)\
**Post date:** [April 12, 2023, 7:03pm UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-xaxes-tooltip-text-datex/53580/14 "2023-04-12T19:03:34Z")

</div>

Yah, I didn't think of that, but that would probably work well.

I thought maybe there would be some things that were more advanced possible if I could get the Amcharts functions or adapters figured out.

---

<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 10, 2023, 1:18pm UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-xaxes-tooltip-text-datex/53580/15 "2023-09-10T13:18:15Z")

</div>

Where the X-axis is a category rather than a date or value, you need to use **{categoryX}**.

 ![XY Chart categoryX](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/7/37343969b55bcf55783a335d72836773d5a6a2ef.png)

```auto
Category: {categoryX}
{name}: [bold]{valueY}[/]

```

[https://www.amcharts.com/docs/v4/concepts/formatters/formatting-strings/](https://www.amcharts.com/docs/v4/concepts/formatters/formatting-strings/)

---

<div class="post-metadata">

**Author:** ![Carolin\_Jacob](https://avatars.discourse-cdn.com/v4/letter/c/96bed5/32.png) [@Carolin\_Jacob](https://forum.inductiveautomation.com/u/Carolin_Jacob)\
**Post date:** [September 20, 2023, 12:30pm UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-xaxes-tooltip-text-datex/53580/16 "2023-09-20T12:30:10Z")

</div>

I have a dataset with 4 columns binding to the XY chart from which I'm using 2 column's value as the X & Y data. But I need to show the corresponding value in the 3rd Column of the dataset in the Tooltip and not the X&Y values.  
Is it possible to show the value corresponding to another column in the dataset binded to the XY Chart.?

---

<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 20, 2023, 12:38pm UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-xaxes-tooltip-text-datex/53580/17 "2023-09-20T12:38:06Z")

</div>

> Is it possible to show the value corresponding to another column in the dataset bound to the XY Chart?  
> [/quote]

I wouldn't think so.  
See the AM Charts documentation if you wish to explore more.

---

<div class="post-metadata">

**Author:** ![Carolin\_Jacob](https://avatars.discourse-cdn.com/v4/letter/c/96bed5/32.png) [@Carolin\_Jacob](https://forum.inductiveautomation.com/u/Carolin_Jacob)\
**Post date:** [September 20, 2023, 12:55pm UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-xaxes-tooltip-text-datex/53580/18 "2023-09-20T12:55:22Z")

</div>

Could not find anything regarding that in the AM Charts doc

---

<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 20, 2023, 12:59pm UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-xaxes-tooltip-text-datex/53580/19 "2023-09-20T12:59:39Z")

</div>

You're going to have to be creative then. Have a look at my question and self-answer in the link below. You might be able to adapt my approach.

> [@XY Chart - adding batch labels](https://forum.inductiveautomation.com/t/xy-chart-adding-batch-labels/78428/2):
>
> It seems that my best shot is, Create a batch-number dataset with (t\_stamp, number) pairs. Number is in sequence 1, 2, 3, etc. Create another y-axis. I set the axis range to very large numbers so that the difference in vertical position of my batch numbers is not discernable. In my case I made it max : 1000 and min : -10000. This forces the zero line above the top of my other charts. Add another series and set it to line. Bind it to the batch-number dataset.

---

<div class="post-metadata">

**Author:** ![zacharyw.larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zacharyw.larson/32/23749_2.png) [@zacharyw.larson](https://forum.inductiveautomation.com/u/zacharyw.larson)\
**Post date:** [September 27, 2023, 6:20pm UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-xaxes-tooltip-text-datex/53580/20 "2023-09-27T18:20:29Z")

</div>

> [@Carolin\_Jacob](#):
>
> I have a dataset with 4 columns binding to the XY chart from which I'm using 2 column's value as the X & Y data. But I need to show the corresponding value in the 3rd Column of the dataset in the Tooltip and not the X&Y values.  
> Is it possible to show the value corresponding to another column in the dataset binded to the XY Chart.?

If I am not mistaken, you as asking about something shown in this thread.  
[Perspective XY Chart xAxes tooltip text {dateX} - #12 by zacharyw.larson](https://forum.inductiveautomation.com/t/perspective-xy-chart-xaxes-tooltip-text-datex/53580/12)]

At least if you meant of the same interval.  
I was not able to specify future intervals or past intervals on a current interval.

[Next page](https://forum.inductiveautomation.com/t/perspective-xy-chart-xaxes-tooltip-text-datex/53580.md?page=2)
