Ability to add div element next to chart
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 25/100
- Type d'issue
- Fonctionnalité
- Clarté
- À clarifier
- Activité
- À l'abandon
- Stack technique
- javascript, react
- Domaine
- data-visualization, frontend
Piste de recherche
L’issue identifie uniquement un composant de react-plotly.js avec les handlers onClick et onHover ; aucun fichier du dépôt ni test n’est mentionné. Il faut d’abord déterminer si le composant prend en charge les éléments React externes, puis examiner sa documentation sur la gestion des événements ou ses points d’entrée. Le travail serait considéré comme terminé s’il existait un moyen clairement documenté ou implémenté d’afficher l’élément demandé après un clic sur un graphique.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
I would like to add a div element next to the bar chart I have implemented using react-plotly.js.
The div element would appear next to the chart when onClick event is fired on the chart. I haven't seen any such example or any documentation related to add external div element to the chart. Is it possible to link chart to the external div element ?
I did attempt to implement it by doing the following:
<Plot
data={this.prepData(timelineData)}
onClick={(data) => {
this.renderCustomPanel(data);
}
onHover={(hover) => this.getHoverInfo(hover)}
type={'bar'}
layout={layout}
style={{ width: '95%' }}
/>
renderCustomPanel(e) {
const panelInfo = timelineData.map(i => `<span className="panel-info">
<span className="tooltip-value" style='font-size:15px;display:block'>${i.duration} days <br> Start time: ${moment.unix(i.startTime).format('MMM-DD-YYYY h:mm:ss')} <br> End time:${moment.unix(i.endTime).format('MMM-DD-YYYY h:mm:ss')}</span></span>`);
return panelInfo;
}
The onClick function does call the function but doesn't display the div element. I did try applying css styles to the element but nothing works.
- Langage dominant
- JavaScript
- Étoiles
- 1.1k
- Forks
- 138
- Merge moyen
- 3 j 2 h
- PR mergées (30 j)
- 4
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de plotly/react-plotly.js
-
P3 plotly-internal size: 1 task
Difficulté 3/5 1-2 jours Accessibilité débutants 45/100
plotly/react-plotly.js#386 ·
-
enhancement P3 size: 1
Difficulté 3/5 1-2 jours Accessibilité débutants 65/100
plotly/react-plotly.js#380 · 7 commentaires ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 48/100
plotly/react-plotly.js#358 · 1 commentaire ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
plotly/react-plotly.js#354 ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 30/100
plotly/react-plotly.js#353 · 1 commentaire ·