plotly / plotly/angular-plotly.js
event handlers are not typed
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- TypeScript
- Estrelas
- 242
- Forks
- 81
- Merge médio
- 8h 48min
- PRs com merge (30d)
- 18
Descrição
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.
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Direção de pesquisa
Comece em projects/plotly/src/lib/plotly.component.ts, na declaração do output por volta da linha 80 e na emissão por volta da linha 241. Rastreie os payloads de evento emitidos pelo output plotlyClick e dê aos outputs um tipo TypeScript utilizável e amplo o suficiente para os dados do gráfico; a tarefa estará concluída quando os consumidores não virem mais o evento como void, enquanto os dados emitidos continuarem representados.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- angular, typescript
- Domínio
- frontend
- Tipo de issue
- Funcionalidade
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 38/100