Commit 978424c
authored
plot: add hovertemplate to ScatterTrace (#233)
* plot: add hovertemplate to ScatterTrace
adds a hovertemplate string @[omitempty] field to ScatterTrace in the plot module.
Several trace types already expose Plotly’s hovertemplate (for example HeatmapTrace, ContourTrace, SurfaceTrace, ChoroplethTrace, ScatterMapboxTrace, and SankeyLink). This change brings the scatter trace in line with those APIs and with Plotly’s own scatter trace options.
A small test (test_scatter_hovertemplate_in_traces_json) verifies that the hovertemplate field is emitted in the traces JSON when set.
* v fmt
* make hovertemplate test less brittle to json changes1 parent b259f32 commit 978424c
2 files changed
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| 72 | + | |
71 | 73 | | |
72 | 74 | | |
73 | 75 | | |
| |||
0 commit comments