Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ exports[`ColumnChartSpecModel > should handle datetime bin values 1`] = `
},
],
},
"height": 100,
"height": 30,
"layer": [
{
"encoding": {
Expand Down Expand Up @@ -497,6 +497,7 @@ exports[`ColumnChartSpecModel > should handle datetime bin values 1`] = `
},
},
],
"width": 75,
}
`;

Expand Down Expand Up @@ -629,375 +630,6 @@ exports[`ColumnChartSpecModel > should handle string value counts 1`] = `
}
`;

exports[`ColumnChartSpecModel > snapshot > array 1`] = `
{
"background": "transparent",
"config": {
"axis": {
"domain": false,
},
"view": {
"stroke": "transparent",
},
},
"data": {
"values": [
"a",
"b",
"c",
],
},
"height": 100,
"layer": [
{
"encoding": {
"x": {
"bin": true,
"field": "a",
"type": "quantitative",
},
"y": {
"aggregate": "count",
"axis": null,
"type": "quantitative",
},
},
"mark": {
"color": "#027864",
"type": "bar",
},
},
{
"encoding": {
"tooltip": [
{
"bin": true,
"field": "a",
"format": ".2f",
"title": "a",
"type": "quantitative",
},
{
"aggregate": "count",
"format": ",d",
"title": "Count",
"type": "quantitative",
},
],
"x": {
"axis": {
"labelExpr": "(datum.value >= 10000 || datum.value <= -10000) ? format(datum.value, '.2e') : format(datum.value, '.2~f')",
"labelFontSize": 8.5,
"labelOpacity": 0.5,
"title": null,
},
"bin": true,
"field": "a",
"type": "quantitative",
},
"y": {
"aggregate": "max",
"axis": null,
"type": "quantitative",
},
},
"mark": {
"opacity": 0,
"type": "bar",
},
},
],
}
`;

exports[`ColumnChartSpecModel > snapshot > csv data 1`] = `
{
"background": "transparent",
"config": {
"axis": {
"domain": false,
},
"view": {
"stroke": "transparent",
},
},
"data": {
"values": [
{
"a": 1,
"b": 2,
"c": 3,
},
{
"a": 4,
"b": 5,
"c": 6,
},
],
},
"height": 100,
"layer": [
{
"encoding": {
"x": {
"bin": true,
"field": "a",
"type": "quantitative",
},
"y": {
"aggregate": "count",
"axis": null,
"type": "quantitative",
},
},
"mark": {
"color": "#027864",
"type": "bar",
},
},
{
"encoding": {
"tooltip": [
{
"bin": true,
"field": "a",
"format": ".2f",
"title": "a",
"type": "quantitative",
},
{
"aggregate": "count",
"format": ",d",
"title": "Count",
"type": "quantitative",
},
],
"x": {
"axis": {
"labelExpr": "(datum.value >= 10000 || datum.value <= -10000) ? format(datum.value, '.2e') : format(datum.value, '.2~f')",
"labelFontSize": 8.5,
"labelOpacity": 0.5,
"title": null,
},
"bin": true,
"field": "a",
"type": "quantitative",
},
"y": {
"aggregate": "max",
"axis": null,
"type": "quantitative",
},
},
"mark": {
"opacity": 0,
"type": "bar",
},
},
],
}
`;

exports[`ColumnChartSpecModel > snapshot > csv string 1`] = `
{
"background": "transparent",
"config": {
"axis": {
"domain": false,
},
"view": {
"stroke": "transparent",
},
},
"data": {
"values": [
{
"a": 1,
"b": 2,
"c": 3,
},
{
"a": 4,
"b": 5,
"c": 6,
},
],
},
"height": 100,
"layer": [
{
"encoding": {
"x": {
"bin": true,
"field": "a",
"type": "quantitative",
},
"y": {
"aggregate": "count",
"axis": null,
"type": "quantitative",
},
},
"mark": {
"color": "#027864",
"type": "bar",
},
},
{
"encoding": {
"tooltip": [
{
"bin": true,
"field": "a",
"format": ".2f",
"title": "a",
"type": "quantitative",
},
{
"aggregate": "count",
"format": ",d",
"title": "Count",
"type": "quantitative",
},
],
"x": {
"axis": {
"labelExpr": "(datum.value >= 10000 || datum.value <= -10000) ? format(datum.value, '.2e') : format(datum.value, '.2~f')",
"labelFontSize": 8.5,
"labelOpacity": 0.5,
"title": null,
},
"bin": true,
"field": "a",
"type": "quantitative",
},
"y": {
"aggregate": "max",
"axis": null,
"type": "quantitative",
},
},
"mark": {
"opacity": 0,
"type": "bar",
},
},
],
}
`;

exports[`ColumnChartSpecModel > snapshot > url data 1`] = `
{
"background": "transparent",
"config": {
"axis": {
"domain": false,
},
"view": {
"stroke": "transparent",
},
},
"data": {
"values": [],
},
"height": 100,
"layer": [
{
"encoding": {
"color": {
"condition": {
"test": "datum["bin_maxbins_10_date_range"] === "null"",
"value": "#cc4e00",
},
"value": "#027864",
},
"x": {
"axis": null,
"bin": true,
"field": "date",
"scale": {
"align": 0,
"paddingInner": 0,
"paddingOuter": {
"expr": "length(data('data_0')) == 2 ? 1 : length(data('data_0')) == 3 ? 0.5 : length(data('data_0')) == 4 ? 0 : 0",
},
},
"type": "temporal",
},
"y": {
"aggregate": "count",
"axis": null,
"type": "quantitative",
},
},
"mark": {
"color": "#027864",
"type": "bar",
},
},
{
"encoding": {
"color": {
"condition": {
"test": "datum["bin_maxbins_10_date_range"] === "null"",
"value": "#cc4e00",
},
"value": "#027864",
},
"tooltip": [
{
"bin": {
"binned": true,
},
"field": "bin_maxbins_10_date",
"format": "%Y-%m-%d",
"title": "date (start)",
"type": "temporal",
},
{
"bin": {
"binned": true,
},
"field": "bin_maxbins_10_date_end",
"format": "%Y-%m-%d",
"title": "date (end)",
"type": "temporal",
},
{
"aggregate": "count",
"format": ",d",
"title": "Count",
"type": "quantitative",
},
],
"x": {
"axis": null,
"bin": true,
"field": "date",
"scale": {
"align": 0,
"paddingInner": 0,
"paddingOuter": {
"expr": "length(data('data_0')) == 2 ? 1 : length(data('data_0')) == 3 ? 0.5 : length(data('data_0')) == 4 ? 0 : 0",
},
},
"type": "temporal",
},
"y": {
"aggregate": "max",
"axis": null,
"type": "quantitative",
},
},
"mark": {
"opacity": 0,
"type": "bar",
},
},
],
}
`;

exports[`ColumnChartSpecModel > snapshot with legacy data spec > array 1`] = `
{
"background": "transparent",
Expand Down
Loading
Loading