# Dates cannot be used in Hightcharts Visuals?

**URL:** <https://community.amazonquick.com/t/dates-cannot-be-used-in-hightcharts-visuals/44912>\
**Category:** Q&A\
**Tags:** highcharts, Business-Intelligence-Engineer, quick-sight\
**Created:** [April 11, 2025, 2:16am UTC](https://community.amazonquick.com/t/dates-cannot-be-used-in-hightcharts-visuals/44912 "2025-04-11T02:16:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![FMagrinelli](https://avatars.discourse-cdn.com/v4/letter/f/df788c/32.png) [@FMagrinelli](https://community.amazonquick.com/u/FMagrinelli)\
**Post date:** [April 11, 2025, 2:16am UTC](https://community.amazonquick.com/t/dates-cannot-be-used-in-hightcharts-visuals/44912/1 "2025-04-11T02:16:14Z")

</div>

Hey everyone  
I wanted to use some dates in Highcharts Visuals inside quicksight.  
This is the second time I try using it, first time it did not work so I didn’t give much attention.  
But now, seems like everytime I add a Date to group by, the visual transforms it to epoch date, and I cannot use a simple date in x axis with Highcharts.  
Should I do something in the json code?

{

“xAxis”: {

```
"type":"category",

"categories": ["getColumn", 0] //Product

```

},

“yAxis”: {

```
"min": 0,

"title": {

  "text": "Sales"

}

```

},

//Using a shared tooltip to plot Current year sales, Product target and Prior year sales.

//Product target is present only in the bullet series.

//So, using an #if check to add it only when point.target has got value.

“tooltip”: {

```
"headerFormat": "<span style='font-size:10px'>{point.key}</span><table>",

"pointFormat": "<tr><td>{series.name}: </td><td style='padding:0'><b>${point.y:,.0f}</b></td></tr>{#if point.target}<tr><td>Target: </td><td style='padding:0'><b>${point.target:,.0f}</b></td></tr>{/if}",

"footerFormat": "</table>",

"shared": true,

"useHTML": true

```

},

“plotOptions”: {

```
"column": {

  "borderWidth": 0,

  "grouping": false,

  "shadow": false

}

```

},

“subtitle”: {

```
"text": "<span style='color:black'> \u25CF </span><b>Prior year sales</b>&nbsp;&nbsp;&nbsp;&nbsp;<b>\u2015 Target Sales</b>&nbsp;&nbsp;&nbsp;&nbsp;<b> Current year sales : </b><span style='color:#50E287'> \u25CF </span><span>Acheived target, </span><span style='color:#FAE702'> \u25CF </span><span>Surpassed prior year, </span><span style='color:#FD554E'> \u25CF </span><span>Below prior year </span>",

"align": "center",

"verticalAlign": "bottom",

"y": 10,

"useHTML": true

```

},

“legend”: {

```
"enabled":false

```

},

“series”: [

```
{

  "type": "bullet",

  "name": "Current Year Sales",

  "data": [

    "map",

    ["getColumn", 1, 2], //Current Year Sales, Prior Year Sales, Product Target

    {

      "y": ["get", ["item"], 0], //Current Year Sales

      "target":["get", ["item"], 1], //Product Target

      "targetOptions":{

        "color":"black",

        "width":30

      },

      "color": [

        "case",

        //If Current year sales >= Product Target, then green

        [">=", ["get", ["item"], 0], ["get", ["item"], 2]],

        "#50E287",

        //If Current year sales >= Prior year sales, then yellow

        [">=", ["get", ["item"], 0], ["get", ["item"], 1]],

        "#FAE702",

        //Else red; Rules are evaluated top down in case expression.

        "#FD554E"

      ],

      "pointPadding": 0.0

    }

  ]

},

{

  "type": "column",

  "name": "Prior Year Sales",

  "color": "black",

  "data": ["getColumn", 1],

  "pointPadding": 0.3

}

```

]

}

NOTE: I just copied the example, so pretty much everything here is worthless. I just wanted to transform the date to Date and not epoch.

 ![image](https://d1wl4jav5dp96l.cloudfront.net/original/3X/f/b/fb485e6d7cbd37d343bcd3198e7d0abc17577e78.png)

---

<div class="post-metadata">

**Author:** ![Hrolol](https://avatars.discourse-cdn.com/v4/letter/h/b3f665/32.png) [@Hrolol](https://community.amazonquick.com/u/Hrolol)\
**Post date:** [April 11, 2025, 6:11am UTC](https://community.amazonquick.com/t/dates-cannot-be-used-in-hightcharts-visuals/44912/2 "2025-04-11T06:11:08Z")

</div>

Hi @FMagrinelli , welcome to our community. This should help:  
“xAxis”: {  
…  
“type”: “datetime”,  
…  
},

Probably you will also have to use this (in case of date offset):  
“time”: {  
“useUTC”: false  
},

---

<div class="post-metadata">

**Author:** ![FMagrinelli](https://avatars.discourse-cdn.com/v4/letter/f/df788c/32.png) [@FMagrinelli](https://community.amazonquick.com/u/FMagrinelli)\
**Post date:** [April 25, 2025, 12:44pm UTC](https://community.amazonquick.com/t/dates-cannot-be-used-in-hightcharts-visuals/44912/3 "2025-04-25T12:44:27Z")

</div>

hey @Hrolol, thanks for the welcome.  
It did not work. I’m fairly new to highcharts in QS.  
Am I missing something?

 ![image](https://d1wl4jav5dp96l.cloudfront.net/original/3X/d/0/d0d658d6206dd6241ba03dcf4adeebebccef93ba.png)

---

<div class="post-metadata">

**Author:** ![Hrolol](https://avatars.discourse-cdn.com/v4/letter/h/b3f665/32.png) [@Hrolol](https://community.amazonquick.com/u/Hrolol)\
**Post date:** [April 25, 2025, 5:43pm UTC](https://community.amazonquick.com/t/dates-cannot-be-used-in-hightcharts-visuals/44912/4 "2025-04-25T17:43:14Z")

</div>

Hi @FMagrinelli , try to remove “categories” from xAxis. No need to do it for dates and numbers.  
Let’s start with this:

{  
“xAxis”: {  
“title”: {  
“text”: “Date”  
},  
“type”: “datetime”,  
},  
“series”: [  
{  
“type”: “line”,  
“name”:“Test - Line”,  
“data”:[“getColumn”,0,1]  
}  
]  
}

You can follow this example to improve the dashboard: [https://democentral.learnquicksight.online/#Analysis-FeatureDemo-Highcharts-Visual](https://democentral.learnquicksight.online/#Analysis-FeatureDemo-Highcharts-Visual)

---

<div class="post-metadata">

**Author:** ![Brett](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/brett/32/36494_2.png) [@Brett](https://community.amazonquick.com/u/Brett)\
**Post date:** [May 7, 2025, 9:36pm UTC](https://community.amazonquick.com/t/dates-cannot-be-used-in-hightcharts-visuals/44912/5 "2025-05-07T21:36:56Z")

</div>

Hi @FMagrinelli,  
It’s been awhile since we last heard from you on this thread, did you have any additional questions regarding your initial post?

If we do not hear back within the next 3 business days, I’ll close out this topic.

Thank you!

---

<div class="post-metadata">

**Author:** ![Brett](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/brett/32/36494_2.png) [@Brett](https://community.amazonquick.com/u/Brett)\
**Post date:** [May 12, 2025, 2:32pm UTC](https://community.amazonquick.com/t/dates-cannot-be-used-in-hightcharts-visuals/44912/6 "2025-05-12T14:32:52Z")

</div>

Hi @FMagrinelli,  
Since we have not heard back, I’ll go ahead and close out this topic. However, if you have any additional questions, feel free to create a new post in the community and link this discussion for relevant information if needed.

Thank you
