First things first: thank you for this neat library! Now on to the report:
When I try to set a domain on a temporal scale I receive
[Warning] Conflicting scale property “domain” ([{“signal”:“{data: datetime(\“2020-01-09T05:00:00Z\“)}“},{“signal”:“{data: datetime(\“2020-01-09T13:00:00Z\“)}“}] and [[“2020-01-09T05:00:00Z”,“2020-01-09T13:00:00Z”]]). Using the union of the two domains.
I've also tried to use the { "year": 2020, ... } DateTimeFormat for the domain constraints, listed in the docs, to no avail. The graph seems to work as far as I can tell but I can't figure out what the warning is trying to say and how to resolve it, this seems like a bug to me.
{
"$schema": "https://vega.github.io/schema/vega-lite/v4.json",
"background": "transparent",
"mark": "bar",
"encoding": {
"y": {
"field": "category",
"type": "nominal"
},
"x": {
"field": "start",
"type": "temporal",
"scale": {
"domain": ["2020-01-09T05:00:00Z", "2020-01-09T13:00:00Z"]
}
},
"x2": {
"field": "end"
},
"color": {
"field": "group",
"type": "nominal",
"scale": {
"domain": ["111,121", "211,221", "311,321"],
"range": ["#f00", "#0f0", "#0ff"]
}
}
},
"data": {
"values": [
{
"category": "111",
"start": "2020-01-09T05:00:00Z",
"end": "2020-01-09T07:00:00Z",
"group": "111,121"
},
{
"category": "111",
"start": "2020-01-09T09:00:00Z",
"end": "2020-01-09T11:00:00Z",
"group": "111,121"
},
{
"category": "121",
"start": "2020-01-09T05:00:00Z",
"end": "2020-01-09T07:00:00Z",
"group": "111,121"
},
{
"category": "121",
"start": "2020-01-09T09:00:00Z",
"end": "2020-01-09T11:00:00Z",
"group": "111,121"
}
]
}
}
Reproducible with vega editor (Vega 5.9.0, Vega-Lite 4.0.2, Vega-Tooltip 0.20.0, Editor 0.55.0)
https://vega.github.io/editor/#/url/vega-lite/N4KABGBEAkDODGALApgWwIaQFxUQFzwAdYsB6UgN2QHN0A6agSz0QFcAjOxge1IRQyUa6ALQAbZskoAWOgCtY3AHaQANOCjt08ANbUATt1ZKAJtih596JbELp9yJXjUbIGfTvOQt+lxEiO8NwmjErU5qAQ-gCeERpRUABmjMhiZjiQ8Oh4NNz6seoJ-njRhMheStyooehikPFgAL6FUZAAHnFFSSlpXrB49s4tCZAlZV45qIR5tX5FkAi15TiRXVAmVeih5gDakABMAAxHIocAjKcAnAAqhwCsWIeHj4cAWmpQRyfnV9dnAMwvF7vAC6DQgjQazQa7X2nXmyVS6SgjjMUOGUCCYjy8JGiN6GQMRkIcxGY2WUEq1SUswx-kWYgpqy6kA2GG2OD2Z25qjO+zOHwOPP2-MF-x5-1FILprSsYQpewAxIknoLFYcVWqNYlIGCupCEgami1WdlMCsYRRaqxkLBduCwMz5lkctQ8rEMtyBTL6QN9M4Ml9DqcLocbvcgU93j6UaYvEGQ79DgB2SNvUnzImsEmenl8gUO6FdJ0jF25fJeL0Zkb9Qbx47Bn5h26XNPRh3+VH176hm7ctvV1pZnNQL280WFmUl1plt0Vz2imMLP0Bz4NxPNiNPYGDztxwPrpvh1PbqO7qDDyt5if6qcdzHZcse0eL+-LusHntJ1un9NLrufo2vZ-GcA5LpeuZnOOBb6g0epNCAjRAA
The issue is that the two domains look different and our heuristic to combine them doesn't catch this. You can ignore the warning and we will fix this at some point.
Hello @domoritz,
We're using vega-lite to build our cluster monitoring page. Thanks for the great library that can hit almost all of our use cases!
IIUC, we hit exactly the same issue. Would be really great to get this warning fixed!
Please find our spec with vega-editor
(Vega 5.19.1, Vega-Lite 5.0.0, Vega-Tooltip 0.25.0, Editor 0.94.2)
It's awesome to hear that Vega-Lite works well for your use cases. Thank you for the positive feedback @ChengYanJin. We are very open to contributions and would be more than happy to review a pull request that fixes this warning.