plotly / plotly/angular-plotly.js
event handlers are not typed
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- TypeScript
- Estrellas
- 242
- Forks
- 81
- Merge medio
- 8 h 48 min
- PR fusionados (30 d)
- 18
Descripción
I was attempting to implement some drill down functionality in the charts in my dashboard. Unfortunately, when I bound a method in my component to the (plotlyClick) output, I noticed that the type of $event was void. But my component method typed the event as unknown anyway, and I console.log the event object, and there is a ton of information in there.
On this line: https://github.com/plotly/angular-plotly.js/blob/master/projects/plotly/src/lib/plotly.component.ts#L241
...I can see that the output indeed is emitting data, just like my logging indicated. Is there anyway we could get these outputs typed? I imagine that the type would be pretty broad due to the amount of different charts/maps out there. But TypeScript thinking that the output is void is probably worse then just not knowing what the event data looks like, but still acknowledging its existence.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza en projects/plotly/src/lib/plotly.component.ts, en la declaración del output alrededor de la línea 80 y en la emisión alrededor de la línea 241. Rastrea los payloads de evento emitidos por el output plotlyClick y proporciona a los outputs un tipo TypeScript utilizable y lo bastante amplio para los datos del gráfico; la tarea estará terminada cuando los consumidores ya no vean el evento como void, mientras los datos emitidos sigan estando representados.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- angular, typescript
- Área
- frontend
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 38/100