Closed jrchudy closed 1 year ago
For customization option of the hover text of violin plot (including the box plot and scatter plot within it): It says plotly doesn't support this customization as of now - https://github.com/ua-snap/iem-webapp/issues/85
This issue is to take care of the
hovertemplate_display_pattern
mentioned in issue #121 . At first we will implement this only forheatmap
type in plot app.This property should be defined in the config object like
plots[0].traces[0].hovertemplate_display_pattern
. This is being included in the traces object since this display pattern will behave similar tographic_link_pattern
.graphic_link_pattern
works for "each" data point in the plot (each bar, pie slice, heatmap square),hovertemplate_display_pattern
will be the same.hovertemplate_display_pattern
will NOT allow for markdown content to be generated, so the templates this property generates only need to be passed throughrenderHandlebarsTemplate()
.For this to work, we need to modify the following in plotly. Plotly data object expects to have the following contents:
In the case of heatmap, when
hoverinfo: 'text'
is set, the displayed tooltip when hovering over a specific square (colored z value) is shown as the value displayed in thetext
array that corresponds with the givenx
index andy
index (text[y][x]
).Note: We want to avoid showing "links" in the tooltip that shows when hovering over the chart. This is not directly related to these changes, but can occur if
xaxis.tick_display_markdown_pattern
is defined with a markdown pattern that generates a link.