org.moxieapps.gwt.highcharts.client
Class Navigator

java.lang.Object
  extended by org.moxieapps.gwt.highcharts.client.Configurable<Navigator>
      extended by org.moxieapps.gwt.highcharts.client.Navigator

public class Navigator
extends Configurable<Navigator>

The navigator is a small series below the main series, displaying a view of the entire data set. It provides tools to zoom in and out on parts of the data as well as panning across the dataset. Applies only to StockChart.

Since:
1.5.0
Author:
myersj@gmail.com (Jeff Myers)

Method Summary
 Series getSeries()
          Access the navigator series, to allow for customization via the Series.setPlotOptions(org.moxieapps.gwt.highcharts.client.plotOptions.PlotOptions) method.
 XAxis getXAxis()
          Access the navigator X axis, to allow for customization.
 YAxis getYAxis()
          Access the navigator Y axis, to allow for customization.
 Navigator setAdaptToUpdatedData(boolean adaptToUpdatedData)
          When this option is true, the navigator will redraw and reposition when data is updated in the main chart.
 Navigator setBaseSeries(Number seriesIndex)
          Specify the index of the base series for the navigator.
 Navigator setBaseSeries(String seriesId)
          Specify the ID of the base series for the navigator.
 Navigator setEnabled(boolean enabled)
          Enable or disable the navigator.
 Navigator setHandlesBackgroundColor(String color)
          Set the background color of the navigator handles.
 Navigator setHandlesBorderColor(String color)
          Set the border color of the navigator handles.
 Navigator setHeight(Number height)
          Set the height of the navigator.
 Navigator setMargin(Number margin)
          Set the distance from the nearest element, the X axis or X axis labels.
 Navigator setMaskFill(String maskFillColor)
          Set the color mask covering the areas of the navigator series that are currently not visible in the main series.
 Navigator setOutlineColor(String outlineColor)
          Set the color of the line marking the currently zoomed area in the navigator.
 Navigator setOutlineWidth(Number outlineWidth)
          Set the width of the line marking the currently zoomed area in the navigator.
 
Methods inherited from class org.moxieapps.gwt.highcharts.client.Configurable
getOptions, setOption
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getSeries

public Series getSeries()
Access the navigator series, to allow for customization via the Series.setPlotOptions(org.moxieapps.gwt.highcharts.client.plotOptions.PlotOptions) method.

 stockChart.getNavigator().getSeries()
   .setType(Series.Type.LINE)
   .setPlotOptions(new LinePlotOptions()
      .setColor("#0000ff")
      .setLineWidth(2));
 

Returns:
the navigator series.

getXAxis

public XAxis getXAxis()
Access the navigator X axis, to allow for customization.

 stockChart.getNavigator().getXAxis()
    .setOpposite(true)
    .setTickWidth(1)
    .setTickColor("#eeeeee");
 

Returns:
the navigator X axis.

getYAxis

public YAxis getYAxis()
Access the navigator Y axis, to allow for customization.

 stockChart.getNavigator().getYAxis()
    .setOpposite(true)
    .setTickWidth(1)
    .setTickColor("#eeeeee");
 

Returns:
the navigator Y axis.

setAdaptToUpdatedData

public Navigator setAdaptToUpdatedData(boolean adaptToUpdatedData)
When this option is true, the navigator will redraw and reposition when data is updated in the main chart. When loading data asynchronously from the server depending on zoomed range, this option must be set to false in order to prevent looping. Defaults to true.

Parameters:
adaptToUpdatedData - true to redraw and reposition on data update, false to disable.
Returns:
A reference to this Navigator instance for convenient method chaining.

setBaseSeries

public Navigator setBaseSeries(Number seriesIndex)
Specify the index of the base series for the navigator. The base series will be used to provide data for the navigator. Defaults to 0.

Parameters:
seriesIndex - index of the base series
Returns:
A reference to this Navigator instance for convenient method chaining.

setBaseSeries

public Navigator setBaseSeries(String seriesId)
Specify the ID of the base series for the navigator. The base series will be used to provide data for the navigator.

Parameters:
seriesId - ID of the base series
Returns:
A reference to this Navigator instance for convenient method chaining.

setEnabled

public Navigator setEnabled(boolean enabled)
Enable or disable the navigator. Defaults to true.

Parameters:
enabled - true to enable the range selector, false to disable.
Returns:
A reference to this Navigator instance for convenient method chaining.

setHandlesBackgroundColor

public Navigator setHandlesBackgroundColor(String color)
Set the background color of the navigator handles.

Parameters:
color - the background color to set
Returns:
A reference to this Navigator instance for convenient method chaining.

setHandlesBorderColor

public Navigator setHandlesBorderColor(String color)
Set the border color of the navigator handles.

Parameters:
color - the border color to set
Returns:
A reference to this Navigator instance for convenient method chaining.

setHeight

public Navigator setHeight(Number height)
Set the height of the navigator. Defaults to 40.

Parameters:
height - the height value to set (in pixels)
Returns:
A reference to this Navigator instance for convenient method chaining.

setMargin

public Navigator setMargin(Number margin)
Set the distance from the nearest element, the X axis or X axis labels. Defaults to 10.

Parameters:
margin - the margin distance value to set (in pixels)
Returns:
A reference to this Navigator instance for convenient method chaining.

setMaskFill

public Navigator setMaskFill(String maskFillColor)
Set the color mask covering the areas of the navigator series that are currently not visible in the main series. The default color is white with an opacity of 0.75 to see the series below. Defaults to "rgba(255, 255, 255, 0.75)"

Parameters:
maskFillColor - the color of the mask fill to set
Returns:
A reference to this Navigator instance for convenient method chaining.

setOutlineColor

public Navigator setOutlineColor(String outlineColor)
Set the color of the line marking the currently zoomed area in the navigator. Defaults to #444.

Parameters:
outlineColor - the outline color to set
Returns:
A reference to this Navigator instance for convenient method chaining.

setOutlineWidth

public Navigator setOutlineWidth(Number outlineWidth)
Set the width of the line marking the currently zoomed area in the navigator. Defaults to 2.

Parameters:
outlineWidth - the outlineWidth value to set (in pixels)
Returns:
A reference to this Navigator instance for convenient method chaining.


Copyright © 2015. All Rights Reserved.