Skip to content

Test usage of highcharts moxie wrapper 1.6 with highmaps. See what is possible to do/use.

Notifications You must be signed in to change notification settings

mycom-int/gwthighmaps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 

Repository files navigation

gwthighmaps

Test usage of highcharts moxie wrapper 1.6 with highmaps 1.0.0-beta. See what is possible to do/use.

What we had to implement

  • New Class extending BaseChart to define the "Map" type.
  • Use Moxie wrapper to set options manually on chart
  • Loader to be able to load a map

What it looks like

map

The code

Loader

We created a Loader interface. Its role is to provide the map and the data to the Highmaps library.

public interface Loader
{
   public void init();

   public JSONObject getMap();

   @CheckForNull
   public JSONObject getMapLine();

   @CheckForNull
   public JSONObject getMapData();
}

We have 2 implementations. Of course for a "real" application we would probably have to create a web service to return the map and associated data. But here, we only created client loaders (meaning there is no call to the backend to load a map).

Based on native methods that will set javascript variables directly into the document

Based on GWT ClientBundle to load a json file containing the data and transforming it to a JSONObject.

Map chart

The Map.java class

 public class Map extends BaseChart<Map>
 {
 
    @Override
    protected String getChartTypeName()
    {
       return "Map";
    }
 
 }

About

Test usage of highcharts moxie wrapper 1.6 with highmaps. See what is possible to do/use.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages