danieljordan
01-12-2023Data Storage
Dynamically Change Month order on X-Axis
Hello,
The end-user has requested the following, but I am having trouble adjusting the x-axis appropriately.
I have a line graph showing activity over the "Trailing 12 Months" (TTM). It is curren...
- 01-13-2023
With some help from the old forums:
Set the date format on your x-axis to MMM-YYYY (Feb 1970 is the example generally used). This will ensure proper ordering of the years as well as the months.
Then use the following widget script to hide the year number:widget.on('render', function(widget,args){ widget.queryResult.xAxis.labels.formatter = function () { strArr = this.value.split(' ') return strArr[0] } })
Best of luck!
Iris