Labeling tool: a white outline separates adjacent labels on the bar
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5ee37cc4d7
commit
3b52463706
1 file changed
+2
-1
+2
-1
@@ -92,7 +92,8 @@ function dessineBarre() {
|
||||
});
|
||||
const n = Math.max(1, voies.length), f = fig._fullLayout;
|
||||
return Plotly.react(barre, [{type: 'bar', orientation: 'h', y: voie, base: tries.map(l => lisible(l.debut)),
|
||||
x: tries.map(l => Date.parse(l.fin) - Date.parse(l.debut)), width: 0.85, marker: {color: GRIS}, text: tries.map(l => l.description),
|
||||
x: tries.map(l => Date.parse(l.fin) - Date.parse(l.debut)), width: 0.85, marker: {color: GRIS, line: {color: 'white', width: 2}}, // le liseré sépare deux étiquettes bout à bout
|
||||
text: tries.map(l => l.description),
|
||||
textposition: 'inside', insidetextanchor: 'start', textangle: 0, unselected: {marker: {opacity: 1}}, // sinon une sélection les pâlit
|
||||
hoverinfo: 'text', hovertext: tries.map(l => `${lisible(l.debut)} → ${lisible(l.fin)} UTC<br>${l.description.replace(/\\n/g, '<br>')}<br><i>click: read, edit</i>`)}],
|
||||
{height: 40 + VOIE * n, dragmode: 'select', selectdirection: 'h', hovermode: 'closest', plot_bgcolor: '#f2f2ef', showlegend: false,
|
||||
|
||||
Reference in new issue
Block a user