Skip to content

Commit

Permalink
fix: boxplot should include description on the box layer, not mid tick
Browse files Browse the repository at this point in the history
  • Loading branch information
kanitw committed Jun 28, 2020
1 parent 85d6432 commit a96db36
Show file tree
Hide file tree
Showing 41 changed files with 141 additions and 136 deletions.
2 changes: 1 addition & 1 deletion examples/compiled/boxplot_1D_horizontal.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions examples/compiled/boxplot_1D_horizontal.vg.json
Expand Up @@ -158,14 +158,17 @@
"name": "layer_1_layer_0_marks",
"type": "rect",
"style": ["bar", "boxplot-box"],
"aria": false,
"from": {"data": "data_3"},
"encode": {
"update": {
"ariaRoleDescription": {"value": "box"},
"fill": {"value": "#4c78a8"},
"tooltip": {
"signal": "{\"Max of Body Mass (g)\": format(datum[\"max_Body Mass (g)\"], \"\"), \"Q3 of Body Mass (g)\": format(datum[\"upper_box_Body Mass (g)\"], \"\"), \"Median of Body Mass (g)\": format(datum[\"mid_box_Body Mass (g)\"], \"\"), \"Q1 of Body Mass (g)\": format(datum[\"lower_box_Body Mass (g)\"], \"\"), \"Min of Body Mass (g)\": format(datum[\"min_Body Mass (g)\"], \"\")}"
},
"description": {
"signal": "\"Body Mass (g): \" + (format(datum[\"lower_box_Body Mass (g)\"], \"\")) + \"; upper_box_Body Mass (g): \" + (format(datum[\"upper_box_Body Mass (g)\"], \"\")) + \"; Max of Body Mass (g): \" + (format(datum[\"max_Body Mass (g)\"], \"\")) + \"; Q3 of Body Mass (g): \" + (format(datum[\"upper_box_Body Mass (g)\"], \"\")) + \"; Median of Body Mass (g): \" + (format(datum[\"mid_box_Body Mass (g)\"], \"\")) + \"; Q1 of Body Mass (g): \" + (format(datum[\"lower_box_Body Mass (g)\"], \"\")) + \"; Min of Body Mass (g): \" + (format(datum[\"min_Body Mass (g)\"], \"\"))"
},
"x": {"scale": "x", "field": "lower_box_Body Mass (g)"},
"x2": {"scale": "x", "field": "upper_box_Body Mass (g)"},
"yc": {"signal": "height", "mult": 0.5},
Expand All @@ -177,18 +180,15 @@
"name": "layer_1_layer_1_marks",
"type": "rect",
"style": ["tick", "boxplot-median"],
"aria": false,
"from": {"data": "data_3"},
"encode": {
"update": {
"ariaRoleDescription": {"value": "box"},
"opacity": {"value": 0.7},
"fill": {"value": "white"},
"tooltip": {
"signal": "{\"Max of Body Mass (g)\": format(datum[\"max_Body Mass (g)\"], \"\"), \"Q3 of Body Mass (g)\": format(datum[\"upper_box_Body Mass (g)\"], \"\"), \"Median of Body Mass (g)\": format(datum[\"mid_box_Body Mass (g)\"], \"\"), \"Q1 of Body Mass (g)\": format(datum[\"lower_box_Body Mass (g)\"], \"\"), \"Min of Body Mass (g)\": format(datum[\"min_Body Mass (g)\"], \"\")}"
},
"description": {
"signal": "\"Body Mass (g): \" + (format(datum[\"mid_box_Body Mass (g)\"], \"\")) + \"; Max of Body Mass (g): \" + (format(datum[\"max_Body Mass (g)\"], \"\")) + \"; Q3 of Body Mass (g): \" + (format(datum[\"upper_box_Body Mass (g)\"], \"\")) + \"; Median of Body Mass (g): \" + (format(datum[\"mid_box_Body Mass (g)\"], \"\")) + \"; Q1 of Body Mass (g): \" + (format(datum[\"lower_box_Body Mass (g)\"], \"\")) + \"; Min of Body Mass (g): \" + (format(datum[\"min_Body Mass (g)\"], \"\"))"
},
"xc": {"scale": "x", "field": "mid_box_Body Mass (g)"},
"yc": {"signal": "height", "mult": 0.5},
"height": {"value": 14},
Expand Down

0 comments on commit a96db36

Please sign in to comment.