plotly.js v2.28.0 compatibility needs huge rework of core API
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- F#
- Estrelas
- 860
- Forks
- 99
- Merge médio
- 22min
- PRs com merge (30d)
- 1
Descrição
https://github.com/plotly/plotly.js/releases/tag/v2.28.0 introduces an option to set objects for encoded typedarrays for basically all fields that provide data to traces (e.g. x and y for a cartesian plot).
an object with keys dtype, bdata, and optionally shape. In this 3rd form, dtype is one of f8, f4. i4, u4, i2, u2, i1, u1 or u1c for Uint8ClampedArray. In addition to shorthand
dtypeabove one could also use the following forms: float64, float32, int32, uint32, int16, uint16, int8, uint8 or uint8c for Uint8ClampedArray.bdatais either a base64-encoded string or the ArrayBuffer of an integer or float typed array. For either multi-dimensional arrays you must also provide its dimensions separated by comma viashape. For example usingdtype: f4 andshape: 5,100 you can declare a 2-D array that has 5 rows and 100 columns containing float32 values i.e. 4 bits per value.shapeis optional for one dimensional arrays.
Plotly.NET's API is statically typed and currently uses sequences of #IConvertible for these fields. This was a clever trick because this allows setting any of the CLR runtime types Boolean, SByte, Byte, Int16, UInt16, Int32, UInt32, Int64, UInt64, Single, Double, Decimal, DateTime, Char, and String while also making it very easy to serialize.
The new way of setting data_arrays seems to have speed advantages, and is therefore worth to be supported well from our side. A straightforward way of implementing this in the API providing a new type, e.g.
type EncodedTypedArray {
bdata: <string or maybe byte []?>
dtype: <some type abstraction>
shape: <some shape abstraction>
}
this type would also need functionality to encode the base64 string in a way that is understood by plotly.js. Maybe the python implementation's codebase can help here, as they seem to implement these functions as well.
Due to these large changes that also must be reflected on the CSharp lib, support for plotly.js >= v2.28.0 will be moved to the major release of Plotly.NET 6.0
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 com o formato typed-array do Plotly.js v2.28.0 e compare-o com o tratamento atual de data_array baseado em IConvertible na F# API e na CSharp lib. A implementação em Python pode fornecer orientação sobre a codificação; o trabalho estará concluído quando typed arrays codificados forem compatíveis como parte do trabalho de compatibilidade com Plotly.NET 6.0.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- csharp, javascript
- Domínio
- api
- Tipo de issue
- Funcionalidade
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 25/100