plotly / plotly/plotly.js

Errorbars on scatter plots don't react to point selection

Ouverte
#7,305 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

bug good for agent
Langage dominant
JavaScript
Étoiles
18.3k
Forks
2k
Merge moyen
2 j 12 h
PR mergées (30 j)
28

Description

If you make a plot with errorbars, they aren't affected at all by selections. This both looks weird (like part of your point was left behind when it became deselected) and can cause usability problems, in that it's harder to distinguish selected and unselected points, particularly if the points themselves are small.

The simple solution here would be to include the errorbars in the group that responds to marker.opacity. That also seems the most correct, as you shouldn't see an errorbar through a partially transparent marker, and intuitively I'd expect errorbars to become transparent along with their associated markers. I think that would cover most use cases, though including some errorbar attributes like color and thickness in the selected and unselected styles would also be nice.

A tricky bit here is that normally errorbars are drawn behind lines but markers are in front of lines, so they can't just be combined with the markers. I suspect the right solution is to only put them behind the lines when there are no markers, but when there are markers bring them up to just behind and grouped with each marker.

Relatedly, no errorbar attributes other than array and arrayminus accept arrays. Enabling color in particular to be an array would be useful, and could mostly work around the main issue here in some cases, though I wouldn't call it a full solution.

https://codepen.io/alexcjohnson/pen/RNbGamp?editors=0010
Image

To be clear: I don't think we should select the errorbars themselves - just select the points and bring the errorbars along for the ride.

Interestingly, errorbars on bar charts already behave correctly:

Image

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par la reproduction CodePen liée et examinez comment les barres d’erreur des nuages de points sont rendues par rapport aux marqueurs et aux lignes lors de la sélection des points. Comparez leur comportement avec celui des barres d’erreur des graphiques à barres, puis vérifiez que la sélection de points modifie également les barres d’erreur associées, sans sélectionner les barres d’erreur indépendamment.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
javascript
Domaine
data-visualization
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
Active
Clarté
Plutôt claire
Accessibilité débutants
48/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.