[BUG]: `contour.showlegend` default differs from actual behavior

Offen
#8,111 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 2 Tagen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
55/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
javascript

Rechercherichtung

The mismatch is set in src/traces/contour/style_defaults.js, lines 20-29, where showlegend is forced to false when coloring is not 'none'. Compare that with the documented default in the contour reference. Done means the documented default and the real behavior agree, which may mean editing the docs or the default, so confirm the intended direction with maintainers first. Check the existing contour tests before changing anything.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

documentation P2 size: 1
Description

The contour.showlegend reference documents the default as true.

However, for contours with coloring !== 'none', the actual default is explicitly set to false in:
https://github.com/plotly/plotly.js/blob/4862f6271046024e58cd25bfa771e81ffe2fdce6/src/traces/contour/style_defaults.js#L20-L29

So the documented default does not match the actual behavior. Or this is confusing.

Screenshot
Image
Codepen

https://codepen.io/Lexachoc/pen/WbpdLjQ

Vorherrschende Sprache
JavaScript
Sterne
18.4k
Forks
2.1k
Ø Merge
1 T. 5 Std.
Gemergte PRs (30 T.)
12

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus plotly/plotly.js

Alle Issues in plotly/plotly.js

Ähnliche Issues

Weitere Issues zu JavaScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.