diff --git a/examples/compiled/area_horizon.vg.json b/examples/compiled/area_horizon.vg.json index 02c51e3625..f57b3a2db2 100644 --- a/examples/compiled/area_horizon.vg.json +++ b/examples/compiled/area_horizon.vg.json @@ -114,7 +114,6 @@ "type": "linear", "domain": [0, 50], "range": [{"signal": "height"}, 0], - "nice": true, "zero": true } ], diff --git a/examples/compiled/bar_count_minimap.vg.json b/examples/compiled/bar_count_minimap.vg.json index ecd268d08c..5366bdfc0a 100644 --- a/examples/compiled/bar_count_minimap.vg.json +++ b/examples/compiled/bar_count_minimap.vg.json @@ -417,7 +417,6 @@ "type": "linear", "domain": [0, 6], "range": [0, {"signal": "concat_0_width"}], - "nice": true, "zero": true }, { diff --git a/examples/compiled/bar_layered_weather.vg.json b/examples/compiled/bar_layered_weather.vg.json index 0db09e91e0..c3cf028d0f 100644 --- a/examples/compiled/bar_layered_weather.vg.json +++ b/examples/compiled/bar_layered_weather.vg.json @@ -363,7 +363,6 @@ "type": "linear", "domain": [10, 70], "range": [{"signal": "height"}, 0], - "nice": true, "zero": false } ], diff --git a/examples/compiled/circle_custom_tick_labels.vg.json b/examples/compiled/circle_custom_tick_labels.vg.json index 2def6bdb7d..3187316538 100644 --- a/examples/compiled/circle_custom_tick_labels.vg.json +++ b/examples/compiled/circle_custom_tick_labels.vg.json @@ -58,7 +58,6 @@ "type": "linear", "domain": [0, 10], "range": [0, {"signal": "width"}], - "nice": true, "zero": true }, { diff --git a/examples/compiled/concat_layer_voyager_result.vg.json b/examples/compiled/concat_layer_voyager_result.vg.json index 0f5f6474dd..5d38013430 100644 --- a/examples/compiled/concat_layer_voyager_result.vg.json +++ b/examples/compiled/concat_layer_voyager_result.vg.json @@ -347,7 +347,6 @@ "type": "linear", "domain": [-3, 3], "range": [0, {"signal": "width"}], - "nice": true, "zero": true }, { diff --git a/examples/compiled/concat_marginal_histograms.vg.json b/examples/compiled/concat_marginal_histograms.vg.json index 90be61ced6..f4e47eb2f4 100644 --- a/examples/compiled/concat_marginal_histograms.vg.json +++ b/examples/compiled/concat_marginal_histograms.vg.json @@ -391,7 +391,6 @@ "type": "linear", "domain": [0, 1000], "range": [{"signal": "concat_0_height"}, 0], - "nice": true, "zero": true }, { @@ -421,7 +420,6 @@ "type": "linear", "domain": [0, 1000], "range": [0, {"signal": "concat_1_concat_1_width"}], - "nice": true, "zero": true }, { diff --git a/examples/compiled/interactive_global_development.vg.json b/examples/compiled/interactive_global_development.vg.json index d5d452129f..bd05a3c927 100644 --- a/examples/compiled/interactive_global_development.vg.json +++ b/examples/compiled/interactive_global_development.vg.json @@ -401,7 +401,6 @@ "type": "linear", "domain": [0, 9], "range": [0, {"signal": "width"}], - "nice": true, "zero": true }, { @@ -409,7 +408,6 @@ "type": "linear", "domain": [20, 85], "range": [{"signal": "height"}, 0], - "nice": true, "zero": false }, { diff --git a/examples/compiled/interactive_seattle_weather.vg.json b/examples/compiled/interactive_seattle_weather.vg.json index 928ed24aec..6790a1e1a6 100644 --- a/examples/compiled/interactive_seattle_weather.vg.json +++ b/examples/compiled/interactive_seattle_weather.vg.json @@ -563,7 +563,6 @@ "type": "linear", "domain": [-5, 40], "range": [{"signal": "concat_0_height"}, 0], - "nice": true, "zero": true }, { diff --git a/examples/compiled/layer_bar_labels.vg.json b/examples/compiled/layer_bar_labels.vg.json index a1213323b3..2a388cc48b 100644 --- a/examples/compiled/layer_bar_labels.vg.json +++ b/examples/compiled/layer_bar_labels.vg.json @@ -93,7 +93,6 @@ "type": "linear", "domain": [0, 60], "range": [0, {"signal": "width"}], - "nice": true, "zero": true }, { diff --git a/examples/compiled/layer_bar_labels_grey.vg.json b/examples/compiled/layer_bar_labels_grey.vg.json index d7a6f7bf4a..9538d9226a 100644 --- a/examples/compiled/layer_bar_labels_grey.vg.json +++ b/examples/compiled/layer_bar_labels_grey.vg.json @@ -85,7 +85,6 @@ "type": "linear", "domain": [0, 10], "range": [0, {"signal": "width"}], - "nice": true, "zero": true }, { diff --git a/examples/compiled/layer_dual_axis.vg.json b/examples/compiled/layer_dual_axis.vg.json index 86b8717e06..781c9f0b87 100644 --- a/examples/compiled/layer_dual_axis.vg.json +++ b/examples/compiled/layer_dual_axis.vg.json @@ -91,7 +91,6 @@ "type": "linear", "domain": [0, 30], "range": [{"signal": "height"}, 0], - "nice": true, "zero": true }, { diff --git a/examples/compiled/layer_likert.vg.json b/examples/compiled/layer_likert.vg.json index 70feb36bc7..5e2340db7d 100644 --- a/examples/compiled/layer_likert.vg.json +++ b/examples/compiled/layer_likert.vg.json @@ -346,7 +346,6 @@ "type": "linear", "domain": [0, 6], "range": [0, {"signal": "width"}], - "nice": true, "zero": true }, { diff --git a/examples/compiled/line_inside_domain_using_clip.png b/examples/compiled/line_inside_domain_using_clip.png index 5cbbc13508..16e6fd104b 100644 Binary files a/examples/compiled/line_inside_domain_using_clip.png and b/examples/compiled/line_inside_domain_using_clip.png differ diff --git a/examples/compiled/line_inside_domain_using_clip.svg b/examples/compiled/line_inside_domain_using_clip.svg index d3473ed009..91e306af07 100644 --- a/examples/compiled/line_inside_domain_using_clip.svg +++ b/examples/compiled/line_inside_domain_using_clip.svg @@ -1 +1 @@ -300350400450wavelength01234power \ No newline at end of file +300320340360380400420440wavelength01234power \ No newline at end of file diff --git a/examples/compiled/line_inside_domain_using_clip.vg.json b/examples/compiled/line_inside_domain_using_clip.vg.json index 5a1797ca0f..2627e228c1 100644 --- a/examples/compiled/line_inside_domain_using_clip.vg.json +++ b/examples/compiled/line_inside_domain_using_clip.vg.json @@ -57,7 +57,6 @@ "type": "linear", "domain": [300, 450], "range": [0, {"signal": "width"}], - "nice": true, "zero": false }, { diff --git a/examples/compiled/line_inside_domain_using_transform.png b/examples/compiled/line_inside_domain_using_transform.png index e4949cb7cf..d57949b231 100644 Binary files a/examples/compiled/line_inside_domain_using_transform.png and b/examples/compiled/line_inside_domain_using_transform.png differ diff --git a/examples/compiled/line_inside_domain_using_transform.svg b/examples/compiled/line_inside_domain_using_transform.svg index fd94335202..f568bda84a 100644 --- a/examples/compiled/line_inside_domain_using_transform.svg +++ b/examples/compiled/line_inside_domain_using_transform.svg @@ -1 +1 @@ -300350400450wavelength01234power \ No newline at end of file +300320340360380400420440wavelength01234power \ No newline at end of file diff --git a/examples/compiled/line_inside_domain_using_transform.vg.json b/examples/compiled/line_inside_domain_using_transform.vg.json index 4d2b32af4c..3fbbac500e 100644 --- a/examples/compiled/line_inside_domain_using_transform.vg.json +++ b/examples/compiled/line_inside_domain_using_transform.vg.json @@ -57,7 +57,6 @@ "type": "linear", "domain": [300, 450], "range": [0, {"signal": "width"}], - "nice": true, "zero": false }, { diff --git a/examples/compiled/line_outside_domain.png b/examples/compiled/line_outside_domain.png index 320120d9fd..ed3acbed94 100644 Binary files a/examples/compiled/line_outside_domain.png and b/examples/compiled/line_outside_domain.png differ diff --git a/examples/compiled/line_outside_domain.svg b/examples/compiled/line_outside_domain.svg index 42ec1221e8..ef98fd2969 100644 --- a/examples/compiled/line_outside_domain.svg +++ b/examples/compiled/line_outside_domain.svg @@ -1 +1 @@ -300350400450wavelength01234power \ No newline at end of file +300320340360380400420440wavelength01234power \ No newline at end of file diff --git a/examples/compiled/line_outside_domain.vg.json b/examples/compiled/line_outside_domain.vg.json index 331fbc7a9a..844b832a0c 100644 --- a/examples/compiled/line_outside_domain.vg.json +++ b/examples/compiled/line_outside_domain.vg.json @@ -56,7 +56,6 @@ "type": "linear", "domain": [300, 450], "range": [0, {"signal": "width"}], - "nice": true, "zero": false }, { diff --git a/examples/compiled/line_timestamp_domain.vg.json b/examples/compiled/line_timestamp_domain.vg.json index 04ade41c18..14992bd60a 100644 --- a/examples/compiled/line_timestamp_domain.vg.json +++ b/examples/compiled/line_timestamp_domain.vg.json @@ -62,7 +62,6 @@ "type": "linear", "domain": [0, 5], "range": [{"signal": "height"}, 0], - "nice": true, "zero": true } ], diff --git a/examples/compiled/rect_params.vg.json b/examples/compiled/rect_params.vg.json index fc3c97148c..30a45ae521 100644 --- a/examples/compiled/rect_params.vg.json +++ b/examples/compiled/rect_params.vg.json @@ -58,7 +58,6 @@ "type": "linear", "domain": [0, 100], "range": [0, {"signal": "width"}], - "nice": true, "zero": true }, { @@ -66,7 +65,6 @@ "type": "linear", "domain": [0, 100], "range": [{"signal": "height"}, 0], - "nice": true, "zero": true } ], diff --git a/examples/compiled/rule_params.vg.json b/examples/compiled/rule_params.vg.json index b33ab84f65..20dccabc8c 100644 --- a/examples/compiled/rule_params.vg.json +++ b/examples/compiled/rule_params.vg.json @@ -73,7 +73,6 @@ "type": "linear", "domain": [0, 100], "range": [0, {"signal": "width"}], - "nice": true, "zero": true }, { @@ -81,7 +80,6 @@ "type": "linear", "domain": [0, 100], "range": [{"signal": "height"}, 0], - "nice": true, "zero": true } ], diff --git a/examples/compiled/selection_filter.png b/examples/compiled/selection_filter.png index 65910a39d2..0a61c9225f 100644 Binary files a/examples/compiled/selection_filter.png and b/examples/compiled/selection_filter.png differ diff --git a/examples/compiled/selection_filter.svg b/examples/compiled/selection_filter.svg index 8909e599a0..8c05830975 100644 --- a/examples/compiled/selection_filter.svg +++ b/examples/compiled/selection_filter.svg @@ -1 +1 @@ -050100150200Horsepower01020304050Miles_per_Gallon0510152025Acceleration0100200300400500Displacement \ No newline at end of file +050100150200Horsepower01020304050Miles_per_Gallon0510152025Acceleration0100200300400500Displacement \ No newline at end of file diff --git a/examples/compiled/selection_filter.vg.json b/examples/compiled/selection_filter.vg.json index 3bb3c5872e..0c671b59e1 100644 --- a/examples/compiled/selection_filter.vg.json +++ b/examples/compiled/selection_filter.vg.json @@ -550,7 +550,6 @@ "type": "linear", "domain": [0, 25], "range": [0, {"signal": "width"}], - "nice": true, "zero": true }, { @@ -558,7 +557,6 @@ "type": "linear", "domain": [0, 500], "range": [{"signal": "childHeight"}, 0], - "nice": true, "zero": true } ] diff --git a/examples/compiled/selection_filter_composition.png b/examples/compiled/selection_filter_composition.png index 9a02abe48e..fcfd8819ac 100644 Binary files a/examples/compiled/selection_filter_composition.png and b/examples/compiled/selection_filter_composition.png differ diff --git a/examples/compiled/selection_filter_composition.svg b/examples/compiled/selection_filter_composition.svg index 399fb2f1e2..83412c1a62 100644 --- a/examples/compiled/selection_filter_composition.svg +++ b/examples/compiled/selection_filter_composition.svg @@ -1 +1 @@ -050100150200Horsepower01020304050Miles_per_Gallon0510152025Acceleration0100200300400500Displacement \ No newline at end of file +050100150200Horsepower01020304050Miles_per_Gallon0510152025Acceleration0100200300400500Displacement \ No newline at end of file diff --git a/examples/compiled/selection_filter_composition.vg.json b/examples/compiled/selection_filter_composition.vg.json index 5bd9f3e0bc..50028e644b 100644 --- a/examples/compiled/selection_filter_composition.vg.json +++ b/examples/compiled/selection_filter_composition.vg.json @@ -550,7 +550,6 @@ "type": "linear", "domain": [0, 25], "range": [0, {"signal": "width"}], - "nice": true, "zero": true }, { @@ -558,7 +557,6 @@ "type": "linear", "domain": [0, 500], "range": [{"signal": "childHeight"}, 0], - "nice": true, "zero": true } ] diff --git a/examples/compiled/selection_translate_brush_drag.png b/examples/compiled/selection_translate_brush_drag.png index 561a39e7a8..036c4ce8d4 100644 Binary files a/examples/compiled/selection_translate_brush_drag.png and b/examples/compiled/selection_translate_brush_drag.png differ diff --git a/examples/compiled/selection_translate_brush_drag.svg b/examples/compiled/selection_translate_brush_drag.svg index e357061884..50e0440a79 100644 --- a/examples/compiled/selection_translate_brush_drag.svg +++ b/examples/compiled/selection_translate_brush_drag.svg @@ -1 +1 @@ -80100120140Horsepower2025303540Miles_per_GallonEuropeJapanUSAOrigin2468Cylinders \ No newline at end of file +80100120140Horsepower2025303540Miles_per_GallonEuropeJapanUSAOrigin2468Cylinders \ No newline at end of file diff --git a/examples/compiled/selection_translate_brush_drag.vg.json b/examples/compiled/selection_translate_brush_drag.vg.json index 7f81b9fa36..056274323d 100644 --- a/examples/compiled/selection_translate_brush_drag.vg.json +++ b/examples/compiled/selection_translate_brush_drag.vg.json @@ -386,7 +386,6 @@ "type": "linear", "domain": [75, 150], "range": [0, {"signal": "width"}], - "nice": true, "zero": false }, { @@ -394,7 +393,6 @@ "type": "linear", "domain": [20, 40], "range": [{"signal": "height"}, 0], - "nice": true, "zero": false }, { diff --git a/examples/compiled/selection_translate_brush_shift-drag.png b/examples/compiled/selection_translate_brush_shift-drag.png index 561a39e7a8..036c4ce8d4 100644 Binary files a/examples/compiled/selection_translate_brush_shift-drag.png and b/examples/compiled/selection_translate_brush_shift-drag.png differ diff --git a/examples/compiled/selection_translate_brush_shift-drag.svg b/examples/compiled/selection_translate_brush_shift-drag.svg index e357061884..50e0440a79 100644 --- a/examples/compiled/selection_translate_brush_shift-drag.svg +++ b/examples/compiled/selection_translate_brush_shift-drag.svg @@ -1 +1 @@ -80100120140Horsepower2025303540Miles_per_GallonEuropeJapanUSAOrigin2468Cylinders \ No newline at end of file +80100120140Horsepower2025303540Miles_per_GallonEuropeJapanUSAOrigin2468Cylinders \ No newline at end of file diff --git a/examples/compiled/selection_translate_brush_shift-drag.vg.json b/examples/compiled/selection_translate_brush_shift-drag.vg.json index 920f7fc305..a8123f0d4a 100644 --- a/examples/compiled/selection_translate_brush_shift-drag.vg.json +++ b/examples/compiled/selection_translate_brush_shift-drag.vg.json @@ -392,7 +392,6 @@ "type": "linear", "domain": [75, 150], "range": [0, {"signal": "width"}], - "nice": true, "zero": false }, { @@ -400,7 +399,6 @@ "type": "linear", "domain": [20, 40], "range": [{"signal": "height"}, 0], - "nice": true, "zero": false }, { diff --git a/examples/compiled/selection_translate_scatterplot_drag.png b/examples/compiled/selection_translate_scatterplot_drag.png index c72338d70a..7912d51c39 100644 Binary files a/examples/compiled/selection_translate_scatterplot_drag.png and b/examples/compiled/selection_translate_scatterplot_drag.png differ diff --git a/examples/compiled/selection_translate_scatterplot_drag.svg b/examples/compiled/selection_translate_scatterplot_drag.svg index c514860a96..ef8fccc952 100644 --- a/examples/compiled/selection_translate_scatterplot_drag.svg +++ b/examples/compiled/selection_translate_scatterplot_drag.svg @@ -1 +1 @@ -80100120140Horsepower2025303540Miles_per_Gallon2468Cylinders \ No newline at end of file +80100120140Horsepower2025303540Miles_per_Gallon2468Cylinders \ No newline at end of file diff --git a/examples/compiled/selection_translate_scatterplot_drag.vg.json b/examples/compiled/selection_translate_scatterplot_drag.vg.json index 32ca437041..db31efcf8f 100644 --- a/examples/compiled/selection_translate_scatterplot_drag.vg.json +++ b/examples/compiled/selection_translate_scatterplot_drag.vg.json @@ -174,7 +174,6 @@ "domain": [75, 150], "domainRaw": {"signal": "grid[\"Horsepower\"]"}, "range": [0, {"signal": "width"}], - "nice": true, "zero": false }, { @@ -183,7 +182,6 @@ "domain": [20, 40], "domainRaw": {"signal": "grid[\"Miles_per_Gallon\"]"}, "range": [{"signal": "height"}, 0], - "nice": true, "zero": false }, { diff --git a/examples/compiled/selection_translate_scatterplot_shift-drag.png b/examples/compiled/selection_translate_scatterplot_shift-drag.png index c72338d70a..7912d51c39 100644 Binary files a/examples/compiled/selection_translate_scatterplot_shift-drag.png and b/examples/compiled/selection_translate_scatterplot_shift-drag.png differ diff --git a/examples/compiled/selection_translate_scatterplot_shift-drag.svg b/examples/compiled/selection_translate_scatterplot_shift-drag.svg index c514860a96..ef8fccc952 100644 --- a/examples/compiled/selection_translate_scatterplot_shift-drag.svg +++ b/examples/compiled/selection_translate_scatterplot_shift-drag.svg @@ -1 +1 @@ -80100120140Horsepower2025303540Miles_per_Gallon2468Cylinders \ No newline at end of file +80100120140Horsepower2025303540Miles_per_Gallon2468Cylinders \ No newline at end of file diff --git a/examples/compiled/selection_translate_scatterplot_shift-drag.vg.json b/examples/compiled/selection_translate_scatterplot_shift-drag.vg.json index 609998f1bd..5bd68317f3 100644 --- a/examples/compiled/selection_translate_scatterplot_shift-drag.vg.json +++ b/examples/compiled/selection_translate_scatterplot_shift-drag.vg.json @@ -184,7 +184,6 @@ "domain": [75, 150], "domainRaw": {"signal": "grid[\"Horsepower\"]"}, "range": [0, {"signal": "width"}], - "nice": true, "zero": false }, { @@ -193,7 +192,6 @@ "domain": [20, 40], "domainRaw": {"signal": "grid[\"Miles_per_Gallon\"]"}, "range": [{"signal": "height"}, 0], - "nice": true, "zero": false }, { diff --git a/examples/compiled/selection_zoom_brush_shift-wheel.png b/examples/compiled/selection_zoom_brush_shift-wheel.png index 561a39e7a8..036c4ce8d4 100644 Binary files a/examples/compiled/selection_zoom_brush_shift-wheel.png and b/examples/compiled/selection_zoom_brush_shift-wheel.png differ diff --git a/examples/compiled/selection_zoom_brush_shift-wheel.svg b/examples/compiled/selection_zoom_brush_shift-wheel.svg index e357061884..50e0440a79 100644 --- a/examples/compiled/selection_zoom_brush_shift-wheel.svg +++ b/examples/compiled/selection_zoom_brush_shift-wheel.svg @@ -1 +1 @@ -80100120140Horsepower2025303540Miles_per_GallonEuropeJapanUSAOrigin2468Cylinders \ No newline at end of file +80100120140Horsepower2025303540Miles_per_GallonEuropeJapanUSAOrigin2468Cylinders \ No newline at end of file diff --git a/examples/compiled/selection_zoom_brush_shift-wheel.vg.json b/examples/compiled/selection_zoom_brush_shift-wheel.vg.json index 28ccf4befc..bbc9b07937 100644 --- a/examples/compiled/selection_zoom_brush_shift-wheel.vg.json +++ b/examples/compiled/selection_zoom_brush_shift-wheel.vg.json @@ -388,7 +388,6 @@ "type": "linear", "domain": [75, 150], "range": [0, {"signal": "width"}], - "nice": true, "zero": false }, { @@ -396,7 +395,6 @@ "type": "linear", "domain": [20, 40], "range": [{"signal": "height"}, 0], - "nice": true, "zero": false }, { diff --git a/examples/compiled/selection_zoom_brush_wheel.png b/examples/compiled/selection_zoom_brush_wheel.png index 561a39e7a8..036c4ce8d4 100644 Binary files a/examples/compiled/selection_zoom_brush_wheel.png and b/examples/compiled/selection_zoom_brush_wheel.png differ diff --git a/examples/compiled/selection_zoom_brush_wheel.svg b/examples/compiled/selection_zoom_brush_wheel.svg index e357061884..50e0440a79 100644 --- a/examples/compiled/selection_zoom_brush_wheel.svg +++ b/examples/compiled/selection_zoom_brush_wheel.svg @@ -1 +1 @@ -80100120140Horsepower2025303540Miles_per_GallonEuropeJapanUSAOrigin2468Cylinders \ No newline at end of file +80100120140Horsepower2025303540Miles_per_GallonEuropeJapanUSAOrigin2468Cylinders \ No newline at end of file diff --git a/examples/compiled/selection_zoom_brush_wheel.vg.json b/examples/compiled/selection_zoom_brush_wheel.vg.json index 7f81b9fa36..056274323d 100644 --- a/examples/compiled/selection_zoom_brush_wheel.vg.json +++ b/examples/compiled/selection_zoom_brush_wheel.vg.json @@ -386,7 +386,6 @@ "type": "linear", "domain": [75, 150], "range": [0, {"signal": "width"}], - "nice": true, "zero": false }, { @@ -394,7 +393,6 @@ "type": "linear", "domain": [20, 40], "range": [{"signal": "height"}, 0], - "nice": true, "zero": false }, { diff --git a/examples/compiled/selection_zoom_scatterplot_shift-wheel.png b/examples/compiled/selection_zoom_scatterplot_shift-wheel.png index c72338d70a..7912d51c39 100644 Binary files a/examples/compiled/selection_zoom_scatterplot_shift-wheel.png and b/examples/compiled/selection_zoom_scatterplot_shift-wheel.png differ diff --git a/examples/compiled/selection_zoom_scatterplot_shift-wheel.svg b/examples/compiled/selection_zoom_scatterplot_shift-wheel.svg index c514860a96..ef8fccc952 100644 --- a/examples/compiled/selection_zoom_scatterplot_shift-wheel.svg +++ b/examples/compiled/selection_zoom_scatterplot_shift-wheel.svg @@ -1 +1 @@ -80100120140Horsepower2025303540Miles_per_Gallon2468Cylinders \ No newline at end of file +80100120140Horsepower2025303540Miles_per_Gallon2468Cylinders \ No newline at end of file diff --git a/examples/compiled/selection_zoom_scatterplot_shift-wheel.vg.json b/examples/compiled/selection_zoom_scatterplot_shift-wheel.vg.json index ade22ddf69..dff2c409d1 100644 --- a/examples/compiled/selection_zoom_scatterplot_shift-wheel.vg.json +++ b/examples/compiled/selection_zoom_scatterplot_shift-wheel.vg.json @@ -188,7 +188,6 @@ "domain": [75, 150], "domainRaw": {"signal": "grid[\"Horsepower\"]"}, "range": [0, {"signal": "width"}], - "nice": true, "zero": false }, { @@ -197,7 +196,6 @@ "domain": [20, 40], "domainRaw": {"signal": "grid[\"Miles_per_Gallon\"]"}, "range": [{"signal": "height"}, 0], - "nice": true, "zero": false }, { diff --git a/examples/compiled/selection_zoom_scatterplot_wheel.png b/examples/compiled/selection_zoom_scatterplot_wheel.png index c72338d70a..7912d51c39 100644 Binary files a/examples/compiled/selection_zoom_scatterplot_wheel.png and b/examples/compiled/selection_zoom_scatterplot_wheel.png differ diff --git a/examples/compiled/selection_zoom_scatterplot_wheel.svg b/examples/compiled/selection_zoom_scatterplot_wheel.svg index c514860a96..ef8fccc952 100644 --- a/examples/compiled/selection_zoom_scatterplot_wheel.svg +++ b/examples/compiled/selection_zoom_scatterplot_wheel.svg @@ -1 +1 @@ -80100120140Horsepower2025303540Miles_per_Gallon2468Cylinders \ No newline at end of file +80100120140Horsepower2025303540Miles_per_Gallon2468Cylinders \ No newline at end of file diff --git a/examples/compiled/selection_zoom_scatterplot_wheel.vg.json b/examples/compiled/selection_zoom_scatterplot_wheel.vg.json index 32ca437041..db31efcf8f 100644 --- a/examples/compiled/selection_zoom_scatterplot_wheel.vg.json +++ b/examples/compiled/selection_zoom_scatterplot_wheel.vg.json @@ -174,7 +174,6 @@ "domain": [75, 150], "domainRaw": {"signal": "grid[\"Horsepower\"]"}, "range": [0, {"signal": "width"}], - "nice": true, "zero": false }, { @@ -183,7 +182,6 @@ "domain": [20, 40], "domainRaw": {"signal": "grid[\"Miles_per_Gallon\"]"}, "range": [{"signal": "height"}, 0], - "nice": true, "zero": false }, { diff --git a/examples/compiled/text_params.vg.json b/examples/compiled/text_params.vg.json index 0d7f726910..6eedf2e1e0 100644 --- a/examples/compiled/text_params.vg.json +++ b/examples/compiled/text_params.vg.json @@ -150,7 +150,6 @@ "type": "linear", "domain": [0, 100], "range": [0, {"signal": "width"}], - "nice": true, "zero": true }, { @@ -158,7 +157,6 @@ "type": "linear", "domain": [0, 100], "range": [{"signal": "height"}, 0], - "nice": true, "zero": true } ], diff --git a/src/compile/scale/properties.ts b/src/compile/scale/properties.ts index c1f3235326..c8f264ca14 100644 --- a/src/compile/scale/properties.ts +++ b/src/compile/scale/properties.ts @@ -145,7 +145,7 @@ export const scaleRules: { interpolate: ({channel, fieldOrDatumDef}) => interpolate(channel, fieldOrDatumDef.type), - nice: ({scaleType, channel, fieldOrDatumDef}) => nice(scaleType, channel, fieldOrDatumDef), + nice: ({scaleType, channel, domain, fieldOrDatumDef}) => nice(scaleType, channel, domain, fieldOrDatumDef), padding: ({channel, scaleType, fieldOrDatumDef, markDef, config}) => padding(channel, scaleType, config.scale, fieldOrDatumDef, markDef, config.bar), @@ -241,9 +241,14 @@ export function interpolate(channel: ScaleChannel, type: Type): Scale['interpola export function nice( scaleType: ScaleType, channel: ScaleChannel, + specifiedDomain: Domain, fieldOrDatumDef: TypedFieldDef | ScaleDatumDef ): boolean | TimeInterval { - if (getFieldDef(fieldOrDatumDef)?.bin || util.contains([ScaleType.TIME, ScaleType.UTC], scaleType)) { + if ( + getFieldDef(fieldOrDatumDef)?.bin || + isArray(specifiedDomain) || + util.contains([ScaleType.TIME, ScaleType.UTC], scaleType) + ) { return undefined; } return channel in POSITION_SCALE_CHANNEL_INDEX ? true : undefined; @@ -366,7 +371,7 @@ export function zero( markDef: MarkDef, scaleType: ScaleType ) { - // If users explicitly provide a domain range, we should not augment zero as that will be unexpected. + // If users explicitly provide a domain, we should not augment zero as that will be unexpected. const hasCustomDomain = !!specifiedDomain && specifiedDomain !== 'unaggregated'; if (hasCustomDomain) { if (hasContinuousDomain(scaleType)) { diff --git a/test/compile/scale/properties.test.ts b/test/compile/scale/properties.test.ts index ae8766c1e6..fcdfc23187 100644 --- a/test/compile/scale/properties.test.ts +++ b/test/compile/scale/properties.test.ts @@ -5,33 +5,39 @@ import {ScaleType} from '../../../src/scale'; describe('compile/scale', () => { describe('nice', () => { - it('should return nice for x and y.', () => { + it('should return nice for x and y', () => { for (const c of ['x', 'y'] as const) { - expect(rules.nice('linear', c, {type: 'quantitative'})).toEqual(true); + expect(rules.nice('linear', c, undefined, {type: 'quantitative'})).toEqual(true); } }); - it('should not return nice for binned x and y.', () => { + it('should not return nice for binned x and y', () => { for (const c of ['x', 'y'] as const) { - expect(rules.nice('linear', c, {type: 'quantitative', field: 'a', bin: true})).toBeUndefined(); + expect(rules.nice('linear', c, undefined, {type: 'quantitative', field: 'a', bin: true})).toBeUndefined(); } }); - it('should not return nice for temporal x and y.', () => { + it('should not return nice for temporal x and y', () => { for (const c of ['x', 'y'] as const) { - expect(rules.nice('time', c, {type: 'temporal'})).toBeUndefined(); + expect(rules.nice('time', c, undefined, {type: 'temporal'})).toBeUndefined(); + } + }); + + it('should not return nice when domain is set explicitly', () => { + for (const c of ['x', 'y'] as const) { + expect(rules.nice('time', c, [0, 42], {type: 'quantitative'})).toBeUndefined(); } }); }); describe('padding', () => { - it('should be pointPadding for point scale if channel is x or y and padding is not specified.', () => { + it('should be pointPadding for point scale if channel is x or y and padding is not specified', () => { for (const c of ['x', 'y'] as const) { expect(rules.padding(c, 'point', {pointPadding: 13}, undefined, undefined, undefined)).toEqual(13); } }); - it('should be continuousBandSize for linear x-scale of vertical bar.', () => { + it('should be continuousBandSize for linear x-scale of vertical bar', () => { expect( rules.padding( 'x', @@ -44,7 +50,7 @@ describe('compile/scale', () => { ).toEqual(13); }); - it('should be undefined for linear x-scale for binned field of vertical bar.', () => { + it('should be undefined for linear x-scale for binned field of vertical bar', () => { expect( rules.padding( 'x', @@ -57,7 +63,7 @@ describe('compile/scale', () => { ).toBeUndefined(); }); - it('should be continuousBandSize for linear y-scale of horizontal bar.', () => { + it('should be continuousBandSize for linear y-scale of horizontal bar', () => { expect( rules.padding( 'y', @@ -72,16 +78,16 @@ describe('compile/scale', () => { }); describe('paddingInner', () => { - it('should be undefined if padding is specified.', () => { + it('should be undefined if padding is specified', () => { expect(rules.paddingInner(10, 'x', 'bar', {})).toBeUndefined(); }); - it('should be bandPaddingInner if channel is x or y and padding is not specified.', () => { + it('should be bandPaddingInner if channel is x or y and padding is not specified', () => { expect(rules.paddingInner(undefined, 'x', 'bar', {bandPaddingInner: 15})).toEqual(15); expect(rules.paddingInner(undefined, 'y', 'bar', {bandPaddingInner: 15})).toEqual(15); }); - it('should be undefined for non-xy channels.', () => { + it('should be undefined for non-xy channels', () => { for (const c of NONPOSITION_SCALE_CHANNELS) { expect(rules.paddingInner(undefined, c, 'bar', {bandPaddingInner: 15})).toBeUndefined(); } @@ -89,24 +95,24 @@ describe('compile/scale', () => { }); describe('paddingOuter', () => { - it('should be undefined if padding is specified.', () => { + it('should be undefined if padding is specified', () => { for (const scaleType of ['point', 'band'] as ScaleType[]) { expect(rules.paddingOuter(10, 'x', scaleType, 'bar', 0, {})).toBeUndefined(); } }); - it('should be config.scale.bandPaddingOuter for band scale if channel is x or y and padding is not specified and config.scale.bandPaddingOuter.', () => { + it('should be config.scale.bandPaddingOuter for band scale if channel is x or y and padding is not specified and config.scale.bandPaddingOuter', () => { for (const c of ['x', 'y'] as const) { expect(rules.paddingOuter(undefined, c, 'band', 'bar', 0, {bandPaddingOuter: 16})).toEqual(16); } }); - it('should be paddingInner/2 for band scale if channel is x or y and padding is not specified and config.scale.bandPaddingOuter.', () => { + it('should be paddingInner/2 for band scale if channel is x or y and padding is not specified and config.scale.bandPaddingOuter', () => { for (const c of ['x', 'y'] as const) { expect(rules.paddingOuter(undefined, c, 'band', 'bar', 10, {})).toEqual(5); } }); - it('should be undefined for non-xy channels.', () => { + it('should be undefined for non-xy channels', () => { for (const c of NONPOSITION_SCALE_CHANNELS) { for (const scaleType of ['point', 'band'] as ScaleType[]) { expect(rules.paddingOuter(undefined, c, scaleType, 'bar', 0, {})).toBeUndefined(); @@ -116,19 +122,19 @@ describe('compile/scale', () => { }); describe('reverse', () => { - it('should return true for a continuous scale with sort = "descending".', () => { + it('should return true for a continuous scale with sort = "descending"', () => { expect(rules.reverse('linear', 'descending', 'x', {})).toBe(true); }); - it('should return false for a discrete scale with sort = "descending".', () => { + it('should return false for a discrete scale with sort = "descending"', () => { expect(rules.reverse('point', 'descending', 'x', {})).not.toBeDefined(); }); - it('should return xReverse for continuous x scale.', () => { + it('should return xReverse for continuous x scale', () => { expect(rules.reverse('linear', 'ascending', 'x', {xReverse: {signal: 'rtl'}})).toEqual({signal: 'rtl'}); }); - it('should return flip xReverse for continuous x scale with descending sort.', () => { + it('should return flip xReverse for continuous x scale with descending sort', () => { expect(rules.reverse('linear', 'descending', 'x', {xReverse: {signal: 'rtl'}})).toEqual({signal: '!rtl'}); expect(rules.reverse('linear', 'descending', 'x', {xReverse: true})).toEqual(false);