Reconfigure Bar Chart Scroller

Comments

7 comments

  • Avatar
    Barry Gaffey (Edited )

    Hi,

    We've ran into an issue after upgrading to Sisense 7.4.x where that scroller (called the navigator) wouldn't appear on smaller screens whereas on previous versions it would. That issue was reported by Sisense as fixed in 7.4.4

     

    Anyways, maybe you might find this widget script useful in forcing that slider to appear when it does not:

    widget.on('beforeviewloaded', function ( ev, args ) {
    args.options.navigator.enabled = true;
    });
    2
    Comment actions Permalink
  • Avatar
    Elliott Herz

    Hey Barry,

    Thank you for posting! This is very useful.

    Best, Elliott

    1
    Comment actions Permalink
  • Avatar
    Barry Gaffey

    Baptiste Garro

    Maybe this script will help you?

    widget.on('render', function(scope, args) {
    args.widget.options.previousScrollerLocation.min = 0;
    args.widget.options.previousScrollerLocation.max = 25;
    });
    1
    Comment actions Permalink
  • Avatar
    Baptiste Garro

    We have similar issue. Interested in this one. 

    0
    Comment actions Permalink
  • Avatar
    Baptiste Garro

    Hi Barry, 

    Do you have a script to fix the size of the scroller in advance? 
    Depending on the dataset (number of categories), the scroller will be on either few, either hundreds or all the data. 
    When to wide open, it's impossible to read anything. Would it be possible to get a default open position for the slider (like 10 or 15 first items)? 

    Best

    0
    Comment actions Permalink
  • Avatar
    Mikael Hovhannisyan (Edited )

    Hi Barry, 

    The script directly above works perfectly for bar charts which already have the slider. The other script that you've posted works perfectly for bar charts that do not have the slider by default. Is there a way to consolidate the two? So that every chart, no matter if it has the slider appear by default or not, will now have the slider set to the first [x] items, unless there are fewer than [x] items.

    0
    Comment actions Permalink
  • Avatar
    Yohai Kedem (Edited )

    Hi Mikael,

    Adding the following line will allow you to set the max [x] items you want to appear by default.

    Consolidated, will look like this:

    widget.on('beforeviewloaded', function ( ev, args ) {
    args.options.navigator.enabled = true;
    args.options.xAxis.max=10;

    });

    Keep in mind that the value is indexed, so if you want 5 items, change it to 4, 10 to 9, and so on.

    0
    Comment actions Permalink

Please sign in to leave a comment.