Download: Order Legend by Weekday
Please see the attached plugin (README file contents below).
The following instructions and script will show you how to sort a graph legend
based on the day of the week, instead of the available Ascending/Descending
options that Sisense provides.
# Elasticube Set-up
First make sure that you have set-up the Elasticube to contain a custom field
to represent the day of the week. This should be created in the format of:
DayOfWeek + ' ' + DayName
This can be completed in the Sisense Elasticube designer by using the following
Get the DayOfWeek (which outputs an integer representation between 1 - 7) and
convert it to a String to allow concatenation with the rest of the expression
Add a space inbetween to enable the script to work properly
' ' +
Add the DayName (string) based on the DayOfWeek
Once you have set-up and built the Elasticube, build your widget and paste the
following code into the widget script editor:
edit: added link to plugin
Please sign in to leave a comment.