Customizing Your Map

Now that we know how to create a simple map (hyperlinks to the Simple Data Driven Map section) we will now look at customization of different map attributes. Below is a list of basic customizations possible for maps:

Customizing label display text

It is also possible to use a completely customizable text to display for each specific entity. In the chart below we configure the data label of each continent as sparse, moderate or dense based on the population density.

FusionCharts will load here..

The attribute used to define the display text for labels is as follows:

{"chart":{"caption":"Global Population Density","showBorder":"1","borderThickness":"3","theme":"fint","formatNumberScale":"0"},"colorrange":{"color":[{"minvalue":"0","maxvalue":"10","code":"#A9FF8D","displayValue":"Sparse"},{"minvalue":"10","maxvalue":"35","code":"#D0DFA3","displayValue":"Moderate"},{"minvalue":"35","maxvalue":"100","code":"#91AF64","displayValue":"Dense"}]},"data":[{"id":"NA","value":"22.1","showLabel":"1","displayValue":"Moderate"},{"id":"SA","value":"22.0","showLabel":"1","displayValue":"Moderate"},{"id":"AS","value":"95.0","showLabel":"1","displayValue":"Dense"},{"id":"EU","value":"72.5","showLabel":"1","displayValue":"Dense"},{"id":"AF","value":"33.7","showLabel":"1","displayValue":"Moderate"},{"id":"AU","value":"3.2","showLabel":"1","displayValue":"Sparse"}]}

Customising fonts

You can customize font-related properties for each entity. In this example the font is set to Helvetica and the size of the label name is proportional to the value of each entity.

Using short names in tooltips

Tooltips in maps show the full name of the entity along with the value by default. The tooltip can be configured to show only the short name. In the chart below, we have set the labels to show the entity full names and the tooltip shows the short name.

FusionCharts will load here..

The attribute used to customize tooltips is explained here

Attribute Name

Description

useSNameInToolTip

Set this to 1 to display the entity short name in tooltip. Set this to 0 (default) to show entity full name instead.

Handling null entities

It is likely that all entities within a map don’t have an associated value (or have a null value). Such entities can be customized by modifying the transparency, color and hover effects. The chart below shows a sales tracker across continents with some entities having a null value.

FusionCharts will load here..

The attributes used to configure null entities are mentioned below:

Attribute Name

Description

nullEntityColor

Specifies the color for null value entities.

nullEntityAlpha

Specifies the transparency of the entity. Value can be set between 0 (completely transparent) to 100 (opaque).

hoverOnNull

Set this to 1 to enable hover effects for null entities, or to 0 (default?) otherwise.