This blog series, titled “AlteryxTips,” will feature helpful Alteryx tips delivered weekly by AlteryxACE AkimasaKajitani.
This time, I will display numerical values on a heatmap using Alteryx’s Interactive Chart tool.
Sample Data Used in This Example
For this example, I will use data in which amount has been aggregated by store_cd and category_major_cd. The first 10 rows are shown below. The dataset contains 60 rows in total.

Let’s create a heatmap using store_cd on the vertical (Y) axis and category_major_cd on the horizontal (X) axis.
Creating the Heatmap
Creating a heatmap is straightforward. Place the Interactive Chart tool, run the workflow to load the data into the tool, open the tool’s “Configure Chart” window, click “Add Layer,” and configure it as follows:

- Type : Heatmap
- X : category_major_cd
- Y : store_cd
- Z : amount
This produces a chart like the one below (the chart size has been adjusted to 600 × 600).

Adding Numerical Values to the Heatmap
It would be convenient if the heatmap options included a setting for displaying value labels, but unfortunately no such option is available. Instead, I would like to use the layering feature in the Interactive Chart tool.
Interactive Charts allow you to add multiple layers, which are displayed on top of one another.
Click “Configure Chart” again to open the settings. Then click “Add Layer” to create a new layer and configure it as follows:

- Type : Bar
- X : category_major_cd
- Y : store_cd
I select a bar chart here because, in the Interactive Chart tool, only bar charts can display labels. The preview looks cluttered and is therefore difficult to interpret, but the chart displays correctly when the workflow is run.
Next, click the Layers tab under Style and configure it as follows:

First, set “Opacity %” on the “Values” tab to 0%.
Also configure the following items on the Layers tab:

- BAR SIZE AND SPACING
- Bar Mode : Overlay
- TEXT
- Text : amount
- Text Position : Outside
- Constrain Text : Inside
After the setting, running the workflow now produces a chart like the one below.

Adjust the finer settings as desired.
In this example, the original chart and the overlaid chart use the same axes, so they align neatly. No detailed adjustments were necessary (or, put another way, such detailed adjustments are not available).
Conclusion
- I added numerical values to a heatmap in the Interactive Chart tool.
- The Interactive Chart tool supports a variety of combination charts through its layering feature.
Sample Workflow Download
Next
Next time, I will share more tips for the Interactive Chart tool.

コメント