Skip to content

Commit

Permalink
fix(#9480): apply proper quote escapes for the datum access expression (
Browse files Browse the repository at this point in the history
#9479)

## PR Description

**Problem**

The expression like 
```
`datum["${str}"]`
```
which is vulnerable when `str` has double quotes, such as `'hello,
"world"'`.

The expression with single quotes is the same
```
`datum['${str}']`
```
which is vulnerable when `str` has single quotes, such as `"Vega's
Favorite"`.

**Solution**
This PR fixes the existing datum access expression to have a proper
quote escape by calling `accessWithDatumToUnescapedPath`

It fixes the issue of timeunit band position transforms which don't
escape the field name correctly.

#9480

---------

Co-authored-by: GitHub Actions Bot <[email protected]>
  • Loading branch information
yhoonkim and GitHub Actions Bot authored Dec 3, 2024
1 parent ac3f4fd commit 6a73892
Show file tree
Hide file tree
Showing 72 changed files with 222 additions and 163 deletions.
4 changes: 2 additions & 2 deletions examples/compiled/bar_grouped_errorbar.vg.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@
"transform": [
{
"type": "formula",
"expr": "datum[\"center_Acceleration\"] + datum[\"extent_Acceleration\"]",
"expr": "datum['center_Acceleration'] + datum['extent_Acceleration']",
"as": "upper_Acceleration"
},
{
"type": "formula",
"expr": "datum[\"center_Acceleration\"] - datum[\"extent_Acceleration\"]",
"expr": "datum['center_Acceleration'] - datum['extent_Acceleration']",
"as": "lower_Acceleration"
},
{
Expand Down
4 changes: 2 additions & 2 deletions examples/compiled/boxplot_1D_horizontal.vg.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"transform": [
{
"type": "filter",
"expr": "(datum[\"Body Mass (g)\"] < datum[\"lower_box_Body Mass (g)\"] - 1.5 * (datum[\"upper_box_Body Mass (g)\"] - datum[\"lower_box_Body Mass (g)\"])) || (datum[\"Body Mass (g)\"] > datum[\"upper_box_Body Mass (g)\"] + 1.5 * (datum[\"upper_box_Body Mass (g)\"] - datum[\"lower_box_Body Mass (g)\"]))"
"expr": "(datum['Body Mass (g)'] < datum['lower_box_Body Mass (g)'] - 1.5 * (datum['upper_box_Body Mass (g)'] - datum['lower_box_Body Mass (g)'])) || (datum['Body Mass (g)'] > datum['upper_box_Body Mass (g)'] + 1.5 * (datum['upper_box_Body Mass (g)'] - datum['lower_box_Body Mass (g)']))"
},
{
"type": "filter",
Expand All @@ -45,7 +45,7 @@
"transform": [
{
"type": "filter",
"expr": "(datum[\"lower_box_Body Mass (g)\"] - 1.5 * (datum[\"upper_box_Body Mass (g)\"] - datum[\"lower_box_Body Mass (g)\"]) <= datum[\"Body Mass (g)\"]) && (datum[\"Body Mass (g)\"] <= datum[\"upper_box_Body Mass (g)\"] + 1.5 * (datum[\"upper_box_Body Mass (g)\"] - datum[\"lower_box_Body Mass (g)\"]))"
"expr": "(datum['lower_box_Body Mass (g)'] - 1.5 * (datum['upper_box_Body Mass (g)'] - datum['lower_box_Body Mass (g)']) <= datum['Body Mass (g)']) && (datum['Body Mass (g)'] <= datum['upper_box_Body Mass (g)'] + 1.5 * (datum['upper_box_Body Mass (g)'] - datum['lower_box_Body Mass (g)']))"
},
{
"type": "aggregate",
Expand Down
4 changes: 2 additions & 2 deletions examples/compiled/boxplot_1D_horizontal_custom_mark.vg.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"transform": [
{
"type": "filter",
"expr": "(datum[\"Body Mass (g)\"] < datum[\"lower_box_Body Mass (g)\"] - 1.5 * (datum[\"upper_box_Body Mass (g)\"] - datum[\"lower_box_Body Mass (g)\"])) || (datum[\"Body Mass (g)\"] > datum[\"upper_box_Body Mass (g)\"] + 1.5 * (datum[\"upper_box_Body Mass (g)\"] - datum[\"lower_box_Body Mass (g)\"]))"
"expr": "(datum['Body Mass (g)'] < datum['lower_box_Body Mass (g)'] - 1.5 * (datum['upper_box_Body Mass (g)'] - datum['lower_box_Body Mass (g)'])) || (datum['Body Mass (g)'] > datum['upper_box_Body Mass (g)'] + 1.5 * (datum['upper_box_Body Mass (g)'] - datum['lower_box_Body Mass (g)']))"
},
{
"type": "filter",
Expand All @@ -45,7 +45,7 @@
"transform": [
{
"type": "filter",
"expr": "(datum[\"lower_box_Body Mass (g)\"] - 1.5 * (datum[\"upper_box_Body Mass (g)\"] - datum[\"lower_box_Body Mass (g)\"]) <= datum[\"Body Mass (g)\"]) && (datum[\"Body Mass (g)\"] <= datum[\"upper_box_Body Mass (g)\"] + 1.5 * (datum[\"upper_box_Body Mass (g)\"] - datum[\"lower_box_Body Mass (g)\"]))"
"expr": "(datum['lower_box_Body Mass (g)'] - 1.5 * (datum['upper_box_Body Mass (g)'] - datum['lower_box_Body Mass (g)']) <= datum['Body Mass (g)']) && (datum['Body Mass (g)'] <= datum['upper_box_Body Mass (g)'] + 1.5 * (datum['upper_box_Body Mass (g)'] - datum['lower_box_Body Mass (g)']))"
},
{
"type": "aggregate",
Expand Down
4 changes: 2 additions & 2 deletions examples/compiled/boxplot_1D_horizontal_explicit.vg.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"transform": [
{
"type": "filter",
"expr": "(datum[\"Body Mass (g)\"] < datum[\"lower_box_Body Mass (g)\"] - 1.5 * (datum[\"upper_box_Body Mass (g)\"] - datum[\"lower_box_Body Mass (g)\"])) || (datum[\"Body Mass (g)\"] > datum[\"upper_box_Body Mass (g)\"] + 1.5 * (datum[\"upper_box_Body Mass (g)\"] - datum[\"lower_box_Body Mass (g)\"]))"
"expr": "(datum['Body Mass (g)'] < datum['lower_box_Body Mass (g)'] - 1.5 * (datum['upper_box_Body Mass (g)'] - datum['lower_box_Body Mass (g)'])) || (datum['Body Mass (g)'] > datum['upper_box_Body Mass (g)'] + 1.5 * (datum['upper_box_Body Mass (g)'] - datum['lower_box_Body Mass (g)']))"
},
{
"type": "filter",
Expand All @@ -45,7 +45,7 @@
"transform": [
{
"type": "filter",
"expr": "(datum[\"lower_box_Body Mass (g)\"] - 1.5 * (datum[\"upper_box_Body Mass (g)\"] - datum[\"lower_box_Body Mass (g)\"]) <= datum[\"Body Mass (g)\"]) && (datum[\"Body Mass (g)\"] <= datum[\"upper_box_Body Mass (g)\"] + 1.5 * (datum[\"upper_box_Body Mass (g)\"] - datum[\"lower_box_Body Mass (g)\"]))"
"expr": "(datum['lower_box_Body Mass (g)'] - 1.5 * (datum['upper_box_Body Mass (g)'] - datum['lower_box_Body Mass (g)']) <= datum['Body Mass (g)']) && (datum['Body Mass (g)'] <= datum['upper_box_Body Mass (g)'] + 1.5 * (datum['upper_box_Body Mass (g)'] - datum['lower_box_Body Mass (g)']))"
},
{
"type": "aggregate",
Expand Down
4 changes: 2 additions & 2 deletions examples/compiled/boxplot_1D_invalid.vg.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"transform": [
{
"type": "filter",
"expr": "(datum[\"b\"] < datum[\"lower_box_b\"] - 1.5 * (datum[\"upper_box_b\"] - datum[\"lower_box_b\"])) || (datum[\"b\"] > datum[\"upper_box_b\"] + 1.5 * (datum[\"upper_box_b\"] - datum[\"lower_box_b\"]))"
"expr": "(datum['b'] < datum['lower_box_b'] - 1.5 * (datum['upper_box_b'] - datum['lower_box_b'])) || (datum['b'] > datum['upper_box_b'] + 1.5 * (datum['upper_box_b'] - datum['lower_box_b']))"
},
{
"type": "filter",
Expand All @@ -50,7 +50,7 @@
"transform": [
{
"type": "filter",
"expr": "(datum[\"lower_box_b\"] - 1.5 * (datum[\"upper_box_b\"] - datum[\"lower_box_b\"]) <= datum[\"b\"]) && (datum[\"b\"] <= datum[\"upper_box_b\"] + 1.5 * (datum[\"upper_box_b\"] - datum[\"lower_box_b\"]))"
"expr": "(datum['lower_box_b'] - 1.5 * (datum['upper_box_b'] - datum['lower_box_b']) <= datum['b']) && (datum['b'] <= datum['upper_box_b'] + 1.5 * (datum['upper_box_b'] - datum['lower_box_b']))"
},
{
"type": "aggregate",
Expand Down
4 changes: 2 additions & 2 deletions examples/compiled/boxplot_1D_vertical.vg.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"transform": [
{
"type": "filter",
"expr": "(datum[\"Body Mass (g)\"] < datum[\"lower_box_Body Mass (g)\"] - 1.5 * (datum[\"upper_box_Body Mass (g)\"] - datum[\"lower_box_Body Mass (g)\"])) || (datum[\"Body Mass (g)\"] > datum[\"upper_box_Body Mass (g)\"] + 1.5 * (datum[\"upper_box_Body Mass (g)\"] - datum[\"lower_box_Body Mass (g)\"]))"
"expr": "(datum['Body Mass (g)'] < datum['lower_box_Body Mass (g)'] - 1.5 * (datum['upper_box_Body Mass (g)'] - datum['lower_box_Body Mass (g)'])) || (datum['Body Mass (g)'] > datum['upper_box_Body Mass (g)'] + 1.5 * (datum['upper_box_Body Mass (g)'] - datum['lower_box_Body Mass (g)']))"
},
{
"type": "filter",
Expand All @@ -45,7 +45,7 @@
"transform": [
{
"type": "filter",
"expr": "(datum[\"lower_box_Body Mass (g)\"] - 1.5 * (datum[\"upper_box_Body Mass (g)\"] - datum[\"lower_box_Body Mass (g)\"]) <= datum[\"Body Mass (g)\"]) && (datum[\"Body Mass (g)\"] <= datum[\"upper_box_Body Mass (g)\"] + 1.5 * (datum[\"upper_box_Body Mass (g)\"] - datum[\"lower_box_Body Mass (g)\"]))"
"expr": "(datum['lower_box_Body Mass (g)'] - 1.5 * (datum['upper_box_Body Mass (g)'] - datum['lower_box_Body Mass (g)']) <= datum['Body Mass (g)']) && (datum['Body Mass (g)'] <= datum['upper_box_Body Mass (g)'] + 1.5 * (datum['upper_box_Body Mass (g)'] - datum['lower_box_Body Mass (g)']))"
},
{
"type": "aggregate",
Expand Down
4 changes: 2 additions & 2 deletions examples/compiled/boxplot_2D_horizontal.vg.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"transform": [
{
"type": "filter",
"expr": "(datum[\"Body Mass (g)\"] < datum[\"lower_box_Body Mass (g)\"] - 1.5 * (datum[\"upper_box_Body Mass (g)\"] - datum[\"lower_box_Body Mass (g)\"])) || (datum[\"Body Mass (g)\"] > datum[\"upper_box_Body Mass (g)\"] + 1.5 * (datum[\"upper_box_Body Mass (g)\"] - datum[\"lower_box_Body Mass (g)\"]))"
"expr": "(datum['Body Mass (g)'] < datum['lower_box_Body Mass (g)'] - 1.5 * (datum['upper_box_Body Mass (g)'] - datum['lower_box_Body Mass (g)'])) || (datum['Body Mass (g)'] > datum['upper_box_Body Mass (g)'] + 1.5 * (datum['upper_box_Body Mass (g)'] - datum['lower_box_Body Mass (g)']))"
},
{
"type": "filter",
Expand All @@ -44,7 +44,7 @@
"transform": [
{
"type": "filter",
"expr": "(datum[\"lower_box_Body Mass (g)\"] - 1.5 * (datum[\"upper_box_Body Mass (g)\"] - datum[\"lower_box_Body Mass (g)\"]) <= datum[\"Body Mass (g)\"]) && (datum[\"Body Mass (g)\"] <= datum[\"upper_box_Body Mass (g)\"] + 1.5 * (datum[\"upper_box_Body Mass (g)\"] - datum[\"lower_box_Body Mass (g)\"]))"
"expr": "(datum['lower_box_Body Mass (g)'] - 1.5 * (datum['upper_box_Body Mass (g)'] - datum['lower_box_Body Mass (g)']) <= datum['Body Mass (g)']) && (datum['Body Mass (g)'] <= datum['upper_box_Body Mass (g)'] + 1.5 * (datum['upper_box_Body Mass (g)'] - datum['lower_box_Body Mass (g)']))"
},
{
"type": "aggregate",
Expand Down
4 changes: 2 additions & 2 deletions examples/compiled/boxplot_2D_horizontal_color_size.vg.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"transform": [
{
"type": "filter",
"expr": "(datum[\"Body Mass (g)\"] < datum[\"lower_box_Body Mass (g)\"] - 1.5 * (datum[\"upper_box_Body Mass (g)\"] - datum[\"lower_box_Body Mass (g)\"])) || (datum[\"Body Mass (g)\"] > datum[\"upper_box_Body Mass (g)\"] + 1.5 * (datum[\"upper_box_Body Mass (g)\"] - datum[\"lower_box_Body Mass (g)\"]))"
"expr": "(datum['Body Mass (g)'] < datum['lower_box_Body Mass (g)'] - 1.5 * (datum['upper_box_Body Mass (g)'] - datum['lower_box_Body Mass (g)'])) || (datum['Body Mass (g)'] > datum['upper_box_Body Mass (g)'] + 1.5 * (datum['upper_box_Body Mass (g)'] - datum['lower_box_Body Mass (g)']))"
},
{
"type": "filter",
Expand All @@ -44,7 +44,7 @@
"transform": [
{
"type": "filter",
"expr": "(datum[\"lower_box_Body Mass (g)\"] - 1.5 * (datum[\"upper_box_Body Mass (g)\"] - datum[\"lower_box_Body Mass (g)\"]) <= datum[\"Body Mass (g)\"]) && (datum[\"Body Mass (g)\"] <= datum[\"upper_box_Body Mass (g)\"] + 1.5 * (datum[\"upper_box_Body Mass (g)\"] - datum[\"lower_box_Body Mass (g)\"]))"
"expr": "(datum['lower_box_Body Mass (g)'] - 1.5 * (datum['upper_box_Body Mass (g)'] - datum['lower_box_Body Mass (g)']) <= datum['Body Mass (g)']) && (datum['Body Mass (g)'] <= datum['upper_box_Body Mass (g)'] + 1.5 * (datum['upper_box_Body Mass (g)'] - datum['lower_box_Body Mass (g)']))"
},
{
"type": "aggregate",
Expand Down
4 changes: 2 additions & 2 deletions examples/compiled/boxplot_2D_vertical.vg.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"transform": [
{
"type": "filter",
"expr": "(datum[\"Body Mass (g)\"] < datum[\"lower_box_Body Mass (g)\"] - 1.5 * (datum[\"upper_box_Body Mass (g)\"] - datum[\"lower_box_Body Mass (g)\"])) || (datum[\"Body Mass (g)\"] > datum[\"upper_box_Body Mass (g)\"] + 1.5 * (datum[\"upper_box_Body Mass (g)\"] - datum[\"lower_box_Body Mass (g)\"]))"
"expr": "(datum['Body Mass (g)'] < datum['lower_box_Body Mass (g)'] - 1.5 * (datum['upper_box_Body Mass (g)'] - datum['lower_box_Body Mass (g)'])) || (datum['Body Mass (g)'] > datum['upper_box_Body Mass (g)'] + 1.5 * (datum['upper_box_Body Mass (g)'] - datum['lower_box_Body Mass (g)']))"
},
{
"type": "filter",
Expand All @@ -44,7 +44,7 @@
"transform": [
{
"type": "filter",
"expr": "(datum[\"lower_box_Body Mass (g)\"] - 1.5 * (datum[\"upper_box_Body Mass (g)\"] - datum[\"lower_box_Body Mass (g)\"]) <= datum[\"Body Mass (g)\"]) && (datum[\"Body Mass (g)\"] <= datum[\"upper_box_Body Mass (g)\"] + 1.5 * (datum[\"upper_box_Body Mass (g)\"] - datum[\"lower_box_Body Mass (g)\"]))"
"expr": "(datum['lower_box_Body Mass (g)'] - 1.5 * (datum['upper_box_Body Mass (g)'] - datum['lower_box_Body Mass (g)']) <= datum['Body Mass (g)']) && (datum['Body Mass (g)'] <= datum['upper_box_Body Mass (g)'] + 1.5 * (datum['upper_box_Body Mass (g)'] - datum['lower_box_Body Mass (g)']))"
},
{
"type": "aggregate",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"transform": [
{
"type": "filter",
"expr": "(datum[\"b\"] < datum[\"lower_box_b\"] - 1.5 * (datum[\"upper_box_b\"] - datum[\"lower_box_b\"])) || (datum[\"b\"] > datum[\"upper_box_b\"] + 1.5 * (datum[\"upper_box_b\"] - datum[\"lower_box_b\"]))"
"expr": "(datum['b'] < datum['lower_box_b'] - 1.5 * (datum['upper_box_b'] - datum['lower_box_b'])) || (datum['b'] > datum['upper_box_b'] + 1.5 * (datum['upper_box_b'] - datum['lower_box_b']))"
},
{
"type": "filter",
Expand All @@ -43,7 +43,7 @@
"transform": [
{
"type": "filter",
"expr": "(datum[\"lower_box_b\"] - 1.5 * (datum[\"upper_box_b\"] - datum[\"lower_box_b\"]) <= datum[\"b\"]) && (datum[\"b\"] <= datum[\"upper_box_b\"] + 1.5 * (datum[\"upper_box_b\"] - datum[\"lower_box_b\"]))"
"expr": "(datum['lower_box_b'] - 1.5 * (datum['upper_box_b'] - datum['lower_box_b']) <= datum['b']) && (datum['b'] <= datum['upper_box_b'] + 1.5 * (datum['upper_box_b'] - datum['lower_box_b']))"
},
{
"type": "aggregate",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"transform": [
{
"type": "filter",
"expr": "(datum[\"b\"] < datum[\"lower_box_b\"] - 1.5 * (datum[\"upper_box_b\"] - datum[\"lower_box_b\"])) || (datum[\"b\"] > datum[\"upper_box_b\"] + 1.5 * (datum[\"upper_box_b\"] - datum[\"lower_box_b\"]))"
"expr": "(datum['b'] < datum['lower_box_b'] - 1.5 * (datum['upper_box_b'] - datum['lower_box_b'])) || (datum['b'] > datum['upper_box_b'] + 1.5 * (datum['upper_box_b'] - datum['lower_box_b']))"
},
{
"type": "filter",
Expand All @@ -43,7 +43,7 @@
"transform": [
{
"type": "filter",
"expr": "(datum[\"lower_box_b\"] - 1.5 * (datum[\"upper_box_b\"] - datum[\"lower_box_b\"]) <= datum[\"b\"]) && (datum[\"b\"] <= datum[\"upper_box_b\"] + 1.5 * (datum[\"upper_box_b\"] - datum[\"lower_box_b\"]))"
"expr": "(datum['lower_box_b'] - 1.5 * (datum['upper_box_b'] - datum['lower_box_b']) <= datum['b']) && (datum['b'] <= datum['upper_box_b'] + 1.5 * (datum['upper_box_b'] - datum['lower_box_b']))"
},
{
"type": "aggregate",
Expand Down
4 changes: 2 additions & 2 deletions examples/compiled/boxplot_groupped.vg.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"transform": [
{
"type": "filter",
"expr": "(datum[\"Acceleration\"] < datum[\"lower_box_Acceleration\"] - 1.5 * (datum[\"upper_box_Acceleration\"] - datum[\"lower_box_Acceleration\"])) || (datum[\"Acceleration\"] > datum[\"upper_box_Acceleration\"] + 1.5 * (datum[\"upper_box_Acceleration\"] - datum[\"lower_box_Acceleration\"]))"
"expr": "(datum['Acceleration'] < datum['lower_box_Acceleration'] - 1.5 * (datum['upper_box_Acceleration'] - datum['lower_box_Acceleration'])) || (datum['Acceleration'] > datum['upper_box_Acceleration'] + 1.5 * (datum['upper_box_Acceleration'] - datum['lower_box_Acceleration']))"
},
{
"type": "filter",
Expand All @@ -40,7 +40,7 @@
"transform": [
{
"type": "filter",
"expr": "(datum[\"lower_box_Acceleration\"] - 1.5 * (datum[\"upper_box_Acceleration\"] - datum[\"lower_box_Acceleration\"]) <= datum[\"Acceleration\"]) && (datum[\"Acceleration\"] <= datum[\"upper_box_Acceleration\"] + 1.5 * (datum[\"upper_box_Acceleration\"] - datum[\"lower_box_Acceleration\"]))"
"expr": "(datum['lower_box_Acceleration'] - 1.5 * (datum['upper_box_Acceleration'] - datum['lower_box_Acceleration']) <= datum['Acceleration']) && (datum['Acceleration'] <= datum['upper_box_Acceleration'] + 1.5 * (datum['upper_box_Acceleration'] - datum['lower_box_Acceleration']))"
},
{
"type": "aggregate",
Expand Down
4 changes: 2 additions & 2 deletions examples/compiled/boxplot_tooltip_aggregate.vg.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"transform": [
{
"type": "filter",
"expr": "(datum[\"Body Mass (g)\"] < datum[\"lower_box_Body Mass (g)\"] - 1.5 * (datum[\"upper_box_Body Mass (g)\"] - datum[\"lower_box_Body Mass (g)\"])) || (datum[\"Body Mass (g)\"] > datum[\"upper_box_Body Mass (g)\"] + 1.5 * (datum[\"upper_box_Body Mass (g)\"] - datum[\"lower_box_Body Mass (g)\"]))"
"expr": "(datum['Body Mass (g)'] < datum['lower_box_Body Mass (g)'] - 1.5 * (datum['upper_box_Body Mass (g)'] - datum['lower_box_Body Mass (g)'])) || (datum['Body Mass (g)'] > datum['upper_box_Body Mass (g)'] + 1.5 * (datum['upper_box_Body Mass (g)'] - datum['lower_box_Body Mass (g)']))"
},
{
"type": "filter",
Expand All @@ -44,7 +44,7 @@
"transform": [
{
"type": "filter",
"expr": "(datum[\"lower_box_Body Mass (g)\"] - 1.5 * (datum[\"upper_box_Body Mass (g)\"] - datum[\"lower_box_Body Mass (g)\"]) <= datum[\"Body Mass (g)\"]) && (datum[\"Body Mass (g)\"] <= datum[\"upper_box_Body Mass (g)\"] + 1.5 * (datum[\"upper_box_Body Mass (g)\"] - datum[\"lower_box_Body Mass (g)\"]))"
"expr": "(datum['lower_box_Body Mass (g)'] - 1.5 * (datum['upper_box_Body Mass (g)'] - datum['lower_box_Body Mass (g)']) <= datum['Body Mass (g)']) && (datum['Body Mass (g)'] <= datum['upper_box_Body Mass (g)'] + 1.5 * (datum['upper_box_Body Mass (g)'] - datum['lower_box_Body Mass (g)']))"
},
{
"type": "aggregate",
Expand Down
4 changes: 2 additions & 2 deletions examples/compiled/boxplot_tooltip_not_aggregate.vg.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"transform": [
{
"type": "filter",
"expr": "(datum[\"Body Mass (g)\"] < datum[\"lower_box_Body Mass (g)\"] - 1.5 * (datum[\"upper_box_Body Mass (g)\"] - datum[\"lower_box_Body Mass (g)\"])) || (datum[\"Body Mass (g)\"] > datum[\"upper_box_Body Mass (g)\"] + 1.5 * (datum[\"upper_box_Body Mass (g)\"] - datum[\"lower_box_Body Mass (g)\"]))"
"expr": "(datum['Body Mass (g)'] < datum['lower_box_Body Mass (g)'] - 1.5 * (datum['upper_box_Body Mass (g)'] - datum['lower_box_Body Mass (g)'])) || (datum['Body Mass (g)'] > datum['upper_box_Body Mass (g)'] + 1.5 * (datum['upper_box_Body Mass (g)'] - datum['lower_box_Body Mass (g)']))"
},
{
"type": "filter",
Expand All @@ -44,7 +44,7 @@
"transform": [
{
"type": "filter",
"expr": "(datum[\"lower_box_Body Mass (g)\"] - 1.5 * (datum[\"upper_box_Body Mass (g)\"] - datum[\"lower_box_Body Mass (g)\"]) <= datum[\"Body Mass (g)\"]) && (datum[\"Body Mass (g)\"] <= datum[\"upper_box_Body Mass (g)\"] + 1.5 * (datum[\"upper_box_Body Mass (g)\"] - datum[\"lower_box_Body Mass (g)\"]))"
"expr": "(datum['lower_box_Body Mass (g)'] - 1.5 * (datum['upper_box_Body Mass (g)'] - datum['lower_box_Body Mass (g)']) <= datum['Body Mass (g)']) && (datum['Body Mass (g)'] <= datum['upper_box_Body Mass (g)'] + 1.5 * (datum['upper_box_Body Mass (g)'] - datum['lower_box_Body Mass (g)']))"
},
{
"type": "aggregate",
Expand Down
4 changes: 2 additions & 2 deletions examples/compiled/errorband_tooltip.vg.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
},
{
"type": "formula",
"expr": "datum[\"center_Miles_per_Gallon\"] + datum[\"extent_Miles_per_Gallon\"]",
"expr": "datum['center_Miles_per_Gallon'] + datum['extent_Miles_per_Gallon']",
"as": "upper_Miles_per_Gallon"
},
{
"type": "formula",
"expr": "datum[\"center_Miles_per_Gallon\"] - datum[\"extent_Miles_per_Gallon\"]",
"expr": "datum['center_Miles_per_Gallon'] - datum['extent_Miles_per_Gallon']",
"as": "lower_Miles_per_Gallon"
}
]
Expand Down
4 changes: 2 additions & 2 deletions examples/compiled/errorbar_tooltip.vg.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
},
{
"type": "formula",
"expr": "datum[\"center_yield\"] + datum[\"extent_yield\"]",
"expr": "datum['center_yield'] + datum['extent_yield']",
"as": "upper_yield"
},
{
"type": "formula",
"expr": "datum[\"center_yield\"] - datum[\"extent_yield\"]",
"expr": "datum['center_yield'] - datum['extent_yield']",
"as": "lower_yield"
},
{
Expand Down
Loading

0 comments on commit 6a73892

Please sign in to comment.