Options for customise settings of the StatusBar

Posted by: davide.vago on 23 January 2020, 1:01 am EST

    • Post Options:
    • Link

    Posted 23 January 2020, 1:01 am EST

    Good morning/afternoon.

    I just received a new requirement about the customisation of the status bar (ref. https://www.grapecity.com/spreadjs/docs/v13/online/SpreadJS~GC.Spread.Sheets.StatusBar.StatusBar.html)

    In particular,

    • I would like to add min/max calculations as initial set up (along with the current count, sum )
    • Add limits to the zoom slider in order to avoid the sheet to be un-zoomable/zoomable too much.

    Does the StatusBar capable to receive custom config? If so, do you have any example for this case?

    Looking forward to hear from you.

  • Posted 23 January 2020, 6:29 pm EST

    Hi Davide,

    We could easily modify the status bar according to our requirements. To achieve the required functionality, we just need to select the required StatusItem and set the values, please refer to the following code snippet and the sample demonstrating the same:

    statusBar.get("min").visible = true;
    statusBar.get("max").visible = true;
    statusBar.get("zoomSlider").min = 80;
    statusBar.get("zoomSlider").max = 150;
    statusBar.update();
    

    https://codesandbox.io/s/spread-js-starter-0ijvw

    Further, if you need to add some your own custom status bar elements, then you may refer to the following sample:

    https://www.grapecity.com/spreadjs/demos/features/status-bar/custom-status-bar/purejs

    Regards

    Sharad

  • Posted 23 January 2020, 11:09 pm EST

    Thanks Sharad,

    This solutions works pretty fine, would be good to explicitly list all these options (I can’t find the available items list therefore it’s quite complex to discover the names of the items e.g. “zoomSlider”

  • Posted 26 January 2020, 3:55 pm EST

    Hi Davide,

    Thank you for your suggestion. I’ve created an enhancement request to request to update the docs. The internal tracking ID for the issue is SJS-3276.

    Regards

  • Posted 23 February 2020, 4:58 pm EST

    Hi Davide,

    The dev team has informed us that the options for default status bar items are not customizable and private which is why these options are documented.

    So, to change the min/max of the zoom slider, dev team has recommended implementing a zoom slider by yourself and remove the built-in slider.

    Regards

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels