diff --git a/metrics/interfaces/charts/access.py b/metrics/interfaces/charts/access.py index 9a50e2d68..d30208888 100644 --- a/metrics/interfaces/charts/access.py +++ b/metrics/interfaces/charts/access.py @@ -92,8 +92,17 @@ def _apply_hover_label_styling(self): ) def _apply_hover_template_to_all_plots(self): + """ + Note: + the plots hovertemplate property is used by plotly react + on the front-end to control hover text formatting. + + To format dates using the hovertemplate you can use + `D3-time-format` specifiers. examples can be found at: + https://d3js.org/d3-time-format + """ for plot in self.figure.data: - plot.hovertemplate = "%{y} " + plot.hovertemplate = "%{y} (%{x|%d %b %Y})" def _disable_clicks_on_legend(self): self.figure.layout.legend.itemclick = False