You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var bar = new View("Bar Chart Encoding Color Names in the Data");
bar.data().values("""
[
{"color": "red", "b": 28},
{"color": "green", "b": 55},
{"color": "blue", "b": 43}
]""");
Result is: Color will be treated as nominal - and not as color information.
The legend is displayed. This is also a clear indication that scale=null is not being interpreted.
I suspect the error in VegaLite.html respectively in ObjectNode.toPrettyString.
Unfortunately, I am only an amateur programmer and therefore could not narrow down the cause more precisely.
But thank you very much for this outstanding project!
Additional context
What Java (OpenJDK, Orack JDK, etc.) are you using and which Java version: 21.0.5
Which Smile version: 4.0.0
What is your build system (e.g. Ubuntu, macOS, Windows, Debian ) : Windows 11, Eclipse 2024-12
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Best Example is from https://haifengl.github.io/vegalite.html: A Bar Chart Encoding Color Names in the Data
var bar = new View("Bar Chart Encoding Color Names in the Data");
bar.data().values("""
[
{"color": "red", "b": 28},
{"color": "green", "b": 55},
{"color": "blue", "b": 43}
]""");
bar.mark("bar");
bar.encode("x", "color").type("nominal");
bar.encode("y", "b").type("quantitative");
bar.encode("color", "color").type("nominal").scale(null);
Expected behavior
compiled with Java 21.0.5; JSON modified from "View Source" from the presented html file in FireFox 133.03
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"config": {"view": {"continuousWidth": 400, "continuousHeight": 400}},
"title": "Bar Chart Encoding Color Names in the Data",
"data": {
"values": "[\n {"color": "red", "b": 28},\n {"color": "green", "b": 55},\n {"color": "blue", "b": 43}\n]"
},
"mark": {"type": "bar"},
"encoding": {
"x": {"field": "color", "type": "nominal"},
"y": {"field": "b", "type": "quantitative"},
"color": {"field": "color", "type": "nominal", "scale": null}
}
Actual behavior
compiled with Java 21.0.5 and JSON copied from "View Source" from the presented html file in FireFox 133.03
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"config": {"view": {"continuousWidth": 400, "continuousHeight": 400}},
"title": "Bar Chart Encoding Color Names in the Data",
"data": {
"values": "[\n {"color": "red", "b": 28},\n {"color": "green", "b": 55},\n {"color": "blue", "b": 43}\n]"
},
"mark": {"type": "bar"},
"encoding": {
"x": {"field": "color", "type": "nominal"},
"y": {"field": "b", "type": "quantitative"},
"color": {"field": "color", "type": "nominal", "scale": {"type": null}}
}
Result is: Color will be treated as nominal - and not as color information.
The legend is displayed. This is also a clear indication that scale=null is not being interpreted.
I suspect the error in VegaLite.html respectively in ObjectNode.toPrettyString.
Unfortunately, I am only an amateur programmer and therefore could not narrow down the cause more precisely.
But thank you very much for this outstanding project!
Additional context
The text was updated successfully, but these errors were encountered: