-
-
Notifications
You must be signed in to change notification settings - Fork 79
Description
In the Google Colab notebook linked from the idl.uw.edu/mosaic website that displays Seattle weather data as a MosaicWidget, the interactive highlighting of the points seems to be malfunctioning.
Link: https://colab.research.google.com/drive/1Txy6L_of8_lJFImKEkhUCqZX70yKpYnv#scrollTo=leuzblN47K-T
Excerpt code for the specification and widget creation:
`spec = {
"params": {
"click": { "select": "single" },
"domain": ["sun", "fog", "drizzle", "rain", "snow"],
"colors": ["#e7ba52", "#a7a7a7", "#aec7e8", "#1f77b4", "#9467bd"]
},
"vconcat": [
{
"hconcat": [
{
"plot": [
{
"mark": "dot",
"data": { "from": "weather", "filterBy": "$click" },
"x": { "dateMonthDay": "date" },
"y": "temp_max",
"fill": "weather",
"r": "precipitation",
"opacity": 0.7
},
{ "select": "intervalX", "as": "$range" },
{ "select": "highlight", "by": "$range", "fill": "#eee" },
{ "legend": "color", "as": "$click", "columns": 1 }
],
"xyDomain": "Fixed",
"xTickFormat": "%b",
"colorDomain": "$domain",
"colorRange": "$colors",
"rDomain": "Fixed",
"rRange": [2, 10],
"width": 800
}
]
},
{
"plot": [
{
"mark": "barX",
"data": { "from": "weather" },
"x": { "count": None },
"y": "weather",
"fill": "#f5f5f5"
},
{
"mark": "barX",
"data": { "from": "weather", "filterBy": "$range" },
"x": { "count": None },
"y": "weather",
"fill": "weather",
"order": "weather"
},
{ "select": "toggleY", "as": "$click" },
{ "select": "highlight", "by": "$click" }
],
"xDomain": "Fixed",
"yDomain": "$domain",
"yLabel": None,
"colorDomain": "$domain",
"colorRange": "$colors",
"width": 800
}
]
}
MosaicWidget(spec, data = {"weather": weather})`
With the default spec above only the points aligned with the x position of the cursor are highlighted when a portion of the graph is selected. These points alone remain highlighted even upon further interactions.
I'm not 100% sure if this is a bug, but thought I would flag it to make sure.