MongoDB工具 >MongoDB图表 >图表类型 >Grid Charts > Heatmap
On this page
A heatmap represents data in a tabular format as a range of color. A darker, or more intense, color represents a larger aggregated value for a particular data point.
Heatmaps provide the following encoding channels:
Encoding Channel | Description |
---|---|
X Axis | A category encoding channel that creates a category along the X axis for each unique value in this field. |
Y Axis | A category encoding channel that creates a category along the Y axis for each unique value in this field. |
Intensity | An aggregation encoding channel that changes the shading of the colors in different chart regions to reflect the aggregated values of this field. More intense colors in the visualization reflect greater aggregated values. |
Heatmaps reveal patterns or trends within your data. Use heatmaps when the exact data values are not as important as depicting higher-level trends and relationships between your data points. They can also highlight any significant outliers, or points which strongly go against the general direction of your data. A heatmap is a good choice to display:
Tip
Heatmaps work especially well with binned data. With naturally ordered datasets, heatmaps highlight areas of concentration within the data.
The maximum query response size for a heatmap is 20000 documents.
The following chart visualizes data pertaining to movies. Each document in the collection represents a movie and contains general information about the film as well as ratings from critics. This heatmap shows the mean (average) Metacritic rating for different movie genres (Y Axis) over time (X Axis):
We bin the years along the X Axis into
decades and aggregate to find the mean metacritic
score
of films from each genre released in each decade.
The intensity field of metacritic
shades each grid
element based on the mean metacritic
field of all of the
intersecting documents based on the X and
Y axes fields. Based on the chart, we see that
from 1930-1940
there are a few genres with very high
average Metacritic scores, and over time a more even distribution of
film ratings begins to occur.
Note
If the space is white, there are no movies from that decade of that particular genre in the dataset.