The warning message in the title of this issue is generated when using oz/export! with a spec containing the Vega-Lite :order encoding key without specifying :type "ordinal". The warning doesn't occur with oz/view!. This isn't a serious problem. It doesn't seem to cause any trouble apart from slightly annoying warning messages. (I'm making a lot of plots, so I've been seeing it repeatedly, but I can make the messages go away.)
(def connected-scatterplot
{:$schema "https://vega.github.io/schema/vega-lite/v5.json"
:data {:url "https://vega.github.io/vega-lite/data/driving.json"}
:encoding {:order {:field "year"}
:x {:field "miles" :scale {:zero false} :type "quantitative"}
:y {:field "gas" :scale {:zero false} :type "quantitative"}}
:mark {:point true :type "line"}})
(oz/export! connected-scatterplot "foo.svg")
;; WARN Missing type for channel "order", using "quantitative" instead.
;; WARN Missing type for channel "order", using "quantitative" instead.
;; context,response
The "Missing type" warnings go away if I add :type "ordinal" after :field "year". I assume the warnings are coming from Vega-Lite, not oz, but I would have thought that an example in the Vega-Lite gallery would not generate an avoidable warning. It's apparently legal to leave out the :type in this case:
https://vega.github.io/vega-lite/docs/type.html:
ordinal"" is the default type if ... or (3) the encoding channel is order.
It's kind of odd that the warning says 'using "quantitative" instead', given that the default is supposed to be "ordinal". However, this doesn't prevent oz+vega-lite from producing the expected SVG file.
(Based on a not-really-related issue for a different repo https://github.com/queryverse/VegaLite.jl/issues/341, I wonder whether oz might be using an older version of Vega-Lite, and the warning would not occur with a newer version. I don't know how Vega-Lite gets pulled into oz, so I don't know how to check this.)
Anyway, as I said, it's a not serious problem, but I thought I'd submit an issue in case there's an easy fix such as bumping up the Vega-Lite version. If it's just Vega-Lite's intended behavior whenever it chooses a default type, that's OK.
(I don't know what the "context,response" message is about. It doesn't appear when I use :order with my own code.)
The warning message in the title of this issue is generated when using
oz/export!
with a spec containing the Vega-Lite:order
encoding key without specifying:type "ordinal"
. The warning doesn't occur withoz/view!
. This isn't a serious problem. It doesn't seem to cause any trouble apart from slightly annoying warning messages. (I'm making a lot of plots, so I've been seeing it repeatedly, but I can make the messages go away.)The following example is the EDN version (from https://behrica.github.io/vl-galery/convert) for one of the examples on the Vega-Lite examples page (see https://vega.github.io/vega-lite/examples/connected_scatterplot.html):
The "Missing type" warnings go away if I add
:type "ordinal"
after:field "year"
. I assume the warnings are coming from Vega-Lite, not oz, but I would have thought that an example in the Vega-Lite gallery would not generate an avoidable warning. It's apparently legal to leave out the:type
in this case: https://vega.github.io/vega-lite/docs/type.html:It's kind of odd that the warning says 'using "quantitative" instead', given that the default is supposed to be
"ordinal"
. However, this doesn't prevent oz+vega-lite from producing the expected SVG file.(Based on a not-really-related issue for a different repo https://github.com/queryverse/VegaLite.jl/issues/341, I wonder whether oz might be using an older version of Vega-Lite, and the warning would not occur with a newer version. I don't know how Vega-Lite gets pulled into oz, so I don't know how to check this.)
Anyway, as I said, it's a not serious problem, but I thought I'd submit an issue in case there's an easy fix such as bumping up the Vega-Lite version. If it's just Vega-Lite's intended behavior whenever it chooses a default type, that's OK.
(I don't know what the "context,response" message is about. It doesn't appear when I use
:order
with my own code.)