Charts with a single value do not display the value
zakhenry opened this issue · 7 comments
It seems ok with Plotly.js:
var data = [
{
x: ['giraffes'],
y: [20],
type: 'bar'
}
];
Plotly.newPlot('myDiv', data);
https://codepen.io/zakhenry/pen/YzGPQMm
but not so with Plotly.kt
val plot = Plotly.plot {
bar {
x("giraffes")
y(20)
}
}
plot.makeFile()
Thanks, It is a known problem. Plotly updater requires values in an array-of-arrays format even if there is one value. I thought it is fixed, but I can reproduce it. I think it will be easy to fix with a serializer tweak.
It was easier to slightly change the logic in the upstream. Fixed in 0.3.1-dev
. I will leave the issue here until it is merged to JCenter version.
@zakhenry Thanks for reminding me. I got stuck with the release of the upstream library. And I do not want to make release version depend on dev version. 0.3.1-dev
is published on bintray and you can use it simply by adding maven("https://dl.bintray.com/mipt-npm/dev")
to gradle configuration. Do you have any specific requirements for actual center artifact? If you do, I can try to speed-up things.
Ah yep I should be able to use dev, no trouble. Is it up to date with the latest master?
It should contain all major fixes from the dev branch. Please ping me if something does not work. I will upload the latest version. Currently, there is some work being done with kotlin-jupyter team to allow better integration.
Published in 0.3.1