Menu

How do you style the "navigator" in highstock charts

Adam Hamel
2012-05-05
2012-05-29
  • Adam Hamel

    Adam Hamel - 2012-05-05

    The highstock api has something called "navigator" which allows you to control the zoom navigation on highstock charts. I don't see this as a setable property on the HighStock class?

     
  • Jeff Myers

    Jeff Myers - 2012-05-07

    Hi Adam,

    Unfortunately the GWT Highcharts library does not have wrappers created for the navigator API yet. But this does not prevent you from styling the navigator manually using the setOption() method:

    chart.setOption("/navigator/xAxis/labels/enabled", false);
    chart.setOption("/navigator/yAxis/min", 0);
    chart.setOption("/navigator/outlineColor", "#bbbbbb");

    Hope this helps,
    - Jeff

     
  • Dries Demeurisse

    Hi, I also need to be able to configure the navigator object. While the above solution works, it's not that developer friendly: possibility of typo's, cannot reuse code etc.
    To make it reusable I would have to subclass the Stockchart class to provide a getNavigator() method and so on. However doing this, doesn't seem right and the XAxis class cannot be instantiated, which implies I'd have to copy/paste or rewrite it as needed.
    Are you planning to do this for next release? And when would that be?

    Thanks

     

    Last edit: Dries Demeurisse 2012-05-08
  • Shawn Quinn

    Shawn Quinn - 2012-05-29

    FYI - Until this is part of the core GWT Highcharts API (just let me know if anyone would like to contribute this!) I believe you should be able to follow a pattern similar to what is noted for the "Button" configuration options in the following post to setup something similar for the "Navigator" object.

    https://sourceforge.net/p/gwt-highcharts/discussion/general/thread/6950cbd3/

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.