Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for clearing selection #4720

Merged
merged 41 commits into from
Apr 10, 2019
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
7989028
added clear transform to files
Mar 11, 2019
958360c
added test suite and modified clear to not occur on default - must fl…
Mar 13, 2019
5821af8
adding single type support
Mar 15, 2019
ef5f6b8
adding test cases for single + interval clearing
Mar 15, 2019
dd06819
[Travis] Update examples (build: 22361)
Mar 15, 2019
de29ed0
Clear transform default doubleclick clears selected data and brush, w…
Mar 21, 2019
0c3d122
adding test cases for clear.ts and updating other test files to turn …
Mar 21, 2019
1505a1e
added clear transform to files
Mar 11, 2019
7249a10
added test suite and modified clear to not occur on default - must fl…
Mar 13, 2019
3cba482
adding single type support
Mar 15, 2019
d49d694
adding test cases for single + interval clearing
Mar 15, 2019
20eba3f
[Travis] Update examples (build: 22361)
Mar 15, 2019
cd6362a
Clear transform default doubleclick clears selected data and brush, w…
Mar 21, 2019
94027a9
adding test cases for clear.ts and updating other test files to turn …
Mar 21, 2019
f1f08d7
Merge branch 'ajl/clear' of https://github.com/vega/vega-lite into aj…
Mar 21, 2019
cb15c08
[Travis] Update schema (build: 22402)
Mar 21, 2019
2e8b2b5
[Travis] Update examples (build: 22402)
Mar 21, 2019
c9ab937
migrated clear to conditional config, and interval type clear now onl…
Apr 2, 2019
70b4ea3
Merge branch 'ajl/clear' of https://github.com/vega/vega-lite into aj…
Apr 2, 2019
e6335a1
adding clear transform documentation
Apr 2, 2019
d505802
Merge branch 'master' into ajl/clear
Apr 2, 2019
30857fe
[Travis] Update schema (build: 22802)
Apr 2, 2019
2ea1ead
[Travis] Update examples (build: 22802)
Apr 2, 2019
73777ca
simplified code a little
Apr 3, 2019
97ae4e3
Merge branch 'ajl/clear' of https://github.com/vega/vega-lite into aj…
Apr 3, 2019
ae4f8ae
clearing selection and panning/zooming, also updated docs and tests
Apr 3, 2019
3cdba25
[Travis] Update examples (build: 22820)
Apr 3, 2019
f0804b2
significantly refactored clear code
Apr 5, 2019
77aa146
Merge branch 'ajl/clear' of https://github.com/vega/vega-lite into aj…
Apr 5, 2019
d105409
updating TSDocs and Vega-lite docs
Apr 5, 2019
937aa9f
[Travis] Update examples (build: 22858)
Apr 5, 2019
1a3ec0c
Minor fixes to clear logic/style to minimize signal additions.
arvind Apr 5, 2019
053f24b
Append clear to top-level signals to account for input bindings.
arvind Apr 5, 2019
519a2b6
Refine documentation on selection clearing.
arvind Apr 5, 2019
6b81dd2
Selection clearing should account for toggling.
arvind Apr 5, 2019
b99ef92
[Travis] Update schema (build: 22868)
Apr 5, 2019
f6e9a88
[Travis] Update examples (build: 22868)
Apr 5, 2019
9455fb8
Fix backticks
kanitw Apr 6, 2019
e51e6ce
Rename `selection_clear_heatmap` to `selection_heatmap` as it doesn't…
kanitw Apr 6, 2019
165d8ca
Refactor selection_heatmap example + add it to the gallery
kanitw Apr 6, 2019
dd9d82e
[Travis] Update examples (build: 22876)
Apr 6, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions build/vega-lite-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -6483,6 +6483,13 @@
],
"type": "string"
},
"clear": {
"description": "Controls clearing selections. Can be `true`, `false`, or a `string` that is\none of the [Supported Event Types](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information.",
"type": [
"string",
"boolean"
]
},
"empty": {
"description": "By default, all data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.",
"enum": [
Expand Down Expand Up @@ -6557,6 +6564,13 @@
],
"type": "string"
},
"clear": {
"description": "Controls clearing selections. Can be `true`, `false`, or a `string` that is\none of the [Supported Event Types](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information.",
"type": [
"string",
"boolean"
]
},
"empty": {
"description": "By default, all data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.",
"enum": [
Expand Down Expand Up @@ -8494,6 +8508,13 @@
"MultiSelection": {
"additionalProperties": false,
"properties": {
"clear": {
"description": "Controls clearing selections. Can be `true`, `false`, or a `string` that is\none of the [Supported Event Types](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information.",
"type": [
"string",
"boolean"
]
},
"empty": {
"description": "By default, all data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.",
"enum": [
Expand Down Expand Up @@ -8564,6 +8585,13 @@
"MultiSelectionConfig": {
"additionalProperties": false,
"properties": {
"clear": {
"description": "Controls clearing selections. Can be `true`, `false`, or a `string` that is\none of the [Supported Event Types](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information.",
"type": [
"string",
"boolean"
]
},
"empty": {
"description": "By default, all data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.",
"enum": [
Expand Down Expand Up @@ -10397,6 +10425,13 @@
],
"description": "Establish a two-way binding between a single selection and input elements\n(also known as dynamic query widgets). A binding takes the form of\nVega's [input element binding definition](https://vega.github.io/vega/docs/signals/#bind)\nor can be a mapping between projected field/encodings and binding definitions.\n\nSee the [bind transform](https://vega.github.io/vega-lite/docs/bind.html) documentation for more information."
},
"clear": {
"description": "Controls clearing selections. Can be `true`, `false`, or a `string` that is\none of the [Supported Event Types](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information.",
"type": [
"string",
"boolean"
]
},
"empty": {
"description": "By default, all data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.",
"enum": [
Expand Down Expand Up @@ -10464,6 +10499,13 @@
],
"description": "Establish a two-way binding between a single selection and input elements\n(also known as dynamic query widgets). A binding takes the form of\nVega's [input element binding definition](https://vega.github.io/vega/docs/signals/#bind)\nor can be a mapping between projected field/encodings and binding definitions.\n\nSee the [bind transform](https://vega.github.io/vega-lite/docs/bind.html) documentation for more information."
},
"clear": {
"description": "Controls clearing selections. Can be `true`, `false`, or a `string` that is\none of the [Supported Event Types](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information.",
"type": [
"string",
"boolean"
]
},
"empty": {
"description": "By default, all data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.",
"enum": [
Expand Down
4 changes: 4 additions & 0 deletions examples/compiled/brush_table.vg.json
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,10 @@
{"signal": "brush_Horsepower || brush_Miles_per_Gallon"}
],
"update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"concat_0\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null"
},
{
"events": [{"source": "scope", "type": "dblclick"}],
"update": "null"
}
]
},
Expand Down
3 changes: 2 additions & 1 deletion examples/compiled/circle_bubble_health_income.vg.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@
{
"events": [{"signal": "view_income || view_health"}],
"update": "view_income && view_health ? {unit: \"\", fields: view_tuple_fields, values: [view_income,view_health]} : null"
}
},
{"events": [{"source": "scope", "type": "dblclick"}], "update": "null"}
]
},
{
Expand Down
3 changes: 2 additions & 1 deletion examples/compiled/interactive_area_brush.vg.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@
{
"events": [{"signal": "brush_yearmonth_date"}],
"update": "brush_yearmonth_date ? {unit: \"layer_0\", fields: brush_tuple_fields, values: [brush_yearmonth_date]} : null"
}
},
{"events": [{"source": "scope", "type": "dblclick"}], "update": "null"}
]
},
{
Expand Down
3 changes: 2 additions & 1 deletion examples/compiled/interactive_bar_select_highlight.vg.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@
"events": [{"source": "scope", "type": "click"}],
"update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: select_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null",
"force": true
}
},
{"events": [{"source": "scope", "type": "dblclick"}], "update": "null"}
]
},
{
Expand Down
3 changes: 2 additions & 1 deletion examples/compiled/interactive_brush.vg.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@
{
"events": [{"signal": "brush_Horsepower || brush_Miles_per_Gallon"}],
"update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null"
}
},
{"events": [{"source": "scope", "type": "dblclick"}], "update": "null"}
]
},
{
Expand Down
12 changes: 12 additions & 0 deletions examples/compiled/interactive_dashboard_europe_pop.vg.json
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,10 @@
{
"events": [{"signal": "brush_Country"}],
"update": "brush_Country ? {unit: \"concat_0\", fields: brush_tuple_fields, values: [brush_Country]} : null"
},
{
"events": [{"source": "scope", "type": "dblclick"}],
"update": "null"
}
]
},
Expand Down Expand Up @@ -721,6 +725,10 @@
{
"events": [{"signal": "brush_Country"}],
"update": "brush_Country ? {unit: \"concat_1\", fields: brush_tuple_fields, values: [brush_Country]} : null"
},
{
"events": [{"source": "scope", "type": "dblclick"}],
"update": "null"
}
]
},
Expand Down Expand Up @@ -1097,6 +1105,10 @@
}
],
"update": "brush_Population_ages_65_and_above_of_total && brush_Population_ages_15_64_of_total ? {unit: \"concat_2\", fields: brush_tuple_fields, values: [brush_Population_ages_65_and_above_of_total,brush_Population_ages_15_64_of_total]} : null"
},
{
"events": [{"source": "scope", "type": "dblclick"}],
"update": "null"
}
]
},
Expand Down
12 changes: 12 additions & 0 deletions examples/compiled/interactive_layered_crossfilter.vg.json
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,10 @@
{
"events": [{"signal": "brush_distance"}],
"update": "brush_distance ? {unit: \"child__repeat_column_distance_layer_0\", fields: brush_tuple_fields, values: [brush_distance]} : null"
},
{
"events": [{"source": "scope", "type": "dblclick"}],
"update": "null"
}
]
},
Expand Down Expand Up @@ -625,6 +629,10 @@
{
"events": [{"signal": "brush_delay"}],
"update": "brush_delay ? {unit: \"child__repeat_column_delay_layer_0\", fields: brush_tuple_fields, values: [brush_delay]} : null"
},
{
"events": [{"source": "scope", "type": "dblclick"}],
"update": "null"
}
]
},
Expand Down Expand Up @@ -1001,6 +1009,10 @@
{
"events": [{"signal": "brush_time"}],
"update": "brush_time ? {unit: \"child__repeat_column_time_layer_0\", fields: brush_tuple_fields, values: [brush_time]} : null"
},
{
"events": [{"source": "scope", "type": "dblclick"}],
"update": "null"
}
]
},
Expand Down
12 changes: 12 additions & 0 deletions examples/compiled/interactive_layered_crossfilter_discrete.vg.json
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,10 @@
"events": [{"source": "scope", "type": "click"}],
"update": "datum && item().mark.marktype !== 'group' ? {unit: \"child__repeat_column_distance_layer_0\", fields: brush_tuple_fields, values: [[(item().isVoronoi ? datum.datum : datum)[\"bin_maxbins_20_distance\"], (item().isVoronoi ? datum.datum : datum)[\"bin_maxbins_20_distance_end\"]]]} : null",
"force": true
},
{
"events": [{"source": "scope", "type": "dblclick"}],
"update": "null"
}
]
},
Expand Down Expand Up @@ -351,6 +355,10 @@
"events": [{"source": "scope", "type": "click"}],
"update": "datum && item().mark.marktype !== 'group' ? {unit: \"child__repeat_column_delay_layer_0\", fields: brush_tuple_fields, values: [[(item().isVoronoi ? datum.datum : datum)[\"bin_maxbins_20_delay\"], (item().isVoronoi ? datum.datum : datum)[\"bin_maxbins_20_delay_end\"]]]} : null",
"force": true
},
{
"events": [{"source": "scope", "type": "dblclick"}],
"update": "null"
}
]
},
Expand Down Expand Up @@ -517,6 +525,10 @@
"events": [{"source": "scope", "type": "click"}],
"update": "datum && item().mark.marktype !== 'group' ? {unit: \"child__repeat_column_time_layer_0\", fields: brush_tuple_fields, values: [[(item().isVoronoi ? datum.datum : datum)[\"bin_maxbins_20_time\"], (item().isVoronoi ? datum.datum : datum)[\"bin_maxbins_20_time_end\"]]]} : null",
"force": true
},
{
"events": [{"source": "scope", "type": "dblclick"}],
"update": "null"
}
]
},
Expand Down
4 changes: 4 additions & 0 deletions examples/compiled/interactive_overview_detail.vg.json
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,10 @@
{
"events": [{"signal": "brush_date"}],
"update": "brush_date ? {unit: \"concat_1\", fields: brush_tuple_fields, values: [brush_date]} : null"
},
{
"events": [{"source": "scope", "type": "dblclick"}],
"update": "null"
}
]
},
Expand Down
3 changes: 2 additions & 1 deletion examples/compiled/interactive_paintbrush.vg.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
"events": [{"source": "scope", "type": "mouseover"}],
"update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: paintbrush_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null",
"force": true
}
},
{"events": [{"source": "scope", "type": "dblclick"}], "update": "null"}
]
},
{
Expand Down
3 changes: 2 additions & 1 deletion examples/compiled/interactive_paintbrush_color.vg.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
"events": [{"source": "scope", "type": "mouseover"}],
"update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: paintbrush_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null",
"force": true
}
},
{"events": [{"source": "scope", "type": "dblclick"}], "update": "null"}
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
"events": [{"source": "scope", "type": "mouseover"}],
"update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: paintbrush_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null",
"force": true
}
},
{"events": [{"source": "scope", "type": "dblclick"}], "update": "null"}
]
},
{
Expand Down
3 changes: 2 additions & 1 deletion examples/compiled/interactive_paintbrush_interval.vg.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@
{"signal": "paintbrush_Horsepower || paintbrush_Miles_per_Gallon"}
],
"update": "paintbrush_Horsepower && paintbrush_Miles_per_Gallon ? {unit: \"\", fields: paintbrush_tuple_fields, values: [paintbrush_Horsepower,paintbrush_Miles_per_Gallon]} : null"
}
},
{"events": [{"source": "scope", "type": "dblclick"}], "update": "null"}
]
},
{
Expand Down
3 changes: 2 additions & 1 deletion examples/compiled/interactive_paintbrush_simple_all.vg.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"events": [{"source": "scope", "type": "mouseover"}],
"update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: paintbrush_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null",
"force": true
}
},
{"events": [{"source": "scope", "type": "dblclick"}], "update": "null"}
]
},
{
Expand Down
3 changes: 2 additions & 1 deletion examples/compiled/interactive_paintbrush_simple_none.vg.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"events": [{"source": "scope", "type": "mouseover"}],
"update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: paintbrush_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null",
"force": true
}
},
{"events": [{"source": "scope", "type": "dblclick"}], "update": "null"}
]
},
{
Expand Down
Loading