Closed erszcz closed 2 years ago
I believe the issue is that the format you are passing assumes that each key is column of the same table, so it expects all of them have the same rows. If it doesn’t, it trims to the shortest.
@jonatanklosko should table warn or raise here?
@erszcz you should do a Map.take/2 before you pass the data to VegaLite.
@josevalim that's it, we recognise it as tabular data, but strictly speaking it isn't because of the non-matching lengths, so zipping columns into rows truncates to the shortest. I think ideally Table.Reader.init
should return :none
, but this requires counting each column, so an error may be a better option.
Although an error only helps for to_rows
, to_colums
will still return a map of non-matching columns :thinking:
Great, thank you for a prompt explanation! I've found a way around it. Thanks again for an awesome tool 🤩
Hi! First of all thanks for LiveBook - it's a tool with huge potential!
I'm running into an issue generating charts. My livebook is available at https://gist.github.com/erszcz/4d43a77464c87a514e71eecf2811af63#file-dialyzer-etc-gradualizer-livemd and a version with persisted outputs at https://gist.github.com/erszcz/4d43a77464c87a514e71eecf2811af63#file-dialyzer-etc-gradualizer-persisted-outputs-2022-07-14_103242-livemd.
As can be seen in one of the sections, I do a sanity check of the series lengths:
However, as can be seen in the persisted VegaLite JSON, the data is truncated to 12 "all tests" entries:
The series should be 103 entries long, as shown in the Elixir snippet. Something similar happens for the 2 subsequent graphs, too. The only one that's drawn with the correct number of entries is the 4th one, i.e.
known_problems_should_fail
. The data length in its case is just 11 (as seen in the sanity check) - it's the shortest series. Could there be a limit on data length passed to VegaLite?I'm running LiveBook in Docker, the current
latest
tag:Am I misusing something or might there by a bug lurking here?