Box charts hover only Q3, Mediana and Q1, through an invisible marker; the box itself takes no hover
This commit is contained in:
@@ -287,8 +287,17 @@ export function boxFigure(r: Reading, period: string): Figure {
|
||||
upperfence: [q3],
|
||||
marker: { color: '#4269C2' },
|
||||
fillcolor: 'rgba(66,105,194,0.55)',
|
||||
hovertemplate: `Q3: %{q3:${SHORT}}<br>Mediana: %{median:${SHORT}}<br>Q1: %{q1:${SHORT}}<extra></extra>`,
|
||||
hoverinfo: 'skip',
|
||||
} as Partial<Plotly.Data>,
|
||||
{
|
||||
type: 'scatter',
|
||||
mode: 'markers',
|
||||
x: [period],
|
||||
y: [r.score!],
|
||||
customdata: [[q3, r.score!, q1]],
|
||||
marker: { size: 40, opacity: 0 },
|
||||
hovertemplate: `Q3: %{customdata[0]:${SHORT}}<br>Mediana: %{customdata[1]:${SHORT}}<br>Q1: %{customdata[2]:${SHORT}}<extra></extra>`,
|
||||
},
|
||||
],
|
||||
layout: {
|
||||
showlegend: false,
|
||||
|
||||
Reference in New Issue
Block a user