Package org.pepstock.charba.client.geo
Class BubbleMapChart
- java.lang.Object
- 
- org.pepstock.charba.client.events.HandlerManager
- 
- org.pepstock.charba.client.AbstractChart
- 
- org.pepstock.charba.client.geo.BubbleMapChart
 
 
 
- 
- All Implemented Interfaces:
- HasAxes,- IsChart,- IsDatasetCreator<BubbleMapDataset>
 
 public final class BubbleMapChart extends AbstractChart 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
 
- 
- 
Field SummaryFields Modifier and Type Field Description static ControllerTypeCONTROLLER_TYPEBubbleMap controller type.static StringTYPEName of chart type "bubbleMap"- 
Fields inherited from class org.pepstock.charba.client.AbstractChartdatasetReferenceFactory
 
- 
 - 
Constructor SummaryConstructors Constructor Description BubbleMapChart()Builds the object.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidapplyConfiguration()Called before any drawing or reconfiguration in order that the chart which implements it can override optionsvoidcheckAxes(Axis... axes)Checks if axes, requested to be stored, are an acceptable type or amount.
 If a axis type or the amount of axes are not consistent for the chart, aIllegalArgumentExceptionwill be thrown.booleancheckAxis(Axis axis)Returnstrueif the axis can be managed by a this chart type.protected booleancheckDataset(Dataset dataset)Returnstrueif the dataset can be managed by a this chart type.protected intgetMaximumAxesCount()Returns the maximum amount of axes that the chart can manage.protected intgetMaximumDatasetsCount()Returns the maximum amount of datasets that the chart can manage.BubbleMapOptionsgetOptions()Returns the options of chart.BubbleMapDatasetnewDataset(boolean hidden)Creates a new dataset related to chart type.CoordinatesPointprojection(double latitude, double longitude)Translates latitude and longitude in coordinates of the canvas where the chart is drawn.CoordinatesPointprojection(Coordinates coordinates)Translates latitude and longitude in coordinates of the canvas where the chart is drawn.CoordinatesprojectionInvert(double x, double y)Translates X and Y coordinates of the canvas where the chart is drawn in latitude and longitude.CoordinatesprojectionInvert(CoordinatesPoint point)Translates X and Y coordinates of the canvas where the chart is drawn in latitude and longitude.static voidregister()Registers the BUBBLEMAP controller in CHART.JS.- 
Methods inherited from class org.pepstock.charba.client.AbstractChartaddHandler, checkDatasets, clear, createAndSetTimer, destroy, draw, getActiveElements, getBaseType, getCanvas, getChartElement, getData, getDatasetAtEvent, getDatasetItem, getDatasetReferenceFactory, getDefaultChartOptions, getDrawCount, getElementAtEvent, getElementAtEvent, getElementsAtEvent, getElementsAtEvent, getId, getInitialCursor, getNode, getPlugins, getSource, getTimer, getTooltipActiveElements, getType, getVisibleDatasetCount, getWholeOptions, hide, hide, isChartAttached, isDatasetVisible, isDataVisible, isDestroyOnDetach, isDrawOnAttach, isInitialized, onAttach, onDetach, 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 org.pepstock.charba.client.events.HandlerManagerfireEvent, getHandlerCount, isEventHandled
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.pepstock.charba.client.IsChartfireEvent, getHandlerCount, isEventHandled, toBase64Image, toBase64Image, toBase64Image
 - 
Methods inherited from interface org.pepstock.charba.client.IsDatasetCreatornewDataset
 
- 
 
- 
- 
- 
Field Detail- 
TYPEpublic static final String TYPE Name of chart type "bubbleMap"- See Also:
- Constant Field Values
 
 - 
CONTROLLER_TYPEpublic static final ControllerType CONTROLLER_TYPE BubbleMap controller type.
 
- 
 - 
Method Detail- 
getOptionspublic BubbleMapOptions getOptions() Description copied from interface:IsChartReturns the options of chart.- Returns:
- the options of chart.
 
 - 
newDatasetpublic BubbleMapDataset newDataset(boolean hidden) Description copied from interface:IsDatasetCreatorCreates a new dataset related to chart type.- Parameters:
- hidden- if- true, it will be initially hidden.
- Returns:
- a new dataset related to chart type.
 
 - 
checkDatasetprotected boolean checkDataset(Dataset dataset) Description copied from class:AbstractChartReturnstrueif the dataset can be managed by a this chart type.- Specified by:
- checkDatasetin class- AbstractChart
- Parameters:
- dataset- dataset to check
- Returns:
- trueif the dataset can be managed by a this chart type
 
 - 
checkAxispublic boolean checkAxis(Axis axis) Description copied from interface:HasAxesReturnstrueif the axis can be managed by a this chart type.- Parameters:
- axis- axis to check
- Returns:
- trueif the axis can be managed by a this chart type
 
 - 
checkAxespublic void checkAxes(Axis... axes) Description copied from interface:IsChartChecks if axes, requested to be stored, are an acceptable type or amount.
 If a axis type or the amount of axes are not consistent for the chart, aIllegalArgumentExceptionwill be thrown.- Specified by:
- checkAxesin interface- IsChart
- Overrides:
- checkAxesin class- AbstractChart
- Parameters:
- axes- list of axes to check.
 
 - 
registerpublic static void register() Registers the BUBBLEMAP controller in CHART.JS.
 - 
applyConfigurationprotected final void applyConfiguration() Description copied from class:AbstractChartCalled before any drawing or reconfiguration in order that the chart which implements it can override options- Overrides:
- applyConfigurationin class- AbstractChart
 
 - 
projectionpublic 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 point
- longitude- longitude to use to get the X point
- Returns:
- a CoordinatesPointwith X and Y, related to the passed latitude and longitude
 
 - 
projectionpublic 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 CoordinatesPointwith X and Y, related to the passed latitude and longitude
 
 - 
projectionInvertpublic 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 longitude
- y- coordinate Y of the canvas to translate in latitude
- Returns:
- a Coordinateswith the latitude and longitude, related to the passed X and Y
 
 - 
projectionInvertpublic 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 Coordinateswith the latitude and longitude, related to the passed X and Y
 
 - 
getMaximumDatasetsCountprotected final int getMaximumDatasetsCount() Description copied from class:AbstractChartReturns the maximum amount of datasets that the chart can manage.- Overrides:
- getMaximumDatasetsCountin class- AbstractChart
- Returns:
- the maximum amount of datasets that the chart can manage.
 
 - 
getMaximumAxesCountprotected final int getMaximumAxesCount() Description copied from class:AbstractChartReturns the maximum amount of axes that the chart can manage.- Overrides:
- getMaximumAxesCountin class- AbstractChart
- Returns:
- the maximum amount of axes that the chart can manage.
 
 
- 
 
-