Class BubbleMapChartWidget
- java.lang.Object
-
- com.google.gwt.user.client.ui.UIObject
-
- com.google.gwt.user.client.ui.Widget
-
- com.google.gwt.user.client.ui.Panel
-
- com.google.gwt.user.client.ui.SimplePanel
-
- org.pepstock.charba.client.gwt.widgets.AbstractChartWidget<BubbleMapChart>
-
- org.pepstock.charba.client.gwt.widgets.BubbleMapChartWidget
-
- All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers
,com.google.gwt.event.shared.HasHandlers
,com.google.gwt.user.client.EventListener
,com.google.gwt.user.client.ui.AcceptsOneWidget
,com.google.gwt.user.client.ui.HasOneWidget
,com.google.gwt.user.client.ui.HasVisibility
,com.google.gwt.user.client.ui.HasWidgets
,com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
,com.google.gwt.user.client.ui.IsWidget
,Iterable<com.google.gwt.user.client.ui.Widget>
,IsChart
,IsDatasetCreator<BubbleMapDataset>
public class BubbleMapChartWidget extends AbstractChartWidget<BubbleMapChart> implements IsDatasetCreator<BubbleMapDataset>
BUBBLEMAP chart GWT WIDGET implementation.
A Bubble Map, as known as Proportional Symbol is used to render maps with dots that are scaled according to some numerical value.
It is based on a regular bubble chart where the positioning is done using latitude and longitude to create a legend for the different radi.- Author:
- Andrea "Stock" Stocchero
-
-
Constructor Summary
Constructors Modifier Constructor Description BubbleMapChartWidget()
Builds the object.protected
BubbleMapChartWidget(BubbleMapChart extendedChart)
Builds the chart.
This is must be extended for controller which are based on this chart.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description BubbleMapOptions
getOptions()
Returns the options of chart.BubbleMapDataset
newDataset(boolean hidden)
Creates a new dataset related to chart type.CoordinatesPoint
projection(double latitude, double longitude)
Translates latitude and longitude in coordinates of the canvas where the chart is drawn.CoordinatesPoint
projection(Coordinates coordinates)
Translates latitude and longitude in coordinates of the canvas where the chart is drawn.Coordinates
projectionInvert(double x, double y)
Translates X and Y coordinates of the canvas where the chart is drawn in latitude and longitude.Coordinates
projectionInvert(CoordinatesPoint point)
Translates X and Y coordinates of the canvas where the chart is drawn in latitude and longitude.static void
register()
Registers the BUBBLEMAP controller in CHART.JS.-
Methods inherited from class org.pepstock.charba.client.gwt.widgets.AbstractChartWidget
addHandler, checkAxes, checkDatasets, createAndSetTimer, destroy, draw, fireEvent, getActiveElements, getBaseType, getCanvas, getChart, getChartElement, getData, getDatasetAtEvent, getDatasetItem, getDatasetReferenceFactory, getDefaultChartOptions, getDrawCount, getElementAtEvent, getElementAtEvent, getElementsAtEvent, getElementsAtEvent, getHandlerCount, getId, getInitialCursor, getNode, getPlugins, getSortedVisibleDatasetItems, getTimer, getTooltipActiveElements, getType, getVisibleDatasetCount, getWholeOptions, hide, hide, isChartAttached, isDatasetVisible, isDataVisible, isDestroyOnDetach, isDrawOnAttach, isEventHandled, isInitialized, isPluginEnabled, reconfigure, reconfigure, reconfigure, removeCanvasPreventDefault, render, reset, resetActiveElements, resetTooltipActiveElements, resize, resize, setActiveElements, setActiveElements, setDatasetVisibility, setDestroyOnDetach, setDrawOnAttach, setTooltipActiveElements, setTooltipActiveElements, setTooltipActiveElements, setTooltipActiveElements, show, show, stop, toBase64Image, toggleDataVisibility, update, update, update
-
Methods inherited from class com.google.gwt.user.client.ui.SimplePanel
add, getContainerElement, getWidget, iterator, remove, setWidget, setWidget
-
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, adopt, clear, doAttachChildren, doDetachChildren, orphan, remove
-
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
-
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.pepstock.charba.client.IsChart
clear, toBase64Image, toBase64Image, toBase64Image
-
Methods inherited from interface org.pepstock.charba.client.IsDatasetCreator
newDataset
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
BubbleMapChartWidget
public BubbleMapChartWidget()
Builds the object.
-
BubbleMapChartWidget
protected BubbleMapChartWidget(BubbleMapChart extendedChart)
Builds the chart.
This is must be extended for controller which are based on this chart.- Parameters:
extendedChart
- new chart
-
-
Method Detail
-
getOptions
public BubbleMapOptions getOptions()
Description copied from interface:IsChart
Returns the options of chart.- Specified by:
getOptions
in interfaceIsChart
- Returns:
- the options of chart.
-
newDataset
public BubbleMapDataset newDataset(boolean hidden)
Description copied from interface:IsDatasetCreator
Creates a new dataset related to chart type.- Specified by:
newDataset
in interfaceIsDatasetCreator<BubbleMapDataset>
- Parameters:
hidden
- iftrue
, it will be initially hidden.- Returns:
- a new dataset related to chart type.
-
projectionInvert
public final Coordinates projectionInvert(double x, double y)
Translates X and Y coordinates of the canvas where the chart is drawn in latitude and longitude.- Parameters:
x
- coordinate X of the canvas to translate in longitudey
- coordinate Y of the canvas to translate in latitude- Returns:
- a
Coordinates
with the latitude and longitude, related to the passed X and Y
-
projectionInvert
public final Coordinates projectionInvert(CoordinatesPoint point)
Translates X and Y coordinates of the canvas where the chart is drawn in latitude and longitude.- Parameters:
point
- contains X and Y coordinates to translate- Returns:
- a
Coordinates
with the latitude and longitude, related to the passed X and Y
-
projection
public final CoordinatesPoint projection(double latitude, double longitude)
Translates latitude and longitude in coordinates of the canvas where the chart is drawn.- Parameters:
latitude
- latitude to use to get the Y pointlongitude
- longitude to use to get the X point- Returns:
- a
CoordinatesPoint
with X and Y, related to the passed latitude and longitude
-
projection
public final CoordinatesPoint projection(Coordinates coordinates)
Translates latitude and longitude in coordinates of the canvas where the chart is drawn.- Parameters:
coordinates
- contains latitude and longitude to translate- Returns:
- a
CoordinatesPoint
with X and Y, related to the passed latitude and longitude
-
register
public static void register()
Registers the BUBBLEMAP controller in CHART.JS.
-
-