forked from microsoft/SandDance
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add faceting to percent (microsoft#172)
- Loading branch information
1 parent
ebf8c9b
commit e4564a9
Showing
32 changed files
with
6,286 additions
and
0 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
docs/tests/specs/input/bar-categorical-percent-count-facet-categorical.vl.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"$schema": "https://vega.github.io/schema/vega-lite/v4.json", | ||
"data": { | ||
"url": "https://sanddance.js.org/sample-data/titanicmaster.tsv", | ||
"format": { | ||
"type": "tsv" | ||
} | ||
}, | ||
"transform": [ | ||
{ | ||
"window": [{ | ||
"op": "row_number", | ||
"as": "id" | ||
}] | ||
} | ||
], | ||
"height": 300, | ||
"width": 300, | ||
"mark": "bar", | ||
"encoding": { | ||
"facet": { | ||
"field": "Joined", | ||
"type": "nominal" | ||
}, | ||
"y": { | ||
"field": "Class", | ||
"type": "nominal" | ||
}, | ||
"x": { | ||
"type": "quantitative", | ||
"field": "id", | ||
"aggregate": "count", | ||
"stack": "normalize", | ||
"axis": { | ||
"format": "%" | ||
} | ||
}, | ||
"color": {"field": "id", "type": "nominal"}, | ||
"tooltip": {"field": "Name", "type": "nominal"} | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
docs/tests/specs/input/bar-categorical-percent-count-facet-quantitative.vl.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"$schema": "https://vega.github.io/schema/vega-lite/v4.json", | ||
"data": { | ||
"url": "https://sanddance.js.org/sample-data/titanicmaster.tsv", | ||
"format": { | ||
"type": "tsv" | ||
} | ||
}, | ||
"transform": [ | ||
{ | ||
"window": [{ | ||
"op": "row_number", | ||
"as": "id" | ||
}] | ||
} | ||
], | ||
"height": 300, | ||
"width": 300, | ||
"mark": "bar", | ||
"encoding": { | ||
"facet": { | ||
"field": "TicketCost", | ||
"type": "quantitative", | ||
"bin": { | ||
"maxbins": 30 | ||
}, | ||
"columns": 10 | ||
}, | ||
"y": { | ||
"field": "Class", | ||
"type": "nominal" | ||
}, | ||
"x": { | ||
"type": "quantitative", | ||
"field": "id", | ||
"aggregate": "count", | ||
"stack": "normalize", | ||
"axis": { | ||
"format": "%" | ||
} | ||
}, | ||
"color": {"field": "id", "type": "nominal"}, | ||
"tooltip": {"field": "Name", "type": "nominal"} | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
docs/tests/specs/input/bar-categorical-percent-sum-facet-categorical.vl.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"$schema": "https://vega.github.io/schema/vega-lite/v4.json", | ||
"data": { | ||
"url": "https://sanddance.js.org/sample-data/titanicmaster.tsv", | ||
"format": { | ||
"type": "tsv" | ||
} | ||
}, | ||
"transform": [ | ||
{ | ||
"window": [{ | ||
"op": "row_number", | ||
"as": "id" | ||
}] | ||
} | ||
], | ||
"height": 300, | ||
"width": 300, | ||
"mark": "bar", | ||
"encoding": { | ||
"facet": { | ||
"field": "Joined", | ||
"type": "nominal" | ||
}, | ||
"y": { | ||
"field": "Class", | ||
"type": "nominal" | ||
}, | ||
"x": { | ||
"type": "quantitative", | ||
"field": "TicketCost", | ||
"stack": "normalize", | ||
"axis": { | ||
"format": "%" | ||
} | ||
}, | ||
"order": {"aggregate": "sum", "field": "TicketCost", "type": "quantitative", "sort": "descending" }, | ||
"color": {"field": "id", "type": "nominal"}, | ||
"tooltip": {"field": "Name", "type": "nominal"} | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
docs/tests/specs/input/bar-categorical-percent-sum-facet-quantitative.vl.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"$schema": "https://vega.github.io/schema/vega-lite/v4.json", | ||
"data": { | ||
"url": "https://sanddance.js.org/sample-data/titanicmaster.tsv", | ||
"format": { | ||
"type": "tsv" | ||
} | ||
}, | ||
"transform": [ | ||
{ | ||
"window": [{ | ||
"op": "row_number", | ||
"as": "id" | ||
}] | ||
} | ||
], | ||
"height": 300, | ||
"width": 300, | ||
"mark": "bar", | ||
"encoding": { | ||
"facet": { | ||
"field": "TicketCost", | ||
"type": "quantitative", | ||
"bin": { | ||
"maxbins": 30 | ||
}, | ||
"columns": 10 | ||
}, | ||
"y": { | ||
"field": "Class", | ||
"type": "nominal" | ||
}, | ||
"x": { | ||
"type": "quantitative", | ||
"field": "TicketCost", | ||
"stack": "normalize", | ||
"axis": { | ||
"format": "%" | ||
} | ||
}, | ||
"order": {"aggregate": "sum", "field": "TicketCost", "type": "quantitative", "sort": "descending" }, | ||
"color": {"field": "id", "type": "nominal"}, | ||
"tooltip": {"field": "Name", "type": "nominal"} | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
docs/tests/specs/input/bar-quantitative-percent-count-facet-categorical.vl.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"$schema": "https://vega.github.io/schema/vega-lite/v4.json", | ||
"data": { | ||
"url": "https://sanddance.js.org/sample-data/titanicmaster.tsv", | ||
"format": { | ||
"type": "tsv" | ||
} | ||
}, | ||
"transform": [ | ||
{ | ||
"window": [{ | ||
"op": "row_number", | ||
"as": "id" | ||
}] | ||
} | ||
], | ||
"height": 300, | ||
"width": 300, | ||
"mark": "bar", | ||
"encoding": { | ||
"facet": { | ||
"field": "Joined", | ||
"type": "nominal" | ||
}, | ||
"y": { | ||
"field": "Age", | ||
"type": "quantitative", | ||
"bin": { | ||
"maxbins": 20 | ||
} | ||
}, | ||
"x": { | ||
"type": "quantitative", | ||
"field": "id", | ||
"aggregate": "count", | ||
"stack": "normalize", | ||
"axis": { | ||
"format": "%" | ||
} | ||
}, | ||
"color": {"field": "id", "type": "nominal"}, | ||
"tooltip": {"field": "Name", "type": "nominal"} | ||
} | ||
} |
48 changes: 48 additions & 0 deletions
48
docs/tests/specs/input/bar-quantitative-percent-count-facet-quantitative.vl.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"$schema": "https://vega.github.io/schema/vega-lite/v4.json", | ||
"data": { | ||
"url": "https://sanddance.js.org/sample-data/titanicmaster.tsv", | ||
"format": { | ||
"type": "tsv" | ||
} | ||
}, | ||
"transform": [ | ||
{ | ||
"window": [{ | ||
"op": "row_number", | ||
"as": "id" | ||
}] | ||
} | ||
], | ||
"height": 300, | ||
"width": 300, | ||
"mark": "bar", | ||
"encoding": { | ||
"facet": { | ||
"field": "TicketCost", | ||
"type": "quantitative", | ||
"bin": { | ||
"maxbins": 30 | ||
}, | ||
"columns": 10 | ||
}, | ||
"y": { | ||
"field": "Age", | ||
"type": "quantitative", | ||
"bin": { | ||
"maxbins": 20 | ||
} | ||
}, | ||
"x": { | ||
"type": "quantitative", | ||
"field": "id", | ||
"aggregate": "count", | ||
"stack": "normalize", | ||
"axis": { | ||
"format": "%" | ||
} | ||
}, | ||
"color": {"field": "id", "type": "nominal"}, | ||
"tooltip": {"field": "Name", "type": "nominal"} | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
docs/tests/specs/input/bar-quantitative-percent-count.vl.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"$schema": "https://vega.github.io/schema/vega-lite/v4.json", | ||
"data": { | ||
"url": "https://sanddance.js.org/sample-data/titanicmaster.tsv", | ||
"format": { | ||
"type": "tsv" | ||
} | ||
}, | ||
"transform": [ | ||
{ | ||
"window": [{ | ||
"op": "row_number", | ||
"as": "id" | ||
}] | ||
} | ||
], | ||
"height": 300, | ||
"width": 300, | ||
"mark": "bar", | ||
"encoding": { | ||
"y": { | ||
"field": "Age", | ||
"type": "quantitative", | ||
"bin": { | ||
"maxbins": 20 | ||
} | ||
}, | ||
"x": { | ||
"type": "quantitative", | ||
"field": "id", | ||
"aggregate": "count", | ||
"stack": "normalize", | ||
"axis": { | ||
"format": "%" | ||
} | ||
}, | ||
"color": {"field": "id", "type": "nominal"}, | ||
"tooltip": {"field": "Name", "type": "nominal"} | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
docs/tests/specs/input/bar-quantitative-percent-sum-facet-categorical.vl.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"$schema": "https://vega.github.io/schema/vega-lite/v4.json", | ||
"data": { | ||
"url": "https://sanddance.js.org/sample-data/titanicmaster.tsv", | ||
"format": { | ||
"type": "tsv" | ||
} | ||
}, | ||
"transform": [ | ||
{ | ||
"window": [{ | ||
"op": "row_number", | ||
"as": "id" | ||
}] | ||
} | ||
], | ||
"height": 600, | ||
"width": 300, | ||
"mark": "bar", | ||
"encoding": { | ||
"facet": { | ||
"field": "Joined", | ||
"type": "nominal" | ||
}, | ||
"y": { | ||
"field": "Age", | ||
"type": "quantitative", | ||
"bin": { | ||
"maxbins": 20 | ||
} | ||
}, | ||
"x": { | ||
"type": "quantitative", | ||
"field": "TicketCost", | ||
"stack": "normalize", | ||
"axis": { | ||
"format": "%" | ||
} | ||
}, | ||
"order": {"aggregate": "sum", "field": "TicketCost", "type": "quantitative", "sort": "descending" }, | ||
"color": {"field": "id", "type": "nominal"}, | ||
"tooltip": {"field": "Name", "type": "nominal"} | ||
} | ||
} |
Oops, something went wrong.