A map on a dashboard allows us to visually identify how different regions are doing using a picture instead of a table or chart. With alerts on the map, we can provide even more value. For example, look at the following screenshot. We can see that different regions of the map can be colored differently depending on their value. This allows users to identify at a glance whether a region is doing well or poorly.
Insert a Canadian map object into the canvas and bind data to the map. We will use the same example from the Using maps to select data of an area or country recipe in Chapter 3, From a Static to an Interactive Dashboard.
In this recipe, we show how to set up alerting for a map component. The way we set it up is pretty standard from steps 2 through 5. Once the alerting mechanism is set up, each province in the map will have its value associated with the alert threshold that we set up in step 1. The province will be colored red if the sales value is less than the yellow threshold. The province will be colored yellow if the sales value is greater than or equal to the yellow threshold but less than the green threshold. The province will be colored green if the sales value is greater than or equal to the green threshold.
In our example, we assumed that all the provinces have the same threshold. There is also a way to set up alerts so that each province can have its own threshold. The next recipe, Displaying alerts of different thresholds on a map, will explain how to accomplish this. We can also use the CMaps plugin found in the Integrating Google Maps with the CMaps plugin recipe in Chapter 10, Top Third-party Add-ons, to accomplish the same task, but in a more flexible fashion.