Highchart Visuals - Waterfall

I am trying to create net hire and termination using new highchart visual . Visual type is waterfall. I have month_end_date as group by field and net movement( custom calculation which is hire - termination) in value section. Following is the code I am using to create waterfall chart. Net movement by month_end_date.

“chart”: {
“type”: “waterfall”
},
“title”: {
“text”: “Highcharts Waterfall”
},
“xAxis”: {
“type”: “month_end_date”,
“categories”: [“getColumn”, 0]
},
“yAxis”: {
“title”: {
“text”: “Net Movement”
}
},
“legend”: {
“enabled”: false
},
“tooltip”: {
“pointFormat”: “{point.y:,.2f}”
},
“series”: [
{
“data”: [“getColumnFromValue”, 0]
}
]
}

Wanted to fix the date format on x -axis. Attaching how it looks now. Any idea how to fix the format ? Thank you

Hi @somyav

you can use: Amazon QuickSight expressions - Amazon QuickSight like this:

 "xAxis": {
		"categories": ["getColumn", 0],
		"labels": {
		"formatter": ["formatValue", "value", 0]
		}
	}

Edited code:

{
    "chart": {
        "type": "waterfall"
    },
    "title": {
        "text": "Highcharts Waterfall"
    },
    "xAxis": {
        "type": "month_end_date",
        "labels": {
            "formatter": [
                "formatValue",
                "value",
                0
            ]
        },
        "categories": [
            "getColumn",
            0
        ]
    },
    "yAxis": {
        "title": {
            "text": "Net Movement"
        }
    },
    "legend": {
        "enabled": false
    },
    "tooltip": {
        "pointFormat": "{point.y:,.2f}"
    },
    "series": [
        {
            "data": [
                "getColumnFromValue",
                0
            ]
        }
    ]
}
1 Like

Hi @somyav ,

welcome to the community :tada:

My workaround is to use the extract function month and year (or what you need) and concat the strings. When you concat them in yyyy-mm format, the sorting is automatically correct.

If this helped you, please mark my answer as solution. That helpes the community to find solutions faster.

Best regards,
Nico