Does anyone know if there is a way to customize the labels on a graph. In creating a graph that shows data across multiple fiscal years. The data looks correct but I want to update the labels to match my organizations labeling standards instead of just a year. In the below image I want to change the numbers highlighted in red. I cant find anything on my own. Any help is appreciated. Thanks!
Hey - if you double click on the name of the text in the value field, you can edit it.
So that works if each of my columns is being tracked as a separate value. Which I could probably do. But what I'm doing with mine is my category is Fiscal Year and its breaking out each column automatically. If I rename the Fiscal Year Category it doesn't actually change the name of the columns. I was hoping that there was a way to change each of the labels without needing to create an individual category for each.
Hi Zachary,
There isn't native functionality for relabeling the values within a data field. So if you say, want 2022 to appear as FY22, Analytics doesn't currently support doing that in the Category or Break by field and instead would require distinct values for each FY as you describe in your most recent comment.
That said, it is possible to add custom scripting "behind" a widget to impact how the widget is ultimately rendered.
How to edit the script.
widget.on('render', function(widget,args){ widget.queryResult.xAxis = { categories: widget.queryResult.xAxis.categories, //Runs every value in the category through this function labels: { formatter: function () { return 'FY' + this.value.substr(2) }, } }})