cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Order Months in Column chart by logical order

amelia
8 - Cloud Apps
8 - Cloud Apps

Hi Sisense community, I would like to order the months in my column chart according to the logical order, but right now it's mainly showing alphabetical order. Would anyone be able to assist on this? Ideally I would like to achieve it on the frontend without any change on EC, but open to any solution ๐Ÿ™‚

1 ACCEPTED SOLUTION

harikm007
12 - Data Integration
12 - Data Integration

@amelia ,

Try this script - https://www.binextlevel.com/post/sort-bar-columns-breakby-manually

Here, update the list 'breakby' with list of months in order

breakby = ['West', 'Midwest', 'South', 'Northeast', 'Unknown']
widget.on('processresult',function(se,ev){
	ev.result.series.sort(function(a,b){
		if (breakby.indexOf(a.name) < breakby.indexOf(b.name)) {
			return -1
		}
		else if (breakby.indexOf(a.name)>breakby.indexOf(b.name)) {
			return 1
		}
		return 0;
	});
})

-Hari

 

View solution in original post

2 REPLIES 2

harikm007
12 - Data Integration
12 - Data Integration

@amelia ,

Try this script - https://www.binextlevel.com/post/sort-bar-columns-breakby-manually

Here, update the list 'breakby' with list of months in order

breakby = ['West', 'Midwest', 'South', 'Northeast', 'Unknown']
widget.on('processresult',function(se,ev){
	ev.result.series.sort(function(a,b){
		if (breakby.indexOf(a.name) < breakby.indexOf(b.name)) {
			return -1
		}
		else if (breakby.indexOf(a.name)>breakby.indexOf(b.name)) {
			return 1
		}
		return 0;
	});
})

-Hari

 

That worked, thank you !

 

Voice of Customer
Impact Business Intelligence (BI) and Analytics Market Research

Click Here & Complete Dresner's Wisdom of Crowdsยฎ Market Study Survey Today!

Community Toolbox

Recommended quick links to assist you in optimizing your community experience:

Need additional support?:

Community Support Request

Don't miss out:

Earn a BETA Launch Challenge Badge!