With the latest release of InfoCaptor Enterprise Dashboards, you can now easily build visualizations using vector maps. Without the maps, you would usually view the countries or states within the country either on a bar chart or line chart. But now you can plot them on the geographic map with simple drag and drop.
A separate collection of maps is included in the left panel where you can simply drag to your dashboard. There are around 28 maps included in this release.
So if we drag say the “World Map” to the dashboard then it shows up like below
As you see, the default map is seeded with some data and it automatically does the color mapping to build the so called “cloropleth” visualization.
Right click on the map and select “Data Source”
How to provide data for the map visual?
You can see that the default data is simple JSON format
The JSON contains the two letter country code and the value corresponding to it. You can simply edit the values right here and it will update the map accordingly.
So this is static way of providing data, what if your data is stored in a database table?
That is also doable and quite easy. Just provide the SQL query that has the first column as the country code and second containing the value. Make sure your table contains the two letter country code. If you just store the country names then you will have to add a lookup table and join in the SQL query so that only the country code and the value is returned.
To illustrate sourcing from a database table, we uploaded the same data into InfoCaptor Personal Cloud Data-Warehouse and this is how the two columns appear in a grid
Now, we change the data source for the world map and replace static data with the SQL query
We changed the connection to “Personal Cloud” and replaced the static JSON data array with our SQL query. In the SQL, we make sure the country code is the first column.
And it instantly shows you the modified map. Now when you hover on the map it shows the tooltip with the “gdp” column name
How to change the colors
Changing Map colors is also a snap. To build the cloropleth, we need two colors to scale the values and spread them in different color buckets. The two colors are provided by the fill color and the line color on the top tool bar.
Let us try with different color combinations
We changed the first color to black and the second color to Green
In the below, we set the first color to red and second to green
How to Change the title of the map
Simply double click on the title and it will pop with a text box, edit the title and click ok
How to change the size of the map
The map is rendered as a SVG image and to provide interactivity it is layered above the parent widget. So to resize the map, the mouse cursor responds much better around the top title region.
You may use the mouse around the top region (indicated by the red border) to resize the map
You can also add multiple maps on the same dashboard with varying sizes. There is no limit on this.
How to drill down from map to some detail information
By default the map is enabled with drill down. So when you click on any region, the region code, region name and the value is passed to the child widgets via the map’s channel. Rest of the drilling behaviour is very same as other widgets
With the above information you should be ready to get started with building your first cloropleth with infocaptor.
Here are the list of maps provided in this release