Adding alerts to a column chart

When looking at a column chart, we might want to see which items are below or above a particular threshold. In this recipe, you will learn how to add alerts to a column chart. Our example will consist of a column chart with a list of regions and their sales. Each region column will be colored appropriately, depending on its sales value versus threshold.

Getting ready

Make sure you set up the sales data and threshold values as shown in the following screenshot. You'll also need to insert a Column Chart component into the canvas.

Getting ready

How to do it...

  1. First, bind the sales data to the chart as shown in the following screenshot:
    How to do it...
  2. Go to the Alerts section of the chart properties and ensure that Enable Alerts is checked.
  3. Select alerts By Value as we will be comparing our sales data to the threshold values.
  4. In the Alert Thresholds section, click on the Use a Range checkbox. Bind the data to the threshold data that was set up in the Getting ready section.
  5. In the Color Order section, select the radio button High values are good.
    How to do it...
  6. In the following screenshot, you will then see that the bars on the chart are now colored according to the sales thresholds:
How to do it...

How it works...

In this recipe, binding the initial data is straightforward, but the part you'll want to take note of is setting up the alerts.

Note

Note that there will always be N-1 (N minus one) number of threshold values if you are binding the range to your data. For example, if I had two colors (red and green), I would only have one threshold value. If I had four colors, I would have three threshold values set up on my spreadsheet.

In step 4, we bind the threshold range to cells D3 and E3 prepared in the Getting ready section. Anything that is equal to or greater than the yellow threshold value but less than the green threshold value will be colored as yellow. Anything that is equal to or greater than the green threshold value will be green.

There's more...

Let's say you wanted to display a critical alert that would stand out even if one region was below a threshold. You can accomplish this by following the Using bindable colors to control alert coloring from a central location recipe.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset