Skip to content

Add the HEATMAP line style.#1511

Closed
manolama wants to merge 3 commits intoNetflix:mainfrom
manolama:heatmap
Closed

Add the HEATMAP line style.#1511
manolama wants to merge 3 commits intoNetflix:mainfrom
manolama:heatmap

Conversation

@manolama
Copy link
Copy Markdown
Contributor

Add the HeatmapDef class used to configure heatmaps globaly for a graph. Add a palette option to the LineDef class for use by heatmaps. Parse the HeatmapDef in Grapher.scala and pass it to the Axis and then PlotDef.
Throw an exception if a user attempts to plot a heatmap and stacked lines on the same axis.
Select a color or palette for use in heatmaps in Grapher.scala. If no style or heatmap settings are provided, the heatmap grabs a color based on the order of the expression and uses alpha transparencies for the color scale. Remaining expressions use the rest of the palette as normal. If the user specifies a color for the expression, that color is used with alphas and no colors are taken from the main palette. If a palette is specified for heatmaps, that palette is used for the color scale.

Add the HeatmapDef class used to configure heatmaps globaly for a graph.
Add a palette option to the LineDef class for use by heatmaps.
Parse the HeatmapDef in Grapher.scala and pass it to the Axis and then
PlotDef.
Throw an exception if a user attempts to plot a heatmap and stacked lines
on the same axis.
Select a color or palette for use in heatmaps in Grapher.scala. If no
style or heatmap settings are provided, the heatmap grabs a color based
on the order of the expression and uses alpha transparencies for the color
scale. Remaining expressions use the rest of the palette as normal.
If the user specifies a color for the expression, that color is
used with alphas and no colors are taken from the main palette. If a
palette is specified for heatmaps, that palette is used for the color
scale.
Copy link
Copy Markdown
Contributor

@brharrington brharrington left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a few questions after a first pass, will take a closer look in a bit.

Comment thread atlas-chart/src/main/scala/com/netflix/atlas/chart/model/DataDef.scala Outdated
)
) {
throw new IllegalArgumentException(
"Mixing STACK and HEATMAP line styles on the same axis is not allowed."
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Throw an exception if a user attempts to plot a heatmap and stacked lines on the same axis.

What is the rationale for this? While I would agree it is not generally going to be useful, I don't really see a reason to prohibit that combination.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the percentile heatmap, I created a new ValueAxis type. If stacking is involved, the calculations pollute a lot of the heatmap logic (along with the axis) and I figured it wasn't worth it to support an op that could easily wind up completely obscuring the map. And if someone accidentally tried to plot percentiles or something else they wanted to line up with the map, it wouldn't so they'd be more confused. I think it's best to just ask the user to modify their query in that case.

@brharrington brharrington modified the milestones: 1.7.0, 1.8.0 Mar 2, 2023
@brharrington
Copy link
Copy Markdown
Contributor

Incorporated as part of #1547.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants