Class ChoroplethChartWidget

  • 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<ChoroplethDataset>

    public class ChoroplethChartWidget
    extends AbstractChartWidget<ChoroplethChart>
    implements IsDatasetCreator<ChoroplethDataset>
    CHOROPLETH chart GWT WIDGET implementation.
    A choropleth chart is used to render maps with the area filled according to some numerical value.
    Author:
    Andrea "Stock" Stocchero
    • Constructor Detail

      • ChoroplethChartWidget

        public ChoroplethChartWidget()
        Builds the object.
      • ChoroplethChartWidget

        protected ChoroplethChartWidget​(ChoroplethChart 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 ChoroplethOptions getOptions()
        Description copied from interface: IsChart
        Returns the options of chart.
        Specified by:
        getOptions in interface IsChart
        Returns:
        the options of chart.
      • 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 point
        longitude - 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
      • 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 longitude
        y - 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