Closed mattijn closed 11 months ago
Looking at the generated Vega spec, there is this transform
{
"type": "formula",
"expr": "!isValid(datum[\"bin_maxbins_20_doy\"]) || !isFinite(+datum[\"bin_maxbins_20_doy\"]) ? \"null\" : format(datum[\"bin_maxbins_20_doy\"], \"\") + \" – \" + format(datum[\"bin_maxbins_20_doy_end\"], \"\")",
"as": "bin_maxbins_20_doy_range"
},
The issue is that the format
expression function isn't implemented yet. I have an old Rust implementation of the Vega format function that I developed a while back for another project. I'll see if I can port that over to VegaFusion. Although, it may also be worth adding a special case for format(value, "")
that just transforms this into toString(value)
, as this will be easier to support across SQL backends.
Also cross reference https://github.com/hex-inc/vegafusion/issues/336 for better error messages when something isn't supported.
The following spec renders fine:
But when trying to extract the transformed data it errors:
When looking to the spec, I'm not sure which transform is being utilised that is not yet supported.