The Chart Label Order Changer



  • Avatar
    Gary Connolly

    I appreciate the effort to help, however I don't understand the logic of the config file, can you explain this using the Status example (The example cube and dashboard are corrupt to me).

    You have a field in your cube source file call STATUS with the record types  'Fail','Medium','AboveAverage','High''Amazing'

    You then create a custom field lets say called STATUS_SORT with converts the STATUS records to CASE '01Fail','02Medium','03AboveAverage','04High','05Amazing'


    In this case I don't understand what to put in the config file - do I put in 'var dimensionsToChange = ["[Commerce.Status]"]', and then put the STATUS_SORT in the Rows value of the chart widget? - how does that create a relationship between STATUS and STATUS SORT 

  • Avatar
    Gary Connolly

    Just checking am I completely missing the point which is that the field I add to the Widget is STATUS_SORT, and that in the config I add 'var dimensionsToChange = ["[Commerce.STATUS_SORT]"]', ... because the whole point is that it's not the order sort that the script does, as what the script actually does is remove the first 2 characters of the STATUS_SORT Field, i.e. the script removes the first 2 characters of any field in the chart!

  • Avatar
    Gary Connolly

    I got this working, realise now that what is does is remove the first 2 characters ... different than I expected however it will solve my issues,  great thanks

  • Avatar
    Tom McDonald

    Can you show an example of the correct format to add multiple sets of dimensions to be changed to var dimensionsToChange?  

    var dimensionsToChange = ["[Commerce.DayofWeek]","[Commerce.MonthName]"];
  • Avatar

    There is a small bug when you use the custom fields in break by - 

    The sort is working, but the leading numbers not gone (01,02,03...)

  • Avatar
    test user

    I am agree with Gilad, Sorting is working but the prefix is also showing which should not be shown.

    Is it bug or we are still missing something.

    /Ganesh Dixit

  • Avatar
    Michelle Mangion (Edited )

    I also have followed the instructions to the exact line but it is not working . I still get the 01Januaru, 02February etc.


    P.S.  I have downloaded the latest version of the plugin and it is working fine for me now.

  • Avatar
    Oxana Noa Umansky

    Thanks for letting us know Michelle!

  • Avatar
    José Manuel Flores Medina

    thank you very much everyone for your contributions

  • Avatar
    Kenneth Clebak

    I'm also seeing the digits not being removed. I suspect it has to do with my EC not using a real table - I picked the first table in my database, and then did custom SQL query (the only way I can put in custom SQL, as far as I know) so my data isn't truly coming from that table, it's like a placeholder. In the EC Manager, the table shows as "dbo.AF00100".  I've tried putting in various versions of the table and column names into the config files. Here's my config:

    var dimensionsToChange = ["[AF00100.MonthSorted]","[dbo.AF00100.MonthSorted]","[MonthSorted]","[GL00100.MonthSorted]","[TMPResults.MonthSorted]"];

    Any help would be greatly appreciated!

  • Avatar
    Carly Smallwood


    Is there any way this plugin could be extended to work for Pivot Tables as well?


    Carly Smallwood

  • Avatar
    Jon Saunders

    Works great - exactly what was needed!  Thanks for your work on this.

    Jon Saunders

  • Avatar
    Air Canada Air Canada

    Have tried, leading number still there, has anyone get leading number removed? any example?


  • Avatar
    Ravid Paldi

    Yuming, from our experience that happens a lot.

    Few out of the box troubleshooting suggestions that you can try that usually works for our clients: 

    1) If you are using the plugin on multiple widgets, try replacing the order of fields in the config file.

    For example, replace this

    "var dimensionsToChange = ["[avocado.csv.PriceRange]","[avocado.csv.VolumeRange]"];"


    "var dimensionsToChange = ["[avocado.csv.VolumeRange]","[avocado.csv.PriceRange]"];

    2) Try upgrading/downgrading to a slightly different version of the Sisense server. 

    3) Try completly removeing the widget, and remove rom the congiguration. Reset your IIS and re-add the widget. 


    Ping me if you need further assistance



  • Avatar
    Percy Chiang

    Is there any way to work for Pivot Tables as well?


  • Avatar
    Brian Wilson

    Hi Darrell,

    For pivots, what I've used is creating an order table, adding that order as a row in the pivot and then making the width of the row 0.

    So, in the cube, I either do a lookup or a join to get this setup:

    Month | Order
    Jan | 1
    Feb | 2
    Mar | 3
    Apr | 4
    Dec | 12

    And then in the pivot, I add ORDER to the rows and then MONTH to the rows

    And then in the script, I use this

    widget.on("ready", function(widget, args) {

    var cat_column = "[fidx=0]";

    //hide first column
    $('[id="' + widget.oid+ '"]').find(cat_column).css("width", "0px");
  • Avatar
    Percy Chiang

    Thank you

  • Avatar
    Janet Erdman

    Does this work on Pie Charts?

  • Avatar
    Trent McEwan

    We are still having issues with the leading numbers not being removed.  We have tried everything listed above but nothing seems to work.  The sorting part works great.  We use an imported Excel file to handle all of our date dimensions and added a custom column as suggested to that import.  All works but the removal of the leading characters in the x-axis label.


    Any suggestions would be appreciated.

Please sign in to leave a comment.