amelia
04-01-2022ETL
Month Name in Order for Column Chart
Hi Sisense Community - I would like to change the numbers in the column chart to the month names (e.g 1 should be 'January', 2 should be 'February', and so on...)
The examples I found online only manage to change the labels in the x-axis from numbers to the month names, would anyone know what script I should use to change the labels in the column chart below?
amelia ,
Please try below script. Update the variable newItemMapping with number and month name
newItemMapping = { '1':'Jan', '2':'Feb', '3':'Mar' } widget.on("queryend", function(se, ev){ $.each(ev.rawResult.values, function(index, value){ if(newItemMapping[value[0].text] != undefined) { value[0].data = newItemMapping[value[0].data] value[0].text = newItemMapping[value[0].text] } }) })
-Hari