summaryrefslogtreecommitdiffstats
path: root/venv/lib/python3.9/site-packages/altair
diff options
context:
space:
mode:
Diffstat (limited to 'venv/lib/python3.9/site-packages/altair')
-rw-r--r--venv/lib/python3.9/site-packages/altair/__init__.py12
-rw-r--r--venv/lib/python3.9/site-packages/altair/_magics.py177
-rw-r--r--venv/lib/python3.9/site-packages/altair/datasets.py22
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/__init__.py17
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/airport_connections.py70
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/airports.py33
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/airports_count.py39
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/anscombe_plot.py20
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/area_chart_gradient.py30
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/bar_and_line_with_dual_axis.py22
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/bar_chart_horizontal.py15
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/bar_chart_sorted.py15
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/bar_chart_trellis_compact.py50
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/bar_chart_with_highlighted_bar.py21
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/bar_chart_with_highlighted_segment.py30
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/bar_chart_with_labels.py25
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/bar_chart_with_mean_line.py21
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/bar_chart_with_negatives.py20
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/bar_rounded.py19
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/bar_with_rolling_mean.py27
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/beckers_barley_trellis_plot.py33
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/beckers_barley_wrapped_facet.py22
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/binned_heatmap.py16
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/binned_scatterplot.py16
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/boxplot.py18
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/bubble_plot.py16
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/bump_chart.py29
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/candlestick_chart.py44
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/choropleth.py23
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/choropleth_repeat.py28
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/co2_concentration.py65
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/comet_chart.py32
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/connected_scatterplot.py18
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/cumulative_count_chart.py21
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/cumulative_wiki_donations.py17
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/density_facet.py28
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/density_stack.py35
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/diverging_stacked_bar_chart.py367
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/donut_chart.py18
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/dot_dash_plot.py40
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/errorbars_with_ci.py24
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/errorbars_with_std.py23
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/falkensee.py82
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/filled_step_chart.py19
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/gantt_chart.py20
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/gapminder_bubble_plot.py18
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/grouped_bar_chart.py17
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/grouped_bar_chart_horizontal.py17
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/grouped_bar_chart_with_error_bars.py25
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/hexbins.py43
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/histogram_responsive.py35
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/histogram_with_a_global_mean_overlay.py24
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/horizon_graph.py41
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/horizontal_stacked_bar_chart.py16
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/image_tooltip.py21
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/interactive_brush.py19
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/interactive_cross_highlight.py49
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/interactive_layered_crossfilter.py45
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/interactive_legend.py24
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/interactive_scatter_plot.py16
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/interval_selection.py32
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/iowa_electricity.py27
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/isotype.py78
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/isotype_emoji.py63
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/isotype_grid.py38
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/layer_line_color_rule.py28
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/layered_area_chart.py16
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/layered_bar_chart.py16
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/layered_chart_bar_mark.py32
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/layered_chart_with_dual_axis.py30
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/layered_heatmap_text.py41
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/layered_histogram.py29
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/line_chart_with_color_datum.py21
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/line_chart_with_cumsum.py24
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/line_chart_with_datum.py32
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/line_chart_with_generator.py21
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/line_chart_with_points.py24
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/line_percent.py18
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/line_with_ci.py22
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/line_with_log_scale.py18
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/london_tube.py59
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/multi_series_line.py18
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/multifeature_scatter_plot.py17
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/multiline_highlight.py36
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/multiline_tooltip.py67
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/multiple_interactions.py90
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/multiple_marks.py17
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/natural_disasters.py29
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/normalized_stacked_area_chart.py16
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/normalized_stacked_bar_chart.py16
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/normed_parallel_coordinates.py41
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/one_dot_per_zipcode.py25
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/pacman_chart.py17
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/parallel_coordinates.py28
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/percentage_of_total.py21
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/pie_chart.py18
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/pie_chart_with_labels.py24
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/poly_fit_regression.py36
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/pyramid.py19
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/radial_chart.py25
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/ranged_dot_plot.py43
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/ridgeline_plot.py63
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/scatter_href.py23
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/scatter_linked_brush.py25
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/scatter_linked_table.py49
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/scatter_marginal_hist.py50
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/scatter_matrix.py23
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/scatter_qq.py24
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/scatter_tooltips.py20
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/scatter_with_histogram.py60
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/scatter_with_labels.py29
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/scatter_with_layered_histogram.py60
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/scatter_with_loess.py31
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/scatter_with_minimap.py49
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/scatter_with_rolling_mean.py31
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/seattle_weather_interactive.py60
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/select_detail.py65
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/select_mark_area.py30
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/selection_histogram.py32
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/selection_layer_bar_month.py30
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/simple_bar_chart.py18
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/simple_heatmap.py24
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/simple_histogram.py16
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/simple_line_chart.py22
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/simple_scatter_with_errorbars.py43
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/simple_stacked_area_chart.py16
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/slope_graph.py16
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/sorted_error_bars_with_ci.py36
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/stacked_bar_chart.py17
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/stacked_bar_chart_sorted_segments.py21
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/stacked_bar_chart_with_text.py27
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/stem_and_leaf.py39
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/step_chart.py22
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/streamgraph.py20
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/strip_plot.py15
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/stripplot.py40
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/table_bubble_plot_github.py16
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/tests/__init__.py0
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/tests/test_examples.py44
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/top_k_items.py27
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/top_k_letters.py40
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/top_k_with_others.py31
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/trail_marker.py16
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/trellis_area.py19
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/trellis_area_sort_array.py21
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/trellis_histogram.py17
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/trellis_scatter_plot.py16
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/trellis_stacked_bar_chart.py17
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/us_employment.py58
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/us_incomebrackets_by_state_facet.py29
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/us_population_over_time.py36
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/us_population_over_time_facet.py25
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/us_population_pyramid_over_time.py55
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/us_state_capitals.py43
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/violin_plot.py39
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/weather_heatmap.py24
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/wheat_wages.py58
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/wilkinson-dot-plot.py27
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/wind_vector_map.py24
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/window_rank.py42
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/world_map.py27
-rw-r--r--venv/lib/python3.9/site-packages/altair/examples/world_projections.py26
-rw-r--r--venv/lib/python3.9/site-packages/altair/expr/__init__.py5
-rw-r--r--venv/lib/python3.9/site-packages/altair/expr/consts.py27
-rw-r--r--venv/lib/python3.9/site-packages/altair/expr/core.py197
-rw-r--r--venv/lib/python3.9/site-packages/altair/expr/funcs.py168
-rw-r--r--venv/lib/python3.9/site-packages/altair/expr/tests/__init__.py0
-rw-r--r--venv/lib/python3.9/site-packages/altair/expr/tests/test_expr.py106
-rw-r--r--venv/lib/python3.9/site-packages/altair/sphinxext/__init__.py0
-rw-r--r--venv/lib/python3.9/site-packages/altair/sphinxext/altairgallery.py311
-rw-r--r--venv/lib/python3.9/site-packages/altair/sphinxext/altairplot.py341
-rw-r--r--venv/lib/python3.9/site-packages/altair/sphinxext/schematable.py195
-rw-r--r--venv/lib/python3.9/site-packages/altair/sphinxext/utils.py199
-rw-r--r--venv/lib/python3.9/site-packages/altair/tests/__init__.py0
-rw-r--r--venv/lib/python3.9/site-packages/altair/tests/test_magics.py176
-rw-r--r--venv/lib/python3.9/site-packages/altair/utils/__init__.py32
-rw-r--r--venv/lib/python3.9/site-packages/altair/utils/core.py731
-rw-r--r--venv/lib/python3.9/site-packages/altair/utils/data.py244
-rw-r--r--venv/lib/python3.9/site-packages/altair/utils/deprecation.py70
-rw-r--r--venv/lib/python3.9/site-packages/altair/utils/display.py181
-rw-r--r--venv/lib/python3.9/site-packages/altair/utils/execeval.py61
-rw-r--r--venv/lib/python3.9/site-packages/altair/utils/html.py236
-rw-r--r--venv/lib/python3.9/site-packages/altair/utils/mimebundle.py83
-rw-r--r--venv/lib/python3.9/site-packages/altair/utils/plugin_registry.py199
-rw-r--r--venv/lib/python3.9/site-packages/altair/utils/save.py134
-rw-r--r--venv/lib/python3.9/site-packages/altair/utils/schemapi.py605
-rw-r--r--venv/lib/python3.9/site-packages/altair/utils/server.py148
-rw-r--r--venv/lib/python3.9/site-packages/altair/utils/tests/__init__.py0
-rw-r--r--venv/lib/python3.9/site-packages/altair/utils/tests/test_core.py265
-rw-r--r--venv/lib/python3.9/site-packages/altair/utils/tests/test_data.py139
-rw-r--r--venv/lib/python3.9/site-packages/altair/utils/tests/test_deprecation.py24
-rw-r--r--venv/lib/python3.9/site-packages/altair/utils/tests/test_execeval.py30
-rw-r--r--venv/lib/python3.9/site-packages/altair/utils/tests/test_html.py52
-rw-r--r--venv/lib/python3.9/site-packages/altair/utils/tests/test_mimebundle.py207
-rw-r--r--venv/lib/python3.9/site-packages/altair/utils/tests/test_plugin_registry.py123
-rw-r--r--venv/lib/python3.9/site-packages/altair/utils/tests/test_schemapi.py351
-rw-r--r--venv/lib/python3.9/site-packages/altair/utils/tests/test_server.py10
-rw-r--r--venv/lib/python3.9/site-packages/altair/utils/tests/test_utils.py192
-rw-r--r--venv/lib/python3.9/site-packages/altair/utils/theme.py10
-rw-r--r--venv/lib/python3.9/site-packages/altair/vega/__init__.py2
-rw-r--r--venv/lib/python3.9/site-packages/altair/vega/data.py47
-rw-r--r--venv/lib/python3.9/site-packages/altair/vega/display.py12
-rw-r--r--venv/lib/python3.9/site-packages/altair/vega/tests/__init__.py0
-rw-r--r--venv/lib/python3.9/site-packages/altair/vega/tests/test_import.py5
-rw-r--r--venv/lib/python3.9/site-packages/altair/vega/v5/__init__.py21
-rw-r--r--venv/lib/python3.9/site-packages/altair/vega/v5/data.py29
-rw-r--r--venv/lib/python3.9/site-packages/altair/vega/v5/display.py114
-rw-r--r--venv/lib/python3.9/site-packages/altair/vega/v5/schema/__init__.py5
-rw-r--r--venv/lib/python3.9/site-packages/altair/vega/v5/schema/core.py3416
-rw-r--r--venv/lib/python3.9/site-packages/altair/vega/v5/schema/vega-schema.json15964
-rw-r--r--venv/lib/python3.9/site-packages/altair/vegalite/__init__.py2
-rw-r--r--venv/lib/python3.9/site-packages/altair/vegalite/api.py2
-rw-r--r--venv/lib/python3.9/site-packages/altair/vegalite/data.py45
-rw-r--r--venv/lib/python3.9/site-packages/altair/vegalite/display.py11
-rw-r--r--venv/lib/python3.9/site-packages/altair/vegalite/schema.py3
-rw-r--r--venv/lib/python3.9/site-packages/altair/vegalite/tests/__init__.py0
-rw-r--r--venv/lib/python3.9/site-packages/altair/vegalite/tests/test_common.py99
-rw-r--r--venv/lib/python3.9/site-packages/altair/vegalite/v3/__init__.py33
-rw-r--r--venv/lib/python3.9/site-packages/altair/vegalite/v3/_deprecated.py19
-rw-r--r--venv/lib/python3.9/site-packages/altair/vegalite/v3/api.py2177
-rw-r--r--venv/lib/python3.9/site-packages/altair/vegalite/v3/data.py43
-rw-r--r--venv/lib/python3.9/site-packages/altair/vegalite/v3/display.py151
-rw-r--r--venv/lib/python3.9/site-packages/altair/vegalite/v3/schema/__init__.py5
-rw-r--r--venv/lib/python3.9/site-packages/altair/vegalite/v3/schema/channels.py5324
-rw-r--r--venv/lib/python3.9/site-packages/altair/vegalite/v3/schema/core.py16039
-rw-r--r--venv/lib/python3.9/site-packages/altair/vegalite/v3/schema/mixins.py807
-rw-r--r--venv/lib/python3.9/site-packages/altair/vegalite/v3/schema/vega-lite-schema.json13315
-rw-r--r--venv/lib/python3.9/site-packages/altair/vegalite/v3/tests/__init__.py0
-rw-r--r--venv/lib/python3.9/site-packages/altair/vegalite/v3/tests/test_api.py937
-rw-r--r--venv/lib/python3.9/site-packages/altair/vegalite/v3/tests/test_data.py33
-rw-r--r--venv/lib/python3.9/site-packages/altair/vegalite/v3/tests/test_display.py69
-rw-r--r--venv/lib/python3.9/site-packages/altair/vegalite/v3/tests/test_geo_interface.py204
-rw-r--r--venv/lib/python3.9/site-packages/altair/vegalite/v3/tests/test_renderers.py86
-rw-r--r--venv/lib/python3.9/site-packages/altair/vegalite/v3/tests/test_theme.py20
-rw-r--r--venv/lib/python3.9/site-packages/altair/vegalite/v3/theme.py54
-rw-r--r--venv/lib/python3.9/site-packages/altair/vegalite/v4/__init__.py23
-rw-r--r--venv/lib/python3.9/site-packages/altair/vegalite/v4/api.py2519
-rw-r--r--venv/lib/python3.9/site-packages/altair/vegalite/v4/data.py43
-rw-r--r--venv/lib/python3.9/site-packages/altair/vegalite/v4/display.py119
-rw-r--r--venv/lib/python3.9/site-packages/altair/vegalite/v4/schema/__init__.py5
-rw-r--r--venv/lib/python3.9/site-packages/altair/vegalite/v4/schema/channels.py10343
-rw-r--r--venv/lib/python3.9/site-packages/altair/vegalite/v4/schema/core.py19905
-rw-r--r--venv/lib/python3.9/site-packages/altair/vegalite/v4/schema/mixins.py1318
-rw-r--r--venv/lib/python3.9/site-packages/altair/vegalite/v4/schema/vega-lite-schema.json32017
-rw-r--r--venv/lib/python3.9/site-packages/altair/vegalite/v4/tests/__init__.py0
-rw-r--r--venv/lib/python3.9/site-packages/altair/vegalite/v4/tests/test_api.py958
-rw-r--r--venv/lib/python3.9/site-packages/altair/vegalite/v4/tests/test_data.py33
-rw-r--r--venv/lib/python3.9/site-packages/altair/vegalite/v4/tests/test_display.py69
-rw-r--r--venv/lib/python3.9/site-packages/altair/vegalite/v4/tests/test_geo_interface.py204
-rw-r--r--venv/lib/python3.9/site-packages/altair/vegalite/v4/tests/test_renderers.py65
-rw-r--r--venv/lib/python3.9/site-packages/altair/vegalite/v4/tests/test_theme.py19
-rw-r--r--venv/lib/python3.9/site-packages/altair/vegalite/v4/theme.py56
252 files changed, 137985 insertions, 0 deletions
diff --git a/venv/lib/python3.9/site-packages/altair/__init__.py b/venv/lib/python3.9/site-packages/altair/__init__.py
new file mode 100644
index 00000000..98ea2e00
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/__init__.py
@@ -0,0 +1,12 @@
+# flake8: noqa
+__version__ = "4.2.2"
+
+from .vegalite import *
+from . import examples
+
+
+def load_ipython_extension(ipython):
+ from ._magics import vega, vegalite
+
+ ipython.register_magic_function(vega, "cell")
+ ipython.register_magic_function(vegalite, "cell")
diff --git a/venv/lib/python3.9/site-packages/altair/_magics.py b/venv/lib/python3.9/site-packages/altair/_magics.py
new file mode 100644
index 00000000..13b8370a
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/_magics.py
@@ -0,0 +1,177 @@
+"""
+Magic functions for rendering vega/vega-lite specifications
+"""
+__all__ = ["vega", "vegalite"]
+
+import json
+import warnings
+
+import IPython
+from IPython.core import magic_arguments
+import pandas as pd
+from toolz import curried
+
+from altair.vegalite import v3 as vegalite_v3
+from altair.vegalite import v4 as vegalite_v4
+from altair.vega import v5 as vega_v5
+
+try:
+ import yaml
+
+ YAML_AVAILABLE = True
+except ImportError:
+ YAML_AVAILABLE = False
+
+
+RENDERERS = {
+ "vega": {"5": vega_v5.Vega},
+ "vega-lite": {"3": vegalite_v3.VegaLite, "4": vegalite_v4.VegaLite},
+}
+
+
+TRANSFORMERS = {
+ "vega": {
+ # Vega doesn't yet have specific data transformers; use vegalite
+ "5": vegalite_v4.data_transformers,
+ },
+ "vega-lite": {
+ "3": vegalite_v3.data_transformers,
+ "4": vegalite_v4.data_transformers,
+ },
+}
+
+
+def _prepare_data(data, data_transformers):
+ """Convert input data to data for use within schema"""
+ if data is None or isinstance(data, dict):
+ return data
+ elif isinstance(data, pd.DataFrame):
+ return curried.pipe(data, data_transformers.get())
+ elif isinstance(data, str):
+ return {"url": data}
+ else:
+ warnings.warn("data of type {} not recognized".format(type(data)))
+ return data
+
+
+def _get_variable(name):
+ """Get a variable from the notebook namespace."""
+ ip = IPython.get_ipython()
+ if ip is None:
+ raise ValueError(
+ "Magic command must be run within an IPython "
+ "environemnt, in which get_ipython() is defined."
+ )
+ if name not in ip.user_ns:
+ raise NameError(
+ "argument '{}' does not match the "
+ "name of any defined variable".format(name)
+ )
+ return ip.user_ns[name]
+
+
+@magic_arguments.magic_arguments()
+@magic_arguments.argument(
+ "data",
+ nargs="*",
+ help="local variable name of a pandas DataFrame to be used as the dataset",
+)
+@magic_arguments.argument("-v", "--version", dest="version", default="5")
+@magic_arguments.argument("-j", "--json", dest="json", action="store_true")
+def vega(line, cell):
+ """Cell magic for displaying Vega visualizations in CoLab.
+
+ %%vega [name1:variable1 name2:variable2 ...] [--json] [--version='5']
+
+ Visualize the contents of the cell using Vega, optionally specifying
+ one or more pandas DataFrame objects to be used as the datasets.
+
+ If --json is passed, then input is parsed as json rather than yaml.
+ """
+ args = magic_arguments.parse_argstring(vega, line)
+
+ version = args.version
+ assert version in RENDERERS["vega"]
+ Vega = RENDERERS["vega"][version]
+ data_transformers = TRANSFORMERS["vega"][version]
+
+ def namevar(s):
+ s = s.split(":")
+ if len(s) == 1:
+ return s[0], s[0]
+ elif len(s) == 2:
+ return s[0], s[1]
+ else:
+ raise ValueError("invalid identifier: '{}'".format(s))
+
+ try:
+ data = list(map(namevar, args.data))
+ except ValueError:
+ raise ValueError("Could not parse arguments: '{}'".format(line))
+
+ if args.json:
+ spec = json.loads(cell)
+ elif not YAML_AVAILABLE:
+ try:
+ spec = json.loads(cell)
+ except json.JSONDecodeError:
+ raise ValueError(
+ "%%vega: spec is not valid JSON. "
+ "Install pyyaml to parse spec as yaml"
+ )
+ else:
+ spec = yaml.load(cell, Loader=yaml.FullLoader)
+
+ if data:
+ spec["data"] = []
+ for name, val in data:
+ val = _get_variable(val)
+ prepped = _prepare_data(val, data_transformers)
+ prepped["name"] = name
+ spec["data"].append(prepped)
+
+ return Vega(spec)
+
+
+@magic_arguments.magic_arguments()
+@magic_arguments.argument(
+ "data",
+ nargs="?",
+ help="local variablename of a pandas DataFrame to be used as the dataset",
+)
+@magic_arguments.argument("-v", "--version", dest="version", default="4")
+@magic_arguments.argument("-j", "--json", dest="json", action="store_true")
+def vegalite(line, cell):
+ """Cell magic for displaying vega-lite visualizations in CoLab.
+
+ %%vegalite [dataframe] [--json] [--version=3]
+
+ Visualize the contents of the cell using Vega-Lite, optionally
+ specifying a pandas DataFrame object to be used as the dataset.
+
+ if --json is passed, then input is parsed as json rather than yaml.
+ """
+ args = magic_arguments.parse_argstring(vegalite, line)
+ version = args.version
+ assert version in RENDERERS["vega-lite"]
+ VegaLite = RENDERERS["vega-lite"][version]
+ data_transformers = TRANSFORMERS["vega-lite"][version]
+
+ if args.json:
+ spec = json.loads(cell)
+ elif not YAML_AVAILABLE:
+ try:
+ spec = json.loads(cell)
+ except json.JSONDecodeError:
+ raise ValueError(
+ "%%vegalite: spec is not valid JSON. "
+ "Install pyyaml to parse spec as yaml"
+ )
+ else:
+ spec = yaml.load(cell, Loader=yaml.FullLoader)
+
+ if args.data is not None:
+ data = _get_variable(args.data)
+ spec["data"] = _prepare_data(data, data_transformers)
+
+ return VegaLite(spec)
diff --git a/venv/lib/python3.9/site-packages/altair/datasets.py b/venv/lib/python3.9/site-packages/altair/datasets.py
new file mode 100644
index 00000000..7a526b29
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/datasets.py
@@ -0,0 +1,22 @@
+"""Datasets for use with Altair (deprecated)
+
+The functions here are merely thin wrappers for data access routines in the
+vega_datasets package.
+"""
+from altair.utils.deprecation import deprecated
+
+
+@deprecated("load_dataset is deprecated. " "Use the vega_datasets package instead.")
+def load_dataset(name):
+ """Load a dataset by name as a pandas.DataFrame."""
+ import vega_datasets
+
+ return vega_datasets.data(name)
+
+
+@deprecated("load_dataset is deprecated. " "Use the vega_datasets package instead.")
+def list_datasets():
+ """List the available datasets."""
+ import vega_datasets
+
+ return vega_datasets.data.list_datasets()
diff --git a/venv/lib/python3.9/site-packages/altair/examples/__init__.py b/venv/lib/python3.9/site-packages/altair/examples/__init__.py
new file mode 100644
index 00000000..d30aedbd
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/__init__.py
@@ -0,0 +1,17 @@
+import os
+
+
+def iter_examples():
+ """Iterate over the examples in this directory.
+
+ Each item is a dict with the following keys:
+ - "name" : the unique name of the example
+ - "filename" : the full file path to the example
+ """
+ example_dir = os.path.abspath(os.path.dirname(__file__))
+ for filename in os.listdir(example_dir):
+ name, ext = os.path.splitext(filename)
+ if name.startswith('_') or ext != '.py':
+ continue
+ yield {'name': name,
+ 'filename': os.path.join(example_dir, filename)}
diff --git a/venv/lib/python3.9/site-packages/altair/examples/airport_connections.py b/venv/lib/python3.9/site-packages/altair/examples/airport_connections.py
new file mode 100644
index 00000000..bfd2198b
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/airport_connections.py
@@ -0,0 +1,70 @@
+"""
+Connections Among U.S. Airports Interactive
+-------------------------------------------
+This example shows all the connections between major U.S. airports. Lookup transformations
+are used to find the coordinates of each airport and connecting airports. Connections
+are displayed on mouseover via a single selection.
+"""
+# category: case studies
+import altair as alt
+from vega_datasets import data
+
+# Since these data are each more than 5,000 rows we'll import from the URLs
+airports = data.airports.url
+flights_airport = data.flights_airport.url
+
+states = alt.topo_feature(data.us_10m.url, feature="states")
+
+# Create mouseover selection
+select_city = alt.selection_single(
+ on="mouseover", nearest=True, fields=["origin"], empty="none"
+)
+
+# Define which attributes to lookup from airports.csv
+lookup_data = alt.LookupData(
+ airports, key="iata", fields=["state", "latitude", "longitude"]
+)
+
+background = alt.Chart(states).mark_geoshape(
+ fill="lightgray",
+ stroke="white"
+).properties(
+ width=750,
+ height=500
+).project("albersUsa")
+
+connections = alt.Chart(flights_airport).mark_rule(opacity=0.35).encode(
+ latitude="latitude:Q",
+ longitude="longitude:Q",
+ latitude2="lat2:Q",
+ longitude2="lon2:Q"
+).transform_lookup(
+ lookup="origin",
+ from_=lookup_data
+).transform_lookup(
+ lookup="destination",
+ from_=lookup_data,
+ as_=["state", "lat2", "lon2"]
+).transform_filter(
+ select_city
+)
+
+points = alt.Chart(flights_airport).mark_circle().encode(
+ latitude="latitude:Q",
+ longitude="longitude:Q",
+ size=alt.Size("routes:Q", scale=alt.Scale(range=[0, 1000]), legend=None),
+ order=alt.Order("routes:Q", sort="descending"),
+ tooltip=["origin:N", "routes:Q"]
+).transform_aggregate(
+ routes="count()",
+ groupby=["origin"]
+).transform_lookup(
+ lookup="origin",
+ from_=lookup_data
+).transform_filter(
+ (alt.datum.state != "PR") & (alt.datum.state != "VI")
+).add_selection(
+ select_city
+)
+
+(background + connections + points).configure_view(stroke=None)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/airports.py b/venv/lib/python3.9/site-packages/altair/examples/airports.py
new file mode 100644
index 00000000..8efa4980
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/airports.py
@@ -0,0 +1,33 @@
+"""
+Locations of US Airports
+========================
+This is a layered geographic visualization that shows the positions of US
+airports on a background of US states.
+"""
+# category: case studies
+import altair as alt
+from vega_datasets import data
+
+airports = data.airports()
+states = alt.topo_feature(data.us_10m.url, feature='states')
+
+# US states background
+background = alt.Chart(states).mark_geoshape(
+ fill='lightgray',
+ stroke='white'
+).properties(
+ width=500,
+ height=300
+).project('albersUsa')
+
+# airport positions on background
+points = alt.Chart(airports).mark_circle(
+ size=10,
+ color='steelblue'
+).encode(
+ longitude='longitude:Q',
+ latitude='latitude:Q',
+ tooltip=['name', 'city', 'state']
+)
+
+background + points
diff --git a/venv/lib/python3.9/site-packages/altair/examples/airports_count.py b/venv/lib/python3.9/site-packages/altair/examples/airports_count.py
new file mode 100644
index 00000000..be4c6b9c
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/airports_count.py
@@ -0,0 +1,39 @@
+"""
+Locations of US Airports
+========================
+This is a layered geographic visualization that shows the positions of US
+airports on a background of US states.
+"""
+# category: maps
+import altair as alt
+from vega_datasets import data
+
+airports = data.airports.url
+states = alt.topo_feature(data.us_10m.url, feature='states')
+
+# US states background
+background = alt.Chart(states).mark_geoshape(
+ fill='lightgray',
+ stroke='white'
+).properties(
+ width=500,
+ height=300
+).project('albersUsa')
+
+# airport positions on background
+points = alt.Chart(airports).transform_aggregate(
+ latitude='mean(latitude)',
+ longitude='mean(longitude)',
+ count='count()',
+ groupby=['state']
+).mark_circle().encode(
+ longitude='longitude:Q',
+ latitude='latitude:Q',
+ size=alt.Size('count:Q', title='Number of Airports'),
+ color=alt.value('steelblue'),
+ tooltip=['state:N','count:Q']
+).properties(
+ title='Number of airports in US'
+)
+
+background + points
diff --git a/venv/lib/python3.9/site-packages/altair/examples/anscombe_plot.py b/venv/lib/python3.9/site-packages/altair/examples/anscombe_plot.py
new file mode 100644
index 00000000..9e200748
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/anscombe_plot.py
@@ -0,0 +1,20 @@
+"""
+Anscombe's Quartet
+------------------
+
+This example shows how to use the column channel to make a trellis plot. Anscombe's Quartet is a famous dataset constructed by Francis Anscombe. Common summary statistics are identical for each subset of the data, despite the subsets having vastly different characteristics.
+"""
+# category: case studies
+import altair as alt
+from vega_datasets import data
+
+source = data.anscombe()
+
+alt.Chart(source).mark_circle().encode(
+ alt.X('X', scale=alt.Scale(zero=False)),
+ alt.Y('Y', scale=alt.Scale(zero=False)),
+ alt.Facet('Series', columns=2),
+).properties(
+ width=180,
+ height=180,
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/area_chart_gradient.py b/venv/lib/python3.9/site-packages/altair/examples/area_chart_gradient.py
new file mode 100644
index 00000000..4e2babf3
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/area_chart_gradient.py
@@ -0,0 +1,30 @@
+"""
+Area Chart with Gradient
+------------------------
+This example shows how to make an area chart with a gradient fill.
+For more information about gradient options see the Vega-Lite `Gradient documentation <https://vega.github.io/vega-lite/docs/types.html#gradient>`_.
+"""
+# category: area charts
+
+import altair as alt
+from vega_datasets import data
+
+source = data.stocks()
+
+alt.Chart(source).transform_filter(
+ 'datum.symbol==="GOOG"'
+).mark_area(
+ line={'color':'darkgreen'},
+ color=alt.Gradient(
+ gradient='linear',
+ stops=[alt.GradientStop(color='white', offset=0),
+ alt.GradientStop(color='darkgreen', offset=1)],
+ x1=1,
+ x2=1,
+ y1=1,
+ y2=0
+ )
+).encode(
+ alt.X('date:T'),
+ alt.Y('price:Q')
+) \ No newline at end of file
diff --git a/venv/lib/python3.9/site-packages/altair/examples/bar_and_line_with_dual_axis.py b/venv/lib/python3.9/site-packages/altair/examples/bar_and_line_with_dual_axis.py
new file mode 100644
index 00000000..78e3010e
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/bar_and_line_with_dual_axis.py
@@ -0,0 +1,22 @@
+"""
+Bar Chart with Line on Dual Axis
+--------------------------------
+This example shows how to combine two plots and keep their axes.
+
+For a more polished version of this chart, see :ref:`gallery_wheat_wages`.
+"""
+# category: bar charts
+import altair as alt
+from vega_datasets import data
+
+source = data.wheat()
+
+base = alt.Chart(source).encode(x='year:O')
+
+bar = base.mark_bar().encode(y='wheat:Q')
+
+line = base.mark_line(color='red').encode(
+ y='wages:Q'
+)
+
+(bar + line).properties(width=600)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/bar_chart_horizontal.py b/venv/lib/python3.9/site-packages/altair/examples/bar_chart_horizontal.py
new file mode 100644
index 00000000..9d145f7f
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/bar_chart_horizontal.py
@@ -0,0 +1,15 @@
+"""
+Horizontal Bar Chart
+--------------------
+This example is a bar chart drawn horizontally by putting the quantitative value on the x axis.
+"""
+# category: bar charts
+import altair as alt
+from vega_datasets import data
+
+source = data.wheat()
+
+alt.Chart(source).mark_bar().encode(
+ x='wheat:Q',
+ y="year:O"
+).properties(height=700)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/bar_chart_sorted.py b/venv/lib/python3.9/site-packages/altair/examples/bar_chart_sorted.py
new file mode 100644
index 00000000..1a88deb8
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/bar_chart_sorted.py
@@ -0,0 +1,15 @@
+"""
+Sorted Bar Chart
+================
+This example shows a bar chart sorted by a calculated value.
+"""
+# category: bar charts
+import altair as alt
+from vega_datasets import data
+
+source = data.barley()
+
+alt.Chart(source).mark_bar().encode(
+ x='sum(yield):Q',
+ y=alt.Y('site:N', sort='-x')
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/bar_chart_trellis_compact.py b/venv/lib/python3.9/site-packages/altair/examples/bar_chart_trellis_compact.py
new file mode 100644
index 00000000..6fb01147
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/bar_chart_trellis_compact.py
@@ -0,0 +1,50 @@
+"""
+Compact Trellis Grid of Bar Charts
+==================================
+This example shows a simple grid of bar charts to compare performance data..
+"""
+# category: bar charts
+import altair as alt
+import pandas as pd
+
+source = pd.DataFrame(
+ [
+ {"a": "a1", "b": "b1", "c": "x", "p": "0.14"},
+ {"a": "a1", "b": "b1", "c": "y", "p": "0.60"},
+ {"a": "a1", "b": "b1", "c": "z", "p": "0.03"},
+ {"a": "a1", "b": "b2", "c": "x", "p": "0.80"},
+ {"a": "a1", "b": "b2", "c": "y", "p": "0.38"},
+ {"a": "a1", "b": "b2", "c": "z", "p": "0.55"},
+ {"a": "a1", "b": "b3", "c": "x", "p": "0.11"},
+ {"a": "a1", "b": "b3", "c": "y", "p": "0.58"},
+ {"a": "a1", "b": "b3", "c": "z", "p": "0.79"},
+ {"a": "a2", "b": "b1", "c": "x", "p": "0.83"},
+ {"a": "a2", "b": "b1", "c": "y", "p": "0.87"},
+ {"a": "a2", "b": "b1", "c": "z", "p": "0.67"},
+ {"a": "a2", "b": "b2", "c": "x", "p": "0.97"},
+ {"a": "a2", "b": "b2", "c": "y", "p": "0.84"},
+ {"a": "a2", "b": "b2", "c": "z", "p": "0.90"},
+ {"a": "a2", "b": "b3", "c": "x", "p": "0.74"},
+ {"a": "a2", "b": "b3", "c": "y", "p": "0.64"},
+ {"a": "a2", "b": "b3", "c": "z", "p": "0.19"},
+ {"a": "a3", "b": "b1", "c": "x", "p": "0.57"},
+ {"a": "a3", "b": "b1", "c": "y", "p": "0.35"},
+ {"a": "a3", "b": "b1", "c": "z", "p": "0.49"},
+ {"a": "a3", "b": "b2", "c": "x", "p": "0.91"},
+ {"a": "a3", "b": "b2", "c": "y", "p": "0.38"},
+ {"a": "a3", "b": "b2", "c": "z", "p": "0.91"},
+ {"a": "a3", "b": "b3", "c": "x", "p": "0.99"},
+ {"a": "a3", "b": "b3", "c": "y", "p": "0.80"},
+ {"a": "a3", "b": "b3", "c": "z", "p": "0.37"},
+ ]
+)
+
+alt.Chart(source, width=60, height=alt.Step(8)).mark_bar().encode(
+ y=alt.Y("c:N", axis=None),
+ x=alt.X("p:Q", title=None, axis=alt.Axis(format="%")),
+ color=alt.Color(
+ "c:N", title="settings", legend=alt.Legend(orient="bottom", titleOrient="left")
+ ),
+ row=alt.Row("a:N", title="Factor A", header=alt.Header(labelAngle=0)),
+ column=alt.Column("b:N", title="Factor B"),
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/bar_chart_with_highlighted_bar.py b/venv/lib/python3.9/site-packages/altair/examples/bar_chart_with_highlighted_bar.py
new file mode 100644
index 00000000..d277bf9f
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/bar_chart_with_highlighted_bar.py
@@ -0,0 +1,21 @@
+"""
+Bar Chart with Highlighted Bar
+------------------------------
+This example shows a basic bar chart with a single bar highlighted.
+"""
+# category: bar charts
+import altair as alt
+from vega_datasets import data
+
+source = data.wheat()
+
+alt.Chart(source).mark_bar().encode(
+ x='year:O',
+ y="wheat:Q",
+ # The highlight will be set on the result of a conditional statement
+ color=alt.condition(
+ alt.datum.year == 1810, # If the year is 1810 this test returns True,
+ alt.value('orange'), # which sets the bar orange.
+ alt.value('steelblue') # And if it's not true it sets the bar steelblue.
+ )
+).properties(width=600)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/bar_chart_with_highlighted_segment.py b/venv/lib/python3.9/site-packages/altair/examples/bar_chart_with_highlighted_segment.py
new file mode 100644
index 00000000..3326ac50
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/bar_chart_with_highlighted_segment.py
@@ -0,0 +1,30 @@
+"""
+Bar Chart with Highlighted Segment
+----------------------------------
+This example shows a bar chart that highlights values beyond a threshold.
+"""
+import altair as alt
+import pandas as pd
+from vega_datasets import data
+
+source = data.wheat()
+threshold = pd.DataFrame([{"threshold": 90}])
+
+bars = alt.Chart(source).mark_bar().encode(
+ x="year:O",
+ y="wheat:Q",
+)
+
+highlight = alt.Chart(source).mark_bar(color="#e45755").encode(
+ x='year:O',
+ y='baseline:Q',
+ y2='wheat:Q'
+).transform_filter(
+ alt.datum.wheat > 90
+).transform_calculate("baseline", "90")
+
+rule = alt.Chart(threshold).mark_rule().encode(
+ y='threshold:Q'
+)
+
+(bars + highlight + rule).properties(width=600)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/bar_chart_with_labels.py b/venv/lib/python3.9/site-packages/altair/examples/bar_chart_with_labels.py
new file mode 100644
index 00000000..2ac67b46
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/bar_chart_with_labels.py
@@ -0,0 +1,25 @@
+"""
+Bar Chart with Labels
+=====================
+This example shows a basic horizontal bar chart with labels created with Altair.
+"""
+# category: bar charts
+import altair as alt
+from vega_datasets import data
+
+source = data.wheat()
+
+bars = alt.Chart(source).mark_bar().encode(
+ x='wheat:Q',
+ y="year:O"
+)
+
+text = bars.mark_text(
+ align='left',
+ baseline='middle',
+ dx=3 # Nudges text to right so it doesn't appear on top of the bar
+).encode(
+ text='wheat:Q'
+)
+
+(bars + text).properties(height=900)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/bar_chart_with_mean_line.py b/venv/lib/python3.9/site-packages/altair/examples/bar_chart_with_mean_line.py
new file mode 100644
index 00000000..0a4638ae
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/bar_chart_with_mean_line.py
@@ -0,0 +1,21 @@
+"""
+Bar Chart with Line at Mean
+---------------------------
+This example shows the mean value overlayed on a bar chart.
+"""
+# category: bar charts
+import altair as alt
+from vega_datasets import data
+
+source = data.wheat()
+
+bar = alt.Chart(source).mark_bar().encode(
+ x='year:O',
+ y='wheat:Q'
+)
+
+rule = alt.Chart(source).mark_rule(color='red').encode(
+ y='mean(wheat):Q'
+)
+
+(bar + rule).properties(width=600)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/bar_chart_with_negatives.py b/venv/lib/python3.9/site-packages/altair/examples/bar_chart_with_negatives.py
new file mode 100644
index 00000000..127a16ba
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/bar_chart_with_negatives.py
@@ -0,0 +1,20 @@
+"""
+Bar Chart with Negative Values
+==============================
+This example shows a bar chart with both positive and negative values.
+"""
+# category: bar charts
+import altair as alt
+from vega_datasets import data
+
+source = data.us_employment()
+
+alt.Chart(source).mark_bar().encode(
+ x="month:T",
+ y="nonfarm_change:Q",
+ color=alt.condition(
+ alt.datum.nonfarm_change > 0,
+ alt.value("steelblue"), # The positive color
+ alt.value("orange") # The negative color
+ )
+).properties(width=600)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/bar_rounded.py b/venv/lib/python3.9/site-packages/altair/examples/bar_rounded.py
new file mode 100644
index 00000000..3db4cbf3
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/bar_rounded.py
@@ -0,0 +1,19 @@
+"""
+Bar Chart with rounded edges
+----------------------------
+This example shows how to create a bar chart with rounded edges.
+"""
+# category: bar charts
+import altair as alt
+from vega_datasets import data
+
+source = data.seattle_weather()
+
+alt.Chart(source).mark_bar(
+ cornerRadiusTopLeft=3,
+ cornerRadiusTopRight=3
+).encode(
+ x='month(date):O',
+ y='count():Q',
+ color='weather:N'
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/bar_with_rolling_mean.py b/venv/lib/python3.9/site-packages/altair/examples/bar_with_rolling_mean.py
new file mode 100644
index 00000000..1f7d9033
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/bar_with_rolling_mean.py
@@ -0,0 +1,27 @@
+"""
+Bar Chart with Rolling Mean
+---------------------------
+A bar chart overlayed with a rolling mean. In this example the average of values over the previous decade is displayed as a line.
+"""
+# category: bar charts
+import altair as alt
+from vega_datasets import data
+
+source = data.wheat()
+
+bar = alt.Chart(source).mark_bar().encode(
+ x='year:O',
+ y='wheat:Q'
+)
+
+line = alt.Chart(source).mark_line(color='red').transform_window(
+ # The field to average
+ rolling_mean='mean(wheat)',
+ # The number of values before and after the current value to include.
+ frame=[-9, 0]
+).encode(
+ x='year:O',
+ y='rolling_mean:Q'
+)
+
+(bar + line).properties(width=600)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/beckers_barley_trellis_plot.py b/venv/lib/python3.9/site-packages/altair/examples/beckers_barley_trellis_plot.py
new file mode 100644
index 00000000..4f780d96
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/beckers_barley_trellis_plot.py
@@ -0,0 +1,33 @@
+"""
+Becker's Barley Trellis Plot
+----------------------------
+The example demonstrates the trellis charts created by Richard Becker, William Cleveland and others in the 1990s. Using the visualization technique below they identified an anomoly in a widely used agriculatural dataset, which they termed `"The Morris Mistake." <http://ml.stat.purdue.edu/stat695t/writings/Trellis.User.pdf>`_. It became their favored way of showcasing the power of this pioneering plot.
+"""
+# category: case studies
+import altair as alt
+from vega_datasets import data
+
+source = data.barley()
+
+alt.Chart(source, title="The Morris Mistake").mark_point().encode(
+ alt.X(
+ 'yield:Q',
+ title="Barley Yield (bushels/acre)",
+ scale=alt.Scale(zero=False),
+ axis=alt.Axis(grid=False)
+ ),
+ alt.Y(
+ 'variety:N',
+ title="",
+ sort='-x',
+ axis=alt.Axis(grid=True)
+ ),
+ color=alt.Color('year:N', legend=alt.Legend(title="Year")),
+ row=alt.Row(
+ 'site:N',
+ title="",
+ sort=alt.EncodingSortField(field='yield', op='sum', order='descending'),
+ )
+).properties(
+ height=alt.Step(20)
+).configure_view(stroke="transparent")
diff --git a/venv/lib/python3.9/site-packages/altair/examples/beckers_barley_wrapped_facet.py b/venv/lib/python3.9/site-packages/altair/examples/beckers_barley_wrapped_facet.py
new file mode 100644
index 00000000..e379a7fe
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/beckers_barley_wrapped_facet.py
@@ -0,0 +1,22 @@
+"""
+Becker's Barley Trellis Plot (wrapped facet)
+--------------------------------------------
+The example demonstrates the trellis charts created by Richard Becker, William Cleveland and others in the 1990s.
+This is the Altair replicate of `the VegaLite version <https://vega.github.io/vega-lite/docs/facet.html#facet-full>`_
+demonstrating the usage of `columns` argument to create wrapped facet.
+"""
+# category: other charts
+import altair as alt
+from vega_datasets import data
+
+source = data.barley.url
+
+alt.Chart(source).mark_point().encode(
+ alt.X('median(yield):Q', scale=alt.Scale(zero=False)),
+ y='variety:O',
+ color='year:N',
+ facet=alt.Facet('site:O', columns=2),
+).properties(
+ width=200,
+ height=100,
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/binned_heatmap.py b/venv/lib/python3.9/site-packages/altair/examples/binned_heatmap.py
new file mode 100644
index 00000000..ecdaab81
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/binned_heatmap.py
@@ -0,0 +1,16 @@
+"""
+Binned Heatmap
+--------------
+This example shows how to make a heatmap from binned quantitative data.
+"""
+# category: other charts
+import altair as alt
+from vega_datasets import data
+
+source = data.movies.url
+
+alt.Chart(source).mark_rect().encode(
+ alt.X('IMDB_Rating:Q', bin=alt.Bin(maxbins=60)),
+ alt.Y('Rotten_Tomatoes_Rating:Q', bin=alt.Bin(maxbins=40)),
+ alt.Color('count():Q', scale=alt.Scale(scheme='greenblue'))
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/binned_scatterplot.py b/venv/lib/python3.9/site-packages/altair/examples/binned_scatterplot.py
new file mode 100644
index 00000000..413aacba
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/binned_scatterplot.py
@@ -0,0 +1,16 @@
+"""
+Binned Scatterplot
+------------------
+This example shows how to make a binned scatterplot.
+"""
+# category: scatter plots
+import altair as alt
+from vega_datasets import data
+
+source = data.movies.url
+
+alt.Chart(source).mark_circle().encode(
+ alt.X('IMDB_Rating:Q', bin=True),
+ alt.Y('Rotten_Tomatoes_Rating:Q', bin=True),
+ size='count()'
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/boxplot.py b/venv/lib/python3.9/site-packages/altair/examples/boxplot.py
new file mode 100644
index 00000000..31cd62f4
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/boxplot.py
@@ -0,0 +1,18 @@
+"""
+Boxplot with Min/Max Whiskers
+------------------------------
+This example shows how to make a boxplot using US Population data from 2000.
+Note that the default value of the `extent` property is 1.5,
+which represents the convention of extending the whiskers
+to the furthest points within 1.5 * IQR from the first and third quartile.
+"""
+# category: other charts
+import altair as alt
+from vega_datasets import data
+
+source = data.population.url
+
+alt.Chart(source).mark_boxplot(extent='min-max').encode(
+ x='age:O',
+ y='people:Q'
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/bubble_plot.py b/venv/lib/python3.9/site-packages/altair/examples/bubble_plot.py
new file mode 100644
index 00000000..44b74bce
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/bubble_plot.py
@@ -0,0 +1,16 @@
+"""
+Bubble Plot
+-----------------
+This example shows how to make a bubble plot.
+"""
+# category: scatter plots
+import altair as alt
+from vega_datasets import data
+
+source = data.cars()
+
+alt.Chart(source).mark_point().encode(
+ x='Horsepower',
+ y='Miles_per_Gallon',
+ size='Acceleration'
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/bump_chart.py b/venv/lib/python3.9/site-packages/altair/examples/bump_chart.py
new file mode 100644
index 00000000..1586b956
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/bump_chart.py
@@ -0,0 +1,29 @@
+"""
+Bump Chart
+----------
+This example shows a bump chart. The data is first grouped into six-month
+intervals using pandas. The ranks are computed by Altair using a
+window transform.
+"""
+# category: line charts
+
+import altair as alt
+from vega_datasets import data
+import pandas as pd
+
+stocks = data.stocks()
+source = stocks.groupby([pd.Grouper(key="date", freq="6M"),"symbol"]).mean().reset_index()
+
+alt.Chart(source).mark_line(point = True).encode(
+ x = alt.X("date:O", timeUnit="yearmonth", title="date"),
+ y="rank:O",
+ color=alt.Color("symbol:N")
+).transform_window(
+ rank="rank()",
+ sort=[alt.SortField("price", order="descending")],
+ groupby=["date"]
+).properties(
+ title="Bump Chart for Stock Prices",
+ width=600,
+ height=150,
+) \ No newline at end of file
diff --git a/venv/lib/python3.9/site-packages/altair/examples/candlestick_chart.py b/venv/lib/python3.9/site-packages/altair/examples/candlestick_chart.py
new file mode 100644
index 00000000..1997cda3
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/candlestick_chart.py
@@ -0,0 +1,44 @@
+"""
+Candlestick Chart
+=================
+A candlestick chart inspired from `Protovis <http://mbostock.github.io/protovis/ex/candlestick.html>`_.
+This example shows the performance of the Chicago Board Options Exchange `Volatility Index <https://en.wikipedia.org/wiki/VIX>`_ (VIX)
+in the summer of 2009. The thick bar represents the opening and closing prices,
+while the thin bar shows intraday high and low prices; if the index closed higher on a given day, the bars are colored green rather than red.
+"""
+# category: other charts
+import altair as alt
+from vega_datasets import data
+
+source = data.ohlc()
+
+open_close_color = alt.condition("datum.open <= datum.close",
+ alt.value("#06982d"),
+ alt.value("#ae1325"))
+
+base = alt.Chart(source).encode(
+ alt.X('date:T',
+ axis=alt.Axis(
+ format='%m/%d',
+ labelAngle=-45,
+ title='Date in 2009'
+ )
+ ),
+ color=open_close_color
+)
+
+rule = base.mark_rule().encode(
+ alt.Y(
+ 'low:Q',
+ title='Price',
+ scale=alt.Scale(zero=False),
+ ),
+ alt.Y2('high:Q')
+)
+
+bar = base.mark_bar().encode(
+ alt.Y('open:Q'),
+ alt.Y2('close:Q')
+)
+
+rule + bar \ No newline at end of file
diff --git a/venv/lib/python3.9/site-packages/altair/examples/choropleth.py b/venv/lib/python3.9/site-packages/altair/examples/choropleth.py
new file mode 100644
index 00000000..889edb2f
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/choropleth.py
@@ -0,0 +1,23 @@
+"""
+Choropleth Map
+==============
+A choropleth map of unemployment rate per county in the US
+"""
+# category: maps
+import altair as alt
+from vega_datasets import data
+
+counties = alt.topo_feature(data.us_10m.url, 'counties')
+source = data.unemployment.url
+
+alt.Chart(counties).mark_geoshape().encode(
+ color='rate:Q'
+).transform_lookup(
+ lookup='id',
+ from_=alt.LookupData(source, 'id', ['rate'])
+).project(
+ type='albersUsa'
+).properties(
+ width=500,
+ height=300
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/choropleth_repeat.py b/venv/lib/python3.9/site-packages/altair/examples/choropleth_repeat.py
new file mode 100644
index 00000000..3cd913ec
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/choropleth_repeat.py
@@ -0,0 +1,28 @@
+"""
+Repeated Choropleth Map
+=======================
+Three choropleths representing disjoint data from the same table.
+"""
+# category: maps
+import altair as alt
+from vega_datasets import data
+
+states = alt.topo_feature(data.us_10m.url, 'states')
+source = data.population_engineers_hurricanes.url
+variable_list = ['population', 'engineers', 'hurricanes']
+
+alt.Chart(states).mark_geoshape().encode(
+ alt.Color(alt.repeat('row'), type='quantitative')
+).transform_lookup(
+ lookup='id',
+ from_=alt.LookupData(source, 'id', variable_list)
+).properties(
+ width=500,
+ height=300
+).project(
+ type='albersUsa'
+).repeat(
+ row=variable_list
+).resolve_scale(
+ color='independent'
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/co2_concentration.py b/venv/lib/python3.9/site-packages/altair/examples/co2_concentration.py
new file mode 100644
index 00000000..cd53d4ed
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/co2_concentration.py
@@ -0,0 +1,65 @@
+"""
+Atmospheric CO2 Concentration
+-----------------------------
+This example is a fully developed line chart that uses a window transformation.
+It was inspired by `Gregor Aisch's work at datawrapper
+<https://www.datawrapper.de/_/OHgEm/>`_.
+"""
+# category: case studies
+import altair as alt
+from vega_datasets import data
+
+source = data.co2_concentration.url
+
+base = alt.Chart(
+ source,
+ title="Carbon Dioxide in the Atmosphere"
+).transform_calculate(
+ year="year(datum.Date)"
+).transform_calculate(
+ decade="floor(datum.year / 10)"
+).transform_calculate(
+ scaled_date="(datum.year % 10) + (month(datum.Date)/12)"
+).transform_window(
+ first_date='first_value(scaled_date)',
+ last_date='last_value(scaled_date)',
+ sort=[{"field": "scaled_date", "order": "ascending"}],
+ groupby=['decade'],
+ frame=[None, None]
+).transform_calculate(
+ end="datum.first_date === datum.scaled_date ? 'first' : datum.last_date === datum.scaled_date ? 'last' : null"
+).encode(
+ x=alt.X(
+ "scaled_date:Q",
+ axis=alt.Axis(title="Year into Decade", tickCount=11)
+ ),
+ y=alt.Y(
+ "CO2:Q",
+ title="CO2 concentration in ppm",
+ scale=alt.Scale(zero=False)
+ )
+)
+
+line = base.mark_line().encode(
+ color=alt.Color(
+ "decade:O",
+ scale=alt.Scale(scheme="magma"),
+ legend=None
+ )
+)
+
+text = base.encode(text="year:N")
+
+start_year = text.transform_filter(
+ alt.datum.end == 'first'
+).mark_text(baseline="top")
+
+end_year = text.transform_filter(
+ alt.datum.end == 'last'
+).mark_text(baseline="bottom")
+
+(line + start_year + end_year).configure_text(
+ align="left",
+ dx=1,
+ dy=3
+).properties(width=600, height=375)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/comet_chart.py b/venv/lib/python3.9/site-packages/altair/examples/comet_chart.py
new file mode 100644
index 00000000..e0749a0a
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/comet_chart.py
@@ -0,0 +1,32 @@
+"""
+Comet Chart Example
+----------------------------
+Inspired by `Zan Armstrong's comet chart <https://www.zanarmstrong.com/infovisresearch>`_
+this plot uses ``mark_trail`` to visualize change of grouped data over time.
+A more elaborate example and explanation of creating comet charts in Altair
+is shown in `this blogpost <https://medium.com/de-dataverbinders/comet-charts-in-python-visualizing-statistical-mix-effects-and-simpsons-paradox-with-altair-6cd51fb58b7c>`_.
+"""
+# category: other charts
+
+import altair as alt
+import vega_datasets
+
+(
+ alt.Chart(vega_datasets.data.barley.url)
+ .transform_pivot("year", value="yield", groupby=["variety", "site"])
+ .transform_fold(["1931", "1932"], as_=["year", "yield"])
+ .transform_calculate(calculate="datum['1932'] - datum['1931']", as_="delta")
+ .mark_trail()
+ .encode(
+ x=alt.X('year:O', title=None),
+ y=alt.Y('variety:N', title='Variety'),
+ size=alt.Size('yield:Q', scale=alt.Scale(range=[0, 12]), legend=alt.Legend(values=[20, 60], title='Barley Yield (bushels/acre)')),
+ color=alt.Color('delta:Q', scale=alt.Scale(domainMid=0), legend=alt.Legend(title='Yield Delta (%)')),
+ tooltip=alt.Tooltip(['year:O', 'yield:Q']),
+ column=alt.Column('site:N', title='Site')
+
+ )
+ .configure_view(stroke=None)
+ .configure_legend(orient='bottom', direction='horizontal')
+ .properties(title='Barley Yield comparison between 1932 and 1931')
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/connected_scatterplot.py b/venv/lib/python3.9/site-packages/altair/examples/connected_scatterplot.py
new file mode 100644
index 00000000..39f27d81
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/connected_scatterplot.py
@@ -0,0 +1,18 @@
+"""
+Connected Scatterplot (Lines with Custom Paths)
+-----------------------------------------------
+
+This example show how the order encoding can be used to draw a custom path. The dataset tracks miles driven per capita along with gas prices annually from 1956 to 2010.
+It is based on Hannah Fairfield's article 'Driving Shifts Into Reverse'. See https://archive.nytimes.com/www.nytimes.com/imagepages/2010/05/02/business/02metrics.html for the original.
+"""
+# category: scatter plots
+import altair as alt
+from vega_datasets import data
+
+source = data.driving()
+
+alt.Chart(source).mark_line(point=True).encode(
+ alt.X('miles', scale=alt.Scale(zero=False)),
+ alt.Y('gas', scale=alt.Scale(zero=False)),
+ order='year'
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/cumulative_count_chart.py b/venv/lib/python3.9/site-packages/altair/examples/cumulative_count_chart.py
new file mode 100644
index 00000000..810a6149
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/cumulative_count_chart.py
@@ -0,0 +1,21 @@
+"""
+Cumulative Count Chart
+----------------------
+This example shows an area chart with cumulative count.
+Adapted from https://vega.github.io/vega-lite/examples/area_cumulative_freq.html
+
+"""
+# category: area charts
+
+import altair as alt
+from vega_datasets import data
+
+source = data.movies.url
+
+alt.Chart(source).transform_window(
+ cumulative_count="count()",
+ sort=[{"field": "IMDB_Rating"}],
+).mark_area().encode(
+ x="IMDB_Rating:Q",
+ y="cumulative_count:Q"
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/cumulative_wiki_donations.py b/venv/lib/python3.9/site-packages/altair/examples/cumulative_wiki_donations.py
new file mode 100644
index 00000000..9c193aba
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/cumulative_wiki_donations.py
@@ -0,0 +1,17 @@
+"""
+Cumulative Wikipedia Donations
+==============================
+
+This chart shows cumulative donations to Wikipedia over the past 10 years. Inspired by this `Reddit post <https://www.reddit.com/r/dataisbeautiful/comments/7guwd0/cumulative_wikimedia_donations_over_the_past_10/>`_ but using lines instead of areas.
+"""
+# category: case studies
+import altair as alt
+
+source = "https://frdata.wikimedia.org/donationdata-vs-day.csv"
+
+alt.Chart(source).mark_line().encode(
+ alt.X('monthdate(date):T', title='Month', axis=alt.Axis(format='%B')),
+ alt.Y('max(ytdsum):Q', title='Cumulative Donations', stack=None),
+ alt.Color('year(date):O', legend=alt.Legend(title='Year')),
+ alt.Order('year(data):O')
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/density_facet.py b/venv/lib/python3.9/site-packages/altair/examples/density_facet.py
new file mode 100644
index 00000000..e8b1bbe7
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/density_facet.py
@@ -0,0 +1,28 @@
+"""
+Faceted Density Estimates
+-------------------------
+Density estimates of measurements for each iris flower feature
+"""
+# category: area charts
+
+import altair as alt
+from vega_datasets import data
+
+source = data.iris()
+
+alt.Chart(source).transform_fold(
+ ['petalWidth',
+ 'petalLength',
+ 'sepalWidth',
+ 'sepalLength'],
+ as_ = ['Measurement_type', 'value']
+).transform_density(
+ density='value',
+ bandwidth=0.3,
+ groupby=['Measurement_type'],
+ extent= [0, 8]
+).mark_area().encode(
+ alt.X('value:Q'),
+ alt.Y('density:Q'),
+ alt.Row('Measurement_type:N')
+).properties(width=300, height=50)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/density_stack.py b/venv/lib/python3.9/site-packages/altair/examples/density_stack.py
new file mode 100644
index 00000000..2fdbdc06
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/density_stack.py
@@ -0,0 +1,35 @@
+"""
+Stacked Density Estimates
+-------------------------
+To plot a stacked graph of estimates, use a shared ``extent`` and a fixed
+number of subdivision ``steps`` to ensure that the points for each area align
+well. Density estimates of measurements for each iris flower feature are plot
+in a stacked method. In addition, setting ``counts`` to true multiplies the
+densities by the number of data points in each group, preserving proportional
+differences.
+"""
+# category: area charts
+
+import altair as alt
+from vega_datasets import data
+
+source = data.iris()
+
+alt.Chart(source).transform_fold(
+ ['petalWidth',
+ 'petalLength',
+ 'sepalWidth',
+ 'sepalLength'],
+ as_ = ['Measurement_type', 'value']
+).transform_density(
+ density='value',
+ bandwidth=0.3,
+ groupby=['Measurement_type'],
+ extent= [0, 8],
+ counts = True,
+ steps=200
+).mark_area().encode(
+ alt.X('value:Q'),
+ alt.Y('density:Q', stack='zero'),
+ alt.Color('Measurement_type:N')
+).properties(width=400, height=100)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/diverging_stacked_bar_chart.py b/venv/lib/python3.9/site-packages/altair/examples/diverging_stacked_bar_chart.py
new file mode 100644
index 00000000..cb2c2183
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/diverging_stacked_bar_chart.py
@@ -0,0 +1,367 @@
+"""
+Diverging Stacked Bar Chart
+---------------------------
+This example shows a diverging stacked bar chart for sentiments towards a set of eight questions, displayed as percentages with neutral responses straddling the 0% mark.
+"""
+# category: bar charts
+import altair as alt
+
+source = alt.pd.DataFrame([
+ {
+ "question": "Question 1",
+ "type": "Strongly disagree",
+ "value": 24,
+ "percentage": 0.7,
+ "percentage_start": -19.1,
+ "percentage_end": -18.4
+ },
+ {
+ "question": "Question 1",
+ "type": "Disagree",
+ "value": 294,
+ "percentage": 9.1,
+ "percentage_start": -18.4,
+ "percentage_end": -9.2
+ },
+ {
+ "question": "Question 1",
+ "type": "Neither agree nor disagree",
+ "value": 594,
+ "percentage": 18.5,
+ "percentage_start": -9.2,
+ "percentage_end": 9.2
+ },
+ {
+ "question": "Question 1",
+ "type": "Agree",
+ "value": 1927,
+ "percentage": 59.9,
+ "percentage_start": 9.2,
+ "percentage_end": 69.2
+ },
+ {
+ "question": "Question 1",
+ "type": "Strongly agree",
+ "value": 376,
+ "percentage": 11.7,
+ "percentage_start": 69.2,
+ "percentage_end": 80.9
+ },
+
+ {
+ "question": "Question 2",
+ "type": "Strongly disagree",
+ "value": 2,
+ "percentage": 18.2,
+ "percentage_start": -36.4,
+ "percentage_end": -18.2
+ },
+ {
+ "question": "Question 2",
+ "type": "Disagree",
+ "value": 2,
+ "percentage": 18.2,
+ "percentage_start": -18.2,
+ "percentage_end": 0
+ },
+ {
+ "question": "Question 2",
+ "type": "Neither agree nor disagree",
+ "value": 0,
+ "percentage": 0,
+ "percentage_start": 0,
+ "percentage_end": 0
+ },
+ {
+ "question": "Question 2",
+ "type": "Agree",
+ "value": 7,
+ "percentage": 63.6,
+ "percentage_start": 0,
+ "percentage_end": 63.6
+ },
+ {
+ "question": "Question 2",
+ "type": "Strongly agree",
+ "value": 11,
+ "percentage": 0,
+ "percentage_start": 63.6,
+ "percentage_end": 63.6
+ },
+
+ {
+ "question": "Question 3",
+ "type": "Strongly disagree",
+ "value": 2,
+ "percentage": 20,
+ "percentage_start": -30,
+ "percentage_end": -10
+ },
+ {
+ "question": "Question 3",
+ "type": "Disagree",
+ "value": 0,
+ "percentage": 0,
+ "percentage_start": -10,
+ "percentage_end": -10
+ },
+ {
+ "question": "Question 3",
+ "type": "Neither agree nor disagree",
+ "value": 2,
+ "percentage": 20,
+ "percentage_start": -10,
+ "percentage_end": 10
+ },
+ {
+ "question": "Question 3",
+ "type": "Agree",
+ "value": 4,
+ "percentage": 40,
+ "percentage_start": 10,
+ "percentage_end": 50
+ },
+ {
+ "question": "Question 3",
+ "type": "Strongly agree",
+ "value": 2,
+ "percentage": 20,
+ "percentage_start": 50,
+ "percentage_end": 70
+ },
+
+ {
+ "question": "Question 4",
+ "type": "Strongly disagree",
+ "value": 0,
+ "percentage": 0,
+ "percentage_start": -15.6,
+ "percentage_end": -15.6
+ },
+ {
+ "question": "Question 4",
+ "type": "Disagree",
+ "value": 2,
+ "percentage": 12.5,
+ "percentage_start": -15.6,
+ "percentage_end": -3.1
+ },
+ {
+ "question": "Question 4",
+ "type": "Neither agree nor disagree",
+ "value": 1,
+ "percentage": 6.3,
+ "percentage_start": -3.1,
+ "percentage_end": 3.1
+ },
+ {
+ "question": "Question 4",
+ "type": "Agree",
+ "value": 7,
+ "percentage": 43.8,
+ "percentage_start": 3.1,
+ "percentage_end": 46.9
+ },
+ {
+ "question": "Question 4",
+ "type": "Strongly agree",
+ "value": 6,
+ "percentage": 37.5,
+ "percentage_start": 46.9,
+ "percentage_end": 84.4
+ },
+
+ {
+ "question": "Question 5",
+ "type": "Strongly disagree",
+ "value": 0,
+ "percentage": 0,
+ "percentage_start": -10.4,
+ "percentage_end": -10.4
+ },
+ {
+ "question": "Question 5",
+ "type": "Disagree",
+ "value": 1,
+ "percentage": 4.2,
+ "percentage_start": -10.4,
+ "percentage_end": -6.3
+ },
+ {
+ "question": "Question 5",
+ "type": "Neither agree nor disagree",
+ "value": 3,
+ "percentage": 12.5,
+ "percentage_start": -6.3,
+ "percentage_end": 6.3
+ },
+ {
+ "question": "Question 5",
+ "type": "Agree",
+ "value": 16,
+ "percentage": 66.7,
+ "percentage_start": 6.3,
+ "percentage_end": 72.9
+ },
+ {
+ "question": "Question 5",
+ "type": "Strongly agree",
+ "value": 4,
+ "percentage": 16.7,
+ "percentage_start": 72.9,
+ "percentage_end": 89.6
+ },
+
+ {
+ "question": "Question 6",
+ "type": "Strongly disagree",
+ "value": 1,
+ "percentage": 6.3,
+ "percentage_start": -18.8,
+ "percentage_end": -12.5
+ },
+ {
+ "question": "Question 6",
+ "type": "Disagree",
+ "value": 1,
+ "percentage": 6.3,
+ "percentage_start": -12.5,
+ "percentage_end": -6.3
+ },
+ {
+ "question": "Question 6",
+ "type": "Neither agree nor disagree",
+ "value": 2,
+ "percentage": 12.5,
+ "percentage_start": -6.3,
+ "percentage_end": 6.3
+ },
+ {
+ "question": "Question 6",
+ "type": "Agree",
+ "value": 9,
+ "percentage": 56.3,
+ "percentage_start": 6.3,
+ "percentage_end": 62.5
+ },
+ {
+ "question": "Question 6",
+ "type": "Strongly agree",
+ "value": 3,
+ "percentage": 18.8,
+ "percentage_start": 62.5,
+ "percentage_end": 81.3
+ },
+
+ {
+ "question": "Question 7",
+ "type": "Strongly disagree",
+ "value": 0,
+ "percentage": 0,
+ "percentage_start": -10,
+ "percentage_end": -10
+ },
+ {
+ "question": "Question 7",
+ "type": "Disagree",
+ "value": 0,
+ "percentage": 0,
+ "percentage_start": -10,
+ "percentage_end": -10
+ },
+ {
+ "question": "Question 7",
+ "type": "Neither agree nor disagree",
+ "value": 1,
+ "percentage": 20,
+ "percentage_start": -10,
+ "percentage_end": 10
+ },
+ {
+ "question": "Question 7",
+ "type": "Agree",
+ "value": 4,
+ "percentage": 80,
+ "percentage_start": 10,
+ "percentage_end": 90
+ },
+ {
+ "question": "Question 7",
+ "type": "Strongly agree",
+ "value": 0,
+ "percentage": 0,
+ "percentage_start": 90,
+ "percentage_end": 90
+ },
+
+ {
+ "question": "Question 8",
+ "type": "Strongly disagree",
+ "value": 0,
+ "percentage": 0,
+ "percentage_start": 0,
+ "percentage_end": 0
+ },
+ {
+ "question": "Question 8",
+ "type": "Disagree",
+ "value": 0,
+ "percentage": 0,
+ "percentage_start": 0,
+ "percentage_end": 0
+ },
+ {
+ "question": "Question 8",
+ "type": "Neither agree nor disagree",
+ "value": 0,
+ "percentage": 0,
+ "percentage_start": 0,
+ "percentage_end": 0
+ },
+ {
+ "question": "Question 8",
+ "type": "Agree",
+ "value": 0,
+ "percentage": 0,
+ "percentage_start": 0,
+ "percentage_end": 0
+ },
+ {
+ "question": "Question 8",
+ "type": "Strongly agree",
+ "value": 2,
+ "percentage": 100,
+ "percentage_start": 0,
+ "percentage_end": 100
+ }
+])
+
+color_scale = alt.Scale(
+ domain=[
+ "Strongly disagree",
+ "Disagree",
+ "Neither agree nor disagree",
+ "Agree",
+ "Strongly agree"
+ ],
+ range=["#c30d24", "#f3a583", "#cccccc", "#94c6da", "#1770ab"]
+)
+
+y_axis = alt.Axis(
+ title='Question',
+ offset=5,
+ ticks=False,
+ minExtent=60,
+ domain=False
+)
+
+alt.Chart(source).mark_bar().encode(
+ x='percentage_start:Q',
+ x2='percentage_end:Q',
+ y=alt.Y('question:N', axis=y_axis),
+ color=alt.Color(
+ 'type:N',
+ legend=alt.Legend( title='Response'),
+ scale=color_scale,
+ )
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/donut_chart.py b/venv/lib/python3.9/site-packages/altair/examples/donut_chart.py
new file mode 100644
index 00000000..32498a56
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/donut_chart.py
@@ -0,0 +1,18 @@
+"""
+Donut Chart
+-----------
+This example shows how to make a Donut Chart using ``mark_arc``.
+This is adapted from a corresponding Vega-Lite Example:
+`Donut Chart <https://vega.github.io/vega-lite/examples/arc_donut.html>`_.
+"""
+# category: circular plots
+
+import pandas as pd
+import altair as alt
+
+source = pd.DataFrame({"category": [1, 2, 3, 4, 5, 6], "value": [4, 6, 10, 3, 7, 8]})
+
+alt.Chart(source).mark_arc(innerRadius=50).encode(
+ theta=alt.Theta(field="value", type="quantitative"),
+ color=alt.Color(field="category", type="nominal"),
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/dot_dash_plot.py b/venv/lib/python3.9/site-packages/altair/examples/dot_dash_plot.py
new file mode 100644
index 00000000..4554082c
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/dot_dash_plot.py
@@ -0,0 +1,40 @@
+"""
+Dot Dash Plot
+=============
+How to make the dot-dash plot presented in Edward Tufte's `Visual Display of Quantitative Information <https://www.edwardtufte.com/tufte/books_vdqi>`_. Based
+on a JavaScript implementation by `g3o2 <https://bl.ocks.org/g3o2/bd4362574137061c243a2994ba648fb8>`_.
+"""
+# category: scatter plots
+import altair as alt
+from vega_datasets import data
+
+source = data.cars()
+
+# Configure the options common to all layers
+brush = alt.selection(type='interval')
+base = alt.Chart(source).add_selection(brush)
+
+# Configure the points
+points = base.mark_point().encode(
+ x=alt.X('Miles_per_Gallon', title=''),
+ y=alt.Y('Horsepower', title=''),
+ color=alt.condition(brush, 'Origin', alt.value('grey'))
+)
+
+# Configure the ticks
+tick_axis = alt.Axis(labels=False, domain=False, ticks=False)
+
+x_ticks = base.mark_tick().encode(
+ alt.X('Miles_per_Gallon', axis=tick_axis),
+ alt.Y('Origin', title='', axis=tick_axis),
+ color=alt.condition(brush, 'Origin', alt.value('lightgrey'))
+)
+
+y_ticks = base.mark_tick().encode(
+ alt.X('Origin', title='', axis=tick_axis),
+ alt.Y('Horsepower', axis=tick_axis),
+ color=alt.condition(brush, 'Origin', alt.value('lightgrey'))
+)
+
+# Build the chart
+y_ticks | (points & x_ticks)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/errorbars_with_ci.py b/venv/lib/python3.9/site-packages/altair/examples/errorbars_with_ci.py
new file mode 100644
index 00000000..ec70b27b
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/errorbars_with_ci.py
@@ -0,0 +1,24 @@
+"""
+Error Bars showing Confidence Interval
+======================================
+This example shows how to show error bars using confidence intervals.
+The confidence intervals are computed internally in vega by a non-parametric
+`bootstrap of the mean <https://github.com/vega/vega-statistics/blob/master/src/bootstrapCI.js>`_.
+"""
+# category: other charts
+import altair as alt
+from vega_datasets import data
+
+source = data.barley()
+
+error_bars = alt.Chart(source).mark_errorbar(extent='ci').encode(
+ x=alt.X('yield:Q', scale=alt.Scale(zero=False)),
+ y=alt.Y('variety:N')
+)
+
+points = alt.Chart(source).mark_point(filled=True, color='black').encode(
+ x=alt.X('yield:Q', aggregate='mean'),
+ y=alt.Y('variety:N'),
+)
+
+error_bars + points
diff --git a/venv/lib/python3.9/site-packages/altair/examples/errorbars_with_std.py b/venv/lib/python3.9/site-packages/altair/examples/errorbars_with_std.py
new file mode 100644
index 00000000..1864e0ec
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/errorbars_with_std.py
@@ -0,0 +1,23 @@
+"""
+Error Bar with Standard Deviation
+---------------------------------
+This example shows how to show error bars with standard deviation using crop yields data of different
+in the years of 1930s.
+"""
+# category: other charts
+import altair as alt
+from vega_datasets import data
+
+source = data.barley()
+
+error_bars = alt.Chart(source).mark_errorbar(extent='stdev').encode(
+ x=alt.X('yield:Q', scale=alt.Scale(zero=False)),
+ y=alt.Y('variety:N')
+)
+
+points = alt.Chart(source).mark_point(filled=True, color='black').encode(
+ x=alt.X('yield:Q', aggregate='mean'),
+ y=alt.Y('variety:N'),
+)
+
+error_bars + points
diff --git a/venv/lib/python3.9/site-packages/altair/examples/falkensee.py b/venv/lib/python3.9/site-packages/altair/examples/falkensee.py
new file mode 100644
index 00000000..ff91fe72
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/falkensee.py
@@ -0,0 +1,82 @@
+"""
+Falkensee
+-----------------------
+This example is a reproduction of the Falkensee plot found in the vega-lite examples.
+"""
+# category: case studies
+import altair as alt
+
+source = [
+ {"year": "1875", "population": 1309},
+ {"year": "1890", "population": 1558},
+ {"year": "1910", "population": 4512},
+ {"year": "1925", "population": 8180},
+ {"year": "1933", "population": 15915},
+ {"year": "1939", "population": 24824},
+ {"year": "1946", "population": 28275},
+ {"year": "1950", "population": 29189},
+ {"year": "1964", "population": 29881},
+ {"year": "1971", "population": 26007},
+ {"year": "1981", "population": 24029},
+ {"year": "1985", "population": 23340},
+ {"year": "1989", "population": 22307},
+ {"year": "1990", "population": 22087},
+ {"year": "1991", "population": 22139},
+ {"year": "1992", "population": 22105},
+ {"year": "1993", "population": 22242},
+ {"year": "1994", "population": 22801},
+ {"year": "1995", "population": 24273},
+ {"year": "1996", "population": 25640},
+ {"year": "1997", "population": 27393},
+ {"year": "1998", "population": 29505},
+ {"year": "1999", "population": 32124},
+ {"year": "2000", "population": 33791},
+ {"year": "2001", "population": 35297},
+ {"year": "2002", "population": 36179},
+ {"year": "2003", "population": 36829},
+ {"year": "2004", "population": 37493},
+ {"year": "2005", "population": 38376},
+ {"year": "2006", "population": 39008},
+ {"year": "2007", "population": 39366},
+ {"year": "2008", "population": 39821},
+ {"year": "2009", "population": 40179},
+ {"year": "2010", "population": 40511},
+ {"year": "2011", "population": 40465},
+ {"year": "2012", "population": 40905},
+ {"year": "2013", "population": 41258},
+ {"year": "2014", "population": 41777}
+ ]
+
+source2 = [{
+ "start": "1933",
+ "end": "1945",
+ "event": "Nazi Rule"
+ },
+ {
+ "start": "1948",
+ "end": "1989",
+ "event": "GDR (East Germany)"
+ }]
+
+
+source = alt.pd.DataFrame(source)
+source2 = alt.pd.DataFrame(source2)
+
+
+line = alt.Chart(source).mark_line(color='#333').encode(
+ alt.X('year:T', axis=alt.Axis(format='%Y')),
+ y='population'
+).properties(
+ width=500,
+ height=300
+)
+
+point = line.mark_point(color='#333')
+
+rect = alt.Chart(source2).mark_rect().encode(
+ x='start:T',
+ x2='end:T',
+ color='event:N'
+)
+
+rect + line + point
diff --git a/venv/lib/python3.9/site-packages/altair/examples/filled_step_chart.py b/venv/lib/python3.9/site-packages/altair/examples/filled_step_chart.py
new file mode 100644
index 00000000..dadb5770
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/filled_step_chart.py
@@ -0,0 +1,19 @@
+"""
+Filled Step Chart
+-----------------
+This example shows Google's stock price over time as a step chart with its area filled in and its line emphasized.
+"""
+# category: line charts
+import altair as alt
+from vega_datasets import data
+
+source = data.stocks()
+
+alt.Chart(source).mark_area(
+ color="lightblue",
+ interpolate='step-after',
+ line=True
+).encode(
+ x='date',
+ y='price'
+).transform_filter(alt.datum.symbol == 'GOOG')
diff --git a/venv/lib/python3.9/site-packages/altair/examples/gantt_chart.py b/venv/lib/python3.9/site-packages/altair/examples/gantt_chart.py
new file mode 100644
index 00000000..6368890a
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/gantt_chart.py
@@ -0,0 +1,20 @@
+"""
+Gantt Chart
+-----------------
+This example shows how to make a simple Gantt chart.
+"""
+# category: other charts
+import altair as alt
+import pandas as pd
+
+source = pd.DataFrame([
+ {"task": "A", "start": 1, "end": 3},
+ {"task": "B", "start": 3, "end": 8},
+ {"task": "C", "start": 8, "end": 10}
+])
+
+alt.Chart(source).mark_bar().encode(
+ x='start',
+ x2='end',
+ y='task'
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/gapminder_bubble_plot.py b/venv/lib/python3.9/site-packages/altair/examples/gapminder_bubble_plot.py
new file mode 100644
index 00000000..381f8101
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/gapminder_bubble_plot.py
@@ -0,0 +1,18 @@
+"""
+Gapminder Bubble Plot
+=====================
+This example shows how to make a bubble plot showing the correlation between
+health and income for 187 countries in the world (modified from an example
+in Lisa Charlotte Rost's blog post `'One Chart, Twelve Charting Libraries' <http://lisacharlotterost.github.io/2016/05/17/one-chart-code/>`_.
+"""
+# category: case studies
+import altair as alt
+from vega_datasets import data
+
+source = data.gapminder_health_income.url
+
+alt.Chart(source).mark_circle().encode(
+ alt.X('income:Q', scale=alt.Scale(type='log')),
+ alt.Y('health:Q', scale=alt.Scale(zero=False)),
+ size='population:Q'
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/grouped_bar_chart.py b/venv/lib/python3.9/site-packages/altair/examples/grouped_bar_chart.py
new file mode 100644
index 00000000..211167b9
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/grouped_bar_chart.py
@@ -0,0 +1,17 @@
+"""
+Grouped Bar Chart
+-----------------
+This example shows a grouped bar chart.
+"""
+# category: bar charts
+import altair as alt
+from vega_datasets import data
+
+source = data.barley()
+
+alt.Chart(source).mark_bar().encode(
+ x='year:O',
+ y='sum(yield):Q',
+ color='year:N',
+ column='site:N'
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/grouped_bar_chart_horizontal.py b/venv/lib/python3.9/site-packages/altair/examples/grouped_bar_chart_horizontal.py
new file mode 100644
index 00000000..b4ac2ec8
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/grouped_bar_chart_horizontal.py
@@ -0,0 +1,17 @@
+"""
+Horizontal Grouped Bar Chart
+----------------------------
+This example shows a horizontal grouped bar chart.
+"""
+# category: bar charts
+import altair as alt
+from vega_datasets import data
+
+source = data.barley()
+
+alt.Chart(source).mark_bar().encode(
+ x='sum(yield):Q',
+ y='year:O',
+ color='year:N',
+ row='site:N'
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/grouped_bar_chart_with_error_bars.py b/venv/lib/python3.9/site-packages/altair/examples/grouped_bar_chart_with_error_bars.py
new file mode 100644
index 00000000..c1eab965
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/grouped_bar_chart_with_error_bars.py
@@ -0,0 +1,25 @@
+"""
+Grouped Bar Chart with Error Bars
+---------------------------------
+This example shows a grouped bar chart with error bars.
+"""
+# category: bar charts
+import altair as alt
+from vega_datasets import data
+
+source = data.barley()
+
+bars = alt.Chart().mark_bar().encode(
+ x='year:O',
+ y=alt.Y('mean(yield):Q', title='Mean Yield'),
+ color='year:N',
+)
+
+error_bars = alt.Chart().mark_errorbar(extent='ci').encode(
+ x='year:O',
+ y='yield:Q'
+)
+
+alt.layer(bars, error_bars, data=source).facet(
+ column='site:N'
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/hexbins.py b/venv/lib/python3.9/site-packages/altair/examples/hexbins.py
new file mode 100644
index 00000000..974630e6
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/hexbins.py
@@ -0,0 +1,43 @@
+"""
+Hexbin Chart
+-----------------
+This example shows a hexbin chart.
+"""
+import altair as alt
+from vega_datasets import data
+
+source = data.seattle_weather()
+
+# Size of the hexbins
+size = 15
+# Count of distinct x features
+xFeaturesCount = 12
+# Count of distinct y features
+yFeaturesCount = 7
+# Name of the x field
+xField = 'date'
+# Name of the y field
+yField = 'date'
+
+# the shape of a hexagon
+hexagon = "M0,-2.3094010768L2,-1.1547005384 2,1.1547005384 0,2.3094010768 -2,1.1547005384 -2,-1.1547005384Z"
+
+alt.Chart(source).mark_point(size=size**2, shape=hexagon).encode(
+ x=alt.X('xFeaturePos:Q', axis=alt.Axis(title='Month',
+ grid=False, tickOpacity=0, domainOpacity=0)),
+ y=alt.Y('day(' + yField + '):O', axis=alt.Axis(title='Weekday',
+ labelPadding=20, tickOpacity=0, domainOpacity=0)),
+ stroke=alt.value('black'),
+ strokeWidth=alt.value(0.2),
+ fill=alt.Color('mean(temp_max):Q', scale=alt.Scale(scheme='darkblue')),
+ tooltip=['month(' + xField + '):O', 'day(' + yField + '):O', 'mean(temp_max):Q']
+).transform_calculate(
+ # This field is required for the hexagonal X-Offset
+ xFeaturePos='(day(datum.' + yField + ') % 2) / 2 + month(datum.' + xField + ')'
+).properties(
+ # Exact scaling factors to make the hexbins fit
+ width=size * xFeaturesCount * 2,
+ height=size * yFeaturesCount * 1.7320508076, # 1.7320508076 is approx. sin(60°)*2
+).configure_view(
+ strokeWidth=0
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/histogram_responsive.py b/venv/lib/python3.9/site-packages/altair/examples/histogram_responsive.py
new file mode 100644
index 00000000..c8af4e71
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/histogram_responsive.py
@@ -0,0 +1,35 @@
+"""
+Histogram with Responsive Bins
+------------------------------
+This shows an example of a histogram with bins that are responsive to a
+selection domain. Click and drag on the bottom panel to see the bins
+change on the top panel.
+"""
+# category: histograms
+import altair as alt
+from vega_datasets import data
+
+source = data.flights_5k.url
+
+brush = alt.selection_interval(encodings=['x'])
+
+base = alt.Chart(source).transform_calculate(
+ time="hours(datum.date) + minutes(datum.date) / 60"
+).mark_bar().encode(
+ y='count():Q'
+).properties(
+ width=600,
+ height=100
+)
+
+alt.vconcat(
+ base.encode(
+ alt.X('time:Q',
+ bin=alt.Bin(maxbins=30, extent=brush),
+ scale=alt.Scale(domain=brush)
+ )
+ ),
+ base.encode(
+ alt.X('time:Q', bin=alt.Bin(maxbins=30)),
+ ).add_selection(brush)
+) \ No newline at end of file
diff --git a/venv/lib/python3.9/site-packages/altair/examples/histogram_with_a_global_mean_overlay.py b/venv/lib/python3.9/site-packages/altair/examples/histogram_with_a_global_mean_overlay.py
new file mode 100644
index 00000000..8d4d67c4
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/histogram_with_a_global_mean_overlay.py
@@ -0,0 +1,24 @@
+"""
+Histogram with a Global Mean Overlay
+------------------------------------
+This example shows a histogram with a global mean overlay.
+"""
+# category: histograms
+import altair as alt
+from vega_datasets import data
+
+source = data.movies.url
+
+base = alt.Chart(source)
+
+bar = base.mark_bar().encode(
+ x=alt.X('IMDB_Rating:Q', bin=True, axis=None),
+ y='count()'
+)
+
+rule = base.mark_rule(color='red').encode(
+ x='mean(IMDB_Rating):Q',
+ size=alt.value(5)
+)
+
+bar + rule
diff --git a/venv/lib/python3.9/site-packages/altair/examples/horizon_graph.py b/venv/lib/python3.9/site-packages/altair/examples/horizon_graph.py
new file mode 100644
index 00000000..83359578
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/horizon_graph.py
@@ -0,0 +1,41 @@
+"""
+Horizon Graph
+-------------
+This example shows how to make a Horizon Graph with 2 layers. (See https://idl.cs.washington.edu/papers/horizon/ for more details on Horizon Graphs.)
+"""
+# category: area charts
+import altair as alt
+import pandas as pd
+
+source = pd.DataFrame([
+ {"x": 1, "y": 28}, {"x": 2, "y": 55},
+ {"x": 3, "y": 43}, {"x": 4, "y": 91},
+ {"x": 5, "y": 81}, {"x": 6, "y": 53},
+ {"x": 7, "y": 19}, {"x": 8, "y": 87},
+ {"x": 9, "y": 52}, {"x": 10, "y": 48},
+ {"x": 11, "y": 24}, {"x": 12, "y": 49},
+ {"x": 13, "y": 87}, {"x": 14, "y": 66},
+ {"x": 15, "y": 17}, {"x": 16, "y": 27},
+ {"x": 17, "y": 68}, {"x": 18, "y": 16},
+ {"x": 19, "y": 49}, {"x": 20, "y": 15}
+])
+
+area1 = alt.Chart(source).mark_area(
+ clip=True,
+ interpolate='monotone'
+).encode(
+ alt.X('x', scale=alt.Scale(zero=False, nice=False)),
+ alt.Y('y', scale=alt.Scale(domain=[0, 50]), title='y'),
+ opacity=alt.value(0.6)
+).properties(
+ width=500,
+ height=75
+)
+
+area2 = area1.encode(
+ alt.Y('ny:Q', scale=alt.Scale(domain=[0, 50]))
+).transform_calculate(
+ "ny", alt.datum.y - 50
+)
+
+area1 + area2
diff --git a/venv/lib/python3.9/site-packages/altair/examples/horizontal_stacked_bar_chart.py b/venv/lib/python3.9/site-packages/altair/examples/horizontal_stacked_bar_chart.py
new file mode 100644
index 00000000..89271e03
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/horizontal_stacked_bar_chart.py
@@ -0,0 +1,16 @@
+"""
+Horizontal Stacked Bar Chart
+============================
+This is an example of a horizontal stacked bar chart using data which contains crop yields over different regions and different years in the 1930s.
+"""
+# category: bar charts
+import altair as alt
+from vega_datasets import data
+
+source = data.barley()
+
+alt.Chart(source).mark_bar().encode(
+ x='sum(yield)',
+ y='variety',
+ color='site'
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/image_tooltip.py b/venv/lib/python3.9/site-packages/altair/examples/image_tooltip.py
new file mode 100644
index 00000000..9b818c6f
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/image_tooltip.py
@@ -0,0 +1,21 @@
+"""
+Image tooltip
+-------------
+This example shows how to render images in tooltips.
+Either URLs or local file paths can be used to reference
+the images.
+"""
+# category: other charts
+
+import altair as alt
+import pandas as pd
+
+source = pd.DataFrame.from_records(
+ [{'a': 1, 'b': 1, 'image': 'https://altair-viz.github.io/_static/altair-logo-light.png'},
+ {'a': 2, 'b': 2, 'image': 'https://avatars.githubusercontent.com/u/11796929?s=200&v=4'}]
+)
+alt.Chart(source).mark_circle(size=200).encode(
+ x='a',
+ y='b',
+ tooltip=['image'] # Must be a list for the image to render
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/interactive_brush.py b/venv/lib/python3.9/site-packages/altair/examples/interactive_brush.py
new file mode 100644
index 00000000..cbeec1b0
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/interactive_brush.py
@@ -0,0 +1,19 @@
+"""
+Interactive Rectangular Brush
+=============================
+This example shows how to add a simple rectangular brush to a scatter plot.
+By clicking and dragging on the plot, you can highlight points within the
+range.
+"""
+# category: interactive charts
+import altair as alt
+from vega_datasets import data
+
+source = data.cars()
+brush = alt.selection(type='interval')
+
+alt.Chart(source).mark_point().encode(
+ x='Horsepower:Q',
+ y='Miles_per_Gallon:Q',
+ color=alt.condition(brush, 'Cylinders:O', alt.value('grey')),
+).add_selection(brush)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/interactive_cross_highlight.py b/venv/lib/python3.9/site-packages/altair/examples/interactive_cross_highlight.py
new file mode 100644
index 00000000..1ba80cf2
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/interactive_cross_highlight.py
@@ -0,0 +1,49 @@
+"""
+Interactive Chart with Cross-Highlight
+======================================
+This example shows an interactive chart where selections in one portion of
+the chart affect what is shown in other panels. Click on the bar chart to
+see a detail of the distribution in the upper panel.
+"""
+# category: interactive charts
+import altair as alt
+from vega_datasets import data
+
+source = data.movies.url
+
+pts = alt.selection(type="single", encodings=['x'])
+
+rect = alt.Chart(data.movies.url).mark_rect().encode(
+ alt.X('IMDB_Rating:Q', bin=True),
+ alt.Y('Rotten_Tomatoes_Rating:Q', bin=True),
+ alt.Color('count()',
+ scale=alt.Scale(scheme='greenblue'),
+ legend=alt.Legend(title='Total Records')
+ )
+)
+
+circ = rect.mark_point().encode(
+ alt.ColorValue('grey'),
+ alt.Size('count()',
+ legend=alt.Legend(title='Records in Selection')
+ )
+).transform_filter(
+ pts
+)
+
+bar = alt.Chart(source).mark_bar().encode(
+ x='Major_Genre:N',
+ y='count()',
+ color=alt.condition(pts, alt.ColorValue("steelblue"), alt.ColorValue("grey"))
+).properties(
+ width=550,
+ height=200
+).add_selection(pts)
+
+alt.vconcat(
+ rect + circ,
+ bar
+).resolve_legend(
+ color="independent",
+ size="independent"
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/interactive_layered_crossfilter.py b/venv/lib/python3.9/site-packages/altair/examples/interactive_layered_crossfilter.py
new file mode 100644
index 00000000..edde1957
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/interactive_layered_crossfilter.py
@@ -0,0 +1,45 @@
+"""
+Interactive Crossfilter
+=======================
+This example shows a multi-panel view of the same data, where you can interactively
+select a portion of the data in any of the panels to highlight that portion in any
+of the other panels.
+"""
+# category: interactive charts
+import altair as alt
+from vega_datasets import data
+
+source = alt.UrlData(
+ data.flights_2k.url,
+ format={'parse': {'date': 'date'}}
+)
+
+brush = alt.selection(type='interval', encodings=['x'])
+
+# Define the base chart, with the common parts of the
+# background and highlights
+base = alt.Chart().mark_bar().encode(
+ x=alt.X(alt.repeat('column'), type='quantitative', bin=alt.Bin(maxbins=20)),
+ y='count()'
+).properties(
+ width=160,
+ height=130
+)
+
+# gray background with selection
+background = base.encode(
+ color=alt.value('#ddd')
+).add_selection(brush)
+
+# blue highlights on the transformed data
+highlight = base.transform_filter(brush)
+
+# layer the two charts & repeat
+alt.layer(
+ background,
+ highlight,
+ data=source
+).transform_calculate(
+ "time",
+ "hours(datum.date)"
+).repeat(column=["distance", "delay", "time"])
diff --git a/venv/lib/python3.9/site-packages/altair/examples/interactive_legend.py b/venv/lib/python3.9/site-packages/altair/examples/interactive_legend.py
new file mode 100644
index 00000000..040d80b7
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/interactive_legend.py
@@ -0,0 +1,24 @@
+"""
+Interactive Legend
+------------------
+The following shows how to create a chart with an interactive legend, by
+binding the selection to ``"legend"``. Such a binding only works with
+``selection_single`` or ``selection_multi`` when projected over a single
+field or encoding.
+"""
+# category: interactive charts
+import altair as alt
+from vega_datasets import data
+
+source = data.unemployment_across_industries.url
+
+selection = alt.selection_multi(fields=['series'], bind='legend')
+
+alt.Chart(source).mark_area().encode(
+ alt.X('yearmonth(date):T', axis=alt.Axis(domain=False, format='%Y', tickSize=0)),
+ alt.Y('sum(count):Q', stack='center', axis=None),
+ alt.Color('series:N', scale=alt.Scale(scheme='category20b')),
+ opacity=alt.condition(selection, alt.value(1), alt.value(0.2))
+).add_selection(
+ selection
+) \ No newline at end of file
diff --git a/venv/lib/python3.9/site-packages/altair/examples/interactive_scatter_plot.py b/venv/lib/python3.9/site-packages/altair/examples/interactive_scatter_plot.py
new file mode 100644
index 00000000..69be3fe8
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/interactive_scatter_plot.py
@@ -0,0 +1,16 @@
+"""
+Simple Interactive Colored Scatterplot
+--------------------------------------
+This example shows how to make an interactive scatterplot.
+"""
+# category: interactive charts
+import altair as alt
+from vega_datasets import data
+
+source = data.cars()
+
+alt.Chart(source).mark_circle().encode(
+ x='Horsepower',
+ y='Miles_per_Gallon',
+ color='Origin',
+).interactive()
diff --git a/venv/lib/python3.9/site-packages/altair/examples/interval_selection.py b/venv/lib/python3.9/site-packages/altair/examples/interval_selection.py
new file mode 100644
index 00000000..55853d9a
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/interval_selection.py
@@ -0,0 +1,32 @@
+"""
+Interval Selection Example
+==========================
+
+This is an example of creating a stacked chart for which the domain of the
+top chart can be selected by interacting with the bottom chart.
+"""
+# category: area charts
+import altair as alt
+from vega_datasets import data
+
+source = data.sp500.url
+
+brush = alt.selection(type='interval', encodings=['x'])
+
+base = alt.Chart(source).mark_area().encode(
+ x = 'date:T',
+ y = 'price:Q'
+).properties(
+ width=600,
+ height=200
+)
+
+upper = base.encode(
+ alt.X('date:T', scale=alt.Scale(domain=brush))
+)
+
+lower = base.properties(
+ height=60
+).add_selection(brush)
+
+upper & lower
diff --git a/venv/lib/python3.9/site-packages/altair/examples/iowa_electricity.py b/venv/lib/python3.9/site-packages/altair/examples/iowa_electricity.py
new file mode 100644
index 00000000..dfb4e824
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/iowa_electricity.py
@@ -0,0 +1,27 @@
+"""
+Iowa's renewable energy boom
+----------------------------
+This example is a fully developed stacked chart using the sample dataset of Iowa's electricity sources.
+"""
+# category: case studies
+import altair as alt
+from vega_datasets import data
+
+source = data.iowa_electricity()
+
+alt.Chart(source, title="Iowa's renewable energy boom").mark_area().encode(
+ x=alt.X(
+ "year:T",
+ title="Year"
+ ),
+ y=alt.Y(
+ "net_generation:Q",
+ stack="normalize",
+ title="Share of net generation",
+ axis=alt.Axis(format=".0%"),
+ ),
+ color=alt.Color(
+ "source:N",
+ legend=alt.Legend(title="Electricity source"),
+ )
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/isotype.py b/venv/lib/python3.9/site-packages/altair/examples/isotype.py
new file mode 100644
index 00000000..07644119
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/isotype.py
@@ -0,0 +1,78 @@
+'''
+Isotype Visualization
+=====================
+Isotype Visualization shows the distribution of animals across UK and US.
+Inspired by `Only An Ocean Between, 1943 <http://www.thomwhite.co.uk/?p=1303>`_. Population Live Stock, p.13.
+This is adapted from Vega-Lite example https://vega.github.io/editor/#/examples/vega-lite/isotype_bar_chart
+'''
+# category: case studies
+import altair as alt
+import pandas as pd
+
+source = pd.DataFrame([
+ {'country': 'Great Britain', 'animal': 'cattle'},
+ {'country': 'Great Britain', 'animal': 'cattle'},
+ {'country': 'Great Britain', 'animal': 'cattle'},
+ {'country': 'Great Britain', 'animal': 'pigs'},
+ {'country': 'Great Britain', 'animal': 'pigs'},
+ {'country': 'Great Britain', 'animal': 'sheep'},
+ {'country': 'Great Britain', 'animal': 'sheep'},
+ {'country': 'Great Britain', 'animal': 'sheep'},
+ {'country': 'Great Britain', 'animal': 'sheep'},
+ {'country': 'Great Britain', 'animal': 'sheep'},
+ {'country': 'Great Britain', 'animal': 'sheep'},
+ {'country': 'Great Britain', 'animal': 'sheep'},
+ {'country': 'Great Britain', 'animal': 'sheep'},
+ {'country': 'Great Britain', 'animal': 'sheep'},
+ {'country': 'Great Britain', 'animal': 'sheep'},
+ {'country': 'United States', 'animal': 'cattle'},
+ {'country': 'United States', 'animal': 'cattle'},
+ {'country': 'United States', 'animal': 'cattle'},
+ {'country': 'United States', 'animal': 'cattle'},
+ {'country': 'United States', 'animal': 'cattle'},
+ {'country': 'United States', 'animal': 'cattle'},
+ {'country': 'United States', 'animal': 'cattle'},
+ {'country': 'United States', 'animal': 'cattle'},
+ {'country': 'United States', 'animal': 'cattle'},
+ {'country': 'United States', 'animal': 'pigs'},
+ {'country': 'United States', 'animal': 'pigs'},
+ {'country': 'United States', 'animal': 'pigs'},
+ {'country': 'United States', 'animal': 'pigs'},
+ {'country': 'United States', 'animal': 'pigs'},
+ {'country': 'United States', 'animal': 'pigs'},
+ {'country': 'United States', 'animal': 'sheep'},
+ {'country': 'United States', 'animal': 'sheep'},
+ {'country': 'United States', 'animal': 'sheep'},
+ {'country': 'United States', 'animal': 'sheep'},
+ {'country': 'United States', 'animal': 'sheep'},
+ {'country': 'United States', 'animal': 'sheep'},
+ {'country': 'United States', 'animal': 'sheep'}
+ ])
+
+domains = ['person', 'cattle', 'pigs', 'sheep']
+
+shape_scale = alt.Scale(
+ domain=domains,
+ range=[
+ 'M1.7 -1.7h-0.8c0.3 -0.2 0.6 -0.5 0.6 -0.9c0 -0.6 -0.4 -1 -1 -1c-0.6 0 -1 0.4 -1 1c0 0.4 0.2 0.7 0.6 0.9h-0.8c-0.4 0 -0.7 0.3 -0.7 0.6v1.9c0 0.3 0.3 0.6 0.6 0.6h0.2c0 0 0 0.1 0 0.1v1.9c0 0.3 0.2 0.6 0.3 0.6h1.3c0.2 0 0.3 -0.3 0.3 -0.6v-1.8c0 0 0 -0.1 0 -0.1h0.2c0.3 0 0.6 -0.3 0.6 -0.6v-2c0.2 -0.3 -0.1 -0.6 -0.4 -0.6z',
+ 'M4 -2c0 0 0.9 -0.7 1.1 -0.8c0.1 -0.1 -0.1 0.5 -0.3 0.7c-0.2 0.2 1.1 1.1 1.1 1.2c0 0.2 -0.2 0.8 -0.4 0.7c-0.1 0 -0.8 -0.3 -1.3 -0.2c-0.5 0.1 -1.3 1.6 -1.5 2c-0.3 0.4 -0.6 0.4 -0.6 0.4c0 0.1 0.3 1.7 0.4 1.8c0.1 0.1 -0.4 0.1 -0.5 0c0 0 -0.6 -1.9 -0.6 -1.9c-0.1 0 -0.3 -0.1 -0.3 -0.1c0 0.1 -0.5 1.4 -0.4 1.6c0.1 0.2 0.1 0.3 0.1 0.3c0 0 -0.4 0 -0.4 0c0 0 -0.2 -0.1 -0.1 -0.3c0 -0.2 0.3 -1.7 0.3 -1.7c0 0 -2.8 -0.9 -2.9 -0.8c-0.2 0.1 -0.4 0.6 -0.4 1c0 0.4 0.5 1.9 0.5 1.9l-0.5 0l-0.6 -2l0 -0.6c0 0 -1 0.8 -1 1c0 0.2 -0.2 1.3 -0.2 1.3c0 0 0.3 0.3 0.2 0.3c0 0 -0.5 0 -0.5 0c0 0 -0.2 -0.2 -0.1 -0.4c0 -0.1 0.2 -1.6 0.2 -1.6c0 0 0.5 -0.4 0.5 -0.5c0 -0.1 0 -2.7 -0.2 -2.7c-0.1 0 -0.4 2 -0.4 2c0 0 0 0.2 -0.2 0.5c-0.1 0.4 -0.2 1.1 -0.2 1.1c0 0 -0.2 -0.1 -0.2 -0.2c0 -0.1 -0.1 -0.7 0 -0.7c0.1 -0.1 0.3 -0.8 0.4 -1.4c0 -0.6 0.2 -1.3 0.4 -1.5c0.1 -0.2 0.6 -0.4 0.6 -0.4z',
+ 'M1.2 -2c0 0 0.7 0 1.2 0.5c0.5 0.5 0.4 0.6 0.5 0.6c0.1 0 0.7 0 0.8 0.1c0.1 0 0.2 0.2 0.2 0.2c0 0 -0.6 0.2 -0.6 0.3c0 0.1 0.4 0.9 0.6 0.9c0.1 0 0.6 0 0.6 0.1c0 0.1 0 0.7 -0.1 0.7c-0.1 0 -1.2 0.4 -1.5 0.5c-0.3 0.1 -1.1 0.5 -1.1 0.7c-0.1 0.2 0.4 1.2 0.4 1.2l-0.4 0c0 0 -0.4 -0.8 -0.4 -0.9c0 -0.1 -0.1 -0.3 -0.1 -0.3l-0.2 0l-0.5 1.3l-0.4 0c0 0 -0.1 -0.4 0 -0.6c0.1 -0.1 0.3 -0.6 0.3 -0.7c0 0 -0.8 0 -1.5 -0.1c-0.7 -0.1 -1.2 -0.3 -1.2 -0.2c0 0.1 -0.4 0.6 -0.5 0.6c0 0 0.3 0.9 0.3 0.9l-0.4 0c0 0 -0.4 -0.5 -0.4 -0.6c0 -0.1 -0.2 -0.6 -0.2 -0.5c0 0 -0.4 0.4 -0.6 0.4c-0.2 0.1 -0.4 0.1 -0.4 0.1c0 0 -0.1 0.6 -0.1 0.6l-0.5 0l0 -1c0 0 0.5 -0.4 0.5 -0.5c0 -0.1 -0.7 -1.2 -0.6 -1.4c0.1 -0.1 0.1 -1.1 0.1 -1.1c0 0 -0.2 0.1 -0.2 0.1c0 0 0 0.9 0 1c0 0.1 -0.2 0.3 -0.3 0.3c-0.1 0 0 -0.5 0 -0.9c0 -0.4 0 -0.4 0.2 -0.6c0.2 -0.2 0.6 -0.3 0.8 -0.8c0.3 -0.5 1 -0.6 1 -0.6z',
+ 'M-4.1 -0.5c0.2 0 0.2 0.2 0.5 0.2c0.3 0 0.3 -0.2 0.5 -0.2c0.2 0 0.2 0.2 0.4 0.2c0.2 0 0.2 -0.2 0.5 -0.2c0.2 0 0.2 0.2 0.4 0.2c0.2 0 0.2 -0.2 0.4 -0.2c0.1 0 0.2 0.2 0.4 0.1c0.2 0 0.2 -0.2 0.4 -0.3c0.1 0 0.1 -0.1 0.4 0c0.3 0 0.3 -0.4 0.6 -0.4c0.3 0 0.6 -0.3 0.7 -0.2c0.1 0.1 1.4 1 1.3 1.4c-0.1 0.4 -0.3 0.3 -0.4 0.3c-0.1 0 -0.5 -0.4 -0.7 -0.2c-0.3 0.2 -0.1 0.4 -0.2 0.6c-0.1 0.1 -0.2 0.2 -0.3 0.4c0 0.2 0.1 0.3 0 0.5c-0.1 0.2 -0.3 0.2 -0.3 0.5c0 0.3 -0.2 0.3 -0.3 0.6c-0.1 0.2 0 0.3 -0.1 0.5c-0.1 0.2 -0.1 0.2 -0.2 0.3c-0.1 0.1 0.3 1.1 0.3 1.1l-0.3 0c0 0 -0.3 -0.9 -0.3 -1c0 -0.1 -0.1 -0.2 -0.3 -0.2c-0.2 0 -0.3 0.1 -0.4 0.4c0 0.3 -0.2 0.8 -0.2 0.8l-0.3 0l0.3 -1c0 0 0.1 -0.6 -0.2 -0.5c-0.3 0.1 -0.2 -0.1 -0.4 -0.1c-0.2 -0.1 -0.3 0.1 -0.4 0c-0.2 -0.1 -0.3 0.1 -0.5 0c-0.2 -0.1 -0.1 0 -0.3 0.3c-0.2 0.3 -0.4 0.3 -0.4 0.3l0.2 1.1l-0.3 0l-0.2 -1.1c0 0 -0.4 -0.6 -0.5 -0.4c-0.1 0.3 -0.1 0.4 -0.3 0.4c-0.1 -0.1 -0.2 1.1 -0.2 1.1l-0.3 0l0.2 -1.1c0 0 -0.3 -0.1 -0.3 -0.5c0 -0.3 0.1 -0.5 0.1 -0.7c0.1 -0.2 -0.1 -1 -0.2 -1.1c-0.1 -0.2 -0.2 -0.8 -0.2 -0.8c0 0 -0.1 -0.5 0.4 -0.8z'
+ ]
+)
+
+color_scale = alt.Scale(
+ domain=domains,
+ range=['rgb(162,160,152)', 'rgb(194,81,64)', 'rgb(93,93,93)', 'rgb(91,131,149)']
+)
+
+alt.Chart(source).mark_point(filled=True, opacity=1, size=100).encode(
+ alt.X('x:O', axis=None),
+ alt.Y('animal:O', axis=None),
+ alt.Row('country:N', header=alt.Header(title='')),
+ alt.Shape('animal:N', legend=None, scale=shape_scale),
+ alt.Color('animal:N', legend=None, scale=color_scale),
+).transform_window(
+ x='rank()',
+ groupby=['country', 'animal']
+).properties(width=550, height=140)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/isotype_emoji.py b/venv/lib/python3.9/site-packages/altair/examples/isotype_emoji.py
new file mode 100644
index 00000000..3469070e
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/isotype_emoji.py
@@ -0,0 +1,63 @@
+'''
+Isotype Visualization with Emoji
+================================
+Isotype Visualization shows the distribution of animals across UK and US, using unicode emoji
+marks rather than custom SVG paths (see https://altair-viz.github.io/gallery/isotype.html).
+This is adapted from Vega-Lite example https://vega.github.io/vega-lite/examples/isotype_bar_chart_emoji.html.
+'''
+# category: case studies
+import altair as alt
+import pandas as pd
+
+source = pd.DataFrame([
+ {'country': 'Great Britain', 'animal': 'cattle'},
+ {'country': 'Great Britain', 'animal': 'cattle'},
+ {'country': 'Great Britain', 'animal': 'cattle'},
+ {'country': 'Great Britain', 'animal': 'pigs'},
+ {'country': 'Great Britain', 'animal': 'pigs'},
+ {'country': 'Great Britain', 'animal': 'sheep'},
+ {'country': 'Great Britain', 'animal': 'sheep'},
+ {'country': 'Great Britain', 'animal': 'sheep'},
+ {'country': 'Great Britain', 'animal': 'sheep'},
+ {'country': 'Great Britain', 'animal': 'sheep'},
+ {'country': 'Great Britain', 'animal': 'sheep'},
+ {'country': 'Great Britain', 'animal': 'sheep'},
+ {'country': 'Great Britain', 'animal': 'sheep'},
+ {'country': 'Great Britain', 'animal': 'sheep'},
+ {'country': 'Great Britain', 'animal': 'sheep'},
+ {'country': 'United States', 'animal': 'cattle'},
+ {'country': 'United States', 'animal': 'cattle'},
+ {'country': 'United States', 'animal': 'cattle'},
+ {'country': 'United States', 'animal': 'cattle'},
+ {'country': 'United States', 'animal': 'cattle'},
+ {'country': 'United States', 'animal': 'cattle'},
+ {'country': 'United States', 'animal': 'cattle'},
+ {'country': 'United States', 'animal': 'cattle'},
+ {'country': 'United States', 'animal': 'cattle'},
+ {'country': 'United States', 'animal': 'pigs'},
+ {'country': 'United States', 'animal': 'pigs'},
+ {'country': 'United States', 'animal': 'pigs'},
+ {'country': 'United States', 'animal': 'pigs'},
+ {'country': 'United States', 'animal': 'pigs'},
+ {'country': 'United States', 'animal': 'pigs'},
+ {'country': 'United States', 'animal': 'sheep'},
+ {'country': 'United States', 'animal': 'sheep'},
+ {'country': 'United States', 'animal': 'sheep'},
+ {'country': 'United States', 'animal': 'sheep'},
+ {'country': 'United States', 'animal': 'sheep'},
+ {'country': 'United States', 'animal': 'sheep'},
+ {'country': 'United States', 'animal': 'sheep'}
+ ])
+
+
+alt.Chart(source).mark_text(size=45, baseline='middle').encode(
+ alt.X('x:O', axis=None),
+ alt.Y('animal:O', axis=None),
+ alt.Row('country:N', header=alt.Header(title='')),
+ alt.Text('emoji:N')
+).transform_calculate(
+ emoji="{'cattle': '🐄', 'pigs': '🐖', 'sheep': '🐏'}[datum.animal]"
+).transform_window(
+ x='rank()',
+ groupby=['country', 'animal']
+).properties(width=550, height=140)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/isotype_grid.py b/venv/lib/python3.9/site-packages/altair/examples/isotype_grid.py
new file mode 100644
index 00000000..fd446e4b
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/isotype_grid.py
@@ -0,0 +1,38 @@
+"""
+Isotype Grid
+------------
+This example is a grid of isotype figures.
+"""
+# category: other charts
+import altair as alt
+import pandas as pd
+
+data = pd.DataFrame([dict(id=i) for i in range(1, 101)])
+
+person = (
+ "M1.7 -1.7h-0.8c0.3 -0.2 0.6 -0.5 0.6 -0.9c0 -0.6 "
+ "-0.4 -1 -1 -1c-0.6 0 -1 0.4 -1 1c0 0.4 0.2 0.7 0.6 "
+ "0.9h-0.8c-0.4 0 -0.7 0.3 -0.7 0.6v1.9c0 0.3 0.3 0.6 "
+ "0.6 0.6h0.2c0 0 0 0.1 0 0.1v1.9c0 0.3 0.2 0.6 0.3 "
+ "0.6h1.3c0.2 0 0.3 -0.3 0.3 -0.6v-1.8c0 0 0 -0.1 0 "
+ "-0.1h0.2c0.3 0 0.6 -0.3 0.6 -0.6v-2c0.2 -0.3 -0.1 "
+ "-0.6 -0.4 -0.6z"
+)
+
+alt.Chart(data).transform_calculate(
+ row="ceil(datum.id/10)"
+).transform_calculate(
+ col="datum.id - datum.row*10"
+).mark_point(
+ filled=True,
+ size=50
+).encode(
+ x=alt.X("col:O", axis=None),
+ y=alt.Y("row:O", axis=None),
+ shape=alt.ShapeValue(person)
+).properties(
+ width=400,
+ height=400
+).configure_view(
+ strokeWidth=0
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/layer_line_color_rule.py b/venv/lib/python3.9/site-packages/altair/examples/layer_line_color_rule.py
new file mode 100644
index 00000000..aa948ecb
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/layer_line_color_rule.py
@@ -0,0 +1,28 @@
+"""
+Line Chart with Layered Aggregates
+----------------------------------
+This example shows how to make a multi-series line chart of the daily closing
+stock prices for AAPL, AMZN, GOOG, IBM, and MSFT between 2000 and 2010, along
+with a layered rule showing the average values.
+"""
+# category: line charts
+import altair as alt
+from vega_datasets import data
+
+source = data.stocks()
+
+base = alt.Chart(source).properties(width=550)
+
+line = base.mark_line().encode(
+ x='date',
+ y='price',
+ color='symbol'
+)
+
+rule = base.mark_rule().encode(
+ y='average(price)',
+ color='symbol',
+ size=alt.value(2)
+)
+
+line + rule
diff --git a/venv/lib/python3.9/site-packages/altair/examples/layered_area_chart.py b/venv/lib/python3.9/site-packages/altair/examples/layered_area_chart.py
new file mode 100644
index 00000000..fe9e42c2
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/layered_area_chart.py
@@ -0,0 +1,16 @@
+"""
+Layered Area Chart
+------------------
+This example shows a layered area chart.
+"""
+# category: area charts
+import altair as alt
+from vega_datasets import data
+
+source = data.iowa_electricity()
+
+alt.Chart(source).mark_area(opacity=0.3).encode(
+ x="year:T",
+ y=alt.Y("net_generation:Q", stack=None),
+ color="source:N"
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/layered_bar_chart.py b/venv/lib/python3.9/site-packages/altair/examples/layered_bar_chart.py
new file mode 100644
index 00000000..48d221e3
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/layered_bar_chart.py
@@ -0,0 +1,16 @@
+"""
+Layered Bar Chart
+-----------------
+This example shows a segmented bar chart that is layered rather than stacked.
+"""
+# category: bar charts
+import altair as alt
+from vega_datasets import data
+
+source = data.iowa_electricity()
+
+alt.Chart(source).mark_bar(opacity=0.7).encode(
+ x='year:O',
+ y=alt.Y('net_generation:Q', stack=None),
+ color="source",
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/layered_chart_bar_mark.py b/venv/lib/python3.9/site-packages/altair/examples/layered_chart_bar_mark.py
new file mode 100644
index 00000000..3cc65120
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/layered_chart_bar_mark.py
@@ -0,0 +1,32 @@
+"""
+Bar and Tick Chart
+------------------
+How to layer a tick chart on top of a bar chart.
+"""
+# category: bar charts
+import altair as alt
+import pandas as pd
+
+source = pd.DataFrame({
+ 'project': ['a', 'b', 'c', 'd', 'e', 'f', 'g'],
+ 'score': [25, 57, 23, 19, 8, 47, 8],
+ 'goal': [25, 47, 30, 27, 38, 19, 4]
+})
+
+bar = alt.Chart(source).mark_bar().encode(
+ x='project',
+ y='score'
+).properties(
+ width=alt.Step(40) # controls width of bar.
+)
+
+tick = alt.Chart(source).mark_tick(
+ color='red',
+ thickness=2,
+ size=40 * 0.9, # controls width of tick.
+).encode(
+ x='project',
+ y='goal'
+)
+
+bar + tick
diff --git a/venv/lib/python3.9/site-packages/altair/examples/layered_chart_with_dual_axis.py b/venv/lib/python3.9/site-packages/altair/examples/layered_chart_with_dual_axis.py
new file mode 100644
index 00000000..f01b94a4
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/layered_chart_with_dual_axis.py
@@ -0,0 +1,30 @@
+"""
+Layered chart with Dual-Axis
+----------------------------
+This example shows how to create a second independent y axis.
+"""
+# category: other charts
+
+import altair as alt
+from vega_datasets import data
+
+source = data.seattle_weather()
+
+base = alt.Chart(source).encode(
+ alt.X('month(date):T', axis=alt.Axis(title=None))
+)
+
+area = base.mark_area(opacity=0.3, color='#57A44C').encode(
+ alt.Y('average(temp_max)',
+ axis=alt.Axis(title='Avg. Temperature (°C)', titleColor='#57A44C')),
+ alt.Y2('average(temp_min)')
+)
+
+line = base.mark_line(stroke='#5276A7', interpolate='monotone').encode(
+ alt.Y('average(precipitation)',
+ axis=alt.Axis(title='Precipitation (inches)', titleColor='#5276A7'))
+)
+
+alt.layer(area, line).resolve_scale(
+ y = 'independent'
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/layered_heatmap_text.py b/venv/lib/python3.9/site-packages/altair/examples/layered_heatmap_text.py
new file mode 100644
index 00000000..396f50b6
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/layered_heatmap_text.py
@@ -0,0 +1,41 @@
+"""
+Text over a Heatmap
+-------------------
+
+An example of a layered chart of text over a heatmap using the cars dataset.
+"""
+# category: other charts
+import altair as alt
+from vega_datasets import data
+
+source = data.cars()
+
+# Configure common options
+base = alt.Chart(source).transform_aggregate(
+ num_cars='count()',
+ groupby=['Origin', 'Cylinders']
+).encode(
+ alt.X('Cylinders:O', scale=alt.Scale(paddingInner=0)),
+ alt.Y('Origin:O', scale=alt.Scale(paddingInner=0)),
+)
+
+# Configure heatmap
+heatmap = base.mark_rect().encode(
+ color=alt.Color('num_cars:Q',
+ scale=alt.Scale(scheme='viridis'),
+ legend=alt.Legend(direction='horizontal')
+ )
+)
+
+# Configure text
+text = base.mark_text(baseline='middle').encode(
+ text='num_cars:Q',
+ color=alt.condition(
+ alt.datum.num_cars > 100,
+ alt.value('black'),
+ alt.value('white')
+ )
+)
+
+# Draw the chart
+heatmap + text \ No newline at end of file
diff --git a/venv/lib/python3.9/site-packages/altair/examples/layered_histogram.py b/venv/lib/python3.9/site-packages/altair/examples/layered_histogram.py
new file mode 100644
index 00000000..4dca7593
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/layered_histogram.py
@@ -0,0 +1,29 @@
+"""
+Layered Histogram
+=================
+This example shows how to use opacity to make a layered histogram in Altair.
+"""
+# category: histograms
+import pandas as pd
+import altair as alt
+import numpy as np
+np.random.seed(42)
+
+# Generating Data
+source = pd.DataFrame({
+ 'Trial A': np.random.normal(0, 0.8, 1000),
+ 'Trial B': np.random.normal(-2, 1, 1000),
+ 'Trial C': np.random.normal(3, 2, 1000)
+})
+
+alt.Chart(source).transform_fold(
+ ['Trial A', 'Trial B', 'Trial C'],
+ as_=['Experiment', 'Measurement']
+).mark_bar(
+ opacity=0.3,
+ binSpacing=0
+).encode(
+ alt.X('Measurement:Q', bin=alt.Bin(maxbins=100)),
+ alt.Y('count()', stack=None),
+ alt.Color('Experiment:N')
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/line_chart_with_color_datum.py b/venv/lib/python3.9/site-packages/altair/examples/line_chart_with_color_datum.py
new file mode 100644
index 00000000..912b32aa
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/line_chart_with_color_datum.py
@@ -0,0 +1,21 @@
+"""
+Line Chart with datum for color
+-------------------------------
+An example of using ``datum`` and ``repeat`` to color a multi-series line chart.
+This is adapted from this corresponding Vega-Lite Example:
+`Repeat and Layer to Show Different Movie Measures <https://vega.github.io/vega-lite/examples/repeat_layer.html>`_.
+"""
+# category: line charts
+
+import altair as alt
+from vega_datasets import data
+
+source = data.movies()
+
+alt.Chart(source).mark_line().encode(
+ x=alt.X("IMDB_Rating", bin=True),
+ y=alt.Y(
+ alt.repeat("layer"), aggregate="mean", title="Mean of US and Worldwide Gross"
+ ),
+ color=alt.datum(alt.repeat("layer")),
+).repeat(layer=["US_Gross", "Worldwide_Gross"])
diff --git a/venv/lib/python3.9/site-packages/altair/examples/line_chart_with_cumsum.py b/venv/lib/python3.9/site-packages/altair/examples/line_chart_with_cumsum.py
new file mode 100644
index 00000000..2b21b084
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/line_chart_with_cumsum.py
@@ -0,0 +1,24 @@
+"""
+Line Chart with Cumulative Sum
+------------------------------
+This chart creates a simple line chart from the cumulative sum of a fields.
+"""
+# category: line charts
+import altair as alt
+from vega_datasets import data
+
+source = data.wheat()
+
+alt.Chart(source).mark_line().transform_window(
+ # Sort the data chronologically
+ sort=[{'field': 'year'}],
+ # Include all previous records before the current record and none after
+ # (This is the default value so you could skip it and it would still work.)
+ frame=[None, 0],
+ # What to add up as you go
+ cumulative_wheat='sum(wheat)'
+).encode(
+ x='year:O',
+ # Plot the calculated field created by the transformation
+ y='cumulative_wheat:Q'
+).properties(width=600) \ No newline at end of file
diff --git a/venv/lib/python3.9/site-packages/altair/examples/line_chart_with_datum.py b/venv/lib/python3.9/site-packages/altair/examples/line_chart_with_datum.py
new file mode 100644
index 00000000..490bd0dc
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/line_chart_with_datum.py
@@ -0,0 +1,32 @@
+"""
+Line Chart with datum
+---------------------------------
+An example of using ``datum`` to highlight certain values, including a ``DateTime`` value.
+This is adapted from two corresponding Vega-Lite Examples:
+`Highlight a Specific Value <https://vega.github.io/vega-lite/docs/datum.html#highlight-a-specific-data-value>`_.
+"""
+# category: line charts
+
+import altair as alt
+from vega_datasets import data
+
+source = data.stocks()
+
+lines = (
+ alt.Chart(source)
+ .mark_line()
+ .encode(x="date", y="price", color="symbol")
+)
+
+xrule = (
+ alt.Chart()
+ .mark_rule(color="cyan", strokeWidth=2)
+ .encode(x=alt.datum(alt.DateTime(year=2006, month="November")))
+)
+
+yrule = (
+ alt.Chart().mark_rule(strokeDash=[12, 6], size=2).encode(y=alt.datum(350))
+)
+
+
+lines + yrule + xrule
diff --git a/venv/lib/python3.9/site-packages/altair/examples/line_chart_with_generator.py b/venv/lib/python3.9/site-packages/altair/examples/line_chart_with_generator.py
new file mode 100644
index 00000000..096c2489
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/line_chart_with_generator.py
@@ -0,0 +1,21 @@
+"""
+Line Chart with Sequence Generator
+----------------------------------
+This examples shows how to create multiple lines using the sequence generator.
+"""
+# category: line charts
+
+import altair as alt
+
+source = alt.sequence(start=0, stop=12.7, step=0.1, as_='x')
+
+alt.Chart(source).mark_line().transform_calculate(
+ sin='sin(datum.x)',
+ cos='cos(datum.x)'
+).transform_fold(
+ ['sin', 'cos']
+).encode(
+ x='x:Q',
+ y='value:Q',
+ color='key:N'
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/line_chart_with_points.py b/venv/lib/python3.9/site-packages/altair/examples/line_chart_with_points.py
new file mode 100644
index 00000000..26bd5431
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/line_chart_with_points.py
@@ -0,0 +1,24 @@
+"""
+Line Chart with Points
+----------------------
+This chart shows a simple line chart with points marking each value. Use
+``point=True`` for points with default appearance or customize it with
+``OverlayMarkDef()``.
+"""
+# category: line charts
+import altair as alt
+import numpy as np
+import pandas as pd
+
+x = np.arange(100)
+source = pd.DataFrame({
+ 'x': x,
+ 'f(x)': np.sin(x / 5)
+})
+
+alt.Chart(source).mark_line(
+ point=alt.OverlayMarkDef(color="red")
+).encode(
+ x='x',
+ y='f(x)'
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/line_percent.py b/venv/lib/python3.9/site-packages/altair/examples/line_percent.py
new file mode 100644
index 00000000..fd23572d
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/line_percent.py
@@ -0,0 +1,18 @@
+"""
+Line Chart with Percent axis
+----------------------------
+This example shows how to format the tick labels of the y-axis of a chart as percentages.
+"""
+# category: line charts
+import altair as alt
+from vega_datasets import data
+
+source = data.jobs.url
+
+alt.Chart(source).mark_line().encode(
+ alt.X('year:O'),
+ alt.Y('perc:Q', axis=alt.Axis(format='%')),
+ color='sex:N'
+).transform_filter(
+ alt.datum.job == 'Welder'
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/line_with_ci.py b/venv/lib/python3.9/site-packages/altair/examples/line_with_ci.py
new file mode 100644
index 00000000..410cbfe5
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/line_with_ci.py
@@ -0,0 +1,22 @@
+"""
+Line Chart with Confidence Interval Band
+----------------------------------------
+How to make a line chart with a bootstrapped 95% confidence interval band.
+"""
+# category: line charts
+import altair as alt
+from vega_datasets import data
+
+source = data.cars()
+
+line = alt.Chart(source).mark_line().encode(
+ x='Year',
+ y='mean(Miles_per_Gallon)'
+)
+
+band = alt.Chart(source).mark_errorband(extent='ci').encode(
+ x='Year',
+ y=alt.Y('Miles_per_Gallon', title='Miles/Gallon'),
+)
+
+band + line
diff --git a/venv/lib/python3.9/site-packages/altair/examples/line_with_log_scale.py b/venv/lib/python3.9/site-packages/altair/examples/line_with_log_scale.py
new file mode 100644
index 00000000..b45fcd92
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/line_with_log_scale.py
@@ -0,0 +1,18 @@
+"""
+Line Chart with Logarithmic Scale
+---------------------------------
+How to make a line chart on a `Logarithmic scale <https://en.wikipedia.org/wiki/Logarithmic_scale>`_.
+"""
+# category: line charts
+import altair as alt
+from vega_datasets import data
+
+source = data.population()
+
+alt.Chart(source).mark_line().encode(
+ x='year:O',
+ y=alt.Y(
+ 'sum(people)',
+ scale=alt.Scale(type="log") # Here the scale is applied
+ )
+) \ No newline at end of file
diff --git a/venv/lib/python3.9/site-packages/altair/examples/london_tube.py b/venv/lib/python3.9/site-packages/altair/examples/london_tube.py
new file mode 100644
index 00000000..3a39e6ae
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/london_tube.py
@@ -0,0 +1,59 @@
+"""
+London Tube Lines
+=================
+This example shows the London tube lines against the background of the
+borough boundaries. It is based on the vega-lite example at
+https://vega.github.io/vega-lite/examples/geo_layer_line_london.html.
+"""
+# category: case studies
+import altair as alt
+from vega_datasets import data
+
+boroughs = alt.topo_feature(data.londonBoroughs.url, 'boroughs')
+tubelines = alt.topo_feature(data.londonTubeLines.url, 'line')
+centroids = data.londonCentroids.url
+
+background = alt.Chart(boroughs).mark_geoshape(
+ stroke='white',
+ strokeWidth=2
+).encode(
+ color=alt.value('#eee'),
+).properties(
+ width=700,
+ height=500
+)
+
+labels = alt.Chart(centroids).mark_text().encode(
+ longitude='cx:Q',
+ latitude='cy:Q',
+ text='bLabel:N',
+ size=alt.value(8),
+ opacity=alt.value(0.6)
+).transform_calculate(
+ "bLabel", "indexof (datum.name,' ') > 0 ? substring(datum.name,0,indexof(datum.name, ' ')) : datum.name"
+)
+
+line_scale = alt.Scale(domain=["Bakerloo", "Central", "Circle", "District", "DLR",
+ "Hammersmith & City", "Jubilee", "Metropolitan", "Northern",
+ "Piccadilly", "Victoria", "Waterloo & City"],
+ range=["rgb(137,78,36)", "rgb(220,36,30)", "rgb(255,206,0)",
+ "rgb(1,114,41)", "rgb(0,175,173)", "rgb(215,153,175)",
+ "rgb(106,114,120)", "rgb(114,17,84)", "rgb(0,0,0)",
+ "rgb(0,24,168)", "rgb(0,160,226)", "rgb(106,187,170)"])
+
+lines = alt.Chart(tubelines).mark_geoshape(
+ filled=False,
+ strokeWidth=2
+).encode(
+ alt.Color(
+ 'id:N',
+ legend=alt.Legend(
+ title=None,
+ orient='bottom-right',
+ offset=0
+ ),
+ scale=line_scale
+ )
+)
+
+background + labels + lines
diff --git a/venv/lib/python3.9/site-packages/altair/examples/multi_series_line.py b/venv/lib/python3.9/site-packages/altair/examples/multi_series_line.py
new file mode 100644
index 00000000..ffd68501
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/multi_series_line.py
@@ -0,0 +1,18 @@
+"""
+Multi Series Line Chart
+-----------------------
+
+This example shows how to make a multi series line chart of the daily closing stock prices for AAPL, AMZN, GOOG, IBM, and MSFT between 2000 and 2010.
+"""
+# category: line charts
+import altair as alt
+from vega_datasets import data
+
+source = data.stocks()
+
+alt.Chart(source).mark_line().encode(
+ x='date',
+ y='price',
+ color='symbol',
+ strokeDash='symbol',
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/multifeature_scatter_plot.py b/venv/lib/python3.9/site-packages/altair/examples/multifeature_scatter_plot.py
new file mode 100644
index 00000000..40e189bb
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/multifeature_scatter_plot.py
@@ -0,0 +1,17 @@
+"""
+Multifeature Scatter Plot
+=========================
+This example shows how to make a scatter plot with multiple feature encodings.
+"""
+# category: scatter plots
+import altair as alt
+from vega_datasets import data
+
+source = data.iris()
+
+alt.Chart(source).mark_circle().encode(
+ alt.X('sepalLength', scale=alt.Scale(zero=False)),
+ alt.Y('sepalWidth', scale=alt.Scale(zero=False, padding=1)),
+ color='species',
+ size='petalWidth'
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/multiline_highlight.py b/venv/lib/python3.9/site-packages/altair/examples/multiline_highlight.py
new file mode 100644
index 00000000..231ff737
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/multiline_highlight.py
@@ -0,0 +1,36 @@
+"""
+Multi-Line Highlight
+====================
+This multi-line chart uses an invisible Voronoi tessellation to handle mouseover to
+identify the nearest point and then highlight the line on which the point falls.
+It is adapted from the Vega-Lite example found at
+https://bl.ocks.org/amitkaps/fe4238e716db53930b2f1a70d3401701
+"""
+# category: interactive charts
+import altair as alt
+from vega_datasets import data
+
+source = data.stocks()
+
+highlight = alt.selection(type='single', on='mouseover',
+ fields=['symbol'], nearest=True)
+
+base = alt.Chart(source).encode(
+ x='date:T',
+ y='price:Q',
+ color='symbol:N'
+)
+
+points = base.mark_circle().encode(
+ opacity=alt.value(0)
+).add_selection(
+ highlight
+).properties(
+ width=600
+)
+
+lines = base.mark_line().encode(
+ size=alt.condition(~highlight, alt.value(1), alt.value(3))
+)
+
+points + lines
diff --git a/venv/lib/python3.9/site-packages/altair/examples/multiline_tooltip.py b/venv/lib/python3.9/site-packages/altair/examples/multiline_tooltip.py
new file mode 100644
index 00000000..84d06d8d
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/multiline_tooltip.py
@@ -0,0 +1,67 @@
+"""
+Multi-Line Tooltip
+==================
+This example shows how you can use selections and layers to create a
+tooltip-like behavior tied to the x position of the cursor.
+If you are looking for more standard tooltips, it is recommended to use the
+tooltip encoding channel as shown in the
+`Scatter Plot With Tooltips <https://altair-viz.github.io/gallery/scatter_tooltips.html>`_
+example.
+
+The following example employs a little trick to isolate the x-position of the
+cursor: we add some transparent points with only an x encoding (no y encoding)
+and tie a *nearest* selection to these, tied to the "x" field.
+"""
+# category: interactive charts
+import altair as alt
+import pandas as pd
+import numpy as np
+
+np.random.seed(42)
+source = pd.DataFrame(np.cumsum(np.random.randn(100, 3), 0).round(2),
+ columns=['A', 'B', 'C'], index=pd.RangeIndex(100, name='x'))
+source = source.reset_index().melt('x', var_name='category', value_name='y')
+
+# Create a selection that chooses the nearest point & selects based on x-value
+nearest = alt.selection(type='single', nearest=True, on='mouseover',
+ fields=['x'], empty='none')
+
+# The basic line
+line = alt.Chart(source).mark_line(interpolate='basis').encode(
+ x='x:Q',
+ y='y:Q',
+ color='category:N'
+)
+
+# Transparent selectors across the chart. This is what tells us
+# the x-value of the cursor
+selectors = alt.Chart(source).mark_point().encode(
+ x='x:Q',
+ opacity=alt.value(0),
+).add_selection(
+ nearest
+)
+
+# Draw points on the line, and highlight based on selection
+points = line.mark_point().encode(
+ opacity=alt.condition(nearest, alt.value(1), alt.value(0))
+)
+
+# Draw text labels near the points, and highlight based on selection
+text = line.mark_text(align='left', dx=5, dy=-5).encode(
+ text=alt.condition(nearest, 'y:Q', alt.value(' '))
+)
+
+# Draw a rule at the location of the selection
+rules = alt.Chart(source).mark_rule(color='gray').encode(
+ x='x:Q',
+).transform_filter(
+ nearest
+)
+
+# Put the five layers into a chart and bind the data
+alt.layer(
+ line, selectors, points, rules, text
+).properties(
+ width=600, height=300
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/multiple_interactions.py b/venv/lib/python3.9/site-packages/altair/examples/multiple_interactions.py
new file mode 100644
index 00000000..2588b7e1
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/multiple_interactions.py
@@ -0,0 +1,90 @@
+"""
+Multiple Interactions
+=====================
+This example shows how multiple user inputs can be layered onto a chart. The four inputs have functionality as follows:
+
+* Dropdown: Filters the movies by genre
+* Radio Buttons: Highlights certain films by Worldwide Gross
+* Mouse Drag and Scroll: Zooms the x and y scales to allow for panning.
+
+
+
+"""
+# category: interactive charts
+import altair as alt
+from vega_datasets import data
+
+movies = alt.UrlData(
+ data.movies.url,
+ format=alt.DataFormat(parse={"Release_Date":"date"})
+)
+ratings = ['G', 'NC-17', 'PG', 'PG-13', 'R']
+genres = ['Action', 'Adventure', 'Black Comedy', 'Comedy',
+ 'Concert/Performance', 'Documentary', 'Drama', 'Horror', 'Musical',
+ 'Romantic Comedy', 'Thriller/Suspense', 'Western']
+
+base = alt.Chart(movies, width=200, height=200).mark_point(filled=True).transform_calculate(
+ Rounded_IMDB_Rating = "floor(datum.IMDB_Rating)",
+ Hundred_Million_Production = "datum.Production_Budget > 100000000.0 ? 100 : 10",
+ Release_Year = "year(datum.Release_Date)"
+).transform_filter(
+ alt.datum.IMDB_Rating > 0
+).transform_filter(
+ alt.FieldOneOfPredicate(field='MPAA_Rating', oneOf=ratings)
+).encode(
+ x=alt.X('Worldwide_Gross:Q', scale=alt.Scale(domain=(100000,10**9), clamp=True)),
+ y='IMDB_Rating:Q',
+ tooltip="Title:N"
+)
+
+# A slider filter
+year_slider = alt.binding_range(min=1969, max=2018, step=1)
+slider_selection = alt.selection_single(bind=year_slider, fields=['Release_Year'], name="Release Year_")
+
+
+filter_year = base.add_selection(
+ slider_selection
+).transform_filter(
+ slider_selection
+).properties(title="Slider Filtering")
+
+# A dropdown filter
+genre_dropdown = alt.binding_select(options=genres)
+genre_select = alt.selection_single(fields=['Major_Genre'], bind=genre_dropdown, name="Genre")
+
+filter_genres = base.add_selection(
+ genre_select
+).transform_filter(
+ genre_select
+).properties(title="Dropdown Filtering")
+
+#color changing marks
+rating_radio = alt.binding_radio(options=ratings)
+
+rating_select = alt.selection_single(fields=['MPAA_Rating'], bind=rating_radio, name="Rating")
+rating_color_condition = alt.condition(rating_select,
+ alt.Color('MPAA_Rating:N', legend=None),
+ alt.value('lightgray'))
+
+highlight_ratings = base.add_selection(
+ rating_select
+).encode(
+ color=rating_color_condition
+).properties(title="Radio Button Highlighting")
+
+# Boolean selection for format changes
+input_checkbox = alt.binding_checkbox()
+checkbox_selection = alt.selection_single(bind=input_checkbox, name="Big Budget Films")
+
+size_checkbox_condition = alt.condition(checkbox_selection,
+ alt.SizeValue(25),
+ alt.Size('Hundred_Million_Production:Q')
+ )
+
+budget_sizing = base.add_selection(
+ checkbox_selection
+).encode(
+ size=size_checkbox_condition
+).properties(title="Checkbox Formatting")
+
+( filter_year | filter_genres) & (highlight_ratings | budget_sizing )
diff --git a/venv/lib/python3.9/site-packages/altair/examples/multiple_marks.py b/venv/lib/python3.9/site-packages/altair/examples/multiple_marks.py
new file mode 100644
index 00000000..e262dd30
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/multiple_marks.py
@@ -0,0 +1,17 @@
+"""
+Multiple Marks
+==============
+This example demonstrates creating a single chart with multiple markers
+representing the same data.
+"""
+# category: other charts
+import altair as alt
+from vega_datasets import data
+
+source = data.stocks()
+
+alt.Chart(source).mark_line(point=True).encode(
+ x='date:T',
+ y='price:Q',
+ color='symbol:N'
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/natural_disasters.py b/venv/lib/python3.9/site-packages/altair/examples/natural_disasters.py
new file mode 100644
index 00000000..339033db
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/natural_disasters.py
@@ -0,0 +1,29 @@
+"""
+Natural Disasters
+-----------------
+This example shows a visualization of global deaths from natural disasters.
+"""
+# category: case studies
+import altair as alt
+from vega_datasets import data
+
+source = data.disasters.url
+
+alt.Chart(source).mark_circle(
+ opacity=0.8,
+ stroke='black',
+ strokeWidth=1
+).encode(
+ alt.X('Year:O', axis=alt.Axis(labelAngle=0)),
+ alt.Y('Entity:N'),
+ alt.Size('Deaths:Q',
+ scale=alt.Scale(range=[0, 4000]),
+ legend=alt.Legend(title='Annual Global Deaths')
+ ),
+ alt.Color('Entity:N', legend=None)
+).properties(
+ width=450,
+ height=320
+).transform_filter(
+ alt.datum.Entity != 'All natural disasters'
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/normalized_stacked_area_chart.py b/venv/lib/python3.9/site-packages/altair/examples/normalized_stacked_area_chart.py
new file mode 100644
index 00000000..a6bfec36
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/normalized_stacked_area_chart.py
@@ -0,0 +1,16 @@
+"""
+Normalized Stacked Area Chart
+-----------------------------
+This example shows how to make a normalized stacked area chart.
+"""
+# category: area charts
+import altair as alt
+from vega_datasets import data
+
+source = data.iowa_electricity()
+
+alt.Chart(source).mark_area().encode(
+ x="year:T",
+ y=alt.Y("net_generation:Q", stack="normalize"),
+ color="source:N"
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/normalized_stacked_bar_chart.py b/venv/lib/python3.9/site-packages/altair/examples/normalized_stacked_bar_chart.py
new file mode 100644
index 00000000..307a452d
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/normalized_stacked_bar_chart.py
@@ -0,0 +1,16 @@
+"""
+Normalized Stacked Bar Chart
+----------------------------
+This is an example of a normalized stacked bar chart using data which contains crop yields over different regions and different years in the 1930s.
+"""
+# category: bar charts
+import altair as alt
+from vega_datasets import data
+
+source = data.barley()
+
+alt.Chart(source).mark_bar().encode(
+ x=alt.X('sum(yield)', stack="normalize"),
+ y='variety',
+ color='site'
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/normed_parallel_coordinates.py b/venv/lib/python3.9/site-packages/altair/examples/normed_parallel_coordinates.py
new file mode 100644
index 00000000..88cd45c9
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/normed_parallel_coordinates.py
@@ -0,0 +1,41 @@
+"""
+Normalized Parallel Coordinates Example
+---------------------------------------
+A `Parallel Coordinates <https://en.wikipedia.org/wiki/Parallel_coordinates>`_
+chart is a chart that lets you visualize the individual data points by drawing
+a single line for each of them.
+
+Such a chart can be created in Altair by first transforming the data into a
+suitable representation.
+
+This example shows a modified parallel coordinates chart with the Iris dataset,
+where the y-axis shows the value after min-max rather than the raw value. It's a
+simplified Altair version of `the VegaLite version <https://vega.github.io/vega-lite/examples/parallel_coordinate.html>`_
+"""
+# category: other charts
+import altair as alt
+from vega_datasets import data
+from altair import datum
+
+source = data.iris()
+
+alt.Chart(source).transform_window(
+ index='count()'
+).transform_fold(
+ ['petalLength', 'petalWidth', 'sepalLength', 'sepalWidth']
+).transform_joinaggregate(
+ min='min(value)',
+ max='max(value)',
+ groupby=['key']
+).transform_calculate(
+ minmax_value=(datum.value-datum.min)/(datum.max-datum.min),
+ mid=(datum.min+datum.max)/2
+).mark_line().encode(
+ x='key:N',
+ y='minmax_value:Q',
+ color='species:N',
+ detail='index:N',
+ opacity=alt.value(0.5)
+).properties(width=500)
+
+
diff --git a/venv/lib/python3.9/site-packages/altair/examples/one_dot_per_zipcode.py b/venv/lib/python3.9/site-packages/altair/examples/one_dot_per_zipcode.py
new file mode 100644
index 00000000..c08ff393
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/one_dot_per_zipcode.py
@@ -0,0 +1,25 @@
+"""
+One Dot Per Zipcode
+-----------------------
+This example shows a geographical plot with one dot per zipcode.
+"""
+# category: case studies
+import altair as alt
+from vega_datasets import data
+
+# Since the data is more than 5,000 rows we'll import it from a URL
+source = data.zipcodes.url
+
+alt.Chart(source).transform_calculate(
+ "leading digit", alt.expr.substring(alt.datum.zip_code, 0, 1)
+).mark_circle(size=3).encode(
+ longitude='longitude:Q',
+ latitude='latitude:Q',
+ color='leading digit:N',
+ tooltip='zip_code:N'
+).project(
+ type='albersUsa'
+).properties(
+ width=650,
+ height=400
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/pacman_chart.py b/venv/lib/python3.9/site-packages/altair/examples/pacman_chart.py
new file mode 100644
index 00000000..0058acd7
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/pacman_chart.py
@@ -0,0 +1,17 @@
+"""
+Pacman Chart
+------------
+Chart made using ``mark_arc`` and constant values.
+This could also be made using
+``alt.Chart(source).mark_arc(color = "gold", theta = (5/8)*np.pi, theta2 = (19/8)*np.pi,radius=100)``.
+"""
+# category: circular plots
+
+import numpy as np
+import altair as alt
+
+alt.Chart().mark_arc(color="gold").encode(
+ theta=alt.datum((5 / 8) * np.pi, scale=None),
+ theta2=alt.datum((19 / 8) * np.pi),
+ radius=alt.datum(100, scale=None),
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/parallel_coordinates.py b/venv/lib/python3.9/site-packages/altair/examples/parallel_coordinates.py
new file mode 100644
index 00000000..2f977dbf
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/parallel_coordinates.py
@@ -0,0 +1,28 @@
+"""
+Parallel Coordinates Example
+----------------------------
+A `Parallel Coordinates <https://en.wikipedia.org/wiki/Parallel_coordinates>`_
+chart is a chart that lets you visualize the individual data points by drawing
+a single line for each of them.
+Such a chart can be created in Altair by first transforming the data into a
+suitable representation.
+This example shows a parallel coordinates chart with the Iris dataset.
+"""
+# category: other charts
+
+import altair as alt
+from vega_datasets import data
+
+source = data.iris()
+
+alt.Chart(source).transform_window(
+ index='count()'
+).transform_fold(
+ ['petalLength', 'petalWidth', 'sepalLength', 'sepalWidth']
+).mark_line().encode(
+ x='key:N',
+ y='value:Q',
+ color='species:N',
+ detail='index:N',
+ opacity=alt.value(0.5)
+).properties(width=500)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/percentage_of_total.py b/venv/lib/python3.9/site-packages/altair/examples/percentage_of_total.py
new file mode 100644
index 00000000..462353fd
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/percentage_of_total.py
@@ -0,0 +1,21 @@
+"""
+Calculating Percentage of Total
+-------------------------------
+This chart demonstrates how to use a joinaggregate transform to display
+data values as a percentage of total.
+"""
+# category: bar charts
+import altair as alt
+import pandas as pd
+
+source = pd.DataFrame({'Activity': ['Sleeping', 'Eating', 'TV', 'Work', 'Exercise'],
+ 'Time': [8, 2, 4, 8, 2]})
+
+alt.Chart(source).transform_joinaggregate(
+ TotalTime='sum(Time)',
+).transform_calculate(
+ PercentOfTotal="datum.Time / datum.TotalTime"
+).mark_bar().encode(
+ alt.X('PercentOfTotal:Q', axis=alt.Axis(format='.0%')),
+ y='Activity:N'
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/pie_chart.py b/venv/lib/python3.9/site-packages/altair/examples/pie_chart.py
new file mode 100644
index 00000000..230127a9
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/pie_chart.py
@@ -0,0 +1,18 @@
+"""
+Pie Chart
+---------
+This example shows how to make a Pie Chart using ``mark_arc``.
+This is adapted from a corresponding Vega-Lite Example:
+`Pie Chart <https://vega.github.io/vega-lite/examples/arc_pie.html>`_.
+"""
+# category: circular plots
+
+import pandas as pd
+import altair as alt
+
+source = pd.DataFrame({"category": [1, 2, 3, 4, 5, 6], "value": [4, 6, 10, 3, 7, 8]})
+
+alt.Chart(source).mark_arc().encode(
+ theta=alt.Theta(field="value", type="quantitative"),
+ color=alt.Color(field="category", type="nominal"),
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/pie_chart_with_labels.py b/venv/lib/python3.9/site-packages/altair/examples/pie_chart_with_labels.py
new file mode 100644
index 00000000..15a3fb18
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/pie_chart_with_labels.py
@@ -0,0 +1,24 @@
+"""
+Pie Chart with Labels
+---------------------
+This example shows how to layer text over arc marks (``mark_arc``) to label pie charts.
+This is adapted from a corresponding Vega-Lite Example:
+`Pie Chart with Labels <https://vega.github.io/vega-lite/examples/layer_arc_label.html>`_.
+"""
+# category: circular plots
+
+import pandas as pd
+import altair as alt
+
+source = pd.DataFrame(
+ {"category": ["a", "b", "c", "d", "e", "f"], "value": [4, 6, 10, 3, 7, 8]}
+)
+
+base = alt.Chart(source).encode(
+ theta=alt.Theta("value:Q", stack=True), color=alt.Color("category:N", legend=None)
+)
+
+pie = base.mark_arc(outerRadius=120)
+text = base.mark_text(radius=140, size=20).encode(text="category:N")
+
+pie + text
diff --git a/venv/lib/python3.9/site-packages/altair/examples/poly_fit_regression.py b/venv/lib/python3.9/site-packages/altair/examples/poly_fit_regression.py
new file mode 100644
index 00000000..0e710532
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/poly_fit_regression.py
@@ -0,0 +1,36 @@
+"""
+Polynomial Fit Plot with Regression Transform
+=============================================
+This example shows how to overlay data with multiple fitted polynomials using
+the regression transform.
+"""
+# category: scatter plots
+
+import numpy as np
+import pandas as pd
+import altair as alt
+
+# Generate some random data
+rng = np.random.RandomState(1)
+x = rng.rand(40) ** 2
+y = 10 - 1.0 / (x + 0.1) + rng.randn(40)
+source = pd.DataFrame({"x": x, "y": y})
+
+# Define the degree of the polynomial fits
+degree_list = [1, 3, 5]
+
+base = alt.Chart(source).mark_circle(color="black").encode(
+ alt.X("x"), alt.Y("y")
+)
+
+polynomial_fit = [
+ base.transform_regression(
+ "x", "y", method="poly", order=order, as_=["x", str(order)]
+ )
+ .mark_line()
+ .transform_fold([str(order)], as_=["degree", "y"])
+ .encode(alt.Color("degree:N"))
+ for order in degree_list
+]
+
+alt.layer(base, *polynomial_fit)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/pyramid.py b/venv/lib/python3.9/site-packages/altair/examples/pyramid.py
new file mode 100644
index 00000000..a53b90e0
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/pyramid.py
@@ -0,0 +1,19 @@
+"""
+Pyramid Pie Chart
+-----------------
+Altair reproduction of http://robslink.com/SAS/democd91/pyramid_pie.htm
+"""
+import altair as alt
+import pandas as pd
+
+category = ['Sky', 'Shady side of a pyramid', 'Sunny side of a pyramid']
+color = ["#416D9D", "#674028", "#DEAC58"]
+df = pd.DataFrame({'category': category, 'value': [75, 10, 15]})
+
+alt.Chart(df).mark_arc(outerRadius=80).encode(
+ alt.Theta('value:Q', scale=alt.Scale(range=[2.356, 8.639])),
+ alt.Color('category:N',
+ scale=alt.Scale(domain=category, range=color),
+ legend=alt.Legend(title=None, orient='none', legendX=160, legendY=50)),
+ order='value:Q'
+).properties(width=150, height=150).configure_view(strokeOpacity=0) \ No newline at end of file
diff --git a/venv/lib/python3.9/site-packages/altair/examples/radial_chart.py b/venv/lib/python3.9/site-packages/altair/examples/radial_chart.py
new file mode 100644
index 00000000..3240d092
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/radial_chart.py
@@ -0,0 +1,25 @@
+"""
+Radial Chart
+------------
+This radial plot uses both angular and radial extent to convey multiple dimensions of data.
+This is adapted from a corresponding Vega-Lite Example:
+`Radial Plot <https://vega.github.io/vega-lite/examples/arc_radial.html>`_.
+"""
+# category: circular plots
+
+import pandas as pd
+import altair as alt
+
+source = pd.DataFrame({"values": [12, 23, 47, 6, 52, 19]})
+
+base = alt.Chart(source).encode(
+ theta=alt.Theta("values:Q", stack=True),
+ radius=alt.Radius("values", scale=alt.Scale(type="sqrt", zero=True, rangeMin=20)),
+ color="values:N",
+)
+
+c1 = base.mark_arc(innerRadius=20, stroke="#fff")
+
+c2 = base.mark_text(radiusOffset=10).encode(text="values:Q")
+
+c1 + c2
diff --git a/venv/lib/python3.9/site-packages/altair/examples/ranged_dot_plot.py b/venv/lib/python3.9/site-packages/altair/examples/ranged_dot_plot.py
new file mode 100644
index 00000000..76967338
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/ranged_dot_plot.py
@@ -0,0 +1,43 @@
+"""
+Ranged Dot Plot
+-----------------
+This example shows a ranged dot plot that uses 'layer' to convey changing life expectancy for the five most populous countries (between 1955 and 2000).
+"""
+# category: other charts
+import altair as alt
+from vega_datasets import data
+
+source = data.countries.url
+
+chart = alt.layer(
+ data=source
+).transform_filter(
+ filter={"field": 'country',
+ "oneOf": ["China", "India", "United States", "Indonesia", "Brazil"]}
+).transform_filter(
+ filter={'field': 'year',
+ "oneOf": [1955, 2000]}
+)
+
+chart += alt.Chart().mark_line(color='#db646f').encode(
+ x='life_expect:Q',
+ y='country:N',
+ detail='country:N'
+)
+# Add points for life expectancy in 1955 & 2000
+chart += alt.Chart().mark_point(
+ size=100,
+ opacity=1,
+ filled=True
+).encode(
+ x='life_expect:Q',
+ y='country:N',
+ color=alt.Color('year:O',
+ scale=alt.Scale(
+ domain=['1955', '2000'],
+ range=['#e6959c', '#911a24']
+ )
+ )
+).interactive()
+
+chart
diff --git a/venv/lib/python3.9/site-packages/altair/examples/ridgeline_plot.py b/venv/lib/python3.9/site-packages/altair/examples/ridgeline_plot.py
new file mode 100644
index 00000000..e6425b9c
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/ridgeline_plot.py
@@ -0,0 +1,63 @@
+"""
+Ridgeline plot Example
+----------------------
+A `Ridgeline plot <https://serialmentor.com/blog/2017/9/15/goodbye-joyplots>`_
+chart is a chart that lets you visualize distribution of a numeric value for
+several groups.
+
+Such a chart can be created in Altair by first transforming the data into a
+suitable representation.
+
+"""
+# category: other charts
+import altair as alt
+from vega_datasets import data
+
+source = data.seattle_weather.url
+
+step = 20
+overlap = 1
+
+alt.Chart(source, height=step).transform_timeunit(
+ Month='month(date)'
+).transform_joinaggregate(
+ mean_temp='mean(temp_max)', groupby=['Month']
+).transform_bin(
+ ['bin_max', 'bin_min'], 'temp_max'
+).transform_aggregate(
+ value='count()', groupby=['Month', 'mean_temp', 'bin_min', 'bin_max']
+).transform_impute(
+ impute='value', groupby=['Month', 'mean_temp'], key='bin_min', value=0
+).mark_area(
+ interpolate='monotone',
+ fillOpacity=0.8,
+ stroke='lightgray',
+ strokeWidth=0.5
+).encode(
+ alt.X('bin_min:Q', bin='binned', title='Maximum Daily Temperature (C)'),
+ alt.Y(
+ 'value:Q',
+ scale=alt.Scale(range=[step, -step * overlap]),
+ axis=None
+ ),
+ alt.Fill(
+ 'mean_temp:Q',
+ legend=None,
+ scale=alt.Scale(domain=[30, 5], scheme='redyellowblue')
+ )
+).facet(
+ row=alt.Row(
+ 'Month:T',
+ title=None,
+ header=alt.Header(labelAngle=0, labelAlign='right', format='%B')
+ )
+).properties(
+ title='Seattle Weather',
+ bounds='flush'
+).configure_facet(
+ spacing=0
+).configure_view(
+ stroke=None
+).configure_title(
+ anchor='end'
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/scatter_href.py b/venv/lib/python3.9/site-packages/altair/examples/scatter_href.py
new file mode 100644
index 00000000..d9f07252
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/scatter_href.py
@@ -0,0 +1,23 @@
+"""
+Scatter Plot with Href
+----------------------
+This example shows a scatter plot with an ``href`` encoding constructed from
+the car name. With this encoding, you can click on any of the points to open
+a google search for the car name.
+"""
+# category: scatter plots
+
+import altair as alt
+from vega_datasets import data
+
+source = data.cars()
+
+alt.Chart(source).transform_calculate(
+ url='https://www.google.com/search?q=' + alt.datum.Name
+).mark_point().encode(
+ x='Horsepower:Q',
+ y='Miles_per_Gallon:Q',
+ color='Origin:N',
+ href='url:N',
+ tooltip=['Name:N', 'url:N']
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/scatter_linked_brush.py b/venv/lib/python3.9/site-packages/altair/examples/scatter_linked_brush.py
new file mode 100644
index 00000000..47181a3c
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/scatter_linked_brush.py
@@ -0,0 +1,25 @@
+"""
+Multi-panel Scatter Plot with Linked Brushing
+---------------------------------------------
+This is an example of using an interval selection to control the color of
+points across multiple panels.
+"""
+# category: interactive charts
+import altair as alt
+from vega_datasets import data
+
+source = data.cars()
+
+brush = alt.selection(type='interval', resolve='global')
+
+base = alt.Chart(source).mark_point().encode(
+ y='Miles_per_Gallon',
+ color=alt.condition(brush, 'Origin', alt.ColorValue('gray')),
+).add_selection(
+ brush
+).properties(
+ width=250,
+ height=250
+)
+
+base.encode(x='Horsepower') | base.encode(x='Acceleration')
diff --git a/venv/lib/python3.9/site-packages/altair/examples/scatter_linked_table.py b/venv/lib/python3.9/site-packages/altair/examples/scatter_linked_table.py
new file mode 100644
index 00000000..3073f339
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/scatter_linked_table.py
@@ -0,0 +1,49 @@
+"""
+Brushing Scatter Plot to show data on a table
+---------------------------------------------
+A scatter plot of the cars dataset, with data tables for horsepower, MPG, and origin.
+The tables update to reflect the selection on the scatter plot.
+"""
+# category: scatter plots
+
+import altair as alt
+from vega_datasets import data
+
+source = data.cars()
+
+# Brush for selection
+brush = alt.selection(type='interval')
+
+# Scatter Plot
+points = alt.Chart(source).mark_point().encode(
+ x='Horsepower:Q',
+ y='Miles_per_Gallon:Q',
+ color=alt.condition(brush, 'Cylinders:O', alt.value('grey'))
+).add_selection(brush)
+
+# Base chart for data tables
+ranked_text = alt.Chart(source).mark_text().encode(
+ y=alt.Y('row_number:O',axis=None)
+).transform_window(
+ row_number='row_number()'
+).transform_filter(
+ brush
+).transform_window(
+ rank='rank(row_number)'
+).transform_filter(
+ alt.datum.rank<20
+)
+
+# Data Tables
+horsepower = ranked_text.encode(text='Horsepower:N').properties(title='Horsepower')
+mpg = ranked_text.encode(text='Miles_per_Gallon:N').properties(title='MPG')
+origin = ranked_text.encode(text='Origin:N').properties(title='Origin')
+text = alt.hconcat(horsepower, mpg, origin) # Combine data tables
+
+# Build chart
+alt.hconcat(
+ points,
+ text
+).resolve_legend(
+ color="independent"
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/scatter_marginal_hist.py b/venv/lib/python3.9/site-packages/altair/examples/scatter_marginal_hist.py
new file mode 100644
index 00000000..ef42e156
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/scatter_marginal_hist.py
@@ -0,0 +1,50 @@
+"""
+Facetted Scatterplot with marginal histograms
+---------------------------------------------
+This example demonstrates how to generate a facetted scatterplot,
+with marginal facetted histograms, and how to share their respective
+- x,some y-limits.
+"""
+# category: other charts
+import altair as alt
+from vega_datasets import data
+
+source = data.iris()
+
+base = alt.Chart(source)
+
+xscale = alt.Scale(domain=(4.0, 8.0))
+yscale = alt.Scale(domain=(1.9, 4.55))
+
+bar_args = {'opacity': .3, 'binSpacing': 0}
+
+points = base.mark_circle().encode(
+ alt.X('sepalLength', scale=xscale),
+ alt.Y('sepalWidth', scale=yscale),
+ color='species',
+)
+
+top_hist = base.mark_bar(**bar_args).encode(
+ alt.X('sepalLength:Q',
+ # when using bins, the axis scale is set through
+ # the bin extent, so we do not specify the scale here
+ # (which would be ignored anyway)
+ bin=alt.Bin(maxbins=20, extent=xscale.domain),
+ stack=None,
+ title=''
+ ),
+ alt.Y('count()', stack=None, title=''),
+ alt.Color('species:N'),
+).properties(height=60)
+
+right_hist = base.mark_bar(**bar_args).encode(
+ alt.Y('sepalWidth:Q',
+ bin=alt.Bin(maxbins=20, extent=yscale.domain),
+ stack=None,
+ title='',
+ ),
+ alt.X('count()', stack=None, title=''),
+ alt.Color('species:N'),
+).properties(width=60)
+
+top_hist & (points | right_hist)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/scatter_matrix.py b/venv/lib/python3.9/site-packages/altair/examples/scatter_matrix.py
new file mode 100644
index 00000000..7202818f
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/scatter_matrix.py
@@ -0,0 +1,23 @@
+"""
+Scatter Matrix
+--------------
+An example of using a RepeatChart to construct a multi-panel scatter plot
+with linked panning and zooming.
+"""
+# category: scatter plots
+import altair as alt
+from vega_datasets import data
+
+source = data.cars()
+
+alt.Chart(source).mark_circle().encode(
+ alt.X(alt.repeat("column"), type='quantitative'),
+ alt.Y(alt.repeat("row"), type='quantitative'),
+ color='Origin:N'
+).properties(
+ width=150,
+ height=150
+).repeat(
+ row=['Horsepower', 'Acceleration', 'Miles_per_Gallon'],
+ column=['Miles_per_Gallon', 'Acceleration', 'Horsepower']
+).interactive()
diff --git a/venv/lib/python3.9/site-packages/altair/examples/scatter_qq.py b/venv/lib/python3.9/site-packages/altair/examples/scatter_qq.py
new file mode 100644
index 00000000..b8abfe72
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/scatter_qq.py
@@ -0,0 +1,24 @@
+"""
+Quantile-Quantile Plot
+----------------------
+A quantile-quantile plot comparing input data to theoretical distributions.
+"""
+# category: scatter plots
+
+import altair as alt
+from vega_datasets import data
+
+source = data.normal_2d.url
+
+base = alt.Chart(source).transform_quantile(
+ 'u',
+ step=0.01,
+ as_ = ['p', 'v']
+).transform_calculate(
+ uniform = 'quantileUniform(datum.p)',
+ normal = 'quantileNormal(datum.p)'
+).mark_point().encode(
+ alt.Y('v:Q')
+)
+
+base.encode(x='uniform:Q') | base.encode(x='normal:Q')
diff --git a/venv/lib/python3.9/site-packages/altair/examples/scatter_tooltips.py b/venv/lib/python3.9/site-packages/altair/examples/scatter_tooltips.py
new file mode 100644
index 00000000..0a6c996f
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/scatter_tooltips.py
@@ -0,0 +1,20 @@
+"""
+Simple Scatter Plot with Tooltips
+---------------------------------
+A scatter plot of the cars dataset, with tooltips showing selected column
+values when you hover over points. We make the points larger so that it is
+easier to hover over them.
+"""
+# category: simple charts
+
+import altair as alt
+from vega_datasets import data
+
+source = data.cars()
+
+alt.Chart(source).mark_circle(size=60).encode(
+ x='Horsepower',
+ y='Miles_per_Gallon',
+ color='Origin',
+ tooltip=['Name', 'Origin', 'Horsepower', 'Miles_per_Gallon']
+).interactive()
diff --git a/venv/lib/python3.9/site-packages/altair/examples/scatter_with_histogram.py b/venv/lib/python3.9/site-packages/altair/examples/scatter_with_histogram.py
new file mode 100644
index 00000000..163ede81
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/scatter_with_histogram.py
@@ -0,0 +1,60 @@
+"""
+Scatter Plot and Histogram with Interval Selection
+==================================================
+
+This example shows how to link a scatter plot and a histogram
+together such that an interval selection in the histogram will
+plot the selected values in the scatter plot.
+
+Note that both subplots need to know about the `mbin` field created
+by the `transform_bin` method. In order to achieve this, the data is
+not passed to the `Chart()` instances creating the subplots, but
+directly in the `hconcat()` function, which joins the two plots together.
+"""
+# category: interactive charts
+
+import altair as alt
+import pandas as pd
+import numpy as np
+
+x = np.random.normal(size=100)
+y = np.random.normal(size=100)
+
+m = np.random.normal(15, 1, size=100)
+
+source = pd.DataFrame({"x": x, "y":y, "m":m})
+
+# interval selection in the scatter plot
+pts = alt.selection(type="interval", encodings=["x"])
+
+# left panel: scatter plot
+points = alt.Chart().mark_point(filled=True, color="black").encode(
+ x='x',
+ y='y'
+).transform_filter(
+ pts
+).properties(
+ width=300,
+ height=300
+)
+
+# right panel: histogram
+mag = alt.Chart().mark_bar().encode(
+ x='mbin:N',
+ y="count()",
+ color=alt.condition(pts, alt.value("black"), alt.value("lightgray"))
+).properties(
+ width=300,
+ height=300
+).add_selection(pts)
+
+# build the chart:
+alt.hconcat(
+ points,
+ mag,
+ data=source
+).transform_bin(
+ "mbin",
+ field="m",
+ bin=alt.Bin(maxbins=20)
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/scatter_with_labels.py b/venv/lib/python3.9/site-packages/altair/examples/scatter_with_labels.py
new file mode 100644
index 00000000..c2a05cec
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/scatter_with_labels.py
@@ -0,0 +1,29 @@
+"""
+Simple Scatter Plot with Labels
+===============================
+This example shows a basic scatter plot with labels created with Altair.
+"""
+# category: scatter plots
+import altair as alt
+import pandas as pd
+
+source = pd.DataFrame({
+ 'x': [1, 3, 5, 7, 9],
+ 'y': [1, 3, 5, 7, 9],
+ 'label': ['A', 'B', 'C', 'D', 'E']
+})
+
+points = alt.Chart(source).mark_point().encode(
+ x='x:Q',
+ y='y:Q'
+)
+
+text = points.mark_text(
+ align='left',
+ baseline='middle',
+ dx=7
+).encode(
+ text='label'
+)
+
+points + text
diff --git a/venv/lib/python3.9/site-packages/altair/examples/scatter_with_layered_histogram.py b/venv/lib/python3.9/site-packages/altair/examples/scatter_with_layered_histogram.py
new file mode 100644
index 00000000..669d9c9c
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/scatter_with_layered_histogram.py
@@ -0,0 +1,60 @@
+"""
+Interactive Scatter Plot and Linked Layered Histogram
+=====================================================
+
+This example shows how to link a scatter plot and a histogram
+together such that clicking on a point in the scatter plot will
+isolate the distribution corresponding to that point, and vice versa.
+"""
+# category: interactive charts
+
+import altair as alt
+import pandas as pd
+import numpy as np
+
+# generate fake data
+source = pd.DataFrame({'gender': ['M']*1000 + ['F']*1000,
+ 'height':np.concatenate((np.random.normal(69, 7, 1000),
+ np.random.normal(64, 6, 1000))),
+ 'weight': np.concatenate((np.random.normal(195.8, 144, 1000),
+ np.random.normal(167, 100, 1000))),
+ 'age': np.concatenate((np.random.normal(45, 8, 1000),
+ np.random.normal(51, 6, 1000)))
+ })
+
+selector = alt.selection_single(empty='all', fields=['gender'])
+
+color_scale = alt.Scale(domain=['M', 'F'],
+ range=['#1FC3AA', '#8624F5'])
+
+base = alt.Chart(source).properties(
+ width=250,
+ height=250
+).add_selection(selector)
+
+points = base.mark_point(filled=True, size=200).encode(
+ x=alt.X('mean(height):Q',
+ scale=alt.Scale(domain=[0,84])),
+ y=alt.Y('mean(weight):Q',
+ scale=alt.Scale(domain=[0,250])),
+ color=alt.condition(selector,
+ 'gender:N',
+ alt.value('lightgray'),
+ scale=color_scale),
+)
+
+hists = base.mark_bar(opacity=0.5, thickness=100).encode(
+ x=alt.X('age',
+ bin=alt.Bin(step=5), # step keeps bin size the same
+ scale=alt.Scale(domain=[0,100])),
+ y=alt.Y('count()',
+ stack=None,
+ scale=alt.Scale(domain=[0,350])),
+ color=alt.Color('gender:N',
+ scale=color_scale)
+).transform_filter(
+ selector
+)
+
+
+points | hists
diff --git a/venv/lib/python3.9/site-packages/altair/examples/scatter_with_loess.py b/venv/lib/python3.9/site-packages/altair/examples/scatter_with_loess.py
new file mode 100644
index 00000000..5e76fdac
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/scatter_with_loess.py
@@ -0,0 +1,31 @@
+"""
+Scatter Plot with LOESS Lines
+-----------------------------
+This example shows how to add a trend line to a scatter plot using
+the LOESS transform (LOcally Estimated Scatterplot Smoothing).
+"""
+# category: scatter plots
+
+import altair as alt
+import pandas as pd
+import numpy as np
+
+np.random.seed(1)
+
+source = pd.DataFrame({
+ 'x': np.arange(100),
+ 'A': np.random.randn(100).cumsum(),
+ 'B': np.random.randn(100).cumsum(),
+ 'C': np.random.randn(100).cumsum(),
+})
+
+base = alt.Chart(source).mark_circle(opacity=0.5).transform_fold(
+ fold=['A', 'B', 'C'],
+ as_=['category', 'y']
+).encode(
+ alt.X('x:Q'),
+ alt.Y('y:Q'),
+ alt.Color('category:N')
+)
+
+base + base.transform_loess('x', 'y', groupby=['category']).mark_line(size=4)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/scatter_with_minimap.py b/venv/lib/python3.9/site-packages/altair/examples/scatter_with_minimap.py
new file mode 100644
index 00000000..7de894c4
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/scatter_with_minimap.py
@@ -0,0 +1,49 @@
+"""
+Scatter Plot with Minimap
+-------------------------
+This example shows how to create a miniature version of a plot
+such that creating a selection in the miniature version
+adjusts the axis limits in another, more detailed view.
+"""
+# category: scatter plots
+
+import altair as alt
+from vega_datasets import data
+
+source = data.seattle_weather()
+
+zoom = alt.selection_interval(encodings=["x", "y"])
+
+minimap = (
+ alt.Chart(source)
+ .mark_point()
+ .add_selection(zoom)
+ .encode(
+ x="date:T",
+ y="temp_max:Q",
+ color=alt.condition(zoom, "weather", alt.value("lightgray")),
+ )
+ .properties(
+ width=200,
+ height=200,
+ title="Minimap -- click and drag to zoom in the detail view",
+ )
+)
+
+detail = (
+ alt.Chart(source)
+ .mark_point()
+ .encode(
+ x=alt.X(
+ "date:T", scale=alt.Scale(domain={"selection": zoom.name, "encoding": "x"})
+ ),
+ y=alt.Y(
+ "temp_max:Q",
+ scale=alt.Scale(domain={"selection": zoom.name, "encoding": "y"}),
+ ),
+ color="weather",
+ )
+ .properties(width=600, height=400, title="Seattle weather -- detail view")
+)
+
+detail | minimap
diff --git a/venv/lib/python3.9/site-packages/altair/examples/scatter_with_rolling_mean.py b/venv/lib/python3.9/site-packages/altair/examples/scatter_with_rolling_mean.py
new file mode 100644
index 00000000..cf0b36cc
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/scatter_with_rolling_mean.py
@@ -0,0 +1,31 @@
+"""
+Scatter Plot with Rolling Mean
+------------------------------
+A scatter plot with a rolling mean overlay. In this example a 30 day window
+is used to calculate the mean of the maximum temperature around each date.
+"""
+# category: scatter plots
+
+import altair as alt
+from vega_datasets import data
+
+source = data.seattle_weather()
+
+line = alt.Chart(source).mark_line(
+ color='red',
+ size=3
+).transform_window(
+ rolling_mean='mean(temp_max)',
+ frame=[-15, 15]
+).encode(
+ x='date:T',
+ y='rolling_mean:Q'
+)
+
+points = alt.Chart(source).mark_point().encode(
+ x='date:T',
+ y=alt.Y('temp_max:Q',
+ axis=alt.Axis(title='Max Temp'))
+)
+
+points + line
diff --git a/venv/lib/python3.9/site-packages/altair/examples/seattle_weather_interactive.py b/venv/lib/python3.9/site-packages/altair/examples/seattle_weather_interactive.py
new file mode 100644
index 00000000..cf65fbff
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/seattle_weather_interactive.py
@@ -0,0 +1,60 @@
+"""
+Seattle Weather Interactive
+===========================
+This chart provides an interactive exploration of Seattle weather over the
+course of the year. It includes a one-axis brush selection to easily
+see the distribution of weather types in a particular date range.
+"""
+# category: case studies
+import altair as alt
+from vega_datasets import data
+
+source = data.seattle_weather()
+
+scale = alt.Scale(domain=['sun', 'fog', 'drizzle', 'rain', 'snow'],
+ range=['#e7ba52', '#a7a7a7', '#aec7e8', '#1f77b4', '#9467bd'])
+color = alt.Color('weather:N', scale=scale)
+
+# We create two selections:
+# - a brush that is active on the top panel
+# - a multi-click that is active on the bottom panel
+brush = alt.selection_interval(encodings=['x'])
+click = alt.selection_multi(encodings=['color'])
+
+# Top panel is scatter plot of temperature vs time
+points = alt.Chart().mark_point().encode(
+ alt.X('monthdate(date):T', title='Date'),
+ alt.Y('temp_max:Q',
+ title='Maximum Daily Temperature (C)',
+ scale=alt.Scale(domain=[-5, 40])
+ ),
+ color=alt.condition(brush, color, alt.value('lightgray')),
+ size=alt.Size('precipitation:Q', scale=alt.Scale(range=[5, 200]))
+).properties(
+ width=550,
+ height=300
+).add_selection(
+ brush
+).transform_filter(
+ click
+)
+
+# Bottom panel is a bar chart of weather type
+bars = alt.Chart().mark_bar().encode(
+ x='count()',
+ y='weather:N',
+ color=alt.condition(click, color, alt.value('lightgray')),
+).transform_filter(
+ brush
+).properties(
+ width=550,
+).add_selection(
+ click
+)
+
+alt.vconcat(
+ points,
+ bars,
+ data=source,
+ title="Seattle Weather: 2012-2015"
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/select_detail.py b/venv/lib/python3.9/site-packages/altair/examples/select_detail.py
new file mode 100644
index 00000000..f5230c84
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/select_detail.py
@@ -0,0 +1,65 @@
+"""
+Selection Detail Example
+========================
+This example shows a selection that links two views of data: the left panel
+contains one point per object, and the right panel contains one line per
+object. Clicking on either the points or lines will select the corresponding
+objects in both views of the data.
+
+The challenge lies in expressing such hierarchical data in a way that Altair
+can handle. We do this by merging the data into a "long form" dataframe, and
+aggregating identical metadata for the final plot.
+"""
+# category: interactive charts
+import altair as alt
+import pandas as pd
+import numpy as np
+
+np.random.seed(0)
+
+n_objects = 20
+n_times = 50
+
+# Create one (x, y) pair of metadata per object
+locations = pd.DataFrame({
+ 'id': range(n_objects),
+ 'x': np.random.randn(n_objects),
+ 'y': np.random.randn(n_objects)
+})
+
+# Create a 50-element time-series for each object
+timeseries = pd.DataFrame(np.random.randn(n_times, n_objects).cumsum(0),
+ columns=locations['id'],
+ index=pd.RangeIndex(0, n_times, name='time'))
+
+# Melt the wide-form timeseries into a long-form view
+timeseries = timeseries.reset_index().melt('time')
+
+# Merge the (x, y) metadata into the long-form view
+timeseries['id'] = timeseries['id'].astype(int) # make merge not complain
+data = pd.merge(timeseries, locations, on='id')
+
+# Data is prepared, now make a chart
+
+selector = alt.selection_single(empty='all', fields=['id'])
+
+base = alt.Chart(data).properties(
+ width=250,
+ height=250
+).add_selection(selector)
+
+points = base.mark_point(filled=True, size=200).encode(
+ x='mean(x)',
+ y='mean(y)',
+ color=alt.condition(selector, 'id:O', alt.value('lightgray'), legend=None),
+)
+
+timeseries = base.mark_line().encode(
+ x='time',
+ y=alt.Y('value', scale=alt.Scale(domain=(-15, 15))),
+ color=alt.Color('id:O', legend=None)
+).transform_filter(
+ selector
+)
+
+points | timeseries
diff --git a/venv/lib/python3.9/site-packages/altair/examples/select_mark_area.py b/venv/lib/python3.9/site-packages/altair/examples/select_mark_area.py
new file mode 100644
index 00000000..2e097592
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/select_mark_area.py
@@ -0,0 +1,30 @@
+"""
+Using Selection Interval with mark_area
+=========================================
+
+Because area is considered one object, just using the plain
+selector will select the entire area instead of just one part of it.
+
+This example shows how to use two areas, one on top of the other, and a
+`transform_filter` to fake out this effect.
+
+"""
+# category: interactive charts
+import altair as alt
+from vega_datasets import data
+
+source = data.unemployment_across_industries.url
+
+base = alt.Chart(source).mark_area(
+ color='goldenrod',
+ opacity=0.3
+).encode(
+ x='yearmonth(date):T',
+ y='sum(count):Q',
+)
+
+brush = alt.selection_interval(encodings=['x'],empty='all')
+background = base.add_selection(brush)
+selected = base.transform_filter(brush).mark_area(color='goldenrod')
+
+background + selected
diff --git a/venv/lib/python3.9/site-packages/altair/examples/selection_histogram.py b/venv/lib/python3.9/site-packages/altair/examples/selection_histogram.py
new file mode 100644
index 00000000..93621781
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/selection_histogram.py
@@ -0,0 +1,32 @@
+"""
+Selection Histogram
+===================
+This chart shows an example of using an interval selection to filter the
+contents of an attached histogram, allowing the user to see the proportion
+of items in each category within the selection.
+"""
+# category: interactive charts
+import altair as alt
+from vega_datasets import data
+
+source = data.cars()
+
+brush = alt.selection(type='interval')
+
+points = alt.Chart(source).mark_point().encode(
+ x='Horsepower:Q',
+ y='Miles_per_Gallon:Q',
+ color=alt.condition(brush, 'Origin:N', alt.value('lightgray'))
+).add_selection(
+ brush
+)
+
+bars = alt.Chart(source).mark_bar().encode(
+ y='Origin:N',
+ color='Origin:N',
+ x='count(Origin):Q'
+).transform_filter(
+ brush
+)
+
+points & bars
diff --git a/venv/lib/python3.9/site-packages/altair/examples/selection_layer_bar_month.py b/venv/lib/python3.9/site-packages/altair/examples/selection_layer_bar_month.py
new file mode 100644
index 00000000..96dbe82a
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/selection_layer_bar_month.py
@@ -0,0 +1,30 @@
+"""
+Interactive Average
+===================
+The plot below uses an interval selection, which causes the chart to include an interactive brush
+(shown in grey). The brush selection parameterizes the red guideline, which visualizes the average
+value within the selected interval.
+"""
+# category: interactive charts
+import altair as alt
+from vega_datasets import data
+
+source = data.seattle_weather()
+brush = alt.selection(type='interval', encodings=['x'])
+
+bars = alt.Chart().mark_bar().encode(
+ x='month(date):O',
+ y='mean(precipitation):Q',
+ opacity=alt.condition(brush, alt.OpacityValue(1), alt.OpacityValue(0.7)),
+).add_selection(
+ brush
+)
+
+line = alt.Chart().mark_rule(color='firebrick').encode(
+ y='mean(precipitation):Q',
+ size=alt.SizeValue(3)
+).transform_filter(
+ brush
+)
+
+alt.layer(bars, line, data=source)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/simple_bar_chart.py b/venv/lib/python3.9/site-packages/altair/examples/simple_bar_chart.py
new file mode 100644
index 00000000..bbdf8f9e
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/simple_bar_chart.py
@@ -0,0 +1,18 @@
+"""
+Simple Bar Chart
+================
+This example shows a basic bar chart created with Altair.
+"""
+# category: simple charts
+import altair as alt
+import pandas as pd
+
+source = pd.DataFrame({
+ 'a': ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I'],
+ 'b': [28, 55, 43, 91, 81, 53, 19, 87, 52]
+})
+
+alt.Chart(source).mark_bar().encode(
+ x='a',
+ y='b'
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/simple_heatmap.py b/venv/lib/python3.9/site-packages/altair/examples/simple_heatmap.py
new file mode 100644
index 00000000..2242b2a5
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/simple_heatmap.py
@@ -0,0 +1,24 @@
+"""
+Simple Heatmap
+--------------
+This example shows a simple heatmap for showing gridded data.
+"""
+# category: simple charts
+import altair as alt
+import numpy as np
+import pandas as pd
+
+# Compute x^2 + y^2 across a 2D grid
+x, y = np.meshgrid(range(-5, 5), range(-5, 5))
+z = x ** 2 + y ** 2
+
+# Convert this grid to columnar data expected by Altair
+source = pd.DataFrame({'x': x.ravel(),
+ 'y': y.ravel(),
+ 'z': z.ravel()})
+
+alt.Chart(source).mark_rect().encode(
+ x='x:O',
+ y='y:O',
+ color='z:Q'
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/simple_histogram.py b/venv/lib/python3.9/site-packages/altair/examples/simple_histogram.py
new file mode 100644
index 00000000..c58f1330
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/simple_histogram.py
@@ -0,0 +1,16 @@
+"""
+Simple Histogram
+----------------
+This example shows how to make a basic histogram, based on the vega-lite docs
+https://vega.github.io/vega-lite/examples/histogram.html
+"""
+# category: simple charts
+import altair as alt
+from vega_datasets import data
+
+source = data.movies.url
+
+alt.Chart(source).mark_bar().encode(
+ alt.X("IMDB_Rating:Q", bin=True),
+ y='count()',
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/simple_line_chart.py b/venv/lib/python3.9/site-packages/altair/examples/simple_line_chart.py
new file mode 100644
index 00000000..74613622
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/simple_line_chart.py
@@ -0,0 +1,22 @@
+"""
+Simple Line Chart
+-----------------
+This chart shows the most basic line chart, made from a dataframe with two
+columns.
+"""
+# category: simple charts
+
+import altair as alt
+import numpy as np
+import pandas as pd
+
+x = np.arange(100)
+source = pd.DataFrame({
+ 'x': x,
+ 'f(x)': np.sin(x / 5)
+})
+
+alt.Chart(source).mark_line().encode(
+ x='x',
+ y='f(x)'
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/simple_scatter_with_errorbars.py b/venv/lib/python3.9/site-packages/altair/examples/simple_scatter_with_errorbars.py
new file mode 100644
index 00000000..4a232287
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/simple_scatter_with_errorbars.py
@@ -0,0 +1,43 @@
+"""
+Simple Scatter Plot with Errorbars
+----------------------------------
+A simple scatter plot of a data set with errorbars.
+"""
+# category: scatter plots
+import altair as alt
+import pandas as pd
+import numpy as np
+
+# generate some data points with uncertainties
+np.random.seed(0)
+x = [1, 2, 3, 4, 5]
+y = np.random.normal(10, 0.5, size=len(x))
+yerr = 0.2
+
+# set up data frame
+source = pd.DataFrame({"x": x, "y": y, "yerr": yerr})
+
+# the base chart
+base = alt.Chart(source).transform_calculate(
+ ymin="datum.y-datum.yerr",
+ ymax="datum.y+datum.yerr"
+)
+
+# generate the points
+points = base.mark_point(
+ filled=True,
+ size=50,
+ color='black'
+).encode(
+ x=alt.X('x', scale=alt.Scale(domain=(0, 6))),
+ y=alt.Y('y', scale=alt.Scale(zero=False))
+)
+
+# generate the error bars
+errorbars = base.mark_errorbar().encode(
+ x="x",
+ y="ymin:Q",
+ y2="ymax:Q"
+)
+
+points + errorbars
diff --git a/venv/lib/python3.9/site-packages/altair/examples/simple_stacked_area_chart.py b/venv/lib/python3.9/site-packages/altair/examples/simple_stacked_area_chart.py
new file mode 100644
index 00000000..ba640986
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/simple_stacked_area_chart.py
@@ -0,0 +1,16 @@
+"""
+Simple Stacked Area Chart
+-------------------------
+This example shows how to make a simple stacked area chart.
+"""
+# category: simple charts
+import altair as alt
+from vega_datasets import data
+
+source = data.iowa_electricity()
+
+alt.Chart(source).mark_area().encode(
+ x="year:T",
+ y="net_generation:Q",
+ color="source:N"
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/slope_graph.py b/venv/lib/python3.9/site-packages/altair/examples/slope_graph.py
new file mode 100644
index 00000000..422cf64b
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/slope_graph.py
@@ -0,0 +1,16 @@
+"""
+Slope Graph
+-----------------------
+This example shows how to make Slope Graph.
+"""
+# category: line charts
+import altair as alt
+from vega_datasets import data
+
+source = data.barley()
+
+alt.Chart(source).mark_line().encode(
+ x='year:O',
+ y='median(yield)',
+ color='site'
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/sorted_error_bars_with_ci.py b/venv/lib/python3.9/site-packages/altair/examples/sorted_error_bars_with_ci.py
new file mode 100644
index 00000000..8dd58212
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/sorted_error_bars_with_ci.py
@@ -0,0 +1,36 @@
+"""
+Sorted Error Bars showing Confidence Interval
+=============================================
+This example shows how to show error bars using confidence intervals, while also sorting the y-axis based on x-axis values.
+"""
+# category: other charts
+
+import altair as alt
+from vega_datasets import data
+
+source = data.barley()
+
+points = alt.Chart(source).mark_point(
+ filled=True,
+ color='black'
+).encode(
+ x=alt.X('mean(yield)', title='Barley Yield'),
+ y=alt.Y(
+ 'variety',
+ sort=alt.EncodingSortField(
+ field='yield',
+ op='mean',
+ order='descending'
+ )
+ )
+).properties(
+ width=400,
+ height=250
+)
+
+error_bars = points.mark_rule().encode(
+ x='ci0(yield)',
+ x2='ci1(yield)',
+)
+
+points + error_bars
diff --git a/venv/lib/python3.9/site-packages/altair/examples/stacked_bar_chart.py b/venv/lib/python3.9/site-packages/altair/examples/stacked_bar_chart.py
new file mode 100644
index 00000000..3cfc3870
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/stacked_bar_chart.py
@@ -0,0 +1,17 @@
+"""
+Stacked Bar Chart
+-----------------
+
+This is an example of a stacked bar chart using data which contains crop yields over different regions and different years in the 1930s.
+"""
+# category: bar charts
+import altair as alt
+from vega_datasets import data
+
+source = data.barley()
+
+alt.Chart(source).mark_bar().encode(
+ x='variety',
+ y='sum(yield)',
+ color='site'
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/stacked_bar_chart_sorted_segments.py b/venv/lib/python3.9/site-packages/altair/examples/stacked_bar_chart_sorted_segments.py
new file mode 100644
index 00000000..2a189fed
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/stacked_bar_chart_sorted_segments.py
@@ -0,0 +1,21 @@
+"""
+Stacked Bar Chart with Sorted Segments
+--------------------------------------
+This is an example of a stacked-bar chart with the segments of each bar resorted.
+"""
+# category: bar charts
+import altair as alt
+from vega_datasets import data
+
+source = data.barley()
+
+alt.Chart(source).mark_bar().encode(
+ x='sum(yield)',
+ y='variety',
+ color='site',
+ order=alt.Order(
+ # Sort the segments of the bars by this field
+ 'site',
+ sort='ascending'
+ )
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/stacked_bar_chart_with_text.py b/venv/lib/python3.9/site-packages/altair/examples/stacked_bar_chart_with_text.py
new file mode 100644
index 00000000..180d2087
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/stacked_bar_chart_with_text.py
@@ -0,0 +1,27 @@
+"""
+Stacked Bar Chart with Text Overlay
+===================================
+This example shows how to overlay text on a stacked bar chart. For both the
+bar and text marks, we use the ``stack`` argument in the ``x`` encoding to
+cause the values to be stacked horizontally.
+"""
+# category: bar charts
+import altair as alt
+from vega_datasets import data
+
+source=data.barley()
+
+bars = alt.Chart(source).mark_bar().encode(
+ x=alt.X('sum(yield):Q', stack='zero'),
+ y=alt.Y('variety:N'),
+ color=alt.Color('site')
+)
+
+text = alt.Chart(source).mark_text(dx=-15, dy=3, color='white').encode(
+ x=alt.X('sum(yield):Q', stack='zero'),
+ y=alt.Y('variety:N'),
+ detail='site:N',
+ text=alt.Text('sum(yield):Q', format='.1f')
+)
+
+bars + text
diff --git a/venv/lib/python3.9/site-packages/altair/examples/stem_and_leaf.py b/venv/lib/python3.9/site-packages/altair/examples/stem_and_leaf.py
new file mode 100644
index 00000000..ad24edae
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/stem_and_leaf.py
@@ -0,0 +1,39 @@
+"""
+Stem and Leaf Plot
+------------------
+This example shows how to make a stem and leaf plot.
+"""
+# category: other charts
+import altair as alt
+import pandas as pd
+import numpy as np
+np.random.seed(42)
+
+# Generating random data
+source = pd.DataFrame({'samples': np.random.normal(50, 15, 100).astype(int).astype(str)})
+
+# Splitting stem and leaf
+source['stem'] = source['samples'].str[:-1]
+source['leaf'] = source['samples'].str[-1]
+
+source = source.sort_values(by=['stem', 'leaf'])
+
+# Determining leaf position
+source['position'] = source.groupby('stem').cumcount().add(1)
+
+# Creating stem and leaf plot
+alt.Chart(source).mark_text(
+ align='left',
+ baseline='middle',
+ dx=-5
+).encode(
+ alt.X('position:Q', title='',
+ axis=alt.Axis(ticks=False, labels=False, grid=False)
+ ),
+ alt.Y('stem:N', title='', axis=alt.Axis(tickSize=0)),
+ text='leaf:N',
+).configure_axis(
+ labelFontSize=20
+).configure_text(
+ fontSize=20
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/step_chart.py b/venv/lib/python3.9/site-packages/altair/examples/step_chart.py
new file mode 100644
index 00000000..75cc4e8c
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/step_chart.py
@@ -0,0 +1,22 @@
+"""
+Step Chart
+----------
+This example shows Google's stock price over time.
+This uses the "step-after" interpolation scheme.
+The full list of interpolation options includes 'linear',
+'linear-closed', 'step', 'step-before', 'step-after', 'basis',
+'basis-open', 'basis-closed', 'cardinal', 'cardinal-open',
+'cardinal-closed', 'bundle', and 'monotone'.
+"""
+# category: line charts
+import altair as alt
+from vega_datasets import data
+
+source = data.stocks()
+
+alt.Chart(source).mark_line(interpolate='step-after').encode(
+ x='date',
+ y='price'
+).transform_filter(
+ alt.datum.symbol == 'GOOG'
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/streamgraph.py b/venv/lib/python3.9/site-packages/altair/examples/streamgraph.py
new file mode 100644
index 00000000..64b8e417
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/streamgraph.py
@@ -0,0 +1,20 @@
+"""
+Streamgraph
+-----------------
+This example shows the streamgraph from vega-lite examples.
+"""
+# category: area charts
+import altair as alt
+from vega_datasets import data
+
+source = data.unemployment_across_industries.url
+
+alt.Chart(source).mark_area().encode(
+ alt.X('yearmonth(date):T',
+ axis=alt.Axis(format='%Y', domain=False, tickSize=0)
+ ),
+ alt.Y('sum(count):Q', stack='center', axis=None),
+ alt.Color('series:N',
+ scale=alt.Scale(scheme='category20b')
+ )
+).interactive()
diff --git a/venv/lib/python3.9/site-packages/altair/examples/strip_plot.py b/venv/lib/python3.9/site-packages/altair/examples/strip_plot.py
new file mode 100644
index 00000000..cc346aaa
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/strip_plot.py
@@ -0,0 +1,15 @@
+"""
+Simple Strip Plot
+-----------------
+A simple example of how to make a strip plot.
+"""
+# category: simple charts
+import altair as alt
+from vega_datasets import data
+
+source = data.cars()
+
+alt.Chart(source).mark_tick().encode(
+ x='Horsepower:Q',
+ y='Cylinders:O'
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/stripplot.py b/venv/lib/python3.9/site-packages/altair/examples/stripplot.py
new file mode 100644
index 00000000..678c4b39
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/stripplot.py
@@ -0,0 +1,40 @@
+"""
+Stripplot
+---------
+This example shows how to make a Stripplot.
+"""
+# category: scatter plots
+import altair as alt
+from vega_datasets import data
+
+source = data.movies.url
+
+stripplot = alt.Chart(source, width=40).mark_circle(size=8).encode(
+ x=alt.X(
+ 'jitter:Q',
+ title=None,
+ axis=alt.Axis(values=[0], ticks=True, grid=False, labels=False),
+ scale=alt.Scale(),
+ ),
+ y=alt.Y('IMDB_Rating:Q'),
+ color=alt.Color('Major_Genre:N', legend=None),
+ column=alt.Column(
+ 'Major_Genre:N',
+ header=alt.Header(
+ labelAngle=-90,
+ titleOrient='top',
+ labelOrient='bottom',
+ labelAlign='right',
+ labelPadding=3,
+ ),
+ ),
+).transform_calculate(
+ # Generate Gaussian jitter with a Box-Muller transform
+ jitter='sqrt(-2*log(random()))*cos(2*PI*random())'
+).configure_facet(
+ spacing=0
+).configure_view(
+ stroke=None
+)
+
+stripplot
diff --git a/venv/lib/python3.9/site-packages/altair/examples/table_bubble_plot_github.py b/venv/lib/python3.9/site-packages/altair/examples/table_bubble_plot_github.py
new file mode 100644
index 00000000..80683ccc
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/table_bubble_plot_github.py
@@ -0,0 +1,16 @@
+"""
+Table Bubble Plot (Github Punch Card)
+-------------------------------------
+This example shows github contributions by the day of week and hour of the day.
+"""
+# category: scatter plots
+import altair as alt
+from vega_datasets import data
+
+source = data.github.url
+
+alt.Chart(source).mark_circle().encode(
+ x='hours(time):O',
+ y='day(time):O',
+ size='sum(count):Q'
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/tests/__init__.py b/venv/lib/python3.9/site-packages/altair/examples/tests/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/tests/__init__.py
diff --git a/venv/lib/python3.9/site-packages/altair/examples/tests/test_examples.py b/venv/lib/python3.9/site-packages/altair/examples/tests/test_examples.py
new file mode 100644
index 00000000..0b94d652
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/tests/test_examples.py
@@ -0,0 +1,44 @@
+import io
+import pkgutil
+
+import pytest
+
+from altair.utils.execeval import eval_block
+from altair import examples
+
+
+@pytest.fixture
+def require_altair_saver_png():
+ try:
+ import altair_saver # noqa: F401
+ except ImportError:
+ pytest.skip("altair_saver not importable; cannot run saver tests")
+ if "png" not in altair_saver.available_formats('vega-lite'):
+ pytest.skip("altair_saver not configured to save to png")
+
+
+def iter_example_filenames():
+ for importer, modname, ispkg in pkgutil.iter_modules(examples.__path__):
+ if ispkg or modname.startswith('_'):
+ continue
+ yield modname + '.py'
+
+
+@pytest.mark.parametrize('filename', iter_example_filenames())
+def test_examples(filename: str):
+ source = pkgutil.get_data(examples.__name__, filename)
+ chart = eval_block(source)
+
+ if chart is None:
+ raise ValueError("Example file should define chart in its final "
+ "statement.")
+ chart.to_dict()
+
+
+@pytest.mark.parametrize('filename', iter_example_filenames())
+def test_render_examples_to_png(require_altair_saver_png, filename):
+ source = pkgutil.get_data(examples.__name__, filename)
+ chart = eval_block(source)
+ out = io.BytesIO()
+ chart.save(out, format="png")
+ assert out.getvalue().startswith(b'\x89PNG')
diff --git a/venv/lib/python3.9/site-packages/altair/examples/top_k_items.py b/venv/lib/python3.9/site-packages/altair/examples/top_k_items.py
new file mode 100644
index 00000000..c0cf1e77
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/top_k_items.py
@@ -0,0 +1,27 @@
+"""
+Top K Items
+-----------
+This example shows how to use the window and transformation filter to display
+the Top items of a long list of items in decreasing order.
+Here we sort the top 10 highest ranking movies of IMDB.
+"""
+# category: case studies
+import altair as alt
+from vega_datasets import data
+
+source = data.movies.url
+
+# Top 10 movies by IMBD rating
+alt.Chart(
+ source,
+).mark_bar().encode(
+ x=alt.X('Title:N', sort='-y'),
+ y=alt.Y('IMDB_Rating:Q'),
+ color=alt.Color('IMDB_Rating:Q')
+
+).transform_window(
+ rank='rank(IMDB_Rating)',
+ sort=[alt.SortField('IMDB_Rating', order='descending')]
+).transform_filter(
+ (alt.datum.rank < 10)
+) \ No newline at end of file
diff --git a/venv/lib/python3.9/site-packages/altair/examples/top_k_letters.py b/venv/lib/python3.9/site-packages/altair/examples/top_k_letters.py
new file mode 100644
index 00000000..acab7085
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/top_k_letters.py
@@ -0,0 +1,40 @@
+"""
+Top K Letters
+-------------
+This example shows how to use a window transform in order to display only the
+top K categories by number of entries. In this case, we rank the characters in
+the first paragraph of Dickens' *A Tale of Two Cities* by number of occurances.
+"""
+# category: case studies
+import altair as alt
+import pandas as pd
+import numpy as np
+
+# Excerpt from A Tale of Two Cities; public domain text
+text = """
+It was the best of times, it was the worst of times, it was the age of wisdom,
+it was the age of foolishness, it was the epoch of belief, it was the epoch of
+incredulity, it was the season of Light, it was the season of Darkness, it was
+the spring of hope, it was the winter of despair, we had everything before us,
+we had nothing before us, we were all going direct to Heaven, we were all going
+direct the other way - in short, the period was so far like the present period,
+that some of its noisiest authorities insisted on its being received, for good
+or for evil, in the superlative degree of comparison only.
+"""
+
+source = pd.DataFrame(
+ {'letters': np.array([c for c in text if c.isalpha()])}
+)
+
+alt.Chart(source).transform_aggregate(
+ count='count()',
+ groupby=['letters']
+).transform_window(
+ rank='rank(count)',
+ sort=[alt.SortField('count', order='descending')]
+).transform_filter(
+ alt.datum.rank < 10
+).mark_bar().encode(
+ y=alt.Y('letters:N', sort='-x'),
+ x='count:Q',
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/top_k_with_others.py b/venv/lib/python3.9/site-packages/altair/examples/top_k_with_others.py
new file mode 100644
index 00000000..aebec024
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/top_k_with_others.py
@@ -0,0 +1,31 @@
+"""
+Top-K plot with Others
+----------------------
+This example shows how to use aggregate, window, and calculate transfromations
+to display the top-k directors by average worldwide gross while grouping the
+remaining directors as 'All Others'.
+"""
+# category: case studies
+import altair as alt
+from vega_datasets import data
+
+source = data.movies.url
+
+alt.Chart(source).mark_bar().encode(
+ x=alt.X("aggregate_gross:Q", aggregate="mean", title=None),
+ y=alt.Y(
+ "ranked_director:N",
+ sort=alt.Sort(op="mean", field="aggregate_gross", order="descending"),
+ title=None,
+ ),
+).transform_aggregate(
+ aggregate_gross='mean(Worldwide_Gross)',
+ groupby=["Director"],
+).transform_window(
+ rank='row_number()',
+ sort=[alt.SortField("aggregate_gross", order="descending")],
+).transform_calculate(
+ ranked_director="datum.rank < 10 ? datum.Director : 'All Others'"
+).properties(
+ title="Top Directors by Average Worldwide Gross",
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/trail_marker.py b/venv/lib/python3.9/site-packages/altair/examples/trail_marker.py
new file mode 100644
index 00000000..8136cd37
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/trail_marker.py
@@ -0,0 +1,16 @@
+"""
+Line Chart with Varying Size
+----------------------------
+This is example of using the ``trail`` marker to vary the size of a line.
+"""
+# category: line charts
+import altair as alt
+from vega_datasets import data
+
+source = data.wheat()
+
+alt.Chart(source).mark_trail().encode(
+ x='year:T',
+ y='wheat:Q',
+ size='wheat:Q'
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/trellis_area.py b/venv/lib/python3.9/site-packages/altair/examples/trellis_area.py
new file mode 100644
index 00000000..08cb18df
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/trellis_area.py
@@ -0,0 +1,19 @@
+"""
+Trellis Area Chart
+------------------
+This example shows small multiples of an area chart.
+"""
+# category: area charts
+import altair as alt
+from vega_datasets import data
+
+source = data.iowa_electricity()
+
+alt.Chart(source).mark_area().encode(
+ x="year:T",
+ y="net_generation:Q",
+ color="source:N",
+ row="source:N"
+).properties(
+ height=100
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/trellis_area_sort_array.py b/venv/lib/python3.9/site-packages/altair/examples/trellis_area_sort_array.py
new file mode 100644
index 00000000..a8c74532
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/trellis_area_sort_array.py
@@ -0,0 +1,21 @@
+'''
+Trellis Area Sort Chart
+-----------------------
+This example shows small multiples of an area chart.
+Stock prices of four large companies
+sorted by `['MSFT', 'AAPL', 'IBM', 'AMZN']`
+'''
+# category: area charts
+import altair as alt
+from vega_datasets import data
+
+source = data.stocks()
+
+alt.Chart(source).transform_filter(
+ alt.datum.symbol != 'GOOG'
+).mark_area().encode(
+ x='date:T',
+ y='price:Q',
+ color='symbol:N',
+ row=alt.Row('symbol:N', sort=['MSFT', 'AAPL', 'IBM', 'AMZN'])
+).properties(height=50, width=400)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/trellis_histogram.py b/venv/lib/python3.9/site-packages/altair/examples/trellis_histogram.py
new file mode 100644
index 00000000..cba1c698
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/trellis_histogram.py
@@ -0,0 +1,17 @@
+"""
+Trellis Histogram
+-----------------
+This example shows how to make a basic trellis histogram.
+https://vega.github.io/vega-lite/examples/trellis_bar_histogram.html
+"""
+# category: histograms
+import altair as alt
+from vega_datasets import data
+
+source = data.cars()
+
+alt.Chart(source).mark_bar().encode(
+ alt.X("Horsepower:Q", bin=True),
+ y='count()',
+ row='Origin'
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/trellis_scatter_plot.py b/venv/lib/python3.9/site-packages/altair/examples/trellis_scatter_plot.py
new file mode 100644
index 00000000..590a4192
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/trellis_scatter_plot.py
@@ -0,0 +1,16 @@
+"""
+Trellis Scatter Plot
+-----------------------
+This example shows how to make a trellis scatter plot.
+"""
+# category: scatter plots
+import altair as alt
+from vega_datasets import data
+
+source = data.cars()
+
+alt.Chart(source).mark_point().encode(
+ x='Horsepower:Q',
+ y='Miles_per_Gallon:Q',
+ row='Origin:N'
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/trellis_stacked_bar_chart.py b/venv/lib/python3.9/site-packages/altair/examples/trellis_stacked_bar_chart.py
new file mode 100644
index 00000000..f7d65a75
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/trellis_stacked_bar_chart.py
@@ -0,0 +1,17 @@
+"""
+Trellis Stacked Bar Chart
+=========================
+This is an example of a horizontal stacked bar chart using data which contains crop yields over different regions and different years in the 1930s.
+"""
+# category: bar charts
+import altair as alt
+from vega_datasets import data
+
+source = data.barley()
+
+alt.Chart(source).mark_bar().encode(
+ column='year',
+ x='yield',
+ y='variety',
+ color='site'
+).properties(width=220)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/us_employment.py b/venv/lib/python3.9/site-packages/altair/examples/us_employment.py
new file mode 100644
index 00000000..719eecf4
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/us_employment.py
@@ -0,0 +1,58 @@
+"""
+The U.S. employment crash during the Great Recession
+----------------------------------------------------
+This example is a fully developed bar chart with negative values using the sample dataset of U.S. employment changes during the Great Recession.
+"""
+# category: case studies
+import altair as alt
+import pandas as pd
+from vega_datasets import data
+
+source = data.us_employment()
+presidents = pd.DataFrame([
+ {
+ "start": "2006-01-01",
+ "end": "2009-01-19",
+ "president": "Bush"
+ },
+ {
+ "start": "2009-01-20",
+ "end": "2015-12-31",
+ "president": "Obama"
+ }
+])
+
+bars = alt.Chart(
+ source,
+ title="The U.S. employment crash during the Great Recession"
+).mark_bar().encode(
+ x=alt.X("month:T", title=""),
+ y=alt.Y("nonfarm_change:Q", title="Change in non-farm employment (in thousands)"),
+ color=alt.condition(
+ alt.datum.nonfarm_change > 0,
+ alt.value("steelblue"),
+ alt.value("orange")
+ )
+)
+
+rule = alt.Chart(presidents).mark_rule(
+ color="black",
+ strokeWidth=2
+).encode(
+ x='end:T'
+).transform_filter(alt.datum.president == "Bush")
+
+text = alt.Chart(presidents).mark_text(
+ align='left',
+ baseline='middle',
+ dx=7,
+ dy=-135,
+ size=11
+).encode(
+ x='start:T',
+ x2='end:T',
+ text='president',
+ color=alt.value('#000000')
+)
+
+(bars + rule + text).properties(width=600)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/us_incomebrackets_by_state_facet.py b/venv/lib/python3.9/site-packages/altair/examples/us_incomebrackets_by_state_facet.py
new file mode 100644
index 00000000..70f33048
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/us_incomebrackets_by_state_facet.py
@@ -0,0 +1,29 @@
+"""
+US Income by State: Wrapped Facet
+---------------------------------
+This example shows how to create a map of income in the US by state,
+faceted over income brackets
+"""
+# category: maps
+
+import altair as alt
+from vega_datasets import data
+
+states = alt.topo_feature(data.us_10m.url, 'states')
+source = data.income.url
+
+alt.Chart(source).mark_geoshape().encode(
+ shape='geo:G',
+ color='pct:Q',
+ tooltip=['name:N', 'pct:Q'],
+ facet=alt.Facet('group:N', columns=2),
+).transform_lookup(
+ lookup='id',
+ from_=alt.LookupData(data=states, key='id'),
+ as_='geo'
+).properties(
+ width=300,
+ height=175,
+).project(
+ type='albersUsa'
+) \ No newline at end of file
diff --git a/venv/lib/python3.9/site-packages/altair/examples/us_population_over_time.py b/venv/lib/python3.9/site-packages/altair/examples/us_population_over_time.py
new file mode 100644
index 00000000..c53ecce1
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/us_population_over_time.py
@@ -0,0 +1,36 @@
+"""
+US Population Over Time
+=======================
+This chart visualizes the age distribution of the US population over time.
+It uses a slider widget that is bound to the year to visualize the age
+distribution over time.
+"""
+# category: case studies
+import altair as alt
+from vega_datasets import data
+
+source = data.population.url
+
+pink_blue = alt.Scale(domain=('Male', 'Female'),
+ range=["steelblue", "salmon"])
+
+slider = alt.binding_range(min=1900, max=2000, step=10)
+select_year = alt.selection_single(name="year", fields=['year'],
+ bind=slider, init={'year': 2000})
+
+alt.Chart(source).mark_bar().encode(
+ x=alt.X('sex:N', title=None),
+ y=alt.Y('people:Q', scale=alt.Scale(domain=(0, 12000000))),
+ color=alt.Color('sex:N', scale=pink_blue),
+ column='age:O'
+).properties(
+ width=20
+).add_selection(
+ select_year
+).transform_calculate(
+ "sex", alt.expr.if_(alt.datum.sex == 1, "Male", "Female")
+).transform_filter(
+ select_year
+).configure_facet(
+ spacing=8
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/us_population_over_time_facet.py b/venv/lib/python3.9/site-packages/altair/examples/us_population_over_time_facet.py
new file mode 100644
index 00000000..fc800198
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/us_population_over_time_facet.py
@@ -0,0 +1,25 @@
+"""
+US Population: Wrapped Facet
+============================
+This chart visualizes the age distribution of the US population over time,
+using a wrapped faceting of the data by decade.
+"""
+# category: case studies
+import altair as alt
+from vega_datasets import data
+
+source = data.population.url
+
+alt.Chart(source).mark_area().encode(
+ x='age:O',
+ y=alt.Y(
+ 'sum(people):Q',
+ title='Population',
+ axis=alt.Axis(format='~s')
+ ),
+ facet=alt.Facet('year:O', columns=5),
+).properties(
+ title='US Age Distribution By Year',
+ width=90,
+ height=80
+) \ No newline at end of file
diff --git a/venv/lib/python3.9/site-packages/altair/examples/us_population_pyramid_over_time.py b/venv/lib/python3.9/site-packages/altair/examples/us_population_pyramid_over_time.py
new file mode 100644
index 00000000..624db71d
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/us_population_pyramid_over_time.py
@@ -0,0 +1,55 @@
+'''
+US Population Pyramid Over Time
+===============================
+A population pyramid shows the distribution of age groups within a population.
+It uses a slider widget that is bound to the year to visualize the age
+distribution over time.
+'''
+# category: case studies
+import altair as alt
+from vega_datasets import data
+
+source = data.population.url
+
+slider = alt.binding_range(min=1850, max=2000, step=10)
+select_year = alt.selection_single(name='year', fields=['year'],
+ bind=slider, init={'year': 2000})
+
+base = alt.Chart(source).add_selection(
+ select_year
+).transform_filter(
+ select_year
+).transform_calculate(
+ gender=alt.expr.if_(alt.datum.sex == 1, 'Male', 'Female')
+).properties(
+ width=250
+)
+
+
+color_scale = alt.Scale(domain=['Male', 'Female'],
+ range=['#1f77b4', '#e377c2'])
+
+left = base.transform_filter(
+ alt.datum.gender == 'Female'
+).encode(
+ y=alt.Y('age:O', axis=None),
+ x=alt.X('sum(people):Q',
+ title='population',
+ sort=alt.SortOrder('descending')),
+ color=alt.Color('gender:N', scale=color_scale, legend=None)
+).mark_bar().properties(title='Female')
+
+middle = base.encode(
+ y=alt.Y('age:O', axis=None),
+ text=alt.Text('age:Q'),
+).mark_text().properties(width=20)
+
+right = base.transform_filter(
+ alt.datum.gender == 'Male'
+).encode(
+ y=alt.Y('age:O', axis=None),
+ x=alt.X('sum(people):Q', title='population'),
+ color=alt.Color('gender:N', scale=color_scale, legend=None)
+).mark_bar().properties(title='Male')
+
+alt.concat(left, middle, right, spacing=5) \ No newline at end of file
diff --git a/venv/lib/python3.9/site-packages/altair/examples/us_state_capitals.py b/venv/lib/python3.9/site-packages/altair/examples/us_state_capitals.py
new file mode 100644
index 00000000..ff528a73
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/us_state_capitals.py
@@ -0,0 +1,43 @@
+"""
+U.S. state capitals overlayed on a map of the U.S
+-------------------------------------------------
+This is a layered geographic visualization that shows US capitals
+overlayed on a map.
+"""
+# category: case studies
+import altair as alt
+from vega_datasets import data
+
+states = alt.topo_feature(data.us_10m.url, 'states')
+capitals = data.us_state_capitals.url
+
+# US states background
+background = alt.Chart(states).mark_geoshape(
+ fill='lightgray',
+ stroke='white'
+).properties(
+ title='US State Capitols',
+ width=650,
+ height=400
+).project('albersUsa')
+
+# Points and text
+hover = alt.selection(type='single', on='mouseover', nearest=True,
+ fields=['lat', 'lon'])
+
+base = alt.Chart(capitals).encode(
+ longitude='lon:Q',
+ latitude='lat:Q',
+)
+
+text = base.mark_text(dy=-5, align='right').encode(
+ alt.Text('city', type='nominal'),
+ opacity=alt.condition(~hover, alt.value(0), alt.value(1))
+)
+
+points = base.mark_point().encode(
+ color=alt.value('black'),
+ size=alt.condition(~hover, alt.value(30), alt.value(100))
+).add_selection(hover)
+
+background + points + text
diff --git a/venv/lib/python3.9/site-packages/altair/examples/violin_plot.py b/venv/lib/python3.9/site-packages/altair/examples/violin_plot.py
new file mode 100644
index 00000000..66cab470
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/violin_plot.py
@@ -0,0 +1,39 @@
+"""
+Violin Plot
+-----------
+This example shows how to make a Violin Plot using Altair's density transform.
+"""
+# category: other charts
+import altair as alt
+from vega_datasets import data
+
+alt.Chart(data.cars()).transform_density(
+ 'Miles_per_Gallon',
+ as_=['Miles_per_Gallon', 'density'],
+ extent=[5, 50],
+ groupby=['Origin']
+).mark_area(orient='horizontal').encode(
+ y='Miles_per_Gallon:Q',
+ color='Origin:N',
+ x=alt.X(
+ 'density:Q',
+ stack='center',
+ impute=None,
+ title=None,
+ axis=alt.Axis(labels=False, values=[0],grid=False, ticks=True),
+ ),
+ column=alt.Column(
+ 'Origin:N',
+ header=alt.Header(
+ titleOrient='bottom',
+ labelOrient='bottom',
+ labelPadding=0,
+ ),
+ )
+).properties(
+ width=100
+).configure_facet(
+ spacing=0
+).configure_view(
+ stroke=None
+)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/weather_heatmap.py b/venv/lib/python3.9/site-packages/altair/examples/weather_heatmap.py
new file mode 100644
index 00000000..9940c1cf
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/weather_heatmap.py
@@ -0,0 +1,24 @@
+"""
+Seattle Weather Heatmap
+-----------------------
+This example shows the 2010 daily high temperature (F) in Seattle, WA.
+"""
+# category: case studies
+import altair as alt
+from vega_datasets import data
+
+# Since the data is more than 5,000 rows we'll import it from a URL
+source = data.seattle_temps.url
+
+alt.Chart(
+ source,
+ title="2010 Daily High Temperature (F) in Seattle, WA"
+).mark_rect().encode(
+ x='date(date):O',
+ y='month(date):O',
+ color=alt.Color('max(temp):Q', scale=alt.Scale(scheme="inferno")),
+ tooltip=[
+ alt.Tooltip('monthdate(date):T', title='Date'),
+ alt.Tooltip('max(temp):Q', title='Max Temp')
+ ]
+).properties(width=550)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/wheat_wages.py b/venv/lib/python3.9/site-packages/altair/examples/wheat_wages.py
new file mode 100644
index 00000000..dd168b1f
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/wheat_wages.py
@@ -0,0 +1,58 @@
+"""
+Wheat and Wages
+---------------
+A recreation of William Playfair's classic chart visualizing
+the price of wheat, the wages of a mechanic, and the reigning British monarch.
+
+This is a more polished version of the simpler chart in :ref:`gallery_bar_and_line_with_dual_axis`.
+"""
+# category: case studies
+import altair as alt
+from vega_datasets import data
+
+
+base_wheat = alt.Chart(data.wheat.url).transform_calculate(
+ year_end="+datum.year + 5")
+
+base_monarchs = alt.Chart(data.monarchs.url).transform_calculate(
+ offset="((!datum.commonwealth && datum.index % 2) ? -1: 1) * 2 + 95",
+ off2="((!datum.commonwealth && datum.index % 2) ? -1: 1) + 95",
+ y="95",
+ x="+datum.start + (+datum.end - +datum.start)/2"
+)
+
+bars = base_wheat.mark_bar(**{"fill": "#aaa", "stroke": "#999"}).encode(
+ x=alt.X("year:Q", axis=alt.Axis(format='d', tickCount=5)),
+ y=alt.Y("wheat:Q", axis=alt.Axis(zindex=1)),
+ x2=alt.X2("year_end")
+)
+
+area = base_wheat.mark_area(**{"color": "#a4cedb", "opacity": 0.7}).encode(
+ x=alt.X("year:Q"),
+ y=alt.Y("wages:Q")
+)
+
+area_line_1 = area.mark_line(**{"color": "#000", "opacity": 0.7})
+area_line_2 = area.mark_line(**{"yOffset": -2, "color": "#EE8182"})
+
+top_bars = base_monarchs.mark_bar(stroke="#000").encode(
+ x=alt.X("start:Q"),
+ x2=alt.X2("end"),
+ y=alt.Y("y:Q"),
+ y2=alt.Y2("offset"),
+ fill=alt.Fill("commonwealth:N", legend=None, scale=alt.Scale(range=["black", "white"]))
+)
+
+top_text = base_monarchs.mark_text(**{"yOffset": 14, "fontSize": 9, "fontStyle": "italic"}).encode(
+ x=alt.X("x:Q"),
+ y=alt.Y("off2:Q"),
+ text=alt.Text("name:N")
+)
+
+(bars + area + area_line_1 + area_line_2 + top_bars + top_text).properties(
+ width=900, height=400
+).configure_axis(
+ title=None, gridColor="white", gridOpacity=0.25, domain=False
+).configure_view(
+ stroke="transparent"
+) \ No newline at end of file
diff --git a/venv/lib/python3.9/site-packages/altair/examples/wilkinson-dot-plot.py b/venv/lib/python3.9/site-packages/altair/examples/wilkinson-dot-plot.py
new file mode 100644
index 00000000..05a5786d
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/wilkinson-dot-plot.py
@@ -0,0 +1,27 @@
+"""
+Wilkinson Dot Plot
+------------------
+An example of a `Wilkinson Dot Plot <https://en.wikipedia.org/wiki/Dot_plot_(statistics)>`_
+"""
+# category: other charts
+
+import altair as alt
+import pandas as pd
+
+source = pd.DataFrame(
+ {"data":[1,1,1,1,1,1,1,1,1,1,
+ 2,2,2,
+ 3,3,
+ 4,4,4,4,4,4]
+ }
+)
+
+alt.Chart(source).mark_circle(opacity=1).transform_window(
+ id='rank()',
+ groupby=['data']
+).encode(
+ alt.X('data:O'),
+ alt.Y('id:O',
+ axis=None,
+ sort='descending')
+).properties(height=100)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/wind_vector_map.py b/venv/lib/python3.9/site-packages/altair/examples/wind_vector_map.py
new file mode 100644
index 00000000..f16ad285
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/wind_vector_map.py
@@ -0,0 +1,24 @@
+"""
+Wind Vector Map
+---------------
+An example showing a vector array map showing wind speed and direction using ``wedge``
+as shape for ``mark_point`` and ``angle`` encoding for the wind direction.
+This is adapted from this corresponding Vega-Lite Example:
+`Wind Vector Map <https://vega.github.io/vega-lite/examples/point_angle_windvector.html>`_.
+"""
+# category: scatter plots
+
+import altair as alt
+from vega_datasets import data
+
+source = data.windvectors()
+
+alt.Chart(source).mark_point(shape="wedge", filled=True).encode(
+ latitude="latitude",
+ longitude="longitude",
+ color=alt.Color(
+ "dir", scale=alt.Scale(domain=[0, 360], scheme="rainbow"), legend=None
+ ),
+ angle=alt.Angle("dir", scale=alt.Scale(domain=[0, 360], range=[180, 540])),
+ size=alt.Size("speed", scale=alt.Scale(rangeMax=500)),
+).project("equalEarth")
diff --git a/venv/lib/python3.9/site-packages/altair/examples/window_rank.py b/venv/lib/python3.9/site-packages/altair/examples/window_rank.py
new file mode 100644
index 00000000..d362d40f
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/window_rank.py
@@ -0,0 +1,42 @@
+"""
+Window Rank Line Chart
+----------------------
+This example shows the Group F rankings in the 2018 World Cup after each matchday.
+A window transformation is used to rank each after each match day, sorting by points and difference.
+"""
+# category: case studies
+import altair as alt
+import pandas as pd
+
+source = pd.DataFrame(
+ [
+ {"team": "Germany", "matchday": 1, "point": 0, "diff": -1},
+ {"team": "Germany", "matchday": 2, "point": 3, "diff": 0},
+ {"team": "Germany", "matchday": 3, "point": 3, "diff": -2},
+ {"team": "Mexico", "matchday": 1, "point": 3, "diff": 1},
+ {"team": "Mexico", "matchday": 2, "point": 6, "diff": 2},
+ {"team": "Mexico", "matchday": 3, "point": 6, "diff": -1},
+ {"team": "South Korea", "matchday": 1, "point": 0, "diff": -1},
+ {"team": "South Korea", "matchday": 2, "point": 0, "diff": -2},
+ {"team": "South Korea", "matchday": 3, "point": 3, "diff": 0},
+ {"team": "Sweden", "matchday": 1, "point": 3, "diff": 1},
+ {"team": "Sweden", "matchday": 2, "point": 3, "diff": 0},
+ {"team": "Sweden", "matchday": 3, "point": 6, "diff": 3},
+ ]
+)
+
+color_scale = alt.Scale(
+ domain=["Germany", "Mexico", "South Korea", "Sweden"],
+ range=["#000000", "#127153", "#C91A3C", "#0C71AB"],
+)
+
+alt.Chart(source).mark_line().encode(
+ x="matchday:O", y="rank:O", color=alt.Color("team:N", scale=color_scale)
+).transform_window(
+ rank="rank()",
+ sort=[
+ alt.SortField("point", order="descending"),
+ alt.SortField("diff", order="descending"),
+ ],
+ groupby=["matchday"],
+).properties(title="World Cup 2018: Group F Rankings")
diff --git a/venv/lib/python3.9/site-packages/altair/examples/world_map.py b/venv/lib/python3.9/site-packages/altair/examples/world_map.py
new file mode 100644
index 00000000..34263937
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/world_map.py
@@ -0,0 +1,27 @@
+"""
+World Map
+---------
+
+This example shows how to create a world map using data generators for
+different background layers.
+"""
+# category: maps
+
+import altair as alt
+from vega_datasets import data
+
+# Data generators for the background
+sphere = alt.sphere()
+graticule = alt.graticule()
+
+# Source of land data
+source = alt.topo_feature(data.world_110m.url, 'countries')
+
+# Layering and configuring the components
+alt.layer(
+ alt.Chart(sphere).mark_geoshape(fill='lightblue'),
+ alt.Chart(graticule).mark_geoshape(stroke='white', strokeWidth=0.5),
+ alt.Chart(source).mark_geoshape(fill='ForestGreen', stroke='black')
+).project(
+ 'naturalEarth1'
+).properties(width=600, height=400).configure_view(stroke=None)
diff --git a/venv/lib/python3.9/site-packages/altair/examples/world_projections.py b/venv/lib/python3.9/site-packages/altair/examples/world_projections.py
new file mode 100644
index 00000000..970a106b
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/examples/world_projections.py
@@ -0,0 +1,26 @@
+"""
+World Projections
+-----------------
+This example shows a map of the countries of the world using four available
+geographic projections. For more details on the projections available in
+Altair, see https://vega.github.io/vega-lite/docs/projection.html
+"""
+# category: maps
+import altair as alt
+from vega_datasets import data
+
+source = alt.topo_feature(data.world_110m.url, 'countries')
+
+base = alt.Chart(source).mark_geoshape(
+ fill='#666666',
+ stroke='white'
+).properties(
+ width=300,
+ height=180
+)
+
+projections = ['equirectangular', 'mercator', 'orthographic', 'gnomonic']
+charts = [base.project(proj).properties(title=proj)
+ for proj in projections]
+
+alt.concat(*charts, columns=2)
diff --git a/venv/lib/python3.9/site-packages/altair/expr/__init__.py b/venv/lib/python3.9/site-packages/altair/expr/__init__.py
new file mode 100644
index 00000000..8390b992
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/expr/__init__.py
@@ -0,0 +1,5 @@
+"""Tools for creating transform & filter expressions with a python syntax"""
+# flake8: noqa
+from .core import datum, Expression
+from .funcs import *
+from .consts import *
diff --git a/venv/lib/python3.9/site-packages/altair/expr/consts.py b/venv/lib/python3.9/site-packages/altair/expr/consts.py
new file mode 100644
index 00000000..bb14f0b4
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/expr/consts.py
@@ -0,0 +1,27 @@
+from .core import ConstExpression
+
+
+CONST_LISTING = {
+ "NaN": "not a number (same as JavaScript literal NaN)",
+ "LN10": "the natural log of 10 (alias to Math.LN10)",
+ "E": "the transcendental number e (alias to Math.E)",
+ "LOG10E": "the base 10 logarithm e (alias to Math.LOG10E)",
+ "LOG2E": "the base 2 logarithm of e (alias to Math.LOG2E)",
+ "SQRT1_2": "the square root of 0.5 (alias to Math.SQRT1_2)",
+ "LN2": "the natural log of 2 (alias to Math.LN2)",
+ "SQRT2": "the square root of 2 (alias to Math.SQRT1_2)",
+ "PI": "the transcendental number pi (alias to Math.PI)",
+}
+
+NAME_MAP = {}
+
+
+def _populate_namespace():
+ globals_ = globals()
+ for name, doc in CONST_LISTING.items():
+ py_name = NAME_MAP.get(name, name)
+ globals_[py_name] = ConstExpression(name, doc)
+ yield py_name
+
+
+__all__ = list(_populate_namespace())
diff --git a/venv/lib/python3.9/site-packages/altair/expr/core.py b/venv/lib/python3.9/site-packages/altair/expr/core.py
new file mode 100644
index 00000000..264c5a19
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/expr/core.py
@@ -0,0 +1,197 @@
+from ..utils import SchemaBase
+
+
+class DatumType(object):
+ """An object to assist in building Vega-Lite Expressions"""
+
+ def __repr__(self):
+ return "datum"
+
+ def __getattr__(self, attr):
+ if attr.startswith("__") and attr.endswith("__"):
+ raise AttributeError(attr)
+ return GetAttrExpression("datum", attr)
+
+ def __getitem__(self, attr):
+ return GetItemExpression("datum", attr)
+
+ def __call__(self, datum, **kwargs):
+ """Specify a datum for use in an encoding"""
+ return dict(datum=datum, **kwargs)
+
+
+datum = DatumType()
+
+
+def _js_repr(val):
+ """Return a javascript-safe string representation of val"""
+ if val is True:
+ return "true"
+ elif val is False:
+ return "false"
+ elif val is None:
+ return "null"
+ else:
+ return repr(val)
+
+
+class Expression(SchemaBase):
+ """Expression
+
+ Base object for enabling build-up of Javascript expressions using
+ a Python syntax. Calling ``repr(obj)`` will return a Javascript
+ representation of the object and the operations it encodes.
+ """
+
+ _schema = {"type": "string"}
+
+ def to_dict(self, *args, **kwargs):
+ return repr(self)
+
+ def __setattr__(self, attr, val):
+ # We don't need the setattr magic defined in SchemaBase
+ return object.__setattr__(self, attr, val)
+
+ def __add__(self, other):
+ return BinaryExpression("+", self, other)
+
+ def __radd__(self, other):
+ return BinaryExpression("+", other, self)
+
+ def __sub__(self, other):
+ return BinaryExpression("-", self, other)
+
+ def __rsub__(self, other):
+ return BinaryExpression("-", other, self)
+
+ def __mul__(self, other):
+ return BinaryExpression("*", self, other)
+
+ def __rmul__(self, other):
+ return BinaryExpression("*", other, self)
+
+ def __truediv__(self, other):
+ return BinaryExpression("/", self, other)
+
+ def __rtruediv__(self, other):
+ return BinaryExpression("/", other, self)
+
+ __div__ = __truediv__
+
+ __rdiv__ = __rtruediv__
+
+ def __mod__(self, other):
+ return BinaryExpression("%", self, other)
+
+ def __rmod__(self, other):
+ return BinaryExpression("%", other, self)
+
+ def __pow__(self, other):
+ # "**" Javascript operator is not supported in all browsers
+ return FunctionExpression("pow", (self, other))
+
+ def __rpow__(self, other):
+ # "**" Javascript operator is not supported in all browsers
+ return FunctionExpression("pow", (other, self))
+
+ def __neg__(self):
+ return UnaryExpression("-", self)
+
+ def __pos__(self):
+ return UnaryExpression("+", self)
+
+ # comparison operators
+
+ def __eq__(self, other):
+ return BinaryExpression("===", self, other)
+
+ def __ne__(self, other):
+ return BinaryExpression("!==", self, other)
+
+ def __gt__(self, other):
+ return BinaryExpression(">", self, other)
+
+ def __lt__(self, other):
+ return BinaryExpression("<", self, other)
+
+ def __ge__(self, other):
+ return BinaryExpression(">=", self, other)
+
+ def __le__(self, other):
+ return BinaryExpression("<=", self, other)
+
+ def __abs__(self):
+ return FunctionExpression("abs", (self,))
+
+ # logical operators
+
+ def __and__(self, other):
+ return BinaryExpression("&&", self, other)
+
+ def __rand__(self, other):
+ return BinaryExpression("&&", other, self)
+
+ def __or__(self, other):
+ return BinaryExpression("||", self, other)
+
+ def __ror__(self, other):
+ return BinaryExpression("||", other, self)
+
+ def __invert__(self):
+ return UnaryExpression("!", self)
+
+ # item access
+ def __getitem__(self, val):
+ return GetItemExpression(self, val)
+
+
+class UnaryExpression(Expression):
+ def __init__(self, op, val):
+ super(UnaryExpression, self).__init__(op=op, val=val)
+
+ def __repr__(self):
+ return "({op}{val})".format(op=self.op, val=_js_repr(self.val))
+
+
+class BinaryExpression(Expression):
+ def __init__(self, op, lhs, rhs):
+ super(BinaryExpression, self).__init__(op=op, lhs=lhs, rhs=rhs)
+
+ def __repr__(self):
+ return "({lhs} {op} {rhs})".format(
+ op=self.op, lhs=_js_repr(self.lhs), rhs=_js_repr(self.rhs)
+ )
+
+
+class FunctionExpression(Expression):
+ def __init__(self, name, args):
+ super(FunctionExpression, self).__init__(name=name, args=args)
+
+ def __repr__(self):
+ args = ",".join(_js_repr(arg) for arg in self.args)
+ return "{name}({args})".format(name=self.name, args=args)
+
+
+class ConstExpression(Expression):
+ def __init__(self, name, doc):
+ self.__doc__ = """{}: {}""".format(name, doc)
+ super(ConstExpression, self).__init__(name=name, doc=doc)
+
+ def __repr__(self):
+ return str(self.name)
+
+
+class GetAttrExpression(Expression):
+ def __init__(self, group, name):
+ super(GetAttrExpression, self).__init__(group=group, name=name)
+
+ def __repr__(self):
+ return "{}.{}".format(self.group, self.name)
+
+
+class GetItemExpression(Expression):
+ def __init__(self, group, name):
+ super(GetItemExpression, self).__init__(group=group, name=name)
+
+ def __repr__(self):
+ return "{}[{!r}]".format(self.group, self.name)
diff --git a/venv/lib/python3.9/site-packages/altair/expr/funcs.py b/venv/lib/python3.9/site-packages/altair/expr/funcs.py
new file mode 100644
index 00000000..ed86d536
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/expr/funcs.py
@@ -0,0 +1,168 @@
+from .core import FunctionExpression
+
+
+FUNCTION_LISTING = {
+ "isArray": r"Returns true if _value_ is an array, false otherwise.",
+ "isBoolean": r"Returns true if _value_ is a boolean (`true` or `false`), false otherwise.",
+ "isDate": r"Returns true if _value_ is a Date object, false otherwise. This method will return false for timestamp numbers or date-formatted strings; it recognizes Date objects only.",
+ "isNumber": r"Returns true if _value_ is a number, false otherwise. `NaN` and `Infinity` are considered numbers.",
+ "isObject": r"Returns true if _value_ is an object (including arrays and Dates), false otherwise.",
+ "isRegExp": r"Returns true if _value_ is a RegExp (regular expression) object, false otherwise.",
+ "isString": r"Returns true if _value_ is a string, false otherwise.",
+ "toBoolean": r"Coerces the input _value_ to a string. Null values and empty strings are mapped to `null`.",
+ "toDate": r"Coerces the input _value_ to a Date instance. Null values and empty strings are mapped to `null`. If an optional _parser_ function is provided, it is used to perform date parsing, otherwise `Date.parse` is used. Be aware that `Date.parse` has different implementations across browsers!",
+ "toNumber": r"Coerces the input _value_ to a number. Null values and empty strings are mapped to `null`.",
+ "toString": r"Coerces the input _value_ to a string. Null values and empty strings are mapped to `null`.",
+ "if": r"If _test_ is truthy, returns _thenValue_. Otherwise, returns _elseValue_. The _if_ function is equivalent to the ternary operator `a ? b : c`.",
+ "isNaN": r"Returns true if _value_ is not a number. Same as JavaScript's `isNaN`.",
+ "isFinite": r"Returns true if _value_ is a finite number. Same as JavaScript's `isFinite`.",
+ "abs": r"Returns the absolute value of _value_. Same as JavaScript's `Math.abs`.",
+ "acos": r"Trigonometric arccosine. Same as JavaScript's `Math.acos`.",
+ "asin": r"Trigonometric arcsine. Same as JavaScript's `Math.asin`.",
+ "atan": r"Trigonometric arctangent. Same as JavaScript's `Math.atan`.",
+ "atan2": r"Returns the arctangent of _dy / dx_. Same as JavaScript's `Math.atan2`.",
+ "ceil": r"Rounds _value_ to the nearest integer of equal or greater value. Same as JavaScript's `Math.ceil`.",
+ "clamp": r"Restricts _value_ to be between the specified _min_ and _max_.",
+ "cos": r"Trigonometric cosine. Same as JavaScript's `Math.cos`.",
+ "exp": r"Returns the value of _e_ raised to the provided _exponent_. Same as JavaScript's `Math.exp`.",
+ "floor": r"Rounds _value_ to the nearest integer of equal or lower value. Same as JavaScript's `Math.floor`.",
+ "log": r"Returns the natural logarithm of _value_. Same as JavaScript's `Math.log`.",
+ "max": r"Returns the maximum argument value. Same as JavaScript's `Math.max`.",
+ "min": r"Returns the minimum argument value. Same as JavaScript's `Math.min`.",
+ "pow": r"Returns _value_ raised to the given _exponent_. Same as JavaScript's `Math.pow`.",
+ "random": r"Returns a pseudo-random number in the range [0,1). Same as JavaScript's `Math.random`.",
+ "round": r"Rounds _value_ to the nearest integer. Same as JavaScript's `Math.round`.",
+ "sin": r"Trigonometric sine. Same as JavaScript's `Math.sin`.",
+ "sqrt": r"Square root function. Same as JavaScript's `Math.sqrt`.",
+ "tan": r"Trigonometric tangent. Same as JavaScript's `Math.tan`.",
+ "now": r"Returns the timestamp for the current time.",
+ "datetime": r"Returns a new `Date` instance. The _month_ is 0-based, such that `1` represents February.",
+ "date": r"Returns the day of the month for the given _datetime_ value, in local time.",
+ "day": r"Returns the day of the week for the given _datetime_ value, in local time.",
+ "year": r"Returns the year for the given _datetime_ value, in local time.",
+ "quarter": r"Returns the quarter of the year (0-3) for the given _datetime_ value, in local time.",
+ "month": r"Returns the (zero-based) month for the given _datetime_ value, in local time.",
+ "hours": r"Returns the hours component for the given _datetime_ value, in local time.",
+ "minutes": r"Returns the minutes component for the given _datetime_ value, in local time.",
+ "seconds": r"Returns the seconds component for the given _datetime_ value, in local time.",
+ "milliseconds": r"Returns the milliseconds component for the given _datetime_ value, in local time.",
+ "time": r"Returns the epoch-based timestamp for the given _datetime_ value.",
+ "timezoneoffset": r"Returns the timezone offset from the local timezone to UTC for the given _datetime_ value.",
+ "utc": r"Returns a timestamp for the given UTC date. The _month_ is 0-based, such that `1` represents February.",
+ "utcdate": r"Returns the day of the month for the given _datetime_ value, in UTC time.",
+ "utcday": r"Returns the day of the week for the given _datetime_ value, in UTC time.",
+ "utcyear": r"Returns the year for the given _datetime_ value, in UTC time.",
+ "utcquarter": r"Returns the quarter of the year (0-3) for the given _datetime_ value, in UTC time.",
+ "utcmonth": r"Returns the (zero-based) month for the given _datetime_ value, in UTC time.",
+ "utchours": r"Returns the hours component for the given _datetime_ value, in UTC time.",
+ "utcminutes": r"Returns the minutes component for the given _datetime_ value, in UTC time.",
+ "utcseconds": r"Returns the seconds component for the given _datetime_ value, in UTC time.",
+ "utcmilliseconds": r"Returns the milliseconds component for the given _datetime_ value, in UTC time.",
+ "extent": r"Returns a new _[min, max]_ array with the minimum and maximum values of the input array, ignoring `null`, `undefined`, and `NaN` values.",
+ "clampRange": r"Clamps a two-element _range_ array in a span-preserving manner. If the span of the input _range_ is less than _(max - min)_ and an endpoint exceeds either the _min_ or _max_ value, the range is translated such that the span is preserved and one endpoint touches the boundary of the _[min, max]_ range. If the span exceeds _(max - min)_, the range _[min, max]_ is returned.",
+ "indexof": r"Returns the first index of _value_ in the input _array_, or the first index of _substring_ in the input _string_..",
+ "inrange": r"Tests whether _value_ lies within (or is equal to either) the first and last values of the _range_ array.",
+ "join": r"Returns a new string by concatenating all of the elements of the input _array_, separated by commas or a specified _separator_ string.",
+ "lastindexof": r"Returns the last index of _value_ in the input _array_, or the last index of _substring_ in the input _string_..",
+ "length": r"Returns the length of the input _array_, or the length of the input _string_.",
+ "lerp": r"Returns the linearly interpolated value between the first and last entries in the _array_ for the provided interpolation _fraction_ (typically between 0 and 1). For example, `lerp([0, 50], 0.5)` returns 25.",
+ "peek": r"Returns the last element in the input _array_. Similar to the built-in `Array.pop` method, except that it does not remove the last element. This method is a convenient shorthand for `array[array.length - 1]`.",
+ "reverse": r"Returns a new array with elements in a reverse order of the input _array_. The first array element becomes the last, and the last array element becomes the first.",
+ "sequence": r"Returns an array containing an arithmetic sequence of numbers. If _step_ is omitted, it defaults to 1. If _start_ is omitted, it defaults to 0. The _stop_ value is exclusive; it is not included in the result. If _step_ is positive, the last element is the largest _start + i * step_ less than _stop_; if _step_ is negative, the last element is the smallest _start + i * step_ greater than _stop_. If the returned array would contain an infinite number of values, an empty range is returned. The arguments are not required to be integers.",
+ "slice": r"Returns a section of _array_ between the _start_ and _end_ indices. If the _end_ argument is negative, it is treated as an offset from the end of the array (_length(array) + end_).",
+ "span": r"Returns the span of _array_: the difference between the last and first elements, or _array[array.length-1] - array[0]_. Or if input is a string: a section of _string_ between the _start_ and _end_ indices. If the _end_ argument is negative, it is treated as an offset from the end of the string (_length(string) + end_)..",
+ "lower": r"Transforms _string_ to lower-case letters.",
+ "pad": r"Pads a _string_ value with repeated instances of a _character_ up to a specified _length_. If _character_ is not specified, a space (' ') is used. By default, padding is added to the end of a string. An optional _align_ parameter specifies if padding should be added to the `'left'` (beginning), `'center'`, or `'right'` (end) of the input string.",
+ "parseFloat": r"Parses the input _string_ to a floating-point value. Same as JavaScript's `parseFloat`.",
+ "parseInt": r"Parses the input _string_ to an integer value. Same as JavaScript's `parseInt`.",
+ "replace": r"Returns a new string with some or all matches of _pattern_ replaced by a _replacement_ string. The _pattern_ can be a string or a regular expression. If _pattern_ is a string, only the first instance will be replaced. Same as [JavaScript's String.replace](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace).",
+ "split": r"Returns an array of tokens created by splitting the input _string_ according to a provided _separator_ pattern. The result can optionally be constrained to return at most _limit_ tokens.",
+ "substring": r"Returns a section of _string_ between the _start_ and _end_ indices.",
+ "trim": r"Returns a trimmed string with preceding and trailing whitespace removed.",
+ "truncate": r"Truncates an input _string_ to a target _length_. The optional _align_ argument indicates what part of the string should be truncated: `'left'` (the beginning), `'center'`, or `'right'` (the end). By default, the `'right'` end of the string is truncated. The optional _ellipsis_ argument indicates the string to use to indicate truncated content; by default the ellipsis character `...` (`\\u2026`) is used.",
+ "upper": r"Transforms _string_ to upper-case letters.",
+ "merge": r"Merges the input objects _object1_, _object2_, etc into a new output object. Inputs are visited in sequential order, such that key values from later arguments can overwrite those from earlier arguments. Example: `merge({a:1, b:2}, {a:3}) -> {a:3, b:2}`.",
+ "dayFormat": r"Formats a (0-6) _weekday_ number as a full week day name, according to the current locale. For example: `dayFormat(0) -> \"Sunday\"`.",
+ "dayAbbrevFormat": r"Formats a (0-6) _weekday_ number as an abbreviated week day name, according to the current locale. For example: `dayAbbrevFormat(0) -> \"Sun\"`.",
+ "format": r"Formats a numeric _value_ as a string. The _specifier_ must be a valid [d3-format specifier](https://github.com/d3/d3-format/) (e.g., `format(value, ',.2f')`.",
+ "monthFormat": r"Formats a (zero-based) _month_ number as a full month name, according to the current locale. For example: `monthFormat(0) -> \"January\"`.",
+ "monthAbbrevFormat": r"Formats a (zero-based) _month_ number as an abbreviated month name, according to the current locale. For example: `monthAbbrevFormat(0) -> \"Jan\"`.",
+ "timeFormat": r"Formats a datetime _value_ (either a `Date` object or timestamp) as a string, according to the local time. The _specifier_ must be a valid [d3-time-format specifier](https://github.com/d3/d3-time-format/). For example: `timeFormat(timestamp, '%A')`.",
+ "timeParse": r"Parses a _string_ value to a Date object, according to the local time. The _specifier_ must be a valid [d3-time-format specifier](https://github.com/d3/d3-time-format/). For example: `timeParse('June 30, 2015', '%B %d, %Y')`.",
+ "utcFormat": r"Formats a datetime _value_ (either a `Date` object or timestamp) as a string, according to [UTC](https://en.wikipedia.org/wiki/Coordinated_Universal_Time) time. The _specifier_ must be a valid [d3-time-format specifier](https://github.com/d3/d3-time-format/). For example: `utcFormat(timestamp, '%A')`.",
+ "utcParse": r"Parses a _string_ value to a Date object, according to [UTC](https://en.wikipedia.org/wiki/Coordinated_Universal_Time) time. The _specifier_ must be a valid [d3-time-format specifier](https://github.com/d3/d3-time-format/). For example: `utcParse('June 30, 2015', '%B %d, %Y')`.",
+ "regexp": r"Creates a regular expression instance from an input _pattern_ string and optional _flags_. Same as [JavaScript's `RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp).",
+ "test": r"Evaluates a regular expression _regexp_ against the input _string_, returning `true` if the string matches the pattern, `false` otherwise. For example: `test(/\\d{3}/, \"32-21-9483\") -> true`.",
+ "rgb": r"Constructs a new [RGB](https://en.wikipedia.org/wiki/RGB_color_model) color. If _r_, _g_ and _b_ are specified, these represent the channel values of the returned color; an _opacity_ may also be specified. If a CSS Color Module Level 3 _specifier_ string is specified, it is parsed and then converted to the RGB color space. Uses [d3-color's rgb function](https://github.com/d3/d3-color#rgb).",
+ "hsl": r"Constructs a new [HSL](https://en.wikipedia.org/wiki/HSL_and_HSV) color. If _h_, _s_ and _l_ are specified, these represent the channel values of the returned color; an _opacity_ may also be specified. If a CSS Color Module Level 3 _specifier_ string is specified, it is parsed and then converted to the HSL color space. Uses [d3-color's hsl function](https://github.com/d3/d3-color#hsl).",
+ "lab": r"Constructs a new [CIE LAB](https://en.wikipedia.org/wiki/Lab_color_space#CIELAB) color. If _l_, _a_ and _b_ are specified, these represent the channel values of the returned color; an _opacity_ may also be specified. If a CSS Color Module Level 3 _specifier_ string is specified, it is parsed and then converted to the LAB color space. Uses [d3-color's lab function](https://github.com/d3/d3-color#lab).",
+ "hcl": r"Constructs a new [HCL](https://en.wikipedia.org/wiki/Lab_color_space#CIELAB) (hue, chroma, luminance) color. If _h_, _c_ and _l_ are specified, these represent the channel values of the returned color; an _opacity_ may also be specified. If a CSS Color Module Level 3 _specifier_ string is specified, it is parsed and then converted to the HCL color space. Uses [d3-color's hcl function](https://github.com/d3/d3-color#hcl).",
+ "item": r"Returns the current scenegraph item that is the target of the event.",
+ "group": r"Returns the scenegraph group mark item in which the current event has occurred. If no arguments are provided, the immediate parent group is returned. If a group name is provided, the matching ancestor group item is returned.",
+ "xy": r"Returns the x- and y-coordinates for the current event as a two-element array. If no arguments are provided, the top-level coordinate space of the view is used. If a scenegraph _item_ (or string group name) is provided, the coordinate space of the group item is used.",
+ "x": r"Returns the x coordinate for the current event. If no arguments are provided, the top-level coordinate space of the view is used. If a scenegraph _item_ (or string group name) is provided, the coordinate space of the group item is used.",
+ "y": r"Returns the y coordinate for the current event. If no arguments are provided, the top-level coordinate space of the view is used. If a scenegraph _item_ (or string group name) is provided, the coordinate space of the group item is used.",
+ "pinchDistance": r"Returns the pixel distance between the first two touch points of a multi-touch event.",
+ "pinchAngle": r"Returns the angle of the line connecting the first two touch points of a multi-touch event.",
+ "inScope": r"Returns true if the given scenegraph _item_ is a descendant of the group mark in which the event handler was defined, false otherwise.",
+ "data": r"Returns the array of data objects for the Vega data set with the given _name_. If the data set is not found, returns an empty array.",
+ "indata": r"Tests if the data set with a given _name_ contains a datum with a _field_ value that matches the input _value_. For example: `indata('table', 'category', value)`.",
+ "scale": r"Applies the named scale transform (or projection) to the specified _value_. The optional _group_ argument takes a scenegraph group mark item to indicate the specific scope in which to look up the scale or projection.",
+ "invert": r"Inverts the named scale transform (or projection) for the specified _value_. The optional _group_ argument takes a scenegraph group mark item to indicate the specific scope in which to look up the scale or projection.",
+ "copy": r"Returns a copy (a new cloned instance) of the named scale transform of projection, or `undefined` if no scale or projection is found. The optional _group_ argument takes a scenegraph group mark item to indicate the specific scope in which to look up the scale or projection.",
+ "domain": r"Returns the scale domain array for the named scale transform, or an empty array if the scale is not found. The optional _group_ argument takes a scenegraph group mark item to indicate the specific scope in which to look up the scale.",
+ "range": r"Returns the scale range array for the named scale transform, or an empty array if the scale is not found. The optional _group_ argument takes a scenegraph group mark item to indicate the specific scope in which to look up the scale.",
+ "bandwidth": r"Returns the current band width for the named band scale transform, or zero if the scale is not found or is not a band scale. The optional _group_ argument takes a scenegraph group mark item to indicate the specific scope in which to look up the scale.",
+ "bandspace": r"Returns the number of steps needed within a band scale, based on the _count_ of domain elements and the inner and outer padding values. While normally calculated within the scale itself, this function can be helpful for determining the size of a chart's layout.",
+ "gradient": r"Returns a linear color gradient for the _scale_ (whose range must be a [continuous color scheme](../schemes)) and starting and ending points _p0_ and _p1_, each an _[x, y]_ array. The points _p0_ and _p1_ should be expressed in normalized coordinates in the domain [0, 1], relative to the bounds of the item being colored. If unspecified, _p0_ defaults to `[0, 0]` and _p1_ defaults to `[1, 0]`, for a horizontal gradient that spans the full bounds of an item. The optional _count_ argument indicates a desired target number of sample points to take from the color scale.",
+ "panLinear": r"Given a linear scale _domain_ array with numeric or datetime values, returns a new two-element domain array that is the result of panning the domain by a fractional _delta_. The _delta_ value represents fractional units of the scale range; for example, `0.5` indicates panning the scale domain to the right by half the scale range.",
+ "panLog": r"Given a log scale _domain_ array with numeric or datetime values, returns a new two-element domain array that is the result of panning the domain by a fractional _delta_. The _delta_ value represents fractional units of the scale range; for example, `0.5` indicates panning the scale domain to the right by half the scale range.",
+ "panPow": r"Given a power scale _domain_ array with numeric or datetime values and the given _exponent_, returns a new two-element domain array that is the result of panning the domain by a fractional _delta_. The _delta_ value represents fractional units of the scale range; for example, `0.5` indicates panning the scale domain to the right by half the scale range.",
+ "panSymlog": r"Given a symmetric log scale _domain_ array with numeric or datetime values parameterized by the given _constant_, returns a new two-element domain array that is the result of panning the domain by a fractional _delta_. The _delta_ value represents fractional units of the scale range; for example, `0.5` indicates panning the scale domain to the right by half the scale range.",
+ "zoomLinear": r"Given a linear scale _domain_ array with numeric or datetime values, returns a new two-element domain array that is the result of zooming the domain by a _scaleFactor_, centered at the provided fractional _anchor_. The _anchor_ value represents the zoom position in terms of fractional units of the scale range; for example, `0.5` indicates a zoom centered on the mid-point of the scale range.",
+ "zoomLog": r"Given a log scale _domain_ array with numeric or datetime values, returns a new two-element domain array that is the result of zooming the domain by a _scaleFactor_, centered at the provided fractional _anchor_. The _anchor_ value represents the zoom position in terms of fractional units of the scale range; for example, `0.5` indicates a zoom centered on the mid-point of the scale range.",
+ "zoomPow": r"Given a power scale _domain_ array with numeric or datetime values and the given _exponent_, returns a new two-element domain array that is the result of zooming the domain by a _scaleFactor_, centered at the provided fractional _anchor_. The _anchor_ value represents the zoom position in terms of fractional units of the scale range; for example, `0.5` indicates a zoom centered on the mid-point of the scale range.",
+ "zoomSymlog": r"Given a symmetric log scale _domain_ array with numeric or datetime values parameterized by the given _constant_, returns a new two-element domain array that is the result of zooming the domain by a _scaleFactor_, centered at the provided fractional _anchor_. The _anchor_ value represents the zoom position in terms of fractional units of the scale range; for example, `0.5` indicates a zoom centered on the mid-point of the scale range.",
+ "geoArea": r"Returns the projected planar area (typically in square pixels) of a GeoJSON _feature_ according to the named _projection_. If the _projection_ argument is `null`, computes the spherical area in steradians using unprojected longitude, latitude coordinates. The optional _group_ argument takes a scenegraph group mark item to indicate the specific scope in which to look up the projection. Uses d3-geo's [geoArea](https://github.com/d3/d3-geo#geoArea) and [path.area](https://github.com/d3/d3-geo#path_area) methods.",
+ "geoBounds": r"Returns the projected planar bounding box (typically in pixels) for the specified GeoJSON _feature_, according to the named _projection_. The bounding box is represented by a two-dimensional array: [[_x0_, _y0_], [_x1_, _y1_]], where _x0_ is the minimum x-coordinate, _y0_ is the minimum y-coordinate, _x1_ is the maximum x-coordinate, and _y1_ is the maximum y-coordinate. If the _projection_ argument is `null`, computes the spherical bounding box using unprojected longitude, latitude coordinates. The optional _group_ argument takes a scenegraph group mark item to indicate the specific scope in which to look up the projection. Uses d3-geo's [geoBounds](https://github.com/d3/d3-geo#geoBounds) and [path.bounds](https://github.com/d3/d3-geo#path_bounds) methods.",
+ "geoCentroid": r"Returns the projected planar centroid (typically in pixels) for the specified GeoJSON _feature_, according to the named _projection_. If the _projection_ argument is `null`, computes the spherical centroid using unprojected longitude, latitude coordinates. The optional _group_ argument takes a scenegraph group mark item to indicate the specific scope in which to look up the projection. Uses d3-geo's [geoCentroid](https://github.com/d3/d3-geo#geoCentroid) and [path.centroid](https://github.com/d3/d3-geo#path_centroid) methods.",
+ "treePath": r"For the hierarchy data set with the given _name_, returns the shortest path through from the _source_ node id to the _target_ node id. The path starts at the _source_ node, ascends to the least common ancestor of the _source_ node and the _target_ node, and then descends to the _target_ node.",
+ "treeAncestors": r"For the hierarchy data set with the given _name_, returns the array of ancestors nodes, starting with the input _node_, then followed by each parent up to the root.",
+ "warn": r"Logs a warning message and returns the last argument. For the message to appear in the console, the visualization view must have the appropriate logging level set.",
+ "info": r"Logs an informative message and returns the last argument. For the message to appear in the console, the visualization view must have the appropriate logging level set.",
+ "debug": r"Logs a debugging message and returns the last argument. For the message to appear in the console, the visualization view must have the appropriate logging level set.",
+ "eventGroup": "returns the scenegraph group mark item within which the current event has occurred. If no arguments are provided, the immediate parent group is returned. If a group name is provided, the matching ancestor group item is returned.",
+ "eventItem": "a zero-argument function that returns the current scenegraph item that is the subject of the event.",
+ "eventX": "returns the x-coordinate for the current event. If no arguments are provided, the top-level coordinate space of the visualization is used. If a group name is provided, the coordinate-space of the matching ancestor group item is used.",
+ "eventY": "returns the y-coordinate for the current event. If no arguments are provided, the top-level coordinate space of the visualization is used. If a group name is provided, the coordinate-space of the matching ancestor group item is used.",
+ "iscale": 'applies an inverse scale transform to a specified value; by default, looks for the scale at the top-level of the specification, but an optional signal can also be supplied corresponding to the group which contains the scale (i.e., `iscale("x", val, group)`). *Note:* This function is only legal within signal stream handlers and mark [production rules](https://github.com/vega/vega/wiki/Marks#production-rules). Invoking this function elsewhere (e.g., with filter or formula transforms) will result in an error.',
+ "open": "opens a hyperlink (alias to `window.open`). This function is only valid when running in the browser. It should not be invoked within a server-side (e.g., node.js) environment.",
+}
+
+
+# This maps vega expression function names to the Python name
+NAME_MAP = {"if": "if_"}
+
+
+class ExprFunc(object):
+ def __init__(self, name, doc):
+ self.name = name
+ self.doc = doc
+ self.__doc__ = """{}(*args)\n {}""".format(name, doc)
+
+ def __call__(self, *args):
+ return FunctionExpression(self.name, args)
+
+ def __repr__(self):
+ return "<function expr.{}(*args)>".format(self.name)
+
+
+def _populate_namespace():
+ globals_ = globals()
+ for name, doc in FUNCTION_LISTING.items():
+ py_name = NAME_MAP.get(name, name)
+ globals_[py_name] = ExprFunc(name, doc)
+ yield py_name
+
+
+__all__ = list(_populate_namespace())
diff --git a/venv/lib/python3.9/site-packages/altair/expr/tests/__init__.py b/venv/lib/python3.9/site-packages/altair/expr/tests/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/expr/tests/__init__.py
diff --git a/venv/lib/python3.9/site-packages/altair/expr/tests/test_expr.py b/venv/lib/python3.9/site-packages/altair/expr/tests/test_expr.py
new file mode 100644
index 00000000..19265406
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/expr/tests/test_expr.py
@@ -0,0 +1,106 @@
+import operator
+
+import pytest
+
+from ... import expr
+from .. import datum
+
+
+def test_unary_operations():
+ OP_MAP = {"-": operator.neg, "+": operator.pos}
+ for op, func in OP_MAP.items():
+ z = func(datum.xxx)
+ assert repr(z) == "({}datum.xxx)".format(op)
+
+
+def test_binary_operations():
+ OP_MAP = {
+ "+": operator.add,
+ "-": operator.sub,
+ "*": operator.mul,
+ "/": operator.truediv,
+ "%": operator.mod,
+ "===": operator.eq,
+ "<": operator.lt,
+ "<=": operator.le,
+ ">": operator.gt,
+ ">=": operator.ge,
+ "!==": operator.ne,
+ "&&": operator.and_,
+ "||": operator.or_,
+ }
+ # When these are on the RHS, the opposite is evaluated instead.
+ INEQ_REVERSE = {
+ ">": "<",
+ "<": ">",
+ "<=": ">=",
+ ">=": "<=",
+ "===": "===",
+ "!==": "!==",
+ }
+ for op, func in OP_MAP.items():
+ z1 = func(datum.xxx, 2)
+ assert repr(z1) == "(datum.xxx {} 2)".format(op)
+
+ z2 = func(2, datum.xxx)
+ if op in INEQ_REVERSE:
+ assert repr(z2) == "(datum.xxx {} 2)".format(INEQ_REVERSE[op])
+ else:
+ assert repr(z2) == "(2 {} datum.xxx)".format(op)
+
+ z3 = func(datum.xxx, datum.yyy)
+ assert repr(z3) == "(datum.xxx {} datum.yyy)".format(op)
+
+
+def test_abs():
+ z = abs(datum.xxx)
+ assert repr(z) == "abs(datum.xxx)"
+
+
+def test_expr_funcs():
+ """test all functions defined in expr.funcs"""
+ name_map = {val: key for key, val in expr.funcs.NAME_MAP.items()}
+ for funcname in expr.funcs.__all__:
+ func = getattr(expr, funcname)
+ z = func(datum.xxx)
+ assert repr(z) == "{}(datum.xxx)".format(name_map.get(funcname, funcname))
+
+
+def test_expr_consts():
+ """Test all constants defined in expr.consts"""
+ name_map = {val: key for key, val in expr.consts.NAME_MAP.items()}
+ for constname in expr.consts.__all__:
+ const = getattr(expr, constname)
+ z = const * datum.xxx
+ assert repr(z) == "({} * datum.xxx)".format(name_map.get(constname, constname))
+
+
+def test_json_reprs():
+ """Test JSON representations of special values"""
+ assert repr(datum.xxx == None) == "(datum.xxx === null)" # noqa: E711
+ assert repr(datum.xxx == False) == "(datum.xxx === false)" # noqa: E712
+ assert repr(datum.xxx == True) == "(datum.xxx === true)" # noqa: E712
+
+
+def test_to_dict():
+ ex = datum.xxx * 2 > datum.yyy
+ assert ex.to_dict() == repr(ex)
+
+
+def test_copy():
+ ex = datum.xxx * 2 > abs(datum.yyy)
+ ex_copy = ex.copy()
+ assert ex.to_dict() == ex_copy.to_dict()
+
+
+def test_datum_getattr():
+ x = datum["foo"]
+ assert repr(x) == "datum['foo']"
+
+ with pytest.raises(AttributeError):
+ datum.__magic__
+
+
+def test_expression_getitem():
+ x = datum.foo[0]
+ assert repr(x) == "datum.foo[0]"
diff --git a/venv/lib/python3.9/site-packages/altair/sphinxext/__init__.py b/venv/lib/python3.9/site-packages/altair/sphinxext/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/sphinxext/__init__.py
diff --git a/venv/lib/python3.9/site-packages/altair/sphinxext/altairgallery.py b/venv/lib/python3.9/site-packages/altair/sphinxext/altairgallery.py
new file mode 100644
index 00000000..93090667
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/sphinxext/altairgallery.py
@@ -0,0 +1,311 @@
+import hashlib
+import os
+import json
+import random
+import collections
+from operator import itemgetter
+import warnings
+
+import jinja2
+
+from docutils import nodes
+from docutils.statemachine import ViewList
+from docutils.parsers.rst import Directive
+from docutils.parsers.rst.directives import flag
+
+from sphinx.util.nodes import nested_parse_with_titles
+
+from .utils import (
+ get_docstring_and_rest,
+ prev_this_next,
+ create_thumbnail,
+ create_generic_image,
+)
+from altair.utils.execeval import eval_block
+from altair.examples import iter_examples
+
+
+EXAMPLE_MODULE = "altair.examples"
+
+
+GALLERY_TEMPLATE = jinja2.Template(
+ """
+.. This document is auto-generated by the altair-gallery extension. Do not modify directly.
+
+.. _{{ gallery_ref }}:
+
+{{ title }}
+{% for char in title %}-{% endfor %}
+
+This gallery contains a selection of examples of the plots Altair can create.
+
+Some may seem fairly complicated at first glance, but they are built by combining a simple set of declarative building blocks.
+
+Many draw upon sample datasets compiled by the `Vega <https://vega.github.io/vega/>`_ project. To access them yourself, install `vega_datasets <https://github.com/altair-viz/vega_datasets>`_.
+
+.. code-block:: none
+
+ $ pip install vega_datasets
+
+{% for grouper, group in examples %}
+
+.. _gallery-category-{{ grouper }}:
+
+{{ grouper }}
+{% for char in grouper %}~{% endfor %}
+
+.. raw:: html
+
+ <span class="gallery">
+ {% for example in group %}
+ <a class="imagegroup" href="{{ example.name }}.html">
+ <span class="image" alt="{{ example.title }}" style="background-image: url({{ image_dir }}/{{ example.name }}-thumb.png);"></span>
+ <span class="image-title">{{ example.title }}</span>
+ </a>
+ {% endfor %}
+ </span>
+
+ <div style='clear:both;'></div>
+
+.. toctree::
+ :hidden:
+{% for example in group %}
+ {{ example.name }}
+{%- endfor %}
+
+{% endfor %}
+"""
+)
+
+MINIGALLERY_TEMPLATE = jinja2.Template(
+ """
+.. raw:: html
+
+ <div id="showcase">
+ <div class="examples">
+ {% for example in examples %}
+ <a class="preview" href="{{ gallery_dir }}/{{ example.name }}.html" style="background-image: url({{ image_dir }}/{{ example.name }}-thumb.png)"></a>
+ {% endfor %}
+ </div>
+ </div>
+"""
+)
+
+
+EXAMPLE_TEMPLATE = jinja2.Template(
+ """
+.. This document is auto-generated by the altair-gallery extension. Do not modify directly.
+
+.. _gallery_{{ name }}:
+
+{{ docstring }}
+
+.. altair-plot::
+ {% if code_below %}:code-below:{% endif %}
+
+ {{ code | indent(4) }}
+
+.. toctree::
+ :hidden:
+"""
+)
+
+
+def save_example_pngs(examples, image_dir, make_thumbnails=True):
+ """Save example pngs and (optionally) thumbnails"""
+ if not os.path.exists(image_dir):
+ os.makedirs(image_dir)
+
+ # store hashes so that we know whether images need to be generated
+ hash_file = os.path.join(image_dir, "_image_hashes.json")
+
+ if os.path.exists(hash_file):
+ with open(hash_file) as f:
+ hashes = json.load(f)
+ else:
+ hashes = {}
+
+ for example in examples:
+ filename = example["name"] + ".png"
+ image_file = os.path.join(image_dir, filename)
+
+ example_hash = hashlib.md5(example["code"].encode()).hexdigest()
+ hashes_match = hashes.get(filename, "") == example_hash
+
+ if hashes_match and os.path.exists(image_file):
+ print("-> using cached {}".format(image_file))
+ else:
+ # the file changed or the image file does not exist. Generate it.
+ print("-> saving {}".format(image_file))
+ chart = eval_block(example["code"])
+ try:
+ chart.save(image_file)
+ hashes[filename] = example_hash
+ except ImportError:
+ warnings.warn("Unable to save image: using generic image")
+ create_generic_image(image_file)
+
+ with open(hash_file, "w") as f:
+ json.dump(hashes, f)
+
+ if make_thumbnails:
+ params = example.get("galleryParameters", {})
+ thumb_file = os.path.join(image_dir, example["name"] + "-thumb.png")
+ create_thumbnail(image_file, thumb_file, **params)
+
+ # Save hashes so we know whether we need to re-generate plots
+ with open(hash_file, "w") as f:
+ json.dump(hashes, f)
+
+
+def populate_examples(**kwds):
+ """Iterate through Altair examples and extract code"""
+
+ examples = sorted(iter_examples(), key=itemgetter("name"))
+
+ for example in examples:
+ docstring, category, code, lineno = get_docstring_and_rest(example["filename"])
+ example.update(kwds)
+ if category is None:
+ category = "other charts"
+ example.update(
+ {
+ "docstring": docstring,
+ "title": docstring.strip().split("\n")[0],
+ "code": code,
+ "category": category.title(),
+ "lineno": lineno,
+ }
+ )
+
+ return examples
+
+
+class AltairMiniGalleryDirective(Directive):
+ has_content = False
+
+ option_spec = {
+ "size": int,
+ "names": str,
+ "indices": lambda x: list(map(int, x.split())),
+ "shuffle": flag,
+ "seed": int,
+ "titles": bool,
+ "width": str,
+ }
+
+ def run(self):
+ size = self.options.get("size", 15)
+ names = [name.strip() for name in self.options.get("names", "").split(",")]
+ indices = self.options.get("indices", [])
+ shuffle = "shuffle" in self.options
+ seed = self.options.get("seed", 42)
+ titles = self.options.get("titles", False)
+ width = self.options.get("width", None)
+
+ env = self.state.document.settings.env
+ app = env.app
+
+ gallery_dir = app.builder.config.altair_gallery_dir
+
+ examples = populate_examples()
+
+ if names:
+ if len(names) < size:
+ raise ValueError(
+ "altair-minigallery: if names are specified, "
+ "the list must be at least as long as size."
+ )
+ mapping = {example["name"]: example for example in examples}
+ examples = [mapping[name] for name in names]
+ else:
+ if indices:
+ examples = [examples[i] for i in indices]
+ if shuffle:
+ random.seed(seed)
+ random.shuffle(examples)
+ if size:
+ examples = examples[:size]
+
+ include = MINIGALLERY_TEMPLATE.render(
+ image_dir="/_static",
+ gallery_dir=gallery_dir,
+ examples=examples,
+ titles=titles,
+ width=width,
+ )
+
+ # parse and return documentation
+ result = ViewList()
+ for line in include.split("\n"):
+ result.append(line, "<altair-minigallery>")
+ node = nodes.paragraph()
+ node.document = self.state.document
+ nested_parse_with_titles(self.state, result, node)
+
+ return node.children
+
+
+def main(app):
+ gallery_dir = app.builder.config.altair_gallery_dir
+ target_dir = os.path.join(app.builder.srcdir, gallery_dir)
+ image_dir = os.path.join(app.builder.srcdir, "_images")
+
+ gallery_ref = app.builder.config.altair_gallery_ref
+ gallery_title = app.builder.config.altair_gallery_title
+ examples = populate_examples(gallery_ref=gallery_ref, code_below=True)
+
+ if not os.path.exists(target_dir):
+ os.makedirs(target_dir)
+
+ examples = sorted(examples, key=lambda x: x["title"])
+ examples_toc = collections.OrderedDict(
+ {
+ "Simple Charts": [],
+ "Bar Charts": [],
+ "Line Charts": [],
+ "Area Charts": [],
+ "Circular Plots": [],
+ "Scatter Plots": [],
+ "Histograms": [],
+ "Maps": [],
+ "Interactive Charts": [],
+ "Case Studies": [],
+ "Other Charts": [],
+ }
+ )
+ for d in examples:
+ examples_toc[d["category"]].append(d)
+
+ # Write the gallery index file
+ with open(os.path.join(target_dir, "index.rst"), "w") as f:
+ f.write(
+ GALLERY_TEMPLATE.render(
+ title=gallery_title,
+ examples=examples_toc.items(),
+ image_dir="/_static",
+ gallery_ref=gallery_ref,
+ )
+ )
+
+ # save the images to file
+ save_example_pngs(examples, image_dir)
+
+ # Write the individual example files
+ for prev_ex, example, next_ex in prev_this_next(examples):
+ if prev_ex:
+ example["prev_ref"] = "gallery_{name}".format(**prev_ex)
+ if next_ex:
+ example["next_ref"] = "gallery_{name}".format(**next_ex)
+ target_filename = os.path.join(target_dir, example["name"] + ".rst")
+ with open(os.path.join(target_filename), "w", encoding="utf-8") as f:
+ f.write(EXAMPLE_TEMPLATE.render(example))
+
+
+def setup(app):
+ app.connect("builder-inited", main)
+ app.add_css_file("altair-gallery.css")
+ app.add_config_value("altair_gallery_dir", "gallery", "env")
+ app.add_config_value("altair_gallery_ref", "example-gallery", "env")
+ app.add_config_value("altair_gallery_title", "Example Gallery", "env")
+ app.add_directive_to_domain("py", "altair-minigallery", AltairMiniGalleryDirective)
diff --git a/venv/lib/python3.9/site-packages/altair/sphinxext/altairplot.py b/venv/lib/python3.9/site-packages/altair/sphinxext/altairplot.py
new file mode 100644
index 00000000..b6e3f533
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/sphinxext/altairplot.py
@@ -0,0 +1,341 @@
+"""
+Altair Plot Sphinx Extension
+============================
+
+This extension provides a means of inserting live-rendered Altair plots within
+sphinx documentation. There are two directives defined: ``altair-setup`` and
+``altair-plot``. ``altair-setup`` code is used to set-up various options
+prior to running the plot code. For example::
+
+ .. altair-plot::
+ :output: none
+
+ from altair import *
+ import pandas as pd
+ data = pd.DataFrame({'a': list('CCCDDDEEE'),
+ 'b': [2, 7, 4, 1, 2, 6, 8, 4, 7]})
+
+ .. altair-plot::
+
+ Chart(data).mark_point().encode(
+ x='a',
+ y='b'
+ )
+
+In the case of the ``altair-plot`` code, the *last statement* of the code-block
+should contain the chart object you wish to be rendered.
+
+Options
+-------
+The directives have the following options::
+
+ .. altair-plot::
+ :namespace: # specify a plotting namespace that is persistent within the doc
+ :hide-code: # if set, then hide the code and only show the plot
+ :code-below: # if set, then code is below rather than above the figure
+ :output: [plot|repr|stdout|none]
+ :alt: text # Alternate text when plot cannot be rendered
+ :links: editor source export # specify one or more of these options
+ :chart-var-name: chart # name of variable in namespace containing output
+
+
+Additionally, this extension introduces a global configuration
+``altairplot_links``, set in your ``conf.py`` which is a dictionary
+of links that will appear below plots, unless the ``:links:`` option
+again overrides it. It should look something like this::
+
+ # conf.py
+ # ...
+ altairplot_links = {'editor': True, 'source': True, 'export': True}
+ # ...
+
+If this configuration is not specified, all are set to True.
+"""
+
+import contextlib
+import io
+import os
+import json
+import warnings
+
+import jinja2
+
+from docutils import nodes
+from docutils.parsers.rst import Directive
+from docutils.parsers.rst.directives import flag, unchanged
+
+from sphinx.locale import _
+
+import altair as alt
+from altair.utils.execeval import eval_block
+
+# These default URLs can be changed in conf.py; see setup() below.
+VEGA_JS_URL_DEFAULT = "https://cdn.jsdelivr.net/npm/vega@{}".format(alt.VEGA_VERSION)
+VEGALITE_JS_URL_DEFAULT = "https://cdn.jsdelivr.net/npm/vega-lite@{}".format(
+ alt.VEGALITE_VERSION
+)
+VEGAEMBED_JS_URL_DEFAULT = "https://cdn.jsdelivr.net/npm/vega-embed@{}".format(
+ alt.VEGAEMBED_VERSION
+)
+
+
+VGL_TEMPLATE = jinja2.Template(
+ """
+<div id="{{ div_id }}">
+<script>
+ // embed when document is loaded, to ensure vega library is available
+ // this works on all modern browsers, except IE8 and older
+ document.addEventListener("DOMContentLoaded", function(event) {
+ var spec = {{ spec }};
+ var opt = {
+ "mode": "{{ mode }}",
+ "renderer": "{{ renderer }}",
+ "actions": {{ actions}}
+ };
+ vegaEmbed('#{{ div_id }}', spec, opt).catch(console.err);
+ });
+</script>
+</div>
+"""
+)
+
+
+class altair_plot(nodes.General, nodes.Element):
+ pass
+
+
+def purge_altair_namespaces(app, env, docname):
+ if not hasattr(env, "_altair_namespaces"):
+ return
+ env._altair_namespaces.pop(docname, {})
+
+
+DEFAULT_ALTAIRPLOT_LINKS = {"editor": True, "source": True, "export": True}
+
+
+def validate_links(links):
+ if links.strip().lower() == "none":
+ return False
+
+ links = links.strip().split()
+ diff = set(links) - set(DEFAULT_ALTAIRPLOT_LINKS.keys())
+ if diff:
+ raise ValueError("Following links are invalid: {}".format(list(diff)))
+ return {link: link in links for link in DEFAULT_ALTAIRPLOT_LINKS}
+
+
+def validate_output(output):
+ output = output.strip().lower()
+ if output not in ["plot", "repr", "stdout", "none"]:
+ raise ValueError(":output: flag must be one of [plot|repr|stdout|none]")
+ return output
+
+
+class AltairPlotDirective(Directive):
+ has_content = True
+
+ option_spec = {
+ "hide-code": flag,
+ "code-below": flag,
+ "namespace": unchanged,
+ "output": validate_output,
+ "alt": unchanged,
+ "links": validate_links,
+ "chart-var-name": unchanged,
+ }
+
+ def run(self):
+ env = self.state.document.settings.env
+ app = env.app
+
+ show_code = "hide-code" not in self.options
+ code_below = "code-below" in self.options
+
+ if not hasattr(env, "_altair_namespaces"):
+ env._altair_namespaces = {}
+ namespace_id = self.options.get("namespace", "default")
+ namespace = env._altair_namespaces.setdefault(env.docname, {}).setdefault(
+ namespace_id, {}
+ )
+
+ code = "\n".join(self.content)
+
+ if show_code:
+ source_literal = nodes.literal_block(code, code)
+ source_literal["language"] = "python"
+
+ # get the name of the source file we are currently processing
+ rst_source = self.state_machine.document["source"]
+ rst_dir = os.path.dirname(rst_source)
+ rst_filename = os.path.basename(rst_source)
+
+ # use the source file name to construct a friendly target_id
+ serialno = env.new_serialno("altair-plot")
+ rst_base = rst_filename.replace(".", "-")
+ div_id = "{}-altair-plot-{}".format(rst_base, serialno)
+ target_id = "{}-altair-source-{}".format(rst_base, serialno)
+ target_node = nodes.target("", "", ids=[target_id])
+
+ # create the node in which the plot will appear;
+ # this will be processed by html_visit_altair_plot
+ plot_node = altair_plot()
+ plot_node["target_id"] = target_id
+ plot_node["div_id"] = div_id
+ plot_node["code"] = code
+ plot_node["namespace"] = namespace
+ plot_node["relpath"] = os.path.relpath(rst_dir, env.srcdir)
+ plot_node["rst_source"] = rst_source
+ plot_node["rst_lineno"] = self.lineno
+ plot_node["links"] = self.options.get(
+ "links", app.builder.config.altairplot_links
+ )
+ plot_node["output"] = self.options.get("output", "plot")
+ plot_node["chart-var-name"] = self.options.get("chart-var-name", None)
+
+ if "alt" in self.options:
+ plot_node["alt"] = self.options["alt"]
+
+ result = [target_node]
+
+ if code_below:
+ result += [plot_node]
+ if show_code:
+ result += [source_literal]
+ if not code_below:
+ result += [plot_node]
+
+ return result
+
+
+def html_visit_altair_plot(self, node):
+ # Execute the code, saving output and namespace
+ namespace = node["namespace"]
+ try:
+ f = io.StringIO()
+ with contextlib.redirect_stdout(f):
+ chart = eval_block(node["code"], namespace)
+ stdout = f.getvalue()
+ except Exception as e:
+ warnings.warn(
+ "altair-plot: {}:{} Code Execution failed:"
+ "{}: {}".format(
+ node["rst_source"], node["rst_lineno"], e.__class__.__name__, str(e)
+ )
+ )
+ raise nodes.SkipNode
+
+ chart_name = node["chart-var-name"]
+ if chart_name is not None:
+ if chart_name not in namespace:
+ raise ValueError(
+ "chart-var-name='{}' not present in namespace" "".format(chart_name)
+ )
+ chart = namespace[chart_name]
+
+ output = node["output"]
+
+ if output == "none":
+ raise nodes.SkipNode
+ elif output == "stdout":
+ if not stdout:
+ raise nodes.SkipNode
+ else:
+ output_literal = nodes.literal_block(stdout, stdout)
+ output_literal["language"] = "none"
+ node.extend([output_literal])
+ elif output == "repr":
+ if chart is None:
+ raise nodes.SkipNode
+ else:
+ rep = " " + repr(chart).replace("\n", "\n ")
+ repr_literal = nodes.literal_block(rep, rep)
+ repr_literal["language"] = "none"
+ node.extend([repr_literal])
+ elif output == "plot":
+ if isinstance(chart, alt.TopLevelMixin):
+ # Last line should be a chart; convert to spec dict
+ try:
+ spec = chart.to_dict()
+ except alt.utils.schemapi.SchemaValidationError:
+ raise ValueError("Invalid chart: {0}".format(node["code"]))
+ actions = node["links"]
+
+ # TODO: add an option to save spects to file & load from there.
+ # TODO: add renderer option
+
+ # Write spec to a *.vl.json file
+ # dest_dir = os.path.join(self.builder.outdir, node['relpath'])
+ # if not os.path.exists(dest_dir):
+ # os.makedirs(dest_dir)
+ # filename = "{0}.vl.json".format(node['target_id'])
+ # dest_path = os.path.join(dest_dir, filename)
+ # with open(dest_path, 'w') as f:
+ # json.dump(spec, f)
+
+ # Pass relevant info into the template and append to the output
+ html = VGL_TEMPLATE.render(
+ div_id=node["div_id"],
+ spec=json.dumps(spec),
+ mode="vega-lite",
+ renderer="canvas",
+ actions=json.dumps(actions),
+ )
+ self.body.append(html)
+ else:
+ warnings.warn(
+ "altair-plot: {}:{} Malformed block. Last line of "
+ "code block should define a valid altair Chart object."
+ "".format(node["rst_source"], node["rst_lineno"])
+ )
+ raise nodes.SkipNode
+
+
+def generic_visit_altair_plot(self, node):
+ # TODO: generate PNGs and insert them here
+ if "alt" in node.attributes:
+ self.body.append(_("[ graph: %s ]") % node["alt"])
+ else:
+ self.body.append(_("[ graph ]"))
+ raise nodes.SkipNode
+
+
+def depart_altair_plot(self, node):
+ return
+
+
+def builder_inited(app):
+ app.add_js_file(app.config.altairplot_vega_js_url)
+ app.add_js_file(app.config.altairplot_vegalite_js_url)
+ app.add_js_file(app.config.altairplot_vegaembed_js_url)
+
+
+def setup(app):
+ setup.app = app
+ setup.config = app.config
+ setup.confdir = app.confdir
+
+ app.add_config_value("altairplot_links", DEFAULT_ALTAIRPLOT_LINKS, "env")
+
+ app.add_config_value("altairplot_vega_js_url", VEGA_JS_URL_DEFAULT, "html")
+ app.add_config_value("altairplot_vegalite_js_url", VEGALITE_JS_URL_DEFAULT, "html")
+ app.add_config_value(
+ "altairplot_vegaembed_js_url", VEGAEMBED_JS_URL_DEFAULT, "html"
+ )
+
+ app.add_directive("altair-plot", AltairPlotDirective)
+
+ app.add_css_file("altair-plot.css")
+
+ app.add_node(
+ altair_plot,
+ html=(html_visit_altair_plot, depart_altair_plot),
+ latex=(generic_visit_altair_plot, depart_altair_plot),
+ texinfo=(generic_visit_altair_plot, depart_altair_plot),
+ text=(generic_visit_altair_plot, depart_altair_plot),
+ man=(generic_visit_altair_plot, depart_altair_plot),
+ )
+
+ app.connect("env-purge-doc", purge_altair_namespaces)
+ app.connect("builder-inited", builder_inited)
+
+ return {"version": "0.1"}
diff --git a/venv/lib/python3.9/site-packages/altair/sphinxext/schematable.py b/venv/lib/python3.9/site-packages/altair/sphinxext/schematable.py
new file mode 100644
index 00000000..880e7e19
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/sphinxext/schematable.py
@@ -0,0 +1,195 @@
+import importlib
+import warnings
+import re
+
+from docutils.parsers.rst import Directive
+from docutils import nodes, utils
+from sphinx import addnodes
+from recommonmark.parser import CommonMarkParser
+
+
+def type_description(schema):
+ """Return a concise type description for the given schema"""
+ if not schema or not isinstance(schema, dict) or schema.keys() == {"description"}:
+ return "any"
+ elif "$ref" in schema:
+ return ":class:`{}`".format(schema["$ref"].split("/")[-1])
+ elif "enum" in schema:
+ return "[{}]".format(", ".join(repr(s) for s in schema["enum"]))
+ elif "type" in schema:
+ if isinstance(schema["type"], list):
+ return "[{}]".format(", ".join(schema["type"]))
+ elif schema["type"] == "array":
+ return "array({})".format(type_description(schema.get("items", {})))
+ elif schema["type"] == "object":
+ return "dict"
+ else:
+ return "`{}`".format(schema["type"])
+ elif "anyOf" in schema:
+ return "anyOf({})".format(
+ ", ".join(type_description(s) for s in schema["anyOf"])
+ )
+ else:
+ warnings.warn(
+ "cannot infer type for schema with keys {}" "".format(schema.keys())
+ )
+ return "--"
+
+
+def prepare_table_header(titles, widths):
+ """Build docutil empty table"""
+ ncols = len(titles)
+ assert len(widths) == ncols
+
+ tgroup = nodes.tgroup(cols=ncols)
+ for width in widths:
+ tgroup += nodes.colspec(colwidth=width)
+ header = nodes.row()
+ for title in titles:
+ header += nodes.entry("", nodes.paragraph(text=title))
+ tgroup += nodes.thead("", header)
+
+ tbody = nodes.tbody()
+ tgroup += tbody
+
+ return nodes.table("", tgroup), tbody
+
+
+reClassDef = re.compile(r":class:`([^`]+)`")
+reCode = re.compile(r"`([^`]+)`")
+
+
+def add_class_def(node, classDef):
+ """Add reference on classDef to node"""
+
+ ref = addnodes.pending_xref(
+ reftarget=classDef,
+ reftype="class",
+ refdomain="py", # py:class="None" py:module="altair" refdoc="user_guide/marks"
+ refexplicit=False,
+ # refdoc="",
+ refwarn=False,
+ )
+ ref["py:class"] = "None"
+ ref["py:module"] = "altair"
+
+ ref += nodes.literal(text=classDef, classes=["xref", "py", "py-class"])
+ node += ref
+ return node
+
+
+def add_text(node, text):
+ """Add text with inline code to node"""
+ is_text = True
+ for part in reCode.split(text):
+ if part:
+ if is_text:
+ node += nodes.Text(part, part)
+ else:
+ node += nodes.literal(part, part)
+
+ is_text = not is_text
+
+ return node
+
+
+def build_row(item):
+ """Return nodes.row with property description"""
+
+ prop, propschema, required = item
+ row = nodes.row()
+
+ # Property
+
+ row += nodes.entry("", nodes.paragraph(text=prop), classes=["vl-prop"])
+
+ # Type
+ str_type = type_description(propschema)
+ par_type = nodes.paragraph()
+
+ is_text = True
+ for part in reClassDef.split(str_type):
+ if part:
+ if is_text:
+ add_text(par_type, part)
+ else:
+ add_class_def(par_type, part)
+ is_text = not is_text
+
+ # row += nodes.entry('')
+ row += nodes.entry("", par_type) # , classes=["vl-type-def"]
+
+ # Description
+ md_parser = CommonMarkParser()
+ # str_descr = "***Required.*** " if required else ""
+ str_descr = ""
+ str_descr += propschema.get("description", " ")
+ doc_descr = utils.new_document("schema_description")
+ md_parser.parse(str_descr, doc_descr)
+
+ # row += nodes.entry('', *doc_descr.children, classes="vl-decsr")
+ row += nodes.entry("", *doc_descr.children, classes=["vl-decsr"])
+
+ return row
+
+
+def build_schema_tabel(items):
+ """Return schema table of items (iterator of prop, schema.item, requred)"""
+ table, tbody = prepare_table_header(
+ ["Property", "Type", "Description"], [10, 20, 50]
+ )
+ for item in items:
+ tbody += build_row(item)
+
+ return table
+
+
+def select_items_from_schema(schema, props=None):
+ """Return iterator (prop, schema.item, requred) on prop, return all in None"""
+ properties = schema.get("properties", {})
+ required = schema.get("required", [])
+ if not props:
+ for prop, item in properties.items():
+ yield prop, item, prop in required
+ else:
+ for prop in props:
+ try:
+ yield prop, properties[prop], prop in required
+ except KeyError:
+ warnings.warn("Can't find property:", prop)
+
+
+def prepare_schema_tabel(schema, props=None):
+
+ items = select_items_from_schema(schema, props)
+ return build_schema_tabel(items)
+
+
+class AltairObjectTableDirective(Directive):
+ """
+ Directive for building a table of attribute descriptions.
+
+ Usage:
+
+ .. altair-object-table:: altair.MarkConfig
+
+ """
+
+ has_content = False
+ required_arguments = 1
+
+ def run(self):
+
+ objectname = self.arguments[0]
+ modname, classname = objectname.rsplit(".", 1)
+ module = importlib.import_module(modname)
+ cls = getattr(module, classname)
+ schema = cls.resolve_references(cls._schema)
+
+ # create the table from the object
+ table = prepare_schema_tabel(schema)
+ return [table]
+
+
+def setup(app):
+ app.add_directive("altair-object-table", AltairObjectTableDirective)
diff --git a/venv/lib/python3.9/site-packages/altair/sphinxext/utils.py b/venv/lib/python3.9/site-packages/altair/sphinxext/utils.py
new file mode 100644
index 00000000..44b5074b
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/sphinxext/utils.py
@@ -0,0 +1,199 @@
+import ast
+import hashlib
+import itertools
+import json
+import re
+
+
+def create_thumbnail(image_filename, thumb_filename, window_size=(280, 160)):
+ """Create a thumbnail whose shortest dimension matches the window"""
+ from PIL import Image
+
+ im = Image.open(image_filename)
+ im_width, im_height = im.size
+ width, height = window_size
+
+ width_factor, height_factor = width / im_width, height / im_height
+
+ if width_factor > height_factor:
+ final_width = width
+ final_height = int(im_height * width_factor)
+ else:
+ final_height = height
+ final_width = int(im_width * height_factor)
+
+ thumb = im.resize((final_width, final_height), Image.ANTIALIAS)
+ thumb.save(thumb_filename)
+
+
+def create_generic_image(filename, shape=(200, 300), gradient=True):
+ """Create a generic image"""
+ from PIL import Image
+ import numpy as np
+
+ assert len(shape) == 2
+
+ arr = np.zeros((shape[0], shape[1], 3))
+ if gradient:
+ # gradient from gray to white
+ arr += np.linspace(128, 255, shape[1])[:, None]
+ im = Image.fromarray(arr.astype("uint8"))
+ im.save(filename)
+
+
+SYNTAX_ERROR_DOCSTRING = """
+SyntaxError
+===========
+Example script with invalid Python syntax
+"""
+
+
+def _parse_source_file(filename):
+ """Parse source file into AST node
+
+ Parameters
+ ----------
+ filename : str
+ File path
+
+ Returns
+ -------
+ node : AST node
+ content : utf-8 encoded string
+
+ Notes
+ -----
+ This function adapted from the sphinx-gallery project; license: BSD-3
+ https://github.com/sphinx-gallery/sphinx-gallery/
+ """
+
+ with open(filename, "r", encoding="utf-8") as fid:
+ content = fid.read()
+ # change from Windows format to UNIX for uniformity
+ content = content.replace("\r\n", "\n")
+
+ try:
+ node = ast.parse(content)
+ except SyntaxError:
+ node = None
+ return node, content
+
+
+def get_docstring_and_rest(filename):
+ """Separate ``filename`` content between docstring and the rest
+
+ Strongly inspired from ast.get_docstring.
+
+ Parameters
+ ----------
+ filename: str
+ The path to the file containing the code to be read
+
+ Returns
+ -------
+ docstring: str
+ docstring of ``filename``
+ category: list
+ list of categories specified by the "# category:" comment
+ rest: str
+ ``filename`` content without the docstring
+ lineno: int
+ the line number on which the code starts
+
+ Notes
+ -----
+ This function adapted from the sphinx-gallery project; license: BSD-3
+ https://github.com/sphinx-gallery/sphinx-gallery/
+ """
+ node, content = _parse_source_file(filename)
+
+ # Find the category comment
+ find_category = re.compile(r"^#\s*category:\s*(.*)$", re.MULTILINE)
+ match = find_category.search(content)
+ if match is not None:
+ category = match.groups()[0]
+ # remove this comment from the content
+ content = find_category.sub("", content)
+ else:
+ category = None
+
+ if node is None:
+ return SYNTAX_ERROR_DOCSTRING, category, content, 1
+
+ if not isinstance(node, ast.Module):
+ raise TypeError(
+ "This function only supports modules. "
+ "You provided {}".format(node.__class__.__name__)
+ )
+ try:
+ # In python 3.7 module knows its docstring.
+ # Everything else will raise an attribute error
+ docstring = node.docstring
+
+ import tokenize
+ from io import BytesIO
+
+ ts = tokenize.tokenize(BytesIO(content).readline)
+ ds_lines = 0
+ # find the first string according to the tokenizer and get
+ # it's end row
+ for tk in ts:
+ if tk.exact_type == 3:
+ ds_lines, _ = tk.end
+ break
+ # grab the rest of the file
+ rest = "\n".join(content.split("\n")[ds_lines:])
+ lineno = ds_lines + 1
+
+ except AttributeError:
+ # this block can be removed when python 3.6 support is dropped
+ if (
+ node.body
+ and isinstance(node.body[0], ast.Expr)
+ and isinstance(node.body[0].value, (ast.Str, ast.Constant))
+ ):
+ docstring_node = node.body[0]
+ docstring = docstring_node.value.s
+ # python2.7: Code was read in bytes needs decoding to utf-8
+ # unless future unicode_literals is imported in source which
+ # make ast output unicode strings
+ if hasattr(docstring, "decode") and not isinstance(docstring, str):
+ docstring = docstring.decode("utf-8")
+ # python3.8: has end_lineno
+ lineno = (
+ getattr(docstring_node, "end_lineno", None) or docstring_node.lineno
+ ) # The last line of the string.
+ # This get the content of the file after the docstring last line
+ # Note: 'maxsplit' argument is not a keyword argument in python2
+ rest = content.split("\n", lineno)[-1]
+ lineno += 1
+ else:
+ docstring, rest = "", ""
+
+ if not docstring:
+ raise ValueError(
+ (
+ 'Could not find docstring in file "{0}". '
+ "A docstring is required for the example gallery."
+ ).format(filename)
+ )
+ return docstring, category, rest, lineno
+
+
+def prev_this_next(it, sentinel=None):
+ """Utility to return (prev, this, next) tuples from an iterator"""
+ i1, i2, i3 = itertools.tee(it, 3)
+ next(i3, None)
+ return zip(itertools.chain([sentinel], i1), i2, itertools.chain(i3, [sentinel]))
+
+
+def dict_hash(dct):
+ """Return a hash of the contents of a dictionary"""
+ serialized = json.dumps(dct, sort_keys=True)
+
+ try:
+ m = hashlib.md5(serialized)
+ except TypeError:
+ m = hashlib.md5(serialized.encode())
+
+ return m.hexdigest()
diff --git a/venv/lib/python3.9/site-packages/altair/tests/__init__.py b/venv/lib/python3.9/site-packages/altair/tests/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/tests/__init__.py
diff --git a/venv/lib/python3.9/site-packages/altair/tests/test_magics.py b/venv/lib/python3.9/site-packages/altair/tests/test_magics.py
new file mode 100644
index 00000000..59ddff11
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/tests/test_magics.py
@@ -0,0 +1,176 @@
+import json
+import pytest
+
+try:
+ from IPython import InteractiveShell
+
+ IPYTHON_AVAILABLE = True
+except ImportError:
+ IPYTHON_AVAILABLE = False
+ pass
+
+from altair.vegalite.v4 import VegaLite
+from altair.vega.v5 import Vega
+
+
+DATA_RECORDS = [
+ {"amount": 28, "category": "A"},
+ {"amount": 55, "category": "B"},
+ {"amount": 43, "category": "C"},
+ {"amount": 91, "category": "D"},
+ {"amount": 81, "category": "E"},
+ {"amount": 53, "category": "F"},
+ {"amount": 19, "category": "G"},
+ {"amount": 87, "category": "H"},
+]
+
+if IPYTHON_AVAILABLE:
+ _ipshell = InteractiveShell.instance()
+ _ipshell.run_cell("%load_ext altair")
+ _ipshell.run_cell(
+ """
+import pandas as pd
+table = pd.DataFrame.from_records({})
+the_data = table
+""".format(
+ DATA_RECORDS
+ )
+ )
+
+
+VEGA_SPEC = {
+ "$schema": "https://vega.github.io/schema/vega/v5.json",
+ "axes": [
+ {"orient": "bottom", "scale": "xscale"},
+ {"orient": "left", "scale": "yscale"},
+ ],
+ "data": [{"name": "table", "values": DATA_RECORDS}],
+ "height": 200,
+ "marks": [
+ {
+ "encode": {
+ "enter": {
+ "width": {"band": 1, "scale": "xscale"},
+ "x": {"field": "category", "scale": "xscale"},
+ "y": {"field": "amount", "scale": "yscale"},
+ "y2": {"scale": "yscale", "value": 0},
+ },
+ "hover": {"fill": {"value": "red"}},
+ "update": {"fill": {"value": "steelblue"}},
+ },
+ "from": {"data": "table"},
+ "type": "rect",
+ },
+ {
+ "encode": {
+ "enter": {
+ "align": {"value": "center"},
+ "baseline": {"value": "bottom"},
+ "fill": {"value": "#333"},
+ },
+ "update": {
+ "fillOpacity": [
+ {"test": "datum === tooltip", "value": 0},
+ {"value": 1},
+ ],
+ "text": {"signal": "tooltip.amount"},
+ "x": {"band": 0.5, "scale": "xscale", "signal": "tooltip.category"},
+ "y": {"offset": -2, "scale": "yscale", "signal": "tooltip.amount"},
+ },
+ },
+ "type": "text",
+ },
+ ],
+ "padding": 5,
+ "scales": [
+ {
+ "domain": {"data": "table", "field": "category"},
+ "name": "xscale",
+ "padding": 0.05,
+ "range": "width",
+ "round": True,
+ "type": "band",
+ },
+ {
+ "domain": {"data": "table", "field": "amount"},
+ "name": "yscale",
+ "nice": True,
+ "range": "height",
+ },
+ ],
+ "signals": [
+ {
+ "name": "tooltip",
+ "on": [
+ {"events": "rect:mouseover", "update": "datum"},
+ {"events": "rect:mouseout", "update": "{}"},
+ ],
+ "value": {},
+ }
+ ],
+ "width": 400,
+}
+
+
+VEGALITE_SPEC = {
+ "$schema": "https://vega.github.io/schema/vega-lite/v4.json",
+ "data": {"values": DATA_RECORDS},
+ "description": "A simple bar chart with embedded data.",
+ "encoding": {
+ "x": {"field": "category", "type": "ordinal"},
+ "y": {"field": "amount", "type": "quantitative"},
+ },
+ "mark": "bar",
+}
+
+
+@pytest.mark.skipif(not IPYTHON_AVAILABLE, reason="requires ipython")
+def test_vegalite_magic_data_included():
+ result = _ipshell.run_cell("%%vegalite\n" + json.dumps(VEGALITE_SPEC))
+ assert isinstance(result.result, VegaLite)
+ assert VEGALITE_SPEC == result.result.spec
+
+
+@pytest.mark.skipif(not IPYTHON_AVAILABLE, reason="requires ipython")
+def test_vegalite_magic_json_flag():
+ result = _ipshell.run_cell("%%vegalite --json\n" + json.dumps(VEGALITE_SPEC))
+ assert isinstance(result.result, VegaLite)
+ assert VEGALITE_SPEC == result.result.spec
+
+
+@pytest.mark.skipif(not IPYTHON_AVAILABLE, reason="requires ipython")
+def test_vegalite_magic_pandas_data():
+ spec = {key: val for key, val in VEGALITE_SPEC.items() if key != "data"}
+ result = _ipshell.run_cell("%%vegalite table\n" + json.dumps(spec))
+ assert isinstance(result.result, VegaLite)
+ assert VEGALITE_SPEC == result.result.spec
+
+
+@pytest.mark.skipif(not IPYTHON_AVAILABLE, reason="requires ipython")
+def test_vega_magic_data_included():
+ result = _ipshell.run_cell("%%vega\n" + json.dumps(VEGA_SPEC))
+ assert isinstance(result.result, Vega)
+ assert VEGA_SPEC == result.result.spec
+
+
+@pytest.mark.skipif(not IPYTHON_AVAILABLE, reason="requires ipython")
+def test_vega_magic_json_flag():
+ result = _ipshell.run_cell("%%vega --json\n" + json.dumps(VEGA_SPEC))
+ assert isinstance(result.result, Vega)
+ assert VEGA_SPEC == result.result.spec
+
+
+@pytest.mark.skipif(not IPYTHON_AVAILABLE, reason="requires ipython")
+def test_vega_magic_pandas_data():
+ spec = {key: val for key, val in VEGA_SPEC.items() if key != "data"}
+ result = _ipshell.run_cell("%%vega table\n" + json.dumps(spec))
+ assert isinstance(result.result, Vega)
+ assert VEGA_SPEC == result.result.spec
+
+
+@pytest.mark.skipif(not IPYTHON_AVAILABLE, reason="requires ipython")
+def test_vega_magic_pandas_data_renamed():
+ spec = {key: val for key, val in VEGA_SPEC.items() if key != "data"}
+ result = _ipshell.run_cell("%%vega table:the_data\n" + json.dumps(spec))
+ assert isinstance(result.result, Vega)
+ assert VEGA_SPEC == result.result.spec
diff --git a/venv/lib/python3.9/site-packages/altair/utils/__init__.py b/venv/lib/python3.9/site-packages/altair/utils/__init__.py
new file mode 100644
index 00000000..2a523834
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/utils/__init__.py
@@ -0,0 +1,32 @@
+from .core import (
+ infer_vegalite_type,
+ infer_encoding_types,
+ sanitize_dataframe,
+ parse_shorthand,
+ use_signature,
+ update_subtraits,
+ update_nested,
+ display_traceback,
+ SchemaBase,
+ Undefined,
+)
+from .html import spec_to_html
+from .plugin_registry import PluginRegistry
+from .deprecation import AltairDeprecationWarning
+
+
+__all__ = (
+ "infer_vegalite_type",
+ "infer_encoding_types",
+ "sanitize_dataframe",
+ "spec_to_html",
+ "parse_shorthand",
+ "use_signature",
+ "update_subtraits",
+ "update_nested",
+ "display_traceback",
+ "AltairDeprecationWarning",
+ "SchemaBase",
+ "Undefined",
+ "PluginRegistry",
+)
diff --git a/venv/lib/python3.9/site-packages/altair/utils/core.py b/venv/lib/python3.9/site-packages/altair/utils/core.py
new file mode 100644
index 00000000..588e8c60
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/utils/core.py
@@ -0,0 +1,731 @@
+"""
+Utility routines
+"""
+from collections.abc import Mapping
+from copy import deepcopy
+import json
+import itertools
+import re
+import sys
+import traceback
+import warnings
+
+import jsonschema
+import pandas as pd
+import numpy as np
+
+from .schemapi import SchemaBase, Undefined
+
+try:
+ from pandas.api.types import infer_dtype as _infer_dtype
+except ImportError:
+ # Import for pandas < 0.20.0
+ from pandas.lib import infer_dtype as _infer_dtype
+
+
+def infer_dtype(value):
+ """Infer the dtype of the value.
+
+ This is a compatibility function for pandas infer_dtype,
+ with skipna=False regardless of the pandas version.
+ """
+ if not hasattr(infer_dtype, "_supports_skipna"):
+ try:
+ _infer_dtype([1], skipna=False)
+ except TypeError:
+ # pandas < 0.21.0 don't support skipna keyword
+ infer_dtype._supports_skipna = False
+ else:
+ infer_dtype._supports_skipna = True
+ if infer_dtype._supports_skipna:
+ return _infer_dtype(value, skipna=False)
+ else:
+ return _infer_dtype(value)
+
+
+TYPECODE_MAP = {
+ "ordinal": "O",
+ "nominal": "N",
+ "quantitative": "Q",
+ "temporal": "T",
+ "geojson": "G",
+}
+
+INV_TYPECODE_MAP = {v: k for k, v in TYPECODE_MAP.items()}
+
+
+# aggregates from vega-lite version 4.6.0
+AGGREGATES = [
+ "argmax",
+ "argmin",
+ "average",
+ "count",
+ "distinct",
+ "max",
+ "mean",
+ "median",
+ "min",
+ "missing",
+ "product",
+ "q1",
+ "q3",
+ "ci0",
+ "ci1",
+ "stderr",
+ "stdev",
+ "stdevp",
+ "sum",
+ "valid",
+ "values",
+ "variance",
+ "variancep",
+]
+
+# window aggregates from vega-lite version 4.6.0
+WINDOW_AGGREGATES = [
+ "row_number",
+ "rank",
+ "dense_rank",
+ "percent_rank",
+ "cume_dist",
+ "ntile",
+ "lag",
+ "lead",
+ "first_value",
+ "last_value",
+ "nth_value",
+]
+
+# timeUnits from vega-lite version 4.17.0
+TIMEUNITS = [
+ "year",
+ "quarter",
+ "month",
+ "week",
+ "day",
+ "dayofyear",
+ "date",
+ "hours",
+ "minutes",
+ "seconds",
+ "milliseconds",
+ "yearquarter",
+ "yearquartermonth",
+ "yearmonth",
+ "yearmonthdate",
+ "yearmonthdatehours",
+ "yearmonthdatehoursminutes",
+ "yearmonthdatehoursminutesseconds",
+ "yearweek",
+ "yearweekday",
+ "yearweekdayhours",
+ "yearweekdayhoursminutes",
+ "yearweekdayhoursminutesseconds",
+ "yeardayofyear",
+ "quartermonth",
+ "monthdate",
+ "monthdatehours",
+ "monthdatehoursminutes",
+ "monthdatehoursminutesseconds",
+ "weekday",
+ "weeksdayhours",
+ "weekdayhoursminutes",
+ "weekdayhoursminutesseconds",
+ "dayhours",
+ "dayhoursminutes",
+ "dayhoursminutesseconds",
+ "hoursminutes",
+ "hoursminutesseconds",
+ "minutesseconds",
+ "secondsmilliseconds",
+ "utcyear",
+ "utcquarter",
+ "utcmonth",
+ "utcweek",
+ "utcday",
+ "utcdayofyear",
+ "utcdate",
+ "utchours",
+ "utcminutes",
+ "utcseconds",
+ "utcmilliseconds",
+ "utcyearquarter",
+ "utcyearquartermonth",
+ "utcyearmonth",
+ "utcyearmonthdate",
+ "utcyearmonthdatehours",
+ "utcyearmonthdatehoursminutes",
+ "utcyearmonthdatehoursminutesseconds",
+ "utcyearweek",
+ "utcyearweekday",
+ "utcyearweekdayhours",
+ "utcyearweekdayhoursminutes",
+ "utcyearweekdayhoursminutesseconds",
+ "utcyeardayofyear",
+ "utcquartermonth",
+ "utcmonthdate",
+ "utcmonthdatehours",
+ "utcmonthdatehoursminutes",
+ "utcmonthdatehoursminutesseconds",
+ "utcweekday",
+ "utcweeksdayhours",
+ "utcweekdayhoursminutes",
+ "utcweekdayhoursminutesseconds",
+ "utcdayhours",
+ "utcdayhoursminutes",
+ "utcdayhoursminutesseconds",
+ "utchoursminutes",
+ "utchoursminutesseconds",
+ "utcminutesseconds",
+ "utcsecondsmilliseconds",
+]
+
+
+def infer_vegalite_type(data):
+ """
+ From an array-like input, infer the correct vega typecode
+ ('ordinal', 'nominal', 'quantitative', or 'temporal')
+
+ Parameters
+ ----------
+ data: Numpy array or Pandas Series
+ """
+ # Otherwise, infer based on the dtype of the input
+ typ = infer_dtype(data)
+
+ # TODO: Once this returns 'O', please update test_select_x and test_select_y in test_api.py
+
+ if typ in [
+ "floating",
+ "mixed-integer-float",
+ "integer",
+ "mixed-integer",
+ "complex",
+ ]:
+ return "quantitative"
+ elif typ in ["string", "bytes", "categorical", "boolean", "mixed", "unicode"]:
+ return "nominal"
+ elif typ in [
+ "datetime",
+ "datetime64",
+ "timedelta",
+ "timedelta64",
+ "date",
+ "time",
+ "period",
+ ]:
+ return "temporal"
+ else:
+ warnings.warn(
+ "I don't know how to infer vegalite type from '{}'. "
+ "Defaulting to nominal.".format(typ)
+ )
+ return "nominal"
+
+
+def merge_props_geom(feat):
+ """
+ Merge properties with geometry
+ * Overwrites 'type' and 'geometry' entries if existing
+ """
+
+ geom = {k: feat[k] for k in ("type", "geometry")}
+ try:
+ feat["properties"].update(geom)
+ props_geom = feat["properties"]
+ except (AttributeError, KeyError):
+ # AttributeError when 'properties' equals None
+ # KeyError when 'properties' is non-existing
+ props_geom = geom
+
+ return props_geom
+
+
+def sanitize_geo_interface(geo):
+ """Santize a geo_interface to prepare it for serialization.
+
+ * Make a copy
+ * Convert type array or _Array to list
+ * Convert tuples to lists (using json.loads/dumps)
+ * Merge properties with geometry
+ """
+
+ geo = deepcopy(geo)
+
+ # convert type _Array or array to list
+ for key in geo.keys():
+ if str(type(geo[key]).__name__).startswith(("_Array", "array")):
+ geo[key] = geo[key].tolist()
+
+ # convert (nested) tuples to lists
+ geo = json.loads(json.dumps(geo))
+
+ # sanitize features
+ if geo["type"] == "FeatureCollection":
+ geo = geo["features"]
+ if len(geo) > 0:
+ for idx, feat in enumerate(geo):
+ geo[idx] = merge_props_geom(feat)
+ elif geo["type"] == "Feature":
+ geo = merge_props_geom(geo)
+ else:
+ geo = {"type": "Feature", "geometry": geo}
+
+ return geo
+
+
+def sanitize_dataframe(df): # noqa: C901
+ """Sanitize a DataFrame to prepare it for serialization.
+
+ * Make a copy
+ * Convert RangeIndex columns to strings
+ * Raise ValueError if column names are not strings
+ * Raise ValueError if it has a hierarchical index.
+ * Convert categoricals to strings.
+ * Convert np.bool_ dtypes to Python bool objects
+ * Convert np.int dtypes to Python int objects
+ * Convert floats to objects and replace NaNs/infs with None.
+ * Convert DateTime dtypes into appropriate string representations
+ * Convert Nullable integers to objects and replace NaN with None
+ * Convert Nullable boolean to objects and replace NaN with None
+ * convert dedicated string column to objects and replace NaN with None
+ * Raise a ValueError for TimeDelta dtypes
+ """
+ df = df.copy()
+
+ if isinstance(df.columns, pd.RangeIndex):
+ df.columns = df.columns.astype(str)
+
+ for col in df.columns:
+ if not isinstance(col, str):
+ raise ValueError(
+ "Dataframe contains invalid column name: {0!r}. "
+ "Column names must be strings".format(col)
+ )
+
+ if isinstance(df.index, pd.MultiIndex):
+ raise ValueError("Hierarchical indices not supported")
+ if isinstance(df.columns, pd.MultiIndex):
+ raise ValueError("Hierarchical indices not supported")
+
+ def to_list_if_array(val):
+ if isinstance(val, np.ndarray):
+ return val.tolist()
+ else:
+ return val
+
+ for col_name, dtype in df.dtypes.items():
+ if str(dtype) == "category":
+ # XXXX: work around bug in to_json for categorical types
+ # https://github.com/pydata/pandas/issues/10778
+ col = df[col_name].astype(object)
+ df[col_name] = col.where(col.notnull(), None)
+ elif str(dtype) == "string":
+ # dedicated string datatype (since 1.0)
+ # https://pandas.pydata.org/pandas-docs/version/1.0.0/whatsnew/v1.0.0.html#dedicated-string-data-type
+ col = df[col_name].astype(object)
+ df[col_name] = col.where(col.notnull(), None)
+ elif str(dtype) == "bool":
+ # convert numpy bools to objects; np.bool is not JSON serializable
+ df[col_name] = df[col_name].astype(object)
+ elif str(dtype) == "boolean":
+ # dedicated boolean datatype (since 1.0)
+ # https://pandas.io/docs/user_guide/boolean.html
+ col = df[col_name].astype(object)
+ df[col_name] = col.where(col.notnull(), None)
+ elif str(dtype).startswith("datetime"):
+ # Convert datetimes to strings. This needs to be a full ISO string
+ # with time, which is why we cannot use ``col.astype(str)``.
+ # This is because Javascript parses date-only times in UTC, but
+ # parses full ISO-8601 dates as local time, and dates in Vega and
+ # Vega-Lite are displayed in local time by default.
+ # (see https://github.com/altair-viz/altair/issues/1027)
+ df[col_name] = (
+ df[col_name].apply(lambda x: x.isoformat()).replace("NaT", "")
+ )
+ elif str(dtype).startswith("timedelta"):
+ raise ValueError(
+ 'Field "{col_name}" has type "{dtype}" which is '
+ "not supported by Altair. Please convert to "
+ "either a timestamp or a numerical value."
+ "".format(col_name=col_name, dtype=dtype)
+ )
+ elif str(dtype).startswith("geometry"):
+ # geopandas >=0.6.1 uses the dtype geometry. Continue here
+ # otherwise it will give an error on np.issubdtype(dtype, np.integer)
+ continue
+ elif str(dtype) in {
+ "Int8",
+ "Int16",
+ "Int32",
+ "Int64",
+ "UInt8",
+ "UInt16",
+ "UInt32",
+ "UInt64",
+ "Float32",
+ "Float64",
+ }: # nullable integer datatypes (since 24.0) and nullable float datatypes (since 1.2.0)
+ # https://pandas.pydata.org/pandas-docs/version/0.25/whatsnew/v0.24.0.html#optional-integer-na-support
+ col = df[col_name].astype(object)
+ df[col_name] = col.where(col.notnull(), None)
+ elif np.issubdtype(dtype, np.integer):
+ # convert integers to objects; np.int is not JSON serializable
+ df[col_name] = df[col_name].astype(object)
+ elif np.issubdtype(dtype, np.floating):
+ # For floats, convert to Python float: np.float is not JSON serializable
+ # Also convert NaN/inf values to null, as they are not JSON serializable
+ col = df[col_name]
+ bad_values = col.isnull() | np.isinf(col)
+ df[col_name] = col.astype(object).where(~bad_values, None)
+ elif dtype == object:
+ # Convert numpy arrays saved as objects to lists
+ # Arrays are not JSON serializable
+ col = df[col_name].apply(to_list_if_array, convert_dtype=False)
+ df[col_name] = col.where(col.notnull(), None)
+ return df
+
+
+def parse_shorthand(
+ shorthand,
+ data=None,
+ parse_aggregates=True,
+ parse_window_ops=False,
+ parse_timeunits=True,
+ parse_types=True,
+):
+ """General tool to parse shorthand values
+
+ These are of the form:
+
+ - "col_name"
+ - "col_name:O"
+ - "average(col_name)"
+ - "average(col_name):O"
+
+ Optionally, a dataframe may be supplied, from which the type
+ will be inferred if not specified in the shorthand.
+
+ Parameters
+ ----------
+ shorthand : dict or string
+ The shorthand representation to be parsed
+ data : DataFrame, optional
+ If specified and of type DataFrame, then use these values to infer the
+ column type if not provided by the shorthand.
+ parse_aggregates : boolean
+ If True (default), then parse aggregate functions within the shorthand.
+ parse_window_ops : boolean
+ If True then parse window operations within the shorthand (default:False)
+ parse_timeunits : boolean
+ If True (default), then parse timeUnits from within the shorthand
+ parse_types : boolean
+ If True (default), then parse typecodes within the shorthand
+
+ Returns
+ -------
+ attrs : dict
+ a dictionary of attributes extracted from the shorthand
+
+ Examples
+ --------
+ >>> data = pd.DataFrame({'foo': ['A', 'B', 'A', 'B'],
+ ... 'bar': [1, 2, 3, 4]})
+
+ >>> parse_shorthand('name') == {'field': 'name'}
+ True
+
+ >>> parse_shorthand('name:Q') == {'field': 'name', 'type': 'quantitative'}
+ True
+
+ >>> parse_shorthand('average(col)') == {'aggregate': 'average', 'field': 'col'}
+ True
+
+ >>> parse_shorthand('foo:O') == {'field': 'foo', 'type': 'ordinal'}
+ True
+
+ >>> parse_shorthand('min(foo):Q') == {'aggregate': 'min', 'field': 'foo', 'type': 'quantitative'}
+ True
+
+ >>> parse_shorthand('month(col)') == {'field': 'col', 'timeUnit': 'month', 'type': 'temporal'}
+ True
+
+ >>> parse_shorthand('year(col):O') == {'field': 'col', 'timeUnit': 'year', 'type': 'ordinal'}
+ True
+
+ >>> parse_shorthand('foo', data) == {'field': 'foo', 'type': 'nominal'}
+ True
+
+ >>> parse_shorthand('bar', data) == {'field': 'bar', 'type': 'quantitative'}
+ True
+
+ >>> parse_shorthand('bar:O', data) == {'field': 'bar', 'type': 'ordinal'}
+ True
+
+ >>> parse_shorthand('sum(bar)', data) == {'aggregate': 'sum', 'field': 'bar', 'type': 'quantitative'}
+ True
+
+ >>> parse_shorthand('count()', data) == {'aggregate': 'count', 'type': 'quantitative'}
+ True
+ """
+ if not shorthand:
+ return {}
+
+ valid_typecodes = list(TYPECODE_MAP) + list(INV_TYPECODE_MAP)
+
+ units = dict(
+ field="(?P<field>.*)",
+ type="(?P<type>{})".format("|".join(valid_typecodes)),
+ agg_count="(?P<aggregate>count)",
+ op_count="(?P<op>count)",
+ aggregate="(?P<aggregate>{})".format("|".join(AGGREGATES)),
+ window_op="(?P<op>{})".format("|".join(AGGREGATES + WINDOW_AGGREGATES)),
+ timeUnit="(?P<timeUnit>{})".format("|".join(TIMEUNITS)),
+ )
+
+ patterns = []
+
+ if parse_aggregates:
+ patterns.extend([r"{agg_count}\(\)"])
+ patterns.extend([r"{aggregate}\({field}\)"])
+ if parse_window_ops:
+ patterns.extend([r"{op_count}\(\)"])
+ patterns.extend([r"{window_op}\({field}\)"])
+ if parse_timeunits:
+ patterns.extend([r"{timeUnit}\({field}\)"])
+
+ patterns.extend([r"{field}"])
+
+ if parse_types:
+ patterns = list(itertools.chain(*((p + ":{type}", p) for p in patterns)))
+
+ regexps = (
+ re.compile(r"\A" + p.format(**units) + r"\Z", re.DOTALL) for p in patterns
+ )
+
+ # find matches depending on valid fields passed
+ if isinstance(shorthand, dict):
+ attrs = shorthand
+ else:
+ attrs = next(
+ exp.match(shorthand).groupdict() for exp in regexps if exp.match(shorthand)
+ )
+
+ # Handle short form of the type expression
+ if "type" in attrs:
+ attrs["type"] = INV_TYPECODE_MAP.get(attrs["type"], attrs["type"])
+
+ # counts are quantitative by default
+ if attrs == {"aggregate": "count"}:
+ attrs["type"] = "quantitative"
+
+ # times are temporal by default
+ if "timeUnit" in attrs and "type" not in attrs:
+ attrs["type"] = "temporal"
+
+ # if data is specified and type is not, infer type from data
+ if isinstance(data, pd.DataFrame) and "type" not in attrs:
+ if "field" in attrs and attrs["field"] in data.columns:
+ attrs["type"] = infer_vegalite_type(data[attrs["field"]])
+ return attrs
+
+
+def use_signature(Obj):
+ """Apply call signature and documentation of Obj to the decorated method"""
+
+ def decorate(f):
+ # call-signature of f is exposed via __wrapped__.
+ # we want it to mimic Obj.__init__
+ f.__wrapped__ = Obj.__init__
+ f._uses_signature = Obj
+
+ # Supplement the docstring of f with information from Obj
+ if Obj.__doc__:
+ doclines = Obj.__doc__.splitlines()
+ if f.__doc__:
+ doc = f.__doc__ + "\n".join(doclines[1:])
+ else:
+ doc = "\n".join(doclines)
+ try:
+ f.__doc__ = doc
+ except AttributeError:
+ # __doc__ is not modifiable for classes in Python < 3.3
+ pass
+
+ return f
+
+ return decorate
+
+
+def update_subtraits(obj, attrs, **kwargs):
+ """Recursively update sub-traits without overwriting other traits"""
+ # TODO: infer keywords from args
+ if not kwargs:
+ return obj
+
+ # obj can be a SchemaBase object or a dict
+ if obj is Undefined:
+ obj = dct = {}
+ elif isinstance(obj, SchemaBase):
+ dct = obj._kwds
+ else:
+ dct = obj
+
+ if isinstance(attrs, str):
+ attrs = (attrs,)
+
+ if len(attrs) == 0:
+ dct.update(kwargs)
+ else:
+ attr = attrs[0]
+ trait = dct.get(attr, Undefined)
+ if trait is Undefined:
+ trait = dct[attr] = {}
+ dct[attr] = update_subtraits(trait, attrs[1:], **kwargs)
+ return obj
+
+
+def update_nested(original, update, copy=False):
+ """Update nested dictionaries
+
+ Parameters
+ ----------
+ original : dict
+ the original (nested) dictionary, which will be updated in-place
+ update : dict
+ the nested dictionary of updates
+ copy : bool, default False
+ if True, then copy the original dictionary rather than modifying it
+
+ Returns
+ -------
+ original : dict
+ a reference to the (modified) original dict
+
+ Examples
+ --------
+ >>> original = {'x': {'b': 2, 'c': 4}}
+ >>> update = {'x': {'b': 5, 'd': 6}, 'y': 40}
+ >>> update_nested(original, update) # doctest: +SKIP
+ {'x': {'b': 5, 'c': 4, 'd': 6}, 'y': 40}
+ >>> original # doctest: +SKIP
+ {'x': {'b': 5, 'c': 4, 'd': 6}, 'y': 40}
+ """
+ if copy:
+ original = deepcopy(original)
+ for key, val in update.items():
+ if isinstance(val, Mapping):
+ orig_val = original.get(key, {})
+ if isinstance(orig_val, Mapping):
+ original[key] = update_nested(orig_val, val)
+ else:
+ original[key] = val
+ else:
+ original[key] = val
+ return original
+
+
+def display_traceback(in_ipython=True):
+ exc_info = sys.exc_info()
+
+ if in_ipython:
+ from IPython.core.getipython import get_ipython
+
+ ip = get_ipython()
+ else:
+ ip = None
+
+ if ip is not None:
+ ip.showtraceback(exc_info)
+ else:
+ traceback.print_exception(*exc_info)
+
+
+def infer_encoding_types(args, kwargs, channels):
+ """Infer typed keyword arguments for args and kwargs
+
+ Parameters
+ ----------
+ args : tuple
+ List of function args
+ kwargs : dict
+ Dict of function kwargs
+ channels : module
+ The module containing all altair encoding channel classes.
+
+ Returns
+ -------
+ kwargs : dict
+ All args and kwargs in a single dict, with keys and types
+ based on the channels mapping.
+ """
+ # Construct a dictionary of channel type to encoding name
+ # TODO: cache this somehow?
+ channel_objs = (getattr(channels, name) for name in dir(channels))
+ channel_objs = (
+ c for c in channel_objs if isinstance(c, type) and issubclass(c, SchemaBase)
+ )
+ channel_to_name = {c: c._encoding_name for c in channel_objs}
+ name_to_channel = {}
+ for chan, name in channel_to_name.items():
+ chans = name_to_channel.setdefault(name, {})
+ if chan.__name__.endswith("Datum"):
+ key = "datum"
+ elif chan.__name__.endswith("Value"):
+ key = "value"
+ else:
+ key = "field"
+ chans[key] = chan
+
+ # First use the mapping to convert args to kwargs based on their types.
+ for arg in args:
+ if isinstance(arg, (list, tuple)) and len(arg) > 0:
+ type_ = type(arg[0])
+ else:
+ type_ = type(arg)
+
+ encoding = channel_to_name.get(type_, None)
+ if encoding is None:
+ raise NotImplementedError("positional of type {}" "".format(type_))
+ if encoding in kwargs:
+ raise ValueError("encoding {} specified twice.".format(encoding))
+ kwargs[encoding] = arg
+
+ def _wrap_in_channel_class(obj, encoding):
+ try:
+ condition = obj["condition"]
+ except (KeyError, TypeError):
+ pass
+ else:
+ if condition is not Undefined:
+ obj = obj.copy()
+ obj["condition"] = _wrap_in_channel_class(condition, encoding)
+
+ if isinstance(obj, SchemaBase):
+ return obj
+
+ if isinstance(obj, str):
+ obj = {"shorthand": obj}
+
+ if isinstance(obj, (list, tuple)):
+ return [_wrap_in_channel_class(subobj, encoding) for subobj in obj]
+
+ if encoding not in name_to_channel:
+ warnings.warn("Unrecognized encoding channel '{}'".format(encoding))
+ return obj
+
+ classes = name_to_channel[encoding]
+ cls = classes["value"] if "value" in obj else classes["field"]
+
+ try:
+ # Don't force validation here; some objects won't be valid until
+ # they're created in the context of a chart.
+ return cls.from_dict(obj, validate=False)
+ except jsonschema.ValidationError:
+ # our attempts at finding the correct class have failed
+ return obj
+
+ return {
+ encoding: _wrap_in_channel_class(obj, encoding)
+ for encoding, obj in kwargs.items()
+ }
diff --git a/venv/lib/python3.9/site-packages/altair/utils/data.py b/venv/lib/python3.9/site-packages/altair/utils/data.py
new file mode 100644
index 00000000..403b69e8
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/utils/data.py
@@ -0,0 +1,244 @@
+import json
+import os
+import random
+import hashlib
+import warnings
+
+import pandas as pd
+from toolz import curried
+from typing import Callable
+
+from .core import sanitize_dataframe
+from .core import sanitize_geo_interface
+from .deprecation import AltairDeprecationWarning
+from .plugin_registry import PluginRegistry
+
+
+# ==============================================================================
+# Data transformer registry
+# ==============================================================================
+DataTransformerType = Callable
+
+
+class DataTransformerRegistry(PluginRegistry[DataTransformerType]):
+ _global_settings = {"consolidate_datasets": True}
+
+ @property
+ def consolidate_datasets(self):
+ return self._global_settings["consolidate_datasets"]
+
+ @consolidate_datasets.setter
+ def consolidate_datasets(self, value):
+ self._global_settings["consolidate_datasets"] = value
+
+
+# ==============================================================================
+# Data model transformers
+#
+# A data model transformer is a pure function that takes a dict or DataFrame
+# and returns a transformed version of a dict or DataFrame. The dict objects
+# will be the Data portion of the VegaLite schema. The idea is that user can
+# pipe a sequence of these data transformers together to prepare the data before
+# it hits the renderer.
+#
+# In this version of Altair, renderers only deal with the dict form of a
+# VegaLite spec, after the Data model has been put into a schema compliant
+# form.
+#
+# A data model transformer has the following type signature:
+# DataModelType = Union[dict, pd.DataFrame]
+# DataModelTransformerType = Callable[[DataModelType, KwArgs], DataModelType]
+# ==============================================================================
+
+
+class MaxRowsError(Exception):
+ """Raised when a data model has too many rows."""
+
+ pass
+
+
+@curried.curry
+def limit_rows(data, max_rows=5000):
+ """Raise MaxRowsError if the data model has more than max_rows.
+
+ If max_rows is None, then do not perform any check.
+ """
+ check_data_type(data)
+ if hasattr(data, "__geo_interface__"):
+ if data.__geo_interface__["type"] == "FeatureCollection":
+ values = data.__geo_interface__["features"]
+ else:
+ values = data.__geo_interface__
+ elif isinstance(data, pd.DataFrame):
+ values = data
+ elif isinstance(data, dict):
+ if "values" in data:
+ values = data["values"]
+ else:
+ return data
+ if max_rows is not None and len(values) > max_rows:
+ raise MaxRowsError(
+ "The number of rows in your dataset is greater "
+ "than the maximum allowed ({}). "
+ "For information on how to plot larger datasets "
+ "in Altair, see the documentation".format(max_rows)
+ )
+ return data
+
+
+@curried.curry
+def sample(data, n=None, frac=None):
+ """Reduce the size of the data model by sampling without replacement."""
+ check_data_type(data)
+ if isinstance(data, pd.DataFrame):
+ return data.sample(n=n, frac=frac)
+ elif isinstance(data, dict):
+ if "values" in data:
+ values = data["values"]
+ n = n if n else int(frac * len(values))
+ values = random.sample(values, n)
+ return {"values": values}
+
+
+@curried.curry
+def to_json(
+ data,
+ prefix="altair-data",
+ extension="json",
+ filename="{prefix}-{hash}.{extension}",
+ urlpath="",
+):
+ """
+ Write the data model to a .json file and return a url based data model.
+ """
+ data_json = _data_to_json_string(data)
+ data_hash = _compute_data_hash(data_json)
+ filename = filename.format(prefix=prefix, hash=data_hash, extension=extension)
+ with open(filename, "w") as f:
+ f.write(data_json)
+ return {"url": os.path.join(urlpath, filename), "format": {"type": "json"}}
+
+
+@curried.curry
+def to_csv(
+ data,
+ prefix="altair-data",
+ extension="csv",
+ filename="{prefix}-{hash}.{extension}",
+ urlpath="",
+):
+ """Write the data model to a .csv file and return a url based data model."""
+ data_csv = _data_to_csv_string(data)
+ data_hash = _compute_data_hash(data_csv)
+ filename = filename.format(prefix=prefix, hash=data_hash, extension=extension)
+ with open(filename, "w") as f:
+ f.write(data_csv)
+ return {"url": os.path.join(urlpath, filename), "format": {"type": "csv"}}
+
+
+@curried.curry
+def to_values(data):
+ """Replace a DataFrame by a data model with values."""
+ check_data_type(data)
+ if hasattr(data, "__geo_interface__"):
+ if isinstance(data, pd.DataFrame):
+ data = sanitize_dataframe(data)
+ data = sanitize_geo_interface(data.__geo_interface__)
+ return {"values": data}
+ elif isinstance(data, pd.DataFrame):
+ data = sanitize_dataframe(data)
+ return {"values": data.to_dict(orient="records")}
+ elif isinstance(data, dict):
+ if "values" not in data:
+ raise KeyError("values expected in data dict, but not present.")
+ return data
+
+
+def check_data_type(data):
+ """Raise if the data is not a dict or DataFrame."""
+ if not isinstance(data, (dict, pd.DataFrame)) and not hasattr(
+ data, "__geo_interface__"
+ ):
+ raise TypeError(
+ "Expected dict, DataFrame or a __geo_interface__ attribute, got: {}".format(
+ type(data)
+ )
+ )
+
+
+# ==============================================================================
+# Private utilities
+# ==============================================================================
+
+
+def _compute_data_hash(data_str):
+ return hashlib.md5(data_str.encode()).hexdigest()
+
+
+def _data_to_json_string(data):
+ """Return a JSON string representation of the input data"""
+ check_data_type(data)
+ if hasattr(data, "__geo_interface__"):
+ if isinstance(data, pd.DataFrame):
+ data = sanitize_dataframe(data)
+ data = sanitize_geo_interface(data.__geo_interface__)
+ return json.dumps(data)
+ elif isinstance(data, pd.DataFrame):
+ data = sanitize_dataframe(data)
+ return data.to_json(orient="records", double_precision=15)
+ elif isinstance(data, dict):
+ if "values" not in data:
+ raise KeyError("values expected in data dict, but not present.")
+ return json.dumps(data["values"], sort_keys=True)
+ else:
+ raise NotImplementedError(
+ "to_json only works with data expressed as " "a DataFrame or as a dict"
+ )
+
+
+def _data_to_csv_string(data):
+ """return a CSV string representation of the input data"""
+ check_data_type(data)
+ if hasattr(data, "__geo_interface__"):
+ raise NotImplementedError(
+ "to_csv does not work with data that "
+ "contains the __geo_interface__ attribute"
+ )
+ elif isinstance(data, pd.DataFrame):
+ data = sanitize_dataframe(data)
+ return data.to_csv(index=False)
+ elif isinstance(data, dict):
+ if "values" not in data:
+ raise KeyError("values expected in data dict, but not present")
+ return pd.DataFrame.from_dict(data["values"]).to_csv(index=False)
+ else:
+ raise NotImplementedError(
+ "to_csv only works with data expressed as " "a DataFrame or as a dict"
+ )
+
+
+def pipe(data, *funcs):
+ """
+ Pipe a value through a sequence of functions
+
+ Deprecated: use toolz.curried.pipe() instead.
+ """
+ warnings.warn(
+ "alt.pipe() is deprecated, and will be removed in a future release. "
+ "Use toolz.curried.pipe() instead.",
+ AltairDeprecationWarning,
+ )
+ return curried.pipe(data, *funcs)
+
+
+def curry(*args, **kwargs):
+ """Curry a callable function
+
+ Deprecated: use toolz.curried.curry() instead.
+ """
+ warnings.warn(
+ "alt.curry() is deprecated, and will be removed in a future release. "
+ "Use toolz.curried.curry() instead.",
+ AltairDeprecationWarning,
+ )
+ return curried.curry(*args, **kwargs)
diff --git a/venv/lib/python3.9/site-packages/altair/utils/deprecation.py b/venv/lib/python3.9/site-packages/altair/utils/deprecation.py
new file mode 100644
index 00000000..9deca223
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/utils/deprecation.py
@@ -0,0 +1,70 @@
+import warnings
+import functools
+
+
+class AltairDeprecationWarning(UserWarning):
+ pass
+
+
+def deprecated(message=None):
+ """Decorator to deprecate a function or class.
+
+ Parameters
+ ----------
+ message : string (optional)
+ The deprecation message
+ """
+
+ def wrapper(obj):
+ return _deprecate(obj, message=message)
+
+ return wrapper
+
+
+def _deprecate(obj, name=None, message=None):
+ """Return a version of a class or function that raises a deprecation warning.
+
+ Parameters
+ ----------
+ obj : class or function
+ The object to create a deprecated version of.
+ name : string (optional)
+ The name of the deprecated object
+ message : string (optional)
+ The deprecation message
+
+ Returns
+ -------
+ deprecated_obj :
+ The deprecated version of obj
+
+ Examples
+ --------
+ >>> class Foo(object): pass
+ >>> OldFoo = _deprecate(Foo, "OldFoo")
+ >>> f = OldFoo() # doctest: +SKIP
+ AltairDeprecationWarning: alt.OldFoo is deprecated. Use alt.Foo instead.
+ """
+ if message is None:
+ message = "alt.{} is deprecated. Use alt.{} instead." "".format(
+ name, obj.__name__
+ )
+ if isinstance(obj, type):
+ return type(
+ name,
+ (obj,),
+ {
+ "__doc__": obj.__doc__,
+ "__init__": _deprecate(obj.__init__, "__init__", message),
+ },
+ )
+ elif callable(obj):
+
+ @functools.wraps(obj)
+ def new_obj(*args, **kwargs):
+ warnings.warn(message, AltairDeprecationWarning)
+ return obj(*args, **kwargs)
+
+ return new_obj
+ else:
+ raise ValueError("Cannot deprecate object of type {}".format(type(obj)))
diff --git a/venv/lib/python3.9/site-packages/altair/utils/display.py b/venv/lib/python3.9/site-packages/altair/utils/display.py
new file mode 100644
index 00000000..bcf8232b
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/utils/display.py
@@ -0,0 +1,181 @@
+import json
+import pkgutil
+import textwrap
+from typing import Callable, Dict
+import uuid
+
+from .plugin_registry import PluginRegistry
+from .mimebundle import spec_to_mimebundle
+from .schemapi import validate_jsonschema
+
+
+# ==============================================================================
+# Renderer registry
+# ==============================================================================
+MimeBundleType = Dict[str, object]
+RendererType = Callable[..., MimeBundleType]
+
+
+class RendererRegistry(PluginRegistry[RendererType]):
+ entrypoint_err_messages = {
+ "notebook": textwrap.dedent(
+ """
+ To use the 'notebook' renderer, you must install the vega package
+ and the associated Jupyter extension.
+ See https://altair-viz.github.io/getting_started/installation.html
+ for more information.
+ """
+ ),
+ "altair_viewer": textwrap.dedent(
+ """
+ To use the 'altair_viewer' renderer, you must install the altair_viewer
+ package; see http://github.com/altair-viz/altair_viewer/
+ for more information.
+ """
+ ),
+ }
+
+ def set_embed_options(
+ self,
+ defaultStyle=None,
+ renderer=None,
+ width=None,
+ height=None,
+ padding=None,
+ scaleFactor=None,
+ actions=None,
+ **kwargs,
+ ):
+ """Set options for embeddings of Vega & Vega-Lite charts.
+
+ Options are fully documented at https://github.com/vega/vega-embed.
+ Similar to the `enable()` method, this can be used as either
+ a persistent global switch, or as a temporary local setting using
+ a context manager (i.e. a `with` statement).
+
+ Parameters
+ ----------
+ defaultStyle : bool or string
+ Specify a default stylesheet for embed actions.
+ renderer : string
+ The renderer to use for the view. One of "canvas" (default) or "svg"
+ width : integer
+ The view width in pixels
+ height : integer
+ The view height in pixels
+ padding : integer
+ The view padding in pixels
+ scaleFactor : number
+ The number by which to multiply the width and height (default 1)
+ of an exported PNG or SVG image.
+ actions : bool or dict
+ Determines if action links ("Export as PNG/SVG", "View Source",
+ "View Vega" (only for Vega-Lite), "Open in Vega Editor") are
+ included with the embedded view. If the value is true, all action
+ links will be shown and none if the value is false. This property
+ can take a key-value mapping object that maps keys (export, source,
+ compiled, editor) to boolean values for determining if
+ each action link should be shown.
+ **kwargs :
+ Additional options are passed directly to embed options.
+ """
+ options = {
+ "defaultStyle": defaultStyle,
+ "renderer": renderer,
+ "width": width,
+ "height": height,
+ "padding": padding,
+ "scaleFactor": scaleFactor,
+ "actions": actions,
+ }
+ kwargs.update({key: val for key, val in options.items() if val is not None})
+ return self.enable(None, embed_options=kwargs)
+
+
+# ==============================================================================
+# VegaLite v1/v2 renderer logic
+# ==============================================================================
+
+
+class Displayable(object):
+ """A base display class for VegaLite v1/v2.
+
+ This class takes a VegaLite v1/v2 spec and does the following:
+
+ 1. Optionally validates the spec against a schema.
+ 2. Uses the RendererPlugin to grab a renderer and call it when the
+ IPython/Jupyter display method (_repr_mimebundle_) is called.
+
+ The spec passed to this class must be fully schema compliant and already
+ have the data portion of the spec fully processed and ready to serialize.
+ In practice, this means, the data portion of the spec should have been passed
+ through appropriate data model transformers.
+ """
+
+ renderers = None
+ schema_path = ("altair", "")
+
+ def __init__(self, spec, validate=False):
+ # type: (dict, bool) -> None
+ self.spec = spec
+ self.validate = validate
+ self._validate()
+
+ def _validate(self):
+ # type: () -> None
+ """Validate the spec against the schema."""
+ schema_dict = json.loads(pkgutil.get_data(*self.schema_path).decode("utf-8"))
+ validate_jsonschema(self.spec, schema_dict)
+
+ def _repr_mimebundle_(self, include=None, exclude=None):
+ """Return a MIME bundle for display in Jupyter frontends."""
+ if self.renderers is not None:
+ return self.renderers.get()(self.spec)
+ else:
+ return {}
+
+
+def default_renderer_base(spec, mime_type, str_repr, **options):
+ """A default renderer for Vega or VegaLite that works for modern frontends.
+
+ This renderer works with modern frontends (JupyterLab, nteract) that know
+ how to render the custom VegaLite MIME type listed above.
+ """
+ assert isinstance(spec, dict)
+ bundle = {}
+ metadata = {}
+
+ bundle[mime_type] = spec
+ bundle["text/plain"] = str_repr
+ if options:
+ metadata[mime_type] = options
+ return bundle, metadata
+
+
+def json_renderer_base(spec, str_repr, **options):
+ """A renderer that returns a MIME type of application/json.
+
+ In JupyterLab/nteract this is rendered as a nice JSON tree.
+ """
+ return default_renderer_base(
+ spec, mime_type="application/json", str_repr=str_repr, **options
+ )
+
+
+class HTMLRenderer(object):
+ """Object to render charts as HTML, with a unique output div each time"""
+
+ def __init__(self, output_div="altair-viz-{}", **kwargs):
+ self._output_div = output_div
+ self.kwargs = kwargs
+
+ @property
+ def output_div(self):
+ return self._output_div.format(uuid.uuid4().hex)
+
+ def __call__(self, spec, **metadata):
+ kwargs = self.kwargs.copy()
+ kwargs.update(metadata)
+ return spec_to_mimebundle(
+ spec, format="html", output_div=self.output_div, **kwargs
+ )
diff --git a/venv/lib/python3.9/site-packages/altair/utils/execeval.py b/venv/lib/python3.9/site-packages/altair/utils/execeval.py
new file mode 100644
index 00000000..c135fe4a
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/utils/execeval.py
@@ -0,0 +1,61 @@
+import ast
+import sys
+
+
+if sys.version_info > (3, 8):
+ Module = ast.Module
+else:
+ # Mock the Python >= 3.8 API
+ def Module(nodelist, type_ignores):
+ return ast.Module(nodelist)
+
+
+class _CatchDisplay(object):
+ """Class to temporarily catch sys.displayhook"""
+
+ def __init__(self):
+ self.output = None
+
+ def __enter__(self):
+ self.old_hook = sys.displayhook
+ sys.displayhook = self
+ return self
+
+ def __exit__(self, type, value, traceback):
+ sys.displayhook = self.old_hook
+ # Returning False will cause exceptions to propagate
+ return False
+
+ def __call__(self, output):
+ self.output = output
+
+
+def eval_block(code, namespace=None, filename="<string>"):
+ """
+ Execute a multi-line block of code in the given namespace
+
+ If the final statement in the code is an expression, return
+ the result of the expression.
+ """
+ tree = ast.parse(code, filename="<ast>", mode="exec")
+ if namespace is None:
+ namespace = {}
+ catch_display = _CatchDisplay()
+
+ if isinstance(tree.body[-1], ast.Expr):
+ to_exec, to_eval = tree.body[:-1], tree.body[-1:]
+ else:
+ to_exec, to_eval = tree.body, []
+
+ for node in to_exec:
+ compiled = compile(Module([node], []), filename=filename, mode="exec")
+ exec(compiled, namespace)
+
+ with catch_display:
+ for node in to_eval:
+ compiled = compile(
+ ast.Interactive([node]), filename=filename, mode="single"
+ )
+ exec(compiled, namespace)
+
+ return catch_display.output
diff --git a/venv/lib/python3.9/site-packages/altair/utils/html.py b/venv/lib/python3.9/site-packages/altair/utils/html.py
new file mode 100644
index 00000000..1aa507e9
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/utils/html.py
@@ -0,0 +1,236 @@
+import json
+import jinja2
+
+
+HTML_TEMPLATE = jinja2.Template(
+ """
+{%- if fullhtml -%}
+<!DOCTYPE html>
+<html>
+<head>
+{%- endif %}
+ <style>
+ .error {
+ color: red;
+ }
+ </style>
+{%- if not requirejs %}
+ <script type="text/javascript" src="{{ base_url }}/vega@{{ vega_version }}"></script>
+ {%- if mode == 'vega-lite' %}
+ <script type="text/javascript" src="{{ base_url }}/vega-lite@{{ vegalite_version }}"></script>
+ {%- endif %}
+ <script type="text/javascript" src="{{ base_url }}/vega-embed@{{ vegaembed_version }}"></script>
+{%- endif %}
+{%- if fullhtml %}
+{%- if requirejs %}
+<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js"></script>
+<script>
+requirejs.config({
+ "paths": {
+ "vega": "{{ base_url }}/vega@{{ vega_version }}?noext",
+ "vega-lib": "{{ base_url }}/vega-lib?noext",
+ "vega-lite": "{{ base_url }}/vega-lite@{{ vegalite_version }}?noext",
+ "vega-embed": "{{ base_url }}/vega-embed@{{ vegaembed_version }}?noext",
+ }
+});
+</script>
+{%- endif %}
+</head>
+<body>
+{%- endif %}
+ <div id="{{ output_div }}"></div>
+ <script>
+ {%- if requirejs and not fullhtml %}
+ requirejs.config({
+ "paths": {
+ "vega": "{{ base_url }}/vega@{{ vega_version }}?noext",
+ "vega-lib": "{{ base_url }}/vega-lib?noext",
+ "vega-lite": "{{ base_url }}/vega-lite@{{ vegalite_version }}?noext",
+ "vega-embed": "{{ base_url }}/vega-embed@{{ vegaembed_version }}?noext",
+ }
+ });
+ {% endif %}
+ {% if requirejs -%}
+ require(['vega-embed'],
+ {%- else -%}
+ (
+ {%- endif -%}
+ function(vegaEmbed) {
+ var spec = {{ spec }};
+ var embedOpt = {{ embed_options }};
+
+ function showError(el, error){
+ el.innerHTML = ('<div class="error" style="color:red;">'
+ + '<p>JavaScript Error: ' + error.message + '</p>'
+ + "<p>This usually means there's a typo in your chart specification. "
+ + "See the javascript console for the full traceback.</p>"
+ + '</div>');
+ throw error;
+ }
+ const el = document.getElementById('{{ output_div }}');
+ vegaEmbed("#{{ output_div }}", spec, embedOpt)
+ .catch(error => showError(el, error));
+ }){% if not requirejs %}(vegaEmbed){% endif %};
+
+ </script>
+{%- if fullhtml %}
+</body>
+</html>
+{%- endif %}
+"""
+)
+
+
+HTML_TEMPLATE_UNIVERSAL = jinja2.Template(
+ """
+<div id="{{ output_div }}"></div>
+<script type="text/javascript">
+ var VEGA_DEBUG = (typeof VEGA_DEBUG == "undefined") ? {} : VEGA_DEBUG;
+ (function(spec, embedOpt){
+ let outputDiv = document.currentScript.previousElementSibling;
+ if (outputDiv.id !== "{{ output_div }}") {
+ outputDiv = document.getElementById("{{ output_div }}");
+ }
+ const paths = {
+ "vega": "{{ base_url }}/vega@{{ vega_version }}?noext",
+ "vega-lib": "{{ base_url }}/vega-lib?noext",
+ "vega-lite": "{{ base_url }}/vega-lite@{{ vegalite_version }}?noext",
+ "vega-embed": "{{ base_url }}/vega-embed@{{ vegaembed_version }}?noext",
+ };
+
+ function maybeLoadScript(lib, version) {
+ var key = `${lib.replace("-", "")}_version`;
+ return (VEGA_DEBUG[key] == version) ?
+ Promise.resolve(paths[lib]) :
+ new Promise(function(resolve, reject) {
+ var s = document.createElement('script');
+ document.getElementsByTagName("head")[0].appendChild(s);
+ s.async = true;
+ s.onload = () => {
+ VEGA_DEBUG[key] = version;
+ return resolve(paths[lib]);
+ };
+ s.onerror = () => reject(`Error loading script: ${paths[lib]}`);
+ s.src = paths[lib];
+ });
+ }
+
+ function showError(err) {
+ outputDiv.innerHTML = `<div class="error" style="color:red;">${err}</div>`;
+ throw err;
+ }
+
+ function displayChart(vegaEmbed) {
+ vegaEmbed(outputDiv, spec, embedOpt)
+ .catch(err => showError(`Javascript Error: ${err.message}<br>This usually means there's a typo in your chart specification. See the javascript console for the full traceback.`));
+ }
+
+ if(typeof define === "function" && define.amd) {
+ requirejs.config({paths});
+ require(["vega-embed"], displayChart, err => showError(`Error loading script: ${err.message}`));
+ } else {
+ maybeLoadScript("vega", "{{vega_version}}")
+ .then(() => maybeLoadScript("vega-lite", "{{vegalite_version}}"))
+ .then(() => maybeLoadScript("vega-embed", "{{vegaembed_version}}"))
+ .catch(showError)
+ .then(() => displayChart(vegaEmbed));
+ }
+ })({{ spec }}, {{ embed_options }});
+</script>
+"""
+)
+
+
+TEMPLATES = {
+ "standard": HTML_TEMPLATE,
+ "universal": HTML_TEMPLATE_UNIVERSAL,
+}
+
+
+def spec_to_html(
+ spec,
+ mode,
+ vega_version,
+ vegaembed_version,
+ vegalite_version=None,
+ base_url="https://cdn.jsdelivr.net/npm/",
+ output_div="vis",
+ embed_options=None,
+ json_kwds=None,
+ fullhtml=True,
+ requirejs=False,
+ template="standard",
+):
+ """Embed a Vega/Vega-Lite spec into an HTML page
+
+ Parameters
+ ----------
+ spec : dict
+ a dictionary representing a vega-lite plot spec.
+ mode : string {'vega' | 'vega-lite'}
+ The rendering mode. This value is overridden by embed_options['mode'],
+ if it is present.
+ vega_version : string
+ For html output, the version of vega.js to use.
+ vegalite_version : string
+ For html output, the version of vegalite.js to use.
+ vegaembed_version : string
+ For html output, the version of vegaembed.js to use.
+ base_url : string (optional)
+ The base url from which to load the javascript libraries.
+ output_div : string (optional)
+ The id of the div element where the plot will be shown.
+ embed_options : dict (optional)
+ Dictionary of options to pass to the vega-embed script. Default
+ entry is {'mode': mode}.
+ json_kwds : dict (optional)
+ Dictionary of keywords to pass to json.dumps().
+ fullhtml : boolean (optional)
+ If True (default) then return a full html page. If False, then return
+ an HTML snippet that can be embedded into an HTML page.
+ requirejs : boolean (optional)
+ If False (default) then load libraries from base_url using <script>
+ tags. If True, then load libraries using requirejs
+ template : jinja2.Template or string (optional)
+ Specify the template to use (default = 'standard'). If template is a
+ string, it must be one of {'universal', 'standard'}. Otherwise, it
+ can be a jinja2.Template object containing a custom template.
+
+ Returns
+ -------
+ output : string
+ an HTML string for rendering the chart.
+ """
+ embed_options = embed_options or {}
+ json_kwds = json_kwds or {}
+
+ mode = embed_options.setdefault("mode", mode)
+
+ if mode not in ["vega", "vega-lite"]:
+ raise ValueError("mode must be either 'vega' or 'vega-lite'")
+
+ if vega_version is None:
+ raise ValueError("must specify vega_version")
+
+ if vegaembed_version is None:
+ raise ValueError("must specify vegaembed_version")
+
+ if mode == "vega-lite" and vegalite_version is None:
+ raise ValueError("must specify vega-lite version for mode='vega-lite'")
+
+ template = TEMPLATES.get(template, template)
+ if not hasattr(template, "render"):
+ raise ValueError("Invalid template: {0}".format(template))
+
+ return template.render(
+ spec=json.dumps(spec, **json_kwds),
+ embed_options=json.dumps(embed_options),
+ mode=mode,
+ vega_version=vega_version,
+ vegalite_version=vegalite_version,
+ vegaembed_version=vegaembed_version,
+ base_url=base_url,
+ output_div=output_div,
+ fullhtml=fullhtml,
+ requirejs=requirejs,
+ )
diff --git a/venv/lib/python3.9/site-packages/altair/utils/mimebundle.py b/venv/lib/python3.9/site-packages/altair/utils/mimebundle.py
new file mode 100644
index 00000000..b7580256
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/utils/mimebundle.py
@@ -0,0 +1,83 @@
+from .html import spec_to_html
+
+
+def spec_to_mimebundle(
+ spec,
+ format,
+ mode=None,
+ vega_version=None,
+ vegaembed_version=None,
+ vegalite_version=None,
+ **kwargs,
+):
+ """Convert a vega/vega-lite specification to a mimebundle
+
+ The mimebundle type is controlled by the ``format`` argument, which can be
+ one of the following ['html', 'json', 'png', 'svg', 'pdf', 'vega', 'vega-lite']
+
+ Parameters
+ ----------
+ spec : dict
+ a dictionary representing a vega-lite plot spec
+ format : string {'html', 'json', 'png', 'svg', 'pdf', 'vega', 'vega-lite'}
+ the file format to be saved.
+ mode : string {'vega', 'vega-lite'}
+ The rendering mode.
+ vega_version : string
+ The version of vega.js to use
+ vegaembed_version : string
+ The version of vegaembed.js to use
+ vegalite_version : string
+ The version of vegalite.js to use. Only required if mode=='vega-lite'
+ **kwargs :
+ Additional arguments will be passed to the generating function
+
+ Returns
+ -------
+ output : dict
+ a mime-bundle representing the image
+
+ Note
+ ----
+ The png, svg, pdf, and vega outputs require the altair_saver package
+ to be installed.
+ """
+ if mode not in ["vega", "vega-lite"]:
+ raise ValueError("mode must be either 'vega' or 'vega-lite'")
+
+ if mode == "vega" and format == "vega":
+ if vega_version is None:
+ raise ValueError("Must specify vega_version")
+ return {"application/vnd.vega.v{}+json".format(vega_version[0]): spec}
+ if format in ["png", "svg", "pdf", "vega"]:
+ try:
+ import altair_saver
+ except ImportError:
+ raise ValueError(
+ "Saving charts in {fmt!r} format requires the altair_saver package: "
+ "see http://github.com/altair-viz/altair_saver/".format(fmt=format)
+ )
+ return altair_saver.render(spec, format, mode=mode, **kwargs)
+ if format == "html":
+ html = spec_to_html(
+ spec,
+ mode=mode,
+ vega_version=vega_version,
+ vegaembed_version=vegaembed_version,
+ vegalite_version=vegalite_version,
+ **kwargs,
+ )
+ return {"text/html": html}
+ if format == "vega-lite":
+ assert mode == "vega-lite" # sanity check: should never be False
+ if mode == "vega":
+ raise ValueError("Cannot convert a vega spec to vegalite")
+ if vegalite_version is None:
+ raise ValueError("Must specify vegalite_version")
+ return {"application/vnd.vegalite.v{}+json".format(vegalite_version[0]): spec}
+ if format == "json":
+ return {"application/json": spec}
+ raise ValueError(
+ "format must be one of "
+ "['html', 'json', 'png', 'svg', 'pdf', 'vega', 'vega-lite']"
+ )
diff --git a/venv/lib/python3.9/site-packages/altair/utils/plugin_registry.py b/venv/lib/python3.9/site-packages/altair/utils/plugin_registry.py
new file mode 100644
index 00000000..b03cea76
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/utils/plugin_registry.py
@@ -0,0 +1,199 @@
+from typing import Any, Dict, List, Optional, Generic, TypeVar, cast
+from types import TracebackType
+
+import entrypoints
+from toolz import curry
+
+
+PluginType = TypeVar("PluginType")
+
+
+class PluginEnabler(object):
+ """Context manager for enabling plugins
+
+ This object lets you use enable() as a context manager to
+ temporarily enable a given plugin::
+
+ with plugins.enable('name'):
+ do_something() # 'name' plugin temporarily enabled
+ # plugins back to original state
+ """
+
+ def __init__(self, registry: "PluginRegistry", name: str, **options):
+ self.registry = registry # type: PluginRegistry
+ self.name = name # type: str
+ self.options = options # type: Dict[str, Any]
+ self.original_state = registry._get_state() # type: Dict[str, Any]
+ self.registry._enable(name, **options)
+
+ def __enter__(self) -> "PluginEnabler":
+ return self
+
+ def __exit__(self, typ: type, value: Exception, traceback: TracebackType) -> None:
+ self.registry._set_state(self.original_state)
+
+ def __repr__(self) -> str:
+ return "{}.enable({!r})".format(self.registry.__class__.__name__, self.name)
+
+
+class PluginRegistry(Generic[PluginType]):
+ """A registry for plugins.
+
+ This is a plugin registry that allows plugins to be loaded/registered
+ in two ways:
+
+ 1. Through an explicit call to ``.register(name, value)``.
+ 2. By looking for other Python packages that are installed and provide
+ a setuptools entry point group.
+
+ When you create an instance of this class, provide the name of the
+ entry point group to use::
+
+ reg = PluginRegister('my_entrypoint_group')
+
+ """
+
+ # this is a mapping of name to error message to allow custom error messages
+ # in case an entrypoint is not found
+ entrypoint_err_messages = {} # type: Dict[str, str]
+
+ # global settings is a key-value mapping of settings that are stored globally
+ # in the registry rather than passed to the plugins
+ _global_settings = {} # type: Dict[str, Any]
+
+ def __init__(self, entry_point_group: str = "", plugin_type: type = object):
+ """Create a PluginRegistry for a named entry point group.
+
+ Parameters
+ ==========
+ entry_point_group: str
+ The name of the entry point group.
+ plugin_type: object
+ A type that will optionally be used for runtime type checking of
+ loaded plugins using isinstance.
+ """
+ self.entry_point_group = entry_point_group # type: str
+ self.plugin_type = plugin_type # type: Optional[type]
+ self._active = None # type: Optional[PluginType]
+ self._active_name = "" # type: str
+ self._plugins = {} # type: Dict[str, PluginType]
+ self._options = {} # type: Dict[str, Any]
+ self._global_settings = self.__class__._global_settings.copy() # type: dict
+
+ def register(self, name: str, value: Optional[PluginType]) -> Optional[PluginType]:
+ """Register a plugin by name and value.
+
+ This method is used for explicit registration of a plugin and shouldn't be
+ used to manage entry point managed plugins, which are auto-loaded.
+
+ Parameters
+ ==========
+ name: str
+ The name of the plugin.
+ value: PluginType or None
+ The actual plugin object to register or None to unregister that plugin.
+
+ Returns
+ =======
+ plugin: PluginType or None
+ The plugin that was registered or unregistered.
+ """
+ if value is None:
+ return self._plugins.pop(name, None)
+ else:
+ assert isinstance(value, self.plugin_type)
+ self._plugins[name] = value
+ return value
+
+ def names(self) -> List[str]:
+ """List the names of the registered and entry points plugins."""
+ exts = list(self._plugins.keys())
+ more_exts = [
+ ep.name for ep in entrypoints.get_group_all(self.entry_point_group)
+ ]
+ exts.extend(more_exts)
+ return sorted(set(exts))
+
+ def _get_state(self) -> Dict[str, Any]:
+ """Return a dictionary representing the current state of the registry"""
+ return {
+ "_active": self._active,
+ "_active_name": self._active_name,
+ "_plugins": self._plugins.copy(),
+ "_options": self._options.copy(),
+ "_global_settings": self._global_settings.copy(),
+ }
+
+ def _set_state(self, state: Dict[str, Any]) -> None:
+ """Reset the state of the registry"""
+ assert set(state.keys()) == {
+ "_active",
+ "_active_name",
+ "_plugins",
+ "_options",
+ "_global_settings",
+ }
+ for key, val in state.items():
+ setattr(self, key, val)
+
+ def _enable(self, name: str, **options) -> None:
+ if name not in self._plugins:
+ try:
+ ep = entrypoints.get_single(self.entry_point_group, name)
+ except entrypoints.NoSuchEntryPoint:
+ if name in self.entrypoint_err_messages:
+ raise ValueError(self.entrypoint_err_messages[name])
+ else:
+ raise
+ value = cast(PluginType, ep.load())
+ self.register(name, value)
+ self._active_name = name
+ self._active = self._plugins[name]
+ for key in set(options.keys()) & set(self._global_settings.keys()):
+ self._global_settings[key] = options.pop(key)
+ self._options = options
+
+ def enable(self, name: Optional[str] = None, **options) -> PluginEnabler:
+ """Enable a plugin by name.
+
+ This can be either called directly, or used as a context manager.
+
+ Parameters
+ ----------
+ name : string (optional)
+ The name of the plugin to enable. If not specified, then use the
+ current active name.
+ **options :
+ Any additional parameters will be passed to the plugin as keyword
+ arguments
+
+ Returns
+ -------
+ PluginEnabler:
+ An object that allows enable() to be used as a context manager
+ """
+ if name is None:
+ name = self.active
+ return PluginEnabler(self, name, **options)
+
+ @property
+ def active(self) -> str:
+ """Return the name of the currently active plugin"""
+ return self._active_name
+
+ @property
+ def options(self) -> Dict[str, Any]:
+ """Return the current options dictionary"""
+ return self._options
+
+ def get(self) -> Optional[PluginType]:
+ """Return the currently active plugin."""
+ if self._options:
+ return curry(self._active, **self._options)
+ else:
+ return self._active
+
+ def __repr__(self) -> str:
+ return "{}(active={!r}, registered={!r})" "".format(
+ self.__class__.__name__, self._active_name, list(self.names())
+ )
diff --git a/venv/lib/python3.9/site-packages/altair/utils/save.py b/venv/lib/python3.9/site-packages/altair/utils/save.py
new file mode 100644
index 00000000..94ddab6f
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/utils/save.py
@@ -0,0 +1,134 @@
+import json
+import pathlib
+
+from .mimebundle import spec_to_mimebundle
+
+
+def write_file_or_filename(fp, content, mode="w"):
+ """Write content to fp, whether fp is a string, a pathlib Path or a
+ file-like object"""
+ if isinstance(fp, str) or isinstance(fp, pathlib.PurePath):
+ with open(fp, mode) as f:
+ f.write(content)
+ else:
+ fp.write(content)
+
+
+def save(
+ chart,
+ fp,
+ vega_version,
+ vegaembed_version,
+ format=None,
+ mode=None,
+ vegalite_version=None,
+ embed_options=None,
+ json_kwds=None,
+ webdriver="chrome",
+ scale_factor=1,
+ **kwargs,
+):
+ """Save a chart to file in a variety of formats
+
+ Supported formats are [json, html, png, svg]
+
+ Parameters
+ ----------
+ chart : alt.Chart
+ the chart instance to save
+ fp : string filename, pathlib.Path or file-like object
+ file to which to write the chart.
+ format : string (optional)
+ the format to write: one of ['json', 'html', 'png', 'svg'].
+ If not specified, the format will be determined from the filename.
+ mode : string (optional)
+ Either 'vega' or 'vegalite'. If not specified, then infer the mode from
+ the '$schema' property of the spec, or the ``opt`` dictionary.
+ If it's not specified in either of those places, then use 'vegalite'.
+ vega_version : string
+ For html output, the version of vega.js to use
+ vegalite_version : string
+ For html output, the version of vegalite.js to use
+ vegaembed_version : string
+ For html output, the version of vegaembed.js to use
+ embed_options : dict
+ The vegaEmbed options dictionary. Default is {}
+ (See https://github.com/vega/vega-embed for details)
+ json_kwds : dict
+ Additional keyword arguments are passed to the output method
+ associated with the specified format.
+ webdriver : string {'chrome' | 'firefox'}
+ Webdriver to use for png or svg output
+ scale_factor : float
+ scale_factor to use to change size/resolution of png or svg output
+ **kwargs :
+ additional kwargs passed to spec_to_mimebundle.
+ """
+ if json_kwds is None:
+ json_kwds = {}
+
+ if embed_options is None:
+ embed_options = {}
+
+ if format is None:
+ if isinstance(fp, str):
+ format = fp.split(".")[-1]
+ elif isinstance(fp, pathlib.PurePath):
+ format = fp.suffix.lstrip(".")
+ else:
+ raise ValueError(
+ "must specify file format: " "['png', 'svg', 'pdf', 'html', 'json']"
+ )
+
+ spec = chart.to_dict()
+
+ if mode is None:
+ if "mode" in embed_options:
+ mode = embed_options["mode"]
+ elif "$schema" in spec:
+ mode = spec["$schema"].split("/")[-2]
+ else:
+ mode = "vega-lite"
+
+ if mode not in ["vega", "vega-lite"]:
+ raise ValueError("mode must be 'vega' or 'vega-lite', " "not '{}'".format(mode))
+
+ if mode == "vega-lite" and vegalite_version is None:
+ raise ValueError("must specify vega-lite version")
+
+ if format == "json":
+ json_spec = json.dumps(spec, **json_kwds)
+ write_file_or_filename(fp, json_spec, mode="w")
+ elif format == "html":
+ mimebundle = spec_to_mimebundle(
+ spec=spec,
+ format=format,
+ mode=mode,
+ vega_version=vega_version,
+ vegalite_version=vegalite_version,
+ vegaembed_version=vegaembed_version,
+ embed_options=embed_options,
+ json_kwds=json_kwds,
+ **kwargs,
+ )
+ write_file_or_filename(fp, mimebundle["text/html"], mode="w")
+ elif format in ["png", "svg", "pdf"]:
+ mimebundle = spec_to_mimebundle(
+ spec=spec,
+ format=format,
+ mode=mode,
+ vega_version=vega_version,
+ vegalite_version=vegalite_version,
+ vegaembed_version=vegaembed_version,
+ webdriver=webdriver,
+ scale_factor=scale_factor,
+ **kwargs,
+ )
+ if format == "png":
+ write_file_or_filename(fp, mimebundle["image/png"], mode="wb")
+ elif format == "pdf":
+ write_file_or_filename(fp, mimebundle["application/pdf"], mode="wb")
+ else:
+ write_file_or_filename(fp, mimebundle["image/svg+xml"], mode="w")
+ else:
+ raise ValueError("unrecognized format: '{}'".format(format))
diff --git a/venv/lib/python3.9/site-packages/altair/utils/schemapi.py b/venv/lib/python3.9/site-packages/altair/utils/schemapi.py
new file mode 100644
index 00000000..d3e1aef8
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/utils/schemapi.py
@@ -0,0 +1,605 @@
+# The contents of this file are automatically written by
+# tools/generate_schema_wrapper.py. Do not modify directly.
+import collections
+import contextlib
+import inspect
+import json
+
+import jsonschema
+import jsonschema.exceptions
+import numpy as np
+import pandas as pd
+
+JSONSCHEMA_VALIDATOR = jsonschema.Draft7Validator
+# If DEBUG_MODE is True, then schema objects are converted to dict and
+# validated at creation time. This slows things down, particularly for
+# larger specs, but leads to much more useful tracebacks for the user.
+# Individual schema classes can override this by setting the
+# class-level _class_is_valid_at_instantiation attribute to False
+DEBUG_MODE = True
+
+
+def enable_debug_mode():
+ global DEBUG_MODE
+ DEBUG_MODE = True
+
+
+def disable_debug_mode():
+ global DEBUG_MODE
+ DEBUG_MODE = True
+
+
+@contextlib.contextmanager
+def debug_mode(arg):
+ global DEBUG_MODE
+ original = DEBUG_MODE
+ DEBUG_MODE = arg
+ try:
+ yield
+ finally:
+ DEBUG_MODE = original
+
+
+def validate_jsonschema(spec, schema, resolver=None):
+ # We don't use jsonschema.validate as this would validate the schema itself.
+ # Instead, we pass the schema directly to the validator class. This is done for
+ # two reasons: The schema comes from Vega-Lite and is not based on the user
+ # input, therefore there is no need to validate it in the first place. Furthermore,
+ # the "uri-reference" format checker fails for some of the references as URIs in
+ # "$ref" are not encoded,
+ # e.g. '#/definitions/ValueDefWithCondition<MarkPropFieldOrDatumDef,
+ # (Gradient|string|null)>' would be a valid $ref in a Vega-Lite schema but
+ # it is not a valid URI reference due to the characters such as '<'.
+ validator_kwargs = {"resolver": resolver}
+ if hasattr(JSONSCHEMA_VALIDATOR, "FORMAT_CHECKER"):
+ validator_kwargs["format_checker"] = JSONSCHEMA_VALIDATOR.FORMAT_CHECKER
+ validator = JSONSCHEMA_VALIDATOR(schema, **validator_kwargs)
+ error = jsonschema.exceptions.best_match(validator.iter_errors(spec))
+ if error is not None:
+ raise error
+
+
+def _subclasses(cls):
+ """Breadth-first sequence of all classes which inherit from cls."""
+ seen = set()
+ current_set = {cls}
+ while current_set:
+ seen |= current_set
+ current_set = set.union(*(set(cls.__subclasses__()) for cls in current_set))
+ for cls in current_set - seen:
+ yield cls
+
+
+def _todict(obj, validate, context):
+ """Convert an object to a dict representation."""
+ if isinstance(obj, SchemaBase):
+ return obj.to_dict(validate=validate, context=context)
+ elif isinstance(obj, (list, tuple, np.ndarray)):
+ return [_todict(v, validate, context) for v in obj]
+ elif isinstance(obj, dict):
+ return {
+ k: _todict(v, validate, context)
+ for k, v in obj.items()
+ if v is not Undefined
+ }
+ elif hasattr(obj, "to_dict"):
+ return obj.to_dict()
+ elif isinstance(obj, np.number):
+ return float(obj)
+ elif isinstance(obj, (pd.Timestamp, np.datetime64)):
+ return pd.Timestamp(obj).isoformat()
+ else:
+ return obj
+
+
+def _resolve_references(schema, root=None):
+ """Resolve schema references."""
+ resolver = jsonschema.RefResolver.from_schema(root or schema)
+ while "$ref" in schema:
+ with resolver.resolving(schema["$ref"]) as resolved:
+ schema = resolved
+ return schema
+
+
+class SchemaValidationError(jsonschema.ValidationError):
+ """A wrapper for jsonschema.ValidationError with friendlier traceback"""
+
+ def __init__(self, obj, err):
+ super(SchemaValidationError, self).__init__(**self._get_contents(err))
+ self.obj = obj
+
+ @staticmethod
+ def _get_contents(err):
+ """Get a dictionary with the contents of a ValidationError"""
+ try:
+ # works in jsonschema 2.3 or later
+ contents = err._contents()
+ except AttributeError:
+ try:
+ # works in Python >=3.4
+ spec = inspect.getfullargspec(err.__init__)
+ except AttributeError:
+ # works in Python <3.4
+ spec = inspect.getargspec(err.__init__)
+ contents = {key: getattr(err, key) for key in spec.args[1:]}
+ return contents
+
+ def __str__(self):
+ cls = self.obj.__class__
+ schema_path = ["{}.{}".format(cls.__module__, cls.__name__)]
+ schema_path.extend(self.schema_path)
+ schema_path = "->".join(
+ str(val)
+ for val in schema_path[:-1]
+ if val not in ("properties", "additionalProperties", "patternProperties")
+ )
+ return """Invalid specification
+
+ {}, validating {!r}
+
+ {}
+ """.format(
+ schema_path, self.validator, self.message
+ )
+
+
+class UndefinedType(object):
+ """A singleton object for marking undefined attributes"""
+
+ __instance = None
+
+ def __new__(cls, *args, **kwargs):
+ if not isinstance(cls.__instance, cls):
+ cls.__instance = object.__new__(cls, *args, **kwargs)
+ return cls.__instance
+
+ def __repr__(self):
+ return "Undefined"
+
+
+Undefined = UndefinedType()
+
+
+class SchemaBase(object):
+ """Base class for schema wrappers.
+
+ Each derived class should set the _schema class attribute (and optionally
+ the _rootschema class attribute) which is used for validation.
+ """
+
+ _schema = None
+ _rootschema = None
+ _class_is_valid_at_instantiation = True
+ _validator = JSONSCHEMA_VALIDATOR
+
+ def __init__(self, *args, **kwds):
+ # Two valid options for initialization, which should be handled by
+ # derived classes:
+ # - a single arg with no kwds, for, e.g. {'type': 'string'}
+ # - zero args with zero or more kwds for {'type': 'object'}
+ if self._schema is None:
+ raise ValueError(
+ "Cannot instantiate object of type {}: "
+ "_schema class attribute is not defined."
+ "".format(self.__class__)
+ )
+
+ if kwds:
+ assert len(args) == 0
+ else:
+ assert len(args) in [0, 1]
+
+ # use object.__setattr__ because we override setattr below.
+ object.__setattr__(self, "_args", args)
+ object.__setattr__(self, "_kwds", kwds)
+
+ if DEBUG_MODE and self._class_is_valid_at_instantiation:
+ self.to_dict(validate=True)
+
+ def copy(self, deep=True, ignore=()):
+ """Return a copy of the object
+
+ Parameters
+ ----------
+ deep : boolean or list, optional
+ If True (default) then return a deep copy of all dict, list, and
+ SchemaBase objects within the object structure.
+ If False, then only copy the top object.
+ If a list or iterable, then only copy the listed attributes.
+ ignore : list, optional
+ A list of keys for which the contents should not be copied, but
+ only stored by reference.
+ """
+
+ def _shallow_copy(obj):
+ if isinstance(obj, SchemaBase):
+ return obj.copy(deep=False)
+ elif isinstance(obj, list):
+ return obj[:]
+ elif isinstance(obj, dict):
+ return obj.copy()
+ else:
+ return obj
+
+ def _deep_copy(obj, ignore=()):
+ if isinstance(obj, SchemaBase):
+ args = tuple(_deep_copy(arg) for arg in obj._args)
+ kwds = {
+ k: (_deep_copy(v, ignore=ignore) if k not in ignore else v)
+ for k, v in obj._kwds.items()
+ }
+ with debug_mode(False):
+ return obj.__class__(*args, **kwds)
+ elif isinstance(obj, list):
+ return [_deep_copy(v, ignore=ignore) for v in obj]
+ elif isinstance(obj, dict):
+ return {
+ k: (_deep_copy(v, ignore=ignore) if k not in ignore else v)
+ for k, v in obj.items()
+ }
+ else:
+ return obj
+
+ try:
+ deep = list(deep)
+ except TypeError:
+ deep_is_list = False
+ else:
+ deep_is_list = True
+
+ if deep and not deep_is_list:
+ return _deep_copy(self, ignore=ignore)
+
+ with debug_mode(False):
+ copy = self.__class__(*self._args, **self._kwds)
+ if deep_is_list:
+ for attr in deep:
+ copy[attr] = _shallow_copy(copy._get(attr))
+ return copy
+
+ def _get(self, attr, default=Undefined):
+ """Get an attribute, returning default if not present."""
+ attr = self._kwds.get(attr, Undefined)
+ if attr is Undefined:
+ attr = default
+ return attr
+
+ def __getattr__(self, attr):
+ # reminder: getattr is called after the normal lookups
+ if attr == "_kwds":
+ raise AttributeError()
+ if attr in self._kwds:
+ return self._kwds[attr]
+ else:
+ try:
+ _getattr = super(SchemaBase, self).__getattr__
+ except AttributeError:
+ _getattr = super(SchemaBase, self).__getattribute__
+ return _getattr(attr)
+
+ def __setattr__(self, item, val):
+ self._kwds[item] = val
+
+ def __getitem__(self, item):
+ return self._kwds[item]
+
+ def __setitem__(self, item, val):
+ self._kwds[item] = val
+
+ def __repr__(self):
+ if self._kwds:
+ args = (
+ "{}: {!r}".format(key, val)
+ for key, val in sorted(self._kwds.items())
+ if val is not Undefined
+ )
+ args = "\n" + ",\n".join(args)
+ return "{0}({{{1}\n}})".format(
+ self.__class__.__name__, args.replace("\n", "\n ")
+ )
+ else:
+ return "{}({!r})".format(self.__class__.__name__, self._args[0])
+
+ def __eq__(self, other):
+ return (
+ type(self) is type(other)
+ and self._args == other._args
+ and self._kwds == other._kwds
+ )
+
+ def to_dict(self, validate=True, ignore=None, context=None):
+ """Return a dictionary representation of the object
+
+ Parameters
+ ----------
+ validate : boolean or string
+ If True (default), then validate the output dictionary
+ against the schema. If "deep" then recursively validate
+ all objects in the spec. This takes much more time, but
+ it results in friendlier tracebacks for large objects.
+ ignore : list
+ A list of keys to ignore. This will *not* passed to child to_dict
+ function calls.
+ context : dict (optional)
+ A context dictionary that will be passed to all child to_dict
+ function calls
+
+ Returns
+ -------
+ dct : dictionary
+ The dictionary representation of this object
+
+ Raises
+ ------
+ jsonschema.ValidationError :
+ if validate=True and the dict does not conform to the schema
+ """
+ if context is None:
+ context = {}
+ if ignore is None:
+ ignore = []
+ sub_validate = "deep" if validate == "deep" else False
+
+ if self._args and not self._kwds:
+ result = _todict(self._args[0], validate=sub_validate, context=context)
+ elif not self._args:
+ result = _todict(
+ {k: v for k, v in self._kwds.items() if k not in ignore},
+ validate=sub_validate,
+ context=context,
+ )
+ else:
+ raise ValueError(
+ "{} instance has both a value and properties : "
+ "cannot serialize to dict".format(self.__class__)
+ )
+ if validate:
+ try:
+ self.validate(result)
+ except jsonschema.ValidationError as err:
+ raise SchemaValidationError(self, err)
+ return result
+
+ def to_json(
+ self, validate=True, ignore=[], context={}, indent=2, sort_keys=True, **kwargs
+ ):
+ """Emit the JSON representation for this object as a string.
+
+ Parameters
+ ----------
+ validate : boolean or string
+ If True (default), then validate the output dictionary
+ against the schema. If "deep" then recursively validate
+ all objects in the spec. This takes much more time, but
+ it results in friendlier tracebacks for large objects.
+ ignore : list
+ A list of keys to ignore. This will *not* passed to child to_dict
+ function calls.
+ context : dict (optional)
+ A context dictionary that will be passed to all child to_dict
+ function calls
+ indent : integer, default 2
+ the number of spaces of indentation to use
+ sort_keys : boolean, default True
+ if True, sort keys in the output
+ **kwargs
+ Additional keyword arguments are passed to ``json.dumps()``
+
+ Returns
+ -------
+ spec : string
+ The JSON specification of the chart object.
+ """
+ dct = self.to_dict(validate=validate, ignore=ignore, context=context)
+ return json.dumps(dct, indent=indent, sort_keys=sort_keys, **kwargs)
+
+ @classmethod
+ def _default_wrapper_classes(cls):
+ """Return the set of classes used within cls.from_dict()"""
+ return _subclasses(SchemaBase)
+
+ @classmethod
+ def from_dict(cls, dct, validate=True, _wrapper_classes=None):
+ """Construct class from a dictionary representation
+
+ Parameters
+ ----------
+ dct : dictionary
+ The dict from which to construct the class
+ validate : boolean
+ If True (default), then validate the input against the schema.
+ _wrapper_classes : list (optional)
+ The set of SchemaBase classes to use when constructing wrappers
+ of the dict inputs. If not specified, the result of
+ cls._default_wrapper_classes will be used.
+
+ Returns
+ -------
+ obj : Schema object
+ The wrapped schema
+
+ Raises
+ ------
+ jsonschema.ValidationError :
+ if validate=True and dct does not conform to the schema
+ """
+ if validate:
+ cls.validate(dct)
+ if _wrapper_classes is None:
+ _wrapper_classes = cls._default_wrapper_classes()
+ converter = _FromDict(_wrapper_classes)
+ return converter.from_dict(dct, cls)
+
+ @classmethod
+ def from_json(cls, json_string, validate=True, **kwargs):
+ """Instantiate the object from a valid JSON string
+
+ Parameters
+ ----------
+ json_string : string
+ The string containing a valid JSON chart specification.
+ validate : boolean
+ If True (default), then validate the input against the schema.
+ **kwargs :
+ Additional keyword arguments are passed to json.loads
+
+ Returns
+ -------
+ chart : Chart object
+ The altair Chart object built from the specification.
+ """
+ dct = json.loads(json_string, **kwargs)
+ return cls.from_dict(dct, validate=validate)
+
+ @classmethod
+ def validate(cls, instance, schema=None):
+ """
+ Validate the instance against the class schema in the context of the
+ rootschema.
+ """
+ if schema is None:
+ schema = cls._schema
+ resolver = jsonschema.RefResolver.from_schema(cls._rootschema or cls._schema)
+ return validate_jsonschema(instance, schema, resolver=resolver)
+
+ @classmethod
+ def resolve_references(cls, schema=None):
+ """Resolve references in the context of this object's schema or root schema."""
+ return _resolve_references(
+ schema=(schema or cls._schema),
+ root=(cls._rootschema or cls._schema or schema),
+ )
+
+ @classmethod
+ def validate_property(cls, name, value, schema=None):
+ """
+ Validate a property against property schema in the context of the
+ rootschema
+ """
+ value = _todict(value, validate=False, context={})
+ props = cls.resolve_references(schema or cls._schema).get("properties", {})
+ resolver = jsonschema.RefResolver.from_schema(cls._rootschema or cls._schema)
+ return validate_jsonschema(value, props.get(name, {}), resolver=resolver)
+
+ def __dir__(self):
+ return list(self._kwds.keys())
+
+
+def _passthrough(*args, **kwds):
+ return args[0] if args else kwds
+
+
+class _FromDict(object):
+ """Class used to construct SchemaBase class hierarchies from a dict
+
+ The primary purpose of using this class is to be able to build a hash table
+ that maps schemas to their wrapper classes. The candidate classes are
+ specified in the ``class_list`` argument to the constructor.
+ """
+
+ _hash_exclude_keys = ("definitions", "title", "description", "$schema", "id")
+
+ def __init__(self, class_list):
+ # Create a mapping of a schema hash to a list of matching classes
+ # This lets us quickly determine the correct class to construct
+ self.class_dict = collections.defaultdict(list)
+ for cls in class_list:
+ if cls._schema is not None:
+ self.class_dict[self.hash_schema(cls._schema)].append(cls)
+
+ @classmethod
+ def hash_schema(cls, schema, use_json=True):
+ """
+ Compute a python hash for a nested dictionary which
+ properly handles dicts, lists, sets, and tuples.
+
+ At the top level, the function excludes from the hashed schema all keys
+ listed in `exclude_keys`.
+
+ This implements two methods: one based on conversion to JSON, and one based
+ on recursive conversions of unhashable to hashable types; the former seems
+ to be slightly faster in several benchmarks.
+ """
+ if cls._hash_exclude_keys and isinstance(schema, dict):
+ schema = {
+ key: val
+ for key, val in schema.items()
+ if key not in cls._hash_exclude_keys
+ }
+ if use_json:
+ s = json.dumps(schema, sort_keys=True)
+ return hash(s)
+ else:
+
+ def _freeze(val):
+ if isinstance(val, dict):
+ return frozenset((k, _freeze(v)) for k, v in val.items())
+ elif isinstance(val, set):
+ return frozenset(map(_freeze, val))
+ elif isinstance(val, list) or isinstance(val, tuple):
+ return tuple(map(_freeze, val))
+ else:
+ return val
+
+ return hash(_freeze(schema))
+
+ def from_dict(
+ self, dct, cls=None, schema=None, rootschema=None, default_class=_passthrough
+ ):
+ """Construct an object from a dict representation"""
+ if (schema is None) == (cls is None):
+ raise ValueError("Must provide either cls or schema, but not both.")
+ if schema is None:
+ schema = schema or cls._schema
+ rootschema = rootschema or cls._rootschema
+ rootschema = rootschema or schema
+
+ if isinstance(dct, SchemaBase):
+ return dct
+
+ if cls is None:
+ # If there are multiple matches, we use the first one in the dict.
+ # Our class dict is constructed breadth-first from top to bottom,
+ # so the first class that matches is the most general match.
+ matches = self.class_dict[self.hash_schema(schema)]
+ if matches:
+ cls = matches[0]
+ else:
+ cls = default_class
+ schema = _resolve_references(schema, rootschema)
+
+ if "anyOf" in schema or "oneOf" in schema:
+ schemas = schema.get("anyOf", []) + schema.get("oneOf", [])
+ for possible_schema in schemas:
+ resolver = jsonschema.RefResolver.from_schema(rootschema)
+ try:
+ validate_jsonschema(dct, possible_schema, resolver=resolver)
+ except jsonschema.ValidationError:
+ continue
+ else:
+ return self.from_dict(
+ dct,
+ schema=possible_schema,
+ rootschema=rootschema,
+ default_class=cls,
+ )
+
+ if isinstance(dct, dict):
+ # TODO: handle schemas for additionalProperties/patternProperties
+ props = schema.get("properties", {})
+ kwds = {}
+ for key, val in dct.items():
+ if key in props:
+ val = self.from_dict(val, schema=props[key], rootschema=rootschema)
+ kwds[key] = val
+ return cls(**kwds)
+
+ elif isinstance(dct, list):
+ item_schema = schema.get("items", {})
+ dct = [
+ self.from_dict(val, schema=item_schema, rootschema=rootschema)
+ for val in dct
+ ]
+ return cls(dct)
+ else:
+ return cls(dct)
diff --git a/venv/lib/python3.9/site-packages/altair/utils/server.py b/venv/lib/python3.9/site-packages/altair/utils/server.py
new file mode 100644
index 00000000..f26a3f25
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/utils/server.py
@@ -0,0 +1,148 @@
+"""
+A Simple server used to show altair graphics from a prompt or script.
+
+This is adapted from the mpld3 package; see
+https://github.com/mpld3/mpld3/blob/master/mpld3/_server.py
+"""
+import sys
+import threading
+import webbrowser
+import socket
+from http import server
+from io import BytesIO as IO
+import itertools
+import random
+
+JUPYTER_WARNING = """
+Note: if you're in the Jupyter notebook, Chart.serve() is not the best
+ way to view plots. Consider using Chart.display().
+You must interrupt the kernel to cancel this command.
+"""
+
+
+# Mock server used for testing
+
+
+class MockRequest(object):
+ def makefile(self, *args, **kwargs):
+ return IO(b"GET /")
+
+ def sendall(self, response):
+ pass
+
+
+class MockServer(object):
+ def __init__(self, ip_port, Handler):
+ Handler(MockRequest(), ip_port[0], self)
+
+ def serve_forever(self):
+ pass
+
+ def server_close(self):
+ pass
+
+
+def generate_handler(html, files=None):
+ if files is None:
+ files = {}
+
+ class MyHandler(server.BaseHTTPRequestHandler):
+ def do_GET(self):
+ """Respond to a GET request."""
+ if self.path == "/":
+ self.send_response(200)
+ self.send_header("Content-type", "text/html")
+ self.end_headers()
+ self.wfile.write(html.encode())
+ elif self.path in files:
+ content_type, content = files[self.path]
+ self.send_response(200)
+ self.send_header("Content-type", content_type)
+ self.end_headers()
+ self.wfile.write(content.encode())
+ else:
+ self.send_error(404)
+
+ return MyHandler
+
+
+def find_open_port(ip, port, n=50):
+ """Find an open port near the specified port"""
+ ports = itertools.chain(
+ (port + i for i in range(n)), (port + random.randint(-2 * n, 2 * n))
+ )
+
+ for port in ports:
+ s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+ result = s.connect_ex((ip, port))
+ s.close()
+ if result != 0:
+ return port
+ raise ValueError("no open ports found")
+
+
+def serve(
+ html,
+ ip="127.0.0.1",
+ port=8888,
+ n_retries=50,
+ files=None,
+ jupyter_warning=True,
+ open_browser=True,
+ http_server=None,
+):
+ """Start a server serving the given HTML, and (optionally) open a browser
+
+ Parameters
+ ----------
+ html : string
+ HTML to serve
+ ip : string (default = '127.0.0.1')
+ ip address at which the HTML will be served.
+ port : int (default = 8888)
+ the port at which to serve the HTML
+ n_retries : int (default = 50)
+ the number of nearby ports to search if the specified port is in use.
+ files : dictionary (optional)
+ dictionary of extra content to serve
+ jupyter_warning : bool (optional)
+ if True (default), then print a warning if this is used within Jupyter
+ open_browser : bool (optional)
+ if True (default), then open a web browser to the given HTML
+ http_server : class (optional)
+ optionally specify an HTTPServer class to use for showing the
+ figure. The default is Python's basic HTTPServer.
+ """
+ port = find_open_port(ip, port, n_retries)
+ Handler = generate_handler(html, files)
+
+ if http_server is None:
+ srvr = server.HTTPServer((ip, port), Handler)
+ else:
+ srvr = http_server((ip, port), Handler)
+
+ if jupyter_warning:
+ try:
+ __IPYTHON__ # noqa
+ except NameError:
+ pass
+ else:
+ print(JUPYTER_WARNING)
+
+ # Start the server
+ print("Serving to http://{}:{}/ [Ctrl-C to exit]".format(ip, port))
+ sys.stdout.flush()
+
+ if open_browser:
+ # Use a thread to open a web browser pointing to the server
+ def b():
+ return webbrowser.open("http://{}:{}".format(ip, port))
+
+ threading.Thread(target=b).start()
+
+ try:
+ srvr.serve_forever()
+ except (KeyboardInterrupt, SystemExit):
+ print("\nstopping Server...")
+
+ srvr.server_close()
diff --git a/venv/lib/python3.9/site-packages/altair/utils/tests/__init__.py b/venv/lib/python3.9/site-packages/altair/utils/tests/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/utils/tests/__init__.py
diff --git a/venv/lib/python3.9/site-packages/altair/utils/tests/test_core.py b/venv/lib/python3.9/site-packages/altair/utils/tests/test_core.py
new file mode 100644
index 00000000..752fd918
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/utils/tests/test_core.py
@@ -0,0 +1,265 @@
+import types
+
+import numpy as np
+import pandas as pd
+import pytest
+
+import altair as alt
+from .. import parse_shorthand, update_nested, infer_encoding_types
+from ..core import infer_dtype
+
+FAKE_CHANNELS_MODULE = '''
+"""Fake channels module for utility tests."""
+
+from altair.utils import schemapi
+
+
+class FieldChannel(object):
+ def __init__(self, shorthand, **kwargs):
+ kwargs['shorthand'] = shorthand
+ return super(FieldChannel, self).__init__(**kwargs)
+
+
+class ValueChannel(object):
+ def __init__(self, value, **kwargs):
+ kwargs['value'] = value
+ return super(ValueChannel, self).__init__(**kwargs)
+
+
+class X(FieldChannel, schemapi.SchemaBase):
+ _schema = {}
+ _encoding_name = "x"
+
+
+class XValue(ValueChannel, schemapi.SchemaBase):
+ _schema = {}
+ _encoding_name = "x"
+
+
+class Y(FieldChannel, schemapi.SchemaBase):
+ _schema = {}
+ _encoding_name = "y"
+
+
+class YValue(ValueChannel, schemapi.SchemaBase):
+ _schema = {}
+ _encoding_name = "y"
+
+
+class StrokeWidth(FieldChannel, schemapi.SchemaBase):
+ _schema = {}
+ _encoding_name = "strokeWidth"
+
+
+class StrokeWidthValue(ValueChannel, schemapi.SchemaBase):
+ _schema = {}
+ _encoding_name = "strokeWidth"
+'''
+
+
+@pytest.mark.parametrize(
+ "value,expected_type",
+ [
+ ([1, 2, 3], "integer"),
+ ([1.0, 2.0, 3.0], "floating"),
+ ([1, 2.0, 3], "mixed-integer-float"),
+ (["a", "b", "c"], "string"),
+ (["a", "b", np.nan], "mixed"),
+ ],
+)
+def test_infer_dtype(value, expected_type):
+ assert infer_dtype(value) == expected_type
+
+
+def test_parse_shorthand():
+ def check(s, **kwargs):
+ assert parse_shorthand(s) == kwargs
+
+ check("")
+
+ # Fields alone
+ check("foobar", field="foobar")
+ check("blah:(fd ", field="blah:(fd ")
+
+ # Fields with type
+ check("foobar:quantitative", type="quantitative", field="foobar")
+ check("foobar:nominal", type="nominal", field="foobar")
+ check("foobar:ordinal", type="ordinal", field="foobar")
+ check("foobar:temporal", type="temporal", field="foobar")
+ check("foobar:geojson", type="geojson", field="foobar")
+
+ check("foobar:Q", type="quantitative", field="foobar")
+ check("foobar:N", type="nominal", field="foobar")
+ check("foobar:O", type="ordinal", field="foobar")
+ check("foobar:T", type="temporal", field="foobar")
+ check("foobar:G", type="geojson", field="foobar")
+
+ # Fields with aggregate and/or type
+ check("average(foobar)", field="foobar", aggregate="average")
+ check("min(foobar):temporal", type="temporal", field="foobar", aggregate="min")
+ check("sum(foobar):Q", type="quantitative", field="foobar", aggregate="sum")
+
+ # check that invalid arguments are not split-out
+ check("invalid(blah)", field="invalid(blah)")
+ check("blah:invalid", field="blah:invalid")
+ check("invalid(blah):invalid", field="invalid(blah):invalid")
+
+ # check parsing in presence of strange characters
+ check(
+ "average(a b:(c\nd):Q",
+ aggregate="average",
+ field="a b:(c\nd",
+ type="quantitative",
+ )
+
+ # special case: count doesn't need an argument
+ check("count()", aggregate="count", type="quantitative")
+ check("count():O", aggregate="count", type="ordinal")
+
+ # time units:
+ check("month(x)", field="x", timeUnit="month", type="temporal")
+ check("year(foo):O", field="foo", timeUnit="year", type="ordinal")
+ check("date(date):quantitative", field="date", timeUnit="date", type="quantitative")
+ check(
+ "yearmonthdate(field)", field="field", timeUnit="yearmonthdate", type="temporal"
+ )
+
+
+def test_parse_shorthand_with_data():
+ def check(s, data, **kwargs):
+ assert parse_shorthand(s, data) == kwargs
+
+ data = pd.DataFrame(
+ {
+ "x": [1, 2, 3, 4, 5],
+ "y": ["A", "B", "C", "D", "E"],
+ "z": pd.date_range("2018-01-01", periods=5, freq="D"),
+ "t": pd.date_range("2018-01-01", periods=5, freq="D").tz_localize("UTC"),
+ }
+ )
+
+ check("x", data, field="x", type="quantitative")
+ check("y", data, field="y", type="nominal")
+ check("z", data, field="z", type="temporal")
+ check("t", data, field="t", type="temporal")
+ check("count(x)", data, field="x", aggregate="count", type="quantitative")
+ check("count()", data, aggregate="count", type="quantitative")
+ check("month(z)", data, timeUnit="month", field="z", type="temporal")
+ check("month(t)", data, timeUnit="month", field="t", type="temporal")
+
+
+def test_parse_shorthand_all_aggregates():
+ aggregates = alt.Root._schema["definitions"]["AggregateOp"]["enum"]
+ for aggregate in aggregates:
+ shorthand = "{aggregate}(field):Q".format(aggregate=aggregate)
+ assert parse_shorthand(shorthand) == {
+ "aggregate": aggregate,
+ "field": "field",
+ "type": "quantitative",
+ }
+
+
+def test_parse_shorthand_all_timeunits():
+ timeUnits = []
+ for loc in ["Local", "Utc"]:
+ for typ in ["Single", "Multi"]:
+ defn = loc + typ + "TimeUnit"
+ timeUnits.extend(alt.Root._schema["definitions"][defn]["enum"])
+ for timeUnit in timeUnits:
+ shorthand = "{timeUnit}(field):Q".format(timeUnit=timeUnit)
+ assert parse_shorthand(shorthand) == {
+ "timeUnit": timeUnit,
+ "field": "field",
+ "type": "quantitative",
+ }
+
+
+def test_parse_shorthand_window_count():
+ shorthand = "count()"
+ dct = parse_shorthand(
+ shorthand,
+ parse_aggregates=False,
+ parse_window_ops=True,
+ parse_timeunits=False,
+ parse_types=False,
+ )
+ assert dct == {"op": "count"}
+
+
+def test_parse_shorthand_all_window_ops():
+ window_ops = alt.Root._schema["definitions"]["WindowOnlyOp"]["enum"]
+ aggregates = alt.Root._schema["definitions"]["AggregateOp"]["enum"]
+ for op in window_ops + aggregates:
+ shorthand = "{op}(field)".format(op=op)
+ dct = parse_shorthand(
+ shorthand,
+ parse_aggregates=False,
+ parse_window_ops=True,
+ parse_timeunits=False,
+ parse_types=False,
+ )
+ assert dct == {"field": "field", "op": op}
+
+
+def test_update_nested():
+ original = {"x": {"b": {"foo": 2}, "c": 4}}
+ update = {"x": {"b": {"foo": 5}, "d": 6}, "y": 40}
+
+ output = update_nested(original, update, copy=True)
+ assert output is not original
+ assert output == {"x": {"b": {"foo": 5}, "c": 4, "d": 6}, "y": 40}
+
+ output2 = update_nested(original, update)
+ assert output2 is original
+ assert output == output2
+
+
+@pytest.fixture
+def channels():
+ channels = types.ModuleType("channels")
+ exec(FAKE_CHANNELS_MODULE, channels.__dict__)
+ return channels
+
+
+def _getargs(*args, **kwargs):
+ return args, kwargs
+
+
+def test_infer_encoding_types(channels):
+ expected = dict(
+ x=channels.X("xval"),
+ y=channels.YValue("yval"),
+ strokeWidth=channels.StrokeWidthValue(value=4),
+ )
+
+ # All positional args
+ args, kwds = _getargs(
+ channels.X("xval"), channels.YValue("yval"), channels.StrokeWidthValue(4)
+ )
+ assert infer_encoding_types(args, kwds, channels) == expected
+
+ # All keyword args
+ args, kwds = _getargs(x="xval", y=alt.value("yval"), strokeWidth=alt.value(4))
+ assert infer_encoding_types(args, kwds, channels) == expected
+
+ # Mixed positional & keyword
+ args, kwds = _getargs(
+ channels.X("xval"), channels.YValue("yval"), strokeWidth=alt.value(4)
+ )
+ assert infer_encoding_types(args, kwds, channels) == expected
+
+
+def test_infer_encoding_types_with_condition(channels):
+ args, kwds = _getargs(
+ x=alt.condition("pred1", alt.value(1), alt.value(2)),
+ y=alt.condition("pred2", alt.value(1), "yval"),
+ strokeWidth=alt.condition("pred3", "sval", alt.value(2)),
+ )
+ expected = dict(
+ x=channels.XValue(2, condition=channels.XValue(1, test="pred1")),
+ y=channels.Y("yval", condition=channels.YValue(1, test="pred2")),
+ strokeWidth=channels.StrokeWidthValue(
+ 2, condition=channels.StrokeWidth("sval", test="pred3")
+ ),
+ )
+ assert infer_encoding_types(args, kwds, channels) == expected
diff --git a/venv/lib/python3.9/site-packages/altair/utils/tests/test_data.py b/venv/lib/python3.9/site-packages/altair/utils/tests/test_data.py
new file mode 100644
index 00000000..b4b4196f
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/utils/tests/test_data.py
@@ -0,0 +1,139 @@
+import os
+
+import pytest
+import pandas as pd
+from toolz import pipe
+
+from ..data import limit_rows, MaxRowsError, sample, to_values, to_json, to_csv
+
+
+def _create_dataframe(N):
+ data = pd.DataFrame({"x": range(N), "y": range(N)})
+ return data
+
+
+def _create_data_with_values(N):
+ data = {"values": [{"x": i, "y": i + 1} for i in range(N)]}
+ return data
+
+
+def test_limit_rows():
+ """Test the limit_rows data transformer."""
+ data = _create_dataframe(10)
+ result = limit_rows(data, max_rows=20)
+ assert data is result
+ with pytest.raises(MaxRowsError):
+ pipe(data, limit_rows(max_rows=5))
+ data = _create_data_with_values(10)
+ result = pipe(data, limit_rows(max_rows=20))
+ assert data is result
+ with pytest.raises(MaxRowsError):
+ limit_rows(data, max_rows=5)
+
+
+def test_sample():
+ """Test the sample data transformer."""
+ data = _create_dataframe(20)
+ result = pipe(data, sample(n=10))
+ assert len(result) == 10
+ assert isinstance(result, pd.DataFrame)
+ data = _create_data_with_values(20)
+ result = sample(data, n=10)
+ assert isinstance(result, dict)
+ assert "values" in result
+ assert len(result["values"]) == 10
+ data = _create_dataframe(20)
+ result = pipe(data, sample(frac=0.5))
+ assert len(result) == 10
+ assert isinstance(result, pd.DataFrame)
+ data = _create_data_with_values(20)
+ result = sample(data, frac=0.5)
+ assert isinstance(result, dict)
+ assert "values" in result
+ assert len(result["values"]) == 10
+
+
+def test_to_values():
+ """Test the to_values data transformer."""
+ data = _create_dataframe(10)
+ result = pipe(data, to_values)
+ assert result == {"values": data.to_dict(orient="records")}
+
+
+def test_type_error():
+ """Ensure that TypeError is raised for types other than dict/DataFrame."""
+ for f in (sample, limit_rows, to_values):
+ with pytest.raises(TypeError):
+ pipe(0, f)
+
+
+def test_dataframe_to_json():
+ """Test to_json
+ - make certain the filename is deterministic
+ - make certain the file contents match the data
+ """
+ data = _create_dataframe(10)
+ try:
+ result1 = pipe(data, to_json)
+ result2 = pipe(data, to_json)
+ filename = result1["url"]
+ output = pd.read_json(filename)
+ finally:
+ os.remove(filename)
+
+ assert result1 == result2
+ assert output.equals(data)
+
+
+def test_dict_to_json():
+ """Test to_json
+ - make certain the filename is deterministic
+ - make certain the file contents match the data
+ """
+ data = _create_data_with_values(10)
+ try:
+ result1 = pipe(data, to_json)
+ result2 = pipe(data, to_json)
+ filename = result1["url"]
+ output = pd.read_json(filename).to_dict(orient="records")
+ finally:
+ os.remove(filename)
+
+ assert result1 == result2
+ assert data == {"values": output}
+
+
+def test_dataframe_to_csv():
+ """Test to_csv with dataframe input
+ - make certain the filename is deterministic
+ - make certain the file contents match the data
+ """
+ data = _create_dataframe(10)
+ try:
+ result1 = pipe(data, to_csv)
+ result2 = pipe(data, to_csv)
+ filename = result1["url"]
+ output = pd.read_csv(filename)
+ finally:
+ os.remove(filename)
+
+ assert result1 == result2
+ assert output.equals(data)
+
+
+def test_dict_to_csv():
+ """Test to_csv with dict input
+ - make certain the filename is deterministic
+ - make certain the file contents match the data
+ """
+ data = _create_data_with_values(10)
+ try:
+ result1 = pipe(data, to_csv)
+ result2 = pipe(data, to_csv)
+ filename = result1["url"]
+ output = pd.read_csv(filename).to_dict(orient="records")
+ finally:
+ os.remove(filename)
+
+ assert result1 == result2
+ assert data == {"values": output}
diff --git a/venv/lib/python3.9/site-packages/altair/utils/tests/test_deprecation.py b/venv/lib/python3.9/site-packages/altair/utils/tests/test_deprecation.py
new file mode 100644
index 00000000..4754fb18
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/utils/tests/test_deprecation.py
@@ -0,0 +1,24 @@
+import pytest
+
+import altair as alt
+from altair.utils import AltairDeprecationWarning
+from altair.utils.deprecation import _deprecate, deprecated
+
+
+def test_deprecated_class():
+ OldChart = _deprecate(alt.Chart, "OldChart")
+ with pytest.warns(AltairDeprecationWarning) as record:
+ OldChart()
+ assert "alt.OldChart" in record[0].message.args[0]
+ assert "alt.Chart" in record[0].message.args[0]
+
+
+def test_deprecation_decorator():
+ @deprecated(message="func is deprecated")
+ def func(x):
+ return x + 1
+
+ with pytest.warns(AltairDeprecationWarning) as record:
+ y = func(1)
+ assert y == 2
+ assert record[0].message.args[0] == "func is deprecated"
diff --git a/venv/lib/python3.9/site-packages/altair/utils/tests/test_execeval.py b/venv/lib/python3.9/site-packages/altair/utils/tests/test_execeval.py
new file mode 100644
index 00000000..0cdd2cf4
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/utils/tests/test_execeval.py
@@ -0,0 +1,30 @@
+from ..execeval import eval_block
+
+HAS_RETURN = """
+x = 4
+y = 2 * x
+3 * y
+"""
+
+NO_RETURN = """
+x = 4
+y = 2 * x
+z = 3 * y
+"""
+
+
+def test_eval_block_with_return():
+ _globals = {}
+ result = eval_block(HAS_RETURN, _globals)
+ assert result == 24
+ assert _globals["x"] == 4
+ assert _globals["y"] == 8
+
+
+def test_eval_block_without_return():
+ _globals = {}
+ result = eval_block(NO_RETURN, _globals)
+ assert result is None
+ assert _globals["x"] == 4
+ assert _globals["y"] == 8
+ assert _globals["z"] == 24
diff --git a/venv/lib/python3.9/site-packages/altair/utils/tests/test_html.py b/venv/lib/python3.9/site-packages/altair/utils/tests/test_html.py
new file mode 100644
index 00000000..7e4445b0
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/utils/tests/test_html.py
@@ -0,0 +1,52 @@
+import pytest
+
+from ..html import spec_to_html
+
+
+@pytest.fixture
+def spec():
+ return {
+ "data": {"url": "data.json"},
+ "mark": "point",
+ "encoding": {
+ "x": {"field": "x", "type": "quantitative"},
+ "y": {"field": "y", "type": "quantitative"},
+ },
+ }
+
+
+@pytest.mark.parametrize("requirejs", [True, False])
+@pytest.mark.parametrize("fullhtml", [True, False])
+def test_spec_to_html(requirejs, fullhtml, spec):
+ # We can't test that the html actually renders, but we'll test aspects of
+ # it to make certain that the keywords are respected.
+ vegaembed_version = ("3.12",)
+ vegalite_version = ("3.0",)
+ vega_version = "4.0"
+
+ html = spec_to_html(
+ spec,
+ mode="vega-lite",
+ requirejs=requirejs,
+ fullhtml=fullhtml,
+ vegalite_version=vegalite_version,
+ vegaembed_version=vegaembed_version,
+ vega_version=vega_version,
+ )
+ html = html.strip()
+
+ if fullhtml:
+ assert html.startswith("<!DOCTYPE html>")
+ assert html.endswith("</html>")
+ else:
+ assert html.startswith("<style>")
+ assert html.endswith("</script>")
+
+ if requirejs:
+ assert "require(" in html
+ else:
+ assert "require(" not in html
+
+ assert "vega-lite@{}".format(vegalite_version) in html
+ assert "vega@{}".format(vega_version) in html
+ assert "vega-embed@{}".format(vegaembed_version) in html
diff --git a/venv/lib/python3.9/site-packages/altair/utils/tests/test_mimebundle.py b/venv/lib/python3.9/site-packages/altair/utils/tests/test_mimebundle.py
new file mode 100644
index 00000000..c893b7ce
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/utils/tests/test_mimebundle.py
@@ -0,0 +1,207 @@
+import pytest
+
+import altair as alt
+from ..mimebundle import spec_to_mimebundle
+
+
+@pytest.fixture
+def require_altair_saver():
+ try:
+ import altair_saver # noqa: F401
+ except ImportError:
+ pytest.skip("altair_saver not importable; cannot run saver tests")
+
+
+@pytest.fixture
+def vegalite_spec():
+ return {
+ "$schema": "https://vega.github.io/schema/vega-lite/v4.json",
+ "description": "A simple bar chart with embedded data.",
+ "data": {
+ "values": [
+ {"a": "A", "b": 28},
+ {"a": "B", "b": 55},
+ {"a": "C", "b": 43},
+ {"a": "D", "b": 91},
+ {"a": "E", "b": 81},
+ {"a": "F", "b": 53},
+ {"a": "G", "b": 19},
+ {"a": "H", "b": 87},
+ {"a": "I", "b": 52},
+ ]
+ },
+ "mark": "bar",
+ "encoding": {
+ "x": {"field": "a", "type": "ordinal"},
+ "y": {"field": "b", "type": "quantitative"},
+ },
+ }
+
+
+@pytest.fixture
+def vega_spec():
+ return {
+ "$schema": "https://vega.github.io/schema/vega/v5.json",
+ "axes": [
+ {
+ "aria": False,
+ "domain": False,
+ "grid": True,
+ "gridScale": "x",
+ "labels": False,
+ "maxExtent": 0,
+ "minExtent": 0,
+ "orient": "left",
+ "scale": "y",
+ "tickCount": {"signal": "ceil(height/40)"},
+ "ticks": False,
+ "zindex": 0,
+ },
+ {
+ "grid": False,
+ "labelAlign": "right",
+ "labelAngle": 270,
+ "labelBaseline": "middle",
+ "orient": "bottom",
+ "scale": "x",
+ "title": "a",
+ "zindex": 0,
+ },
+ {
+ "grid": False,
+ "labelOverlap": True,
+ "orient": "left",
+ "scale": "y",
+ "tickCount": {"signal": "ceil(height/40)"},
+ "title": "b",
+ "zindex": 0,
+ },
+ ],
+ "background": "white",
+ "data": [
+ {
+ "name": "source_0",
+ "values": [
+ {"a": "A", "b": 28},
+ {"a": "B", "b": 55},
+ {"a": "C", "b": 43},
+ {"a": "D", "b": 91},
+ {"a": "E", "b": 81},
+ {"a": "F", "b": 53},
+ {"a": "G", "b": 19},
+ {"a": "H", "b": 87},
+ {"a": "I", "b": 52},
+ ],
+ },
+ {
+ "name": "data_0",
+ "source": "source_0",
+ "transform": [
+ {
+ "expr": 'isValid(datum["b"]) && isFinite(+datum["b"])',
+ "type": "filter",
+ }
+ ],
+ },
+ ],
+ "description": "A simple bar chart with embedded data.",
+ "height": 200,
+ "marks": [
+ {
+ "encode": {
+ "update": {
+ "ariaRoleDescription": {"value": "bar"},
+ "description": {
+ "signal": '"a: " + (isValid(datum["a"]) ? datum["a"] : ""+datum["a"]) + "; b: " + (format(datum["b"], ""))'
+ },
+ "fill": {"value": "#4c78a8"},
+ "width": {"band": 1, "scale": "x"},
+ "x": {"field": "a", "scale": "x"},
+ "y": {"field": "b", "scale": "y"},
+ "y2": {"scale": "y", "value": 0},
+ }
+ },
+ "from": {"data": "data_0"},
+ "name": "marks",
+ "style": ["bar"],
+ "type": "rect",
+ }
+ ],
+ "padding": 5,
+ "scales": [
+ {
+ "domain": {"data": "data_0", "field": "a", "sort": True},
+ "name": "x",
+ "paddingInner": 0.1,
+ "paddingOuter": 0.05,
+ "range": {"step": {"signal": "x_step"}},
+ "type": "band",
+ },
+ {
+ "domain": {"data": "data_0", "field": "b"},
+ "name": "y",
+ "nice": True,
+ "range": [{"signal": "height"}, 0],
+ "type": "linear",
+ "zero": True,
+ },
+ ],
+ "signals": [
+ {"name": "x_step", "value": 20},
+ {
+ "name": "width",
+ "update": "bandspace(domain('x').length, 0.1, 0.05) * x_step",
+ },
+ ],
+ "style": "cell",
+ }
+
+
+def test_vegalite_to_vega_mimebundle(require_altair_saver, vegalite_spec, vega_spec):
+ # temporay fix for https://github.com/vega/vega-lite/issues/7776
+ def delete_none(axes):
+ for axis in axes:
+ for key, value in list(axis.items()):
+ if value is None:
+ del axis[key]
+ return axes
+
+ bundle = spec_to_mimebundle(
+ spec=vegalite_spec,
+ format="vega",
+ mode="vega-lite",
+ vega_version=alt.VEGA_VERSION,
+ vegalite_version=alt.VEGALITE_VERSION,
+ vegaembed_version=alt.VEGAEMBED_VERSION,
+ )
+
+ bundle["application/vnd.vega.v5+json"]["axes"] = delete_none(
+ bundle["application/vnd.vega.v5+json"]["axes"]
+ )
+ assert bundle == {"application/vnd.vega.v5+json": vega_spec}
+
+
+def test_spec_to_vegalite_mimebundle(vegalite_spec):
+ bundle = spec_to_mimebundle(
+ spec=vegalite_spec,
+ mode="vega-lite",
+ format="vega-lite",
+ vegalite_version=alt.VEGALITE_VERSION,
+ )
+ assert bundle == {"application/vnd.vegalite.v4+json": vegalite_spec}
+
+
+def test_spec_to_vega_mimebundle(vega_spec):
+ bundle = spec_to_mimebundle(
+ spec=vega_spec, mode="vega", format="vega", vega_version=alt.VEGA_VERSION
+ )
+ assert bundle == {"application/vnd.vega.v5+json": vega_spec}
+
+
+def test_spec_to_json_mimebundle():
+ bundle = spec_to_mimebundle(
+ spec=vegalite_spec,
+ mode="vega-lite",
+ format="json",
+ )
+ assert bundle == {"application/json": vegalite_spec}
diff --git a/venv/lib/python3.9/site-packages/altair/utils/tests/test_plugin_registry.py b/venv/lib/python3.9/site-packages/altair/utils/tests/test_plugin_registry.py
new file mode 100644
index 00000000..38f9cc05
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/utils/tests/test_plugin_registry.py
@@ -0,0 +1,123 @@
+from ..plugin_registry import PluginRegistry
+from typing import Callable
+
+
+class TypedCallableRegistry(PluginRegistry[Callable[[int], int]]):
+ pass
+
+
+class GeneralCallableRegistry(PluginRegistry):
+ _global_settings = {"global_setting": None}
+
+ @property
+ def global_setting(self):
+ return self._global_settings["global_setting"]
+
+ @global_setting.setter
+ def global_setting(self, val):
+ self._global_settings["global_setting"] = val
+
+
+def test_plugin_registry():
+ plugins = TypedCallableRegistry()
+
+ assert plugins.names() == []
+ assert plugins.active == ""
+ assert plugins.get() is None
+ assert repr(plugins) == "TypedCallableRegistry(active='', registered=[])"
+
+ plugins.register("new_plugin", lambda x: x**2)
+ assert plugins.names() == ["new_plugin"]
+ assert plugins.active == ""
+ assert plugins.get() is None
+ assert repr(plugins) == (
+ "TypedCallableRegistry(active='', " "registered=['new_plugin'])"
+ )
+
+ plugins.enable("new_plugin")
+ assert plugins.names() == ["new_plugin"]
+ assert plugins.active == "new_plugin"
+ assert plugins.get()(3) == 9
+ assert repr(plugins) == (
+ "TypedCallableRegistry(active='new_plugin', " "registered=['new_plugin'])"
+ )
+
+
+def test_plugin_registry_extra_options():
+ plugins = GeneralCallableRegistry()
+
+ plugins.register("metadata_plugin", lambda x, p=2: x**p)
+ plugins.enable("metadata_plugin")
+ assert plugins.get()(3) == 9
+
+ plugins.enable("metadata_plugin", p=3)
+ assert plugins.active == "metadata_plugin"
+ assert plugins.get()(3) == 27
+
+ # enabling without changing name
+ plugins.enable(p=2)
+ assert plugins.active == "metadata_plugin"
+ assert plugins.get()(3) == 9
+
+
+def test_plugin_registry_global_settings():
+ plugins = GeneralCallableRegistry()
+
+ # we need some default plugin, but we won't do anything with it
+ plugins.register("default", lambda x: x)
+ plugins.enable("default")
+
+ # default value of the global flag
+ assert plugins.global_setting is None
+
+ # enabling changes the global state, not the options
+ plugins.enable(global_setting=True)
+ assert plugins.global_setting is True
+ assert plugins._options == {}
+
+ # context manager changes global state temporarily
+ with plugins.enable(global_setting="temp"):
+ assert plugins.global_setting == "temp"
+ assert plugins._options == {}
+ assert plugins.global_setting is True
+ assert plugins._options == {}
+
+
+def test_plugin_registry_context():
+ plugins = GeneralCallableRegistry()
+
+ plugins.register("default", lambda x, p=2: x**p)
+
+ # At first there is no plugin enabled
+ assert plugins.active == ""
+ assert plugins.options == {}
+
+ # Make sure the context is set and reset correctly
+ with plugins.enable("default", p=6):
+ assert plugins.active == "default"
+ assert plugins.options == {"p": 6}
+
+ assert plugins.active == ""
+ assert plugins.options == {}
+
+ # Make sure the context is reset even if there is an error
+ try:
+ with plugins.enable("default", p=6):
+ assert plugins.active == "default"
+ assert plugins.options == {"p": 6}
+ raise ValueError()
+ except ValueError:
+ pass
+
+ assert plugins.active == ""
+ assert plugins.options == {}
+
+ # Enabling without specifying name uses current name
+ plugins.enable("default", p=2)
+
+ with plugins.enable(p=6):
+ assert plugins.active == "default"
+ assert plugins.options == {"p": 6}
+
+ assert plugins.active == "default"
+ assert plugins.options == {"p": 2}
diff --git a/venv/lib/python3.9/site-packages/altair/utils/tests/test_schemapi.py b/venv/lib/python3.9/site-packages/altair/utils/tests/test_schemapi.py
new file mode 100644
index 00000000..09bbde74
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/utils/tests/test_schemapi.py
@@ -0,0 +1,351 @@
+# The contents of this file are automatically written by
+# tools/generate_schema_wrapper.py. Do not modify directly.
+import copy
+import io
+import json
+import jsonschema
+import pickle
+import pytest
+
+import numpy as np
+
+from ..schemapi import (
+ UndefinedType,
+ SchemaBase,
+ Undefined,
+ _FromDict,
+ SchemaValidationError,
+)
+
+# Make tests inherit from _TestSchema, so that when we test from_dict it won't
+# try to use SchemaBase objects defined elsewhere as wrappers.
+
+
+class _TestSchema(SchemaBase):
+ @classmethod
+ def _default_wrapper_classes(cls):
+ return _TestSchema.__subclasses__()
+
+
+class MySchema(_TestSchema):
+ _schema = {
+ "definitions": {
+ "StringMapping": {
+ "type": "object",
+ "additionalProperties": {"type": "string"},
+ },
+ "StringArray": {"type": "array", "items": {"type": "string"}},
+ },
+ "properties": {
+ "a": {"$ref": "#/definitions/StringMapping"},
+ "a2": {"type": "object", "additionalProperties": {"type": "number"}},
+ "b": {"$ref": "#/definitions/StringArray"},
+ "b2": {"type": "array", "items": {"type": "number"}},
+ "c": {"type": ["string", "number"]},
+ "d": {
+ "anyOf": [
+ {"$ref": "#/definitions/StringMapping"},
+ {"$ref": "#/definitions/StringArray"},
+ ]
+ },
+ "e": {"items": [{"type": "string"}, {"type": "string"}]},
+ },
+ }
+
+
+class StringMapping(_TestSchema):
+ _schema = {"$ref": "#/definitions/StringMapping"}
+ _rootschema = MySchema._schema
+
+
+class StringArray(_TestSchema):
+ _schema = {"$ref": "#/definitions/StringArray"}
+ _rootschema = MySchema._schema
+
+
+class Derived(_TestSchema):
+ _schema = {
+ "definitions": {
+ "Foo": {"type": "object", "properties": {"d": {"type": "string"}}},
+ "Bar": {"type": "string", "enum": ["A", "B"]},
+ },
+ "type": "object",
+ "additionalProperties": False,
+ "properties": {
+ "a": {"type": "integer"},
+ "b": {"type": "string"},
+ "c": {"$ref": "#/definitions/Foo"},
+ },
+ }
+
+
+class Foo(_TestSchema):
+ _schema = {"$ref": "#/definitions/Foo"}
+ _rootschema = Derived._schema
+
+
+class Bar(_TestSchema):
+ _schema = {"$ref": "#/definitions/Bar"}
+ _rootschema = Derived._schema
+
+
+class SimpleUnion(_TestSchema):
+ _schema = {"anyOf": [{"type": "integer"}, {"type": "string"}]}
+
+
+class DefinitionUnion(_TestSchema):
+ _schema = {"anyOf": [{"$ref": "#/definitions/Foo"}, {"$ref": "#/definitions/Bar"}]}
+ _rootschema = Derived._schema
+
+
+class SimpleArray(_TestSchema):
+ _schema = {
+ "type": "array",
+ "items": {"anyOf": [{"type": "integer"}, {"type": "string"}]},
+ }
+
+
+class InvalidProperties(_TestSchema):
+ _schema = {
+ "type": "object",
+ "properties": {"for": {}, "as": {}, "vega-lite": {}, "$schema": {}},
+ }
+
+
+def test_construct_multifaceted_schema():
+ dct = {
+ "a": {"foo": "bar"},
+ "a2": {"foo": 42},
+ "b": ["a", "b", "c"],
+ "b2": [1, 2, 3],
+ "c": 42,
+ "d": ["x", "y", "z"],
+ "e": ["a", "b"],
+ }
+
+ myschema = MySchema.from_dict(dct)
+ assert myschema.to_dict() == dct
+
+ myschema2 = MySchema(**dct)
+ assert myschema2.to_dict() == dct
+
+ assert isinstance(myschema.a, StringMapping)
+ assert isinstance(myschema.a2, dict)
+ assert isinstance(myschema.b, StringArray)
+ assert isinstance(myschema.b2, list)
+ assert isinstance(myschema.d, StringArray)
+
+
+def test_schema_cases():
+ assert Derived(a=4, b="yo").to_dict() == {"a": 4, "b": "yo"}
+ assert Derived(a=4, c={"d": "hey"}).to_dict() == {"a": 4, "c": {"d": "hey"}}
+ assert Derived(a=4, b="5", c=Foo(d="val")).to_dict() == {
+ "a": 4,
+ "b": "5",
+ "c": {"d": "val"},
+ }
+ assert Foo(d="hello", f=4).to_dict() == {"d": "hello", "f": 4}
+
+ assert Derived().to_dict() == {}
+ assert Foo().to_dict() == {}
+
+ with pytest.raises(jsonschema.ValidationError):
+ # a needs to be an integer
+ Derived(a="yo").to_dict()
+
+ with pytest.raises(jsonschema.ValidationError):
+ # Foo.d needs to be a string
+ Derived(c=Foo(4)).to_dict()
+
+ with pytest.raises(jsonschema.ValidationError):
+ # no additional properties allowed
+ Derived(foo="bar").to_dict()
+
+
+def test_round_trip():
+ D = {"a": 4, "b": "yo"}
+ assert Derived.from_dict(D).to_dict() == D
+
+ D = {"a": 4, "c": {"d": "hey"}}
+ assert Derived.from_dict(D).to_dict() == D
+
+ D = {"a": 4, "b": "5", "c": {"d": "val"}}
+ assert Derived.from_dict(D).to_dict() == D
+
+ D = {"d": "hello", "f": 4}
+ assert Foo.from_dict(D).to_dict() == D
+
+
+def test_from_dict():
+ D = {"a": 4, "b": "5", "c": {"d": "val"}}
+ obj = Derived.from_dict(D)
+ assert obj.a == 4
+ assert obj.b == "5"
+ assert isinstance(obj.c, Foo)
+
+
+def test_simple_type():
+ assert SimpleUnion(4).to_dict() == 4
+
+
+def test_simple_array():
+ assert SimpleArray([4, 5, "six"]).to_dict() == [4, 5, "six"]
+ assert SimpleArray.from_dict(list("abc")).to_dict() == list("abc")
+
+
+def test_definition_union():
+ obj = DefinitionUnion.from_dict("A")
+ assert isinstance(obj, Bar)
+ assert obj.to_dict() == "A"
+
+ obj = DefinitionUnion.from_dict("B")
+ assert isinstance(obj, Bar)
+ assert obj.to_dict() == "B"
+
+ obj = DefinitionUnion.from_dict({"d": "yo"})
+ assert isinstance(obj, Foo)
+ assert obj.to_dict() == {"d": "yo"}
+
+
+def test_invalid_properties():
+ dct = {"for": 2, "as": 3, "vega-lite": 4, "$schema": 5}
+ invalid = InvalidProperties.from_dict(dct)
+ assert invalid["for"] == 2
+ assert invalid["as"] == 3
+ assert invalid["vega-lite"] == 4
+ assert invalid["$schema"] == 5
+ assert invalid.to_dict() == dct
+
+
+def test_undefined_singleton():
+ assert Undefined is UndefinedType()
+
+
+@pytest.fixture
+def dct():
+ return {
+ "a": {"foo": "bar"},
+ "a2": {"foo": 42},
+ "b": ["a", "b", "c"],
+ "b2": [1, 2, 3],
+ "c": 42,
+ "d": ["x", "y", "z"],
+ }
+
+
+def test_copy_method(dct):
+ myschema = MySchema.from_dict(dct)
+
+ # Make sure copy is deep
+ copy = myschema.copy(deep=True)
+ copy["a"]["foo"] = "new value"
+ copy["b"] = ["A", "B", "C"]
+ copy["c"] = 164
+ assert myschema.to_dict() == dct
+
+ # If we ignore a value, changing the copy changes the original
+ copy = myschema.copy(deep=True, ignore=["a"])
+ copy["a"]["foo"] = "new value"
+ copy["b"] = ["A", "B", "C"]
+ copy["c"] = 164
+ mydct = myschema.to_dict()
+ assert mydct["a"]["foo"] == "new value"
+ assert mydct["b"][0] == dct["b"][0]
+ assert mydct["c"] == dct["c"]
+
+ # If copy is not deep, then changing copy below top level changes original
+ copy = myschema.copy(deep=False)
+ copy["a"]["foo"] = "baz"
+ copy["b"] = ["A", "B", "C"]
+ copy["c"] = 164
+ mydct = myschema.to_dict()
+ assert mydct["a"]["foo"] == "baz"
+ assert mydct["b"] == dct["b"]
+ assert mydct["c"] == dct["c"]
+
+
+def test_copy_module(dct):
+ myschema = MySchema.from_dict(dct)
+
+ cp = copy.deepcopy(myschema)
+ cp["a"]["foo"] = "new value"
+ cp["b"] = ["A", "B", "C"]
+ cp["c"] = 164
+ assert myschema.to_dict() == dct
+
+
+def test_attribute_error():
+ m = MySchema()
+ with pytest.raises(AttributeError) as err:
+ m.invalid_attribute
+ assert str(err.value) == (
+ "'MySchema' object has no attribute " "'invalid_attribute'"
+ )
+
+
+def test_to_from_json(dct):
+ json_str = MySchema.from_dict(dct).to_json()
+ new_dct = MySchema.from_json(json_str).to_dict()
+
+ assert new_dct == dct
+
+
+def test_to_from_pickle(dct):
+ myschema = MySchema.from_dict(dct)
+ output = io.BytesIO()
+ pickle.dump(myschema, output)
+ output.seek(0)
+ myschema_new = pickle.load(output)
+
+ assert myschema_new.to_dict() == dct
+
+
+def test_class_with_no_schema():
+ class BadSchema(SchemaBase):
+ pass
+
+ with pytest.raises(ValueError) as err:
+ BadSchema(4)
+ assert str(err.value).startswith("Cannot instantiate object")
+
+
+@pytest.mark.parametrize("use_json", [True, False])
+def test_hash_schema(use_json):
+ classes = _TestSchema._default_wrapper_classes()
+
+ for cls in classes:
+ hsh1 = _FromDict.hash_schema(cls._schema, use_json=use_json)
+ hsh2 = _FromDict.hash_schema(cls._schema, use_json=use_json)
+ assert hsh1 == hsh2
+ assert hash(hsh1) == hash(hsh2)
+
+
+def test_schema_validation_error():
+ try:
+ MySchema(a={"foo": 4})
+ the_err = None
+ except jsonschema.ValidationError as err:
+ the_err = err
+
+ assert isinstance(the_err, SchemaValidationError)
+ message = str(the_err)
+
+ assert message.startswith("Invalid specification")
+ assert "test_schemapi.MySchema->a" in message
+ assert "validating {!r}".format(the_err.validator) in message
+ assert the_err.message in message
+
+
+def test_serialize_numpy_types():
+ m = MySchema(
+ a={"date": np.datetime64("2019-01-01")},
+ a2={"int64": np.int64(1), "float64": np.float64(2)},
+ b2=np.arange(4),
+ )
+ out = m.to_json()
+ dct = json.loads(out)
+ assert dct == {
+ "a": {"date": "2019-01-01T00:00:00"},
+ "a2": {"int64": 1, "float64": 2},
+ "b2": [0, 1, 2, 3],
+ }
diff --git a/venv/lib/python3.9/site-packages/altair/utils/tests/test_server.py b/venv/lib/python3.9/site-packages/altair/utils/tests/test_server.py
new file mode 100644
index 00000000..09129e9c
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/utils/tests/test_server.py
@@ -0,0 +1,10 @@
+"""
+Test http server
+"""
+
+from altair.utils.server import serve, MockServer
+
+
+def test_serve():
+ html = "<html><title>Title</title><body><p>Content</p></body></html>"
+ serve(html, open_browser=False, http_server=MockServer)
diff --git a/venv/lib/python3.9/site-packages/altair/utils/tests/test_utils.py b/venv/lib/python3.9/site-packages/altair/utils/tests/test_utils.py
new file mode 100644
index 00000000..54a12721
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/utils/tests/test_utils.py
@@ -0,0 +1,192 @@
+import pytest
+import warnings
+import json
+
+import numpy as np
+import pandas as pd
+
+from .. import infer_vegalite_type, sanitize_dataframe
+
+
+def test_infer_vegalite_type():
+ def _check(arr, typ):
+ assert infer_vegalite_type(arr) == typ
+
+ _check(np.arange(5, dtype=float), "quantitative")
+ _check(np.arange(5, dtype=int), "quantitative")
+ _check(np.zeros(5, dtype=bool), "nominal")
+ _check(pd.date_range("2012", "2013"), "temporal")
+ _check(pd.timedelta_range(365, periods=12), "temporal")
+
+ nulled = pd.Series(np.random.randint(10, size=10))
+ nulled[0] = None
+ _check(nulled, "quantitative")
+ _check(["a", "b", "c"], "nominal")
+
+ if hasattr(pytest, "warns"): # added in pytest 2.8
+ with pytest.warns(UserWarning):
+ _check([], "nominal")
+ else:
+ with warnings.catch_warnings():
+ warnings.filterwarnings("ignore")
+ _check([], "nominal")
+
+
+def test_sanitize_dataframe():
+ # create a dataframe with various types
+ df = pd.DataFrame(
+ {
+ "s": list("abcde"),
+ "f": np.arange(5, dtype=float),
+ "i": np.arange(5, dtype=int),
+ "b": np.array([True, False, True, True, False]),
+ "d": pd.date_range("2012-01-01", periods=5, freq="H"),
+ "c": pd.Series(list("ababc"), dtype="category"),
+ "c2": pd.Series([1, "A", 2.5, "B", None], dtype="category"),
+ "o": pd.Series([np.array(i) for i in range(5)]),
+ "p": pd.date_range("2012-01-01", periods=5, freq="H").tz_localize("UTC"),
+ }
+ )
+
+ # add some nulls
+ df.iloc[0, df.columns.get_loc("s")] = None
+ df.iloc[0, df.columns.get_loc("f")] = np.nan
+ df.iloc[0, df.columns.get_loc("d")] = pd.NaT
+ df.iloc[0, df.columns.get_loc("o")] = np.array(np.nan)
+
+ # JSON serialize. This will fail on non-sanitized dataframes
+ print(df[["s", "c2"]])
+ df_clean = sanitize_dataframe(df)
+ print(df_clean[["s", "c2"]])
+ print(df_clean[["s", "c2"]].to_dict())
+ s = json.dumps(df_clean.to_dict(orient="records"))
+ print(s)
+
+ # Re-construct pandas dataframe
+ df2 = pd.read_json(s)
+
+ # Re-order the columns to match df
+ df2 = df2[df.columns]
+
+ # Re-apply original types
+ for col in df:
+ if str(df[col].dtype).startswith("datetime"):
+ # astype(datetime) introduces time-zone issues:
+ # to_datetime() does not.
+ utc = isinstance(df[col].dtype, pd.core.dtypes.dtypes.DatetimeTZDtype)
+ df2[col] = pd.to_datetime(df2[col], utc=utc)
+ else:
+ df2[col] = df2[col].astype(df[col].dtype)
+
+ # pandas doesn't properly recognize np.array(np.nan), so change it here
+ df.iloc[0, df.columns.get_loc("o")] = np.nan
+ assert df.equals(df2)
+
+
+def test_sanitize_dataframe_colnames():
+ df = pd.DataFrame(np.arange(12).reshape(4, 3))
+
+ # Test that RangeIndex is converted to strings
+ df = sanitize_dataframe(df)
+ assert [isinstance(col, str) for col in df.columns]
+
+ # Test that non-string columns result in an error
+ df.columns = [4, "foo", "bar"]
+ with pytest.raises(ValueError) as err:
+ sanitize_dataframe(df)
+ assert str(err.value).startswith("Dataframe contains invalid column name: 4.")
+
+
+def test_sanitize_dataframe_timedelta():
+ df = pd.DataFrame({"r": pd.timedelta_range(start="1 day", periods=4)})
+ with pytest.raises(ValueError) as err:
+ sanitize_dataframe(df)
+ assert str(err.value).startswith('Field "r" has type "timedelta')
+
+
+def test_sanitize_dataframe_infs():
+ df = pd.DataFrame({"x": [0, 1, 2, np.inf, -np.inf, np.nan]})
+ df_clean = sanitize_dataframe(df)
+ assert list(df_clean.dtypes) == [object]
+ assert list(df_clean["x"]) == [0, 1, 2, None, None, None]
+
+
+@pytest.mark.skipif(
+ not hasattr(pd, "Int64Dtype"),
+ reason="Nullable integers not supported in pandas v{}".format(pd.__version__),
+)
+def test_sanitize_nullable_integers():
+
+ df = pd.DataFrame(
+ {
+ "int_np": [1, 2, 3, 4, 5],
+ "int64": pd.Series([1, 2, 3, None, 5], dtype="UInt8"),
+ "int64_nan": pd.Series([1, 2, 3, float("nan"), 5], dtype="Int64"),
+ "float": [1.0, 2.0, 3.0, 4, 5.0],
+ "float_null": [1, 2, None, 4, 5],
+ "float_inf": [1, 2, None, 4, (float("inf"))],
+ }
+ )
+
+ df_clean = sanitize_dataframe(df)
+ assert {col.dtype.name for _, col in df_clean.items()} == {"object"}
+
+ result_python = {col_name: list(col) for col_name, col in df_clean.items()}
+ assert result_python == {
+ "int_np": [1, 2, 3, 4, 5],
+ "int64": [1, 2, 3, None, 5],
+ "int64_nan": [1, 2, 3, None, 5],
+ "float": [1.0, 2.0, 3.0, 4.0, 5.0],
+ "float_null": [1.0, 2.0, None, 4.0, 5.0],
+ "float_inf": [1.0, 2.0, None, 4.0, None],
+ }
+
+
+@pytest.mark.skipif(
+ not hasattr(pd, "StringDtype"),
+ reason="dedicated String dtype not supported in pandas v{}".format(pd.__version__),
+)
+def test_sanitize_string_dtype():
+ df = pd.DataFrame(
+ {
+ "string_object": ["a", "b", "c", "d"],
+ "string_string": pd.array(["a", "b", "c", "d"], dtype="string"),
+ "string_object_null": ["a", "b", None, "d"],
+ "string_string_null": pd.array(["a", "b", None, "d"], dtype="string"),
+ }
+ )
+
+ df_clean = sanitize_dataframe(df)
+ assert {col.dtype.name for _, col in df_clean.items()} == {"object"}
+
+ result_python = {col_name: list(col) for col_name, col in df_clean.items()}
+ assert result_python == {
+ "string_object": ["a", "b", "c", "d"],
+ "string_string": ["a", "b", "c", "d"],
+ "string_object_null": ["a", "b", None, "d"],
+ "string_string_null": ["a", "b", None, "d"],
+ }
+
+
+@pytest.mark.skipif(
+ not hasattr(pd, "BooleanDtype"),
+ reason="Nullable boolean dtype not supported in pandas v{}".format(pd.__version__),
+)
+def test_sanitize_boolean_dtype():
+ df = pd.DataFrame(
+ {
+ "bool_none": pd.array([True, False, None], dtype="boolean"),
+ "none": pd.array([None, None, None], dtype="boolean"),
+ "bool": pd.array([True, False, True], dtype="boolean"),
+ }
+ )
+
+ df_clean = sanitize_dataframe(df)
+ assert {col.dtype.name for _, col in df_clean.items()} == {"object"}
+
+ result_python = {col_name: list(col) for col_name, col in df_clean.items()}
+ assert result_python == {
+ "bool_none": [True, False, None],
+ "none": [None, None, None],
+ "bool": [True, False, True],
+ }
diff --git a/venv/lib/python3.9/site-packages/altair/utils/theme.py b/venv/lib/python3.9/site-packages/altair/utils/theme.py
new file mode 100644
index 00000000..10dc6fa8
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/utils/theme.py
@@ -0,0 +1,10 @@
+"""Utilities for registering and working with themes"""
+
+from .plugin_registry import PluginRegistry
+from typing import Callable
+
+ThemeType = Callable[..., dict]
+
+
+class ThemeRegistry(PluginRegistry[ThemeType]):
+ pass
diff --git a/venv/lib/python3.9/site-packages/altair/vega/__init__.py b/venv/lib/python3.9/site-packages/altair/vega/__init__.py
new file mode 100644
index 00000000..eec9f692
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vega/__init__.py
@@ -0,0 +1,2 @@
+# flake8: noqa
+from .v5 import *
diff --git a/venv/lib/python3.9/site-packages/altair/vega/data.py b/venv/lib/python3.9/site-packages/altair/vega/data.py
new file mode 100644
index 00000000..8ad01f3b
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vega/data.py
@@ -0,0 +1,47 @@
+import pandas as pd
+from toolz import curried
+from ..utils.core import sanitize_dataframe
+from ..utils.data import (
+ MaxRowsError,
+ curry,
+ pipe,
+ sample,
+ to_csv,
+ to_json,
+ to_values,
+ check_data_type,
+)
+
+
+@curried.curry
+def limit_rows(data, max_rows=5000):
+ """Raise MaxRowsError if the data model has more than max_rows."""
+ if not isinstance(data, (list, pd.DataFrame)):
+ raise TypeError("Expected dict or DataFrame, got: {}".format(type(data)))
+ if len(data) > max_rows:
+ raise MaxRowsError(
+ "The number of rows in your dataset is greater than the max of {}".format(
+ max_rows
+ )
+ )
+ return data
+
+
+@curried.curry
+def default_data_transformer(data):
+ return curried.pipe(data, limit_rows, to_values)
+
+
+__all__ = (
+ "MaxRowsError",
+ "curry",
+ "default_data_transformer",
+ "limit_rows",
+ "pipe",
+ "sanitize_dataframe",
+ "sample",
+ "to_csv",
+ "to_json",
+ "to_values",
+ "check_data_type",
+)
diff --git a/venv/lib/python3.9/site-packages/altair/vega/display.py b/venv/lib/python3.9/site-packages/altair/vega/display.py
new file mode 100644
index 00000000..adc3167c
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vega/display.py
@@ -0,0 +1,12 @@
+from ..utils.display import Displayable, default_renderer_base, json_renderer_base
+from ..utils.display import MimeBundleType, RendererType, HTMLRenderer
+
+
+__all__ = (
+ "Displayable",
+ "default_renderer_base",
+ "json_renderer_base",
+ "MimeBundleType",
+ "RendererType",
+ "HTMLRenderer",
+)
diff --git a/venv/lib/python3.9/site-packages/altair/vega/tests/__init__.py b/venv/lib/python3.9/site-packages/altair/vega/tests/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vega/tests/__init__.py
diff --git a/venv/lib/python3.9/site-packages/altair/vega/tests/test_import.py b/venv/lib/python3.9/site-packages/altair/vega/tests/test_import.py
new file mode 100644
index 00000000..c569b86b
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vega/tests/test_import.py
@@ -0,0 +1,5 @@
+from altair.vega import SCHEMA_VERSION, SCHEMA_URL
+
+
+def test_schema_version():
+ assert SCHEMA_VERSION in SCHEMA_URL
diff --git a/venv/lib/python3.9/site-packages/altair/vega/v5/__init__.py b/venv/lib/python3.9/site-packages/altair/vega/v5/__init__.py
new file mode 100644
index 00000000..b7164e3c
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vega/v5/__init__.py
@@ -0,0 +1,21 @@
+# flake8: noqa
+import warnings
+from ...utils.deprecation import AltairDeprecationWarning
+from .display import vega, Vega, renderers
+from .schema import *
+
+from .data import (
+ pipe,
+ curry,
+ limit_rows,
+ sample,
+ to_json,
+ to_csv,
+ to_values,
+ default_data_transformer,
+)
+
+warnings.warn(
+ "The module altair.vega.v5 is deprecated and will be removed in Altair 5.",
+ AltairDeprecationWarning,
+)
diff --git a/venv/lib/python3.9/site-packages/altair/vega/v5/data.py b/venv/lib/python3.9/site-packages/altair/vega/v5/data.py
new file mode 100644
index 00000000..78273363
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vega/v5/data.py
@@ -0,0 +1,29 @@
+from ..data import (
+ MaxRowsError,
+ curry,
+ default_data_transformer,
+ limit_rows,
+ pipe,
+ sample,
+ to_csv,
+ to_json,
+ to_values,
+)
+
+
+# ==============================================================================
+# Vega 5 data transformers
+# ==============================================================================
+
+
+__all__ = (
+ "MaxRowsError",
+ "curry",
+ "default_data_transformer",
+ "limit_rows",
+ "pipe",
+ "sample",
+ "to_csv",
+ "to_json",
+ "to_values",
+)
diff --git a/venv/lib/python3.9/site-packages/altair/vega/v5/display.py b/venv/lib/python3.9/site-packages/altair/vega/v5/display.py
new file mode 100644
index 00000000..f813dc92
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vega/v5/display.py
@@ -0,0 +1,114 @@
+import os
+
+from ...utils import PluginRegistry
+from ...utils.deprecation import deprecated
+from ..display import Displayable
+from ..display import default_renderer_base
+from ..display import json_renderer_base
+from ..display import RendererType
+from ..display import HTMLRenderer
+
+from .schema import SCHEMA_VERSION
+
+VEGA_VERSION = SCHEMA_VERSION.lstrip("v")
+VEGAEMBED_VERSION = "3"
+
+
+# ==============================================================================
+# Vega 5 renderer logic
+# ==============================================================================
+
+
+# The MIME type for Vega 5 releases.
+VEGA_MIME_TYPE = "application/vnd.vega.v5+json" # type: str
+
+# The entry point group that can be used by other packages to declare other
+# renderers that will be auto-detected. Explicit registration is also
+# allowed by the PluginRegistery API.
+ENTRY_POINT_GROUP = "altair.vega.v5.renderer" # type: str
+
+# The display message when rendering fails
+DEFAULT_DISPLAY = """\
+<Vega 5 object>
+
+If you see this message, it means the renderer has not been properly enabled
+for the frontend that you are using. For more information, see
+https://altair-viz.github.io/user_guide/troubleshooting.html
+"""
+
+renderers = PluginRegistry[RendererType](entry_point_group=ENTRY_POINT_GROUP)
+
+
+here = os.path.dirname(os.path.realpath(__file__))
+
+
+def default_renderer(spec):
+ return default_renderer_base(spec, VEGA_MIME_TYPE, DEFAULT_DISPLAY)
+
+
+def json_renderer(spec):
+ return json_renderer_base(spec, DEFAULT_DISPLAY)
+
+
+colab_renderer = HTMLRenderer(
+ mode="vega",
+ fullhtml=True,
+ requirejs=False,
+ output_div="altair-viz",
+ vega_version=VEGA_VERSION,
+ vegaembed_version=VEGAEMBED_VERSION,
+)
+
+
+kaggle_renderer = HTMLRenderer(
+ mode="vega",
+ fullhtml=False,
+ requirejs=True,
+ vega_version=VEGA_VERSION,
+ vegaembed_version=VEGAEMBED_VERSION,
+)
+
+
+html_renderer = HTMLRenderer(
+ mode="vega",
+ template="universal",
+ vega_version=VEGA_VERSION,
+ vegaembed_version=VEGAEMBED_VERSION,
+)
+
+
+renderers.register("default", default_renderer)
+renderers.register("html", html_renderer)
+renderers.register("jupyterlab", default_renderer)
+renderers.register("nteract", default_renderer)
+renderers.register("colab", colab_renderer)
+renderers.register("kaggle", kaggle_renderer)
+renderers.register("json", json_renderer)
+renderers.enable("default")
+
+
+class Vega(Displayable):
+ """An IPython/Jupyter display class for rendering Vega 5."""
+
+ renderers = renderers
+ schema_path = (__name__, "schema/vega-schema.json")
+
+
+@deprecated(
+ "Rendering Vega specifications is deprecated and will be removed in Altair 5."
+)
+def vega(spec, validate=True):
+ """Render and optionally validate a Vega 5 spec.
+
+ This will use the currently enabled renderer to render the spec.
+
+ Parameters
+ ==========
+ spec: dict
+ A fully compliant Vega 5 spec, with the data portion fully processed.
+ validate: bool
+ Should the spec be validated against the Vega 5 schema?
+ """
+ from IPython.display import display
+
+ display(Vega(spec, validate=validate))
diff --git a/venv/lib/python3.9/site-packages/altair/vega/v5/schema/__init__.py b/venv/lib/python3.9/site-packages/altair/vega/v5/schema/__init__.py
new file mode 100644
index 00000000..3764f925
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vega/v5/schema/__init__.py
@@ -0,0 +1,5 @@
+# flake8: noqa
+from .core import *
+
+SCHEMA_VERSION = 'v5.10.0'
+SCHEMA_URL = 'https://vega.github.io/schema/vega/v5.10.0.json'
diff --git a/venv/lib/python3.9/site-packages/altair/vega/v5/schema/core.py b/venv/lib/python3.9/site-packages/altair/vega/v5/schema/core.py
new file mode 100644
index 00000000..39b43e29
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vega/v5/schema/core.py
@@ -0,0 +1,3416 @@
+# The contents of this file are automatically written by
+# tools/generate_schema_wrapper.py. Do not modify directly.
+
+from altair.utils.schemapi import SchemaBase, Undefined, _subclasses
+
+import pkgutil
+import json
+
+def load_schema():
+ """Load the json schema associated with this module's functions"""
+ return json.loads(pkgutil.get_data(__name__, 'vega-schema.json').decode('utf-8'))
+
+
+class VegaSchema(SchemaBase):
+ _rootschema = load_schema()
+ @classmethod
+ def _default_wrapper_classes(cls):
+ return _subclasses(VegaSchema)
+
+
+class Root(VegaSchema):
+ """Root schema wrapper
+
+ allOf(:class:`scope`, Mapping(required=[]))
+ """
+ _schema = VegaSchema._rootschema
+
+ def __init__(self, autosize=Undefined, axes=Undefined, background=Undefined, config=Undefined,
+ data=Undefined, description=Undefined, encode=Undefined, height=Undefined,
+ layout=Undefined, legends=Undefined, marks=Undefined, padding=Undefined,
+ projections=Undefined, scales=Undefined, signals=Undefined, style=Undefined,
+ title=Undefined, usermeta=Undefined, width=Undefined, **kwds):
+ super(Root, self).__init__(autosize=autosize, axes=axes, background=background, config=config,
+ data=data, description=description, encode=encode, height=height,
+ layout=layout, legends=legends, marks=marks, padding=padding,
+ projections=projections, scales=scales, signals=signals, style=style,
+ title=title, usermeta=usermeta, width=width, **kwds)
+
+
+class autosize(VegaSchema):
+ """autosize schema wrapper
+
+ oneOf(enum('pad', 'fit', 'fit-x', 'fit-y', 'none'), Mapping(required=[type]),
+ :class:`signal`)
+ """
+ _schema = {'$ref': '#/defs/autosize'}
+
+ def __init__(self, *args, **kwds):
+ super(autosize, self).__init__(*args, **kwds)
+
+
+class axis(VegaSchema):
+ """axis schema wrapper
+
+ Mapping(required=[orient, scale])
+
+ Attributes
+ ----------
+
+ orient : enum('top', 'bottom', 'left', 'right')
+
+ scale : string
+
+ bandPosition : oneOf(float, :class:`numberValue`)
+
+ domain : boolean
+
+ domainColor : oneOf(None, string, :class:`colorValue`)
+
+ domainDash : oneOf(List(float), :class:`arrayValue`)
+
+ domainDashOffset : oneOf(float, :class:`numberValue`)
+
+ domainOpacity : oneOf(float, :class:`numberValue`)
+
+ domainWidth : oneOf(float, :class:`numberValue`)
+
+ encode : Mapping(required=[])
+
+ format : oneOf(string, Mapping(required=[]), :class:`signal`)
+
+ formatType : oneOf(enum('number', 'time', 'utc'), :class:`signal`)
+
+ grid : boolean
+
+ gridColor : oneOf(None, string, :class:`colorValue`)
+
+ gridDash : oneOf(List(float), :class:`arrayValue`)
+
+ gridDashOffset : oneOf(float, :class:`numberValue`)
+
+ gridOpacity : oneOf(float, :class:`numberValue`)
+
+ gridScale : string
+
+ gridWidth : oneOf(float, :class:`numberValue`)
+
+ labelAlign : oneOf(enum('left', 'right', 'center'), :class:`alignValue`)
+
+ labelAngle : oneOf(float, :class:`numberValue`)
+
+ labelBaseline : oneOf(enum('top', 'middle', 'bottom', 'alphabetic', 'line-top',
+ 'line-bottom'), :class:`baselineValue`)
+
+ labelBound : oneOf(boolean, float, :class:`signal`)
+
+ labelColor : oneOf(None, string, :class:`colorValue`)
+
+ labelFlush : oneOf(boolean, float, :class:`signal`)
+
+ labelFlushOffset : :class:`numberOrSignal`
+
+ labelFont : oneOf(string, :class:`stringValue`)
+
+ labelFontSize : oneOf(float, :class:`numberValue`)
+
+ labelFontStyle : oneOf(string, :class:`stringValue`)
+
+ labelFontWeight : oneOf(enum(None, 'normal', 'bold', 'lighter', 'bolder', '100', '200',
+ '300', '400', '500', '600', '700', '800', '900', 100, 200, 300, 400, 500, 600, 700, 800,
+ 900), :class:`fontWeightValue`)
+
+ labelLimit : oneOf(float, :class:`numberValue`)
+
+ labelLineHeight : oneOf(float, :class:`numberValue`)
+
+ labelOffset : oneOf(float, :class:`numberValue`)
+
+ labelOpacity : oneOf(float, :class:`numberValue`)
+
+ labelOverlap : :class:`labelOverlap`
+
+ labelPadding : oneOf(float, :class:`numberValue`)
+
+ labelSeparation : :class:`numberOrSignal`
+
+ labels : boolean
+
+ maxExtent : oneOf(float, :class:`numberValue`)
+
+ minExtent : oneOf(float, :class:`numberValue`)
+
+ offset : oneOf(float, :class:`numberValue`)
+
+ position : oneOf(float, :class:`numberValue`)
+
+ tickBand : :class:`tickBand`
+
+ tickColor : oneOf(None, string, :class:`colorValue`)
+
+ tickCount : :class:`tickCount`
+
+ tickDash : oneOf(List(float), :class:`arrayValue`)
+
+ tickDashOffset : oneOf(float, :class:`numberValue`)
+
+ tickExtra : :class:`booleanOrSignal`
+
+ tickMinStep : :class:`numberOrSignal`
+
+ tickOffset : oneOf(float, :class:`numberValue`)
+
+ tickOpacity : oneOf(float, :class:`numberValue`)
+
+ tickRound : oneOf(boolean, :class:`booleanValue`)
+
+ tickSize : oneOf(float, :class:`numberValue`)
+
+ tickWidth : oneOf(float, :class:`numberValue`)
+
+ ticks : boolean
+
+ title : :class:`textOrSignal`
+
+ titleAlign : oneOf(enum('left', 'right', 'center'), :class:`alignValue`)
+
+ titleAnchor : oneOf(enum(None, 'start', 'middle', 'end'), :class:`anchorValue`)
+
+ titleAngle : oneOf(float, :class:`numberValue`)
+
+ titleBaseline : oneOf(enum('top', 'middle', 'bottom', 'alphabetic', 'line-top',
+ 'line-bottom'), :class:`baselineValue`)
+
+ titleColor : oneOf(None, string, :class:`colorValue`)
+
+ titleFont : oneOf(string, :class:`stringValue`)
+
+ titleFontSize : oneOf(float, :class:`numberValue`)
+
+ titleFontStyle : oneOf(string, :class:`stringValue`)
+
+ titleFontWeight : oneOf(enum(None, 'normal', 'bold', 'lighter', 'bolder', '100', '200',
+ '300', '400', '500', '600', '700', '800', '900', 100, 200, 300, 400, 500, 600, 700, 800,
+ 900), :class:`fontWeightValue`)
+
+ titleLimit : oneOf(float, :class:`numberValue`)
+
+ titleLineHeight : oneOf(float, :class:`numberValue`)
+
+ titleOpacity : oneOf(float, :class:`numberValue`)
+
+ titlePadding : oneOf(float, :class:`numberValue`)
+
+ titleX : oneOf(float, :class:`numberValue`)
+
+ titleY : oneOf(float, :class:`numberValue`)
+
+ translate : float
+
+ values : :class:`arrayOrSignal`
+
+ zindex : float
+
+ """
+ _schema = {'$ref': '#/defs/axis'}
+
+ def __init__(self, orient=Undefined, scale=Undefined, bandPosition=Undefined, domain=Undefined,
+ domainColor=Undefined, domainDash=Undefined, domainDashOffset=Undefined,
+ domainOpacity=Undefined, domainWidth=Undefined, encode=Undefined, format=Undefined,
+ formatType=Undefined, grid=Undefined, gridColor=Undefined, gridDash=Undefined,
+ gridDashOffset=Undefined, gridOpacity=Undefined, gridScale=Undefined,
+ gridWidth=Undefined, labelAlign=Undefined, labelAngle=Undefined,
+ labelBaseline=Undefined, labelBound=Undefined, labelColor=Undefined,
+ labelFlush=Undefined, labelFlushOffset=Undefined, labelFont=Undefined,
+ labelFontSize=Undefined, labelFontStyle=Undefined, labelFontWeight=Undefined,
+ labelLimit=Undefined, labelLineHeight=Undefined, labelOffset=Undefined,
+ labelOpacity=Undefined, labelOverlap=Undefined, labelPadding=Undefined,
+ labelSeparation=Undefined, labels=Undefined, maxExtent=Undefined, minExtent=Undefined,
+ offset=Undefined, position=Undefined, tickBand=Undefined, tickColor=Undefined,
+ tickCount=Undefined, tickDash=Undefined, tickDashOffset=Undefined, tickExtra=Undefined,
+ tickMinStep=Undefined, tickOffset=Undefined, tickOpacity=Undefined,
+ tickRound=Undefined, tickSize=Undefined, tickWidth=Undefined, ticks=Undefined,
+ title=Undefined, titleAlign=Undefined, titleAnchor=Undefined, titleAngle=Undefined,
+ titleBaseline=Undefined, titleColor=Undefined, titleFont=Undefined,
+ titleFontSize=Undefined, titleFontStyle=Undefined, titleFontWeight=Undefined,
+ titleLimit=Undefined, titleLineHeight=Undefined, titleOpacity=Undefined,
+ titlePadding=Undefined, titleX=Undefined, titleY=Undefined, translate=Undefined,
+ values=Undefined, zindex=Undefined, **kwds):
+ super(axis, self).__init__(orient=orient, scale=scale, bandPosition=bandPosition, domain=domain,
+ domainColor=domainColor, domainDash=domainDash,
+ domainDashOffset=domainDashOffset, domainOpacity=domainOpacity,
+ domainWidth=domainWidth, encode=encode, format=format,
+ formatType=formatType, grid=grid, gridColor=gridColor,
+ gridDash=gridDash, gridDashOffset=gridDashOffset,
+ gridOpacity=gridOpacity, gridScale=gridScale, gridWidth=gridWidth,
+ labelAlign=labelAlign, labelAngle=labelAngle,
+ labelBaseline=labelBaseline, labelBound=labelBound,
+ labelColor=labelColor, labelFlush=labelFlush,
+ labelFlushOffset=labelFlushOffset, labelFont=labelFont,
+ labelFontSize=labelFontSize, labelFontStyle=labelFontStyle,
+ labelFontWeight=labelFontWeight, labelLimit=labelLimit,
+ labelLineHeight=labelLineHeight, labelOffset=labelOffset,
+ labelOpacity=labelOpacity, labelOverlap=labelOverlap,
+ labelPadding=labelPadding, labelSeparation=labelSeparation,
+ labels=labels, maxExtent=maxExtent, minExtent=minExtent,
+ offset=offset, position=position, tickBand=tickBand,
+ tickColor=tickColor, tickCount=tickCount, tickDash=tickDash,
+ tickDashOffset=tickDashOffset, tickExtra=tickExtra,
+ tickMinStep=tickMinStep, tickOffset=tickOffset,
+ tickOpacity=tickOpacity, tickRound=tickRound, tickSize=tickSize,
+ tickWidth=tickWidth, ticks=ticks, title=title, titleAlign=titleAlign,
+ titleAnchor=titleAnchor, titleAngle=titleAngle,
+ titleBaseline=titleBaseline, titleColor=titleColor,
+ titleFont=titleFont, titleFontSize=titleFontSize,
+ titleFontStyle=titleFontStyle, titleFontWeight=titleFontWeight,
+ titleLimit=titleLimit, titleLineHeight=titleLineHeight,
+ titleOpacity=titleOpacity, titlePadding=titlePadding, titleX=titleX,
+ titleY=titleY, translate=translate, values=values, zindex=zindex,
+ **kwds)
+
+
+class background(VegaSchema):
+ """background schema wrapper
+
+ oneOf(string, :class:`signal`)
+ """
+ _schema = {'$ref': '#/defs/background'}
+
+ def __init__(self, *args, **kwds):
+ super(background, self).__init__(*args, **kwds)
+
+
+class bind(VegaSchema):
+ """bind schema wrapper
+
+ oneOf(Mapping(required=[input]), Mapping(required=[input, options]),
+ Mapping(required=[input]), Mapping(required=[input]))
+ """
+ _schema = {'$ref': '#/defs/bind'}
+
+ def __init__(self, *args, **kwds):
+ super(bind, self).__init__(*args, **kwds)
+
+
+class data(VegaSchema):
+ """data schema wrapper
+
+ oneOf(Mapping(required=[name]), Mapping(required=[source, name]), Mapping(required=[url,
+ name]), Mapping(required=[values, name]))
+ """
+ _schema = {'$ref': '#/defs/data'}
+
+ def __init__(self, *args, **kwds):
+ super(data, self).__init__(*args, **kwds)
+
+
+class rule(VegaSchema):
+ """rule schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ test : string
+
+ """
+ _schema = {'$ref': '#/defs/rule'}
+
+ def __init__(self, test=Undefined, **kwds):
+ super(rule, self).__init__(test=test, **kwds)
+
+
+class encodeEntry(VegaSchema):
+ """encodeEntry schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ align : :class:`alignValue`
+
+ angle : :class:`numberValue`
+
+ aspect : :class:`booleanValue`
+
+ baseline : :class:`baselineValue`
+
+ blend : :class:`blendValue`
+
+ clip : :class:`booleanValue`
+
+ cornerRadius : :class:`numberValue`
+
+ cornerRadiusBottomLeft : :class:`numberValue`
+
+ cornerRadiusBottomRight : :class:`numberValue`
+
+ cornerRadiusTopLeft : :class:`numberValue`
+
+ cornerRadiusTopRight : :class:`numberValue`
+
+ cursor : :class:`stringValue`
+
+ defined : :class:`booleanValue`
+
+ dir : :class:`stringValue`
+
+ dx : :class:`numberValue`
+
+ dy : :class:`numberValue`
+
+ ellipsis : :class:`stringValue`
+
+ endAngle : :class:`numberValue`
+
+ fill : :class:`colorValue`
+
+ fillOpacity : :class:`numberValue`
+
+ font : :class:`stringValue`
+
+ fontSize : :class:`numberValue`
+
+ fontStyle : :class:`stringValue`
+
+ fontWeight : :class:`fontWeightValue`
+
+ height : :class:`numberValue`
+
+ innerRadius : :class:`numberValue`
+
+ interpolate : :class:`stringValue`
+
+ limit : :class:`numberValue`
+
+ lineBreak : :class:`stringValue`
+
+ lineHeight : :class:`numberValue`
+
+ opacity : :class:`numberValue`
+
+ orient : :class:`directionValue`
+
+ outerRadius : :class:`numberValue`
+
+ padAngle : :class:`numberValue`
+
+ path : :class:`stringValue`
+
+ radius : :class:`numberValue`
+
+ scaleX : :class:`numberValue`
+
+ scaleY : :class:`numberValue`
+
+ shape : :class:`stringValue`
+
+ size : :class:`numberValue`
+
+ smooth : :class:`booleanValue`
+
+ startAngle : :class:`numberValue`
+
+ stroke : :class:`colorValue`
+
+ strokeCap : :class:`strokeCapValue`
+
+ strokeDash : :class:`arrayValue`
+
+ strokeDashOffset : :class:`numberValue`
+
+ strokeForeground : :class:`booleanValue`
+
+ strokeJoin : :class:`strokeJoinValue`
+
+ strokeMiterLimit : :class:`numberValue`
+
+ strokeOffset : :class:`numberValue`
+
+ strokeOpacity : :class:`numberValue`
+
+ strokeWidth : :class:`numberValue`
+
+ tension : :class:`numberValue`
+
+ text : :class:`textValue`
+
+ theta : :class:`numberValue`
+
+ tooltip : :class:`anyValue`
+
+ url : :class:`stringValue`
+
+ width : :class:`numberValue`
+
+ x : :class:`numberValue`
+
+ x2 : :class:`numberValue`
+
+ xc : :class:`numberValue`
+
+ y : :class:`numberValue`
+
+ y2 : :class:`numberValue`
+
+ yc : :class:`numberValue`
+
+ zindex : :class:`numberValue`
+
+ """
+ _schema = {'$ref': '#/defs/encodeEntry'}
+
+ def __init__(self, align=Undefined, angle=Undefined, aspect=Undefined, baseline=Undefined,
+ blend=Undefined, clip=Undefined, cornerRadius=Undefined,
+ cornerRadiusBottomLeft=Undefined, cornerRadiusBottomRight=Undefined,
+ cornerRadiusTopLeft=Undefined, cornerRadiusTopRight=Undefined, cursor=Undefined,
+ defined=Undefined, dir=Undefined, dx=Undefined, dy=Undefined, ellipsis=Undefined,
+ endAngle=Undefined, fill=Undefined, fillOpacity=Undefined, font=Undefined,
+ fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined, height=Undefined,
+ innerRadius=Undefined, interpolate=Undefined, limit=Undefined, lineBreak=Undefined,
+ lineHeight=Undefined, opacity=Undefined, orient=Undefined, outerRadius=Undefined,
+ padAngle=Undefined, path=Undefined, radius=Undefined, scaleX=Undefined,
+ scaleY=Undefined, shape=Undefined, size=Undefined, smooth=Undefined,
+ startAngle=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined,
+ strokeDashOffset=Undefined, strokeForeground=Undefined, strokeJoin=Undefined,
+ strokeMiterLimit=Undefined, strokeOffset=Undefined, strokeOpacity=Undefined,
+ strokeWidth=Undefined, tension=Undefined, text=Undefined, theta=Undefined,
+ tooltip=Undefined, url=Undefined, width=Undefined, x=Undefined, x2=Undefined,
+ xc=Undefined, y=Undefined, y2=Undefined, yc=Undefined, zindex=Undefined, **kwds):
+ super(encodeEntry, self).__init__(align=align, angle=angle, aspect=aspect, baseline=baseline,
+ blend=blend, clip=clip, cornerRadius=cornerRadius,
+ cornerRadiusBottomLeft=cornerRadiusBottomLeft,
+ cornerRadiusBottomRight=cornerRadiusBottomRight,
+ cornerRadiusTopLeft=cornerRadiusTopLeft,
+ cornerRadiusTopRight=cornerRadiusTopRight, cursor=cursor,
+ defined=defined, dir=dir, dx=dx, dy=dy, ellipsis=ellipsis,
+ endAngle=endAngle, fill=fill, fillOpacity=fillOpacity,
+ font=font, fontSize=fontSize, fontStyle=fontStyle,
+ fontWeight=fontWeight, height=height, innerRadius=innerRadius,
+ interpolate=interpolate, limit=limit, lineBreak=lineBreak,
+ lineHeight=lineHeight, opacity=opacity, orient=orient,
+ outerRadius=outerRadius, padAngle=padAngle, path=path,
+ radius=radius, scaleX=scaleX, scaleY=scaleY, shape=shape,
+ size=size, smooth=smooth, startAngle=startAngle,
+ stroke=stroke, strokeCap=strokeCap, strokeDash=strokeDash,
+ strokeDashOffset=strokeDashOffset,
+ strokeForeground=strokeForeground, strokeJoin=strokeJoin,
+ strokeMiterLimit=strokeMiterLimit, strokeOffset=strokeOffset,
+ strokeOpacity=strokeOpacity, strokeWidth=strokeWidth,
+ tension=tension, text=text, theta=theta, tooltip=tooltip,
+ url=url, width=width, x=x, x2=x2, xc=xc, y=y, y2=y2, yc=yc,
+ zindex=zindex, **kwds)
+
+
+class encode(VegaSchema):
+ """encode schema wrapper
+
+ Mapping(required=[])
+ """
+ _schema = {'$ref': '#/defs/encode'}
+
+ def __init__(self, **kwds):
+ super(encode, self).__init__(**kwds)
+
+
+class layout(VegaSchema):
+ """layout schema wrapper
+
+ oneOf(Mapping(required=[]), :class:`signal`)
+ """
+ _schema = {'$ref': '#/defs/layout'}
+
+ def __init__(self, *args, **kwds):
+ super(layout, self).__init__(*args, **kwds)
+
+
+class guideEncode(VegaSchema):
+ """guideEncode schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ interactive : boolean
+
+ name : string
+
+ style : :class:`style`
+
+ """
+ _schema = {'$ref': '#/defs/guideEncode'}
+
+ def __init__(self, interactive=Undefined, name=Undefined, style=Undefined, **kwds):
+ super(guideEncode, self).__init__(interactive=interactive, name=name, style=style, **kwds)
+
+
+class legend(VegaSchema):
+ """legend schema wrapper
+
+ allOf(Mapping(required=[]), anyOf(Mapping(required=[size]), Mapping(required=[shape]),
+ Mapping(required=[fill]), Mapping(required=[stroke]), Mapping(required=[opacity]),
+ Mapping(required=[strokeDash]), Mapping(required=[strokeWidth])))
+ """
+ _schema = {'$ref': '#/defs/legend'}
+
+ def __init__(self, clipHeight=Undefined, columnPadding=Undefined, columns=Undefined,
+ cornerRadius=Undefined, direction=Undefined, encode=Undefined, fill=Undefined,
+ fillColor=Undefined, format=Undefined, formatType=Undefined, gradientLength=Undefined,
+ gradientOpacity=Undefined, gradientStrokeColor=Undefined,
+ gradientStrokeWidth=Undefined, gradientThickness=Undefined, gridAlign=Undefined,
+ labelAlign=Undefined, labelBaseline=Undefined, labelColor=Undefined,
+ labelFont=Undefined, labelFontSize=Undefined, labelFontStyle=Undefined,
+ labelFontWeight=Undefined, labelLimit=Undefined, labelOffset=Undefined,
+ labelOpacity=Undefined, labelOverlap=Undefined, labelSeparation=Undefined,
+ legendX=Undefined, legendY=Undefined, offset=Undefined, opacity=Undefined,
+ orient=Undefined, padding=Undefined, rowPadding=Undefined, shape=Undefined,
+ size=Undefined, stroke=Undefined, strokeColor=Undefined, strokeDash=Undefined,
+ strokeWidth=Undefined, symbolDash=Undefined, symbolDashOffset=Undefined,
+ symbolFillColor=Undefined, symbolLimit=Undefined, symbolOffset=Undefined,
+ symbolOpacity=Undefined, symbolSize=Undefined, symbolStrokeColor=Undefined,
+ symbolStrokeWidth=Undefined, symbolType=Undefined, tickCount=Undefined,
+ tickMinStep=Undefined, title=Undefined, titleAlign=Undefined, titleAnchor=Undefined,
+ titleBaseline=Undefined, titleColor=Undefined, titleFont=Undefined,
+ titleFontSize=Undefined, titleFontStyle=Undefined, titleFontWeight=Undefined,
+ titleLimit=Undefined, titleLineHeight=Undefined, titleOpacity=Undefined,
+ titleOrient=Undefined, titlePadding=Undefined, type=Undefined, values=Undefined,
+ zindex=Undefined, **kwds):
+ super(legend, self).__init__(clipHeight=clipHeight, columnPadding=columnPadding,
+ columns=columns, cornerRadius=cornerRadius, direction=direction,
+ encode=encode, fill=fill, fillColor=fillColor, format=format,
+ formatType=formatType, gradientLength=gradientLength,
+ gradientOpacity=gradientOpacity,
+ gradientStrokeColor=gradientStrokeColor,
+ gradientStrokeWidth=gradientStrokeWidth,
+ gradientThickness=gradientThickness, gridAlign=gridAlign,
+ labelAlign=labelAlign, labelBaseline=labelBaseline,
+ labelColor=labelColor, labelFont=labelFont,
+ labelFontSize=labelFontSize, labelFontStyle=labelFontStyle,
+ labelFontWeight=labelFontWeight, labelLimit=labelLimit,
+ labelOffset=labelOffset, labelOpacity=labelOpacity,
+ labelOverlap=labelOverlap, labelSeparation=labelSeparation,
+ legendX=legendX, legendY=legendY, offset=offset, opacity=opacity,
+ orient=orient, padding=padding, rowPadding=rowPadding, shape=shape,
+ size=size, stroke=stroke, strokeColor=strokeColor,
+ strokeDash=strokeDash, strokeWidth=strokeWidth,
+ symbolDash=symbolDash, symbolDashOffset=symbolDashOffset,
+ symbolFillColor=symbolFillColor, symbolLimit=symbolLimit,
+ symbolOffset=symbolOffset, symbolOpacity=symbolOpacity,
+ symbolSize=symbolSize, symbolStrokeColor=symbolStrokeColor,
+ symbolStrokeWidth=symbolStrokeWidth, symbolType=symbolType,
+ tickCount=tickCount, tickMinStep=tickMinStep, title=title,
+ titleAlign=titleAlign, titleAnchor=titleAnchor,
+ titleBaseline=titleBaseline, titleColor=titleColor,
+ titleFont=titleFont, titleFontSize=titleFontSize,
+ titleFontStyle=titleFontStyle, titleFontWeight=titleFontWeight,
+ titleLimit=titleLimit, titleLineHeight=titleLineHeight,
+ titleOpacity=titleOpacity, titleOrient=titleOrient,
+ titlePadding=titlePadding, type=type, values=values, zindex=zindex,
+ **kwds)
+
+
+class mark(VegaSchema):
+ """mark schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : :class:`marktype`
+
+ clip : :class:`markclip`
+
+ encode : :class:`encode`
+
+ interactive : :class:`booleanOrSignal`
+
+ key : string
+
+ name : string
+
+ on : :class:`onMarkTrigger`
+
+ role : string
+
+ sort : :class:`compare`
+
+ style : :class:`style`
+
+ transform : List(:class:`transformMark`)
+
+ """
+ _schema = {'$ref': '#/defs/mark'}
+
+ def __init__(self, type=Undefined, clip=Undefined, encode=Undefined, interactive=Undefined,
+ key=Undefined, name=Undefined, on=Undefined, role=Undefined, sort=Undefined,
+ style=Undefined, transform=Undefined, **kwds):
+ super(mark, self).__init__(type=type, clip=clip, encode=encode, interactive=interactive,
+ key=key, name=name, on=on, role=role, sort=sort, style=style,
+ transform=transform, **kwds)
+
+
+class markGroup(VegaSchema):
+ """markGroup schema wrapper
+
+ allOf(Mapping(required=[type]), :class:`mark`, :class:`scope`)
+ """
+ _schema = {'$ref': '#/defs/markGroup'}
+
+ def __init__(self, type=Undefined, axes=Undefined, clip=Undefined, data=Undefined, encode=Undefined,
+ interactive=Undefined, key=Undefined, layout=Undefined, legends=Undefined,
+ marks=Undefined, name=Undefined, on=Undefined, projections=Undefined, role=Undefined,
+ scales=Undefined, signals=Undefined, sort=Undefined, style=Undefined, title=Undefined,
+ transform=Undefined, usermeta=Undefined, **kwds):
+ super(markGroup, self).__init__(type=type, axes=axes, clip=clip, data=data, encode=encode,
+ interactive=interactive, key=key, layout=layout,
+ legends=legends, marks=marks, name=name, on=on,
+ projections=projections, role=role, scales=scales,
+ signals=signals, sort=sort, style=style, title=title,
+ transform=transform, usermeta=usermeta, **kwds)
+
+
+class markVisual(VegaSchema):
+ """markVisual schema wrapper
+
+ allOf(Mapping(required=[]), :class:`mark`)
+ """
+ _schema = {'$ref': '#/defs/markVisual'}
+
+ def __init__(self, type=Undefined, clip=Undefined, encode=Undefined, interactive=Undefined,
+ key=Undefined, name=Undefined, on=Undefined, role=Undefined, sort=Undefined,
+ style=Undefined, transform=Undefined, **kwds):
+ super(markVisual, self).__init__(type=type, clip=clip, encode=encode, interactive=interactive,
+ key=key, name=name, on=on, role=role, sort=sort, style=style,
+ transform=transform, **kwds)
+
+
+class listener(VegaSchema):
+ """listener schema wrapper
+
+ oneOf(:class:`signal`, Mapping(required=[scale]), :class:`stream`)
+ """
+ _schema = {'$ref': '#/defs/listener'}
+
+ def __init__(self, *args, **kwds):
+ super(listener, self).__init__(*args, **kwds)
+
+
+class onEvents(VegaSchema):
+ """onEvents schema wrapper
+
+ List(allOf(Mapping(required=[events]), oneOf(Mapping(required=[encode]),
+ Mapping(required=[update]))))
+ """
+ _schema = {'$ref': '#/defs/onEvents'}
+
+ def __init__(self, *args):
+ super(onEvents, self).__init__(*args)
+
+
+class onTrigger(VegaSchema):
+ """onTrigger schema wrapper
+
+ List(Mapping(required=[trigger]))
+ """
+ _schema = {'$ref': '#/defs/onTrigger'}
+
+ def __init__(self, *args):
+ super(onTrigger, self).__init__(*args)
+
+
+class onMarkTrigger(VegaSchema):
+ """onMarkTrigger schema wrapper
+
+ List(Mapping(required=[trigger]))
+ """
+ _schema = {'$ref': '#/defs/onMarkTrigger'}
+
+ def __init__(self, *args):
+ super(onMarkTrigger, self).__init__(*args)
+
+
+class padding(VegaSchema):
+ """padding schema wrapper
+
+ oneOf(float, Mapping(required=[]), :class:`signal`)
+ """
+ _schema = {'$ref': '#/defs/padding'}
+
+ def __init__(self, *args, **kwds):
+ super(padding, self).__init__(*args, **kwds)
+
+
+class projection(VegaSchema):
+ """projection schema wrapper
+
+ Mapping(required=[name])
+
+ Attributes
+ ----------
+
+ name : string
+
+ center : oneOf(List(:class:`numberOrSignal`), :class:`signal`)
+
+ clipAngle : :class:`numberOrSignal`
+
+ clipExtent : oneOf(List(oneOf(List(:class:`numberOrSignal`), :class:`signal`)),
+ :class:`signal`)
+
+ extent : oneOf(List(oneOf(List(:class:`numberOrSignal`), :class:`signal`)), :class:`signal`)
+
+ fit : oneOf(Mapping(required=[]), List(Any))
+
+ parallels : oneOf(List(:class:`numberOrSignal`), :class:`signal`)
+
+ pointRadius : :class:`numberOrSignal`
+
+ precision : :class:`numberOrSignal`
+
+ rotate : oneOf(List(:class:`numberOrSignal`), :class:`signal`)
+
+ scale : :class:`numberOrSignal`
+
+ size : oneOf(List(:class:`numberOrSignal`), :class:`signal`)
+
+ translate : oneOf(List(:class:`numberOrSignal`), :class:`signal`)
+
+ type : :class:`stringOrSignal`
+
+ """
+ _schema = {'$ref': '#/defs/projection'}
+
+ def __init__(self, name=Undefined, center=Undefined, clipAngle=Undefined, clipExtent=Undefined,
+ extent=Undefined, fit=Undefined, parallels=Undefined, pointRadius=Undefined,
+ precision=Undefined, rotate=Undefined, scale=Undefined, size=Undefined,
+ translate=Undefined, type=Undefined, **kwds):
+ super(projection, self).__init__(name=name, center=center, clipAngle=clipAngle,
+ clipExtent=clipExtent, extent=extent, fit=fit,
+ parallels=parallels, pointRadius=pointRadius,
+ precision=precision, rotate=rotate, scale=scale, size=size,
+ translate=translate, type=type, **kwds)
+
+
+class scale(VegaSchema):
+ """scale schema wrapper
+
+ oneOf(Mapping(required=[type, name]), Mapping(required=[type, name]),
+ Mapping(required=[type, name]), Mapping(required=[type, name]), Mapping(required=[type,
+ name]), Mapping(required=[type, name]), Mapping(required=[type, name]),
+ Mapping(required=[type, name]), Mapping(required=[name]), Mapping(required=[type, name]),
+ Mapping(required=[type, name]), Mapping(required=[type, name]))
+ """
+ _schema = {'$ref': '#/defs/scale'}
+
+ def __init__(self, *args, **kwds):
+ super(scale, self).__init__(*args, **kwds)
+
+
+class scope(VegaSchema):
+ """scope schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ axes : List(:class:`axis`)
+
+ data : List(:class:`data`)
+
+ encode : :class:`encode`
+
+ layout : :class:`layout`
+
+ legends : List(:class:`legend`)
+
+ marks : List(oneOf(:class:`markGroup`, :class:`markVisual`))
+
+ projections : List(:class:`projection`)
+
+ scales : List(:class:`scale`)
+
+ signals : List(:class:`signal`)
+
+ title : :class:`title`
+
+ usermeta : Mapping(required=[])
+
+ """
+ _schema = {'$ref': '#/defs/scope'}
+
+ def __init__(self, axes=Undefined, data=Undefined, encode=Undefined, layout=Undefined,
+ legends=Undefined, marks=Undefined, projections=Undefined, scales=Undefined,
+ signals=Undefined, title=Undefined, usermeta=Undefined, **kwds):
+ super(scope, self).__init__(axes=axes, data=data, encode=encode, layout=layout, legends=legends,
+ marks=marks, projections=projections, scales=scales,
+ signals=signals, title=title, usermeta=usermeta, **kwds)
+
+
+class signalName(VegaSchema):
+ """signalName schema wrapper
+
+ not enum('parent', 'datum', 'event', 'item')
+ """
+ _schema = {'$ref': '#/defs/signalName'}
+
+ def __init__(self, *args):
+ super(signalName, self).__init__(*args)
+
+
+class signal(VegaSchema):
+ """signal schema wrapper
+
+ oneOf(Mapping(required=[name, push]), Mapping(required=[name]), Mapping(required=[name,
+ init]))
+ """
+ _schema = {'$ref': '#/defs/signal'}
+
+ def __init__(self, *args, **kwds):
+ super(signal, self).__init__(*args, **kwds)
+
+
+class stream(VegaSchema):
+ """stream schema wrapper
+
+ allOf(Mapping(required=[]), oneOf(Mapping(required=[type]), Mapping(required=[stream]),
+ Mapping(required=[merge])))
+ """
+ _schema = {'$ref': '#/defs/stream'}
+
+ def __init__(self, between=Undefined, consume=Undefined, debounce=Undefined, filter=Undefined,
+ markname=Undefined, marktype=Undefined, throttle=Undefined, **kwds):
+ super(stream, self).__init__(between=between, consume=consume, debounce=debounce, filter=filter,
+ markname=markname, marktype=marktype, throttle=throttle, **kwds)
+
+
+class title(VegaSchema):
+ """title schema wrapper
+
+ oneOf(string, Mapping(required=[]))
+ """
+ _schema = {'$ref': '#/defs/title'}
+
+ def __init__(self, *args, **kwds):
+ super(title, self).__init__(*args, **kwds)
+
+
+class transform(VegaSchema):
+ """transform schema wrapper
+
+ oneOf(:class:`crossfilterTransform`, :class:`resolvefilterTransform`,
+ :class:`linkpathTransform`, :class:`pieTransform`, :class:`stackTransform`,
+ :class:`forceTransform`, :class:`contourTransform`, :class:`geojsonTransform`,
+ :class:`geopathTransform`, :class:`geopointTransform`, :class:`geoshapeTransform`,
+ :class:`graticuleTransform`, :class:`heatmapTransform`, :class:`isocontourTransform`,
+ :class:`kde2dTransform`, :class:`nestTransform`, :class:`packTransform`,
+ :class:`partitionTransform`, :class:`stratifyTransform`, :class:`treeTransform`,
+ :class:`treelinksTransform`, :class:`treemapTransform`, :class:`loessTransform`,
+ :class:`regressionTransform`, :class:`aggregateTransform`, :class:`binTransform`,
+ :class:`collectTransform`, :class:`countpatternTransform`, :class:`crossTransform`,
+ :class:`densityTransform`, :class:`dotbinTransform`, :class:`extentTransform`,
+ :class:`filterTransform`, :class:`flattenTransform`, :class:`foldTransform`,
+ :class:`formulaTransform`, :class:`imputeTransform`, :class:`joinaggregateTransform`,
+ :class:`kdeTransform`, :class:`lookupTransform`, :class:`pivotTransform`,
+ :class:`projectTransform`, :class:`quantileTransform`, :class:`sampleTransform`,
+ :class:`sequenceTransform`, :class:`timeunitTransform`, :class:`windowTransform`,
+ :class:`identifierTransform`, :class:`voronoiTransform`, :class:`wordcloudTransform`)
+ """
+ _schema = {'$ref': '#/defs/transform'}
+
+ def __init__(self, *args, **kwds):
+ super(transform, self).__init__(*args, **kwds)
+
+
+class transformMark(VegaSchema):
+ """transformMark schema wrapper
+
+ oneOf(:class:`crossfilterTransform`, :class:`resolvefilterTransform`,
+ :class:`linkpathTransform`, :class:`pieTransform`, :class:`stackTransform`,
+ :class:`forceTransform`, :class:`geojsonTransform`, :class:`geopathTransform`,
+ :class:`geopointTransform`, :class:`geoshapeTransform`, :class:`heatmapTransform`,
+ :class:`packTransform`, :class:`partitionTransform`, :class:`stratifyTransform`,
+ :class:`treeTransform`, :class:`treemapTransform`, :class:`binTransform`,
+ :class:`collectTransform`, :class:`dotbinTransform`, :class:`extentTransform`,
+ :class:`formulaTransform`, :class:`joinaggregateTransform`, :class:`lookupTransform`,
+ :class:`sampleTransform`, :class:`timeunitTransform`, :class:`windowTransform`,
+ :class:`identifierTransform`, :class:`voronoiTransform`, :class:`wordcloudTransform`)
+ """
+ _schema = {'$ref': '#/defs/transformMark'}
+
+ def __init__(self, *args, **kwds):
+ super(transformMark, self).__init__(*args, **kwds)
+
+
+class crossfilterTransform(VegaSchema):
+ """crossfilterTransform schema wrapper
+
+ Mapping(required=[type, fields, query])
+
+ Attributes
+ ----------
+
+ fields : oneOf(List(oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)),
+ :class:`signal`)
+
+ query : oneOf(List(Any), :class:`signal`)
+
+ type : enum('crossfilter')
+
+ signal : string
+
+ """
+ _schema = {'$ref': '#/defs/crossfilterTransform'}
+
+ def __init__(self, fields=Undefined, query=Undefined, type=Undefined, signal=Undefined, **kwds):
+ super(crossfilterTransform, self).__init__(fields=fields, query=query, type=type, signal=signal,
+ **kwds)
+
+
+class resolvefilterTransform(VegaSchema):
+ """resolvefilterTransform schema wrapper
+
+ Mapping(required=[type, ignore, filter])
+
+ Attributes
+ ----------
+
+ filter : Any
+
+ ignore : anyOf(float, :class:`signal`)
+
+ type : enum('resolvefilter')
+
+ signal : string
+
+ """
+ _schema = {'$ref': '#/defs/resolvefilterTransform'}
+
+ def __init__(self, filter=Undefined, ignore=Undefined, type=Undefined, signal=Undefined, **kwds):
+ super(resolvefilterTransform, self).__init__(filter=filter, ignore=ignore, type=type,
+ signal=signal, **kwds)
+
+
+class linkpathTransform(VegaSchema):
+ """linkpathTransform schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : enum('linkpath')
+
+ orient : anyOf(enum('horizontal', 'vertical', 'radial'), :class:`signal`)
+
+ require : :class:`signal`
+
+ shape : anyOf(enum('line', 'arc', 'curve', 'diagonal', 'orthogonal'), :class:`signal`)
+
+ signal : string
+
+ sourceX : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ sourceY : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ targetX : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ targetY : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ as : anyOf(string, :class:`signal`)
+
+ """
+ _schema = {'$ref': '#/defs/linkpathTransform'}
+
+ def __init__(self, type=Undefined, orient=Undefined, require=Undefined, shape=Undefined,
+ signal=Undefined, sourceX=Undefined, sourceY=Undefined, targetX=Undefined,
+ targetY=Undefined, **kwds):
+ super(linkpathTransform, self).__init__(type=type, orient=orient, require=require, shape=shape,
+ signal=signal, sourceX=sourceX, sourceY=sourceY,
+ targetX=targetX, targetY=targetY, **kwds)
+
+
+class pieTransform(VegaSchema):
+ """pieTransform schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : enum('pie')
+
+ endAngle : anyOf(float, :class:`signal`)
+
+ field : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ signal : string
+
+ sort : anyOf(boolean, :class:`signal`)
+
+ startAngle : anyOf(float, :class:`signal`)
+
+ as : oneOf(List(anyOf(string, :class:`signal`)), :class:`signal`)
+
+ """
+ _schema = {'$ref': '#/defs/pieTransform'}
+
+ def __init__(self, type=Undefined, endAngle=Undefined, field=Undefined, signal=Undefined,
+ sort=Undefined, startAngle=Undefined, **kwds):
+ super(pieTransform, self).__init__(type=type, endAngle=endAngle, field=field, signal=signal,
+ sort=sort, startAngle=startAngle, **kwds)
+
+
+class stackTransform(VegaSchema):
+ """stackTransform schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : enum('stack')
+
+ field : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ groupby : oneOf(List(oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)),
+ :class:`signal`)
+
+ offset : anyOf(enum('zero', 'center', 'normalize'), :class:`signal`)
+
+ signal : string
+
+ sort : :class:`compare`
+
+ as : oneOf(List(anyOf(string, :class:`signal`)), :class:`signal`)
+
+ """
+ _schema = {'$ref': '#/defs/stackTransform'}
+
+ def __init__(self, type=Undefined, field=Undefined, groupby=Undefined, offset=Undefined,
+ signal=Undefined, sort=Undefined, **kwds):
+ super(stackTransform, self).__init__(type=type, field=field, groupby=groupby, offset=offset,
+ signal=signal, sort=sort, **kwds)
+
+
+class forceTransform(VegaSchema):
+ """forceTransform schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : enum('force')
+
+ alpha : anyOf(float, :class:`signal`)
+
+ alphaMin : anyOf(float, :class:`signal`)
+
+ alphaTarget : anyOf(float, :class:`signal`)
+
+ forces : List(oneOf(Mapping(required=[force]), Mapping(required=[force]),
+ Mapping(required=[force]), Mapping(required=[force]), Mapping(required=[force]),
+ Mapping(required=[force])))
+
+ iterations : anyOf(float, :class:`signal`)
+
+ restart : anyOf(boolean, :class:`signal`)
+
+ signal : string
+
+ static : anyOf(boolean, :class:`signal`)
+
+ velocityDecay : anyOf(float, :class:`signal`)
+
+ as : oneOf(List(anyOf(string, :class:`signal`)), :class:`signal`)
+
+ """
+ _schema = {'$ref': '#/defs/forceTransform'}
+
+ def __init__(self, type=Undefined, alpha=Undefined, alphaMin=Undefined, alphaTarget=Undefined,
+ forces=Undefined, iterations=Undefined, restart=Undefined, signal=Undefined,
+ static=Undefined, velocityDecay=Undefined, **kwds):
+ super(forceTransform, self).__init__(type=type, alpha=alpha, alphaMin=alphaMin,
+ alphaTarget=alphaTarget, forces=forces,
+ iterations=iterations, restart=restart, signal=signal,
+ static=static, velocityDecay=velocityDecay, **kwds)
+
+
+class contourTransform(VegaSchema):
+ """contourTransform schema wrapper
+
+ Mapping(required=[type, size])
+
+ Attributes
+ ----------
+
+ size : oneOf(List(anyOf(float, :class:`signal`)), :class:`signal`)
+
+ type : enum('contour')
+
+ bandwidth : anyOf(float, :class:`signal`)
+
+ cellSize : anyOf(float, :class:`signal`)
+
+ count : anyOf(float, :class:`signal`)
+
+ nice : anyOf(boolean, :class:`signal`)
+
+ signal : string
+
+ smooth : anyOf(boolean, :class:`signal`)
+
+ thresholds : oneOf(List(anyOf(float, :class:`signal`)), :class:`signal`)
+
+ values : oneOf(List(anyOf(float, :class:`signal`)), :class:`signal`)
+
+ weight : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ x : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ y : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ """
+ _schema = {'$ref': '#/defs/contourTransform'}
+
+ def __init__(self, size=Undefined, type=Undefined, bandwidth=Undefined, cellSize=Undefined,
+ count=Undefined, nice=Undefined, signal=Undefined, smooth=Undefined,
+ thresholds=Undefined, values=Undefined, weight=Undefined, x=Undefined, y=Undefined,
+ **kwds):
+ super(contourTransform, self).__init__(size=size, type=type, bandwidth=bandwidth,
+ cellSize=cellSize, count=count, nice=nice, signal=signal,
+ smooth=smooth, thresholds=thresholds, values=values,
+ weight=weight, x=x, y=y, **kwds)
+
+
+class geojsonTransform(VegaSchema):
+ """geojsonTransform schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : enum('geojson')
+
+ fields : oneOf(List(oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)),
+ :class:`signal`)
+
+ geojson : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ signal : string
+
+ """
+ _schema = {'$ref': '#/defs/geojsonTransform'}
+
+ def __init__(self, type=Undefined, fields=Undefined, geojson=Undefined, signal=Undefined, **kwds):
+ super(geojsonTransform, self).__init__(type=type, fields=fields, geojson=geojson, signal=signal,
+ **kwds)
+
+
+class geopathTransform(VegaSchema):
+ """geopathTransform schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : enum('geopath')
+
+ field : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ pointRadius : anyOf(float, :class:`signal`, :class:`expr`, :class:`paramField`)
+
+ projection : string
+
+ signal : string
+
+ as : anyOf(string, :class:`signal`)
+
+ """
+ _schema = {'$ref': '#/defs/geopathTransform'}
+
+ def __init__(self, type=Undefined, field=Undefined, pointRadius=Undefined, projection=Undefined,
+ signal=Undefined, **kwds):
+ super(geopathTransform, self).__init__(type=type, field=field, pointRadius=pointRadius,
+ projection=projection, signal=signal, **kwds)
+
+
+class geopointTransform(VegaSchema):
+ """geopointTransform schema wrapper
+
+ Mapping(required=[type, projection, fields])
+
+ Attributes
+ ----------
+
+ fields : oneOf(List(oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)),
+ :class:`signal`)
+
+ projection : string
+
+ type : enum('geopoint')
+
+ signal : string
+
+ as : oneOf(List(anyOf(string, :class:`signal`)), :class:`signal`)
+
+ """
+ _schema = {'$ref': '#/defs/geopointTransform'}
+
+ def __init__(self, fields=Undefined, projection=Undefined, type=Undefined, signal=Undefined, **kwds):
+ super(geopointTransform, self).__init__(fields=fields, projection=projection, type=type,
+ signal=signal, **kwds)
+
+
+class geoshapeTransform(VegaSchema):
+ """geoshapeTransform schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : enum('geoshape')
+
+ field : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ pointRadius : anyOf(float, :class:`signal`, :class:`expr`, :class:`paramField`)
+
+ projection : string
+
+ signal : string
+
+ as : anyOf(string, :class:`signal`)
+
+ """
+ _schema = {'$ref': '#/defs/geoshapeTransform'}
+
+ def __init__(self, type=Undefined, field=Undefined, pointRadius=Undefined, projection=Undefined,
+ signal=Undefined, **kwds):
+ super(geoshapeTransform, self).__init__(type=type, field=field, pointRadius=pointRadius,
+ projection=projection, signal=signal, **kwds)
+
+
+class graticuleTransform(VegaSchema):
+ """graticuleTransform schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : enum('graticule')
+
+ extent : oneOf(List(Any), :class:`signal`)
+
+ extentMajor : oneOf(List(Any), :class:`signal`)
+
+ extentMinor : oneOf(List(Any), :class:`signal`)
+
+ precision : anyOf(float, :class:`signal`)
+
+ signal : string
+
+ step : oneOf(List(anyOf(float, :class:`signal`)), :class:`signal`)
+
+ stepMajor : oneOf(List(anyOf(float, :class:`signal`)), :class:`signal`)
+
+ stepMinor : oneOf(List(anyOf(float, :class:`signal`)), :class:`signal`)
+
+ """
+ _schema = {'$ref': '#/defs/graticuleTransform'}
+
+ def __init__(self, type=Undefined, extent=Undefined, extentMajor=Undefined, extentMinor=Undefined,
+ precision=Undefined, signal=Undefined, step=Undefined, stepMajor=Undefined,
+ stepMinor=Undefined, **kwds):
+ super(graticuleTransform, self).__init__(type=type, extent=extent, extentMajor=extentMajor,
+ extentMinor=extentMinor, precision=precision,
+ signal=signal, step=step, stepMajor=stepMajor,
+ stepMinor=stepMinor, **kwds)
+
+
+class heatmapTransform(VegaSchema):
+ """heatmapTransform schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : enum('heatmap')
+
+ color : anyOf(string, :class:`signal`, :class:`expr`, :class:`paramField`)
+
+ field : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ opacity : anyOf(float, :class:`signal`, :class:`expr`, :class:`paramField`)
+
+ resolve : anyOf(enum('shared', 'independent'), :class:`signal`)
+
+ signal : string
+
+ as : anyOf(string, :class:`signal`)
+
+ """
+ _schema = {'$ref': '#/defs/heatmapTransform'}
+
+ def __init__(self, type=Undefined, color=Undefined, field=Undefined, opacity=Undefined,
+ resolve=Undefined, signal=Undefined, **kwds):
+ super(heatmapTransform, self).__init__(type=type, color=color, field=field, opacity=opacity,
+ resolve=resolve, signal=signal, **kwds)
+
+
+class isocontourTransform(VegaSchema):
+ """isocontourTransform schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : enum('isocontour')
+
+ field : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ levels : anyOf(float, :class:`signal`)
+
+ nice : anyOf(boolean, :class:`signal`)
+
+ resolve : anyOf(enum('shared', 'independent'), :class:`signal`)
+
+ scale : anyOf(float, :class:`signal`, :class:`expr`, :class:`paramField`)
+
+ signal : string
+
+ smooth : anyOf(boolean, :class:`signal`)
+
+ thresholds : oneOf(List(anyOf(float, :class:`signal`)), :class:`signal`)
+
+ translate : oneOf(List(anyOf(float, :class:`signal`, :class:`expr`, :class:`paramField`)),
+ :class:`signal`)
+
+ zero : anyOf(boolean, :class:`signal`)
+
+ as : anyOf(string, :class:`signal`, None)
+
+ """
+ _schema = {'$ref': '#/defs/isocontourTransform'}
+
+ def __init__(self, type=Undefined, field=Undefined, levels=Undefined, nice=Undefined,
+ resolve=Undefined, scale=Undefined, signal=Undefined, smooth=Undefined,
+ thresholds=Undefined, translate=Undefined, zero=Undefined, **kwds):
+ super(isocontourTransform, self).__init__(type=type, field=field, levels=levels, nice=nice,
+ resolve=resolve, scale=scale, signal=signal,
+ smooth=smooth, thresholds=thresholds,
+ translate=translate, zero=zero, **kwds)
+
+
+class kde2dTransform(VegaSchema):
+ """kde2dTransform schema wrapper
+
+ Mapping(required=[type, size, x, y])
+
+ Attributes
+ ----------
+
+ size : oneOf(List(anyOf(float, :class:`signal`)), :class:`signal`)
+
+ type : enum('kde2d')
+
+ x : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ y : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ bandwidth : oneOf(List(anyOf(float, :class:`signal`)), :class:`signal`)
+
+ cellSize : anyOf(float, :class:`signal`)
+
+ counts : anyOf(boolean, :class:`signal`)
+
+ groupby : oneOf(List(oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)),
+ :class:`signal`)
+
+ signal : string
+
+ weight : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ as : anyOf(string, :class:`signal`)
+
+ """
+ _schema = {'$ref': '#/defs/kde2dTransform'}
+
+ def __init__(self, size=Undefined, type=Undefined, x=Undefined, y=Undefined, bandwidth=Undefined,
+ cellSize=Undefined, counts=Undefined, groupby=Undefined, signal=Undefined,
+ weight=Undefined, **kwds):
+ super(kde2dTransform, self).__init__(size=size, type=type, x=x, y=y, bandwidth=bandwidth,
+ cellSize=cellSize, counts=counts, groupby=groupby,
+ signal=signal, weight=weight, **kwds)
+
+
+class nestTransform(VegaSchema):
+ """nestTransform schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : enum('nest')
+
+ generate : anyOf(boolean, :class:`signal`)
+
+ keys : oneOf(List(oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)),
+ :class:`signal`)
+
+ signal : string
+
+ """
+ _schema = {'$ref': '#/defs/nestTransform'}
+
+ def __init__(self, type=Undefined, generate=Undefined, keys=Undefined, signal=Undefined, **kwds):
+ super(nestTransform, self).__init__(type=type, generate=generate, keys=keys, signal=signal,
+ **kwds)
+
+
+class packTransform(VegaSchema):
+ """packTransform schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : enum('pack')
+
+ field : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ padding : anyOf(float, :class:`signal`)
+
+ radius : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ signal : string
+
+ size : oneOf(List(anyOf(float, :class:`signal`)), :class:`signal`)
+
+ sort : :class:`compare`
+
+ as : oneOf(List(anyOf(string, :class:`signal`)), :class:`signal`)
+
+ """
+ _schema = {'$ref': '#/defs/packTransform'}
+
+ def __init__(self, type=Undefined, field=Undefined, padding=Undefined, radius=Undefined,
+ signal=Undefined, size=Undefined, sort=Undefined, **kwds):
+ super(packTransform, self).__init__(type=type, field=field, padding=padding, radius=radius,
+ signal=signal, size=size, sort=sort, **kwds)
+
+
+class partitionTransform(VegaSchema):
+ """partitionTransform schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : enum('partition')
+
+ field : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ padding : anyOf(float, :class:`signal`)
+
+ round : anyOf(boolean, :class:`signal`)
+
+ signal : string
+
+ size : oneOf(List(anyOf(float, :class:`signal`)), :class:`signal`)
+
+ sort : :class:`compare`
+
+ as : oneOf(List(anyOf(string, :class:`signal`)), :class:`signal`)
+
+ """
+ _schema = {'$ref': '#/defs/partitionTransform'}
+
+ def __init__(self, type=Undefined, field=Undefined, padding=Undefined, round=Undefined,
+ signal=Undefined, size=Undefined, sort=Undefined, **kwds):
+ super(partitionTransform, self).__init__(type=type, field=field, padding=padding, round=round,
+ signal=signal, size=size, sort=sort, **kwds)
+
+
+class stratifyTransform(VegaSchema):
+ """stratifyTransform schema wrapper
+
+ Mapping(required=[type, key, parentKey])
+
+ Attributes
+ ----------
+
+ key : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ parentKey : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ type : enum('stratify')
+
+ signal : string
+
+ """
+ _schema = {'$ref': '#/defs/stratifyTransform'}
+
+ def __init__(self, key=Undefined, parentKey=Undefined, type=Undefined, signal=Undefined, **kwds):
+ super(stratifyTransform, self).__init__(key=key, parentKey=parentKey, type=type, signal=signal,
+ **kwds)
+
+
+class treeTransform(VegaSchema):
+ """treeTransform schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : enum('tree')
+
+ field : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ method : anyOf(enum('tidy', 'cluster'), :class:`signal`)
+
+ nodeSize : oneOf(List(anyOf(float, :class:`signal`)), :class:`signal`)
+
+ separation : anyOf(boolean, :class:`signal`)
+
+ signal : string
+
+ size : oneOf(List(anyOf(float, :class:`signal`)), :class:`signal`)
+
+ sort : :class:`compare`
+
+ as : oneOf(List(anyOf(string, :class:`signal`)), :class:`signal`)
+
+ """
+ _schema = {'$ref': '#/defs/treeTransform'}
+
+ def __init__(self, type=Undefined, field=Undefined, method=Undefined, nodeSize=Undefined,
+ separation=Undefined, signal=Undefined, size=Undefined, sort=Undefined, **kwds):
+ super(treeTransform, self).__init__(type=type, field=field, method=method, nodeSize=nodeSize,
+ separation=separation, signal=signal, size=size, sort=sort,
+ **kwds)
+
+
+class treelinksTransform(VegaSchema):
+ """treelinksTransform schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : enum('treelinks')
+
+ signal : string
+
+ """
+ _schema = {'$ref': '#/defs/treelinksTransform'}
+
+ def __init__(self, type=Undefined, signal=Undefined, **kwds):
+ super(treelinksTransform, self).__init__(type=type, signal=signal, **kwds)
+
+
+class treemapTransform(VegaSchema):
+ """treemapTransform schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : enum('treemap')
+
+ field : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ method : anyOf(enum('squarify', 'resquarify', 'binary', 'dice', 'slice', 'slicedice'),
+ :class:`signal`)
+
+ padding : anyOf(float, :class:`signal`)
+
+ paddingBottom : anyOf(float, :class:`signal`)
+
+ paddingInner : anyOf(float, :class:`signal`)
+
+ paddingLeft : anyOf(float, :class:`signal`)
+
+ paddingOuter : anyOf(float, :class:`signal`)
+
+ paddingRight : anyOf(float, :class:`signal`)
+
+ paddingTop : anyOf(float, :class:`signal`)
+
+ ratio : anyOf(float, :class:`signal`)
+
+ round : anyOf(boolean, :class:`signal`)
+
+ signal : string
+
+ size : oneOf(List(anyOf(float, :class:`signal`)), :class:`signal`)
+
+ sort : :class:`compare`
+
+ as : oneOf(List(anyOf(string, :class:`signal`)), :class:`signal`)
+
+ """
+ _schema = {'$ref': '#/defs/treemapTransform'}
+
+ def __init__(self, type=Undefined, field=Undefined, method=Undefined, padding=Undefined,
+ paddingBottom=Undefined, paddingInner=Undefined, paddingLeft=Undefined,
+ paddingOuter=Undefined, paddingRight=Undefined, paddingTop=Undefined, ratio=Undefined,
+ round=Undefined, signal=Undefined, size=Undefined, sort=Undefined, **kwds):
+ super(treemapTransform, self).__init__(type=type, field=field, method=method, padding=padding,
+ paddingBottom=paddingBottom, paddingInner=paddingInner,
+ paddingLeft=paddingLeft, paddingOuter=paddingOuter,
+ paddingRight=paddingRight, paddingTop=paddingTop,
+ ratio=ratio, round=round, signal=signal, size=size,
+ sort=sort, **kwds)
+
+
+class loessTransform(VegaSchema):
+ """loessTransform schema wrapper
+
+ Mapping(required=[type, x, y])
+
+ Attributes
+ ----------
+
+ type : enum('loess')
+
+ x : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ y : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ bandwidth : anyOf(float, :class:`signal`)
+
+ groupby : oneOf(List(oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)),
+ :class:`signal`)
+
+ signal : string
+
+ as : oneOf(List(anyOf(string, :class:`signal`)), :class:`signal`)
+
+ """
+ _schema = {'$ref': '#/defs/loessTransform'}
+
+ def __init__(self, type=Undefined, x=Undefined, y=Undefined, bandwidth=Undefined, groupby=Undefined,
+ signal=Undefined, **kwds):
+ super(loessTransform, self).__init__(type=type, x=x, y=y, bandwidth=bandwidth, groupby=groupby,
+ signal=signal, **kwds)
+
+
+class regressionTransform(VegaSchema):
+ """regressionTransform schema wrapper
+
+ Mapping(required=[type, x, y])
+
+ Attributes
+ ----------
+
+ type : enum('regression')
+
+ x : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ y : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ extent : oneOf(List(anyOf(float, :class:`signal`)), :class:`signal`)
+
+ groupby : oneOf(List(oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)),
+ :class:`signal`)
+
+ method : anyOf(string, :class:`signal`)
+
+ order : anyOf(float, :class:`signal`)
+
+ params : anyOf(boolean, :class:`signal`)
+
+ signal : string
+
+ as : oneOf(List(anyOf(string, :class:`signal`)), :class:`signal`)
+
+ """
+ _schema = {'$ref': '#/defs/regressionTransform'}
+
+ def __init__(self, type=Undefined, x=Undefined, y=Undefined, extent=Undefined, groupby=Undefined,
+ method=Undefined, order=Undefined, params=Undefined, signal=Undefined, **kwds):
+ super(regressionTransform, self).__init__(type=type, x=x, y=y, extent=extent, groupby=groupby,
+ method=method, order=order, params=params,
+ signal=signal, **kwds)
+
+
+class aggregateTransform(VegaSchema):
+ """aggregateTransform schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : enum('aggregate')
+
+ cross : anyOf(boolean, :class:`signal`)
+
+ drop : anyOf(boolean, :class:`signal`)
+
+ fields : oneOf(List(oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`, None)),
+ :class:`signal`)
+
+ groupby : oneOf(List(oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)),
+ :class:`signal`)
+
+ key : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ ops : oneOf(List(anyOf(enum('values', 'count', '__count__', 'missing', 'valid', 'sum',
+ 'product', 'mean', 'average', 'variance', 'variancep', 'stdev', 'stdevp', 'stderr',
+ 'distinct', 'ci0', 'ci1', 'median', 'q1', 'q3', 'argmin', 'argmax', 'min', 'max'),
+ :class:`signal`)), :class:`signal`)
+
+ signal : string
+
+ as : oneOf(List(anyOf(string, :class:`signal`, None)), :class:`signal`)
+
+ """
+ _schema = {'$ref': '#/defs/aggregateTransform'}
+
+ def __init__(self, type=Undefined, cross=Undefined, drop=Undefined, fields=Undefined,
+ groupby=Undefined, key=Undefined, ops=Undefined, signal=Undefined, **kwds):
+ super(aggregateTransform, self).__init__(type=type, cross=cross, drop=drop, fields=fields,
+ groupby=groupby, key=key, ops=ops, signal=signal,
+ **kwds)
+
+
+class binTransform(VegaSchema):
+ """binTransform schema wrapper
+
+ Mapping(required=[type, field, extent])
+
+ Attributes
+ ----------
+
+ extent : oneOf(List(anyOf(float, :class:`signal`)), :class:`signal`)
+
+ field : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ type : enum('bin')
+
+ anchor : anyOf(float, :class:`signal`)
+
+ base : anyOf(float, :class:`signal`)
+
+ divide : oneOf(List(anyOf(float, :class:`signal`)), :class:`signal`)
+
+ interval : anyOf(boolean, :class:`signal`)
+
+ maxbins : anyOf(float, :class:`signal`)
+
+ minstep : anyOf(float, :class:`signal`)
+
+ name : anyOf(string, :class:`signal`)
+
+ nice : anyOf(boolean, :class:`signal`)
+
+ signal : string
+
+ span : anyOf(float, :class:`signal`)
+
+ step : anyOf(float, :class:`signal`)
+
+ steps : oneOf(List(anyOf(float, :class:`signal`)), :class:`signal`)
+
+ as : oneOf(List(anyOf(string, :class:`signal`)), :class:`signal`)
+
+ """
+ _schema = {'$ref': '#/defs/binTransform'}
+
+ def __init__(self, extent=Undefined, field=Undefined, type=Undefined, anchor=Undefined,
+ base=Undefined, divide=Undefined, interval=Undefined, maxbins=Undefined,
+ minstep=Undefined, name=Undefined, nice=Undefined, signal=Undefined, span=Undefined,
+ step=Undefined, steps=Undefined, **kwds):
+ super(binTransform, self).__init__(extent=extent, field=field, type=type, anchor=anchor,
+ base=base, divide=divide, interval=interval, maxbins=maxbins,
+ minstep=minstep, name=name, nice=nice, signal=signal,
+ span=span, step=step, steps=steps, **kwds)
+
+
+class collectTransform(VegaSchema):
+ """collectTransform schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : enum('collect')
+
+ signal : string
+
+ sort : :class:`compare`
+
+ """
+ _schema = {'$ref': '#/defs/collectTransform'}
+
+ def __init__(self, type=Undefined, signal=Undefined, sort=Undefined, **kwds):
+ super(collectTransform, self).__init__(type=type, signal=signal, sort=sort, **kwds)
+
+
+class countpatternTransform(VegaSchema):
+ """countpatternTransform schema wrapper
+
+ Mapping(required=[type, field])
+
+ Attributes
+ ----------
+
+ field : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ type : enum('countpattern')
+
+ case : anyOf(enum('upper', 'lower', 'mixed'), :class:`signal`)
+
+ pattern : anyOf(string, :class:`signal`)
+
+ signal : string
+
+ stopwords : anyOf(string, :class:`signal`)
+
+ as : oneOf(List(anyOf(string, :class:`signal`)), :class:`signal`)
+
+ """
+ _schema = {'$ref': '#/defs/countpatternTransform'}
+
+ def __init__(self, field=Undefined, type=Undefined, case=Undefined, pattern=Undefined,
+ signal=Undefined, stopwords=Undefined, **kwds):
+ super(countpatternTransform, self).__init__(field=field, type=type, case=case, pattern=pattern,
+ signal=signal, stopwords=stopwords, **kwds)
+
+
+class crossTransform(VegaSchema):
+ """crossTransform schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : enum('cross')
+
+ filter : :class:`exprString`
+
+ signal : string
+
+ as : oneOf(List(anyOf(string, :class:`signal`)), :class:`signal`)
+
+ """
+ _schema = {'$ref': '#/defs/crossTransform'}
+
+ def __init__(self, type=Undefined, filter=Undefined, signal=Undefined, **kwds):
+ super(crossTransform, self).__init__(type=type, filter=filter, signal=signal, **kwds)
+
+
+class densityTransform(VegaSchema):
+ """densityTransform schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : enum('density')
+
+ distribution : oneOf(Mapping(required=[function]), Mapping(required=[function]),
+ Mapping(required=[function]), Mapping(required=[function, field]),
+ Mapping(required=[function]))
+
+ extent : oneOf(List(anyOf(float, :class:`signal`)), :class:`signal`)
+
+ maxsteps : anyOf(float, :class:`signal`)
+
+ method : anyOf(string, :class:`signal`)
+
+ minsteps : anyOf(float, :class:`signal`)
+
+ signal : string
+
+ steps : anyOf(float, :class:`signal`)
+
+ as : oneOf(List(anyOf(string, :class:`signal`)), :class:`signal`)
+
+ """
+ _schema = {'$ref': '#/defs/densityTransform'}
+
+ def __init__(self, type=Undefined, distribution=Undefined, extent=Undefined, maxsteps=Undefined,
+ method=Undefined, minsteps=Undefined, signal=Undefined, steps=Undefined, **kwds):
+ super(densityTransform, self).__init__(type=type, distribution=distribution, extent=extent,
+ maxsteps=maxsteps, method=method, minsteps=minsteps,
+ signal=signal, steps=steps, **kwds)
+
+
+class dotbinTransform(VegaSchema):
+ """dotbinTransform schema wrapper
+
+ Mapping(required=[type, field])
+
+ Attributes
+ ----------
+
+ field : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ type : enum('dotbin')
+
+ groupby : oneOf(List(oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)),
+ :class:`signal`)
+
+ signal : string
+
+ smooth : anyOf(boolean, :class:`signal`)
+
+ step : anyOf(float, :class:`signal`)
+
+ as : anyOf(string, :class:`signal`)
+
+ """
+ _schema = {'$ref': '#/defs/dotbinTransform'}
+
+ def __init__(self, field=Undefined, type=Undefined, groupby=Undefined, signal=Undefined,
+ smooth=Undefined, step=Undefined, **kwds):
+ super(dotbinTransform, self).__init__(field=field, type=type, groupby=groupby, signal=signal,
+ smooth=smooth, step=step, **kwds)
+
+
+class extentTransform(VegaSchema):
+ """extentTransform schema wrapper
+
+ Mapping(required=[type, field])
+
+ Attributes
+ ----------
+
+ field : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ type : enum('extent')
+
+ signal : string
+
+ """
+ _schema = {'$ref': '#/defs/extentTransform'}
+
+ def __init__(self, field=Undefined, type=Undefined, signal=Undefined, **kwds):
+ super(extentTransform, self).__init__(field=field, type=type, signal=signal, **kwds)
+
+
+class filterTransform(VegaSchema):
+ """filterTransform schema wrapper
+
+ Mapping(required=[type, expr])
+
+ Attributes
+ ----------
+
+ expr : :class:`exprString`
+
+ type : enum('filter')
+
+ signal : string
+
+ """
+ _schema = {'$ref': '#/defs/filterTransform'}
+
+ def __init__(self, expr=Undefined, type=Undefined, signal=Undefined, **kwds):
+ super(filterTransform, self).__init__(expr=expr, type=type, signal=signal, **kwds)
+
+
+class flattenTransform(VegaSchema):
+ """flattenTransform schema wrapper
+
+ Mapping(required=[type, fields])
+
+ Attributes
+ ----------
+
+ fields : oneOf(List(oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)),
+ :class:`signal`)
+
+ type : enum('flatten')
+
+ index : anyOf(string, :class:`signal`)
+
+ signal : string
+
+ as : oneOf(List(anyOf(string, :class:`signal`)), :class:`signal`)
+
+ """
+ _schema = {'$ref': '#/defs/flattenTransform'}
+
+ def __init__(self, fields=Undefined, type=Undefined, index=Undefined, signal=Undefined, **kwds):
+ super(flattenTransform, self).__init__(fields=fields, type=type, index=index, signal=signal,
+ **kwds)
+
+
+class foldTransform(VegaSchema):
+ """foldTransform schema wrapper
+
+ Mapping(required=[type, fields])
+
+ Attributes
+ ----------
+
+ fields : oneOf(List(oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)),
+ :class:`signal`)
+
+ type : enum('fold')
+
+ signal : string
+
+ as : oneOf(List(anyOf(string, :class:`signal`)), :class:`signal`)
+
+ """
+ _schema = {'$ref': '#/defs/foldTransform'}
+
+ def __init__(self, fields=Undefined, type=Undefined, signal=Undefined, **kwds):
+ super(foldTransform, self).__init__(fields=fields, type=type, signal=signal, **kwds)
+
+
+class formulaTransform(VegaSchema):
+ """formulaTransform schema wrapper
+
+ Mapping(required=[type, expr, as])
+
+ Attributes
+ ----------
+
+ expr : :class:`exprString`
+
+ type : enum('formula')
+
+ initonly : anyOf(boolean, :class:`signal`)
+
+ signal : string
+
+ as : anyOf(string, :class:`signal`)
+
+ """
+ _schema = {'$ref': '#/defs/formulaTransform'}
+
+ def __init__(self, expr=Undefined, type=Undefined, initonly=Undefined, signal=Undefined, **kwds):
+ super(formulaTransform, self).__init__(expr=expr, type=type, initonly=initonly, signal=signal,
+ **kwds)
+
+
+class imputeTransform(VegaSchema):
+ """imputeTransform schema wrapper
+
+ Mapping(required=[type, field, key])
+
+ Attributes
+ ----------
+
+ field : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ key : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ type : enum('impute')
+
+ groupby : oneOf(List(oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)),
+ :class:`signal`)
+
+ keyvals : oneOf(List(Any), :class:`signal`)
+
+ method : anyOf(enum('value', 'mean', 'median', 'max', 'min'), :class:`signal`)
+
+ signal : string
+
+ value : Any
+
+ """
+ _schema = {'$ref': '#/defs/imputeTransform'}
+
+ def __init__(self, field=Undefined, key=Undefined, type=Undefined, groupby=Undefined,
+ keyvals=Undefined, method=Undefined, signal=Undefined, value=Undefined, **kwds):
+ super(imputeTransform, self).__init__(field=field, key=key, type=type, groupby=groupby,
+ keyvals=keyvals, method=method, signal=signal,
+ value=value, **kwds)
+
+
+class joinaggregateTransform(VegaSchema):
+ """joinaggregateTransform schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : enum('joinaggregate')
+
+ fields : oneOf(List(oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`, None)),
+ :class:`signal`)
+
+ groupby : oneOf(List(oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)),
+ :class:`signal`)
+
+ key : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ ops : oneOf(List(anyOf(enum('values', 'count', '__count__', 'missing', 'valid', 'sum',
+ 'product', 'mean', 'average', 'variance', 'variancep', 'stdev', 'stdevp', 'stderr',
+ 'distinct', 'ci0', 'ci1', 'median', 'q1', 'q3', 'argmin', 'argmax', 'min', 'max'),
+ :class:`signal`)), :class:`signal`)
+
+ signal : string
+
+ as : oneOf(List(anyOf(string, :class:`signal`, None)), :class:`signal`)
+
+ """
+ _schema = {'$ref': '#/defs/joinaggregateTransform'}
+
+ def __init__(self, type=Undefined, fields=Undefined, groupby=Undefined, key=Undefined,
+ ops=Undefined, signal=Undefined, **kwds):
+ super(joinaggregateTransform, self).__init__(type=type, fields=fields, groupby=groupby, key=key,
+ ops=ops, signal=signal, **kwds)
+
+
+class kdeTransform(VegaSchema):
+ """kdeTransform schema wrapper
+
+ Mapping(required=[type, field])
+
+ Attributes
+ ----------
+
+ field : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ type : enum('kde')
+
+ bandwidth : anyOf(float, :class:`signal`)
+
+ counts : anyOf(boolean, :class:`signal`)
+
+ cumulative : anyOf(boolean, :class:`signal`)
+
+ extent : oneOf(List(anyOf(float, :class:`signal`)), :class:`signal`)
+
+ groupby : oneOf(List(oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)),
+ :class:`signal`)
+
+ maxsteps : anyOf(float, :class:`signal`)
+
+ minsteps : anyOf(float, :class:`signal`)
+
+ resolve : anyOf(enum('shared', 'independent'), :class:`signal`)
+
+ signal : string
+
+ steps : anyOf(float, :class:`signal`)
+
+ as : oneOf(List(anyOf(string, :class:`signal`)), :class:`signal`)
+
+ """
+ _schema = {'$ref': '#/defs/kdeTransform'}
+
+ def __init__(self, field=Undefined, type=Undefined, bandwidth=Undefined, counts=Undefined,
+ cumulative=Undefined, extent=Undefined, groupby=Undefined, maxsteps=Undefined,
+ minsteps=Undefined, resolve=Undefined, signal=Undefined, steps=Undefined, **kwds):
+ super(kdeTransform, self).__init__(field=field, type=type, bandwidth=bandwidth, counts=counts,
+ cumulative=cumulative, extent=extent, groupby=groupby,
+ maxsteps=maxsteps, minsteps=minsteps, resolve=resolve,
+ signal=signal, steps=steps, **kwds)
+
+
+class lookupTransform(VegaSchema):
+ """lookupTransform schema wrapper
+
+ Mapping(required=[type, from, key, fields])
+
+ Attributes
+ ----------
+
+ fields : oneOf(List(oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)),
+ :class:`signal`)
+
+ key : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ type : enum('lookup')
+
+ default : Any
+
+ signal : string
+
+ values : oneOf(List(oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)),
+ :class:`signal`)
+
+ as : oneOf(List(anyOf(string, :class:`signal`)), :class:`signal`)
+
+ from : string
+
+ """
+ _schema = {'$ref': '#/defs/lookupTransform'}
+
+ def __init__(self, fields=Undefined, key=Undefined, type=Undefined, default=Undefined,
+ signal=Undefined, values=Undefined, **kwds):
+ super(lookupTransform, self).__init__(fields=fields, key=key, type=type, default=default,
+ signal=signal, values=values, **kwds)
+
+
+class pivotTransform(VegaSchema):
+ """pivotTransform schema wrapper
+
+ Mapping(required=[type, field, value])
+
+ Attributes
+ ----------
+
+ field : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ type : enum('pivot')
+
+ value : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ groupby : oneOf(List(oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)),
+ :class:`signal`)
+
+ key : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ limit : anyOf(float, :class:`signal`)
+
+ op : anyOf(enum('values', 'count', '__count__', 'missing', 'valid', 'sum', 'product',
+ 'mean', 'average', 'variance', 'variancep', 'stdev', 'stdevp', 'stderr', 'distinct', 'ci0',
+ 'ci1', 'median', 'q1', 'q3', 'argmin', 'argmax', 'min', 'max'), :class:`signal`)
+
+ signal : string
+
+ """
+ _schema = {'$ref': '#/defs/pivotTransform'}
+
+ def __init__(self, field=Undefined, type=Undefined, value=Undefined, groupby=Undefined,
+ key=Undefined, limit=Undefined, op=Undefined, signal=Undefined, **kwds):
+ super(pivotTransform, self).__init__(field=field, type=type, value=value, groupby=groupby,
+ key=key, limit=limit, op=op, signal=signal, **kwds)
+
+
+class projectTransform(VegaSchema):
+ """projectTransform schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : enum('project')
+
+ fields : oneOf(List(oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)),
+ :class:`signal`)
+
+ signal : string
+
+ as : oneOf(List(anyOf(string, :class:`signal`, None)), :class:`signal`)
+
+ """
+ _schema = {'$ref': '#/defs/projectTransform'}
+
+ def __init__(self, type=Undefined, fields=Undefined, signal=Undefined, **kwds):
+ super(projectTransform, self).__init__(type=type, fields=fields, signal=signal, **kwds)
+
+
+class quantileTransform(VegaSchema):
+ """quantileTransform schema wrapper
+
+ Mapping(required=[type, field])
+
+ Attributes
+ ----------
+
+ field : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ type : enum('quantile')
+
+ groupby : oneOf(List(oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)),
+ :class:`signal`)
+
+ probs : oneOf(List(anyOf(float, :class:`signal`)), :class:`signal`)
+
+ signal : string
+
+ step : anyOf(float, :class:`signal`)
+
+ as : oneOf(List(anyOf(string, :class:`signal`)), :class:`signal`)
+
+ """
+ _schema = {'$ref': '#/defs/quantileTransform'}
+
+ def __init__(self, field=Undefined, type=Undefined, groupby=Undefined, probs=Undefined,
+ signal=Undefined, step=Undefined, **kwds):
+ super(quantileTransform, self).__init__(field=field, type=type, groupby=groupby, probs=probs,
+ signal=signal, step=step, **kwds)
+
+
+class sampleTransform(VegaSchema):
+ """sampleTransform schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : enum('sample')
+
+ signal : string
+
+ size : anyOf(float, :class:`signal`)
+
+ """
+ _schema = {'$ref': '#/defs/sampleTransform'}
+
+ def __init__(self, type=Undefined, signal=Undefined, size=Undefined, **kwds):
+ super(sampleTransform, self).__init__(type=type, signal=signal, size=size, **kwds)
+
+
+class sequenceTransform(VegaSchema):
+ """sequenceTransform schema wrapper
+
+ Mapping(required=[type, start, stop])
+
+ Attributes
+ ----------
+
+ start : anyOf(float, :class:`signal`)
+
+ stop : anyOf(float, :class:`signal`)
+
+ type : enum('sequence')
+
+ signal : string
+
+ step : anyOf(float, :class:`signal`)
+
+ as : anyOf(string, :class:`signal`)
+
+ """
+ _schema = {'$ref': '#/defs/sequenceTransform'}
+
+ def __init__(self, start=Undefined, stop=Undefined, type=Undefined, signal=Undefined,
+ step=Undefined, **kwds):
+ super(sequenceTransform, self).__init__(start=start, stop=stop, type=type, signal=signal,
+ step=step, **kwds)
+
+
+class timeunitTransform(VegaSchema):
+ """timeunitTransform schema wrapper
+
+ Mapping(required=[type, field])
+
+ Attributes
+ ----------
+
+ field : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ type : enum('timeunit')
+
+ extent : oneOf(List(anyOf(float, :class:`signal`)), :class:`signal`)
+
+ interval : anyOf(boolean, :class:`signal`)
+
+ maxbins : anyOf(float, :class:`signal`)
+
+ signal : string
+
+ step : anyOf(float, :class:`signal`)
+
+ timezone : anyOf(enum('local', 'utc'), :class:`signal`)
+
+ units : oneOf(List(anyOf(string, :class:`signal`)), :class:`signal`)
+
+ as : oneOf(List(anyOf(string, :class:`signal`)), :class:`signal`)
+
+ """
+ _schema = {'$ref': '#/defs/timeunitTransform'}
+
+ def __init__(self, field=Undefined, type=Undefined, extent=Undefined, interval=Undefined,
+ maxbins=Undefined, signal=Undefined, step=Undefined, timezone=Undefined,
+ units=Undefined, **kwds):
+ super(timeunitTransform, self).__init__(field=field, type=type, extent=extent,
+ interval=interval, maxbins=maxbins, signal=signal,
+ step=step, timezone=timezone, units=units, **kwds)
+
+
+class windowTransform(VegaSchema):
+ """windowTransform schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : enum('window')
+
+ fields : oneOf(List(oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`, None)),
+ :class:`signal`)
+
+ frame : oneOf(List(anyOf(float, :class:`signal`, None)), :class:`signal`)
+
+ groupby : oneOf(List(oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)),
+ :class:`signal`)
+
+ ignorePeers : anyOf(boolean, :class:`signal`)
+
+ ops : oneOf(List(anyOf(enum('row_number', 'rank', 'dense_rank', 'percent_rank', 'cume_dist',
+ 'ntile', 'lag', 'lead', 'first_value', 'last_value', 'nth_value', 'prev_value',
+ 'next_value', 'values', 'count', '__count__', 'missing', 'valid', 'sum', 'product', 'mean',
+ 'average', 'variance', 'variancep', 'stdev', 'stdevp', 'stderr', 'distinct', 'ci0', 'ci1',
+ 'median', 'q1', 'q3', 'argmin', 'argmax', 'min', 'max'), :class:`signal`)), :class:`signal`)
+
+ params : oneOf(List(anyOf(float, :class:`signal`, None)), :class:`signal`)
+
+ signal : string
+
+ sort : :class:`compare`
+
+ as : oneOf(List(anyOf(string, :class:`signal`, None)), :class:`signal`)
+
+ """
+ _schema = {'$ref': '#/defs/windowTransform'}
+
+ def __init__(self, type=Undefined, fields=Undefined, frame=Undefined, groupby=Undefined,
+ ignorePeers=Undefined, ops=Undefined, params=Undefined, signal=Undefined,
+ sort=Undefined, **kwds):
+ super(windowTransform, self).__init__(type=type, fields=fields, frame=frame, groupby=groupby,
+ ignorePeers=ignorePeers, ops=ops, params=params,
+ signal=signal, sort=sort, **kwds)
+
+
+class identifierTransform(VegaSchema):
+ """identifierTransform schema wrapper
+
+ Mapping(required=[type, as])
+
+ Attributes
+ ----------
+
+ type : enum('identifier')
+
+ signal : string
+
+ as : anyOf(string, :class:`signal`)
+
+ """
+ _schema = {'$ref': '#/defs/identifierTransform'}
+
+ def __init__(self, type=Undefined, signal=Undefined, **kwds):
+ super(identifierTransform, self).__init__(type=type, signal=signal, **kwds)
+
+
+class voronoiTransform(VegaSchema):
+ """voronoiTransform schema wrapper
+
+ Mapping(required=[type, x, y])
+
+ Attributes
+ ----------
+
+ type : enum('voronoi')
+
+ x : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ y : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ extent : oneOf(List(Any), :class:`signal`)
+
+ signal : string
+
+ size : oneOf(List(anyOf(float, :class:`signal`)), :class:`signal`)
+
+ as : anyOf(string, :class:`signal`)
+
+ """
+ _schema = {'$ref': '#/defs/voronoiTransform'}
+
+ def __init__(self, type=Undefined, x=Undefined, y=Undefined, extent=Undefined, signal=Undefined,
+ size=Undefined, **kwds):
+ super(voronoiTransform, self).__init__(type=type, x=x, y=y, extent=extent, signal=signal,
+ size=size, **kwds)
+
+
+class wordcloudTransform(VegaSchema):
+ """wordcloudTransform schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : enum('wordcloud')
+
+ font : anyOf(string, :class:`signal`, :class:`expr`, :class:`paramField`)
+
+ fontSize : anyOf(float, :class:`signal`, :class:`expr`, :class:`paramField`)
+
+ fontSizeRange : oneOf(List(anyOf(float, :class:`signal`)), :class:`signal`, None)
+
+ fontStyle : anyOf(string, :class:`signal`, :class:`expr`, :class:`paramField`)
+
+ fontWeight : anyOf(string, :class:`signal`, :class:`expr`, :class:`paramField`)
+
+ padding : anyOf(float, :class:`signal`, :class:`expr`, :class:`paramField`)
+
+ rotate : anyOf(float, :class:`signal`, :class:`expr`, :class:`paramField`)
+
+ signal : string
+
+ size : oneOf(List(anyOf(float, :class:`signal`)), :class:`signal`)
+
+ spiral : anyOf(string, :class:`signal`)
+
+ text : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)
+
+ as : oneOf(List(anyOf(string, :class:`signal`)), :class:`signal`)
+
+ """
+ _schema = {'$ref': '#/defs/wordcloudTransform'}
+
+ def __init__(self, type=Undefined, font=Undefined, fontSize=Undefined, fontSizeRange=Undefined,
+ fontStyle=Undefined, fontWeight=Undefined, padding=Undefined, rotate=Undefined,
+ signal=Undefined, size=Undefined, spiral=Undefined, text=Undefined, **kwds):
+ super(wordcloudTransform, self).__init__(type=type, font=font, fontSize=fontSize,
+ fontSizeRange=fontSizeRange, fontStyle=fontStyle,
+ fontWeight=fontWeight, padding=padding, rotate=rotate,
+ signal=signal, size=size, spiral=spiral, text=text,
+ **kwds)
+
+
+class labelOverlap(VegaSchema):
+ """labelOverlap schema wrapper
+
+ oneOf(boolean, enum('parity', 'greedy'), :class:`signal`)
+ """
+ _schema = {'$ref': '#/refs/labelOverlap'}
+
+ def __init__(self, *args, **kwds):
+ super(labelOverlap, self).__init__(*args, **kwds)
+
+
+class tickBand(VegaSchema):
+ """tickBand schema wrapper
+
+ oneOf(enum('center', 'extent'), :class:`signal`)
+ """
+ _schema = {'$ref': '#/refs/tickBand'}
+
+ def __init__(self, *args, **kwds):
+ super(tickBand, self).__init__(*args, **kwds)
+
+
+class tickCount(VegaSchema):
+ """tickCount schema wrapper
+
+ oneOf(float, enum('millisecond', 'second', 'minute', 'hour', 'day', 'week', 'month',
+ 'year'), Mapping(required=[interval]), :class:`signal`)
+ """
+ _schema = {'$ref': '#/refs/tickCount'}
+
+ def __init__(self, *args, **kwds):
+ super(tickCount, self).__init__(*args, **kwds)
+
+
+class element(VegaSchema):
+ """element schema wrapper
+
+ string
+ """
+ _schema = {'$ref': '#/refs/element'}
+
+ def __init__(self, *args):
+ super(element, self).__init__(*args)
+
+
+class paramField(VegaSchema):
+ """paramField schema wrapper
+
+ Mapping(required=[field])
+
+ Attributes
+ ----------
+
+ field : string
+
+ as : string
+
+ """
+ _schema = {'$ref': '#/refs/paramField'}
+
+ def __init__(self, field=Undefined, **kwds):
+ super(paramField, self).__init__(field=field, **kwds)
+
+
+class field(VegaSchema):
+ """field schema wrapper
+
+ oneOf(string, :class:`signal`, Mapping(required=[datum]), Mapping(required=[group]),
+ Mapping(required=[parent]))
+ """
+ _schema = {'$ref': '#/refs/field'}
+
+ def __init__(self, *args, **kwds):
+ super(field, self).__init__(*args, **kwds)
+
+
+class scale(VegaSchema):
+ """scale schema wrapper
+
+ oneOf(string, :class:`signal`, Mapping(required=[datum]), Mapping(required=[group]),
+ Mapping(required=[parent]))
+ """
+ _schema = {'$ref': '#/refs/scale'}
+
+ def __init__(self, *args, **kwds):
+ super(scale, self).__init__(*args, **kwds)
+
+
+class stringModifiers(VegaSchema):
+ """stringModifiers schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ scale : :class:`scale`
+
+ """
+ _schema = {'$ref': '#/refs/stringModifiers'}
+
+ def __init__(self, scale=Undefined, **kwds):
+ super(stringModifiers, self).__init__(scale=scale, **kwds)
+
+
+class numberModifiers(VegaSchema):
+ """numberModifiers schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ band : oneOf(float, boolean)
+
+ exponent : oneOf(float, :class:`numberValue`)
+
+ extra : boolean
+
+ mult : oneOf(float, :class:`numberValue`)
+
+ offset : oneOf(float, :class:`numberValue`)
+
+ round : boolean
+
+ scale : :class:`scale`
+
+ """
+ _schema = {'$ref': '#/refs/numberModifiers'}
+
+ def __init__(self, band=Undefined, exponent=Undefined, extra=Undefined, mult=Undefined,
+ offset=Undefined, round=Undefined, scale=Undefined, **kwds):
+ super(numberModifiers, self).__init__(band=band, exponent=exponent, extra=extra, mult=mult,
+ offset=offset, round=round, scale=scale, **kwds)
+
+
+class anyValue(VegaSchema):
+ """anyValue schema wrapper
+
+ oneOf(List(allOf(:class:`rule`, allOf(:class:`stringModifiers`, anyOf(oneOf(:class:`signal`,
+ Mapping(required=[value]), Mapping(required=[field]), Mapping(required=[range])),
+ Mapping(required=[scale, value]), Mapping(required=[scale, band]),
+ Mapping(required=[offset]))))), allOf(:class:`stringModifiers`, anyOf(oneOf(:class:`signal`,
+ Mapping(required=[value]), Mapping(required=[field]), Mapping(required=[range])),
+ Mapping(required=[scale, value]), Mapping(required=[scale, band]),
+ Mapping(required=[offset]))))
+ """
+ _schema = {'$ref': '#/refs/anyValue'}
+
+ def __init__(self, *args, **kwds):
+ super(anyValue, self).__init__(*args, **kwds)
+
+
+class blendValue(VegaSchema):
+ """blendValue schema wrapper
+
+ oneOf(List(allOf(:class:`rule`, allOf(:class:`stringModifiers`, anyOf(oneOf(:class:`signal`,
+ Mapping(required=[value]), Mapping(required=[field]), Mapping(required=[range])),
+ Mapping(required=[scale, value]), Mapping(required=[scale, band]),
+ Mapping(required=[offset]))))), allOf(:class:`stringModifiers`, anyOf(oneOf(:class:`signal`,
+ Mapping(required=[value]), Mapping(required=[field]), Mapping(required=[range])),
+ Mapping(required=[scale, value]), Mapping(required=[scale, band]),
+ Mapping(required=[offset]))))
+ """
+ _schema = {'$ref': '#/refs/blendValue'}
+
+ def __init__(self, *args, **kwds):
+ super(blendValue, self).__init__(*args, **kwds)
+
+
+class numberValue(VegaSchema):
+ """numberValue schema wrapper
+
+ oneOf(List(allOf(:class:`rule`, allOf(:class:`numberModifiers`, anyOf(oneOf(:class:`signal`,
+ Mapping(required=[value]), Mapping(required=[field]), Mapping(required=[range])),
+ Mapping(required=[scale, value]), Mapping(required=[scale, band]),
+ Mapping(required=[offset]))))), allOf(:class:`numberModifiers`, anyOf(oneOf(:class:`signal`,
+ Mapping(required=[value]), Mapping(required=[field]), Mapping(required=[range])),
+ Mapping(required=[scale, value]), Mapping(required=[scale, band]),
+ Mapping(required=[offset]))))
+ """
+ _schema = {'$ref': '#/refs/numberValue'}
+
+ def __init__(self, *args, **kwds):
+ super(numberValue, self).__init__(*args, **kwds)
+
+
+class stringValue(VegaSchema):
+ """stringValue schema wrapper
+
+ oneOf(List(allOf(:class:`rule`, allOf(:class:`stringModifiers`, anyOf(oneOf(:class:`signal`,
+ Mapping(required=[value]), Mapping(required=[field]), Mapping(required=[range])),
+ Mapping(required=[scale, value]), Mapping(required=[scale, band]),
+ Mapping(required=[offset]))))), allOf(:class:`stringModifiers`, anyOf(oneOf(:class:`signal`,
+ Mapping(required=[value]), Mapping(required=[field]), Mapping(required=[range])),
+ Mapping(required=[scale, value]), Mapping(required=[scale, band]),
+ Mapping(required=[offset]))))
+ """
+ _schema = {'$ref': '#/refs/stringValue'}
+
+ def __init__(self, *args, **kwds):
+ super(stringValue, self).__init__(*args, **kwds)
+
+
+class textValue(VegaSchema):
+ """textValue schema wrapper
+
+ oneOf(List(allOf(:class:`rule`, allOf(:class:`stringModifiers`, anyOf(oneOf(:class:`signal`,
+ Mapping(required=[value]), Mapping(required=[field]), Mapping(required=[range])),
+ Mapping(required=[scale, value]), Mapping(required=[scale, band]),
+ Mapping(required=[offset]))))), allOf(:class:`stringModifiers`, anyOf(oneOf(:class:`signal`,
+ Mapping(required=[value]), Mapping(required=[field]), Mapping(required=[range])),
+ Mapping(required=[scale, value]), Mapping(required=[scale, band]),
+ Mapping(required=[offset]))))
+ """
+ _schema = {'$ref': '#/refs/textValue'}
+
+ def __init__(self, *args, **kwds):
+ super(textValue, self).__init__(*args, **kwds)
+
+
+class booleanValue(VegaSchema):
+ """booleanValue schema wrapper
+
+ oneOf(List(allOf(:class:`rule`, allOf(:class:`stringModifiers`, anyOf(oneOf(:class:`signal`,
+ Mapping(required=[value]), Mapping(required=[field]), Mapping(required=[range])),
+ Mapping(required=[scale, value]), Mapping(required=[scale, band]),
+ Mapping(required=[offset]))))), allOf(:class:`stringModifiers`, anyOf(oneOf(:class:`signal`,
+ Mapping(required=[value]), Mapping(required=[field]), Mapping(required=[range])),
+ Mapping(required=[scale, value]), Mapping(required=[scale, band]),
+ Mapping(required=[offset]))))
+ """
+ _schema = {'$ref': '#/refs/booleanValue'}
+
+ def __init__(self, *args, **kwds):
+ super(booleanValue, self).__init__(*args, **kwds)
+
+
+class arrayValue(VegaSchema):
+ """arrayValue schema wrapper
+
+ oneOf(List(allOf(:class:`rule`, allOf(:class:`stringModifiers`, anyOf(oneOf(:class:`signal`,
+ Mapping(required=[value]), Mapping(required=[field]), Mapping(required=[range])),
+ Mapping(required=[scale, value]), Mapping(required=[scale, band]),
+ Mapping(required=[offset]))))), allOf(:class:`stringModifiers`, anyOf(oneOf(:class:`signal`,
+ Mapping(required=[value]), Mapping(required=[field]), Mapping(required=[range])),
+ Mapping(required=[scale, value]), Mapping(required=[scale, band]),
+ Mapping(required=[offset]))))
+ """
+ _schema = {'$ref': '#/refs/arrayValue'}
+
+ def __init__(self, *args, **kwds):
+ super(arrayValue, self).__init__(*args, **kwds)
+
+
+class fontWeightValue(VegaSchema):
+ """fontWeightValue schema wrapper
+
+ oneOf(List(allOf(:class:`rule`, allOf(:class:`stringModifiers`, anyOf(oneOf(:class:`signal`,
+ Mapping(required=[value]), Mapping(required=[field]), Mapping(required=[range])),
+ Mapping(required=[scale, value]), Mapping(required=[scale, band]),
+ Mapping(required=[offset]))))), allOf(:class:`stringModifiers`, anyOf(oneOf(:class:`signal`,
+ Mapping(required=[value]), Mapping(required=[field]), Mapping(required=[range])),
+ Mapping(required=[scale, value]), Mapping(required=[scale, band]),
+ Mapping(required=[offset]))))
+ """
+ _schema = {'$ref': '#/refs/fontWeightValue'}
+
+ def __init__(self, *args, **kwds):
+ super(fontWeightValue, self).__init__(*args, **kwds)
+
+
+class anchorValue(VegaSchema):
+ """anchorValue schema wrapper
+
+ oneOf(List(allOf(:class:`rule`, allOf(:class:`stringModifiers`, anyOf(oneOf(:class:`signal`,
+ Mapping(required=[value]), Mapping(required=[field]), Mapping(required=[range])),
+ Mapping(required=[scale, value]), Mapping(required=[scale, band]),
+ Mapping(required=[offset]))))), allOf(:class:`stringModifiers`, anyOf(oneOf(:class:`signal`,
+ Mapping(required=[value]), Mapping(required=[field]), Mapping(required=[range])),
+ Mapping(required=[scale, value]), Mapping(required=[scale, band]),
+ Mapping(required=[offset]))))
+ """
+ _schema = {'$ref': '#/refs/anchorValue'}
+
+ def __init__(self, *args, **kwds):
+ super(anchorValue, self).__init__(*args, **kwds)
+
+
+class alignValue(VegaSchema):
+ """alignValue schema wrapper
+
+ oneOf(List(allOf(:class:`rule`, allOf(:class:`stringModifiers`, anyOf(oneOf(:class:`signal`,
+ Mapping(required=[value]), Mapping(required=[field]), Mapping(required=[range])),
+ Mapping(required=[scale, value]), Mapping(required=[scale, band]),
+ Mapping(required=[offset]))))), allOf(:class:`stringModifiers`, anyOf(oneOf(:class:`signal`,
+ Mapping(required=[value]), Mapping(required=[field]), Mapping(required=[range])),
+ Mapping(required=[scale, value]), Mapping(required=[scale, band]),
+ Mapping(required=[offset]))))
+ """
+ _schema = {'$ref': '#/refs/alignValue'}
+
+ def __init__(self, *args, **kwds):
+ super(alignValue, self).__init__(*args, **kwds)
+
+
+class baselineValue(VegaSchema):
+ """baselineValue schema wrapper
+
+ oneOf(List(allOf(:class:`rule`, allOf(:class:`stringModifiers`, anyOf(oneOf(:class:`signal`,
+ Mapping(required=[value]), Mapping(required=[field]), Mapping(required=[range])),
+ Mapping(required=[scale, value]), Mapping(required=[scale, band]),
+ Mapping(required=[offset]))))), allOf(:class:`stringModifiers`, anyOf(oneOf(:class:`signal`,
+ Mapping(required=[value]), Mapping(required=[field]), Mapping(required=[range])),
+ Mapping(required=[scale, value]), Mapping(required=[scale, band]),
+ Mapping(required=[offset]))))
+ """
+ _schema = {'$ref': '#/refs/baselineValue'}
+
+ def __init__(self, *args, **kwds):
+ super(baselineValue, self).__init__(*args, **kwds)
+
+
+class directionValue(VegaSchema):
+ """directionValue schema wrapper
+
+ oneOf(List(allOf(:class:`rule`, allOf(:class:`stringModifiers`, anyOf(oneOf(:class:`signal`,
+ Mapping(required=[value]), Mapping(required=[field]), Mapping(required=[range])),
+ Mapping(required=[scale, value]), Mapping(required=[scale, band]),
+ Mapping(required=[offset]))))), allOf(:class:`stringModifiers`, anyOf(oneOf(:class:`signal`,
+ Mapping(required=[value]), Mapping(required=[field]), Mapping(required=[range])),
+ Mapping(required=[scale, value]), Mapping(required=[scale, band]),
+ Mapping(required=[offset]))))
+ """
+ _schema = {'$ref': '#/refs/directionValue'}
+
+ def __init__(self, *args, **kwds):
+ super(directionValue, self).__init__(*args, **kwds)
+
+
+class orientValue(VegaSchema):
+ """orientValue schema wrapper
+
+ oneOf(List(allOf(:class:`rule`, allOf(:class:`stringModifiers`, anyOf(oneOf(:class:`signal`,
+ Mapping(required=[value]), Mapping(required=[field]), Mapping(required=[range])),
+ Mapping(required=[scale, value]), Mapping(required=[scale, band]),
+ Mapping(required=[offset]))))), allOf(:class:`stringModifiers`, anyOf(oneOf(:class:`signal`,
+ Mapping(required=[value]), Mapping(required=[field]), Mapping(required=[range])),
+ Mapping(required=[scale, value]), Mapping(required=[scale, band]),
+ Mapping(required=[offset]))))
+ """
+ _schema = {'$ref': '#/refs/orientValue'}
+
+ def __init__(self, *args, **kwds):
+ super(orientValue, self).__init__(*args, **kwds)
+
+
+class strokeCapValue(VegaSchema):
+ """strokeCapValue schema wrapper
+
+ oneOf(List(allOf(:class:`rule`, allOf(:class:`stringModifiers`, anyOf(oneOf(:class:`signal`,
+ Mapping(required=[value]), Mapping(required=[field]), Mapping(required=[range])),
+ Mapping(required=[scale, value]), Mapping(required=[scale, band]),
+ Mapping(required=[offset]))))), allOf(:class:`stringModifiers`, anyOf(oneOf(:class:`signal`,
+ Mapping(required=[value]), Mapping(required=[field]), Mapping(required=[range])),
+ Mapping(required=[scale, value]), Mapping(required=[scale, band]),
+ Mapping(required=[offset]))))
+ """
+ _schema = {'$ref': '#/refs/strokeCapValue'}
+
+ def __init__(self, *args, **kwds):
+ super(strokeCapValue, self).__init__(*args, **kwds)
+
+
+class strokeJoinValue(VegaSchema):
+ """strokeJoinValue schema wrapper
+
+ oneOf(List(allOf(:class:`rule`, allOf(:class:`stringModifiers`, anyOf(oneOf(:class:`signal`,
+ Mapping(required=[value]), Mapping(required=[field]), Mapping(required=[range])),
+ Mapping(required=[scale, value]), Mapping(required=[scale, band]),
+ Mapping(required=[offset]))))), allOf(:class:`stringModifiers`, anyOf(oneOf(:class:`signal`,
+ Mapping(required=[value]), Mapping(required=[field]), Mapping(required=[range])),
+ Mapping(required=[scale, value]), Mapping(required=[scale, band]),
+ Mapping(required=[offset]))))
+ """
+ _schema = {'$ref': '#/refs/strokeJoinValue'}
+
+ def __init__(self, *args, **kwds):
+ super(strokeJoinValue, self).__init__(*args, **kwds)
+
+
+class baseColorValue(VegaSchema):
+ """baseColorValue schema wrapper
+
+ oneOf(allOf(:class:`stringModifiers`, anyOf(oneOf(:class:`signal`,
+ Mapping(required=[value]), Mapping(required=[field]), Mapping(required=[range])),
+ Mapping(required=[scale, value]), Mapping(required=[scale, band]),
+ Mapping(required=[offset]))), Mapping(required=[value]), Mapping(required=[value]),
+ Mapping(required=[gradient]), Mapping(required=[color]))
+ """
+ _schema = {'$ref': '#/refs/baseColorValue'}
+
+ def __init__(self, *args, **kwds):
+ super(baseColorValue, self).__init__(*args, **kwds)
+
+
+class colorRGB(VegaSchema):
+ """colorRGB schema wrapper
+
+ Mapping(required=[r, g, b])
+
+ Attributes
+ ----------
+
+ b : :class:`numberValue`
+
+ g : :class:`numberValue`
+
+ r : :class:`numberValue`
+
+ """
+ _schema = {'$ref': '#/refs/colorRGB'}
+
+ def __init__(self, b=Undefined, g=Undefined, r=Undefined, **kwds):
+ super(colorRGB, self).__init__(b=b, g=g, r=r, **kwds)
+
+
+class colorHSL(VegaSchema):
+ """colorHSL schema wrapper
+
+ Mapping(required=[h, s, l])
+
+ Attributes
+ ----------
+
+ h : :class:`numberValue`
+
+ l : :class:`numberValue`
+
+ s : :class:`numberValue`
+
+ """
+ _schema = {'$ref': '#/refs/colorHSL'}
+
+ def __init__(self, h=Undefined, l=Undefined, s=Undefined, **kwds):
+ super(colorHSL, self).__init__(h=h, l=l, s=s, **kwds)
+
+
+class colorLAB(VegaSchema):
+ """colorLAB schema wrapper
+
+ Mapping(required=[l, a, b])
+
+ Attributes
+ ----------
+
+ a : :class:`numberValue`
+
+ b : :class:`numberValue`
+
+ l : :class:`numberValue`
+
+ """
+ _schema = {'$ref': '#/refs/colorLAB'}
+
+ def __init__(self, a=Undefined, b=Undefined, l=Undefined, **kwds):
+ super(colorLAB, self).__init__(a=a, b=b, l=l, **kwds)
+
+
+class colorHCL(VegaSchema):
+ """colorHCL schema wrapper
+
+ Mapping(required=[h, c, l])
+
+ Attributes
+ ----------
+
+ c : :class:`numberValue`
+
+ h : :class:`numberValue`
+
+ l : :class:`numberValue`
+
+ """
+ _schema = {'$ref': '#/refs/colorHCL'}
+
+ def __init__(self, c=Undefined, h=Undefined, l=Undefined, **kwds):
+ super(colorHCL, self).__init__(c=c, h=h, l=l, **kwds)
+
+
+class colorValue(VegaSchema):
+ """colorValue schema wrapper
+
+ oneOf(List(allOf(:class:`rule`, :class:`baseColorValue`)), :class:`baseColorValue`)
+ """
+ _schema = {'$ref': '#/refs/colorValue'}
+
+ def __init__(self, *args, **kwds):
+ super(colorValue, self).__init__(*args, **kwds)
+
+
+class gradientStops(VegaSchema):
+ """gradientStops schema wrapper
+
+ List(Mapping(required=[offset, color]))
+ """
+ _schema = {'$ref': '#/refs/gradientStops'}
+
+ def __init__(self, *args):
+ super(gradientStops, self).__init__(*args)
+
+
+class linearGradient(VegaSchema):
+ """linearGradient schema wrapper
+
+ Mapping(required=[gradient, stops])
+
+ Attributes
+ ----------
+
+ gradient : enum('linear')
+
+ stops : :class:`gradientStops`
+
+ id : string
+
+ x1 : float
+
+ x2 : float
+
+ y1 : float
+
+ y2 : float
+
+ """
+ _schema = {'$ref': '#/refs/linearGradient'}
+
+ def __init__(self, gradient=Undefined, stops=Undefined, id=Undefined, x1=Undefined, x2=Undefined,
+ y1=Undefined, y2=Undefined, **kwds):
+ super(linearGradient, self).__init__(gradient=gradient, stops=stops, id=id, x1=x1, x2=x2, y1=y1,
+ y2=y2, **kwds)
+
+
+class radialGradient(VegaSchema):
+ """radialGradient schema wrapper
+
+ Mapping(required=[gradient, stops])
+
+ Attributes
+ ----------
+
+ gradient : enum('radial')
+
+ stops : :class:`gradientStops`
+
+ id : string
+
+ r1 : float
+
+ r2 : float
+
+ x1 : float
+
+ x2 : float
+
+ y1 : float
+
+ y2 : float
+
+ """
+ _schema = {'$ref': '#/refs/radialGradient'}
+
+ def __init__(self, gradient=Undefined, stops=Undefined, id=Undefined, r1=Undefined, r2=Undefined,
+ x1=Undefined, x2=Undefined, y1=Undefined, y2=Undefined, **kwds):
+ super(radialGradient, self).__init__(gradient=gradient, stops=stops, id=id, r1=r1, r2=r2, x1=x1,
+ x2=x2, y1=y1, y2=y2, **kwds)
+
+
+class expr(VegaSchema):
+ """expr schema wrapper
+
+ Mapping(required=[expr])
+
+ Attributes
+ ----------
+
+ expr : string
+
+ as : string
+
+ """
+ _schema = {'$ref': '#/refs/expr'}
+
+ def __init__(self, expr=Undefined, **kwds):
+ super(expr, self).__init__(expr=expr, **kwds)
+
+
+class exprString(VegaSchema):
+ """exprString schema wrapper
+
+ string
+ """
+ _schema = {'$ref': '#/refs/exprString'}
+
+ def __init__(self, *args):
+ super(exprString, self).__init__(*args)
+
+
+class compare(VegaSchema):
+ """compare schema wrapper
+
+ oneOf(Mapping(required=[]), Mapping(required=[]))
+ """
+ _schema = {'$ref': '#/refs/compare'}
+
+ def __init__(self, *args, **kwds):
+ super(compare, self).__init__(*args, **kwds)
+
+
+class from_(VegaSchema):
+ """from_ schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ data : string
+
+ """
+ _schema = {'$ref': '#/refs/from'}
+
+ def __init__(self, data=Undefined, **kwds):
+ super(from_, self).__init__(data=data, **kwds)
+
+
+class facet(VegaSchema):
+ """facet schema wrapper
+
+ Mapping(required=[facet])
+
+ Attributes
+ ----------
+
+ facet : oneOf(Mapping(required=[name, data, field]), Mapping(required=[name, data,
+ groupby]))
+
+ data : string
+
+ """
+ _schema = {'$ref': '#/refs/facet'}
+
+ def __init__(self, facet=Undefined, data=Undefined, **kwds):
+ super(facet, self).__init__(facet=facet, data=data, **kwds)
+
+
+class markclip(VegaSchema):
+ """markclip schema wrapper
+
+ oneOf(:class:`booleanOrSignal`, Mapping(required=[path]), Mapping(required=[sphere]))
+ """
+ _schema = {'$ref': '#/refs/markclip'}
+
+ def __init__(self, *args, **kwds):
+ super(markclip, self).__init__(*args, **kwds)
+
+
+class style(VegaSchema):
+ """style schema wrapper
+
+ oneOf(string, List(string))
+ """
+ _schema = {'$ref': '#/refs/style'}
+
+ def __init__(self, *args, **kwds):
+ super(style, self).__init__(*args, **kwds)
+
+
+class marktype(VegaSchema):
+ """marktype schema wrapper
+
+ string
+ """
+ _schema = {'$ref': '#/refs/marktype'}
+
+ def __init__(self, *args):
+ super(marktype, self).__init__(*args)
+
+
+class scaleField(VegaSchema):
+ """scaleField schema wrapper
+
+ oneOf(string, :class:`signal`)
+ """
+ _schema = {'$ref': '#/refs/scaleField'}
+
+ def __init__(self, *args, **kwds):
+ super(scaleField, self).__init__(*args, **kwds)
+
+
+class sortOrder(VegaSchema):
+ """sortOrder schema wrapper
+
+ oneOf(enum('ascending', 'descending'), :class:`signal`)
+ """
+ _schema = {'$ref': '#/refs/sortOrder'}
+
+ def __init__(self, *args, **kwds):
+ super(sortOrder, self).__init__(*args, **kwds)
+
+
+class scaleBins(VegaSchema):
+ """scaleBins schema wrapper
+
+ oneOf(List(:class:`numberOrSignal`), Mapping(required=[step]), :class:`signal`)
+ """
+ _schema = {'$ref': '#/refs/scaleBins'}
+
+ def __init__(self, *args, **kwds):
+ super(scaleBins, self).__init__(*args, **kwds)
+
+
+class scaleInterpolate(VegaSchema):
+ """scaleInterpolate schema wrapper
+
+ oneOf(string, :class:`signal`, Mapping(required=[type]))
+ """
+ _schema = {'$ref': '#/refs/scaleInterpolate'}
+
+ def __init__(self, *args, **kwds):
+ super(scaleInterpolate, self).__init__(*args, **kwds)
+
+
+class scaleData(VegaSchema):
+ """scaleData schema wrapper
+
+ oneOf(Mapping(required=[data, field]), Mapping(required=[data, fields]),
+ Mapping(required=[fields]))
+ """
+ _schema = {'$ref': '#/refs/scaleData'}
+
+ def __init__(self, *args, **kwds):
+ super(scaleData, self).__init__(*args, **kwds)
+
+
+class selector(VegaSchema):
+ """selector schema wrapper
+
+ string
+ """
+ _schema = {'$ref': '#/refs/selector'}
+
+ def __init__(self, *args):
+ super(selector, self).__init__(*args)
+
+
+class signal(VegaSchema):
+ """signal schema wrapper
+
+ Mapping(required=[signal])
+
+ Attributes
+ ----------
+
+ signal : string
+
+ """
+ _schema = {'$ref': '#/refs/signal'}
+
+ def __init__(self, signal=Undefined, **kwds):
+ super(signal, self).__init__(signal=signal, **kwds)
+
+
+class arrayOrSignal(VegaSchema):
+ """arrayOrSignal schema wrapper
+
+ oneOf(List(Any), :class:`signal`)
+ """
+ _schema = {'$ref': '#/refs/arrayOrSignal'}
+
+ def __init__(self, *args, **kwds):
+ super(arrayOrSignal, self).__init__(*args, **kwds)
+
+
+class booleanOrSignal(VegaSchema):
+ """booleanOrSignal schema wrapper
+
+ oneOf(boolean, :class:`signal`)
+ """
+ _schema = {'$ref': '#/refs/booleanOrSignal'}
+
+ def __init__(self, *args, **kwds):
+ super(booleanOrSignal, self).__init__(*args, **kwds)
+
+
+class numberOrSignal(VegaSchema):
+ """numberOrSignal schema wrapper
+
+ oneOf(float, :class:`signal`)
+ """
+ _schema = {'$ref': '#/refs/numberOrSignal'}
+
+ def __init__(self, *args, **kwds):
+ super(numberOrSignal, self).__init__(*args, **kwds)
+
+
+class stringOrSignal(VegaSchema):
+ """stringOrSignal schema wrapper
+
+ oneOf(string, :class:`signal`)
+ """
+ _schema = {'$ref': '#/refs/stringOrSignal'}
+
+ def __init__(self, *args, **kwds):
+ super(stringOrSignal, self).__init__(*args, **kwds)
+
+
+class textOrSignal(VegaSchema):
+ """textOrSignal schema wrapper
+
+ oneOf(oneOf(string, List(string)), :class:`signal`)
+ """
+ _schema = {'$ref': '#/refs/textOrSignal'}
+
+ def __init__(self, *args, **kwds):
+ super(textOrSignal, self).__init__(*args, **kwds)
+
diff --git a/venv/lib/python3.9/site-packages/altair/vega/v5/schema/vega-schema.json b/venv/lib/python3.9/site-packages/altair/vega/v5/schema/vega-schema.json
new file mode 100644
index 00000000..f428db3c
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vega/v5/schema/vega-schema.json
@@ -0,0 +1,15964 @@
+{
+ "$schema": "http://json-schema.org/draft-06/schema#",
+ "title": "Vega Visualization Specification Language",
+ "defs": {
+ "autosize": {
+ "oneOf": [
+ {
+ "enum": [
+ "pad",
+ "fit",
+ "fit-x",
+ "fit-y",
+ "none"
+ ],
+ "default": "pad"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "pad",
+ "fit",
+ "fit-x",
+ "fit-y",
+ "none"
+ ],
+ "default": "pad"
+ },
+ "resize": {
+ "type": "boolean"
+ },
+ "contains": {
+ "enum": [
+ "content",
+ "padding"
+ ]
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "axis": {
+ "type": "object",
+ "properties": {
+ "orient": {
+ "enum": [
+ "top",
+ "bottom",
+ "left",
+ "right"
+ ]
+ },
+ "scale": {
+ "type": "string"
+ },
+ "format": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "year": {
+ "type": "string"
+ },
+ "quarter": {
+ "type": "string"
+ },
+ "month": {
+ "type": "string"
+ },
+ "date": {
+ "type": "string"
+ },
+ "week": {
+ "type": "string"
+ },
+ "day": {
+ "type": "string"
+ },
+ "hours": {
+ "type": "string"
+ },
+ "minutes": {
+ "type": "string"
+ },
+ "seconds": {
+ "type": "string"
+ },
+ "milliseconds": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "formatType": {
+ "oneOf": [
+ {
+ "enum": [
+ "number",
+ "time",
+ "utc"
+ ]
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "minExtent": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "maxExtent": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "offset": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "position": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "bandPosition": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "translate": {
+ "type": "number"
+ },
+ "values": {
+ "$ref": "#/refs/arrayOrSignal"
+ },
+ "zindex": {
+ "type": "number"
+ },
+ "title": {
+ "$ref": "#/refs/textOrSignal"
+ },
+ "titlePadding": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "titleAlign": {
+ "oneOf": [
+ {
+ "enum": [
+ "left",
+ "right",
+ "center"
+ ]
+ },
+ {
+ "$ref": "#/refs/alignValue"
+ }
+ ]
+ },
+ "titleAnchor": {
+ "oneOf": [
+ {
+ "enum": [
+ null,
+ "start",
+ "middle",
+ "end"
+ ]
+ },
+ {
+ "$ref": "#/refs/anchorValue"
+ }
+ ]
+ },
+ "titleAngle": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "titleX": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "titleY": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "titleBaseline": {
+ "oneOf": [
+ {
+ "enum": [
+ "top",
+ "middle",
+ "bottom",
+ "alphabetic",
+ "line-top",
+ "line-bottom"
+ ]
+ },
+ {
+ "$ref": "#/refs/baselineValue"
+ }
+ ]
+ },
+ "titleColor": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/colorValue"
+ }
+ ]
+ },
+ "titleFont": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/stringValue"
+ }
+ ]
+ },
+ "titleFontSize": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "titleFontStyle": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/stringValue"
+ }
+ ]
+ },
+ "titleFontWeight": {
+ "oneOf": [
+ {
+ "enum": [
+ null,
+ "normal",
+ "bold",
+ "lighter",
+ "bolder",
+ "100",
+ "200",
+ "300",
+ "400",
+ "500",
+ "600",
+ "700",
+ "800",
+ "900",
+ 100,
+ 200,
+ 300,
+ 400,
+ 500,
+ 600,
+ 700,
+ 800,
+ 900
+ ]
+ },
+ {
+ "$ref": "#/refs/fontWeightValue"
+ }
+ ]
+ },
+ "titleLimit": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "titleLineHeight": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "titleOpacity": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "domain": {
+ "type": "boolean"
+ },
+ "domainColor": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/colorValue"
+ }
+ ]
+ },
+ "domainDash": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "number"
+ }
+ },
+ {
+ "$ref": "#/refs/arrayValue"
+ }
+ ]
+ },
+ "domainDashOffset": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "domainOpacity": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "domainWidth": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "ticks": {
+ "type": "boolean"
+ },
+ "tickBand": {
+ "$ref": "#/refs/tickBand"
+ },
+ "tickColor": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/colorValue"
+ }
+ ]
+ },
+ "tickDash": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "number"
+ }
+ },
+ {
+ "$ref": "#/refs/arrayValue"
+ }
+ ]
+ },
+ "tickDashOffset": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "tickOffset": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "tickOpacity": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "tickRound": {
+ "oneOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/refs/booleanValue"
+ }
+ ]
+ },
+ "tickSize": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "tickWidth": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "tickCount": {
+ "$ref": "#/refs/tickCount"
+ },
+ "tickExtra": {
+ "$ref": "#/refs/booleanOrSignal"
+ },
+ "tickMinStep": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "grid": {
+ "type": "boolean"
+ },
+ "gridScale": {
+ "type": "string"
+ },
+ "gridColor": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/colorValue"
+ }
+ ]
+ },
+ "gridDash": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "number"
+ }
+ },
+ {
+ "$ref": "#/refs/arrayValue"
+ }
+ ]
+ },
+ "gridDashOffset": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "gridOpacity": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "gridWidth": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "labels": {
+ "type": "boolean"
+ },
+ "labelAlign": {
+ "oneOf": [
+ {
+ "enum": [
+ "left",
+ "right",
+ "center"
+ ]
+ },
+ {
+ "$ref": "#/refs/alignValue"
+ }
+ ]
+ },
+ "labelBaseline": {
+ "oneOf": [
+ {
+ "enum": [
+ "top",
+ "middle",
+ "bottom",
+ "alphabetic",
+ "line-top",
+ "line-bottom"
+ ]
+ },
+ {
+ "$ref": "#/refs/baselineValue"
+ }
+ ]
+ },
+ "labelBound": {
+ "oneOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "labelFlush": {
+ "oneOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "labelFlushOffset": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "labelOverlap": {
+ "$ref": "#/refs/labelOverlap"
+ },
+ "labelAngle": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "labelColor": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/colorValue"
+ }
+ ]
+ },
+ "labelFont": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/stringValue"
+ }
+ ]
+ },
+ "labelFontSize": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "labelFontWeight": {
+ "oneOf": [
+ {
+ "enum": [
+ null,
+ "normal",
+ "bold",
+ "lighter",
+ "bolder",
+ "100",
+ "200",
+ "300",
+ "400",
+ "500",
+ "600",
+ "700",
+ "800",
+ "900",
+ 100,
+ 200,
+ 300,
+ 400,
+ 500,
+ 600,
+ 700,
+ 800,
+ 900
+ ]
+ },
+ {
+ "$ref": "#/refs/fontWeightValue"
+ }
+ ]
+ },
+ "labelFontStyle": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/stringValue"
+ }
+ ]
+ },
+ "labelLimit": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "labelLineHeight": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "labelOpacity": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "labelOffset": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "labelPadding": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "labelSeparation": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "encode": {
+ "type": "object",
+ "properties": {
+ "axis": {
+ "$ref": "#/defs/guideEncode"
+ },
+ "ticks": {
+ "$ref": "#/defs/guideEncode"
+ },
+ "labels": {
+ "$ref": "#/defs/guideEncode"
+ },
+ "title": {
+ "$ref": "#/defs/guideEncode"
+ },
+ "grid": {
+ "$ref": "#/defs/guideEncode"
+ },
+ "domain": {
+ "$ref": "#/defs/guideEncode"
+ }
+ },
+ "additionalProperties": false
+ }
+ },
+ "required": [
+ "orient",
+ "scale"
+ ],
+ "additionalProperties": false
+ },
+ "background": {
+ "$ref": "#/refs/stringOrSignal"
+ },
+ "bind": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "input": {
+ "enum": [
+ "checkbox"
+ ]
+ },
+ "element": {
+ "$ref": "#/refs/element"
+ },
+ "debounce": {
+ "type": "number"
+ },
+ "name": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "input"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "input": {
+ "enum": [
+ "radio",
+ "select"
+ ]
+ },
+ "element": {
+ "$ref": "#/refs/element"
+ },
+ "options": {
+ "type": "array"
+ },
+ "labels": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "debounce": {
+ "type": "number"
+ },
+ "name": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "input",
+ "options"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "input": {
+ "enum": [
+ "range"
+ ]
+ },
+ "element": {
+ "$ref": "#/refs/element"
+ },
+ "min": {
+ "type": "number"
+ },
+ "max": {
+ "type": "number"
+ },
+ "step": {
+ "type": "number"
+ },
+ "debounce": {
+ "type": "number"
+ },
+ "name": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "input"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "input": {
+ "not": {
+ "enum": [
+ "checkbox",
+ "radio",
+ "range",
+ "select"
+ ]
+ }
+ },
+ "element": {
+ "$ref": "#/refs/element"
+ },
+ "debounce": {
+ "type": "number"
+ },
+ "name": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "input"
+ ],
+ "additionalProperties": true
+ }
+ ]
+ },
+ "data": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "transform": {
+ "type": "array",
+ "items": {
+ "$ref": "#/defs/transform"
+ }
+ },
+ "on": {
+ "$ref": "#/defs/onTrigger"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "source": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "minItems": 1
+ }
+ ]
+ },
+ "name": {
+ "type": "string"
+ },
+ "transform": {
+ "type": "array",
+ "items": {
+ "$ref": "#/defs/transform"
+ }
+ },
+ "on": {
+ "$ref": "#/defs/onTrigger"
+ }
+ },
+ "required": [
+ "source",
+ "name"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "url": {
+ "$ref": "#/refs/stringOrSignal"
+ },
+ "format": {
+ "oneOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "$ref": "#/refs/stringOrSignal"
+ },
+ "parse": {
+ "oneOf": [
+ {
+ "enum": [
+ "auto"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": {
+ "oneOf": [
+ {
+ "enum": [
+ "boolean",
+ "number",
+ "date",
+ "string"
+ ]
+ },
+ {
+ "type": "string",
+ "pattern": "^(date|utc):.*$"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "json"
+ ]
+ },
+ "parse": {
+ "oneOf": [
+ {
+ "enum": [
+ "auto"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": {
+ "oneOf": [
+ {
+ "enum": [
+ "boolean",
+ "number",
+ "date",
+ "string"
+ ]
+ },
+ {
+ "type": "string",
+ "pattern": "^(date|utc):.*$"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "property": {
+ "$ref": "#/refs/stringOrSignal"
+ },
+ "copy": {
+ "$ref": "#/refs/booleanOrSignal"
+ }
+ },
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "csv",
+ "tsv"
+ ]
+ },
+ "header": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "parse": {
+ "oneOf": [
+ {
+ "enum": [
+ "auto"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": {
+ "oneOf": [
+ {
+ "enum": [
+ "boolean",
+ "number",
+ "date",
+ "string"
+ ]
+ },
+ {
+ "type": "string",
+ "pattern": "^(date|utc):.*$"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "dsv"
+ ]
+ },
+ "delimiter": {
+ "type": "string"
+ },
+ "header": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "parse": {
+ "oneOf": [
+ {
+ "enum": [
+ "auto"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": {
+ "oneOf": [
+ {
+ "enum": [
+ "boolean",
+ "number",
+ "date",
+ "string"
+ ]
+ },
+ {
+ "type": "string",
+ "pattern": "^(date|utc):.*$"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "delimiter"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "topojson"
+ ]
+ },
+ "feature": {
+ "$ref": "#/refs/stringOrSignal"
+ },
+ "property": {
+ "$ref": "#/refs/stringOrSignal"
+ }
+ },
+ "required": [
+ "type",
+ "feature"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "topojson"
+ ]
+ },
+ "mesh": {
+ "$ref": "#/refs/stringOrSignal"
+ },
+ "property": {
+ "$ref": "#/refs/stringOrSignal"
+ },
+ "filter": {
+ "enum": [
+ "interior",
+ "exterior",
+ null
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "mesh"
+ ],
+ "additionalProperties": false
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "async": {
+ "$ref": "#/refs/booleanOrSignal"
+ },
+ "name": {
+ "type": "string"
+ },
+ "transform": {
+ "type": "array",
+ "items": {
+ "$ref": "#/defs/transform"
+ }
+ },
+ "on": {
+ "$ref": "#/defs/onTrigger"
+ }
+ },
+ "required": [
+ "url",
+ "name"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "values": {
+ "oneOf": [
+ {},
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "format": {
+ "oneOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "$ref": "#/refs/stringOrSignal"
+ },
+ "parse": {
+ "oneOf": [
+ {
+ "enum": [
+ "auto"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": {
+ "oneOf": [
+ {
+ "enum": [
+ "boolean",
+ "number",
+ "date",
+ "string"
+ ]
+ },
+ {
+ "type": "string",
+ "pattern": "^(date|utc):.*$"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "json"
+ ]
+ },
+ "parse": {
+ "oneOf": [
+ {
+ "enum": [
+ "auto"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": {
+ "oneOf": [
+ {
+ "enum": [
+ "boolean",
+ "number",
+ "date",
+ "string"
+ ]
+ },
+ {
+ "type": "string",
+ "pattern": "^(date|utc):.*$"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "property": {
+ "$ref": "#/refs/stringOrSignal"
+ },
+ "copy": {
+ "$ref": "#/refs/booleanOrSignal"
+ }
+ },
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "csv",
+ "tsv"
+ ]
+ },
+ "header": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "parse": {
+ "oneOf": [
+ {
+ "enum": [
+ "auto"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": {
+ "oneOf": [
+ {
+ "enum": [
+ "boolean",
+ "number",
+ "date",
+ "string"
+ ]
+ },
+ {
+ "type": "string",
+ "pattern": "^(date|utc):.*$"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "dsv"
+ ]
+ },
+ "delimiter": {
+ "type": "string"
+ },
+ "header": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "parse": {
+ "oneOf": [
+ {
+ "enum": [
+ "auto"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": {
+ "oneOf": [
+ {
+ "enum": [
+ "boolean",
+ "number",
+ "date",
+ "string"
+ ]
+ },
+ {
+ "type": "string",
+ "pattern": "^(date|utc):.*$"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "delimiter"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "topojson"
+ ]
+ },
+ "feature": {
+ "$ref": "#/refs/stringOrSignal"
+ },
+ "property": {
+ "$ref": "#/refs/stringOrSignal"
+ }
+ },
+ "required": [
+ "type",
+ "feature"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "topojson"
+ ]
+ },
+ "mesh": {
+ "$ref": "#/refs/stringOrSignal"
+ },
+ "property": {
+ "$ref": "#/refs/stringOrSignal"
+ },
+ "filter": {
+ "enum": [
+ "interior",
+ "exterior",
+ null
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "mesh"
+ ],
+ "additionalProperties": false
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "async": {
+ "$ref": "#/refs/booleanOrSignal"
+ },
+ "name": {
+ "type": "string"
+ },
+ "transform": {
+ "type": "array",
+ "items": {
+ "$ref": "#/defs/transform"
+ }
+ },
+ "on": {
+ "$ref": "#/defs/onTrigger"
+ }
+ },
+ "required": [
+ "values",
+ "name"
+ ],
+ "additionalProperties": false
+ }
+ ]
+ },
+ "rule": {
+ "type": "object",
+ "properties": {
+ "test": {
+ "type": "string"
+ }
+ }
+ },
+ "encodeEntry": {
+ "type": "object",
+ "properties": {
+ "x": {
+ "$ref": "#/refs/numberValue"
+ },
+ "x2": {
+ "$ref": "#/refs/numberValue"
+ },
+ "xc": {
+ "$ref": "#/refs/numberValue"
+ },
+ "width": {
+ "$ref": "#/refs/numberValue"
+ },
+ "y": {
+ "$ref": "#/refs/numberValue"
+ },
+ "y2": {
+ "$ref": "#/refs/numberValue"
+ },
+ "yc": {
+ "$ref": "#/refs/numberValue"
+ },
+ "height": {
+ "$ref": "#/refs/numberValue"
+ },
+ "opacity": {
+ "$ref": "#/refs/numberValue"
+ },
+ "fill": {
+ "$ref": "#/refs/colorValue"
+ },
+ "fillOpacity": {
+ "$ref": "#/refs/numberValue"
+ },
+ "stroke": {
+ "$ref": "#/refs/colorValue"
+ },
+ "strokeOpacity": {
+ "$ref": "#/refs/numberValue"
+ },
+ "strokeWidth": {
+ "$ref": "#/refs/numberValue"
+ },
+ "strokeCap": {
+ "$ref": "#/refs/strokeCapValue"
+ },
+ "strokeDash": {
+ "$ref": "#/refs/arrayValue"
+ },
+ "strokeDashOffset": {
+ "$ref": "#/refs/numberValue"
+ },
+ "strokeJoin": {
+ "$ref": "#/refs/strokeJoinValue"
+ },
+ "strokeMiterLimit": {
+ "$ref": "#/refs/numberValue"
+ },
+ "blend": {
+ "$ref": "#/refs/blendValue"
+ },
+ "cursor": {
+ "$ref": "#/refs/stringValue"
+ },
+ "tooltip": {
+ "$ref": "#/refs/anyValue"
+ },
+ "zindex": {
+ "$ref": "#/refs/numberValue"
+ },
+ "clip": {
+ "$ref": "#/refs/booleanValue"
+ },
+ "strokeForeground": {
+ "$ref": "#/refs/booleanValue"
+ },
+ "strokeOffset": {
+ "$ref": "#/refs/numberValue"
+ },
+ "cornerRadius": {
+ "$ref": "#/refs/numberValue"
+ },
+ "cornerRadiusTopLeft": {
+ "$ref": "#/refs/numberValue"
+ },
+ "cornerRadiusTopRight": {
+ "$ref": "#/refs/numberValue"
+ },
+ "cornerRadiusBottomRight": {
+ "$ref": "#/refs/numberValue"
+ },
+ "cornerRadiusBottomLeft": {
+ "$ref": "#/refs/numberValue"
+ },
+ "angle": {
+ "$ref": "#/refs/numberValue"
+ },
+ "size": {
+ "$ref": "#/refs/numberValue"
+ },
+ "shape": {
+ "$ref": "#/refs/stringValue"
+ },
+ "path": {
+ "$ref": "#/refs/stringValue"
+ },
+ "scaleX": {
+ "$ref": "#/refs/numberValue"
+ },
+ "scaleY": {
+ "$ref": "#/refs/numberValue"
+ },
+ "innerRadius": {
+ "$ref": "#/refs/numberValue"
+ },
+ "outerRadius": {
+ "$ref": "#/refs/numberValue"
+ },
+ "startAngle": {
+ "$ref": "#/refs/numberValue"
+ },
+ "endAngle": {
+ "$ref": "#/refs/numberValue"
+ },
+ "padAngle": {
+ "$ref": "#/refs/numberValue"
+ },
+ "interpolate": {
+ "$ref": "#/refs/stringValue"
+ },
+ "tension": {
+ "$ref": "#/refs/numberValue"
+ },
+ "orient": {
+ "$ref": "#/refs/directionValue"
+ },
+ "defined": {
+ "$ref": "#/refs/booleanValue"
+ },
+ "url": {
+ "$ref": "#/refs/stringValue"
+ },
+ "align": {
+ "$ref": "#/refs/alignValue"
+ },
+ "baseline": {
+ "$ref": "#/refs/baselineValue"
+ },
+ "aspect": {
+ "$ref": "#/refs/booleanValue"
+ },
+ "smooth": {
+ "$ref": "#/refs/booleanValue"
+ },
+ "text": {
+ "$ref": "#/refs/textValue"
+ },
+ "dir": {
+ "$ref": "#/refs/stringValue"
+ },
+ "ellipsis": {
+ "$ref": "#/refs/stringValue"
+ },
+ "limit": {
+ "$ref": "#/refs/numberValue"
+ },
+ "lineBreak": {
+ "$ref": "#/refs/stringValue"
+ },
+ "lineHeight": {
+ "$ref": "#/refs/numberValue"
+ },
+ "dx": {
+ "$ref": "#/refs/numberValue"
+ },
+ "dy": {
+ "$ref": "#/refs/numberValue"
+ },
+ "radius": {
+ "$ref": "#/refs/numberValue"
+ },
+ "theta": {
+ "$ref": "#/refs/numberValue"
+ },
+ "font": {
+ "$ref": "#/refs/stringValue"
+ },
+ "fontSize": {
+ "$ref": "#/refs/numberValue"
+ },
+ "fontWeight": {
+ "$ref": "#/refs/fontWeightValue"
+ },
+ "fontStyle": {
+ "$ref": "#/refs/stringValue"
+ }
+ },
+ "additionalProperties": true
+ },
+ "encode": {
+ "type": "object",
+ "additionalProperties": false,
+ "patternProperties": {
+ "^.+$": {
+ "$ref": "#/defs/encodeEntry"
+ }
+ }
+ },
+ "layout": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "align": {
+ "oneOf": [
+ {
+ "oneOf": [
+ {
+ "enum": [
+ "all",
+ "each",
+ "none"
+ ]
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "row": {
+ "oneOf": [
+ {
+ "enum": [
+ "all",
+ "each",
+ "none"
+ ]
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "column": {
+ "oneOf": [
+ {
+ "enum": [
+ "all",
+ "each",
+ "none"
+ ]
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ "additionalProperties": false
+ }
+ ]
+ },
+ "bounds": {
+ "oneOf": [
+ {
+ "enum": [
+ "full",
+ "flush"
+ ]
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "center": {
+ "oneOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "row": {
+ "$ref": "#/refs/booleanOrSignal"
+ },
+ "column": {
+ "$ref": "#/refs/booleanOrSignal"
+ }
+ },
+ "additionalProperties": false
+ }
+ ]
+ },
+ "columns": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "padding": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "row": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "column": {
+ "$ref": "#/refs/numberOrSignal"
+ }
+ },
+ "additionalProperties": false
+ }
+ ]
+ },
+ "offset": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "rowHeader": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "rowFooter": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "rowTitle": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "columnHeader": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "columnFooter": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "columnTitle": {
+ "$ref": "#/refs/numberOrSignal"
+ }
+ },
+ "additionalProperties": false
+ }
+ ]
+ },
+ "headerBand": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "row": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "column": {
+ "$ref": "#/refs/numberOrSignal"
+ }
+ },
+ "additionalProperties": false
+ }
+ ]
+ },
+ "footerBand": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "row": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "column": {
+ "$ref": "#/refs/numberOrSignal"
+ }
+ },
+ "additionalProperties": false
+ }
+ ]
+ },
+ "titleBand": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "row": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "column": {
+ "$ref": "#/refs/numberOrSignal"
+ }
+ },
+ "additionalProperties": false
+ }
+ ]
+ },
+ "titleAnchor": {
+ "oneOf": [
+ {
+ "oneOf": [
+ {
+ "enum": [
+ "start",
+ "end"
+ ]
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "row": {
+ "oneOf": [
+ {
+ "enum": [
+ "start",
+ "end"
+ ]
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "column": {
+ "oneOf": [
+ {
+ "enum": [
+ "start",
+ "end"
+ ]
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ "additionalProperties": false
+ }
+ ]
+ }
+ },
+ "additionalProperties": false
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "guideEncode": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "interactive": {
+ "type": "boolean",
+ "default": false
+ },
+ "style": {
+ "$ref": "#/refs/style"
+ }
+ },
+ "additionalProperties": false,
+ "patternProperties": {
+ "^(?!interactive|name|style).+$": {
+ "$ref": "#/defs/encodeEntry"
+ }
+ }
+ },
+ "legend": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "size": {
+ "type": "string"
+ },
+ "shape": {
+ "type": "string"
+ },
+ "fill": {
+ "type": "string"
+ },
+ "stroke": {
+ "type": "string"
+ },
+ "opacity": {
+ "type": "string"
+ },
+ "strokeDash": {
+ "type": "string"
+ },
+ "strokeWidth": {
+ "type": "string"
+ },
+ "type": {
+ "enum": [
+ "gradient",
+ "symbol"
+ ]
+ },
+ "direction": {
+ "enum": [
+ "vertical",
+ "horizontal"
+ ]
+ },
+ "orient": {
+ "oneOf": [
+ {
+ "enum": [
+ "none",
+ "left",
+ "right",
+ "top",
+ "bottom",
+ "top-left",
+ "top-right",
+ "bottom-left",
+ "bottom-right"
+ ],
+ "default": "right"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "tickCount": {
+ "$ref": "#/refs/tickCount"
+ },
+ "tickMinStep": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "symbolLimit": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "values": {
+ "$ref": "#/refs/arrayOrSignal"
+ },
+ "zindex": {
+ "type": "number"
+ },
+ "cornerRadius": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "fillColor": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/colorValue"
+ }
+ ]
+ },
+ "offset": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "padding": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "strokeColor": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/colorValue"
+ }
+ ]
+ },
+ "legendX": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "legendY": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "title": {
+ "$ref": "#/refs/textOrSignal"
+ },
+ "titleAlign": {
+ "oneOf": [
+ {
+ "enum": [
+ "left",
+ "right",
+ "center"
+ ]
+ },
+ {
+ "$ref": "#/refs/alignValue"
+ }
+ ]
+ },
+ "titleAnchor": {
+ "oneOf": [
+ {
+ "enum": [
+ null,
+ "start",
+ "middle",
+ "end"
+ ]
+ },
+ {
+ "$ref": "#/refs/anchorValue"
+ }
+ ]
+ },
+ "titleBaseline": {
+ "oneOf": [
+ {
+ "enum": [
+ "top",
+ "middle",
+ "bottom",
+ "alphabetic",
+ "line-top",
+ "line-bottom"
+ ]
+ },
+ {
+ "$ref": "#/refs/baselineValue"
+ }
+ ]
+ },
+ "titleColor": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/colorValue"
+ }
+ ]
+ },
+ "titleFont": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/stringValue"
+ }
+ ]
+ },
+ "titleFontSize": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "titleFontStyle": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/stringValue"
+ }
+ ]
+ },
+ "titleFontWeight": {
+ "oneOf": [
+ {
+ "enum": [
+ null,
+ "normal",
+ "bold",
+ "lighter",
+ "bolder",
+ "100",
+ "200",
+ "300",
+ "400",
+ "500",
+ "600",
+ "700",
+ "800",
+ "900",
+ 100,
+ 200,
+ 300,
+ 400,
+ 500,
+ 600,
+ 700,
+ 800,
+ 900
+ ]
+ },
+ {
+ "$ref": "#/refs/fontWeightValue"
+ }
+ ]
+ },
+ "titleLimit": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "titleLineHeight": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "titleOpacity": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "titleOrient": {
+ "oneOf": [
+ {
+ "enum": [
+ "left",
+ "right",
+ "top",
+ "bottom"
+ ]
+ },
+ {
+ "$ref": "#/refs/orientValue"
+ }
+ ]
+ },
+ "titlePadding": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "gradientLength": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "gradientOpacity": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "gradientStrokeColor": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/colorValue"
+ }
+ ]
+ },
+ "gradientStrokeWidth": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "gradientThickness": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "clipHeight": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "columns": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "columnPadding": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "rowPadding": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "gridAlign": {
+ "oneOf": [
+ {
+ "enum": [
+ "all",
+ "each",
+ "none"
+ ]
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "symbolDash": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "number"
+ }
+ },
+ {
+ "$ref": "#/refs/arrayValue"
+ }
+ ]
+ },
+ "symbolDashOffset": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "symbolFillColor": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/colorValue"
+ }
+ ]
+ },
+ "symbolOffset": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "symbolOpacity": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "symbolSize": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "symbolStrokeColor": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/colorValue"
+ }
+ ]
+ },
+ "symbolStrokeWidth": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "symbolType": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/stringValue"
+ }
+ ]
+ },
+ "format": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "year": {
+ "type": "string"
+ },
+ "quarter": {
+ "type": "string"
+ },
+ "month": {
+ "type": "string"
+ },
+ "date": {
+ "type": "string"
+ },
+ "week": {
+ "type": "string"
+ },
+ "day": {
+ "type": "string"
+ },
+ "hours": {
+ "type": "string"
+ },
+ "minutes": {
+ "type": "string"
+ },
+ "seconds": {
+ "type": "string"
+ },
+ "milliseconds": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "formatType": {
+ "oneOf": [
+ {
+ "enum": [
+ "number",
+ "time",
+ "utc"
+ ]
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "labelAlign": {
+ "oneOf": [
+ {
+ "enum": [
+ "left",
+ "right",
+ "center"
+ ]
+ },
+ {
+ "$ref": "#/refs/alignValue"
+ }
+ ]
+ },
+ "labelBaseline": {
+ "oneOf": [
+ {
+ "enum": [
+ "top",
+ "middle",
+ "bottom",
+ "alphabetic",
+ "line-top",
+ "line-bottom"
+ ]
+ },
+ {
+ "$ref": "#/refs/baselineValue"
+ }
+ ]
+ },
+ "labelColor": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/colorValue"
+ }
+ ]
+ },
+ "labelFont": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/stringValue"
+ }
+ ]
+ },
+ "labelFontSize": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "labelFontStyle": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/stringValue"
+ }
+ ]
+ },
+ "labelFontWeight": {
+ "oneOf": [
+ {
+ "enum": [
+ null,
+ "normal",
+ "bold",
+ "lighter",
+ "bolder",
+ "100",
+ "200",
+ "300",
+ "400",
+ "500",
+ "600",
+ "700",
+ "800",
+ "900",
+ 100,
+ 200,
+ 300,
+ 400,
+ 500,
+ 600,
+ 700,
+ 800,
+ 900
+ ]
+ },
+ {
+ "$ref": "#/refs/fontWeightValue"
+ }
+ ]
+ },
+ "labelLimit": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "labelOffset": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "labelOpacity": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "labelOverlap": {
+ "$ref": "#/refs/labelOverlap"
+ },
+ "labelSeparation": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "encode": {
+ "type": "object",
+ "properties": {
+ "title": {
+ "$ref": "#/defs/guideEncode"
+ },
+ "labels": {
+ "$ref": "#/defs/guideEncode"
+ },
+ "legend": {
+ "$ref": "#/defs/guideEncode"
+ },
+ "entries": {
+ "$ref": "#/defs/guideEncode"
+ },
+ "symbols": {
+ "$ref": "#/defs/guideEncode"
+ },
+ "gradient": {
+ "$ref": "#/defs/guideEncode"
+ }
+ },
+ "additionalProperties": false
+ }
+ },
+ "additionalProperties": false
+ },
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "required": [
+ "size"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "shape"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "fill"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "stroke"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "opacity"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "strokeDash"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "strokeWidth"
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "mark": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "$ref": "#/refs/marktype"
+ },
+ "role": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "style": {
+ "$ref": "#/refs/style"
+ },
+ "key": {
+ "type": "string"
+ },
+ "clip": {
+ "$ref": "#/refs/markclip"
+ },
+ "sort": {
+ "$ref": "#/refs/compare"
+ },
+ "interactive": {
+ "$ref": "#/refs/booleanOrSignal"
+ },
+ "encode": {
+ "$ref": "#/defs/encode"
+ },
+ "transform": {
+ "type": "array",
+ "items": {
+ "$ref": "#/defs/transformMark"
+ }
+ },
+ "on": {
+ "$ref": "#/defs/onMarkTrigger"
+ }
+ },
+ "required": [
+ "type"
+ ]
+ },
+ "markGroup": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "group"
+ ]
+ },
+ "from": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/from"
+ },
+ {
+ "$ref": "#/refs/facet"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type"
+ ]
+ },
+ {
+ "$ref": "#/defs/mark"
+ },
+ {
+ "$ref": "#/defs/scope"
+ }
+ ]
+ },
+ "markVisual": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "not": {
+ "enum": [
+ "group"
+ ]
+ }
+ },
+ "from": {
+ "$ref": "#/refs/from"
+ }
+ }
+ },
+ {
+ "$ref": "#/defs/mark"
+ }
+ ]
+ },
+ "listener": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "scale": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "scale"
+ ]
+ },
+ {
+ "$ref": "#/defs/stream"
+ }
+ ]
+ },
+ "onEvents": {
+ "type": "array",
+ "items": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "events": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/selector"
+ },
+ {
+ "$ref": "#/defs/listener"
+ },
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/defs/listener"
+ },
+ "minItems": 1
+ }
+ ]
+ },
+ "force": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "events"
+ ]
+ },
+ {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "encode": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "encode"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "update": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/exprString"
+ },
+ {
+ "$ref": "#/refs/expr"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "value": {}
+ },
+ "required": [
+ "value"
+ ]
+ }
+ ]
+ }
+ },
+ "required": [
+ "update"
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ },
+ "onTrigger": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "trigger": {
+ "$ref": "#/refs/exprString"
+ },
+ "insert": {
+ "$ref": "#/refs/exprString"
+ },
+ "remove": {
+ "oneOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/refs/exprString"
+ }
+ ]
+ },
+ "toggle": {
+ "$ref": "#/refs/exprString"
+ },
+ "modify": {
+ "$ref": "#/refs/exprString"
+ },
+ "values": {
+ "$ref": "#/refs/exprString"
+ }
+ },
+ "required": [
+ "trigger"
+ ],
+ "additionalProperties": false
+ }
+ },
+ "onMarkTrigger": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "trigger": {
+ "$ref": "#/refs/exprString"
+ },
+ "modify": {
+ "$ref": "#/refs/exprString"
+ },
+ "values": {
+ "$ref": "#/refs/exprString"
+ }
+ },
+ "required": [
+ "trigger"
+ ],
+ "additionalProperties": false
+ }
+ },
+ "padding": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "top": {
+ "type": "number"
+ },
+ "bottom": {
+ "type": "number"
+ },
+ "left": {
+ "type": "number"
+ },
+ "right": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "projection": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "type": {
+ "$ref": "#/refs/stringOrSignal"
+ },
+ "clipAngle": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "clipExtent": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "minItems": 2,
+ "maxItems": 2
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "minItems": 2,
+ "maxItems": 2
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "scale": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "translate": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "minItems": 2,
+ "maxItems": 2
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "center": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "minItems": 2,
+ "maxItems": 2
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "rotate": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "minItems": 2,
+ "maxItems": 3
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "parallels": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "minItems": 2,
+ "maxItems": 2
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "precision": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "pointRadius": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "fit": {
+ "oneOf": [
+ {
+ "type": "object"
+ },
+ {
+ "type": "array"
+ }
+ ]
+ },
+ "extent": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "minItems": 2,
+ "maxItems": 2
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "minItems": 2,
+ "maxItems": 2
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "size": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "minItems": 2,
+ "maxItems": 2
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "additionalProperties": true
+ },
+ "scale": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "identity"
+ ]
+ },
+ "nice": {
+ "$ref": "#/refs/booleanOrSignal"
+ },
+ "name": {
+ "type": "string"
+ },
+ "domain": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/refs/numberOrSignal"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/scaleData"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "domainMin": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "domainMax": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "domainMid": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "domainRaw": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "array"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "reverse": {
+ "$ref": "#/refs/booleanOrSignal"
+ },
+ "round": {
+ "$ref": "#/refs/booleanOrSignal"
+ }
+ },
+ "required": [
+ "type",
+ "name"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "ordinal"
+ ]
+ },
+ "range": {
+ "oneOf": [
+ {
+ "enum": [
+ "width",
+ "height",
+ "symbol",
+ "category",
+ "ordinal",
+ "ramp",
+ "diverging",
+ "heatmap"
+ ]
+ },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/refs/numberOrSignal"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "type": "object",
+ "properties": {
+ "scheme": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "count": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "extent": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "numItems": 2
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ "required": [
+ "scheme"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "string"
+ },
+ "field": {
+ "$ref": "#/refs/stringOrSignal"
+ },
+ "sort": {
+ "oneOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "field": {
+ "$ref": "#/refs/stringOrSignal"
+ },
+ "op": {
+ "$ref": "#/refs/stringOrSignal"
+ },
+ "order": {
+ "$ref": "#/refs/sortOrder"
+ }
+ },
+ "additionalProperties": false
+ }
+ ]
+ }
+ },
+ "required": [
+ "data",
+ "field"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "string"
+ },
+ "fields": {
+ "type": "array",
+ "items": {
+ "$ref": "#/refs/stringOrSignal"
+ },
+ "minItems": 1
+ },
+ "sort": {
+ "oneOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "op": {
+ "enum": [
+ "count"
+ ]
+ },
+ "order": {
+ "$ref": "#/refs/sortOrder"
+ }
+ },
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "field": {
+ "$ref": "#/refs/stringOrSignal"
+ },
+ "op": {
+ "enum": [
+ "count",
+ "min",
+ "max"
+ ]
+ },
+ "order": {
+ "$ref": "#/refs/sortOrder"
+ }
+ },
+ "required": [
+ "field",
+ "op"
+ ],
+ "additionalProperties": false
+ }
+ ]
+ }
+ },
+ "required": [
+ "data",
+ "fields"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "fields": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "string"
+ },
+ "field": {
+ "$ref": "#/refs/stringOrSignal"
+ }
+ },
+ "required": [
+ "data",
+ "field"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "minItems": 1
+ },
+ "sort": {
+ "oneOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "op": {
+ "enum": [
+ "count"
+ ]
+ },
+ "order": {
+ "$ref": "#/refs/sortOrder"
+ }
+ },
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "field": {
+ "$ref": "#/refs/stringOrSignal"
+ },
+ "op": {
+ "enum": [
+ "count",
+ "min",
+ "max"
+ ]
+ },
+ "order": {
+ "$ref": "#/refs/sortOrder"
+ }
+ },
+ "required": [
+ "field",
+ "op"
+ ],
+ "additionalProperties": false
+ }
+ ]
+ }
+ },
+ "required": [
+ "fields"
+ ],
+ "additionalProperties": false
+ }
+ ]
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "interpolate": {
+ "$ref": "#/refs/scaleInterpolate"
+ },
+ "domainImplicit": {
+ "$ref": "#/refs/booleanOrSignal"
+ },
+ "name": {
+ "type": "string"
+ },
+ "domain": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/refs/numberOrSignal"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/scaleData"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "domainMin": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "domainMax": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "domainMid": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "domainRaw": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "array"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "reverse": {
+ "$ref": "#/refs/booleanOrSignal"
+ },
+ "round": {
+ "$ref": "#/refs/booleanOrSignal"
+ }
+ },
+ "required": [
+ "type",
+ "name"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "band"
+ ]
+ },
+ "paddingInner": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "range": {
+ "oneOf": [
+ {
+ "enum": [
+ "width",
+ "height",
+ "symbol",
+ "category",
+ "ordinal",
+ "ramp",
+ "diverging",
+ "heatmap"
+ ]
+ },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/refs/numberOrSignal"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "type": "object",
+ "properties": {
+ "step": {
+ "$ref": "#/refs/numberOrSignal"
+ }
+ },
+ "required": [
+ "step"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "padding": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "paddingOuter": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "align": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "name": {
+ "type": "string"
+ },
+ "domain": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/refs/numberOrSignal"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/scaleData"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "domainMin": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "domainMax": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "domainMid": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "domainRaw": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "array"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "reverse": {
+ "$ref": "#/refs/booleanOrSignal"
+ },
+ "round": {
+ "$ref": "#/refs/booleanOrSignal"
+ }
+ },
+ "required": [
+ "type",
+ "name"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "point"
+ ]
+ },
+ "range": {
+ "oneOf": [
+ {
+ "enum": [
+ "width",
+ "height",
+ "symbol",
+ "category",
+ "ordinal",
+ "ramp",
+ "diverging",
+ "heatmap"
+ ]
+ },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/refs/numberOrSignal"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "type": "object",
+ "properties": {
+ "step": {
+ "$ref": "#/refs/numberOrSignal"
+ }
+ },
+ "required": [
+ "step"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "padding": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "paddingOuter": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "align": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "name": {
+ "type": "string"
+ },
+ "domain": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/refs/numberOrSignal"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/scaleData"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "domainMin": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "domainMax": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "domainMid": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "domainRaw": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "array"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "reverse": {
+ "$ref": "#/refs/booleanOrSignal"
+ },
+ "round": {
+ "$ref": "#/refs/booleanOrSignal"
+ }
+ },
+ "required": [
+ "type",
+ "name"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "quantize",
+ "threshold"
+ ]
+ },
+ "range": {
+ "oneOf": [
+ {
+ "enum": [
+ "width",
+ "height",
+ "symbol",
+ "category",
+ "ordinal",
+ "ramp",
+ "diverging",
+ "heatmap"
+ ]
+ },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/refs/numberOrSignal"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "type": "object",
+ "properties": {
+ "scheme": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "count": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "extent": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "numItems": 2
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ "required": [
+ "scheme"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "interpolate": {
+ "$ref": "#/refs/scaleInterpolate"
+ },
+ "nice": {
+ "oneOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "zero": {
+ "$ref": "#/refs/booleanOrSignal"
+ },
+ "name": {
+ "type": "string"
+ },
+ "domain": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/refs/numberOrSignal"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/scaleData"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "domainMin": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "domainMax": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "domainMid": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "domainRaw": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "array"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "reverse": {
+ "$ref": "#/refs/booleanOrSignal"
+ },
+ "round": {
+ "$ref": "#/refs/booleanOrSignal"
+ }
+ },
+ "required": [
+ "type",
+ "name"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "quantile"
+ ]
+ },
+ "range": {
+ "oneOf": [
+ {
+ "enum": [
+ "width",
+ "height",
+ "symbol",
+ "category",
+ "ordinal",
+ "ramp",
+ "diverging",
+ "heatmap"
+ ]
+ },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/refs/numberOrSignal"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "type": "object",
+ "properties": {
+ "scheme": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "count": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "extent": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "numItems": 2
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ "required": [
+ "scheme"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "interpolate": {
+ "$ref": "#/refs/scaleInterpolate"
+ },
+ "name": {
+ "type": "string"
+ },
+ "domain": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/refs/numberOrSignal"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/scaleData"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "domainMin": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "domainMax": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "domainMid": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "domainRaw": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "array"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "reverse": {
+ "$ref": "#/refs/booleanOrSignal"
+ },
+ "round": {
+ "$ref": "#/refs/booleanOrSignal"
+ }
+ },
+ "required": [
+ "type",
+ "name"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "bin-ordinal"
+ ]
+ },
+ "bins": {
+ "$ref": "#/refs/scaleBins"
+ },
+ "range": {
+ "oneOf": [
+ {
+ "enum": [
+ "width",
+ "height",
+ "symbol",
+ "category",
+ "ordinal",
+ "ramp",
+ "diverging",
+ "heatmap"
+ ]
+ },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/refs/numberOrSignal"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "type": "object",
+ "properties": {
+ "scheme": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "count": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "extent": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "numItems": 2
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ "required": [
+ "scheme"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "interpolate": {
+ "$ref": "#/refs/scaleInterpolate"
+ },
+ "name": {
+ "type": "string"
+ },
+ "domain": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/refs/numberOrSignal"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/scaleData"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "domainMin": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "domainMax": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "domainMid": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "domainRaw": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "array"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "reverse": {
+ "$ref": "#/refs/booleanOrSignal"
+ },
+ "round": {
+ "$ref": "#/refs/booleanOrSignal"
+ }
+ },
+ "required": [
+ "type",
+ "name"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "time",
+ "utc"
+ ]
+ },
+ "nice": {
+ "oneOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "enum": [
+ "millisecond",
+ "second",
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "year"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "interval": {
+ "oneOf": [
+ {
+ "enum": [
+ "millisecond",
+ "second",
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "year"
+ ]
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "step": {
+ "$ref": "#/refs/numberOrSignal"
+ }
+ },
+ "required": [
+ "interval"
+ ],
+ "additionalProperties": false
+ }
+ ]
+ },
+ "range": {
+ "oneOf": [
+ {
+ "enum": [
+ "width",
+ "height",
+ "symbol",
+ "category",
+ "ordinal",
+ "ramp",
+ "diverging",
+ "heatmap"
+ ]
+ },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/refs/numberOrSignal"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "type": "object",
+ "properties": {
+ "scheme": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "count": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "extent": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "numItems": 2
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ "required": [
+ "scheme"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "bins": {
+ "$ref": "#/refs/scaleBins"
+ },
+ "interpolate": {
+ "$ref": "#/refs/scaleInterpolate"
+ },
+ "clamp": {
+ "$ref": "#/refs/booleanOrSignal"
+ },
+ "padding": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "name": {
+ "type": "string"
+ },
+ "domain": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/refs/numberOrSignal"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/scaleData"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "domainMin": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "domainMax": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "domainMid": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "domainRaw": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "array"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "reverse": {
+ "$ref": "#/refs/booleanOrSignal"
+ },
+ "round": {
+ "$ref": "#/refs/booleanOrSignal"
+ }
+ },
+ "required": [
+ "type",
+ "name"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "linear",
+ "sqrt",
+ "sequential"
+ ]
+ },
+ "nice": {
+ "oneOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "zero": {
+ "$ref": "#/refs/booleanOrSignal"
+ },
+ "range": {
+ "oneOf": [
+ {
+ "enum": [
+ "width",
+ "height",
+ "symbol",
+ "category",
+ "ordinal",
+ "ramp",
+ "diverging",
+ "heatmap"
+ ]
+ },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/refs/numberOrSignal"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "type": "object",
+ "properties": {
+ "scheme": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "count": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "extent": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "numItems": 2
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ "required": [
+ "scheme"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "bins": {
+ "$ref": "#/refs/scaleBins"
+ },
+ "interpolate": {
+ "$ref": "#/refs/scaleInterpolate"
+ },
+ "clamp": {
+ "$ref": "#/refs/booleanOrSignal"
+ },
+ "padding": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "name": {
+ "type": "string"
+ },
+ "domain": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/refs/numberOrSignal"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/scaleData"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "domainMin": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "domainMax": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "domainMid": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "domainRaw": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "array"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "reverse": {
+ "$ref": "#/refs/booleanOrSignal"
+ },
+ "round": {
+ "$ref": "#/refs/booleanOrSignal"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "log"
+ ]
+ },
+ "base": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "nice": {
+ "oneOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "zero": {
+ "$ref": "#/refs/booleanOrSignal"
+ },
+ "range": {
+ "oneOf": [
+ {
+ "enum": [
+ "width",
+ "height",
+ "symbol",
+ "category",
+ "ordinal",
+ "ramp",
+ "diverging",
+ "heatmap"
+ ]
+ },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/refs/numberOrSignal"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "type": "object",
+ "properties": {
+ "scheme": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "count": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "extent": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "numItems": 2
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ "required": [
+ "scheme"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "bins": {
+ "$ref": "#/refs/scaleBins"
+ },
+ "interpolate": {
+ "$ref": "#/refs/scaleInterpolate"
+ },
+ "clamp": {
+ "$ref": "#/refs/booleanOrSignal"
+ },
+ "padding": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "name": {
+ "type": "string"
+ },
+ "domain": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/refs/numberOrSignal"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/scaleData"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "domainMin": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "domainMax": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "domainMid": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "domainRaw": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "array"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "reverse": {
+ "$ref": "#/refs/booleanOrSignal"
+ },
+ "round": {
+ "$ref": "#/refs/booleanOrSignal"
+ }
+ },
+ "required": [
+ "type",
+ "name"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "pow"
+ ]
+ },
+ "exponent": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "nice": {
+ "oneOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "zero": {
+ "$ref": "#/refs/booleanOrSignal"
+ },
+ "range": {
+ "oneOf": [
+ {
+ "enum": [
+ "width",
+ "height",
+ "symbol",
+ "category",
+ "ordinal",
+ "ramp",
+ "diverging",
+ "heatmap"
+ ]
+ },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/refs/numberOrSignal"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "type": "object",
+ "properties": {
+ "scheme": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "count": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "extent": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "numItems": 2
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ "required": [
+ "scheme"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "bins": {
+ "$ref": "#/refs/scaleBins"
+ },
+ "interpolate": {
+ "$ref": "#/refs/scaleInterpolate"
+ },
+ "clamp": {
+ "$ref": "#/refs/booleanOrSignal"
+ },
+ "padding": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "name": {
+ "type": "string"
+ },
+ "domain": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/refs/numberOrSignal"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/scaleData"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "domainMin": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "domainMax": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "domainMid": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "domainRaw": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "array"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "reverse": {
+ "$ref": "#/refs/booleanOrSignal"
+ },
+ "round": {
+ "$ref": "#/refs/booleanOrSignal"
+ }
+ },
+ "required": [
+ "type",
+ "name"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "symlog"
+ ]
+ },
+ "constant": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "nice": {
+ "oneOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "zero": {
+ "$ref": "#/refs/booleanOrSignal"
+ },
+ "range": {
+ "oneOf": [
+ {
+ "enum": [
+ "width",
+ "height",
+ "symbol",
+ "category",
+ "ordinal",
+ "ramp",
+ "diverging",
+ "heatmap"
+ ]
+ },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/refs/numberOrSignal"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "type": "object",
+ "properties": {
+ "scheme": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "count": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "extent": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "numItems": 2
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ "required": [
+ "scheme"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "bins": {
+ "$ref": "#/refs/scaleBins"
+ },
+ "interpolate": {
+ "$ref": "#/refs/scaleInterpolate"
+ },
+ "clamp": {
+ "$ref": "#/refs/booleanOrSignal"
+ },
+ "padding": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "name": {
+ "type": "string"
+ },
+ "domain": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/refs/numberOrSignal"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/scaleData"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "domainMin": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "domainMax": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "domainMid": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "domainRaw": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "array"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "reverse": {
+ "$ref": "#/refs/booleanOrSignal"
+ },
+ "round": {
+ "$ref": "#/refs/booleanOrSignal"
+ }
+ },
+ "required": [
+ "type",
+ "name"
+ ],
+ "additionalProperties": false
+ }
+ ]
+ },
+ "scope": {
+ "type": "object",
+ "properties": {
+ "encode": {
+ "$ref": "#/defs/encode"
+ },
+ "layout": {
+ "$ref": "#/defs/layout"
+ },
+ "signals": {
+ "type": "array",
+ "items": {
+ "$ref": "#/defs/signal"
+ }
+ },
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/defs/data"
+ }
+ },
+ "scales": {
+ "type": "array",
+ "items": {
+ "$ref": "#/defs/scale"
+ }
+ },
+ "projections": {
+ "type": "array",
+ "items": {
+ "$ref": "#/defs/projection"
+ }
+ },
+ "axes": {
+ "type": "array",
+ "items": {
+ "$ref": "#/defs/axis"
+ }
+ },
+ "legends": {
+ "type": "array",
+ "items": {
+ "$ref": "#/defs/legend"
+ }
+ },
+ "title": {
+ "$ref": "#/defs/title"
+ },
+ "marks": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/defs/markGroup"
+ },
+ {
+ "$ref": "#/defs/markVisual"
+ }
+ ]
+ }
+ },
+ "usermeta": {
+ "type": "object"
+ }
+ }
+ },
+ "signalName": {
+ "type": "string",
+ "not": {
+ "enum": [
+ "parent",
+ "datum",
+ "event",
+ "item"
+ ]
+ }
+ },
+ "signal": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "name": {
+ "$ref": "#/defs/signalName"
+ },
+ "description": {
+ "type": "string"
+ },
+ "push": {
+ "enum": [
+ "outer"
+ ]
+ },
+ "on": {
+ "$ref": "#/defs/onEvents"
+ }
+ },
+ "required": [
+ "name",
+ "push"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "name": {
+ "$ref": "#/defs/signalName"
+ },
+ "description": {
+ "type": "string"
+ },
+ "value": {},
+ "react": {
+ "type": "boolean",
+ "default": true
+ },
+ "update": {
+ "$ref": "#/refs/exprString"
+ },
+ "on": {
+ "$ref": "#/defs/onEvents"
+ },
+ "bind": {
+ "$ref": "#/defs/bind"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "name": {
+ "$ref": "#/defs/signalName"
+ },
+ "description": {
+ "type": "string"
+ },
+ "value": {},
+ "init": {
+ "$ref": "#/refs/exprString"
+ },
+ "on": {
+ "$ref": "#/defs/onEvents"
+ },
+ "bind": {
+ "$ref": "#/defs/bind"
+ }
+ },
+ "required": [
+ "name",
+ "init"
+ ],
+ "additionalProperties": false
+ }
+ ]
+ },
+ "stream": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "between": {
+ "type": "array",
+ "items": {
+ "$ref": "#/defs/stream"
+ },
+ "minItems": 2,
+ "maxItems": 2
+ },
+ "marktype": {
+ "type": "string"
+ },
+ "markname": {
+ "type": "string"
+ },
+ "filter": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/exprString"
+ },
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/refs/exprString"
+ },
+ "minItems": 1
+ }
+ ]
+ },
+ "throttle": {
+ "type": "number"
+ },
+ "debounce": {
+ "type": "number"
+ },
+ "consume": {
+ "type": "boolean"
+ }
+ }
+ },
+ {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string"
+ },
+ "source": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "type"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "stream": {
+ "$ref": "#/defs/stream"
+ }
+ },
+ "required": [
+ "stream"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "merge": {
+ "type": "array",
+ "items": {
+ "$ref": "#/defs/stream"
+ },
+ "minItems": 1
+ }
+ },
+ "required": [
+ "merge"
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "title": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "orient": {
+ "oneOf": [
+ {
+ "enum": [
+ "none",
+ "left",
+ "right",
+ "top",
+ "bottom"
+ ],
+ "default": "top"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "anchor": {
+ "oneOf": [
+ {
+ "enum": [
+ null,
+ "start",
+ "middle",
+ "end"
+ ]
+ },
+ {
+ "$ref": "#/refs/anchorValue"
+ }
+ ]
+ },
+ "frame": {
+ "oneOf": [
+ {
+ "enum": [
+ "group",
+ "bounds"
+ ]
+ },
+ {
+ "$ref": "#/refs/stringValue"
+ }
+ ]
+ },
+ "offset": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "limit": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "text": {
+ "$ref": "#/refs/textOrSignal"
+ },
+ "subtitle": {
+ "$ref": "#/refs/textOrSignal"
+ },
+ "zindex": {
+ "type": "number"
+ },
+ "align": {
+ "oneOf": [
+ {
+ "enum": [
+ "left",
+ "right",
+ "center"
+ ]
+ },
+ {
+ "$ref": "#/refs/alignValue"
+ }
+ ]
+ },
+ "angle": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "baseline": {
+ "oneOf": [
+ {
+ "enum": [
+ "top",
+ "middle",
+ "bottom",
+ "alphabetic",
+ "line-top",
+ "line-bottom"
+ ]
+ },
+ {
+ "$ref": "#/refs/baselineValue"
+ }
+ ]
+ },
+ "dx": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "dy": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "color": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/colorValue"
+ }
+ ]
+ },
+ "font": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/stringValue"
+ }
+ ]
+ },
+ "fontSize": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "fontStyle": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/stringValue"
+ }
+ ]
+ },
+ "fontWeight": {
+ "oneOf": [
+ {
+ "enum": [
+ null,
+ "normal",
+ "bold",
+ "lighter",
+ "bolder",
+ "100",
+ "200",
+ "300",
+ "400",
+ "500",
+ "600",
+ "700",
+ "800",
+ "900",
+ 100,
+ 200,
+ 300,
+ 400,
+ 500,
+ 600,
+ 700,
+ 800,
+ 900
+ ]
+ },
+ {
+ "$ref": "#/refs/fontWeightValue"
+ }
+ ]
+ },
+ "lineHeight": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "subtitleColor": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/colorValue"
+ }
+ ]
+ },
+ "subtitleFont": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/stringValue"
+ }
+ ]
+ },
+ "subtitleFontSize": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "subtitleFontStyle": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/stringValue"
+ }
+ ]
+ },
+ "subtitleFontWeight": {
+ "oneOf": [
+ {
+ "enum": [
+ null,
+ "normal",
+ "bold",
+ "lighter",
+ "bolder",
+ "100",
+ "200",
+ "300",
+ "400",
+ "500",
+ "600",
+ "700",
+ "800",
+ "900",
+ 100,
+ 200,
+ 300,
+ 400,
+ 500,
+ 600,
+ 700,
+ 800,
+ 900
+ ]
+ },
+ {
+ "$ref": "#/refs/fontWeightValue"
+ }
+ ]
+ },
+ "subtitleLineHeight": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "subtitlePadding": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "encode": {
+ "anyOf": [
+ {
+ "type": "object",
+ "additionalProperties": false,
+ "patternProperties": {
+ "^(?!interactive|name|style).+$": {
+ "$ref": "#/defs/encodeEntry"
+ }
+ }
+ },
+ {
+ "type": "object",
+ "properties": {
+ "group": {
+ "$ref": "#/defs/guideEncode"
+ },
+ "title": {
+ "$ref": "#/defs/guideEncode"
+ },
+ "subtitle": {
+ "$ref": "#/defs/guideEncode"
+ }
+ },
+ "additionalProperties": false
+ }
+ ]
+ },
+ "name": {
+ "type": "string"
+ },
+ "interactive": {
+ "type": "boolean"
+ },
+ "style": {
+ "$ref": "#/refs/style"
+ }
+ },
+ "additionalProperties": false
+ }
+ ]
+ },
+ "transform": {
+ "oneOf": [
+ {
+ "$ref": "#/defs/crossfilterTransform"
+ },
+ {
+ "$ref": "#/defs/resolvefilterTransform"
+ },
+ {
+ "$ref": "#/defs/linkpathTransform"
+ },
+ {
+ "$ref": "#/defs/pieTransform"
+ },
+ {
+ "$ref": "#/defs/stackTransform"
+ },
+ {
+ "$ref": "#/defs/forceTransform"
+ },
+ {
+ "$ref": "#/defs/contourTransform"
+ },
+ {
+ "$ref": "#/defs/geojsonTransform"
+ },
+ {
+ "$ref": "#/defs/geopathTransform"
+ },
+ {
+ "$ref": "#/defs/geopointTransform"
+ },
+ {
+ "$ref": "#/defs/geoshapeTransform"
+ },
+ {
+ "$ref": "#/defs/graticuleTransform"
+ },
+ {
+ "$ref": "#/defs/heatmapTransform"
+ },
+ {
+ "$ref": "#/defs/isocontourTransform"
+ },
+ {
+ "$ref": "#/defs/kde2dTransform"
+ },
+ {
+ "$ref": "#/defs/nestTransform"
+ },
+ {
+ "$ref": "#/defs/packTransform"
+ },
+ {
+ "$ref": "#/defs/partitionTransform"
+ },
+ {
+ "$ref": "#/defs/stratifyTransform"
+ },
+ {
+ "$ref": "#/defs/treeTransform"
+ },
+ {
+ "$ref": "#/defs/treelinksTransform"
+ },
+ {
+ "$ref": "#/defs/treemapTransform"
+ },
+ {
+ "$ref": "#/defs/loessTransform"
+ },
+ {
+ "$ref": "#/defs/regressionTransform"
+ },
+ {
+ "$ref": "#/defs/aggregateTransform"
+ },
+ {
+ "$ref": "#/defs/binTransform"
+ },
+ {
+ "$ref": "#/defs/collectTransform"
+ },
+ {
+ "$ref": "#/defs/countpatternTransform"
+ },
+ {
+ "$ref": "#/defs/crossTransform"
+ },
+ {
+ "$ref": "#/defs/densityTransform"
+ },
+ {
+ "$ref": "#/defs/dotbinTransform"
+ },
+ {
+ "$ref": "#/defs/extentTransform"
+ },
+ {
+ "$ref": "#/defs/filterTransform"
+ },
+ {
+ "$ref": "#/defs/flattenTransform"
+ },
+ {
+ "$ref": "#/defs/foldTransform"
+ },
+ {
+ "$ref": "#/defs/formulaTransform"
+ },
+ {
+ "$ref": "#/defs/imputeTransform"
+ },
+ {
+ "$ref": "#/defs/joinaggregateTransform"
+ },
+ {
+ "$ref": "#/defs/kdeTransform"
+ },
+ {
+ "$ref": "#/defs/lookupTransform"
+ },
+ {
+ "$ref": "#/defs/pivotTransform"
+ },
+ {
+ "$ref": "#/defs/projectTransform"
+ },
+ {
+ "$ref": "#/defs/quantileTransform"
+ },
+ {
+ "$ref": "#/defs/sampleTransform"
+ },
+ {
+ "$ref": "#/defs/sequenceTransform"
+ },
+ {
+ "$ref": "#/defs/timeunitTransform"
+ },
+ {
+ "$ref": "#/defs/windowTransform"
+ },
+ {
+ "$ref": "#/defs/identifierTransform"
+ },
+ {
+ "$ref": "#/defs/voronoiTransform"
+ },
+ {
+ "$ref": "#/defs/wordcloudTransform"
+ }
+ ]
+ },
+ "transformMark": {
+ "oneOf": [
+ {
+ "$ref": "#/defs/crossfilterTransform"
+ },
+ {
+ "$ref": "#/defs/resolvefilterTransform"
+ },
+ {
+ "$ref": "#/defs/linkpathTransform"
+ },
+ {
+ "$ref": "#/defs/pieTransform"
+ },
+ {
+ "$ref": "#/defs/stackTransform"
+ },
+ {
+ "$ref": "#/defs/forceTransform"
+ },
+ {
+ "$ref": "#/defs/geojsonTransform"
+ },
+ {
+ "$ref": "#/defs/geopathTransform"
+ },
+ {
+ "$ref": "#/defs/geopointTransform"
+ },
+ {
+ "$ref": "#/defs/geoshapeTransform"
+ },
+ {
+ "$ref": "#/defs/heatmapTransform"
+ },
+ {
+ "$ref": "#/defs/packTransform"
+ },
+ {
+ "$ref": "#/defs/partitionTransform"
+ },
+ {
+ "$ref": "#/defs/stratifyTransform"
+ },
+ {
+ "$ref": "#/defs/treeTransform"
+ },
+ {
+ "$ref": "#/defs/treemapTransform"
+ },
+ {
+ "$ref": "#/defs/binTransform"
+ },
+ {
+ "$ref": "#/defs/collectTransform"
+ },
+ {
+ "$ref": "#/defs/dotbinTransform"
+ },
+ {
+ "$ref": "#/defs/extentTransform"
+ },
+ {
+ "$ref": "#/defs/formulaTransform"
+ },
+ {
+ "$ref": "#/defs/joinaggregateTransform"
+ },
+ {
+ "$ref": "#/defs/lookupTransform"
+ },
+ {
+ "$ref": "#/defs/sampleTransform"
+ },
+ {
+ "$ref": "#/defs/timeunitTransform"
+ },
+ {
+ "$ref": "#/defs/windowTransform"
+ },
+ {
+ "$ref": "#/defs/identifierTransform"
+ },
+ {
+ "$ref": "#/defs/voronoiTransform"
+ },
+ {
+ "$ref": "#/defs/wordcloudTransform"
+ }
+ ]
+ },
+ "crossfilterTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "crossfilter"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "fields": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "query": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {}
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "fields",
+ "query"
+ ],
+ "additionalProperties": false
+ },
+ "resolvefilterTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "resolvefilter"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "ignore": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "filter": {}
+ },
+ "required": [
+ "type",
+ "ignore",
+ "filter"
+ ],
+ "additionalProperties": false
+ },
+ "linkpathTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "linkpath"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "sourceX": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ],
+ "default": "source.x"
+ },
+ "sourceY": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ],
+ "default": "source.y"
+ },
+ "targetX": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ],
+ "default": "target.x"
+ },
+ "targetY": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ],
+ "default": "target.y"
+ },
+ "orient": {
+ "anyOf": [
+ {
+ "enum": [
+ "horizontal",
+ "vertical",
+ "radial"
+ ]
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": "vertical"
+ },
+ "shape": {
+ "anyOf": [
+ {
+ "enum": [
+ "line",
+ "arc",
+ "curve",
+ "diagonal",
+ "orthogonal"
+ ]
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": "line"
+ },
+ "require": {
+ "$ref": "#/refs/signal"
+ },
+ "as": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": "path"
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "additionalProperties": false
+ },
+ "pieTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "pie"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "field": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ },
+ "startAngle": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "endAngle": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": 6.283185307179586
+ },
+ "sort": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "as": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2,
+ "default": [
+ "startAngle",
+ "endAngle"
+ ]
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "additionalProperties": false
+ },
+ "stackTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "stack"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "field": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ },
+ "groupby": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "sort": {
+ "$ref": "#/refs/compare"
+ },
+ "offset": {
+ "anyOf": [
+ {
+ "enum": [
+ "zero",
+ "center",
+ "normalize"
+ ]
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": "zero"
+ },
+ "as": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2,
+ "default": [
+ "y0",
+ "y1"
+ ]
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "additionalProperties": false
+ },
+ "forceTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "force"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "static": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "restart": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "iterations": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": 300
+ },
+ "alpha": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": 1
+ },
+ "alphaMin": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": 0.001
+ },
+ "alphaTarget": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "velocityDecay": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": 0.4
+ },
+ "forces": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "force": {
+ "enum": [
+ "center"
+ ]
+ },
+ "x": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "y": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ "required": [
+ "force"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "force": {
+ "enum": [
+ "collide"
+ ]
+ },
+ "radius": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "$ref": "#/refs/expr"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ }
+ ]
+ },
+ "strength": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": 0.7
+ },
+ "iterations": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": 1
+ }
+ },
+ "required": [
+ "force"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "force": {
+ "enum": [
+ "nbody"
+ ]
+ },
+ "strength": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": -30
+ },
+ "theta": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": 0.9
+ },
+ "distanceMin": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": 1
+ },
+ "distanceMax": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ "required": [
+ "force"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "force": {
+ "enum": [
+ "link"
+ ]
+ },
+ "links": {
+ "type": "string"
+ },
+ "id": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ },
+ "distance": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "$ref": "#/refs/expr"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ }
+ ],
+ "default": 30
+ },
+ "strength": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "$ref": "#/refs/expr"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ }
+ ]
+ },
+ "iterations": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": 1
+ }
+ },
+ "required": [
+ "force"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "force": {
+ "enum": [
+ "x"
+ ]
+ },
+ "strength": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": 0.1
+ },
+ "x": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ }
+ },
+ "required": [
+ "force"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "force": {
+ "enum": [
+ "y"
+ ]
+ },
+ "strength": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": 0.1
+ },
+ "y": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ }
+ },
+ "required": [
+ "force"
+ ],
+ "additionalProperties": false
+ }
+ ]
+ }
+ },
+ "as": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": [
+ "x",
+ "y",
+ "vx",
+ "vy"
+ ]
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "additionalProperties": false
+ },
+ "contourTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "contour"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "size": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2
+ },
+ "values": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "x": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ },
+ "y": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ },
+ "weight": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ },
+ "cellSize": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "bandwidth": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "count": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "nice": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "thresholds": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "smooth": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": true
+ }
+ },
+ "required": [
+ "type",
+ "size"
+ ],
+ "additionalProperties": false
+ },
+ "geojsonTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "geojson"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "fields": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2
+ },
+ "geojson": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "additionalProperties": false
+ },
+ "geopathTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "geopath"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "projection": {
+ "type": "string"
+ },
+ "field": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ },
+ "pointRadius": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "$ref": "#/refs/expr"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ }
+ ]
+ },
+ "as": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": "path"
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "additionalProperties": false
+ },
+ "geopointTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "geopoint"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "projection": {
+ "type": "string"
+ },
+ "fields": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2
+ },
+ "as": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2,
+ "default": [
+ "x",
+ "y"
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "projection",
+ "fields"
+ ],
+ "additionalProperties": false
+ },
+ "geoshapeTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "geoshape"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "projection": {
+ "type": "string"
+ },
+ "field": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ],
+ "default": "datum"
+ },
+ "pointRadius": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "$ref": "#/refs/expr"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ }
+ ]
+ },
+ "as": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": "shape"
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "additionalProperties": false
+ },
+ "graticuleTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "graticule"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "extent": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {}
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2
+ },
+ "extentMajor": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {}
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2
+ },
+ "extentMinor": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {}
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2
+ },
+ "step": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2
+ },
+ "stepMajor": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2,
+ "default": [
+ 90,
+ 360
+ ]
+ },
+ "stepMinor": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2,
+ "default": [
+ 10,
+ 10
+ ]
+ },
+ "precision": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": 2.5
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "additionalProperties": false
+ },
+ "heatmapTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "heatmap"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "field": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ },
+ "color": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "$ref": "#/refs/expr"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ }
+ ]
+ },
+ "opacity": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "$ref": "#/refs/expr"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ }
+ ]
+ },
+ "resolve": {
+ "anyOf": [
+ {
+ "enum": [
+ "shared",
+ "independent"
+ ]
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": "independent"
+ },
+ "as": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": "image"
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "additionalProperties": false
+ },
+ "isocontourTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "isocontour"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "field": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ },
+ "thresholds": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "levels": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "nice": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "resolve": {
+ "anyOf": [
+ {
+ "enum": [
+ "shared",
+ "independent"
+ ]
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": "independent"
+ },
+ "zero": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": true
+ },
+ "smooth": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": true
+ },
+ "scale": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "$ref": "#/refs/expr"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ }
+ ]
+ },
+ "translate": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "$ref": "#/refs/expr"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "as": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": "contour"
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "additionalProperties": false
+ },
+ "kde2dTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "kde2d"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "size": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2
+ },
+ "x": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ },
+ "y": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ },
+ "weight": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ },
+ "groupby": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "cellSize": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "bandwidth": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2
+ },
+ "counts": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "as": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": "grid"
+ }
+ },
+ "required": [
+ "type",
+ "size",
+ "x",
+ "y"
+ ],
+ "additionalProperties": false
+ },
+ "nestTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "nest"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "keys": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "generate": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "additionalProperties": false
+ },
+ "packTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "pack"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "field": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ },
+ "sort": {
+ "$ref": "#/refs/compare"
+ },
+ "padding": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "radius": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ },
+ "size": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2
+ },
+ "as": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "maxItems": 5,
+ "minItems": 5,
+ "default": [
+ "x",
+ "y",
+ "r",
+ "depth",
+ "children"
+ ]
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "additionalProperties": false
+ },
+ "partitionTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "partition"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "field": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ },
+ "sort": {
+ "$ref": "#/refs/compare"
+ },
+ "padding": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "round": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "size": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2
+ },
+ "as": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "maxItems": 6,
+ "minItems": 6,
+ "default": [
+ "x0",
+ "y0",
+ "x1",
+ "y1",
+ "depth",
+ "children"
+ ]
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "additionalProperties": false
+ },
+ "stratifyTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "stratify"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "key": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ },
+ "parentKey": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "key",
+ "parentKey"
+ ],
+ "additionalProperties": false
+ },
+ "treeTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "tree"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "field": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ },
+ "sort": {
+ "$ref": "#/refs/compare"
+ },
+ "method": {
+ "anyOf": [
+ {
+ "enum": [
+ "tidy",
+ "cluster"
+ ]
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": "tidy"
+ },
+ "size": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2
+ },
+ "nodeSize": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2
+ },
+ "separation": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": true
+ },
+ "as": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "maxItems": 4,
+ "minItems": 4,
+ "default": [
+ "x",
+ "y",
+ "depth",
+ "children"
+ ]
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "additionalProperties": false
+ },
+ "treelinksTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "treelinks"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "additionalProperties": false
+ },
+ "treemapTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "treemap"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "field": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ },
+ "sort": {
+ "$ref": "#/refs/compare"
+ },
+ "method": {
+ "anyOf": [
+ {
+ "enum": [
+ "squarify",
+ "resquarify",
+ "binary",
+ "dice",
+ "slice",
+ "slicedice"
+ ]
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": "squarify"
+ },
+ "padding": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "paddingInner": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "paddingOuter": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "paddingTop": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "paddingRight": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "paddingBottom": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "paddingLeft": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "ratio": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": 1.618033988749895
+ },
+ "round": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "size": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2
+ },
+ "as": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "maxItems": 6,
+ "minItems": 6,
+ "default": [
+ "x0",
+ "y0",
+ "x1",
+ "y1",
+ "depth",
+ "children"
+ ]
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "additionalProperties": false
+ },
+ "loessTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "loess"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "x": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ },
+ "y": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ },
+ "groupby": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "bandwidth": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": 0.3
+ },
+ "as": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "x",
+ "y"
+ ],
+ "additionalProperties": false
+ },
+ "regressionTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "regression"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "x": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ },
+ "y": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ },
+ "groupby": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "method": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": "linear"
+ },
+ "order": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": 3
+ },
+ "extent": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2
+ },
+ "params": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "as": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "x",
+ "y"
+ ],
+ "additionalProperties": false
+ },
+ "aggregateTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "aggregate"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "groupby": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "ops": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "enum": [
+ "values",
+ "count",
+ "__count__",
+ "missing",
+ "valid",
+ "sum",
+ "product",
+ "mean",
+ "average",
+ "variance",
+ "variancep",
+ "stdev",
+ "stdevp",
+ "stderr",
+ "distinct",
+ "ci0",
+ "ci1",
+ "median",
+ "q1",
+ "q3",
+ "argmin",
+ "argmax",
+ "min",
+ "max"
+ ]
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "fields": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "as": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "drop": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": true
+ },
+ "cross": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "key": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "additionalProperties": false
+ },
+ "binTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "bin"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "field": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ },
+ "interval": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": true
+ },
+ "anchor": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "maxbins": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": 20
+ },
+ "base": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": 10
+ },
+ "divide": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": [
+ 5,
+ 2
+ ]
+ },
+ "extent": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2
+ },
+ "span": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "step": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "steps": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "minstep": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "nice": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": true
+ },
+ "name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "as": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2,
+ "default": [
+ "bin0",
+ "bin1"
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "field",
+ "extent"
+ ],
+ "additionalProperties": false
+ },
+ "collectTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "collect"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "sort": {
+ "$ref": "#/refs/compare"
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "additionalProperties": false
+ },
+ "countpatternTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "countpattern"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "field": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ },
+ "case": {
+ "anyOf": [
+ {
+ "enum": [
+ "upper",
+ "lower",
+ "mixed"
+ ]
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": "mixed"
+ },
+ "pattern": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": "[\\w\"]+"
+ },
+ "stopwords": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "as": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2,
+ "default": [
+ "text",
+ "count"
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "field"
+ ],
+ "additionalProperties": false
+ },
+ "crossTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "cross"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "filter": {
+ "$ref": "#/refs/exprString"
+ },
+ "as": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2,
+ "default": [
+ "a",
+ "b"
+ ]
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "additionalProperties": false
+ },
+ "densityTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "density"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "extent": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2
+ },
+ "steps": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "minsteps": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": 25
+ },
+ "maxsteps": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": 200
+ },
+ "method": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": "pdf"
+ },
+ "distribution": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "function": {
+ "enum": [
+ "normal"
+ ]
+ },
+ "mean": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "stdev": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": 1
+ }
+ },
+ "required": [
+ "function"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "function": {
+ "enum": [
+ "lognormal"
+ ]
+ },
+ "mean": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "stdev": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": 1
+ }
+ },
+ "required": [
+ "function"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "function": {
+ "enum": [
+ "uniform"
+ ]
+ },
+ "min": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "max": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": 1
+ }
+ },
+ "required": [
+ "function"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "function": {
+ "enum": [
+ "kde"
+ ]
+ },
+ "field": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ },
+ "from": {
+ "type": "string"
+ },
+ "bandwidth": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ "required": [
+ "function",
+ "field"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "function": {
+ "enum": [
+ "mixture"
+ ]
+ },
+ "distributions": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {}
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "weights": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ "required": [
+ "function"
+ ],
+ "additionalProperties": false
+ }
+ ]
+ },
+ "as": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": [
+ "value",
+ "density"
+ ]
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "additionalProperties": false
+ },
+ "dotbinTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "dotbin"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "field": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ },
+ "groupby": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "step": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "smooth": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "as": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": "bin"
+ }
+ },
+ "required": [
+ "type",
+ "field"
+ ],
+ "additionalProperties": false
+ },
+ "extentTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "extent"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "field": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "field"
+ ],
+ "additionalProperties": false
+ },
+ "filterTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "filter"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "expr": {
+ "$ref": "#/refs/exprString"
+ }
+ },
+ "required": [
+ "type",
+ "expr"
+ ],
+ "additionalProperties": false
+ },
+ "flattenTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "flatten"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "fields": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "index": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "as": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "fields"
+ ],
+ "additionalProperties": false
+ },
+ "foldTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "fold"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "fields": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "as": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2,
+ "default": [
+ "key",
+ "value"
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "fields"
+ ],
+ "additionalProperties": false
+ },
+ "formulaTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "formula"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "expr": {
+ "$ref": "#/refs/exprString"
+ },
+ "as": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "initonly": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "expr",
+ "as"
+ ],
+ "additionalProperties": false
+ },
+ "imputeTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "impute"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "field": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ },
+ "key": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ },
+ "keyvals": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {}
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "groupby": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "method": {
+ "anyOf": [
+ {
+ "enum": [
+ "value",
+ "mean",
+ "median",
+ "max",
+ "min"
+ ]
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": "value"
+ },
+ "value": {}
+ },
+ "required": [
+ "type",
+ "field",
+ "key"
+ ],
+ "additionalProperties": false
+ },
+ "joinaggregateTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "joinaggregate"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "groupby": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "fields": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "ops": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "enum": [
+ "values",
+ "count",
+ "__count__",
+ "missing",
+ "valid",
+ "sum",
+ "product",
+ "mean",
+ "average",
+ "variance",
+ "variancep",
+ "stdev",
+ "stdevp",
+ "stderr",
+ "distinct",
+ "ci0",
+ "ci1",
+ "median",
+ "q1",
+ "q3",
+ "argmin",
+ "argmax",
+ "min",
+ "max"
+ ]
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "as": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "key": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "additionalProperties": false
+ },
+ "kdeTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "kde"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "groupby": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "field": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ },
+ "cumulative": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "counts": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "bandwidth": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "extent": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2
+ },
+ "resolve": {
+ "anyOf": [
+ {
+ "enum": [
+ "shared",
+ "independent"
+ ]
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": "independent"
+ },
+ "steps": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "minsteps": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": 25
+ },
+ "maxsteps": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": 200
+ },
+ "as": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": [
+ "value",
+ "density"
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "field"
+ ],
+ "additionalProperties": false
+ },
+ "lookupTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "lookup"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "from": {
+ "type": "string"
+ },
+ "key": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ },
+ "values": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "fields": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "as": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "default": {}
+ },
+ "required": [
+ "type",
+ "from",
+ "key",
+ "fields"
+ ],
+ "additionalProperties": false
+ },
+ "pivotTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "pivot"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "groupby": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "field": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ },
+ "value": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ },
+ "op": {
+ "anyOf": [
+ {
+ "enum": [
+ "values",
+ "count",
+ "__count__",
+ "missing",
+ "valid",
+ "sum",
+ "product",
+ "mean",
+ "average",
+ "variance",
+ "variancep",
+ "stdev",
+ "stdevp",
+ "stderr",
+ "distinct",
+ "ci0",
+ "ci1",
+ "median",
+ "q1",
+ "q3",
+ "argmin",
+ "argmax",
+ "min",
+ "max"
+ ]
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": "sum"
+ },
+ "limit": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "key": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "field",
+ "value"
+ ],
+ "additionalProperties": false
+ },
+ "projectTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "project"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "fields": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "as": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "additionalProperties": false
+ },
+ "quantileTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "quantile"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "groupby": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "field": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ },
+ "probs": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "step": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": 0.01
+ },
+ "as": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": [
+ "prob",
+ "value"
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "field"
+ ],
+ "additionalProperties": false
+ },
+ "sampleTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "sample"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "size": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": 1000
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "additionalProperties": false
+ },
+ "sequenceTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "sequence"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "start": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "stop": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "step": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": 1
+ },
+ "as": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": "data"
+ }
+ },
+ "required": [
+ "type",
+ "start",
+ "stop"
+ ],
+ "additionalProperties": false
+ },
+ "timeunitTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "timeunit"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "field": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ },
+ "interval": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": true
+ },
+ "units": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "step": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": 1
+ },
+ "maxbins": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": 40
+ },
+ "extent": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "timezone": {
+ "anyOf": [
+ {
+ "enum": [
+ "local",
+ "utc"
+ ]
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": "local"
+ },
+ "as": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2,
+ "default": [
+ "unit0",
+ "unit1"
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "field"
+ ],
+ "additionalProperties": false
+ },
+ "windowTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "window"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "sort": {
+ "$ref": "#/refs/compare"
+ },
+ "groupby": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "ops": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "enum": [
+ "row_number",
+ "rank",
+ "dense_rank",
+ "percent_rank",
+ "cume_dist",
+ "ntile",
+ "lag",
+ "lead",
+ "first_value",
+ "last_value",
+ "nth_value",
+ "prev_value",
+ "next_value",
+ "values",
+ "count",
+ "__count__",
+ "missing",
+ "valid",
+ "sum",
+ "product",
+ "mean",
+ "average",
+ "variance",
+ "variancep",
+ "stdev",
+ "stdevp",
+ "stderr",
+ "distinct",
+ "ci0",
+ "ci1",
+ "median",
+ "q1",
+ "q3",
+ "argmin",
+ "argmax",
+ "min",
+ "max"
+ ]
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "params": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "fields": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "as": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "frame": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2,
+ "default": [
+ null,
+ 0
+ ]
+ },
+ "ignorePeers": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "additionalProperties": false
+ },
+ "identifierTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "identifier"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "as": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "as"
+ ],
+ "additionalProperties": false
+ },
+ "voronoiTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "voronoi"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "x": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ },
+ "y": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ },
+ "size": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2
+ },
+ "extent": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {}
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2,
+ "default": [
+ [
+ -100000,
+ -100000
+ ],
+ [
+ 100000,
+ 100000
+ ]
+ ]
+ },
+ "as": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "default": "path"
+ }
+ },
+ "required": [
+ "type",
+ "x",
+ "y"
+ ],
+ "additionalProperties": false
+ },
+ "wordcloudTransform": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "wordcloud"
+ ]
+ },
+ "signal": {
+ "type": "string"
+ },
+ "size": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2
+ },
+ "font": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "$ref": "#/refs/expr"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ }
+ ],
+ "default": "sans-serif"
+ },
+ "fontStyle": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "$ref": "#/refs/expr"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ }
+ ],
+ "default": "normal"
+ },
+ "fontWeight": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "$ref": "#/refs/expr"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ }
+ ],
+ "default": "normal"
+ },
+ "fontSize": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "$ref": "#/refs/expr"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ }
+ ],
+ "default": 14
+ },
+ "fontSizeRange": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": [
+ 10,
+ 50
+ ]
+ },
+ "rotate": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "$ref": "#/refs/expr"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ }
+ ]
+ },
+ "text": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ },
+ "spiral": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "padding": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "$ref": "#/refs/expr"
+ },
+ {
+ "$ref": "#/refs/paramField"
+ }
+ ]
+ },
+ "as": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ],
+ "maxItems": 7,
+ "minItems": 7,
+ "default": [
+ "x",
+ "y",
+ "font",
+ "fontSize",
+ "fontStyle",
+ "fontWeight",
+ "angle"
+ ]
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "additionalProperties": false
+ }
+ },
+ "refs": {
+ "labelOverlap": {
+ "oneOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "enum": [
+ "parity",
+ "greedy"
+ ]
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "tickBand": {
+ "oneOf": [
+ {
+ "enum": [
+ "center",
+ "extent"
+ ]
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "tickCount": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "enum": [
+ "millisecond",
+ "second",
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "year"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "interval": {
+ "oneOf": [
+ {
+ "enum": [
+ "millisecond",
+ "second",
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "year"
+ ]
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "step": {
+ "$ref": "#/refs/numberOrSignal"
+ }
+ },
+ "required": [
+ "interval"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "element": {
+ "type": "string"
+ },
+ "paramField": {
+ "type": "object",
+ "properties": {
+ "field": {
+ "type": "string"
+ },
+ "as": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "field"
+ ],
+ "additionalProperties": false
+ },
+ "field": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "datum": {
+ "$ref": "#/refs/field"
+ }
+ },
+ "required": [
+ "datum"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "group": {
+ "$ref": "#/refs/field"
+ },
+ "level": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "group"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "parent": {
+ "$ref": "#/refs/field"
+ },
+ "level": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "parent"
+ ],
+ "additionalProperties": false
+ }
+ ]
+ },
+ "scale": {
+ "$ref": "#/refs/field"
+ },
+ "stringModifiers": {
+ "type": "object",
+ "properties": {
+ "scale": {
+ "$ref": "#/refs/scale"
+ }
+ }
+ },
+ "numberModifiers": {
+ "type": "object",
+ "properties": {
+ "exponent": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "mult": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "offset": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/numberValue"
+ }
+ ]
+ },
+ "round": {
+ "type": "boolean",
+ "default": false
+ },
+ "scale": {
+ "$ref": "#/refs/scale"
+ },
+ "band": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ },
+ "extra": {
+ "type": "boolean"
+ }
+ }
+ },
+ "anyValue": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "allOf": [
+ {
+ "$ref": "#/defs/rule"
+ },
+ {
+ "allOf": [
+ {
+ "$ref": "#/refs/stringModifiers"
+ },
+ {
+ "anyOf": [
+ {
+ "oneOf": [
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "value": {}
+ },
+ "required": [
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "field": {
+ "$ref": "#/refs/field"
+ }
+ },
+ "required": [
+ "field"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "range": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ "required": [
+ "range"
+ ]
+ }
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "band"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "offset"
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ },
+ {
+ "allOf": [
+ {
+ "$ref": "#/refs/stringModifiers"
+ },
+ {
+ "anyOf": [
+ {
+ "oneOf": [
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "value": {}
+ },
+ "required": [
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "field": {
+ "$ref": "#/refs/field"
+ }
+ },
+ "required": [
+ "field"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "range": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ "required": [
+ "range"
+ ]
+ }
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "band"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "offset"
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "blendValue": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "allOf": [
+ {
+ "$ref": "#/defs/rule"
+ },
+ {
+ "allOf": [
+ {
+ "$ref": "#/refs/stringModifiers"
+ },
+ {
+ "anyOf": [
+ {
+ "oneOf": [
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "value": {
+ "enum": [
+ null,
+ "multiply",
+ "screen",
+ "overlay",
+ "darken",
+ "lighten",
+ "color-dodge",
+ "color-burn",
+ "hard-light",
+ "soft-light",
+ "difference",
+ "exclusion",
+ "hue",
+ "saturation",
+ "color",
+ "luminosity"
+ ]
+ }
+ },
+ "required": [
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "field": {
+ "$ref": "#/refs/field"
+ }
+ },
+ "required": [
+ "field"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "range": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ "required": [
+ "range"
+ ]
+ }
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "band"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "offset"
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ },
+ {
+ "allOf": [
+ {
+ "$ref": "#/refs/stringModifiers"
+ },
+ {
+ "anyOf": [
+ {
+ "oneOf": [
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "value": {
+ "enum": [
+ null,
+ "multiply",
+ "screen",
+ "overlay",
+ "darken",
+ "lighten",
+ "color-dodge",
+ "color-burn",
+ "hard-light",
+ "soft-light",
+ "difference",
+ "exclusion",
+ "hue",
+ "saturation",
+ "color",
+ "luminosity"
+ ]
+ }
+ },
+ "required": [
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "field": {
+ "$ref": "#/refs/field"
+ }
+ },
+ "required": [
+ "field"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "range": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ "required": [
+ "range"
+ ]
+ }
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "band"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "offset"
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "numberValue": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "allOf": [
+ {
+ "$ref": "#/defs/rule"
+ },
+ {
+ "allOf": [
+ {
+ "$ref": "#/refs/numberModifiers"
+ },
+ {
+ "anyOf": [
+ {
+ "oneOf": [
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "value": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "field": {
+ "$ref": "#/refs/field"
+ }
+ },
+ "required": [
+ "field"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "range": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ "required": [
+ "range"
+ ]
+ }
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "band"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "offset"
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ },
+ {
+ "allOf": [
+ {
+ "$ref": "#/refs/numberModifiers"
+ },
+ {
+ "anyOf": [
+ {
+ "oneOf": [
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "value": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "field": {
+ "$ref": "#/refs/field"
+ }
+ },
+ "required": [
+ "field"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "range": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ "required": [
+ "range"
+ ]
+ }
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "band"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "offset"
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "stringValue": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "allOf": [
+ {
+ "$ref": "#/defs/rule"
+ },
+ {
+ "allOf": [
+ {
+ "$ref": "#/refs/stringModifiers"
+ },
+ {
+ "anyOf": [
+ {
+ "oneOf": [
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "value": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "field": {
+ "$ref": "#/refs/field"
+ }
+ },
+ "required": [
+ "field"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "range": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ "required": [
+ "range"
+ ]
+ }
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "band"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "offset"
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ },
+ {
+ "allOf": [
+ {
+ "$ref": "#/refs/stringModifiers"
+ },
+ {
+ "anyOf": [
+ {
+ "oneOf": [
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "value": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "field": {
+ "$ref": "#/refs/field"
+ }
+ },
+ "required": [
+ "field"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "range": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ "required": [
+ "range"
+ ]
+ }
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "band"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "offset"
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "textValue": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "allOf": [
+ {
+ "$ref": "#/defs/rule"
+ },
+ {
+ "allOf": [
+ {
+ "$ref": "#/refs/stringModifiers"
+ },
+ {
+ "anyOf": [
+ {
+ "oneOf": [
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "value": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ ]
+ }
+ },
+ "required": [
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "field": {
+ "$ref": "#/refs/field"
+ }
+ },
+ "required": [
+ "field"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "range": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ "required": [
+ "range"
+ ]
+ }
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "band"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "offset"
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ },
+ {
+ "allOf": [
+ {
+ "$ref": "#/refs/stringModifiers"
+ },
+ {
+ "anyOf": [
+ {
+ "oneOf": [
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "value": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ ]
+ }
+ },
+ "required": [
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "field": {
+ "$ref": "#/refs/field"
+ }
+ },
+ "required": [
+ "field"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "range": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ "required": [
+ "range"
+ ]
+ }
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "band"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "offset"
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "booleanValue": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "allOf": [
+ {
+ "$ref": "#/defs/rule"
+ },
+ {
+ "allOf": [
+ {
+ "$ref": "#/refs/stringModifiers"
+ },
+ {
+ "anyOf": [
+ {
+ "oneOf": [
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "value": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "field": {
+ "$ref": "#/refs/field"
+ }
+ },
+ "required": [
+ "field"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "range": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ "required": [
+ "range"
+ ]
+ }
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "band"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "offset"
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ },
+ {
+ "allOf": [
+ {
+ "$ref": "#/refs/stringModifiers"
+ },
+ {
+ "anyOf": [
+ {
+ "oneOf": [
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "value": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "field": {
+ "$ref": "#/refs/field"
+ }
+ },
+ "required": [
+ "field"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "range": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ "required": [
+ "range"
+ ]
+ }
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "band"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "offset"
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "arrayValue": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "allOf": [
+ {
+ "$ref": "#/defs/rule"
+ },
+ {
+ "allOf": [
+ {
+ "$ref": "#/refs/stringModifiers"
+ },
+ {
+ "anyOf": [
+ {
+ "oneOf": [
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "value": {
+ "type": "array"
+ }
+ },
+ "required": [
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "field": {
+ "$ref": "#/refs/field"
+ }
+ },
+ "required": [
+ "field"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "range": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ "required": [
+ "range"
+ ]
+ }
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "band"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "offset"
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ },
+ {
+ "allOf": [
+ {
+ "$ref": "#/refs/stringModifiers"
+ },
+ {
+ "anyOf": [
+ {
+ "oneOf": [
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "value": {
+ "type": "array"
+ }
+ },
+ "required": [
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "field": {
+ "$ref": "#/refs/field"
+ }
+ },
+ "required": [
+ "field"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "range": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ "required": [
+ "range"
+ ]
+ }
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "band"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "offset"
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "fontWeightValue": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "allOf": [
+ {
+ "$ref": "#/defs/rule"
+ },
+ {
+ "allOf": [
+ {
+ "$ref": "#/refs/stringModifiers"
+ },
+ {
+ "anyOf": [
+ {
+ "oneOf": [
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "value": {
+ "enum": [
+ null,
+ "normal",
+ "bold",
+ "lighter",
+ "bolder",
+ "100",
+ "200",
+ "300",
+ "400",
+ "500",
+ "600",
+ "700",
+ "800",
+ "900",
+ 100,
+ 200,
+ 300,
+ 400,
+ 500,
+ 600,
+ 700,
+ 800,
+ 900
+ ]
+ }
+ },
+ "required": [
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "field": {
+ "$ref": "#/refs/field"
+ }
+ },
+ "required": [
+ "field"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "range": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ "required": [
+ "range"
+ ]
+ }
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "band"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "offset"
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ },
+ {
+ "allOf": [
+ {
+ "$ref": "#/refs/stringModifiers"
+ },
+ {
+ "anyOf": [
+ {
+ "oneOf": [
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "value": {
+ "enum": [
+ null,
+ "normal",
+ "bold",
+ "lighter",
+ "bolder",
+ "100",
+ "200",
+ "300",
+ "400",
+ "500",
+ "600",
+ "700",
+ "800",
+ "900",
+ 100,
+ 200,
+ 300,
+ 400,
+ 500,
+ 600,
+ 700,
+ 800,
+ 900
+ ]
+ }
+ },
+ "required": [
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "field": {
+ "$ref": "#/refs/field"
+ }
+ },
+ "required": [
+ "field"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "range": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ "required": [
+ "range"
+ ]
+ }
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "band"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "offset"
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "anchorValue": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "allOf": [
+ {
+ "$ref": "#/defs/rule"
+ },
+ {
+ "allOf": [
+ {
+ "$ref": "#/refs/stringModifiers"
+ },
+ {
+ "anyOf": [
+ {
+ "oneOf": [
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "value": {
+ "enum": [
+ "start",
+ "middle",
+ "end"
+ ]
+ }
+ },
+ "required": [
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "field": {
+ "$ref": "#/refs/field"
+ }
+ },
+ "required": [
+ "field"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "range": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ "required": [
+ "range"
+ ]
+ }
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "band"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "offset"
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ },
+ {
+ "allOf": [
+ {
+ "$ref": "#/refs/stringModifiers"
+ },
+ {
+ "anyOf": [
+ {
+ "oneOf": [
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "value": {
+ "enum": [
+ "start",
+ "middle",
+ "end"
+ ]
+ }
+ },
+ "required": [
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "field": {
+ "$ref": "#/refs/field"
+ }
+ },
+ "required": [
+ "field"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "range": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ "required": [
+ "range"
+ ]
+ }
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "band"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "offset"
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "alignValue": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "allOf": [
+ {
+ "$ref": "#/defs/rule"
+ },
+ {
+ "allOf": [
+ {
+ "$ref": "#/refs/stringModifiers"
+ },
+ {
+ "anyOf": [
+ {
+ "oneOf": [
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "value": {
+ "enum": [
+ "left",
+ "right",
+ "center"
+ ]
+ }
+ },
+ "required": [
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "field": {
+ "$ref": "#/refs/field"
+ }
+ },
+ "required": [
+ "field"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "range": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ "required": [
+ "range"
+ ]
+ }
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "band"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "offset"
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ },
+ {
+ "allOf": [
+ {
+ "$ref": "#/refs/stringModifiers"
+ },
+ {
+ "anyOf": [
+ {
+ "oneOf": [
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "value": {
+ "enum": [
+ "left",
+ "right",
+ "center"
+ ]
+ }
+ },
+ "required": [
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "field": {
+ "$ref": "#/refs/field"
+ }
+ },
+ "required": [
+ "field"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "range": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ "required": [
+ "range"
+ ]
+ }
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "band"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "offset"
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "baselineValue": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "allOf": [
+ {
+ "$ref": "#/defs/rule"
+ },
+ {
+ "allOf": [
+ {
+ "$ref": "#/refs/stringModifiers"
+ },
+ {
+ "anyOf": [
+ {
+ "oneOf": [
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "value": {
+ "enum": [
+ "top",
+ "middle",
+ "bottom",
+ "alphabetic"
+ ]
+ }
+ },
+ "required": [
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "field": {
+ "$ref": "#/refs/field"
+ }
+ },
+ "required": [
+ "field"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "range": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ "required": [
+ "range"
+ ]
+ }
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "band"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "offset"
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ },
+ {
+ "allOf": [
+ {
+ "$ref": "#/refs/stringModifiers"
+ },
+ {
+ "anyOf": [
+ {
+ "oneOf": [
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "value": {
+ "enum": [
+ "top",
+ "middle",
+ "bottom",
+ "alphabetic"
+ ]
+ }
+ },
+ "required": [
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "field": {
+ "$ref": "#/refs/field"
+ }
+ },
+ "required": [
+ "field"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "range": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ "required": [
+ "range"
+ ]
+ }
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "band"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "offset"
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "directionValue": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "allOf": [
+ {
+ "$ref": "#/defs/rule"
+ },
+ {
+ "allOf": [
+ {
+ "$ref": "#/refs/stringModifiers"
+ },
+ {
+ "anyOf": [
+ {
+ "oneOf": [
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "value": {
+ "enum": [
+ "horizontal",
+ "vertical"
+ ]
+ }
+ },
+ "required": [
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "field": {
+ "$ref": "#/refs/field"
+ }
+ },
+ "required": [
+ "field"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "range": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ "required": [
+ "range"
+ ]
+ }
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "band"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "offset"
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ },
+ {
+ "allOf": [
+ {
+ "$ref": "#/refs/stringModifiers"
+ },
+ {
+ "anyOf": [
+ {
+ "oneOf": [
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "value": {
+ "enum": [
+ "horizontal",
+ "vertical"
+ ]
+ }
+ },
+ "required": [
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "field": {
+ "$ref": "#/refs/field"
+ }
+ },
+ "required": [
+ "field"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "range": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ "required": [
+ "range"
+ ]
+ }
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "band"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "offset"
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "orientValue": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "allOf": [
+ {
+ "$ref": "#/defs/rule"
+ },
+ {
+ "allOf": [
+ {
+ "$ref": "#/refs/stringModifiers"
+ },
+ {
+ "anyOf": [
+ {
+ "oneOf": [
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "value": {
+ "enum": [
+ "left",
+ "right",
+ "top",
+ "bottom"
+ ]
+ }
+ },
+ "required": [
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "field": {
+ "$ref": "#/refs/field"
+ }
+ },
+ "required": [
+ "field"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "range": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ "required": [
+ "range"
+ ]
+ }
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "band"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "offset"
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ },
+ {
+ "allOf": [
+ {
+ "$ref": "#/refs/stringModifiers"
+ },
+ {
+ "anyOf": [
+ {
+ "oneOf": [
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "value": {
+ "enum": [
+ "left",
+ "right",
+ "top",
+ "bottom"
+ ]
+ }
+ },
+ "required": [
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "field": {
+ "$ref": "#/refs/field"
+ }
+ },
+ "required": [
+ "field"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "range": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ "required": [
+ "range"
+ ]
+ }
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "band"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "offset"
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "strokeCapValue": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "allOf": [
+ {
+ "$ref": "#/defs/rule"
+ },
+ {
+ "allOf": [
+ {
+ "$ref": "#/refs/stringModifiers"
+ },
+ {
+ "anyOf": [
+ {
+ "oneOf": [
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "value": {
+ "enum": [
+ "butt",
+ "round",
+ "square"
+ ]
+ }
+ },
+ "required": [
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "field": {
+ "$ref": "#/refs/field"
+ }
+ },
+ "required": [
+ "field"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "range": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ "required": [
+ "range"
+ ]
+ }
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "band"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "offset"
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ },
+ {
+ "allOf": [
+ {
+ "$ref": "#/refs/stringModifiers"
+ },
+ {
+ "anyOf": [
+ {
+ "oneOf": [
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "value": {
+ "enum": [
+ "butt",
+ "round",
+ "square"
+ ]
+ }
+ },
+ "required": [
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "field": {
+ "$ref": "#/refs/field"
+ }
+ },
+ "required": [
+ "field"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "range": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ "required": [
+ "range"
+ ]
+ }
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "band"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "offset"
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "strokeJoinValue": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "allOf": [
+ {
+ "$ref": "#/defs/rule"
+ },
+ {
+ "allOf": [
+ {
+ "$ref": "#/refs/stringModifiers"
+ },
+ {
+ "anyOf": [
+ {
+ "oneOf": [
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "value": {
+ "enum": [
+ "miter",
+ "round",
+ "bevel"
+ ]
+ }
+ },
+ "required": [
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "field": {
+ "$ref": "#/refs/field"
+ }
+ },
+ "required": [
+ "field"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "range": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ "required": [
+ "range"
+ ]
+ }
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "band"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "offset"
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ },
+ {
+ "allOf": [
+ {
+ "$ref": "#/refs/stringModifiers"
+ },
+ {
+ "anyOf": [
+ {
+ "oneOf": [
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "value": {
+ "enum": [
+ "miter",
+ "round",
+ "bevel"
+ ]
+ }
+ },
+ "required": [
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "field": {
+ "$ref": "#/refs/field"
+ }
+ },
+ "required": [
+ "field"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "range": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ "required": [
+ "range"
+ ]
+ }
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "band"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "offset"
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "baseColorValue": {
+ "oneOf": [
+ {
+ "allOf": [
+ {
+ "$ref": "#/refs/stringModifiers"
+ },
+ {
+ "anyOf": [
+ {
+ "oneOf": [
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "value": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "field": {
+ "$ref": "#/refs/field"
+ }
+ },
+ "required": [
+ "field"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "range": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ "required": [
+ "range"
+ ]
+ }
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "value"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scale",
+ "band"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "offset"
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "value": {
+ "$ref": "#/refs/linearGradient"
+ }
+ },
+ "required": [
+ "value"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "value": {
+ "$ref": "#/refs/radialGradient"
+ }
+ },
+ "required": [
+ "value"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "gradient": {
+ "$ref": "#/refs/scale"
+ },
+ "start": {
+ "type": "array",
+ "items": {
+ "type": "number"
+ },
+ "minItems": 2,
+ "maxItems": 2
+ },
+ "stop": {
+ "type": "array",
+ "items": {
+ "type": "number"
+ },
+ "minItems": 2,
+ "maxItems": 2
+ },
+ "count": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "gradient"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "color": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/colorRGB"
+ },
+ {
+ "$ref": "#/refs/colorHSL"
+ },
+ {
+ "$ref": "#/refs/colorLAB"
+ },
+ {
+ "$ref": "#/refs/colorHCL"
+ }
+ ]
+ }
+ },
+ "required": [
+ "color"
+ ],
+ "additionalProperties": false
+ }
+ ]
+ },
+ "colorRGB": {
+ "type": "object",
+ "properties": {
+ "r": {
+ "$ref": "#/refs/numberValue"
+ },
+ "g": {
+ "$ref": "#/refs/numberValue"
+ },
+ "b": {
+ "$ref": "#/refs/numberValue"
+ }
+ },
+ "required": [
+ "r",
+ "g",
+ "b"
+ ]
+ },
+ "colorHSL": {
+ "type": "object",
+ "properties": {
+ "h": {
+ "$ref": "#/refs/numberValue"
+ },
+ "s": {
+ "$ref": "#/refs/numberValue"
+ },
+ "l": {
+ "$ref": "#/refs/numberValue"
+ }
+ },
+ "required": [
+ "h",
+ "s",
+ "l"
+ ]
+ },
+ "colorLAB": {
+ "type": "object",
+ "properties": {
+ "l": {
+ "$ref": "#/refs/numberValue"
+ },
+ "a": {
+ "$ref": "#/refs/numberValue"
+ },
+ "b": {
+ "$ref": "#/refs/numberValue"
+ }
+ },
+ "required": [
+ "l",
+ "a",
+ "b"
+ ]
+ },
+ "colorHCL": {
+ "type": "object",
+ "properties": {
+ "h": {
+ "$ref": "#/refs/numberValue"
+ },
+ "c": {
+ "$ref": "#/refs/numberValue"
+ },
+ "l": {
+ "$ref": "#/refs/numberValue"
+ }
+ },
+ "required": [
+ "h",
+ "c",
+ "l"
+ ]
+ },
+ "colorValue": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "allOf": [
+ {
+ "$ref": "#/defs/rule"
+ },
+ {
+ "$ref": "#/refs/baseColorValue"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/baseColorValue"
+ }
+ ]
+ },
+ "gradientStops": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "offset": {
+ "type": "number"
+ },
+ "color": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "offset",
+ "color"
+ ],
+ "additionalProperties": false
+ }
+ },
+ "linearGradient": {
+ "type": "object",
+ "properties": {
+ "gradient": {
+ "enum": [
+ "linear"
+ ]
+ },
+ "id": {
+ "type": "string"
+ },
+ "x1": {
+ "type": "number"
+ },
+ "y1": {
+ "type": "number"
+ },
+ "x2": {
+ "type": "number"
+ },
+ "y2": {
+ "type": "number"
+ },
+ "stops": {
+ "$ref": "#/refs/gradientStops"
+ }
+ },
+ "required": [
+ "gradient",
+ "stops"
+ ],
+ "additionalProperties": false
+ },
+ "radialGradient": {
+ "type": "object",
+ "properties": {
+ "gradient": {
+ "enum": [
+ "radial"
+ ]
+ },
+ "id": {
+ "type": "string"
+ },
+ "x1": {
+ "type": "number"
+ },
+ "y1": {
+ "type": "number"
+ },
+ "r1": {
+ "type": "number"
+ },
+ "x2": {
+ "type": "number"
+ },
+ "y2": {
+ "type": "number"
+ },
+ "r2": {
+ "type": "number"
+ },
+ "stops": {
+ "$ref": "#/refs/gradientStops"
+ }
+ },
+ "required": [
+ "gradient",
+ "stops"
+ ],
+ "additionalProperties": false
+ },
+ "expr": {
+ "type": "object",
+ "properties": {
+ "expr": {
+ "type": "string"
+ },
+ "as": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "expr"
+ ]
+ },
+ "exprString": {
+ "type": "string"
+ },
+ "compare": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "field": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ },
+ "order": {
+ "$ref": "#/refs/sortOrder"
+ }
+ },
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "field": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/scaleField"
+ },
+ {
+ "$ref": "#/refs/expr"
+ }
+ ]
+ }
+ },
+ "order": {
+ "type": "array",
+ "items": {
+ "$ref": "#/refs/sortOrder"
+ }
+ }
+ },
+ "additionalProperties": false
+ }
+ ]
+ },
+ "from": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
+ },
+ "facet": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "string"
+ },
+ "facet": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "data": {
+ "type": "string"
+ },
+ "field": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "name",
+ "data",
+ "field"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "data": {
+ "type": "string"
+ },
+ "groupby": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ ]
+ },
+ "aggregate": {
+ "type": "object",
+ "properties": {
+ "cross": {
+ "type": "boolean"
+ },
+ "fields": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "ops": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "as": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "additionalProperties": false
+ }
+ },
+ "required": [
+ "name",
+ "data",
+ "groupby"
+ ],
+ "additionalProperties": false
+ }
+ ]
+ }
+ },
+ "required": [
+ "facet"
+ ],
+ "additionalProperties": false
+ },
+ "markclip": {
+ "oneOf": [
+ {
+ "$ref": "#/refs/booleanOrSignal"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "path": {
+ "$ref": "#/refs/stringOrSignal"
+ }
+ },
+ "required": [
+ "path"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "sphere": {
+ "$ref": "#/refs/stringOrSignal"
+ }
+ },
+ "required": [
+ "sphere"
+ ],
+ "additionalProperties": false
+ }
+ ]
+ },
+ "style": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ ]
+ },
+ "marktype": {
+ "type": "string"
+ },
+ "scaleField": {
+ "$ref": "#/refs/stringOrSignal"
+ },
+ "sortOrder": {
+ "oneOf": [
+ {
+ "enum": [
+ "ascending",
+ "descending"
+ ]
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "scaleBins": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/refs/numberOrSignal"
+ }
+ },
+ {
+ "type": "object",
+ "properties": {
+ "step": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "start": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "stop": {
+ "$ref": "#/refs/numberOrSignal"
+ }
+ },
+ "required": [
+ "step"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "scaleInterpolate": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "$ref": "#/refs/stringOrSignal"
+ },
+ "gamma": {
+ "$ref": "#/refs/numberOrSignal"
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "additionalProperties": false
+ }
+ ]
+ },
+ "scaleData": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "string"
+ },
+ "field": {
+ "$ref": "#/refs/stringOrSignal"
+ },
+ "sort": {
+ "oneOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "field": {
+ "$ref": "#/refs/stringOrSignal"
+ },
+ "op": {
+ "$ref": "#/refs/stringOrSignal"
+ },
+ "order": {
+ "$ref": "#/refs/sortOrder"
+ }
+ },
+ "additionalProperties": false
+ }
+ ]
+ }
+ },
+ "required": [
+ "data",
+ "field"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "string"
+ },
+ "fields": {
+ "type": "array",
+ "items": {
+ "$ref": "#/refs/stringOrSignal"
+ },
+ "minItems": 1
+ },
+ "sort": {
+ "oneOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "op": {
+ "enum": [
+ "count"
+ ]
+ },
+ "order": {
+ "$ref": "#/refs/sortOrder"
+ }
+ },
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "field": {
+ "$ref": "#/refs/stringOrSignal"
+ },
+ "op": {
+ "enum": [
+ "count",
+ "min",
+ "max"
+ ]
+ },
+ "order": {
+ "$ref": "#/refs/sortOrder"
+ }
+ },
+ "required": [
+ "field",
+ "op"
+ ],
+ "additionalProperties": false
+ }
+ ]
+ }
+ },
+ "required": [
+ "data",
+ "fields"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "fields": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "string"
+ },
+ "field": {
+ "$ref": "#/refs/stringOrSignal"
+ }
+ },
+ "required": [
+ "data",
+ "field"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "minItems": 1
+ },
+ "sort": {
+ "oneOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "op": {
+ "enum": [
+ "count"
+ ]
+ },
+ "order": {
+ "$ref": "#/refs/sortOrder"
+ }
+ },
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "field": {
+ "$ref": "#/refs/stringOrSignal"
+ },
+ "op": {
+ "enum": [
+ "count",
+ "min",
+ "max"
+ ]
+ },
+ "order": {
+ "$ref": "#/refs/sortOrder"
+ }
+ },
+ "required": [
+ "field",
+ "op"
+ ],
+ "additionalProperties": false
+ }
+ ]
+ }
+ },
+ "required": [
+ "fields"
+ ],
+ "additionalProperties": false
+ }
+ ]
+ },
+ "selector": {
+ "type": "string"
+ },
+ "signal": {
+ "type": "object",
+ "properties": {
+ "signal": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "signal"
+ ]
+ },
+ "arrayOrSignal": {
+ "oneOf": [
+ {
+ "type": "array"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "booleanOrSignal": {
+ "oneOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "numberOrSignal": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "stringOrSignal": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ },
+ "textOrSignal": {
+ "oneOf": [
+ {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ ]
+ },
+ {
+ "$ref": "#/refs/signal"
+ }
+ ]
+ }
+ },
+ "type": "object",
+ "allOf": [
+ {
+ "$ref": "#/defs/scope"
+ },
+ {
+ "properties": {
+ "$schema": {
+ "type": "string",
+ "format": "uri"
+ },
+ "config": {
+ "type": "object"
+ },
+ "description": {
+ "type": "string"
+ },
+ "width": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "height": {
+ "$ref": "#/refs/numberOrSignal"
+ },
+ "padding": {
+ "$ref": "#/defs/padding"
+ },
+ "autosize": {
+ "$ref": "#/defs/autosize"
+ },
+ "background": {
+ "$ref": "#/defs/background"
+ },
+ "style": {
+ "$ref": "#/refs/style"
+ }
+ }
+ }
+ ]
+} \ No newline at end of file
diff --git a/venv/lib/python3.9/site-packages/altair/vegalite/__init__.py b/venv/lib/python3.9/site-packages/altair/vegalite/__init__.py
new file mode 100644
index 00000000..c67625df
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vegalite/__init__.py
@@ -0,0 +1,2 @@
+# flake8: noqa
+from .v4 import *
diff --git a/venv/lib/python3.9/site-packages/altair/vegalite/api.py b/venv/lib/python3.9/site-packages/altair/vegalite/api.py
new file mode 100644
index 00000000..b70e2bda
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vegalite/api.py
@@ -0,0 +1,2 @@
+# flake8: noqa
+from .v4.api import *
diff --git a/venv/lib/python3.9/site-packages/altair/vegalite/data.py b/venv/lib/python3.9/site-packages/altair/vegalite/data.py
new file mode 100644
index 00000000..30289160
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vegalite/data.py
@@ -0,0 +1,45 @@
+from toolz import curried
+from ..utils.core import sanitize_dataframe
+from ..utils.data import (
+ MaxRowsError,
+ curry,
+ limit_rows,
+ pipe,
+ sample,
+ to_csv,
+ to_json,
+ to_values,
+ check_data_type,
+)
+from ..utils.data import DataTransformerRegistry as _DataTransformerRegistry
+
+
+@curried.curry
+def default_data_transformer(data, max_rows=5000):
+ return curried.pipe(data, limit_rows(max_rows=max_rows), to_values)
+
+
+class DataTransformerRegistry(_DataTransformerRegistry):
+ def disable_max_rows(self):
+ """Disable the MaxRowsError."""
+ options = self.options
+ if self.active == "default":
+ options = options.copy()
+ options["max_rows"] = None
+ return self.enable(**options)
+
+
+__all__ = (
+ "DataTransformerRegistry",
+ "MaxRowsError",
+ "curry",
+ "sanitize_dataframe",
+ "default_data_transformer",
+ "limit_rows",
+ "pipe",
+ "sample",
+ "to_csv",
+ "to_json",
+ "to_values",
+ "check_data_type",
+)
diff --git a/venv/lib/python3.9/site-packages/altair/vegalite/display.py b/venv/lib/python3.9/site-packages/altair/vegalite/display.py
new file mode 100644
index 00000000..91c5f33e
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vegalite/display.py
@@ -0,0 +1,11 @@
+from ..utils.display import Displayable, default_renderer_base, json_renderer_base
+from ..utils.display import RendererRegistry, HTMLRenderer
+
+
+__all__ = (
+ "Displayable",
+ "default_renderer_base",
+ "json_renderer_base",
+ "RendererRegistry",
+ "HTMLRenderer",
+)
diff --git a/venv/lib/python3.9/site-packages/altair/vegalite/schema.py b/venv/lib/python3.9/site-packages/altair/vegalite/schema.py
new file mode 100644
index 00000000..fd7f3df7
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vegalite/schema.py
@@ -0,0 +1,3 @@
+"""Altair schema wrappers"""
+# flake8: noqa
+from .v4.schema import *
diff --git a/venv/lib/python3.9/site-packages/altair/vegalite/tests/__init__.py b/venv/lib/python3.9/site-packages/altair/vegalite/tests/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vegalite/tests/__init__.py
diff --git a/venv/lib/python3.9/site-packages/altair/vegalite/tests/test_common.py b/venv/lib/python3.9/site-packages/altair/vegalite/tests/test_common.py
new file mode 100644
index 00000000..49d7a18d
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vegalite/tests/test_common.py
@@ -0,0 +1,99 @@
+"""Tests of functionality that should work in all vegalite versions"""
+
+import pytest
+
+import pandas as pd
+
+from .. import v3, v4
+
+
+@pytest.fixture
+def basic_spec():
+ return {
+ "data": {"url": "data.csv"},
+ "mark": "line",
+ "encoding": {
+ "color": {"type": "nominal", "field": "color"},
+ "x": {"type": "quantitative", "field": "xval"},
+ "y": {"type": "ordinal", "field": "yval"},
+ },
+ }
+
+
+def make_final_spec(alt, basic_spec):
+ theme = alt.themes.get()
+ spec = theme()
+ spec.update(basic_spec)
+ return spec
+
+
+def make_basic_chart(alt):
+ data = pd.DataFrame(
+ {
+ "a": ["A", "B", "C", "D", "E", "F", "G", "H", "I"],
+ "b": [28, 55, 43, 91, 81, 53, 19, 87, 52],
+ }
+ )
+
+ return alt.Chart(data).mark_bar().encode(x="a", y="b")
+
+
+@pytest.mark.parametrize("alt", [v3, v4])
+def test_basic_chart_to_dict(alt, basic_spec):
+ chart = (
+ alt.Chart("data.csv")
+ .mark_line()
+ .encode(alt.X("xval:Q"), y=alt.Y("yval:O"), color="color:N")
+ )
+ dct = chart.to_dict()
+
+ # schema should be in the top level
+ assert dct.pop("$schema").startswith("http")
+
+ # remainder of spec should match the basic spec
+ assert dct == make_final_spec(alt, basic_spec)
+
+
+@pytest.mark.parametrize("alt", [v3, v4])
+def test_basic_chart_from_dict(alt, basic_spec):
+ chart = alt.Chart.from_dict(basic_spec)
+ dct = chart.to_dict()
+
+ # schema should be in the top level
+ assert dct.pop("$schema").startswith("http")
+
+ # remainder of spec should match the basic spec
+ assert dct == make_final_spec(alt, basic_spec)
+
+
+@pytest.mark.parametrize("alt", [v3, v4])
+def test_theme_enable(alt, basic_spec):
+ active_theme = alt.themes.active
+
+ try:
+ alt.themes.enable("none")
+
+ chart = alt.Chart.from_dict(basic_spec)
+ dct = chart.to_dict()
+
+ # schema should be in the top level
+ assert dct.pop("$schema").startswith("http")
+
+ # remainder of spec should match the basic spec
+ # without any theme settings
+ assert dct == basic_spec
+ finally:
+ # reset the theme to its initial value
+ alt.themes.enable(active_theme)
+
+
+@pytest.mark.parametrize("alt", [v3, v4])
+def test_max_rows(alt):
+ basic_chart = make_basic_chart(alt)
+
+ with alt.data_transformers.enable("default"):
+ basic_chart.to_dict() # this should not fail
+
+ with alt.data_transformers.enable("default", max_rows=5):
+ with pytest.raises(alt.MaxRowsError):
+ basic_chart.to_dict() # this should not fail
diff --git a/venv/lib/python3.9/site-packages/altair/vegalite/v3/__init__.py b/venv/lib/python3.9/site-packages/altair/vegalite/v3/__init__.py
new file mode 100644
index 00000000..6ba719b7
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vegalite/v3/__init__.py
@@ -0,0 +1,33 @@
+# flake8: noqa
+import warnings
+from ...utils.deprecation import AltairDeprecationWarning
+
+from .schema import *
+from .api import *
+from ._deprecated import *
+
+from ...datasets import list_datasets, load_dataset
+
+from ... import expr
+from ...expr import datum
+
+from .display import VegaLite, renderers
+
+from .data import (
+ MaxRowsError,
+ pipe,
+ curry,
+ limit_rows,
+ sample,
+ to_json,
+ to_csv,
+ to_values,
+ default_data_transformer,
+ data_transformers,
+)
+
+warnings.warn(
+ "The module altair.vegalite.v3 is deprecated and will be removed in Altair 5. "
+ "Use `import altair as alt` instead of `import altair.vegalite.v3 as alt`.",
+ AltairDeprecationWarning,
+)
diff --git a/venv/lib/python3.9/site-packages/altair/vegalite/v3/_deprecated.py b/venv/lib/python3.9/site-packages/altair/vegalite/v3/_deprecated.py
new file mode 100644
index 00000000..16a957af
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vegalite/v3/_deprecated.py
@@ -0,0 +1,19 @@
+from ...utils.deprecation import _deprecate
+from . import channels
+
+# Deprecated classes (see https://github.com/altair-viz/altair/issues/1474).
+# TODO: Remove these in Altair 3.2.
+Fillopacity = _deprecate(channels.FillOpacity, "Fillopacity")
+FillopacityValue = _deprecate(channels.FillOpacityValue, "FillopacityValue")
+Strokeopacity = _deprecate(channels.StrokeOpacity, "Strokeopacity")
+StrokeopacityValue = _deprecate(channels.StrokeOpacityValue, "StrokeopacityValue")
+Strokewidth = _deprecate(channels.StrokeWidth, "Strokewidth")
+StrokewidthValue = _deprecate(channels.StrokeWidthValue, "StrokewidthValue")
+Xerror = _deprecate(channels.XError, "Xerror")
+XerrorValue = _deprecate(channels.XErrorValue, "XerrorValue")
+Xerror2 = _deprecate(channels.XError2, "Xerror2")
+Xerror2Value = _deprecate(channels.XError2Value, "Xerror2Value")
+Yerror = _deprecate(channels.YError, "Yerror")
+YerrorValue = _deprecate(channels.YErrorValue, "YerrorValue")
+Yerror2 = _deprecate(channels.YError2, "Yerror2")
+Yerror2Value = _deprecate(channels.YError2Value, "Yerror2Value")
diff --git a/venv/lib/python3.9/site-packages/altair/vegalite/v3/api.py b/venv/lib/python3.9/site-packages/altair/vegalite/v3/api.py
new file mode 100644
index 00000000..6473d41e
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vegalite/v3/api.py
@@ -0,0 +1,2177 @@
+import warnings
+
+import hashlib
+import io
+import json
+import jsonschema
+import pandas as pd
+from toolz.curried import pipe as _pipe
+
+from .schema import core, channels, mixins, Undefined, SCHEMA_URL
+
+from .data import data_transformers
+from ... import utils, expr
+from .display import renderers, VEGALITE_VERSION, VEGAEMBED_VERSION, VEGA_VERSION
+from .theme import themes
+
+
+# ------------------------------------------------------------------------
+# Data Utilities
+def _dataset_name(values):
+ """Generate a unique hash of the data
+
+ Parameters
+ ----------
+ values : list or dict
+ A list/dict representation of data values.
+
+ Returns
+ -------
+ name : string
+ A unique name generated from the hash of the values.
+ """
+ if isinstance(values, core.InlineDataset):
+ values = values.to_dict()
+ values_json = json.dumps(values, sort_keys=True)
+ hsh = hashlib.md5(values_json.encode()).hexdigest()
+ return "data-" + hsh
+
+
+def _consolidate_data(data, context):
+ """If data is specified inline, then move it to context['datasets']
+
+ This function will modify context in-place, and return a new version of data
+ """
+ values = Undefined
+ kwds = {}
+
+ if isinstance(data, core.InlineData):
+ if data.name is Undefined and data.values is not Undefined:
+ values = data.values
+ kwds = {"format": data.format}
+
+ elif isinstance(data, dict):
+ if "name" not in data and "values" in data:
+ values = data["values"]
+ kwds = {k: v for k, v in data.items() if k != "values"}
+
+ if values is not Undefined:
+ name = _dataset_name(values)
+ data = core.NamedData(name=name, **kwds)
+ context.setdefault("datasets", {})[name] = values
+
+ return data
+
+
+def _prepare_data(data, context=None):
+ """Convert input data to data for use within schema
+
+ Parameters
+ ----------
+ data :
+ The input dataset in the form of a DataFrame, dictionary, altair data
+ object, or other type that is recognized by the data transformers.
+ context : dict (optional)
+ The to_dict context in which the data is being prepared. This is used
+ to keep track of information that needs to be passed up and down the
+ recursive serialization routine, such as global named datasets.
+ """
+ if data is Undefined:
+ return data
+
+ # convert dataframes or objects with __geo_interface__ to dict
+ if isinstance(data, pd.DataFrame) or hasattr(data, "__geo_interface__"):
+ data = _pipe(data, data_transformers.get())
+
+ # convert string input to a URLData
+ if isinstance(data, str):
+ data = core.UrlData(data)
+
+ # consolidate inline data to top-level datasets
+ if context is not None and data_transformers.consolidate_datasets:
+ data = _consolidate_data(data, context)
+
+ # if data is still not a recognized type, then return
+ if not isinstance(data, (dict, core.Data)):
+ warnings.warn("data of type {} not recognized".format(type(data)))
+
+ return data
+
+
+# ------------------------------------------------------------------------
+# Aliases & specializations
+Bin = core.BinParams
+
+
+@utils.use_signature(core.LookupData)
+class LookupData(core.LookupData):
+ def to_dict(self, *args, **kwargs):
+ """Convert the chart to a dictionary suitable for JSON export"""
+ copy = self.copy(deep=False)
+ copy.data = _prepare_data(copy.data, kwargs.get("context"))
+ return super(LookupData, copy).to_dict(*args, **kwargs)
+
+
+@utils.use_signature(core.FacetMapping)
+class FacetMapping(core.FacetMapping):
+ _class_is_valid_at_instantiation = False
+
+ def to_dict(self, *args, **kwargs):
+ copy = self.copy(deep=False)
+ context = kwargs.get("context", {})
+ data = context.get("data", None)
+ if isinstance(self.row, str):
+ copy.row = core.FacetFieldDef(**utils.parse_shorthand(self.row, data))
+ if isinstance(self.column, str):
+ copy.column = core.FacetFieldDef(**utils.parse_shorthand(self.column, data))
+ return super(FacetMapping, copy).to_dict(*args, **kwargs)
+
+
+# ------------------------------------------------------------------------
+# Encoding will contain channel objects that aren't valid at instantiation
+core.FacetedEncoding._class_is_valid_at_instantiation = False
+
+# ------------------------------------------------------------------------
+# These are parameters that are valid at the top level, but are not valid
+# for specs that are within a composite chart
+# (layer, hconcat, vconcat, facet, repeat)
+TOPLEVEL_ONLY_KEYS = {"background", "config", "autosize", "padding", "$schema"}
+
+
+def _get_channels_mapping():
+ mapping = {}
+ for attr in dir(channels):
+ cls = getattr(channels, attr)
+ if isinstance(cls, type) and issubclass(cls, core.SchemaBase):
+ mapping[cls] = attr.replace("Value", "").lower()
+ return mapping
+
+
+# -------------------------------------------------------------------------
+# Tools for working with selections
+class Selection(object):
+ """A Selection object"""
+
+ _counter = 0
+
+ @classmethod
+ def _get_name(cls):
+ cls._counter += 1
+ return "selector{:03d}".format(cls._counter)
+
+ def __init__(self, name, selection):
+ if name is None:
+ name = self._get_name()
+ self.name = name
+ self.selection = selection
+
+ def __repr__(self):
+ return "Selection({0!r}, {1})".format(self.name, self.selection)
+
+ def ref(self):
+ return self.to_dict()
+
+ def to_dict(self):
+ return {
+ "selection": self.name.to_dict()
+ if hasattr(self.name, "to_dict")
+ else self.name
+ }
+
+ def __invert__(self):
+ return Selection(core.SelectionNot(**{"not": self.name}), self.selection)
+
+ def __and__(self, other):
+ if isinstance(other, Selection):
+ other = other.name
+ return Selection(
+ core.SelectionAnd(**{"and": [self.name, other]}), self.selection
+ )
+
+ def __or__(self, other):
+ if isinstance(other, Selection):
+ other = other.name
+ return Selection(core.SelectionOr(**{"or": [self.name, other]}), self.selection)
+
+ def __getattr__(self, field_name):
+ if field_name.startswith("__") and field_name.endswith("__"):
+ raise AttributeError(field_name)
+ return expr.core.GetAttrExpression(self.name, field_name)
+
+ def __getitem__(self, field_name):
+ return expr.core.GetItemExpression(self.name, field_name)
+
+
+# ------------------------------------------------------------------------
+# Top-Level Functions
+
+
+def value(value, **kwargs):
+ """Specify a value for use in an encoding"""
+ return dict(value=value, **kwargs)
+
+
+def selection(name=None, type=Undefined, **kwds):
+ """Create a named selection.
+
+ Parameters
+ ----------
+ name : string (optional)
+ The name of the selection. If not specified, a unique name will be
+ created.
+ type : string
+ The type of the selection: one of ["interval", "single", or "multi"]
+ **kwds :
+ additional keywords will be used to construct a SelectionDef instance
+ that controls the selection.
+
+ Returns
+ -------
+ selection: Selection
+ The selection object that can be used in chart creation.
+ """
+ return Selection(name, core.SelectionDef(type=type, **kwds))
+
+
+@utils.use_signature(core.IntervalSelection)
+def selection_interval(**kwargs):
+ """Create a selection with type='interval'"""
+ return selection(type="interval", **kwargs)
+
+
+@utils.use_signature(core.MultiSelection)
+def selection_multi(**kwargs):
+ """Create a selection with type='multi'"""
+ return selection(type="multi", **kwargs)
+
+
+@utils.use_signature(core.SingleSelection)
+def selection_single(**kwargs):
+ """Create a selection with type='single'"""
+ return selection(type="single", **kwargs)
+
+
+@utils.use_signature(core.Binding)
+def binding(input, **kwargs):
+ """A generic binding"""
+ return core.Binding(input=input, **kwargs)
+
+
+@utils.use_signature(core.BindCheckbox)
+def binding_checkbox(**kwargs):
+ """A checkbox binding"""
+ return core.BindCheckbox(input="checkbox", **kwargs)
+
+
+@utils.use_signature(core.BindRadioSelect)
+def binding_radio(**kwargs):
+ """A radio button binding"""
+ return core.BindRadioSelect(input="radio", **kwargs)
+
+
+@utils.use_signature(core.BindRadioSelect)
+def binding_select(**kwargs):
+ """A select binding"""
+ return core.BindRadioSelect(input="select", **kwargs)
+
+
+@utils.use_signature(core.BindRange)
+def binding_range(**kwargs):
+ """A range binding"""
+ return core.BindRange(input="range", **kwargs)
+
+
+def condition(predicate, if_true, if_false, **kwargs):
+ """A conditional attribute or encoding
+
+ Parameters
+ ----------
+ predicate: Selection, LogicalOperandPredicate, expr.Expression, dict, or string
+ the selection predicate or test predicate for the condition.
+ if a string is passed, it will be treated as a test operand.
+ if_true:
+ the spec or object to use if the selection predicate is true
+ if_false:
+ the spec or object to use if the selection predicate is false
+ **kwargs:
+ additional keyword args are added to the resulting dict
+
+ Returns
+ -------
+ spec: dict or VegaLiteSchema
+ the spec that describes the condition
+ """
+ test_predicates = (str, expr.Expression, core.LogicalOperandPredicate)
+
+ if isinstance(predicate, Selection):
+ condition = {"selection": predicate.name}
+ elif isinstance(predicate, core.SelectionOperand):
+ condition = {"selection": predicate}
+ elif isinstance(predicate, test_predicates):
+ condition = {"test": predicate}
+ elif isinstance(predicate, dict):
+ condition = predicate
+ else:
+ raise NotImplementedError(
+ "condition predicate of type {}" "".format(type(predicate))
+ )
+
+ if isinstance(if_true, core.SchemaBase):
+ # convert to dict for now; the from_dict call below will wrap this
+ # dict in the appropriate schema
+ if_true = if_true.to_dict()
+ elif isinstance(if_true, str):
+ if_true = {"shorthand": if_true}
+ if_true.update(kwargs)
+ condition.update(if_true)
+
+ if isinstance(if_false, core.SchemaBase):
+ # For the selection, the channel definitions all allow selections
+ # already. So use this SchemaBase wrapper if possible.
+ selection = if_false.copy()
+ selection.condition = condition
+ elif isinstance(if_false, str):
+ selection = {"condition": condition, "shorthand": if_false}
+ selection.update(kwargs)
+ else:
+ selection = dict(condition=condition, **if_false)
+
+ return selection
+
+
+# --------------------------------------------------------------------
+# Top-level objects
+
+
+class TopLevelMixin(mixins.ConfigMethodMixin):
+ """Mixin for top-level chart objects such as Chart, LayeredChart, etc."""
+
+ _class_is_valid_at_instantiation = False
+
+ def to_dict(self, *args, **kwargs):
+ """Convert the chart to a dictionary suitable for JSON export"""
+ # We make use of three context markers:
+ # - 'data' points to the data that should be referenced for column type
+ # inference.
+ # - 'top_level' is a boolean flag that is assumed to be true; if it's
+ # true then a "$schema" arg is added to the dict.
+ # - 'datasets' is a dict of named datasets that should be inserted
+ # in the top-level object
+
+ # note: not a deep copy because we want datasets and data arguments to
+ # be passed by reference
+ context = kwargs.get("context", {}).copy()
+ context.setdefault("datasets", {})
+ is_top_level = context.get("top_level", True)
+
+ copy = self.copy(deep=False)
+ original_data = getattr(copy, "data", Undefined)
+ copy.data = _prepare_data(original_data, context)
+
+ if original_data is not Undefined:
+ context["data"] = original_data
+
+ # remaining to_dict calls are not at top level
+ context["top_level"] = False
+ kwargs["context"] = context
+
+ try:
+ dct = super(TopLevelMixin, copy).to_dict(*args, **kwargs)
+ except jsonschema.ValidationError:
+ dct = None
+
+ # If we hit an error, then re-convert with validate='deep' to get
+ # a more useful traceback. We don't do this by default because it's
+ # much slower in the case that there are no errors.
+ if dct is None:
+ kwargs["validate"] = "deep"
+ dct = super(TopLevelMixin, copy).to_dict(*args, **kwargs)
+
+ # TODO: following entries are added after validation. Should they be validated?
+ if is_top_level:
+ # since this is top-level we add $schema if it's missing
+ if "$schema" not in dct:
+ dct["$schema"] = SCHEMA_URL
+
+ # apply theme from theme registry
+ the_theme = themes.get()
+ dct = utils.update_nested(the_theme(), dct, copy=True)
+
+ # update datasets
+ if context["datasets"]:
+ dct.setdefault("datasets", {}).update(context["datasets"])
+
+ return dct
+
+ def to_html(
+ self,
+ base_url="https://cdn.jsdelivr.net/npm/",
+ output_div="vis",
+ embed_options=None,
+ json_kwds=None,
+ fullhtml=True,
+ requirejs=False,
+ ):
+ return utils.spec_to_html(
+ self.to_dict(),
+ mode="vega-lite",
+ vegalite_version=VEGALITE_VERSION,
+ vegaembed_version=VEGAEMBED_VERSION,
+ vega_version=VEGA_VERSION,
+ base_url=base_url,
+ output_div=output_div,
+ embed_options=embed_options,
+ json_kwds=json_kwds,
+ fullhtml=fullhtml,
+ requirejs=requirejs,
+ )
+
+ @utils.deprecation.deprecated(
+ "Chart.savechart is deprecated in favor of Chart.save"
+ )
+ def savechart(self, fp, format=None, **kwargs):
+ """Save a chart to file in a variety of formats
+
+ Supported formats are json, html, png, svg
+
+ Parameters
+ ----------
+ fp : string filename or file-like object
+ file in which to write the chart.
+ format : string (optional)
+ the format to write: one of ['json', 'html', 'png', 'svg'].
+ If not specified, the format will be determined from the filename.
+ **kwargs :
+ Additional keyword arguments are passed to the output method
+ associated with the specified format.
+
+ """
+ return self.save(fp, format=None, **kwargs)
+
+ def save(
+ self,
+ fp,
+ format=None,
+ override_data_transformer=True,
+ scale_factor=1.0,
+ vegalite_version=VEGALITE_VERSION,
+ vega_version=VEGA_VERSION,
+ vegaembed_version=VEGAEMBED_VERSION,
+ **kwargs,
+ ):
+ """Save a chart to file in a variety of formats
+
+ Supported formats are json, html, png, svg, pdf; the last three require
+ the altair_saver package to be installed.
+
+ Parameters
+ ----------
+ fp : string filename or file-like object
+ file in which to write the chart.
+ format : string (optional)
+ the format to write: one of ['json', 'html', 'png', 'svg'].
+ If not specified, the format will be determined from the filename.
+ override_data_transformer : boolean (optional)
+ If True (default), then the save action will be done with
+ the MaxRowsError disabled. If False, then do not change the data
+ transformer.
+ scale_factor : float
+ For svg or png formats, scale the image by this factor when saving.
+ This can be used to control the size or resolution of the output.
+ Default is 1.0
+ **kwargs :
+ Additional keyword arguments are passed to the output method
+ associated with the specified format.
+
+ """
+ from ...utils.save import save
+
+ kwds = dict(
+ chart=self,
+ fp=fp,
+ format=format,
+ scale_factor=scale_factor,
+ vegalite_version=vegalite_version,
+ vega_version=vega_version,
+ vegaembed_version=vegaembed_version,
+ **kwargs,
+ )
+
+ # By default we override the data transformer. This makes it so
+ # that save() will succeed even for large datasets that would
+ # normally trigger a MaxRowsError
+ if override_data_transformer:
+ with data_transformers.disable_max_rows():
+ result = save(**kwds)
+ else:
+ result = save(**kwds)
+ return result
+
+ # Fallback for when rendering fails; the full repr is too long to be
+ # useful in nearly all cases.
+ def __repr__(self):
+ return "alt.{}(...)".format(self.__class__.__name__)
+
+ # Layering and stacking
+ def __add__(self, other):
+ if not isinstance(other, TopLevelMixin):
+ raise ValueError("Only Chart objects can be layered.")
+ return layer(self, other)
+
+ def __and__(self, other):
+ if not isinstance(other, TopLevelMixin):
+ raise ValueError("Only Chart objects can be concatenated.")
+ return vconcat(self, other)
+
+ def __or__(self, other):
+ if not isinstance(other, TopLevelMixin):
+ raise ValueError("Only Chart objects can be concatenated.")
+ return hconcat(self, other)
+
+ def repeat(
+ self,
+ repeat=Undefined,
+ row=Undefined,
+ column=Undefined,
+ columns=Undefined,
+ **kwargs,
+ ):
+ """Return a RepeatChart built from the chart
+
+ Fields within the chart can be set to correspond to the row or
+ column using `alt.repeat('row')` and `alt.repeat('column')`.
+
+ Parameters
+ ----------
+ repeat : list
+ a list of data column names to be repeated. This cannot be
+ used along with the ``row`` or ``column`` argument.
+ row : list
+ a list of data column names to be mapped to the row facet
+ column : list
+ a list of data column names to be mapped to the column facet
+ columns : int
+ the maximum number of columns before wrapping. Only referenced
+ if ``repeat`` is specified.
+ **kwargs :
+ additional keywords passed to RepeatChart.
+
+ Returns
+ -------
+ chart : RepeatChart
+ a repeated chart.
+ """
+ repeat_specified = repeat is not Undefined
+ rowcol_specified = row is not Undefined or column is not Undefined
+
+ if repeat_specified and rowcol_specified:
+ raise ValueError(
+ "repeat argument cannot be combined with row/column argument."
+ )
+
+ if repeat_specified:
+ repeat = repeat
+ else:
+ repeat = core.RepeatMapping(row=row, column=column)
+
+ return RepeatChart(spec=self, repeat=repeat, columns=columns, **kwargs)
+
+ def properties(self, **kwargs):
+ """Set top-level properties of the Chart.
+
+ Argument names and types are the same as class initialization.
+ """
+ copy = self.copy(deep=False)
+ for key, val in kwargs.items():
+ if key == "selection" and isinstance(val, Selection):
+ # For backward compatibility with old selection interface.
+ setattr(copy, key, {val.name: val.selection})
+ else:
+ # Don't validate data, because it hasn't been processed.
+ if key != "data":
+ self.validate_property(key, val)
+ setattr(copy, key, val)
+ return copy
+
+ def project(
+ self,
+ type="mercator",
+ center=Undefined,
+ clipAngle=Undefined,
+ clipExtent=Undefined,
+ coefficient=Undefined,
+ distance=Undefined,
+ fraction=Undefined,
+ lobes=Undefined,
+ parallel=Undefined,
+ precision=Undefined,
+ radius=Undefined,
+ ratio=Undefined,
+ reflectX=Undefined,
+ reflectY=Undefined,
+ rotate=Undefined,
+ scale=Undefined,
+ spacing=Undefined,
+ tilt=Undefined,
+ translate=Undefined,
+ **kwds,
+ ):
+ """Add a geographic projection to the chart.
+
+ This is generally used either with ``mark_geoshape`` or with the
+ ``latitude``/``longitude`` encodings.
+
+ Available projection types are
+ ['albers', 'albersUsa', 'azimuthalEqualArea', 'azimuthalEquidistant',
+ 'conicConformal', 'conicEqualArea', 'conicEquidistant', 'equalEarth', 'equirectangular',
+ 'gnomonic', 'identity', 'mercator', 'orthographic', 'stereographic', 'transverseMercator']
+
+ Attributes
+ ----------
+ type : ProjectionType
+ The cartographic projection to use. This value is case-insensitive, for example
+ `"albers"` and `"Albers"` indicate the same projection type. You can find all valid
+ projection types [in the
+ documentation](https://vega.github.io/vega-lite/docs/projection.html#projection-types).
+
+ **Default value:** `mercator`
+ center : List(float)
+ Sets the projection’s center to the specified center, a two-element array of
+ longitude and latitude in degrees.
+
+ **Default value:** `[0, 0]`
+ clipAngle : float
+ Sets the projection’s clipping circle radius to the specified angle in degrees. If
+ `null`, switches to [antimeridian](http://bl.ocks.org/mbostock/3788999) cutting
+ rather than small-circle clipping.
+ clipExtent : List(List(float))
+ Sets the projection’s viewport clip extent to the specified bounds in pixels. The
+ extent bounds are specified as an array `[[x0, y0], [x1, y1]]`, where `x0` is the
+ left-side of the viewport, `y0` is the top, `x1` is the right and `y1` is the
+ bottom. If `null`, no viewport clipping is performed.
+ coefficient : float
+
+ distance : float
+
+ fraction : float
+
+ lobes : float
+
+ parallel : float
+
+ precision : Mapping(required=[length])
+ Sets the threshold for the projection’s [adaptive
+ resampling](http://bl.ocks.org/mbostock/3795544) to the specified value in pixels.
+ This value corresponds to the [Douglas–Peucker
+ distance](http://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm).
+ If precision is not specified, returns the projection’s current resampling
+ precision which defaults to `√0.5 ≅ 0.70710…`.
+ radius : float
+
+ ratio : float
+
+ reflectX : boolean
+
+ reflectY : boolean
+
+ rotate : List(float)
+ Sets the projection’s three-axis rotation to the specified angles, which must be a
+ two- or three-element array of numbers [`lambda`, `phi`, `gamma`] specifying the
+ rotation angles in degrees about each spherical axis. (These correspond to yaw,
+ pitch and roll.)
+
+ **Default value:** `[0, 0, 0]`
+ scale : float
+ Sets the projection's scale (zoom) value, overriding automatic fitting.
+
+ spacing : float
+
+ tilt : float
+
+ translate : List(float)
+ Sets the projection's translation (pan) value, overriding automatic fitting.
+
+ """
+ projection = core.Projection(
+ center=center,
+ clipAngle=clipAngle,
+ clipExtent=clipExtent,
+ coefficient=coefficient,
+ distance=distance,
+ fraction=fraction,
+ lobes=lobes,
+ parallel=parallel,
+ precision=precision,
+ radius=radius,
+ ratio=ratio,
+ reflectX=reflectX,
+ reflectY=reflectY,
+ rotate=rotate,
+ scale=scale,
+ spacing=spacing,
+ tilt=tilt,
+ translate=translate,
+ type=type,
+ **kwds,
+ )
+ return self.properties(projection=projection)
+
+ def _add_transform(self, *transforms):
+ """Copy the chart and add specified transforms to chart.transform"""
+ copy = self.copy(deep=["transform"])
+ if copy.transform is Undefined:
+ copy.transform = []
+ copy.transform.extend(transforms)
+ return copy
+
+ def transform_aggregate(self, aggregate=Undefined, groupby=Undefined, **kwds):
+ """
+ Add an AggregateTransform to the schema.
+
+ Parameters
+ ----------
+ aggregate : List(:class:`AggregatedFieldDef`)
+ Array of objects that define fields to aggregate.
+ groupby : List(string)
+ The data fields to group by. If not specified, a single group containing all data
+ objects will be used.
+ **kwds :
+ additional keywords are converted to aggregates using standard
+ shorthand parsing.
+
+ Returns
+ -------
+ self : Chart object
+ returns chart to allow for chaining
+
+ Examples
+ --------
+ The aggregate transform allows you to specify transforms directly using
+ the same shorthand syntax as used in encodings:
+
+ >>> import altair as alt
+ >>> chart1 = alt.Chart().transform_aggregate(
+ ... mean_acc='mean(Acceleration)',
+ ... groupby=['Origin']
+ ... )
+ >>> print(chart1.transform[0].to_json()) # doctest: +NORMALIZE_WHITESPACE
+ {
+ "aggregate": [
+ {
+ "as": "mean_acc",
+ "field": "Acceleration",
+ "op": "mean"
+ }
+ ],
+ "groupby": [
+ "Origin"
+ ]
+ }
+
+ It also supports including AggregatedFieldDef instances or dicts directly,
+ so you can create the above transform like this:
+
+ >>> chart2 = alt.Chart().transform_aggregate(
+ ... [alt.AggregatedFieldDef(field='Acceleration', op='mean',
+ ... **{'as': 'mean_acc'})],
+ ... groupby=['Origin']
+ ... )
+ >>> chart2.transform == chart1.transform
+ True
+
+ See Also
+ --------
+ alt.AggregateTransform : underlying transform object
+
+ """
+ if aggregate is Undefined:
+ aggregate = []
+ for key, val in kwds.items():
+ parsed = utils.parse_shorthand(val)
+ dct = {
+ "as": key,
+ "field": parsed.get("field", Undefined),
+ "op": parsed.get("aggregate", Undefined),
+ }
+ aggregate.append(core.AggregatedFieldDef(**dct))
+ return self._add_transform(
+ core.AggregateTransform(aggregate=aggregate, groupby=groupby)
+ )
+
+ def transform_bin(self, as_=Undefined, field=Undefined, bin=True, **kwargs):
+ """
+ Add a BinTransform to the schema.
+
+ Parameters
+ ----------
+ as_ : anyOf(string, List(string))
+ The output fields at which to write the start and end bin values.
+ bin : anyOf(boolean, :class:`BinParams`)
+ An object indicating bin properties, or simply ``true`` for using default bin
+ parameters.
+ field : string
+ The data field to bin.
+
+ Returns
+ -------
+ self : Chart object
+ returns chart to allow for chaining
+
+ Examples
+ --------
+ >>> import altair as alt
+ >>> chart = alt.Chart().transform_bin("x_binned", "x")
+ >>> chart.transform[0]
+ BinTransform({
+ as: 'x_binned',
+ bin: True,
+ field: 'x'
+ })
+
+ >>> chart = alt.Chart().transform_bin("x_binned", "x",
+ ... bin=alt.Bin(maxbins=10))
+ >>> chart.transform[0]
+ BinTransform({
+ as: 'x_binned',
+ bin: BinParams({
+ maxbins: 10
+ }),
+ field: 'x'
+ })
+
+ See Also
+ --------
+ alt.BinTransform : underlying transform object
+
+ """
+ if as_ is not Undefined:
+ if "as" in kwargs:
+ raise ValueError(
+ "transform_bin: both 'as_' and 'as' passed as arguments."
+ )
+ kwargs["as"] = as_
+ kwargs["bin"] = bin
+ kwargs["field"] = field
+ return self._add_transform(core.BinTransform(**kwargs))
+
+ def transform_calculate(self, as_=Undefined, calculate=Undefined, **kwargs):
+ """
+ Add a CalculateTransform to the schema.
+
+ Parameters
+ ----------
+ as_ : string
+ The field for storing the computed formula value.
+ calculate : string or alt.expr expression
+ A `expression <https://vega.github.io/vega-lite/docs/types.html#expression>`__
+ string. Use the variable ``datum`` to refer to the current data object.
+ **kwargs
+ transforms can also be passed by keyword argument; see Examples
+
+ Returns
+ -------
+ self : Chart object
+ returns chart to allow for chaining
+
+ Examples
+ --------
+ >>> import altair as alt
+ >>> from altair import datum, expr
+
+ >>> chart = alt.Chart().transform_calculate(y = 2 * expr.sin(datum.x))
+ >>> chart.transform[0]
+ CalculateTransform({
+ as: 'y',
+ calculate: (2 * sin(datum.x))
+ })
+
+ It's also possible to pass the ``CalculateTransform`` arguments directly:
+
+ >>> kwds = {'as': 'y', 'calculate': '2 * sin(datum.x)'}
+ >>> chart = alt.Chart().transform_calculate(**kwds)
+ >>> chart.transform[0]
+ CalculateTransform({
+ as: 'y',
+ calculate: '2 * sin(datum.x)'
+ })
+
+ As the first form is easier to write and understand, that is the
+ recommended method.
+
+ See Also
+ --------
+ alt.CalculateTransform : underlying transform object
+ """
+ if as_ is Undefined:
+ as_ = kwargs.pop("as", Undefined)
+ else:
+ if "as" in kwargs:
+ raise ValueError(
+ "transform_calculate: both 'as_' and 'as' passed as arguments."
+ )
+ if as_ is not Undefined or calculate is not Undefined:
+ dct = {"as": as_, "calculate": calculate}
+ self = self._add_transform(core.CalculateTransform(**dct))
+ for as_, calculate in kwargs.items():
+ dct = {"as": as_, "calculate": calculate}
+ self = self._add_transform(core.CalculateTransform(**dct))
+ return self
+
+ def transform_impute(
+ self,
+ impute,
+ key,
+ frame=Undefined,
+ groupby=Undefined,
+ keyvals=Undefined,
+ method=Undefined,
+ value=Undefined,
+ ):
+ """
+ Add an ImputeTransform to the schema.
+
+ Parameters
+ ----------
+ impute : string
+ The data field for which the missing values should be imputed.
+ key : string
+ A key field that uniquely identifies data objects within a group.
+ Missing key values (those occurring in the data but not in the current group) will
+ be imputed.
+ frame : List(anyOf(None, float))
+ A frame specification as a two-element array used to control the window over which
+ the specified method is applied. The array entries should either be a number
+ indicating the offset from the current data object, or null to indicate unbounded
+ rows preceding or following the current data object. For example, the value ``[-5,
+ 5]`` indicates that the window should include five objects preceding and five
+ objects following the current object.
+ **Default value:** : ``[null, null]`` indicating that the window includes all
+ objects.
+ groupby : List(string)
+ An optional array of fields by which to group the values.
+ Imputation will then be performed on a per-group basis.
+ keyvals : anyOf(List(Mapping(required=[])), :class:`ImputeSequence`)
+ Defines the key values that should be considered for imputation.
+ An array of key values or an object defining a `number sequence
+ <https://vega.github.io/vega-lite/docs/impute.html#sequence-def>`__.
+ If provided, this will be used in addition to the key values observed within the
+ input data. If not provided, the values will be derived from all unique values of
+ the ``key`` field. For ``impute`` in ``encoding``, the key field is the x-field if
+ the y-field is imputed, or vice versa.
+ If there is no impute grouping, this property *must* be specified.
+ method : :class:`ImputeMethod`
+ The imputation method to use for the field value of imputed data objects.
+ One of ``value``, ``mean``, ``median``, ``max`` or ``min``.
+ **Default value:** ``"value"``
+ value : Mapping(required=[])
+ The field value to use when the imputation ``method`` is ``"value"``.
+
+ Returns
+ -------
+ self : Chart object
+ returns chart to allow for chaining
+
+ See Also
+ --------
+ alt.ImputeTransform : underlying transform object
+ """
+ return self._add_transform(
+ core.ImputeTransform(
+ impute=impute,
+ key=key,
+ frame=frame,
+ groupby=groupby,
+ keyvals=keyvals,
+ method=method,
+ value=value,
+ )
+ )
+
+ def transform_joinaggregate(
+ self, joinaggregate=Undefined, groupby=Undefined, **kwargs
+ ):
+ """
+ Add a JoinAggregateTransform to the schema.
+
+ Parameters
+ ----------
+ joinaggregate : List(:class:`JoinAggregateFieldDef`)
+ The definition of the fields in the join aggregate, and what calculations to use.
+ groupby : List(string)
+ The data fields for partitioning the data objects into separate groups. If
+ unspecified, all data points will be in a single group.
+ **kwargs
+ joinaggregates can also be passed by keyword argument; see Examples.
+
+ Returns
+ -------
+ self : Chart object
+ returns chart to allow for chaining
+
+ Examples
+ --------
+ >>> import altair as alt
+ >>> chart = alt.Chart().transform_joinaggregate(x='sum(y)')
+ >>> chart.transform[0]
+ JoinAggregateTransform({
+ joinaggregate: [JoinAggregateFieldDef({
+ as: 'x',
+ field: 'y',
+ op: 'sum'
+ })]
+ })
+
+ See Also
+ --------
+ alt.JoinAggregateTransform : underlying transform object
+ """
+ if joinaggregate is Undefined:
+ joinaggregate = []
+ for key, val in kwargs.items():
+ parsed = utils.parse_shorthand(val)
+ dct = {
+ "as": key,
+ "field": parsed.get("field", Undefined),
+ "op": parsed.get("aggregate", Undefined),
+ }
+ joinaggregate.append(core.JoinAggregateFieldDef(**dct))
+ return self._add_transform(
+ core.JoinAggregateTransform(joinaggregate=joinaggregate, groupby=groupby)
+ )
+
+ def transform_filter(self, filter, **kwargs):
+ """
+ Add a FilterTransform to the schema.
+
+ Parameters
+ ----------
+ filter : a filter expression or :class:`LogicalOperandPredicate`
+ The `filter` property must be one of the predicate definitions:
+ (1) a string or alt.expr expression
+ (2) a range predicate
+ (3) a selection predicate
+ (4) a logical operand combining (1)-(3)
+ (5) a Selection object
+
+ Returns
+ -------
+ self : Chart object
+ returns chart to allow for chaining
+
+ See Also
+ --------
+ alt.FilterTransform : underlying transform object
+
+ """
+ if isinstance(filter, Selection):
+ filter = {"selection": filter.name}
+ elif isinstance(filter, core.SelectionOperand):
+ filter = {"selection": filter}
+ return self._add_transform(core.FilterTransform(filter=filter, **kwargs))
+
+ def transform_flatten(self, flatten, as_=Undefined):
+ """Add a FlattenTransform to the schema.
+
+ Parameters
+ ----------
+ flatten : List(string)
+ An array of one or more data fields containing arrays to flatten.
+ If multiple fields are specified, their array values should have a parallel
+ structure, ideally with the same length.
+ If the lengths of parallel arrays do not match,
+ the longest array will be used with ``null`` values added for missing entries.
+ as : List(string)
+ The output field names for extracted array values.
+ **Default value:** The field name of the corresponding array field
+
+ Returns
+ -------
+ self : Chart object
+ returns chart to allow for chaining
+
+ See Also
+ --------
+ alt.FlattenTransform : underlying transform object
+ """
+ return self._add_transform(
+ core.FlattenTransform(flatten=flatten, **{"as": as_})
+ )
+
+ def transform_fold(self, fold, as_=Undefined):
+ """Add a FoldTransform to the schema.
+
+ Parameters
+ ----------
+ fold : List(string)
+ An array of data fields indicating the properties to fold.
+ as : [string, string]
+ The output field names for the key and value properties produced by the fold
+ transform. Default: ``["key", "value"]``
+
+ Returns
+ -------
+ self : Chart object
+ returns chart to allow for chaining
+
+ See Also
+ --------
+ alt.FoldTransform : underlying transform object
+ """
+ return self._add_transform(core.FoldTransform(fold=fold, **{"as": as_}))
+
+ def transform_lookup(
+ self,
+ as_=Undefined,
+ from_=Undefined,
+ lookup=Undefined,
+ default=Undefined,
+ **kwargs,
+ ):
+ """Add a LookupTransform to the schema
+
+ Attributes
+ ----------
+ as_ : anyOf(string, List(string))
+ The field or fields for storing the computed formula value.
+ If ``from.fields`` is specified, the transform will use the same names for ``as``.
+ If ``from.fields`` is not specified, ``as`` has to be a string and we put the whole
+ object into the data under the specified name.
+ from_ : :class:`LookupData`
+ Secondary data reference.
+ lookup : string
+ Key in primary data source.
+ default : string
+ The default value to use if lookup fails. **Default value:** ``null``
+
+ Returns
+ -------
+ self : Chart object
+ returns chart to allow for chaining
+
+ See Also
+ --------
+ alt.LookupTransform : underlying transform object
+ """
+ if as_ is not Undefined:
+ if "as" in kwargs:
+ raise ValueError(
+ "transform_lookup: both 'as_' and 'as' passed as arguments."
+ )
+ kwargs["as"] = as_
+ if from_ is not Undefined:
+ if "from" in kwargs:
+ raise ValueError(
+ "transform_lookup: both 'from_' and 'from' passed as arguments."
+ )
+ kwargs["from"] = from_
+ kwargs["lookup"] = lookup
+ kwargs["default"] = default
+ return self._add_transform(core.LookupTransform(**kwargs))
+
+ def transform_sample(self, sample=1000):
+ """
+ Add a SampleTransform to the schema.
+
+ Parameters
+ ----------
+ sample : float
+ The maximum number of data objects to include in the sample. Default: 1000.
+
+ Returns
+ -------
+ self : Chart object
+ returns chart to allow for chaining
+
+ See Also
+ --------
+ alt.SampleTransform : underlying transform object
+ """
+ return self._add_transform(core.SampleTransform(sample))
+
+ def transform_stack(self, as_, stack, groupby, offset=Undefined, sort=Undefined):
+ """
+ Add a StackTransform to the schema.
+
+ Parameters
+ ----------
+ as_ : anyOf(string, List(string))
+ Output field names. This can be either a string or an array of strings with
+ two elements denoting the name for the fields for stack start and stack end
+ respectively.
+ If a single string(eg."val") is provided, the end field will be "val_end".
+ stack : string
+ The field which is stacked.
+ groupby : List(string)
+ The data fields to group by.
+ offset : enum('zero', 'center', 'normalize')
+ Mode for stacking marks. Default: 'zero'.
+ sort : List(:class:`SortField`)
+ Field that determines the order of leaves in the stacked charts.
+
+ Returns
+ -------
+ self : Chart object
+ returns chart to allow for chaining
+
+ See Also
+ --------
+ alt.StackTransform : underlying transform object
+ """
+ return self._add_transform(
+ core.StackTransform(
+ stack=stack, groupby=groupby, offset=offset, sort=sort, **{"as": as_}
+ )
+ )
+
+ def transform_timeunit(
+ self, as_=Undefined, field=Undefined, timeUnit=Undefined, **kwargs
+ ):
+ """
+ Add a TimeUnitTransform to the schema.
+
+ Parameters
+ ----------
+ as_ : string
+ The output field to write the timeUnit value.
+ field : string
+ The data field to apply time unit.
+ timeUnit : :class:`TimeUnit`
+ The timeUnit.
+ **kwargs
+ transforms can also be passed by keyword argument; see Examples
+
+ Returns
+ -------
+ self : Chart object
+ returns chart to allow for chaining
+
+ Examples
+ --------
+ >>> import altair as alt
+ >>> from altair import datum, expr
+
+ >>> chart = alt.Chart().transform_timeunit(month='month(date)')
+ >>> chart.transform[0]
+ TimeUnitTransform({
+ as: 'month',
+ field: 'date',
+ timeUnit: 'month'
+ })
+
+ It's also possible to pass the ``TimeUnitTransform`` arguments directly;
+ this is most useful in cases where the desired field name is not a
+ valid python identifier:
+
+ >>> kwds = {'as': 'month', 'timeUnit': 'month', 'field': 'The Month'}
+ >>> chart = alt.Chart().transform_timeunit(**kwds)
+ >>> chart.transform[0]
+ TimeUnitTransform({
+ as: 'month',
+ field: 'The Month',
+ timeUnit: 'month'
+ })
+
+ As the first form is easier to write and understand, that is the
+ recommended method.
+
+ See Also
+ --------
+ alt.TimeUnitTransform : underlying transform object
+
+ """
+ if as_ is Undefined:
+ as_ = kwargs.pop("as", Undefined)
+ else:
+ if "as" in kwargs:
+ raise ValueError(
+ "transform_timeunit: both 'as_' and 'as' passed as arguments."
+ )
+ if as_ is not Undefined:
+ dct = {"as": as_, "timeUnit": timeUnit, "field": field}
+ self = self._add_transform(core.TimeUnitTransform(**dct))
+ for as_, shorthand in kwargs.items():
+ dct = utils.parse_shorthand(
+ shorthand,
+ parse_timeunits=True,
+ parse_aggregates=False,
+ parse_types=False,
+ )
+ dct.pop("type", None)
+ dct["as"] = as_
+ if "timeUnit" not in dct:
+ raise ValueError("'{}' must include a valid timeUnit".format(shorthand))
+ self = self._add_transform(core.TimeUnitTransform(**dct))
+ return self
+
+ def transform_window(
+ self,
+ window=Undefined,
+ frame=Undefined,
+ groupby=Undefined,
+ ignorePeers=Undefined,
+ sort=Undefined,
+ **kwargs,
+ ):
+ """Add a WindowTransform to the schema
+
+ Parameters
+ ----------
+ window : List(:class:`WindowFieldDef`)
+ The definition of the fields in the window, and what calculations to use.
+ frame : List(anyOf(None, float))
+ A frame specification as a two-element array indicating how the sliding window
+ should proceed. The array entries should either be a number indicating the offset
+ from the current data object, or null to indicate unbounded rows preceding or
+ following the current data object. The default value is ``[null, 0]``, indicating
+ that the sliding window includes the current object and all preceding objects. The
+ value ``[-5, 5]`` indicates that the window should include five objects preceding
+ and five objects following the current object. Finally, ``[null, null]`` indicates
+ that the window frame should always include all data objects. The only operators
+ affected are the aggregation operations and the ``first_value``, ``last_value``, and
+ ``nth_value`` window operations. The other window operations are not affected by
+ this.
+
+ **Default value:** : ``[null, 0]`` (includes the current object and all preceding
+ objects)
+ groupby : List(string)
+ The data fields for partitioning the data objects into separate windows. If
+ unspecified, all data points will be in a single group.
+ ignorePeers : boolean
+ Indicates if the sliding window frame should ignore peer values. (Peer values are
+ those considered identical by the sort criteria). The default is false, causing the
+ window frame to expand to include all peer values. If set to true, the window frame
+ will be defined by offset values only. This setting only affects those operations
+ that depend on the window frame, namely aggregation operations and the first_value,
+ last_value, and nth_value window operations.
+
+ **Default value:** ``false``
+ sort : List(:class:`SortField`)
+ A sort field definition for sorting data objects within a window. If two data
+ objects are considered equal by the comparator, they are considered “peer” values of
+ equal rank. If sort is not specified, the order is undefined: data objects are
+ processed in the order they are observed and none are considered peers (the
+ ignorePeers parameter is ignored and treated as if set to ``true`` ).
+ **kwargs
+ transforms can also be passed by keyword argument; see Examples
+
+ Examples
+ --------
+ A cumulative line chart
+
+ >>> import altair as alt
+ >>> import numpy as np
+ >>> import pandas as pd
+ >>> data = pd.DataFrame({'x': np.arange(100),
+ ... 'y': np.random.randn(100)})
+ >>> chart = alt.Chart(data).mark_line().encode(
+ ... x='x:Q',
+ ... y='ycuml:Q'
+ ... ).transform_window(
+ ... ycuml='sum(y)'
+ ... )
+ >>> chart.transform[0]
+ WindowTransform({
+ window: [WindowFieldDef({
+ as: 'ycuml',
+ field: 'y',
+ op: 'sum'
+ })]
+ })
+
+ """
+ if kwargs:
+ if window is Undefined:
+ window = []
+ for as_, shorthand in kwargs.items():
+ kwds = {"as": as_}
+ kwds.update(
+ utils.parse_shorthand(
+ shorthand,
+ parse_aggregates=False,
+ parse_window_ops=True,
+ parse_timeunits=False,
+ parse_types=False,
+ )
+ )
+ window.append(core.WindowFieldDef(**kwds))
+
+ return self._add_transform(
+ core.WindowTransform(
+ window=window,
+ frame=frame,
+ groupby=groupby,
+ ignorePeers=ignorePeers,
+ sort=sort,
+ )
+ )
+
+ # Display-related methods
+
+ def _repr_mimebundle_(self, include=None, exclude=None):
+ """Return a MIME bundle for display in Jupyter frontends."""
+ # Catch errors explicitly to get around issues in Jupyter frontend
+ # see https://github.com/ipython/ipython/issues/11038
+ try:
+ dct = self.to_dict()
+ except Exception:
+ utils.display_traceback(in_ipython=True)
+ return {}
+ else:
+ return renderers.get()(dct)
+
+ def display(self, renderer=Undefined, theme=Undefined, actions=Undefined, **kwargs):
+ """Display chart in Jupyter notebook or JupyterLab
+
+ Parameters are passed as options to vega-embed within supported frontends.
+ See https://github.com/vega/vega-embed#options for details.
+
+ Parameters
+ ----------
+ renderer : string ('canvas' or 'svg')
+ The renderer to use
+ theme : string
+ The Vega theme name to use; see https://github.com/vega/vega-themes
+ actions : bool or dict
+ Specify whether action links ("Open In Vega Editor", etc.) are
+ included in the view.
+ **kwargs :
+ Additional parameters are also passed to vega-embed as options.
+
+ """
+ from IPython.display import display
+
+ if renderer is not Undefined:
+ kwargs["renderer"] = renderer
+ if theme is not Undefined:
+ kwargs["theme"] = theme
+ if actions is not Undefined:
+ kwargs["actions"] = actions
+
+ if kwargs:
+ options = renderers.options.copy()
+ options["embed_options"] = options.get("embed_options", {}).copy()
+ options["embed_options"].update(kwargs)
+ with renderers.enable(**options):
+ display(self)
+ else:
+ display(self)
+
+ def serve(
+ self,
+ ip="127.0.0.1",
+ port=8888,
+ n_retries=50,
+ files=None,
+ jupyter_warning=True,
+ open_browser=True,
+ http_server=None,
+ **kwargs,
+ ):
+ """Open a browser window and display a rendering of the chart
+
+ Parameters
+ ----------
+ html : string
+ HTML to serve
+ ip : string (default = '127.0.0.1')
+ ip address at which the HTML will be served.
+ port : int (default = 8888)
+ the port at which to serve the HTML
+ n_retries : int (default = 50)
+ the number of nearby ports to search if the specified port
+ is already in use.
+ files : dictionary (optional)
+ dictionary of extra content to serve
+ jupyter_warning : bool (optional)
+ if True (default), then print a warning if this is used
+ within the Jupyter notebook
+ open_browser : bool (optional)
+ if True (default), then open a web browser to the given HTML
+ http_server : class (optional)
+ optionally specify an HTTPServer class to use for showing the
+ figure. The default is Python's basic HTTPServer.
+ **kwargs :
+ additional keyword arguments passed to the save() method
+
+ """
+ from ...utils.server import serve
+
+ html = io.StringIO()
+ self.save(html, format="html", **kwargs)
+ html.seek(0)
+
+ serve(
+ html.read(),
+ ip=ip,
+ port=port,
+ n_retries=n_retries,
+ files=files,
+ jupyter_warning=jupyter_warning,
+ open_browser=open_browser,
+ http_server=http_server,
+ )
+
+ @utils.use_signature(core.Resolve)
+ def _set_resolve(self, **kwargs):
+ """Copy the chart and update the resolve property with kwargs"""
+ if not hasattr(self, "resolve"):
+ raise ValueError(
+ "{} object has no attribute " "'resolve'".format(self.__class__)
+ )
+ copy = self.copy(deep=["resolve"])
+ if copy.resolve is Undefined:
+ copy.resolve = core.Resolve()
+ for key, val in kwargs.items():
+ copy.resolve[key] = val
+ return copy
+
+ @utils.use_signature(core.AxisResolveMap)
+ def resolve_axis(self, *args, **kwargs):
+ return self._set_resolve(axis=core.AxisResolveMap(*args, **kwargs))
+
+ @utils.use_signature(core.LegendResolveMap)
+ def resolve_legend(self, *args, **kwargs):
+ return self._set_resolve(legend=core.LegendResolveMap(*args, **kwargs))
+
+ @utils.use_signature(core.ScaleResolveMap)
+ def resolve_scale(self, *args, **kwargs):
+ return self._set_resolve(scale=core.ScaleResolveMap(*args, **kwargs))
+
+
+class _EncodingMixin(object):
+ @utils.use_signature(core.FacetedEncoding)
+ def encode(self, *args, **kwargs):
+ # Convert args to kwargs based on their types.
+ kwargs = utils.infer_encoding_types(args, kwargs, channels)
+
+ # get a copy of the dict representation of the previous encoding
+ copy = self.copy(deep=["encoding"])
+ encoding = copy._get("encoding", {})
+ if isinstance(encoding, core.VegaLiteSchema):
+ encoding = {k: v for k, v in encoding._kwds.items() if v is not Undefined}
+
+ # update with the new encodings, and apply them to the copy
+ encoding.update(kwargs)
+ copy.encoding = core.FacetedEncoding(**encoding)
+ return copy
+
+ def facet(
+ self,
+ facet=Undefined,
+ row=Undefined,
+ column=Undefined,
+ data=Undefined,
+ columns=Undefined,
+ **kwargs,
+ ):
+ """Create a facet chart from the current chart.
+
+ Faceted charts require data to be specified at the top level; if data
+ is not specified, the data from the current chart will be used at the
+ top level.
+
+ Parameters
+ ----------
+ facet : string or alt.Facet (optional)
+ The data column to use as an encoding for a wrapped facet.
+ If specified, then neither row nor column may be specified.
+ column : string or alt.Column (optional)
+ The data column to use as an encoding for a column facet.
+ May be combined with row argument, but not with facet argument.
+ row : string or alt.Column (optional)
+ The data column to use as an encoding for a row facet.
+ May be combined with column argument, but not with facet argument.
+ data : string or dataframe (optional)
+ The dataset to use for faceting. If not supplied, then data must
+ be specified in the top-level chart that calls this method.
+ columns : integer
+ the maximum number of columns for a wrapped facet.
+
+ Returns
+ -------
+ self :
+ for chaining
+ """
+ facet_specified = facet is not Undefined
+ rowcol_specified = row is not Undefined or column is not Undefined
+
+ if facet_specified and rowcol_specified:
+ raise ValueError(
+ "facet argument cannot be combined with row/column argument."
+ )
+
+ if data is Undefined:
+ if self.data is Undefined:
+ raise ValueError(
+ "Facet charts require data to be specified at the top level."
+ )
+ self = self.copy(deep=False)
+ data, self.data = self.data, Undefined
+
+ if facet_specified:
+ if isinstance(facet, str):
+ facet = channels.Facet(facet)
+ else:
+ facet = FacetMapping(row=row, column=column)
+
+ return FacetChart(spec=self, facet=facet, data=data, columns=columns, **kwargs)
+
+
+class Chart(
+ TopLevelMixin, _EncodingMixin, mixins.MarkMethodMixin, core.TopLevelUnitSpec
+):
+ """Create a basic Altair/Vega-Lite chart.
+
+ Although it is possible to set all Chart properties as constructor attributes,
+ it is more idiomatic to use methods such as ``mark_point()``, ``encode()``,
+ ``transform_filter()``, ``properties()``, etc. See Altair's documentation
+ for details and examples: http://altair-viz.github.io/.
+
+ Attributes
+ ----------
+ data : Data
+ An object describing the data source
+ mark : AnyMark
+ A string describing the mark type (one of `"bar"`, `"circle"`, `"square"`, `"tick"`,
+ `"line"`, * `"area"`, `"point"`, `"rule"`, `"geoshape"`, and `"text"`) or a
+ MarkDef object.
+ encoding : FacetedEncoding
+ A key-value mapping between encoding channels and definition of fields.
+ autosize : anyOf(AutosizeType, AutoSizeParams)
+ Sets how the visualization size should be determined. If a string, should be one of
+ `"pad"`, `"fit"` or `"none"`. Object values can additionally specify parameters for
+ content sizing and automatic resizing. `"fit"` is only supported for single and
+ layered views that don't use `rangeStep`. __Default value__: `pad`
+ background : string
+ CSS color property to use as the background of visualization.
+
+ **Default value:** none (transparent)
+ config : Config
+ Vega-Lite configuration object. This property can only be defined at the top-level
+ of a specification.
+ description : string
+ Description of this mark for commenting purpose.
+ height : float
+ The height of a visualization.
+ name : string
+ Name of the visualization for later reference.
+ padding : Padding
+ The default visualization padding, in pixels, from the edge of the visualization
+ canvas to the data rectangle. If a number, specifies padding for all sides. If an
+ object, the value should have the format `{"left": 5, "top": 5, "right": 5,
+ "bottom": 5}` to specify padding for each side of the visualization. __Default
+ value__: `5`
+ projection : Projection
+ An object defining properties of geographic projection. Works with `"geoshape"`
+ marks and `"point"` or `"line"` marks that have a channel (one or more of `"X"`,
+ `"X2"`, `"Y"`, `"Y2"`) with type `"latitude"`, or `"longitude"`.
+ selection : Mapping(required=[])
+ A key-value mapping between selection names and definitions.
+ title : anyOf(string, TitleParams)
+ Title for the plot.
+ transform : List(Transform)
+ An array of data transformations such as filter and new field calculation.
+ width : float
+ The width of a visualization.
+ """
+
+ def __init__(
+ self,
+ data=Undefined,
+ encoding=Undefined,
+ mark=Undefined,
+ width=Undefined,
+ height=Undefined,
+ **kwargs,
+ ):
+ super(Chart, self).__init__(
+ data=data,
+ encoding=encoding,
+ mark=mark,
+ width=width,
+ height=height,
+ **kwargs,
+ )
+
+ @classmethod
+ def from_dict(cls, dct, validate=True):
+ """Construct class from a dictionary representation
+
+ Parameters
+ ----------
+ dct : dictionary
+ The dict from which to construct the class
+ validate : boolean
+ If True (default), then validate the input against the schema.
+
+ Returns
+ -------
+ obj : Chart object
+ The wrapped schema
+
+ Raises
+ ------
+ jsonschema.ValidationError :
+ if validate=True and dct does not conform to the schema
+ """
+ for class_ in TopLevelMixin.__subclasses__():
+ if class_ is Chart:
+ class_ = super(Chart, cls)
+ try:
+ return class_.from_dict(dct, validate=validate)
+ except jsonschema.ValidationError:
+ pass
+
+ # As a last resort, try using the Root vegalite object
+ return core.Root.from_dict(dct, validate)
+
+ def add_selection(self, *selections):
+ """Add one or more selections to the chart."""
+ if not selections:
+ return self
+ copy = self.copy(deep=["selection"])
+ if copy.selection is Undefined:
+ copy.selection = {}
+
+ for s in selections:
+ copy.selection[s.name] = s.selection
+ return copy
+
+ def interactive(self, name=None, bind_x=True, bind_y=True):
+ """Make chart axes scales interactive
+
+ Parameters
+ ----------
+ name : string
+ The selection name to use for the axes scales. This name should be
+ unique among all selections within the chart.
+ bind_x : boolean, default True
+ If true, then bind the interactive scales to the x-axis
+ bind_y : boolean, default True
+ If true, then bind the interactive scales to the y-axis
+
+ Returns
+ -------
+ chart :
+ copy of self, with interactive axes added
+
+ """
+ encodings = []
+ if bind_x:
+ encodings.append("x")
+ if bind_y:
+ encodings.append("y")
+ return self.add_selection(
+ selection_interval(bind="scales", encodings=encodings)
+ )
+
+
+def _check_if_valid_subspec(spec, classname):
+ """Check if the spec is a valid sub-spec.
+
+ If it is not, then raise a ValueError
+ """
+ err = (
+ 'Objects with "{0}" attribute cannot be used within {1}. '
+ "Consider defining the {0} attribute in the {1} object instead."
+ )
+
+ if not isinstance(spec, (core.SchemaBase, dict)):
+ raise ValueError("Only chart objects can be used in {0}.".format(classname))
+ for attr in TOPLEVEL_ONLY_KEYS:
+ if isinstance(spec, core.SchemaBase):
+ val = getattr(spec, attr, Undefined)
+ else:
+ val = spec.get(attr, Undefined)
+ if val is not Undefined:
+ raise ValueError(err.format(attr, classname))
+
+
+def _check_if_can_be_layered(spec):
+ """Check if the spec can be layered."""
+
+ def _get(spec, attr):
+ if isinstance(spec, core.SchemaBase):
+ return spec._get(attr)
+ else:
+ return spec.get(attr, Undefined)
+
+ encoding = _get(spec, "encoding")
+ if encoding is not Undefined:
+ for channel in ["row", "column", "facet"]:
+ if _get(encoding, channel) is not Undefined:
+ raise ValueError("Faceted charts cannot be layered.")
+ if isinstance(spec, (Chart, LayerChart)):
+ return
+
+ if not isinstance(spec, (core.SchemaBase, dict)):
+ raise ValueError("Only chart objects can be layered.")
+ if _get(spec, "facet") is not Undefined:
+ raise ValueError("Faceted charts cannot be layered.")
+ if isinstance(spec, FacetChart) or _get(spec, "facet") is not Undefined:
+ raise ValueError("Faceted charts cannot be layered.")
+ if isinstance(spec, RepeatChart) or _get(spec, "repeat") is not Undefined:
+ raise ValueError("Repeat charts cannot be layered.")
+ if isinstance(spec, ConcatChart) or _get(spec, "concat") is not Undefined:
+ raise ValueError("Concatenated charts cannot be layered.")
+ if isinstance(spec, HConcatChart) or _get(spec, "hconcat") is not Undefined:
+ raise ValueError("Concatenated charts cannot be layered.")
+ if isinstance(spec, VConcatChart) or _get(spec, "vconcat") is not Undefined:
+ raise ValueError("Concatenated charts cannot be layered.")
+
+
+@utils.use_signature(core.TopLevelRepeatSpec)
+class RepeatChart(TopLevelMixin, core.TopLevelRepeatSpec):
+ """A chart repeated across rows and columns with small changes"""
+
+ def __init__(self, data=Undefined, spec=Undefined, repeat=Undefined, **kwargs):
+ _check_if_valid_subspec(spec, "RepeatChart")
+ super(RepeatChart, self).__init__(data=data, spec=spec, repeat=repeat, **kwargs)
+
+ def interactive(self, name=None, bind_x=True, bind_y=True):
+ """Make chart axes scales interactive
+
+ Parameters
+ ----------
+ name : string
+ The selection name to use for the axes scales. This name should be
+ unique among all selections within the chart.
+ bind_x : boolean, default True
+ If true, then bind the interactive scales to the x-axis
+ bind_y : boolean, default True
+ If true, then bind the interactive scales to the y-axis
+
+ Returns
+ -------
+ chart :
+ copy of self, with interactive axes added
+
+ """
+ copy = self.copy(deep=False)
+ copy.spec = copy.spec.interactive(name=name, bind_x=bind_x, bind_y=bind_y)
+ return copy
+
+ def add_selection(self, *selections):
+ """Add one or more selections to the chart."""
+ if not selections or self.spec is Undefined:
+ return self
+ copy = self.copy()
+ copy.spec = copy.spec.add_selection(*selections)
+ return copy
+
+
+def repeat(repeater="repeat"):
+ """Tie a channel to the row or column within a repeated chart
+
+ The output of this should be passed to the ``field`` attribute of
+ a channel.
+
+ Parameters
+ ----------
+ repeater : {'row'|'column'|'repeat'}
+ The repeater to tie the field to. Default is 'repeat'.
+
+ Returns
+ -------
+ repeat : RepeatRef object
+ """
+ if repeater not in ["row", "column", "repeat"]:
+ raise ValueError("repeater must be one of ['row', 'column', 'repeat']")
+ return core.RepeatRef(repeat=repeater)
+
+
+@utils.use_signature(core.TopLevelConcatSpec)
+class ConcatChart(TopLevelMixin, core.TopLevelConcatSpec):
+ """A chart with horizontally-concatenated facets"""
+
+ def __init__(self, data=Undefined, concat=(), columns=Undefined, **kwargs):
+ # TODO: move common data to top level?
+ for spec in concat:
+ _check_if_valid_subspec(spec, "ConcatChart")
+ super(ConcatChart, self).__init__(
+ data=data, concat=list(concat), columns=columns, **kwargs
+ )
+ self.data, self.concat = _combine_subchart_data(self.data, self.concat)
+
+ def __ior__(self, other):
+ _check_if_valid_subspec(other, "ConcatChart")
+ self.concat.append(other)
+ self.data, self.concat = _combine_subchart_data(self.data, self.concat)
+ return self
+
+ def __or__(self, other):
+ copy = self.copy(deep=["concat"])
+ copy |= other
+ return copy
+
+ def add_selection(self, *selections):
+ """Add one or more selections to all subcharts."""
+ if not selections or not self.concat:
+ return self
+ copy = self.copy()
+ copy.concat = [chart.add_selection(*selections) for chart in copy.concat]
+ return copy
+
+
+def concat(*charts, **kwargs):
+ """Concatenate charts horizontally"""
+ return ConcatChart(concat=charts, **kwargs)
+
+
+@utils.use_signature(core.TopLevelHConcatSpec)
+class HConcatChart(TopLevelMixin, core.TopLevelHConcatSpec):
+ """A chart with horizontally-concatenated facets"""
+
+ def __init__(self, data=Undefined, hconcat=(), **kwargs):
+ # TODO: move common data to top level?
+ for spec in hconcat:
+ _check_if_valid_subspec(spec, "HConcatChart")
+ super(HConcatChart, self).__init__(data=data, hconcat=list(hconcat), **kwargs)
+ self.data, self.hconcat = _combine_subchart_data(self.data, self.hconcat)
+
+ def __ior__(self, other):
+ _check_if_valid_subspec(other, "HConcatChart")
+ self.hconcat.append(other)
+ self.data, self.hconcat = _combine_subchart_data(self.data, self.hconcat)
+ return self
+
+ def __or__(self, other):
+ copy = self.copy(deep=["hconcat"])
+ copy |= other
+ return copy
+
+ def add_selection(self, *selections):
+ """Add one or more selections to all subcharts."""
+ if not selections or not self.hconcat:
+ return self
+ copy = self.copy()
+ copy.hconcat = [chart.add_selection(*selections) for chart in copy.hconcat]
+ return copy
+
+
+def hconcat(*charts, **kwargs):
+ """Concatenate charts horizontally"""
+ return HConcatChart(hconcat=charts, **kwargs)
+
+
+@utils.use_signature(core.TopLevelVConcatSpec)
+class VConcatChart(TopLevelMixin, core.TopLevelVConcatSpec):
+ """A chart with vertically-concatenated facets"""
+
+ def __init__(self, data=Undefined, vconcat=(), **kwargs):
+ # TODO: move common data to top level?
+ for spec in vconcat:
+ _check_if_valid_subspec(spec, "VConcatChart")
+ super(VConcatChart, self).__init__(data=data, vconcat=list(vconcat), **kwargs)
+ self.data, self.vconcat = _combine_subchart_data(self.data, self.vconcat)
+
+ def __iand__(self, other):
+ _check_if_valid_subspec(other, "VConcatChart")
+ self.vconcat.append(other)
+ self.data, self.vconcat = _combine_subchart_data(self.data, self.vconcat)
+ return self
+
+ def __and__(self, other):
+ copy = self.copy(deep=["vconcat"])
+ copy &= other
+ return copy
+
+ def add_selection(self, *selections):
+ """Add one or more selections to all subcharts."""
+ if not selections or not self.vconcat:
+ return self
+ copy = self.copy()
+ copy.vconcat = [chart.add_selection(*selections) for chart in copy.vconcat]
+ return copy
+
+
+def vconcat(*charts, **kwargs):
+ """Concatenate charts vertically"""
+ return VConcatChart(vconcat=charts, **kwargs)
+
+
+@utils.use_signature(core.TopLevelLayerSpec)
+class LayerChart(TopLevelMixin, _EncodingMixin, core.TopLevelLayerSpec):
+ """A Chart with layers within a single panel"""
+
+ def __init__(self, data=Undefined, layer=(), **kwargs):
+ # TODO: move common data to top level?
+ # TODO: check for conflicting interaction
+ for spec in layer:
+ _check_if_valid_subspec(spec, "LayerChart")
+ _check_if_can_be_layered(spec)
+ super(LayerChart, self).__init__(data=data, layer=list(layer), **kwargs)
+ self.data, self.layer = _combine_subchart_data(self.data, self.layer)
+
+ def __iadd__(self, other):
+ _check_if_valid_subspec(other, "LayerChart")
+ _check_if_can_be_layered(other)
+ self.layer.append(other)
+ self.data, self.layer = _combine_subchart_data(self.data, self.layer)
+ return self
+
+ def __add__(self, other):
+ copy = self.copy(deep=["layer"])
+ copy += other
+ return copy
+
+ def add_layers(self, *layers):
+ copy = self.copy(deep=["layer"])
+ for layer in layers:
+ copy += layer
+ return copy
+
+ def interactive(self, name=None, bind_x=True, bind_y=True):
+ """Make chart axes scales interactive
+
+ Parameters
+ ----------
+ name : string
+ The selection name to use for the axes scales. This name should be
+ unique among all selections within the chart.
+ bind_x : boolean, default True
+ If true, then bind the interactive scales to the x-axis
+ bind_y : boolean, default True
+ If true, then bind the interactive scales to the y-axis
+
+ Returns
+ -------
+ chart :
+ copy of self, with interactive axes added
+
+ """
+ if not self.layer:
+ raise ValueError(
+ "LayerChart: cannot call interactive() until a " "layer is defined"
+ )
+ copy = self.copy(deep=["layer"])
+ copy.layer[0] = copy.layer[0].interactive(
+ name=name, bind_x=bind_x, bind_y=bind_y
+ )
+ return copy
+
+ def add_selection(self, *selections):
+ """Add one or more selections to all subcharts."""
+ if not selections or not self.layer:
+ return self
+ copy = self.copy()
+ copy.layer[0] = copy.layer[0].add_selection(*selections)
+ return copy
+
+
+def layer(*charts, **kwargs):
+ """layer multiple charts"""
+ return LayerChart(layer=charts, **kwargs)
+
+
+@utils.use_signature(core.TopLevelFacetSpec)
+class FacetChart(TopLevelMixin, core.TopLevelFacetSpec):
+ """A Chart with layers within a single panel"""
+
+ def __init__(self, data=Undefined, spec=Undefined, facet=Undefined, **kwargs):
+ _check_if_valid_subspec(spec, "FacetChart")
+ super(FacetChart, self).__init__(data=data, spec=spec, facet=facet, **kwargs)
+
+ def interactive(self, name=None, bind_x=True, bind_y=True):
+ """Make chart axes scales interactive
+
+ Parameters
+ ----------
+ name : string
+ The selection name to use for the axes scales. This name should be
+ unique among all selections within the chart.
+ bind_x : boolean, default True
+ If true, then bind the interactive scales to the x-axis
+ bind_y : boolean, default True
+ If true, then bind the interactive scales to the y-axis
+
+ Returns
+ -------
+ chart :
+ copy of self, with interactive axes added
+
+ """
+ copy = self.copy(deep=False)
+ copy.spec = copy.spec.interactive(name=name, bind_x=bind_x, bind_y=bind_y)
+ return copy
+
+ def add_selection(self, *selections):
+ """Add one or more selections to the chart."""
+ if not selections or self.spec is Undefined:
+ return self
+ copy = self.copy()
+ copy.spec = copy.spec.add_selection(*selections)
+ return copy
+
+
+def topo_feature(url, feature, **kwargs):
+ """A convenience function for extracting features from a topojson url
+
+ Parameters
+ ----------
+ url : string
+ An URL from which to load the data set.
+
+ feature : string
+ The name of the TopoJSON object set to convert to a GeoJSON feature collection. For
+ example, in a map of the world, there may be an object set named `"countries"`.
+ Using the feature property, we can extract this set and generate a GeoJSON feature
+ object for each country.
+
+ **kwargs :
+ additional keywords passed to TopoDataFormat
+ """
+ return core.UrlData(
+ url=url, format=core.TopoDataFormat(type="topojson", feature=feature, **kwargs)
+ )
+
+
+def _combine_subchart_data(data, subcharts):
+ def remove_data(subchart):
+ if subchart.data is not Undefined:
+ subchart = subchart.copy()
+ subchart.data = Undefined
+ return subchart
+
+ if not subcharts:
+ # No subcharts = nothing to do.
+ pass
+ elif data is Undefined:
+ # Top level has no data; all subchart data must
+ # be identical to proceed.
+ subdata = subcharts[0].data
+ if subdata is not Undefined and all(c.data is subdata for c in subcharts):
+ data = subdata
+ subcharts = [remove_data(c) for c in subcharts]
+ else:
+ # Top level has data; subchart data must be either
+ # undefined or identical to proceed.
+ if all(c.data is Undefined or c.data is data for c in subcharts):
+ subcharts = [remove_data(c) for c in subcharts]
+
+ return data, subcharts
+
+
+@utils.use_signature(core.SequenceParams)
+def sequence(start, stop=None, step=Undefined, as_=Undefined, **kwds):
+ """Sequence generator."""
+ if stop is None:
+ start, stop = 0, start
+ params = core.SequenceParams(start=start, stop=stop, step=step, **{"as": as_})
+ return core.SequenceGenerator(sequence=params, **kwds)
+
+
+@utils.use_signature(core.GraticuleParams)
+def graticule(**kwds):
+ """Graticule generator."""
+ if not kwds:
+ # graticule: True indicates default parameters
+ graticule = True
+ else:
+ graticule = core.GraticuleParams(**kwds)
+ return core.GraticuleGenerator(graticule=graticule)
+
+
+def sphere():
+ """Sphere generator."""
+ return core.SphereGenerator(sphere=True)
diff --git a/venv/lib/python3.9/site-packages/altair/vegalite/v3/data.py b/venv/lib/python3.9/site-packages/altair/vegalite/v3/data.py
new file mode 100644
index 00000000..dcc8a0e7
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vegalite/v3/data.py
@@ -0,0 +1,43 @@
+from ..data import (
+ MaxRowsError,
+ curry,
+ default_data_transformer,
+ limit_rows,
+ pipe,
+ sample,
+ to_csv,
+ to_json,
+ to_values,
+ DataTransformerRegistry,
+)
+
+
+# ==============================================================================
+# VegaLite 3 data transformers
+# ==============================================================================
+
+
+ENTRY_POINT_GROUP = "altair.vegalite.v3.data_transformer" # type: str
+
+
+data_transformers = DataTransformerRegistry(
+ entry_point_group=ENTRY_POINT_GROUP
+) # type: DataTransformerRegistry
+data_transformers.register("default", default_data_transformer)
+data_transformers.register("json", to_json)
+data_transformers.register("csv", to_csv)
+data_transformers.enable("default")
+
+
+__all__ = (
+ "MaxRowsError",
+ "curry",
+ "default_data_transformer",
+ "limit_rows",
+ "pipe",
+ "sample",
+ "to_csv",
+ "to_json",
+ "to_values",
+ "data_transformers",
+)
diff --git a/venv/lib/python3.9/site-packages/altair/vegalite/v3/display.py b/venv/lib/python3.9/site-packages/altair/vegalite/v3/display.py
new file mode 100644
index 00000000..8d9f050b
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vegalite/v3/display.py
@@ -0,0 +1,151 @@
+import os
+
+from ...utils.mimebundle import spec_to_mimebundle
+from ...utils.deprecation import deprecated
+from ..display import Displayable
+from ..display import default_renderer_base
+from ..display import json_renderer_base
+from ..display import RendererRegistry
+from ..display import HTMLRenderer
+
+from .schema import SCHEMA_VERSION
+
+VEGALITE_VERSION = SCHEMA_VERSION.lstrip("v")
+VEGA_VERSION = "5"
+VEGAEMBED_VERSION = "5"
+
+
+# ==============================================================================
+# VegaLite v3 renderer logic
+# ==============================================================================
+
+
+# The MIME type for Vega-Lite 3.x releases.
+VEGALITE_MIME_TYPE = "application/vnd.vegalite.v3+json" # type: str
+
+# The entry point group that can be used by other packages to declare other
+# renderers that will be auto-detected. Explicit registration is also
+# allowed by the PluginRegistery API.
+ENTRY_POINT_GROUP = "altair.vegalite.v3.renderer" # type: str
+
+# The display message when rendering fails
+DEFAULT_DISPLAY = """\
+<VegaLite 3 object>
+
+If you see this message, it means the renderer has not been properly enabled
+for the frontend that you are using. For more information, see
+https://altair-viz.github.io/user_guide/troubleshooting.html
+"""
+
+renderers = RendererRegistry(entry_point_group=ENTRY_POINT_GROUP)
+
+here = os.path.dirname(os.path.realpath(__file__))
+
+
+def default_renderer(spec, **metadata):
+ return default_renderer_base(spec, VEGALITE_MIME_TYPE, DEFAULT_DISPLAY, **metadata)
+
+
+def json_renderer(spec, **metadata):
+ return json_renderer_base(spec, DEFAULT_DISPLAY, **metadata)
+
+
+def png_renderer(spec, **metadata):
+ return spec_to_mimebundle(
+ spec,
+ format="png",
+ mode="vega-lite",
+ vega_version=VEGA_VERSION,
+ vegaembed_version=VEGAEMBED_VERSION,
+ vegalite_version=VEGALITE_VERSION,
+ **metadata,
+ )
+
+
+def svg_renderer(spec, **metadata):
+ return spec_to_mimebundle(
+ spec,
+ format="svg",
+ mode="vega-lite",
+ vega_version=VEGA_VERSION,
+ vegaembed_version=VEGAEMBED_VERSION,
+ vegalite_version=VEGALITE_VERSION,
+ **metadata,
+ )
+
+
+colab_renderer = HTMLRenderer(
+ mode="vega-lite",
+ fullhtml=True,
+ requirejs=False,
+ output_div="altair-viz",
+ vega_version=VEGA_VERSION,
+ vegaembed_version=VEGAEMBED_VERSION,
+ vegalite_version=VEGALITE_VERSION,
+)
+
+zeppelin_renderer = HTMLRenderer(
+ mode="vega-lite",
+ fullhtml=True,
+ requirejs=False,
+ vega_version=VEGA_VERSION,
+ vegaembed_version=VEGAEMBED_VERSION,
+ vegalite_version=VEGALITE_VERSION,
+)
+
+kaggle_renderer = HTMLRenderer(
+ mode="vega-lite",
+ fullhtml=False,
+ requirejs=True,
+ vega_version=VEGA_VERSION,
+ vegaembed_version=VEGAEMBED_VERSION,
+ vegalite_version=VEGALITE_VERSION,
+)
+
+html_renderer = HTMLRenderer(
+ mode="vega-lite",
+ template="universal",
+ vega_version=VEGA_VERSION,
+ vegaembed_version=VEGAEMBED_VERSION,
+ vegalite_version=VEGALITE_VERSION,
+)
+
+renderers.register("default", default_renderer)
+renderers.register("html", html_renderer)
+renderers.register("jupyterlab", default_renderer)
+renderers.register("nteract", default_renderer)
+renderers.register("colab", colab_renderer)
+renderers.register("kaggle", kaggle_renderer)
+renderers.register("json", json_renderer)
+renderers.register("png", png_renderer)
+renderers.register("svg", svg_renderer)
+renderers.register("zeppelin", zeppelin_renderer)
+renderers.enable("default")
+
+
+class VegaLite(Displayable):
+ """An IPython/Jupyter display class for rendering VegaLite 3."""
+
+ renderers = renderers
+ schema_path = (__name__, "schema/vega-lite-schema.json")
+
+
+@deprecated(
+ "Rendering VegaLite 3 specifications is deprecated and will be removed in Altair 5. "
+ "Use `import altair as alt` instead of `import altair.vegalite.v3 as alt`."
+)
+def vegalite(spec, validate=True):
+ """Render and optionally validate a VegaLite 3 spec.
+
+ This will use the currently enabled renderer to render the spec.
+
+ Parameters
+ ==========
+ spec: dict
+ A fully compliant VegaLite 3 spec, with the data portion fully processed.
+ validate: bool
+ Should the spec be validated against the VegaLite 3 schema?
+ """
+ from IPython.display import display
+
+ display(VegaLite(spec, validate=validate))
diff --git a/venv/lib/python3.9/site-packages/altair/vegalite/v3/schema/__init__.py b/venv/lib/python3.9/site-packages/altair/vegalite/v3/schema/__init__.py
new file mode 100644
index 00000000..519d8959
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vegalite/v3/schema/__init__.py
@@ -0,0 +1,5 @@
+# flake8: noqa
+from .core import *
+from .channels import *
+SCHEMA_VERSION = 'v3.4.0'
+SCHEMA_URL = 'https://vega.github.io/schema/vega-lite/v3.4.0.json'
diff --git a/venv/lib/python3.9/site-packages/altair/vegalite/v3/schema/channels.py b/venv/lib/python3.9/site-packages/altair/vegalite/v3/schema/channels.py
new file mode 100644
index 00000000..26432fa4
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vegalite/v3/schema/channels.py
@@ -0,0 +1,5324 @@
+# The contents of this file are automatically written by
+# tools/generate_schema_wrapper.py. Do not modify directly.
+
+from . import core
+import pandas as pd
+from altair.utils.schemapi import Undefined
+from altair.utils import parse_shorthand
+
+
+class FieldChannelMixin(object):
+ def to_dict(self, validate=True, ignore=(), context=None):
+ context = context or {}
+ shorthand = self._get('shorthand')
+ field = self._get('field')
+
+ if shorthand is not Undefined and field is not Undefined:
+ raise ValueError("{} specifies both shorthand={} and field={}. "
+ "".format(self.__class__.__name__, shorthand, field))
+
+ if isinstance(shorthand, (tuple, list)):
+ # If given a list of shorthands, then transform it to a list of classes
+ kwds = self._kwds.copy()
+ kwds.pop('shorthand')
+ return [self.__class__(sh, **kwds).to_dict(validate=validate, ignore=ignore, context=context)
+ for sh in shorthand]
+
+ if shorthand is Undefined:
+ parsed = {}
+ elif isinstance(shorthand, str):
+ parsed = parse_shorthand(shorthand, data=context.get('data', None))
+ type_required = 'type' in self._kwds
+ type_in_shorthand = 'type' in parsed
+ type_defined_explicitly = self._get('type') is not Undefined
+ if not type_required:
+ # Secondary field names don't require a type argument in VegaLite 3+.
+ # We still parse it out of the shorthand, but drop it here.
+ parsed.pop('type', None)
+ elif not (type_in_shorthand or type_defined_explicitly):
+ if isinstance(context.get('data', None), pd.DataFrame):
+ raise ValueError("{} encoding field is specified without a type; "
+ "the type cannot be inferred because it does not "
+ "match any column in the data.".format(shorthand))
+ else:
+ raise ValueError("{} encoding field is specified without a type; "
+ "the type cannot be automatically inferred because "
+ "the data is not specified as a pandas.DataFrame."
+ "".format(shorthand))
+ else:
+ # Shorthand is not a string; we pass the definition to field,
+ # and do not do any parsing.
+ parsed = {'field': shorthand}
+
+ # Set shorthand to Undefined, because it's not part of the base schema.
+ self.shorthand = Undefined
+ self._kwds.update({k: v for k, v in parsed.items()
+ if self._get(k) is Undefined})
+ return super(FieldChannelMixin, self).to_dict(
+ validate=validate,
+ ignore=ignore,
+ context=context
+ )
+
+
+class ValueChannelMixin(object):
+ def to_dict(self, validate=True, ignore=(), context=None):
+ context = context or {}
+ condition = getattr(self, 'condition', Undefined)
+ copy = self # don't copy unless we need to
+ if condition is not Undefined:
+ if isinstance(condition, core.SchemaBase):
+ pass
+ elif 'field' in condition and 'type' not in condition:
+ kwds = parse_shorthand(condition['field'], context.get('data', None))
+ copy = self.copy(deep=['condition'])
+ copy.condition.update(kwds)
+ return super(ValueChannelMixin, copy).to_dict(validate=validate,
+ ignore=ignore,
+ context=context)
+
+
+class DatumChannelMixin(object):
+ def to_dict(self, validate=True, ignore=(), context=None):
+ context = context or {}
+ datum = getattr(self, 'datum', Undefined)
+ copy = self # don't copy unless we need to
+ if datum is not Undefined:
+ if isinstance(datum, core.SchemaBase):
+ pass
+ return super(DatumChannelMixin, copy).to_dict(validate=validate,
+ ignore=ignore,
+ context=context)
+
+
+class Color(FieldChannelMixin, core.StringFieldDefWithCondition):
+ """Color schema wrapper
+
+ Mapping(required=[shorthand])
+ A FieldDef with Condition :raw-html:`<ValueDef>`
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ condition : anyOf(:class:`ConditionalStringValueDef`,
+ List(:class:`ConditionalStringValueDef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ legend : anyOf(:class:`Legend`, None)
+ An object defining properties of the legend.
+ If ``null``, the legend for the encoding channel will be removed.
+
+ **Default value:** If undefined, default `legend properties
+ <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.
+
+ **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
+ documentation.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ sort : :class:`Sort`
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following:
+
+
+ * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
+ Javascript.
+ * `A sort-by-encoding definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ for sorting
+ by another encoding channel. (This type of sort definition is not available for
+ ``row`` and ``column`` channels.)
+ * `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field.
+ * `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values
+ in their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ).
+ * ``null`` indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` is not supported for ``row`` and ``column``.
+
+ **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
+ documentation.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``,
+ ``"ordinal"``, or ``"nominal"`` ).
+ It can also be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ **Note:**
+
+
+ * Data values for a temporal field can be either a date-time string (e.g.,
+ ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a
+ timestamp number (e.g., ``1552199579097`` ).
+ * Data ``type`` describes the semantics of the data rather than the primitive data
+ types ( ``number``, ``string``, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data.
+ * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
+ or `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `timeUnit
+ <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
+ can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using
+ an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
+ refers to the post-aggregation data type. For example, we can calculate count
+ ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
+ "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output
+ is ``"quantitative"``.
+ * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have
+ ``type`` as they have exactly the same type as their primary channels (e.g.,
+ ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "color"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, bin=Undefined, condition=Undefined,
+ field=Undefined, legend=Undefined, scale=Undefined, sort=Undefined, timeUnit=Undefined,
+ title=Undefined, type=Undefined, **kwds):
+ super(Color, self).__init__(shorthand=shorthand, aggregate=aggregate, bin=bin,
+ condition=condition, field=field, legend=legend, scale=scale,
+ sort=sort, timeUnit=timeUnit, title=title, type=type, **kwds)
+
+
+class ColorValue(ValueChannelMixin, core.StringValueDefWithCondition):
+ """ColorValue schema wrapper
+
+ Mapping(required=[])
+ A ValueDef with Condition<ValueDef | FieldDef> where either the condition or the value are
+ optional.
+
+ Attributes
+ ----------
+
+ condition : anyOf(:class:`ConditionalMarkPropFieldDef`, :class:`ConditionalStringValueDef`,
+ List(:class:`ConditionalStringValueDef`))
+ A field definition or one or more value definition(s) with a selection predicate.
+ value : anyOf(string, None)
+ A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values
+ between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "color"
+
+ def __init__(self, value, condition=Undefined, **kwds):
+ super(ColorValue, self).__init__(value=value, condition=condition, **kwds)
+
+
+class Column(FieldChannelMixin, core.FacetFieldDef):
+ """Column schema wrapper
+
+ Mapping(required=[shorthand])
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ header : :class:`Header`
+ An object defining properties of a facet's header.
+ sort : anyOf(:class:`SortArray`, :class:`SortOrder`, :class:`EncodingSortField`, None)
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following:
+
+
+ * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
+ Javascript.
+ * `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field.
+ * `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values
+ in their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ).
+ * ``null`` indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` is not supported for ``row`` and ``column``.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``,
+ ``"ordinal"``, or ``"nominal"`` ).
+ It can also be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ **Note:**
+
+
+ * Data values for a temporal field can be either a date-time string (e.g.,
+ ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a
+ timestamp number (e.g., ``1552199579097`` ).
+ * Data ``type`` describes the semantics of the data rather than the primitive data
+ types ( ``number``, ``string``, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data.
+ * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
+ or `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `timeUnit
+ <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
+ can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using
+ an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
+ refers to the post-aggregation data type. For example, we can calculate count
+ ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
+ "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output
+ is ``"quantitative"``.
+ * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have
+ ``type`` as they have exactly the same type as their primary channels (e.g.,
+ ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "column"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, bin=Undefined, field=Undefined,
+ header=Undefined, sort=Undefined, timeUnit=Undefined, title=Undefined, type=Undefined,
+ **kwds):
+ super(Column, self).__init__(shorthand=shorthand, aggregate=aggregate, bin=bin, field=field,
+ header=header, sort=sort, timeUnit=timeUnit, title=title,
+ type=type, **kwds)
+
+
+class Detail(FieldChannelMixin, core.FieldDefWithoutScale):
+ """Detail schema wrapper
+
+ Mapping(required=[shorthand])
+ Definition object for a data field, its type and transformation of an encoding channel.
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : anyOf(boolean, :class:`BinParams`, enum('binned'), None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``,
+ ``"ordinal"``, or ``"nominal"`` ).
+ It can also be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ **Note:**
+
+
+ * Data values for a temporal field can be either a date-time string (e.g.,
+ ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a
+ timestamp number (e.g., ``1552199579097`` ).
+ * Data ``type`` describes the semantics of the data rather than the primitive data
+ types ( ``number``, ``string``, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data.
+ * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
+ or `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `timeUnit
+ <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
+ can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using
+ an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
+ refers to the post-aggregation data type. For example, we can calculate count
+ ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
+ "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output
+ is ``"quantitative"``.
+ * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have
+ ``type`` as they have exactly the same type as their primary channels (e.g.,
+ ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "detail"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, bin=Undefined, field=Undefined,
+ timeUnit=Undefined, title=Undefined, type=Undefined, **kwds):
+ super(Detail, self).__init__(shorthand=shorthand, aggregate=aggregate, bin=bin, field=field,
+ timeUnit=timeUnit, title=title, type=type, **kwds)
+
+
+class Facet(FieldChannelMixin, core.FacetFieldDef):
+ """Facet schema wrapper
+
+ Mapping(required=[shorthand])
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ header : :class:`Header`
+ An object defining properties of a facet's header.
+ sort : anyOf(:class:`SortArray`, :class:`SortOrder`, :class:`EncodingSortField`, None)
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following:
+
+
+ * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
+ Javascript.
+ * `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field.
+ * `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values
+ in their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ).
+ * ``null`` indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` is not supported for ``row`` and ``column``.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``,
+ ``"ordinal"``, or ``"nominal"`` ).
+ It can also be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ **Note:**
+
+
+ * Data values for a temporal field can be either a date-time string (e.g.,
+ ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a
+ timestamp number (e.g., ``1552199579097`` ).
+ * Data ``type`` describes the semantics of the data rather than the primitive data
+ types ( ``number``, ``string``, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data.
+ * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
+ or `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `timeUnit
+ <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
+ can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using
+ an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
+ refers to the post-aggregation data type. For example, we can calculate count
+ ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
+ "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output
+ is ``"quantitative"``.
+ * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have
+ ``type`` as they have exactly the same type as their primary channels (e.g.,
+ ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "facet"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, bin=Undefined, field=Undefined,
+ header=Undefined, sort=Undefined, timeUnit=Undefined, title=Undefined, type=Undefined,
+ **kwds):
+ super(Facet, self).__init__(shorthand=shorthand, aggregate=aggregate, bin=bin, field=field,
+ header=header, sort=sort, timeUnit=timeUnit, title=title, type=type,
+ **kwds)
+
+
+class Fill(FieldChannelMixin, core.StringFieldDefWithCondition):
+ """Fill schema wrapper
+
+ Mapping(required=[shorthand])
+ A FieldDef with Condition :raw-html:`<ValueDef>`
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ condition : anyOf(:class:`ConditionalStringValueDef`,
+ List(:class:`ConditionalStringValueDef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ legend : anyOf(:class:`Legend`, None)
+ An object defining properties of the legend.
+ If ``null``, the legend for the encoding channel will be removed.
+
+ **Default value:** If undefined, default `legend properties
+ <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.
+
+ **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
+ documentation.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ sort : :class:`Sort`
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following:
+
+
+ * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
+ Javascript.
+ * `A sort-by-encoding definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ for sorting
+ by another encoding channel. (This type of sort definition is not available for
+ ``row`` and ``column`` channels.)
+ * `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field.
+ * `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values
+ in their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ).
+ * ``null`` indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` is not supported for ``row`` and ``column``.
+
+ **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
+ documentation.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``,
+ ``"ordinal"``, or ``"nominal"`` ).
+ It can also be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ **Note:**
+
+
+ * Data values for a temporal field can be either a date-time string (e.g.,
+ ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a
+ timestamp number (e.g., ``1552199579097`` ).
+ * Data ``type`` describes the semantics of the data rather than the primitive data
+ types ( ``number``, ``string``, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data.
+ * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
+ or `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `timeUnit
+ <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
+ can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using
+ an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
+ refers to the post-aggregation data type. For example, we can calculate count
+ ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
+ "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output
+ is ``"quantitative"``.
+ * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have
+ ``type`` as they have exactly the same type as their primary channels (e.g.,
+ ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "fill"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, bin=Undefined, condition=Undefined,
+ field=Undefined, legend=Undefined, scale=Undefined, sort=Undefined, timeUnit=Undefined,
+ title=Undefined, type=Undefined, **kwds):
+ super(Fill, self).__init__(shorthand=shorthand, aggregate=aggregate, bin=bin,
+ condition=condition, field=field, legend=legend, scale=scale,
+ sort=sort, timeUnit=timeUnit, title=title, type=type, **kwds)
+
+
+class FillValue(ValueChannelMixin, core.StringValueDefWithCondition):
+ """FillValue schema wrapper
+
+ Mapping(required=[])
+ A ValueDef with Condition<ValueDef | FieldDef> where either the condition or the value are
+ optional.
+
+ Attributes
+ ----------
+
+ condition : anyOf(:class:`ConditionalMarkPropFieldDef`, :class:`ConditionalStringValueDef`,
+ List(:class:`ConditionalStringValueDef`))
+ A field definition or one or more value definition(s) with a selection predicate.
+ value : anyOf(string, None)
+ A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values
+ between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "fill"
+
+ def __init__(self, value, condition=Undefined, **kwds):
+ super(FillValue, self).__init__(value=value, condition=condition, **kwds)
+
+
+class FillOpacity(FieldChannelMixin, core.NumericFieldDefWithCondition):
+ """FillOpacity schema wrapper
+
+ Mapping(required=[shorthand])
+ A FieldDef with Condition :raw-html:`<ValueDef>`
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ condition : anyOf(:class:`ConditionalNumberValueDef`,
+ List(:class:`ConditionalNumberValueDef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ legend : anyOf(:class:`Legend`, None)
+ An object defining properties of the legend.
+ If ``null``, the legend for the encoding channel will be removed.
+
+ **Default value:** If undefined, default `legend properties
+ <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.
+
+ **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
+ documentation.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ sort : :class:`Sort`
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following:
+
+
+ * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
+ Javascript.
+ * `A sort-by-encoding definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ for sorting
+ by another encoding channel. (This type of sort definition is not available for
+ ``row`` and ``column`` channels.)
+ * `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field.
+ * `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values
+ in their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ).
+ * ``null`` indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` is not supported for ``row`` and ``column``.
+
+ **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
+ documentation.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``,
+ ``"ordinal"``, or ``"nominal"`` ).
+ It can also be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ **Note:**
+
+
+ * Data values for a temporal field can be either a date-time string (e.g.,
+ ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a
+ timestamp number (e.g., ``1552199579097`` ).
+ * Data ``type`` describes the semantics of the data rather than the primitive data
+ types ( ``number``, ``string``, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data.
+ * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
+ or `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `timeUnit
+ <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
+ can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using
+ an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
+ refers to the post-aggregation data type. For example, we can calculate count
+ ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
+ "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output
+ is ``"quantitative"``.
+ * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have
+ ``type`` as they have exactly the same type as their primary channels (e.g.,
+ ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "fillOpacity"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, bin=Undefined, condition=Undefined,
+ field=Undefined, legend=Undefined, scale=Undefined, sort=Undefined, timeUnit=Undefined,
+ title=Undefined, type=Undefined, **kwds):
+ super(FillOpacity, self).__init__(shorthand=shorthand, aggregate=aggregate, bin=bin,
+ condition=condition, field=field, legend=legend, scale=scale,
+ sort=sort, timeUnit=timeUnit, title=title, type=type, **kwds)
+
+
+class FillOpacityValue(ValueChannelMixin, core.NumericValueDefWithCondition):
+ """FillOpacityValue schema wrapper
+
+ Mapping(required=[])
+ A ValueDef with Condition<ValueDef | FieldDef> where either the condition or the value are
+ optional.
+
+ Attributes
+ ----------
+
+ condition : anyOf(:class:`ConditionalMarkPropFieldDef`, :class:`ConditionalNumberValueDef`,
+ List(:class:`ConditionalNumberValueDef`))
+ A field definition or one or more value definition(s) with a selection predicate.
+ value : float
+ A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values
+ between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "fillOpacity"
+
+ def __init__(self, value, condition=Undefined, **kwds):
+ super(FillOpacityValue, self).__init__(value=value, condition=condition, **kwds)
+
+
+class Href(FieldChannelMixin, core.TextFieldDefWithCondition):
+ """Href schema wrapper
+
+ Mapping(required=[shorthand])
+ A FieldDef with Condition :raw-html:`<ValueDef>`
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : anyOf(boolean, :class:`BinParams`, enum('binned'), None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ condition : anyOf(:class:`ConditionalValueDef`, List(:class:`ConditionalValueDef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ format : string
+ The text formatting pattern for labels of guides (axes, legends, headers) and text
+ marks.
+
+
+ * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
+ `number format pattern <https://github.com/d3/d3-format#locale_format>`__.
+ * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
+ format pattern <https://github.com/d3/d3-time-format#locale_format>`__.
+
+ See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
+ for more examples.
+
+ **Default value:** Derived from `numberFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
+ format and from `timeFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
+ format.
+ formatType : enum('number', 'time')
+ The format type for labels ( ``"number"`` or ``"time"`` ).
+
+ **Default value:**
+
+
+ * ``"time"`` for temporal fields and ordinal and nomimal fields with ``timeUnit``.
+ * ``"number"`` for quantitative fields as well as ordinal and nomimal fields without
+ ``timeUnit``.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``,
+ ``"ordinal"``, or ``"nominal"`` ).
+ It can also be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ **Note:**
+
+
+ * Data values for a temporal field can be either a date-time string (e.g.,
+ ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a
+ timestamp number (e.g., ``1552199579097`` ).
+ * Data ``type`` describes the semantics of the data rather than the primitive data
+ types ( ``number``, ``string``, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data.
+ * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
+ or `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `timeUnit
+ <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
+ can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using
+ an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
+ refers to the post-aggregation data type. For example, we can calculate count
+ ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
+ "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output
+ is ``"quantitative"``.
+ * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have
+ ``type`` as they have exactly the same type as their primary channels (e.g.,
+ ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "href"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, bin=Undefined, condition=Undefined,
+ field=Undefined, format=Undefined, formatType=Undefined, timeUnit=Undefined,
+ title=Undefined, type=Undefined, **kwds):
+ super(Href, self).__init__(shorthand=shorthand, aggregate=aggregate, bin=bin,
+ condition=condition, field=field, format=format,
+ formatType=formatType, timeUnit=timeUnit, title=title, type=type,
+ **kwds)
+
+
+class HrefValue(ValueChannelMixin, core.TextValueDefWithCondition):
+ """HrefValue schema wrapper
+
+ Mapping(required=[])
+ A ValueDef with Condition<ValueDef | FieldDef> where either the condition or the value are
+ optional.
+
+ Attributes
+ ----------
+
+ condition : anyOf(:class:`ConditionalTextFieldDef`, :class:`ConditionalValueDef`,
+ List(:class:`ConditionalValueDef`))
+ A field definition or one or more value definition(s) with a selection predicate.
+ value : :class:`Value`
+ A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values
+ between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "href"
+
+ def __init__(self, value, condition=Undefined, **kwds):
+ super(HrefValue, self).__init__(value=value, condition=condition, **kwds)
+
+
+class Key(FieldChannelMixin, core.FieldDefWithoutScale):
+ """Key schema wrapper
+
+ Mapping(required=[shorthand])
+ Definition object for a data field, its type and transformation of an encoding channel.
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : anyOf(boolean, :class:`BinParams`, enum('binned'), None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``,
+ ``"ordinal"``, or ``"nominal"`` ).
+ It can also be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ **Note:**
+
+
+ * Data values for a temporal field can be either a date-time string (e.g.,
+ ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a
+ timestamp number (e.g., ``1552199579097`` ).
+ * Data ``type`` describes the semantics of the data rather than the primitive data
+ types ( ``number``, ``string``, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data.
+ * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
+ or `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `timeUnit
+ <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
+ can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using
+ an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
+ refers to the post-aggregation data type. For example, we can calculate count
+ ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
+ "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output
+ is ``"quantitative"``.
+ * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have
+ ``type`` as they have exactly the same type as their primary channels (e.g.,
+ ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "key"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, bin=Undefined, field=Undefined,
+ timeUnit=Undefined, title=Undefined, type=Undefined, **kwds):
+ super(Key, self).__init__(shorthand=shorthand, aggregate=aggregate, bin=bin, field=field,
+ timeUnit=timeUnit, title=title, type=type, **kwds)
+
+
+class Latitude(FieldChannelMixin, core.LatLongFieldDef):
+ """Latitude schema wrapper
+
+ Mapping(required=[shorthand])
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : None
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : enum('quantitative')
+ The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``,
+ ``"ordinal"``, or ``"nominal"`` ).
+ It can also be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ **Note:**
+
+
+ * Data values for a temporal field can be either a date-time string (e.g.,
+ ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a
+ timestamp number (e.g., ``1552199579097`` ).
+ * Data ``type`` describes the semantics of the data rather than the primitive data
+ types ( ``number``, ``string``, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data.
+ * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
+ or `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `timeUnit
+ <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
+ can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using
+ an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
+ refers to the post-aggregation data type. For example, we can calculate count
+ ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
+ "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output
+ is ``"quantitative"``.
+ * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have
+ ``type`` as they have exactly the same type as their primary channels (e.g.,
+ ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "latitude"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, bin=Undefined, field=Undefined,
+ timeUnit=Undefined, title=Undefined, type=Undefined, **kwds):
+ super(Latitude, self).__init__(shorthand=shorthand, aggregate=aggregate, bin=bin, field=field,
+ timeUnit=timeUnit, title=title, type=type, **kwds)
+
+
+class LatitudeValue(ValueChannelMixin, core.NumberValueDef):
+ """LatitudeValue schema wrapper
+
+ Mapping(required=[value])
+ Definition object for a constant value of an encoding channel.
+
+ Attributes
+ ----------
+
+ value : float
+ A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values
+ between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "latitude"
+
+ def __init__(self, value, **kwds):
+ super(LatitudeValue, self).__init__(value=value, **kwds)
+
+
+class Latitude2(FieldChannelMixin, core.SecondaryFieldDef):
+ """Latitude2 schema wrapper
+
+ Mapping(required=[shorthand])
+ A field definition of a secondary channel that shares a scale with another primary channel.
+ For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``.
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : None
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "latitude2"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, bin=Undefined, field=Undefined,
+ timeUnit=Undefined, title=Undefined, **kwds):
+ super(Latitude2, self).__init__(shorthand=shorthand, aggregate=aggregate, bin=bin, field=field,
+ timeUnit=timeUnit, title=title, **kwds)
+
+
+class Latitude2Value(ValueChannelMixin, core.NumberValueDef):
+ """Latitude2Value schema wrapper
+
+ Mapping(required=[value])
+ Definition object for a constant value of an encoding channel.
+
+ Attributes
+ ----------
+
+ value : float
+ A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values
+ between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "latitude2"
+
+ def __init__(self, value, **kwds):
+ super(Latitude2Value, self).__init__(value=value, **kwds)
+
+
+class Longitude(FieldChannelMixin, core.LatLongFieldDef):
+ """Longitude schema wrapper
+
+ Mapping(required=[shorthand])
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : None
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : enum('quantitative')
+ The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``,
+ ``"ordinal"``, or ``"nominal"`` ).
+ It can also be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ **Note:**
+
+
+ * Data values for a temporal field can be either a date-time string (e.g.,
+ ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a
+ timestamp number (e.g., ``1552199579097`` ).
+ * Data ``type`` describes the semantics of the data rather than the primitive data
+ types ( ``number``, ``string``, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data.
+ * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
+ or `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `timeUnit
+ <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
+ can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using
+ an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
+ refers to the post-aggregation data type. For example, we can calculate count
+ ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
+ "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output
+ is ``"quantitative"``.
+ * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have
+ ``type`` as they have exactly the same type as their primary channels (e.g.,
+ ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "longitude"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, bin=Undefined, field=Undefined,
+ timeUnit=Undefined, title=Undefined, type=Undefined, **kwds):
+ super(Longitude, self).__init__(shorthand=shorthand, aggregate=aggregate, bin=bin, field=field,
+ timeUnit=timeUnit, title=title, type=type, **kwds)
+
+
+class LongitudeValue(ValueChannelMixin, core.NumberValueDef):
+ """LongitudeValue schema wrapper
+
+ Mapping(required=[value])
+ Definition object for a constant value of an encoding channel.
+
+ Attributes
+ ----------
+
+ value : float
+ A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values
+ between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "longitude"
+
+ def __init__(self, value, **kwds):
+ super(LongitudeValue, self).__init__(value=value, **kwds)
+
+
+class Longitude2(FieldChannelMixin, core.SecondaryFieldDef):
+ """Longitude2 schema wrapper
+
+ Mapping(required=[shorthand])
+ A field definition of a secondary channel that shares a scale with another primary channel.
+ For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``.
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : None
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "longitude2"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, bin=Undefined, field=Undefined,
+ timeUnit=Undefined, title=Undefined, **kwds):
+ super(Longitude2, self).__init__(shorthand=shorthand, aggregate=aggregate, bin=bin, field=field,
+ timeUnit=timeUnit, title=title, **kwds)
+
+
+class Longitude2Value(ValueChannelMixin, core.NumberValueDef):
+ """Longitude2Value schema wrapper
+
+ Mapping(required=[value])
+ Definition object for a constant value of an encoding channel.
+
+ Attributes
+ ----------
+
+ value : float
+ A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values
+ between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "longitude2"
+
+ def __init__(self, value, **kwds):
+ super(Longitude2Value, self).__init__(value=value, **kwds)
+
+
+class Opacity(FieldChannelMixin, core.NumericFieldDefWithCondition):
+ """Opacity schema wrapper
+
+ Mapping(required=[shorthand])
+ A FieldDef with Condition :raw-html:`<ValueDef>`
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ condition : anyOf(:class:`ConditionalNumberValueDef`,
+ List(:class:`ConditionalNumberValueDef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ legend : anyOf(:class:`Legend`, None)
+ An object defining properties of the legend.
+ If ``null``, the legend for the encoding channel will be removed.
+
+ **Default value:** If undefined, default `legend properties
+ <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.
+
+ **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
+ documentation.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ sort : :class:`Sort`
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following:
+
+
+ * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
+ Javascript.
+ * `A sort-by-encoding definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ for sorting
+ by another encoding channel. (This type of sort definition is not available for
+ ``row`` and ``column`` channels.)
+ * `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field.
+ * `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values
+ in their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ).
+ * ``null`` indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` is not supported for ``row`` and ``column``.
+
+ **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
+ documentation.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``,
+ ``"ordinal"``, or ``"nominal"`` ).
+ It can also be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ **Note:**
+
+
+ * Data values for a temporal field can be either a date-time string (e.g.,
+ ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a
+ timestamp number (e.g., ``1552199579097`` ).
+ * Data ``type`` describes the semantics of the data rather than the primitive data
+ types ( ``number``, ``string``, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data.
+ * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
+ or `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `timeUnit
+ <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
+ can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using
+ an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
+ refers to the post-aggregation data type. For example, we can calculate count
+ ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
+ "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output
+ is ``"quantitative"``.
+ * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have
+ ``type`` as they have exactly the same type as their primary channels (e.g.,
+ ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "opacity"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, bin=Undefined, condition=Undefined,
+ field=Undefined, legend=Undefined, scale=Undefined, sort=Undefined, timeUnit=Undefined,
+ title=Undefined, type=Undefined, **kwds):
+ super(Opacity, self).__init__(shorthand=shorthand, aggregate=aggregate, bin=bin,
+ condition=condition, field=field, legend=legend, scale=scale,
+ sort=sort, timeUnit=timeUnit, title=title, type=type, **kwds)
+
+
+class OpacityValue(ValueChannelMixin, core.NumericValueDefWithCondition):
+ """OpacityValue schema wrapper
+
+ Mapping(required=[])
+ A ValueDef with Condition<ValueDef | FieldDef> where either the condition or the value are
+ optional.
+
+ Attributes
+ ----------
+
+ condition : anyOf(:class:`ConditionalMarkPropFieldDef`, :class:`ConditionalNumberValueDef`,
+ List(:class:`ConditionalNumberValueDef`))
+ A field definition or one or more value definition(s) with a selection predicate.
+ value : float
+ A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values
+ between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "opacity"
+
+ def __init__(self, value, condition=Undefined, **kwds):
+ super(OpacityValue, self).__init__(value=value, condition=condition, **kwds)
+
+
+class Order(FieldChannelMixin, core.OrderFieldDef):
+ """Order schema wrapper
+
+ Mapping(required=[shorthand])
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : anyOf(boolean, :class:`BinParams`, enum('binned'), None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ sort : :class:`SortOrder`
+ The sort order. One of ``"ascending"`` (default) or ``"descending"``.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``,
+ ``"ordinal"``, or ``"nominal"`` ).
+ It can also be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ **Note:**
+
+
+ * Data values for a temporal field can be either a date-time string (e.g.,
+ ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a
+ timestamp number (e.g., ``1552199579097`` ).
+ * Data ``type`` describes the semantics of the data rather than the primitive data
+ types ( ``number``, ``string``, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data.
+ * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
+ or `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `timeUnit
+ <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
+ can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using
+ an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
+ refers to the post-aggregation data type. For example, we can calculate count
+ ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
+ "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output
+ is ``"quantitative"``.
+ * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have
+ ``type`` as they have exactly the same type as their primary channels (e.g.,
+ ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "order"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, bin=Undefined, field=Undefined,
+ sort=Undefined, timeUnit=Undefined, title=Undefined, type=Undefined, **kwds):
+ super(Order, self).__init__(shorthand=shorthand, aggregate=aggregate, bin=bin, field=field,
+ sort=sort, timeUnit=timeUnit, title=title, type=type, **kwds)
+
+
+class OrderValue(ValueChannelMixin, core.NumberValueDef):
+ """OrderValue schema wrapper
+
+ Mapping(required=[value])
+ Definition object for a constant value of an encoding channel.
+
+ Attributes
+ ----------
+
+ value : float
+ A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values
+ between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "order"
+
+ def __init__(self, value, **kwds):
+ super(OrderValue, self).__init__(value=value, **kwds)
+
+
+class Row(FieldChannelMixin, core.FacetFieldDef):
+ """Row schema wrapper
+
+ Mapping(required=[shorthand])
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ header : :class:`Header`
+ An object defining properties of a facet's header.
+ sort : anyOf(:class:`SortArray`, :class:`SortOrder`, :class:`EncodingSortField`, None)
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following:
+
+
+ * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
+ Javascript.
+ * `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field.
+ * `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values
+ in their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ).
+ * ``null`` indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` is not supported for ``row`` and ``column``.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``,
+ ``"ordinal"``, or ``"nominal"`` ).
+ It can also be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ **Note:**
+
+
+ * Data values for a temporal field can be either a date-time string (e.g.,
+ ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a
+ timestamp number (e.g., ``1552199579097`` ).
+ * Data ``type`` describes the semantics of the data rather than the primitive data
+ types ( ``number``, ``string``, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data.
+ * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
+ or `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `timeUnit
+ <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
+ can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using
+ an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
+ refers to the post-aggregation data type. For example, we can calculate count
+ ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
+ "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output
+ is ``"quantitative"``.
+ * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have
+ ``type`` as they have exactly the same type as their primary channels (e.g.,
+ ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "row"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, bin=Undefined, field=Undefined,
+ header=Undefined, sort=Undefined, timeUnit=Undefined, title=Undefined, type=Undefined,
+ **kwds):
+ super(Row, self).__init__(shorthand=shorthand, aggregate=aggregate, bin=bin, field=field,
+ header=header, sort=sort, timeUnit=timeUnit, title=title, type=type,
+ **kwds)
+
+
+class Shape(FieldChannelMixin, core.ShapeFieldDefWithCondition):
+ """Shape schema wrapper
+
+ Mapping(required=[shorthand])
+ A FieldDef with Condition :raw-html:`<ValueDef>`
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ condition : anyOf(:class:`ConditionalStringValueDef`,
+ List(:class:`ConditionalStringValueDef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ legend : anyOf(:class:`Legend`, None)
+ An object defining properties of the legend.
+ If ``null``, the legend for the encoding channel will be removed.
+
+ **Default value:** If undefined, default `legend properties
+ <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.
+
+ **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
+ documentation.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ sort : :class:`Sort`
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following:
+
+
+ * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
+ Javascript.
+ * `A sort-by-encoding definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ for sorting
+ by another encoding channel. (This type of sort definition is not available for
+ ``row`` and ``column`` channels.)
+ * `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field.
+ * `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values
+ in their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ).
+ * ``null`` indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` is not supported for ``row`` and ``column``.
+
+ **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
+ documentation.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`TypeForShape`
+ The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``,
+ ``"ordinal"``, or ``"nominal"`` ).
+ It can also be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ **Note:**
+
+
+ * Data values for a temporal field can be either a date-time string (e.g.,
+ ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a
+ timestamp number (e.g., ``1552199579097`` ).
+ * Data ``type`` describes the semantics of the data rather than the primitive data
+ types ( ``number``, ``string``, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data.
+ * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
+ or `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `timeUnit
+ <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
+ can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using
+ an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
+ refers to the post-aggregation data type. For example, we can calculate count
+ ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
+ "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output
+ is ``"quantitative"``.
+ * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have
+ ``type`` as they have exactly the same type as their primary channels (e.g.,
+ ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "shape"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, bin=Undefined, condition=Undefined,
+ field=Undefined, legend=Undefined, scale=Undefined, sort=Undefined, timeUnit=Undefined,
+ title=Undefined, type=Undefined, **kwds):
+ super(Shape, self).__init__(shorthand=shorthand, aggregate=aggregate, bin=bin,
+ condition=condition, field=field, legend=legend, scale=scale,
+ sort=sort, timeUnit=timeUnit, title=title, type=type, **kwds)
+
+
+class ShapeValue(ValueChannelMixin, core.ShapeValueDefWithCondition):
+ """ShapeValue schema wrapper
+
+ Mapping(required=[])
+ A ValueDef with Condition<ValueDef | FieldDef> where either the condition or the value are
+ optional.
+
+ Attributes
+ ----------
+
+ condition : anyOf(:class:`ConditionalMarkPropFieldDefTypeForShape`,
+ :class:`ConditionalStringValueDef`, List(:class:`ConditionalStringValueDef`))
+ A field definition or one or more value definition(s) with a selection predicate.
+ value : anyOf(string, None)
+ A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values
+ between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "shape"
+
+ def __init__(self, value, condition=Undefined, **kwds):
+ super(ShapeValue, self).__init__(value=value, condition=condition, **kwds)
+
+
+class Size(FieldChannelMixin, core.NumericFieldDefWithCondition):
+ """Size schema wrapper
+
+ Mapping(required=[shorthand])
+ A FieldDef with Condition :raw-html:`<ValueDef>`
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ condition : anyOf(:class:`ConditionalNumberValueDef`,
+ List(:class:`ConditionalNumberValueDef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ legend : anyOf(:class:`Legend`, None)
+ An object defining properties of the legend.
+ If ``null``, the legend for the encoding channel will be removed.
+
+ **Default value:** If undefined, default `legend properties
+ <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.
+
+ **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
+ documentation.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ sort : :class:`Sort`
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following:
+
+
+ * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
+ Javascript.
+ * `A sort-by-encoding definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ for sorting
+ by another encoding channel. (This type of sort definition is not available for
+ ``row`` and ``column`` channels.)
+ * `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field.
+ * `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values
+ in their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ).
+ * ``null`` indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` is not supported for ``row`` and ``column``.
+
+ **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
+ documentation.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``,
+ ``"ordinal"``, or ``"nominal"`` ).
+ It can also be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ **Note:**
+
+
+ * Data values for a temporal field can be either a date-time string (e.g.,
+ ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a
+ timestamp number (e.g., ``1552199579097`` ).
+ * Data ``type`` describes the semantics of the data rather than the primitive data
+ types ( ``number``, ``string``, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data.
+ * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
+ or `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `timeUnit
+ <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
+ can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using
+ an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
+ refers to the post-aggregation data type. For example, we can calculate count
+ ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
+ "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output
+ is ``"quantitative"``.
+ * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have
+ ``type`` as they have exactly the same type as their primary channels (e.g.,
+ ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "size"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, bin=Undefined, condition=Undefined,
+ field=Undefined, legend=Undefined, scale=Undefined, sort=Undefined, timeUnit=Undefined,
+ title=Undefined, type=Undefined, **kwds):
+ super(Size, self).__init__(shorthand=shorthand, aggregate=aggregate, bin=bin,
+ condition=condition, field=field, legend=legend, scale=scale,
+ sort=sort, timeUnit=timeUnit, title=title, type=type, **kwds)
+
+
+class SizeValue(ValueChannelMixin, core.NumericValueDefWithCondition):
+ """SizeValue schema wrapper
+
+ Mapping(required=[])
+ A ValueDef with Condition<ValueDef | FieldDef> where either the condition or the value are
+ optional.
+
+ Attributes
+ ----------
+
+ condition : anyOf(:class:`ConditionalMarkPropFieldDef`, :class:`ConditionalNumberValueDef`,
+ List(:class:`ConditionalNumberValueDef`))
+ A field definition or one or more value definition(s) with a selection predicate.
+ value : float
+ A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values
+ between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "size"
+
+ def __init__(self, value, condition=Undefined, **kwds):
+ super(SizeValue, self).__init__(value=value, condition=condition, **kwds)
+
+
+class Stroke(FieldChannelMixin, core.StringFieldDefWithCondition):
+ """Stroke schema wrapper
+
+ Mapping(required=[shorthand])
+ A FieldDef with Condition :raw-html:`<ValueDef>`
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ condition : anyOf(:class:`ConditionalStringValueDef`,
+ List(:class:`ConditionalStringValueDef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ legend : anyOf(:class:`Legend`, None)
+ An object defining properties of the legend.
+ If ``null``, the legend for the encoding channel will be removed.
+
+ **Default value:** If undefined, default `legend properties
+ <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.
+
+ **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
+ documentation.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ sort : :class:`Sort`
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following:
+
+
+ * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
+ Javascript.
+ * `A sort-by-encoding definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ for sorting
+ by another encoding channel. (This type of sort definition is not available for
+ ``row`` and ``column`` channels.)
+ * `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field.
+ * `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values
+ in their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ).
+ * ``null`` indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` is not supported for ``row`` and ``column``.
+
+ **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
+ documentation.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``,
+ ``"ordinal"``, or ``"nominal"`` ).
+ It can also be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ **Note:**
+
+
+ * Data values for a temporal field can be either a date-time string (e.g.,
+ ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a
+ timestamp number (e.g., ``1552199579097`` ).
+ * Data ``type`` describes the semantics of the data rather than the primitive data
+ types ( ``number``, ``string``, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data.
+ * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
+ or `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `timeUnit
+ <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
+ can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using
+ an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
+ refers to the post-aggregation data type. For example, we can calculate count
+ ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
+ "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output
+ is ``"quantitative"``.
+ * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have
+ ``type`` as they have exactly the same type as their primary channels (e.g.,
+ ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "stroke"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, bin=Undefined, condition=Undefined,
+ field=Undefined, legend=Undefined, scale=Undefined, sort=Undefined, timeUnit=Undefined,
+ title=Undefined, type=Undefined, **kwds):
+ super(Stroke, self).__init__(shorthand=shorthand, aggregate=aggregate, bin=bin,
+ condition=condition, field=field, legend=legend, scale=scale,
+ sort=sort, timeUnit=timeUnit, title=title, type=type, **kwds)
+
+
+class StrokeValue(ValueChannelMixin, core.StringValueDefWithCondition):
+ """StrokeValue schema wrapper
+
+ Mapping(required=[])
+ A ValueDef with Condition<ValueDef | FieldDef> where either the condition or the value are
+ optional.
+
+ Attributes
+ ----------
+
+ condition : anyOf(:class:`ConditionalMarkPropFieldDef`, :class:`ConditionalStringValueDef`,
+ List(:class:`ConditionalStringValueDef`))
+ A field definition or one or more value definition(s) with a selection predicate.
+ value : anyOf(string, None)
+ A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values
+ between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "stroke"
+
+ def __init__(self, value, condition=Undefined, **kwds):
+ super(StrokeValue, self).__init__(value=value, condition=condition, **kwds)
+
+
+class StrokeOpacity(FieldChannelMixin, core.NumericFieldDefWithCondition):
+ """StrokeOpacity schema wrapper
+
+ Mapping(required=[shorthand])
+ A FieldDef with Condition :raw-html:`<ValueDef>`
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ condition : anyOf(:class:`ConditionalNumberValueDef`,
+ List(:class:`ConditionalNumberValueDef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ legend : anyOf(:class:`Legend`, None)
+ An object defining properties of the legend.
+ If ``null``, the legend for the encoding channel will be removed.
+
+ **Default value:** If undefined, default `legend properties
+ <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.
+
+ **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
+ documentation.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ sort : :class:`Sort`
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following:
+
+
+ * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
+ Javascript.
+ * `A sort-by-encoding definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ for sorting
+ by another encoding channel. (This type of sort definition is not available for
+ ``row`` and ``column`` channels.)
+ * `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field.
+ * `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values
+ in their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ).
+ * ``null`` indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` is not supported for ``row`` and ``column``.
+
+ **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
+ documentation.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``,
+ ``"ordinal"``, or ``"nominal"`` ).
+ It can also be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ **Note:**
+
+
+ * Data values for a temporal field can be either a date-time string (e.g.,
+ ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a
+ timestamp number (e.g., ``1552199579097`` ).
+ * Data ``type`` describes the semantics of the data rather than the primitive data
+ types ( ``number``, ``string``, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data.
+ * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
+ or `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `timeUnit
+ <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
+ can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using
+ an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
+ refers to the post-aggregation data type. For example, we can calculate count
+ ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
+ "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output
+ is ``"quantitative"``.
+ * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have
+ ``type`` as they have exactly the same type as their primary channels (e.g.,
+ ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "strokeOpacity"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, bin=Undefined, condition=Undefined,
+ field=Undefined, legend=Undefined, scale=Undefined, sort=Undefined, timeUnit=Undefined,
+ title=Undefined, type=Undefined, **kwds):
+ super(StrokeOpacity, self).__init__(shorthand=shorthand, aggregate=aggregate, bin=bin,
+ condition=condition, field=field, legend=legend,
+ scale=scale, sort=sort, timeUnit=timeUnit, title=title,
+ type=type, **kwds)
+
+
+class StrokeOpacityValue(ValueChannelMixin, core.NumericValueDefWithCondition):
+ """StrokeOpacityValue schema wrapper
+
+ Mapping(required=[])
+ A ValueDef with Condition<ValueDef | FieldDef> where either the condition or the value are
+ optional.
+
+ Attributes
+ ----------
+
+ condition : anyOf(:class:`ConditionalMarkPropFieldDef`, :class:`ConditionalNumberValueDef`,
+ List(:class:`ConditionalNumberValueDef`))
+ A field definition or one or more value definition(s) with a selection predicate.
+ value : float
+ A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values
+ between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "strokeOpacity"
+
+ def __init__(self, value, condition=Undefined, **kwds):
+ super(StrokeOpacityValue, self).__init__(value=value, condition=condition, **kwds)
+
+
+class StrokeWidth(FieldChannelMixin, core.NumericFieldDefWithCondition):
+ """StrokeWidth schema wrapper
+
+ Mapping(required=[shorthand])
+ A FieldDef with Condition :raw-html:`<ValueDef>`
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ condition : anyOf(:class:`ConditionalNumberValueDef`,
+ List(:class:`ConditionalNumberValueDef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ legend : anyOf(:class:`Legend`, None)
+ An object defining properties of the legend.
+ If ``null``, the legend for the encoding channel will be removed.
+
+ **Default value:** If undefined, default `legend properties
+ <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.
+
+ **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
+ documentation.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ sort : :class:`Sort`
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following:
+
+
+ * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
+ Javascript.
+ * `A sort-by-encoding definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ for sorting
+ by another encoding channel. (This type of sort definition is not available for
+ ``row`` and ``column`` channels.)
+ * `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field.
+ * `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values
+ in their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ).
+ * ``null`` indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` is not supported for ``row`` and ``column``.
+
+ **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
+ documentation.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``,
+ ``"ordinal"``, or ``"nominal"`` ).
+ It can also be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ **Note:**
+
+
+ * Data values for a temporal field can be either a date-time string (e.g.,
+ ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a
+ timestamp number (e.g., ``1552199579097`` ).
+ * Data ``type`` describes the semantics of the data rather than the primitive data
+ types ( ``number``, ``string``, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data.
+ * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
+ or `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `timeUnit
+ <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
+ can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using
+ an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
+ refers to the post-aggregation data type. For example, we can calculate count
+ ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
+ "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output
+ is ``"quantitative"``.
+ * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have
+ ``type`` as they have exactly the same type as their primary channels (e.g.,
+ ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "strokeWidth"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, bin=Undefined, condition=Undefined,
+ field=Undefined, legend=Undefined, scale=Undefined, sort=Undefined, timeUnit=Undefined,
+ title=Undefined, type=Undefined, **kwds):
+ super(StrokeWidth, self).__init__(shorthand=shorthand, aggregate=aggregate, bin=bin,
+ condition=condition, field=field, legend=legend, scale=scale,
+ sort=sort, timeUnit=timeUnit, title=title, type=type, **kwds)
+
+
+class StrokeWidthValue(ValueChannelMixin, core.NumericValueDefWithCondition):
+ """StrokeWidthValue schema wrapper
+
+ Mapping(required=[])
+ A ValueDef with Condition<ValueDef | FieldDef> where either the condition or the value are
+ optional.
+
+ Attributes
+ ----------
+
+ condition : anyOf(:class:`ConditionalMarkPropFieldDef`, :class:`ConditionalNumberValueDef`,
+ List(:class:`ConditionalNumberValueDef`))
+ A field definition or one or more value definition(s) with a selection predicate.
+ value : float
+ A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values
+ between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "strokeWidth"
+
+ def __init__(self, value, condition=Undefined, **kwds):
+ super(StrokeWidthValue, self).__init__(value=value, condition=condition, **kwds)
+
+
+class Text(FieldChannelMixin, core.TextFieldDefWithCondition):
+ """Text schema wrapper
+
+ Mapping(required=[shorthand])
+ A FieldDef with Condition :raw-html:`<ValueDef>`
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : anyOf(boolean, :class:`BinParams`, enum('binned'), None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ condition : anyOf(:class:`ConditionalValueDef`, List(:class:`ConditionalValueDef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ format : string
+ The text formatting pattern for labels of guides (axes, legends, headers) and text
+ marks.
+
+
+ * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
+ `number format pattern <https://github.com/d3/d3-format#locale_format>`__.
+ * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
+ format pattern <https://github.com/d3/d3-time-format#locale_format>`__.
+
+ See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
+ for more examples.
+
+ **Default value:** Derived from `numberFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
+ format and from `timeFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
+ format.
+ formatType : enum('number', 'time')
+ The format type for labels ( ``"number"`` or ``"time"`` ).
+
+ **Default value:**
+
+
+ * ``"time"`` for temporal fields and ordinal and nomimal fields with ``timeUnit``.
+ * ``"number"`` for quantitative fields as well as ordinal and nomimal fields without
+ ``timeUnit``.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``,
+ ``"ordinal"``, or ``"nominal"`` ).
+ It can also be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ **Note:**
+
+
+ * Data values for a temporal field can be either a date-time string (e.g.,
+ ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a
+ timestamp number (e.g., ``1552199579097`` ).
+ * Data ``type`` describes the semantics of the data rather than the primitive data
+ types ( ``number``, ``string``, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data.
+ * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
+ or `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `timeUnit
+ <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
+ can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using
+ an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
+ refers to the post-aggregation data type. For example, we can calculate count
+ ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
+ "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output
+ is ``"quantitative"``.
+ * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have
+ ``type`` as they have exactly the same type as their primary channels (e.g.,
+ ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "text"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, bin=Undefined, condition=Undefined,
+ field=Undefined, format=Undefined, formatType=Undefined, timeUnit=Undefined,
+ title=Undefined, type=Undefined, **kwds):
+ super(Text, self).__init__(shorthand=shorthand, aggregate=aggregate, bin=bin,
+ condition=condition, field=field, format=format,
+ formatType=formatType, timeUnit=timeUnit, title=title, type=type,
+ **kwds)
+
+
+class TextValue(ValueChannelMixin, core.TextValueDefWithCondition):
+ """TextValue schema wrapper
+
+ Mapping(required=[])
+ A ValueDef with Condition<ValueDef | FieldDef> where either the condition or the value are
+ optional.
+
+ Attributes
+ ----------
+
+ condition : anyOf(:class:`ConditionalTextFieldDef`, :class:`ConditionalValueDef`,
+ List(:class:`ConditionalValueDef`))
+ A field definition or one or more value definition(s) with a selection predicate.
+ value : :class:`Value`
+ A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values
+ between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "text"
+
+ def __init__(self, value, condition=Undefined, **kwds):
+ super(TextValue, self).__init__(value=value, condition=condition, **kwds)
+
+
+class Tooltip(FieldChannelMixin, core.TextFieldDefWithCondition):
+ """Tooltip schema wrapper
+
+ Mapping(required=[shorthand])
+ A FieldDef with Condition :raw-html:`<ValueDef>`
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : anyOf(boolean, :class:`BinParams`, enum('binned'), None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ condition : anyOf(:class:`ConditionalValueDef`, List(:class:`ConditionalValueDef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ format : string
+ The text formatting pattern for labels of guides (axes, legends, headers) and text
+ marks.
+
+
+ * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
+ `number format pattern <https://github.com/d3/d3-format#locale_format>`__.
+ * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
+ format pattern <https://github.com/d3/d3-time-format#locale_format>`__.
+
+ See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
+ for more examples.
+
+ **Default value:** Derived from `numberFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
+ format and from `timeFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
+ format.
+ formatType : enum('number', 'time')
+ The format type for labels ( ``"number"`` or ``"time"`` ).
+
+ **Default value:**
+
+
+ * ``"time"`` for temporal fields and ordinal and nomimal fields with ``timeUnit``.
+ * ``"number"`` for quantitative fields as well as ordinal and nomimal fields without
+ ``timeUnit``.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``,
+ ``"ordinal"``, or ``"nominal"`` ).
+ It can also be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ **Note:**
+
+
+ * Data values for a temporal field can be either a date-time string (e.g.,
+ ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a
+ timestamp number (e.g., ``1552199579097`` ).
+ * Data ``type`` describes the semantics of the data rather than the primitive data
+ types ( ``number``, ``string``, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data.
+ * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
+ or `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `timeUnit
+ <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
+ can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using
+ an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
+ refers to the post-aggregation data type. For example, we can calculate count
+ ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
+ "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output
+ is ``"quantitative"``.
+ * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have
+ ``type`` as they have exactly the same type as their primary channels (e.g.,
+ ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "tooltip"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, bin=Undefined, condition=Undefined,
+ field=Undefined, format=Undefined, formatType=Undefined, timeUnit=Undefined,
+ title=Undefined, type=Undefined, **kwds):
+ super(Tooltip, self).__init__(shorthand=shorthand, aggregate=aggregate, bin=bin,
+ condition=condition, field=field, format=format,
+ formatType=formatType, timeUnit=timeUnit, title=title, type=type,
+ **kwds)
+
+
+class TooltipValue(ValueChannelMixin, core.TextValueDefWithCondition):
+ """TooltipValue schema wrapper
+
+ Mapping(required=[])
+ A ValueDef with Condition<ValueDef | FieldDef> where either the condition or the value are
+ optional.
+
+ Attributes
+ ----------
+
+ condition : anyOf(:class:`ConditionalTextFieldDef`, :class:`ConditionalValueDef`,
+ List(:class:`ConditionalValueDef`))
+ A field definition or one or more value definition(s) with a selection predicate.
+ value : :class:`Value`
+ A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values
+ between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "tooltip"
+
+ def __init__(self, value, condition=Undefined, **kwds):
+ super(TooltipValue, self).__init__(value=value, condition=condition, **kwds)
+
+
+class X(FieldChannelMixin, core.PositionFieldDef):
+ """X schema wrapper
+
+ Mapping(required=[shorthand])
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ axis : anyOf(:class:`Axis`, None)
+ An object defining properties of axis's gridlines, ticks and labels.
+ If ``null``, the axis for the encoding channel will be removed.
+
+ **Default value:** If undefined, default `axis properties
+ <https://vega.github.io/vega-lite/docs/axis.html>`__ are applied.
+
+ **See also:** `axis <https://vega.github.io/vega-lite/docs/axis.html>`__
+ documentation.
+ bin : anyOf(boolean, :class:`BinParams`, enum('binned'), None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ impute : :class:`ImputeParams`
+ An object defining the properties of the Impute Operation to be applied.
+ The field value of the other positional channel is taken as ``key`` of the
+ ``Impute`` Operation.
+ The field of the ``color`` channel if specified is used as ``groupby`` of the
+ ``Impute`` Operation.
+
+ **See also:** `impute <https://vega.github.io/vega-lite/docs/impute.html>`__
+ documentation.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ sort : :class:`Sort`
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following:
+
+
+ * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
+ Javascript.
+ * `A sort-by-encoding definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ for sorting
+ by another encoding channel. (This type of sort definition is not available for
+ ``row`` and ``column`` channels.)
+ * `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field.
+ * `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values
+ in their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ).
+ * ``null`` indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` is not supported for ``row`` and ``column``.
+
+ **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
+ documentation.
+ stack : anyOf(:class:`StackOffset`, None, boolean)
+ Type of stacking offset if the field should be stacked.
+ ``stack`` is only applicable for ``x`` and ``y`` channels with continuous domains.
+ For example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar
+ chart.
+
+ ``stack`` can be one of the following values:
+
+
+ * ``"zero"`` or `true`: stacking with baseline offset at zero value of the scale
+ (for creating typical stacked
+ [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and `area
+ <https://vega.github.io/vega-lite/docs/stack.html#area>`__ chart).
+ * ``"normalize"`` - stacking with normalized domain (for creating `normalized
+ stacked bar and area charts
+ <https://vega.github.io/vega-lite/docs/stack.html#normalized>`__.
+ :raw-html:`<br/>`
+ - ``"center"`` - stacking with center baseline (for `streamgraph
+ <https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__ ).
+ * ``null`` or ``false`` - No-stacking. This will produce layered `bar
+ <https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area
+ chart.
+
+ **Default value:** ``zero`` for plots with all of the following conditions are true:
+ (1) the mark is ``bar`` or ``area`` ;
+ (2) the stacked measure channel (x or y) has a linear scale;
+ (3) At least one of non-position channels mapped to an unaggregated field that is
+ different from x and y. Otherwise, ``null`` by default.
+
+ **See also:** `stack <https://vega.github.io/vega-lite/docs/stack.html>`__
+ documentation.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``,
+ ``"ordinal"``, or ``"nominal"`` ).
+ It can also be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ **Note:**
+
+
+ * Data values for a temporal field can be either a date-time string (e.g.,
+ ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a
+ timestamp number (e.g., ``1552199579097`` ).
+ * Data ``type`` describes the semantics of the data rather than the primitive data
+ types ( ``number``, ``string``, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data.
+ * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
+ or `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `timeUnit
+ <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
+ can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using
+ an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
+ refers to the post-aggregation data type. For example, we can calculate count
+ ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
+ "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output
+ is ``"quantitative"``.
+ * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have
+ ``type`` as they have exactly the same type as their primary channels (e.g.,
+ ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "x"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, axis=Undefined, bin=Undefined,
+ field=Undefined, impute=Undefined, scale=Undefined, sort=Undefined, stack=Undefined,
+ timeUnit=Undefined, title=Undefined, type=Undefined, **kwds):
+ super(X, self).__init__(shorthand=shorthand, aggregate=aggregate, axis=axis, bin=bin,
+ field=field, impute=impute, scale=scale, sort=sort, stack=stack,
+ timeUnit=timeUnit, title=title, type=type, **kwds)
+
+
+class XValue(ValueChannelMixin, core.XValueDef):
+ """XValue schema wrapper
+
+ Mapping(required=[value])
+ Definition object for a constant value of an encoding channel.
+
+ Attributes
+ ----------
+
+ value : anyOf(float, enum('width'))
+ A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values
+ between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "x"
+
+ def __init__(self, value, **kwds):
+ super(XValue, self).__init__(value=value, **kwds)
+
+
+class X2(FieldChannelMixin, core.SecondaryFieldDef):
+ """X2 schema wrapper
+
+ Mapping(required=[shorthand])
+ A field definition of a secondary channel that shares a scale with another primary channel.
+ For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``.
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : None
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "x2"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, bin=Undefined, field=Undefined,
+ timeUnit=Undefined, title=Undefined, **kwds):
+ super(X2, self).__init__(shorthand=shorthand, aggregate=aggregate, bin=bin, field=field,
+ timeUnit=timeUnit, title=title, **kwds)
+
+
+class X2Value(ValueChannelMixin, core.XValueDef):
+ """X2Value schema wrapper
+
+ Mapping(required=[value])
+ Definition object for a constant value of an encoding channel.
+
+ Attributes
+ ----------
+
+ value : anyOf(float, enum('width'))
+ A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values
+ between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "x2"
+
+ def __init__(self, value, **kwds):
+ super(X2Value, self).__init__(value=value, **kwds)
+
+
+class XError(FieldChannelMixin, core.SecondaryFieldDef):
+ """XError schema wrapper
+
+ Mapping(required=[shorthand])
+ A field definition of a secondary channel that shares a scale with another primary channel.
+ For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``.
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : None
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "xError"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, bin=Undefined, field=Undefined,
+ timeUnit=Undefined, title=Undefined, **kwds):
+ super(XError, self).__init__(shorthand=shorthand, aggregate=aggregate, bin=bin, field=field,
+ timeUnit=timeUnit, title=title, **kwds)
+
+
+class XErrorValue(ValueChannelMixin, core.NumberValueDef):
+ """XErrorValue schema wrapper
+
+ Mapping(required=[value])
+ Definition object for a constant value of an encoding channel.
+
+ Attributes
+ ----------
+
+ value : float
+ A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values
+ between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "xError"
+
+ def __init__(self, value, **kwds):
+ super(XErrorValue, self).__init__(value=value, **kwds)
+
+
+class XError2(FieldChannelMixin, core.SecondaryFieldDef):
+ """XError2 schema wrapper
+
+ Mapping(required=[shorthand])
+ A field definition of a secondary channel that shares a scale with another primary channel.
+ For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``.
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : None
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "xError2"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, bin=Undefined, field=Undefined,
+ timeUnit=Undefined, title=Undefined, **kwds):
+ super(XError2, self).__init__(shorthand=shorthand, aggregate=aggregate, bin=bin, field=field,
+ timeUnit=timeUnit, title=title, **kwds)
+
+
+class XError2Value(ValueChannelMixin, core.NumberValueDef):
+ """XError2Value schema wrapper
+
+ Mapping(required=[value])
+ Definition object for a constant value of an encoding channel.
+
+ Attributes
+ ----------
+
+ value : float
+ A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values
+ between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "xError2"
+
+ def __init__(self, value, **kwds):
+ super(XError2Value, self).__init__(value=value, **kwds)
+
+
+class Y(FieldChannelMixin, core.PositionFieldDef):
+ """Y schema wrapper
+
+ Mapping(required=[shorthand])
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ axis : anyOf(:class:`Axis`, None)
+ An object defining properties of axis's gridlines, ticks and labels.
+ If ``null``, the axis for the encoding channel will be removed.
+
+ **Default value:** If undefined, default `axis properties
+ <https://vega.github.io/vega-lite/docs/axis.html>`__ are applied.
+
+ **See also:** `axis <https://vega.github.io/vega-lite/docs/axis.html>`__
+ documentation.
+ bin : anyOf(boolean, :class:`BinParams`, enum('binned'), None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ impute : :class:`ImputeParams`
+ An object defining the properties of the Impute Operation to be applied.
+ The field value of the other positional channel is taken as ``key`` of the
+ ``Impute`` Operation.
+ The field of the ``color`` channel if specified is used as ``groupby`` of the
+ ``Impute`` Operation.
+
+ **See also:** `impute <https://vega.github.io/vega-lite/docs/impute.html>`__
+ documentation.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ sort : :class:`Sort`
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following:
+
+
+ * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
+ Javascript.
+ * `A sort-by-encoding definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ for sorting
+ by another encoding channel. (This type of sort definition is not available for
+ ``row`` and ``column`` channels.)
+ * `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field.
+ * `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values
+ in their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ).
+ * ``null`` indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` is not supported for ``row`` and ``column``.
+
+ **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
+ documentation.
+ stack : anyOf(:class:`StackOffset`, None, boolean)
+ Type of stacking offset if the field should be stacked.
+ ``stack`` is only applicable for ``x`` and ``y`` channels with continuous domains.
+ For example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar
+ chart.
+
+ ``stack`` can be one of the following values:
+
+
+ * ``"zero"`` or `true`: stacking with baseline offset at zero value of the scale
+ (for creating typical stacked
+ [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and `area
+ <https://vega.github.io/vega-lite/docs/stack.html#area>`__ chart).
+ * ``"normalize"`` - stacking with normalized domain (for creating `normalized
+ stacked bar and area charts
+ <https://vega.github.io/vega-lite/docs/stack.html#normalized>`__.
+ :raw-html:`<br/>`
+ - ``"center"`` - stacking with center baseline (for `streamgraph
+ <https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__ ).
+ * ``null`` or ``false`` - No-stacking. This will produce layered `bar
+ <https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area
+ chart.
+
+ **Default value:** ``zero`` for plots with all of the following conditions are true:
+ (1) the mark is ``bar`` or ``area`` ;
+ (2) the stacked measure channel (x or y) has a linear scale;
+ (3) At least one of non-position channels mapped to an unaggregated field that is
+ different from x and y. Otherwise, ``null`` by default.
+
+ **See also:** `stack <https://vega.github.io/vega-lite/docs/stack.html>`__
+ documentation.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``,
+ ``"ordinal"``, or ``"nominal"`` ).
+ It can also be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ **Note:**
+
+
+ * Data values for a temporal field can be either a date-time string (e.g.,
+ ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a
+ timestamp number (e.g., ``1552199579097`` ).
+ * Data ``type`` describes the semantics of the data rather than the primitive data
+ types ( ``number``, ``string``, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data.
+ * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
+ or `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `timeUnit
+ <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
+ can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using
+ an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
+ refers to the post-aggregation data type. For example, we can calculate count
+ ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
+ "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output
+ is ``"quantitative"``.
+ * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have
+ ``type`` as they have exactly the same type as their primary channels (e.g.,
+ ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "y"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, axis=Undefined, bin=Undefined,
+ field=Undefined, impute=Undefined, scale=Undefined, sort=Undefined, stack=Undefined,
+ timeUnit=Undefined, title=Undefined, type=Undefined, **kwds):
+ super(Y, self).__init__(shorthand=shorthand, aggregate=aggregate, axis=axis, bin=bin,
+ field=field, impute=impute, scale=scale, sort=sort, stack=stack,
+ timeUnit=timeUnit, title=title, type=type, **kwds)
+
+
+class YValue(ValueChannelMixin, core.YValueDef):
+ """YValue schema wrapper
+
+ Mapping(required=[value])
+ Definition object for a constant value of an encoding channel.
+
+ Attributes
+ ----------
+
+ value : anyOf(float, enum('height'))
+ A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values
+ between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "y"
+
+ def __init__(self, value, **kwds):
+ super(YValue, self).__init__(value=value, **kwds)
+
+
+class Y2(FieldChannelMixin, core.SecondaryFieldDef):
+ """Y2 schema wrapper
+
+ Mapping(required=[shorthand])
+ A field definition of a secondary channel that shares a scale with another primary channel.
+ For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``.
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : None
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "y2"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, bin=Undefined, field=Undefined,
+ timeUnit=Undefined, title=Undefined, **kwds):
+ super(Y2, self).__init__(shorthand=shorthand, aggregate=aggregate, bin=bin, field=field,
+ timeUnit=timeUnit, title=title, **kwds)
+
+
+class Y2Value(ValueChannelMixin, core.YValueDef):
+ """Y2Value schema wrapper
+
+ Mapping(required=[value])
+ Definition object for a constant value of an encoding channel.
+
+ Attributes
+ ----------
+
+ value : anyOf(float, enum('height'))
+ A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values
+ between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "y2"
+
+ def __init__(self, value, **kwds):
+ super(Y2Value, self).__init__(value=value, **kwds)
+
+
+class YError(FieldChannelMixin, core.SecondaryFieldDef):
+ """YError schema wrapper
+
+ Mapping(required=[shorthand])
+ A field definition of a secondary channel that shares a scale with another primary channel.
+ For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``.
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : None
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "yError"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, bin=Undefined, field=Undefined,
+ timeUnit=Undefined, title=Undefined, **kwds):
+ super(YError, self).__init__(shorthand=shorthand, aggregate=aggregate, bin=bin, field=field,
+ timeUnit=timeUnit, title=title, **kwds)
+
+
+class YErrorValue(ValueChannelMixin, core.NumberValueDef):
+ """YErrorValue schema wrapper
+
+ Mapping(required=[value])
+ Definition object for a constant value of an encoding channel.
+
+ Attributes
+ ----------
+
+ value : float
+ A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values
+ between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "yError"
+
+ def __init__(self, value, **kwds):
+ super(YErrorValue, self).__init__(value=value, **kwds)
+
+
+class YError2(FieldChannelMixin, core.SecondaryFieldDef):
+ """YError2 schema wrapper
+
+ Mapping(required=[shorthand])
+ A field definition of a secondary channel that shares a scale with another primary channel.
+ For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``.
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : None
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "yError2"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, bin=Undefined, field=Undefined,
+ timeUnit=Undefined, title=Undefined, **kwds):
+ super(YError2, self).__init__(shorthand=shorthand, aggregate=aggregate, bin=bin, field=field,
+ timeUnit=timeUnit, title=title, **kwds)
+
+
+class YError2Value(ValueChannelMixin, core.NumberValueDef):
+ """YError2Value schema wrapper
+
+ Mapping(required=[value])
+ Definition object for a constant value of an encoding channel.
+
+ Attributes
+ ----------
+
+ value : float
+ A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values
+ between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "yError2"
+
+ def __init__(self, value, **kwds):
+ super(YError2Value, self).__init__(value=value, **kwds)
diff --git a/venv/lib/python3.9/site-packages/altair/vegalite/v3/schema/core.py b/venv/lib/python3.9/site-packages/altair/vegalite/v3/schema/core.py
new file mode 100644
index 00000000..7c101a7c
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vegalite/v3/schema/core.py
@@ -0,0 +1,16039 @@
+# The contents of this file are automatically written by
+# tools/generate_schema_wrapper.py. Do not modify directly.
+
+from altair.utils.schemapi import SchemaBase, Undefined, _subclasses
+
+import pkgutil
+import json
+
+def load_schema():
+ """Load the json schema associated with this module's functions"""
+ return json.loads(pkgutil.get_data(__name__, 'vega-lite-schema.json').decode('utf-8'))
+
+
+class VegaLiteSchema(SchemaBase):
+ _rootschema = load_schema()
+ @classmethod
+ def _default_wrapper_classes(cls):
+ return _subclasses(VegaLiteSchema)
+
+
+class Root(VegaLiteSchema):
+ """Root schema wrapper
+
+ anyOf(:class:`TopLevelUnitSpec`, :class:`TopLevelFacetSpec`, :class:`TopLevelLayerSpec`,
+ :class:`TopLevelRepeatSpec`, :class:`TopLevelConcatSpec`, :class:`TopLevelVConcatSpec`,
+ :class:`TopLevelHConcatSpec`)
+ A Vega-Lite top-level specification.
+ This is the root class for all Vega-Lite specifications.
+ (The json schema is generated from this type.)
+ """
+ _schema = VegaLiteSchema._rootschema
+
+ def __init__(self, *args, **kwds):
+ super(Root, self).__init__(*args, **kwds)
+
+
+class Aggregate(VegaLiteSchema):
+ """Aggregate schema wrapper
+
+ anyOf(:class:`AggregateOp`, :class:`ArgmaxDef`, :class:`ArgminDef`)
+ """
+ _schema = {'$ref': '#/definitions/Aggregate'}
+
+ def __init__(self, *args, **kwds):
+ super(Aggregate, self).__init__(*args, **kwds)
+
+
+class AggregateOp(Aggregate):
+ """AggregateOp schema wrapper
+
+ enum('argmax', 'argmin', 'average', 'count', 'distinct', 'max', 'mean', 'median', 'min',
+ 'missing', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values',
+ 'variance', 'variancep')
+ """
+ _schema = {'$ref': '#/definitions/AggregateOp'}
+
+ def __init__(self, *args):
+ super(AggregateOp, self).__init__(*args)
+
+
+class AggregatedFieldDef(VegaLiteSchema):
+ """AggregatedFieldDef schema wrapper
+
+ Mapping(required=[op, as])
+
+ Attributes
+ ----------
+
+ op : :class:`AggregateOp`
+ The aggregation operation to apply to the fields (e.g., sum, average or count).
+ See the `full list of supported aggregation operations
+ <https://vega.github.io/vega-lite/docs/aggregate.html#ops>`__
+ for more information.
+ field : :class:`FieldName`
+ The data field for which to compute aggregate function. This is required for all
+ aggregation operations except ``"count"``.
+ as : :class:`FieldName`
+ The output field names to use for each aggregated field.
+ """
+ _schema = {'$ref': '#/definitions/AggregatedFieldDef'}
+
+ def __init__(self, op=Undefined, field=Undefined, **kwds):
+ super(AggregatedFieldDef, self).__init__(op=op, field=field, **kwds)
+
+
+class Align(VegaLiteSchema):
+ """Align schema wrapper
+
+ enum('left', 'center', 'right')
+ """
+ _schema = {'$ref': '#/definitions/Align'}
+
+ def __init__(self, *args):
+ super(Align, self).__init__(*args)
+
+
+class AnyMark(VegaLiteSchema):
+ """AnyMark schema wrapper
+
+ anyOf(:class:`CompositeMark`, :class:`CompositeMarkDef`, :class:`Mark`, :class:`MarkDef`)
+ """
+ _schema = {'$ref': '#/definitions/AnyMark'}
+
+ def __init__(self, *args, **kwds):
+ super(AnyMark, self).__init__(*args, **kwds)
+
+
+class AreaConfig(VegaLiteSchema):
+ """AreaConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ align : :class:`Align`
+ The horizontal alignment of the text. One of ``"left"``, ``"right"``, ``"center"``.
+ angle : float
+ The rotation angle of the text, in degrees.
+ baseline : :class:`TextBaseline`
+ The vertical alignment of the text. One of ``"top"``, ``"middle"``, ``"bottom"``.
+
+ **Default value:** ``"middle"``
+ color : :class:`Color`
+ Default color. Note that ``fill`` and ``stroke`` have higher precedence than
+ ``color`` and will override ``color``.
+
+ **Default value:** :raw-html:`<span style="color: #4682b4;">&#9632;</span>`
+ ``"#4682b4"``
+
+ **Note:** This property cannot be used in a `style config
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
+ cornerRadius : float
+ The radius in pixels of rounded rectangle corners.
+
+ **Default value:** ``0``
+ cursor : :class:`Cursor`
+ The mouse cursor used over the mark. Any valid `CSS cursor type
+ <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.
+ dir : :class:`Dir`
+ The direction of the text. One of ``"ltr"`` (left-to-right) or ``"rtl"``
+ (right-to-left). This property determines on which side is truncated in response to
+ the limit parameter.
+
+ **Default value:** ``"ltr"``
+ dx : float
+ The horizontal offset, in pixels, between the text label and its anchor point. The
+ offset is applied after rotation by the *angle* property.
+ dy : float
+ The vertical offset, in pixels, between the text label and its anchor point. The
+ offset is applied after rotation by the *angle* property.
+ ellipsis : string
+ The ellipsis string for text truncated in response to the limit parameter.
+
+ **Default value:** ``"…"``
+ fill : :class:`Color`
+ Default Fill Color. This has higher precedence than ``config.color``
+
+ **Default value:** (None)
+ fillOpacity : float
+ The fill opacity (value between [0,1]).
+
+ **Default value:** ``1``
+ filled : boolean
+ Whether the mark's color should be used as fill color instead of stroke color.
+
+ **Default value:** ``false`` for ``point``, ``line`` and ``rule`` ; otherwise,
+ ``true``.
+
+ **Note:** This property cannot be used in a `style config
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
+ font : string
+ The typeface to set the text in (e.g., ``"Helvetica Neue"`` ).
+ fontSize : float
+ The font size, in pixels.
+ fontStyle : :class:`FontStyle`
+ The font style (e.g., ``"italic"`` ).
+ fontWeight : :class:`FontWeight`
+ The font weight.
+ This can be either a string (e.g ``"bold"``, ``"normal"`` ) or a number ( ``100``,
+ ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and ``"bold"`` = ``700``
+ ).
+ height : float
+ Height of the marks.
+ href : string
+ A URL to load upon mouse click. If defined, the mark acts as a hyperlink.
+ interpolate : :class:`Interpolate`
+ The line interpolation method to use for line and area marks. One of the following:
+
+
+ * ``"linear"`` : piecewise linear segments, as in a polyline.
+ * ``"linear-closed"`` : close the linear segments to form a polygon.
+ * ``"step"`` : alternate between horizontal and vertical segments, as in a step
+ function.
+ * ``"step-before"`` : alternate between vertical and horizontal segments, as in a
+ step function.
+ * ``"step-after"`` : alternate between horizontal and vertical segments, as in a
+ step function.
+ * ``"basis"`` : a B-spline, with control point duplication on the ends.
+ * ``"basis-open"`` : an open B-spline; may not intersect the start or end.
+ * ``"basis-closed"`` : a closed B-spline, as in a loop.
+ * ``"cardinal"`` : a Cardinal spline, with control point duplication on the ends.
+ * ``"cardinal-open"`` : an open Cardinal spline; may not intersect the start or end,
+ but will intersect other control points.
+ * ``"cardinal-closed"`` : a closed Cardinal spline, as in a loop.
+ * ``"bundle"`` : equivalent to basis, except the tension parameter is used to
+ straighten the spline.
+ * ``"monotone"`` : cubic interpolation that preserves monotonicity in y.
+ limit : float
+ The maximum length of the text mark in pixels. The text value will be automatically
+ truncated if the rendered size exceeds the limit.
+
+ **Default value:** ``0``, indicating no limit
+ line : anyOf(boolean, :class:`OverlayMarkDef`)
+ A flag for overlaying line on top of area marks, or an object defining the
+ properties of the overlayed lines.
+
+
+ If this value is an empty object ( ``{}`` ) or ``true``, lines with default
+ properties will be used.
+
+ If this value is ``false``, no lines would be automatically added to area marks.
+
+ **Default value:** ``false``.
+ opacity : float
+ The overall opacity (value between [0,1]).
+
+ **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,
+ ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.
+ order : anyOf(None, boolean)
+ For line and trail marks, this ``order`` property can be set to ``null`` or
+ ``false`` to make the lines use the original order in the data sources.
+ orient : :class:`Orientation`
+ The orientation of a non-stacked bar, tick, area, and line charts.
+ The value is either horizontal (default) or vertical.
+
+
+ * For bar, rule and tick, this determines whether the size of the bar and tick
+ should be applied to x or y dimension.
+ * For area, this property determines the orient property of the Vega output.
+ * For line and trail marks, this property determines the sort order of the points in
+ the line
+ if ``config.sortLineBy`` is not specified.
+ For stacked charts, this is always determined by the orientation of the stack;
+ therefore explicitly specified value will be ignored.
+ point : anyOf(boolean, :class:`OverlayMarkDef`, enum('transparent'))
+ A flag for overlaying points on top of line or area marks, or an object defining the
+ properties of the overlayed points.
+
+
+ If this property is ``"transparent"``, transparent points will be used (for
+ enhancing tooltips and selections).
+
+ If this property is an empty object ( ``{}`` ) or ``true``, filled points with
+ default properties will be used.
+
+ If this property is ``false``, no points would be automatically added to line or
+ area marks.
+
+ **Default value:** ``false``.
+ radius : float
+ Polar coordinate radial offset, in pixels, of the text label from the origin
+ determined by the ``x`` and ``y`` properties.
+ shape : string
+ Shape of the point marks. Supported values include:
+
+
+ * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``,
+ ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or
+ ``"triangle-left"``.
+ * the line symbol ``"stroke"``
+ * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"``
+ * a custom `SVG path string
+ <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct
+ sizing, custom shape paths should be defined within a square bounding box with
+ coordinates ranging from -1 to 1 along both the x and y dimensions.)
+
+ **Default value:** ``"circle"``
+ size : float
+ Default size for marks.
+
+
+ * For ``point`` / ``circle`` / ``square``, this represents the pixel area of the
+ marks. For example: in the case of circles, the radius is determined in part by
+ the square root of the size value.
+ * For ``bar``, this represents the band size of the bar, in pixels.
+ * For ``text``, this represents the font size, in pixels.
+
+ **Default value:** ``30`` for point, circle, square marks; ``rangeStep`` - 1 for bar
+ marks with discrete dimensions; ``5`` for bar marks with continuous dimensions;
+ ``11`` for text marks.
+ stroke : :class:`Color`
+ Default Stroke Color. This has higher precedence than ``config.color``
+
+ **Default value:** (None)
+ strokeCap : :class:`StrokeCap`
+ The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or
+ ``"square"``.
+
+ **Default value:** ``"square"``
+ strokeDash : List(float)
+ An array of alternating stroke, space lengths for creating dashed or dotted lines.
+ strokeDashOffset : float
+ The offset (in pixels) into which to begin drawing with the stroke dash array.
+ strokeJoin : :class:`StrokeJoin`
+ The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``.
+
+ **Default value:** ``"miter"``
+ strokeMiterLimit : float
+ The miter limit at which to bevel a line join.
+ strokeOpacity : float
+ The stroke opacity (value between [0,1]).
+
+ **Default value:** ``1``
+ strokeWidth : float
+ The stroke width, in pixels.
+ tension : float
+ Depending on the interpolation type, sets the tension parameter (for line and area
+ marks).
+ text : string
+ Placeholder text if the ``text`` channel is not specified
+ theta : float
+ Polar coordinate angle, in radians, of the text label from the origin determined by
+ the ``x`` and ``y`` properties. Values for ``theta`` follow the same convention of
+ ``arc`` mark ``startAngle`` and ``endAngle`` properties: angles are measured in
+ radians, with ``0`` indicating "north".
+ tooltip : anyOf(:class:`Value`, :class:`TooltipContent`, None)
+ The tooltip text string to show upon mouse hover or an object defining which fields
+ should the tooltip be derived from.
+
+
+ * If ``tooltip`` is ``{"content": "encoding"}``, then all fields from ``encoding``
+ will be used.
+ * If ``tooltip`` is ``{"content": "data"}``, then all fields that appear in the
+ highlighted data point will be used.
+ * If set to ``null``, then no tooltip will be used.
+ width : float
+ Width of the marks.
+ x : anyOf(float, enum('width'))
+ X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without
+ specified ``x2`` or ``width``.
+
+ The ``value`` of this channel can be a number or a string ``"width"`` for the width
+ of the plot.
+ x2 : anyOf(float, enum('width'))
+ X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
+
+ The ``value`` of this channel can be a number or a string ``"width"`` for the width
+ of the plot.
+ y : anyOf(float, enum('height'))
+ Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without
+ specified ``y2`` or ``height``.
+
+ The ``value`` of this channel can be a number or a string ``"height"`` for the
+ height of the plot.
+ y2 : anyOf(float, enum('width'))
+ Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
+
+ The ``value`` of this channel can be a number or a string ``"height"`` for the
+ height of the plot.
+ """
+ _schema = {'$ref': '#/definitions/AreaConfig'}
+
+ def __init__(self, align=Undefined, angle=Undefined, baseline=Undefined, color=Undefined,
+ cornerRadius=Undefined, cursor=Undefined, dir=Undefined, dx=Undefined, dy=Undefined,
+ ellipsis=Undefined, fill=Undefined, fillOpacity=Undefined, filled=Undefined,
+ font=Undefined, fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined,
+ height=Undefined, href=Undefined, interpolate=Undefined, limit=Undefined,
+ line=Undefined, opacity=Undefined, order=Undefined, orient=Undefined, point=Undefined,
+ radius=Undefined, shape=Undefined, size=Undefined, stroke=Undefined,
+ strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined,
+ strokeJoin=Undefined, strokeMiterLimit=Undefined, strokeOpacity=Undefined,
+ strokeWidth=Undefined, tension=Undefined, text=Undefined, theta=Undefined,
+ tooltip=Undefined, width=Undefined, x=Undefined, x2=Undefined, y=Undefined,
+ y2=Undefined, **kwds):
+ super(AreaConfig, self).__init__(align=align, angle=angle, baseline=baseline, color=color,
+ cornerRadius=cornerRadius, cursor=cursor, dir=dir, dx=dx,
+ dy=dy, ellipsis=ellipsis, fill=fill, fillOpacity=fillOpacity,
+ filled=filled, font=font, fontSize=fontSize,
+ fontStyle=fontStyle, fontWeight=fontWeight, height=height,
+ href=href, interpolate=interpolate, limit=limit, line=line,
+ opacity=opacity, order=order, orient=orient, point=point,
+ radius=radius, shape=shape, size=size, stroke=stroke,
+ strokeCap=strokeCap, strokeDash=strokeDash,
+ strokeDashOffset=strokeDashOffset, strokeJoin=strokeJoin,
+ strokeMiterLimit=strokeMiterLimit, strokeOpacity=strokeOpacity,
+ strokeWidth=strokeWidth, tension=tension, text=text,
+ theta=theta, tooltip=tooltip, width=width, x=x, x2=x2, y=y,
+ y2=y2, **kwds)
+
+
+class ArgmaxDef(Aggregate):
+ """ArgmaxDef schema wrapper
+
+ Mapping(required=[argmax])
+
+ Attributes
+ ----------
+
+ argmax : string
+
+ """
+ _schema = {'$ref': '#/definitions/ArgmaxDef'}
+
+ def __init__(self, argmax=Undefined, **kwds):
+ super(ArgmaxDef, self).__init__(argmax=argmax, **kwds)
+
+
+class ArgminDef(Aggregate):
+ """ArgminDef schema wrapper
+
+ Mapping(required=[argmin])
+
+ Attributes
+ ----------
+
+ argmin : string
+
+ """
+ _schema = {'$ref': '#/definitions/ArgminDef'}
+
+ def __init__(self, argmin=Undefined, **kwds):
+ super(ArgminDef, self).__init__(argmin=argmin, **kwds)
+
+
+class AutoSizeParams(VegaLiteSchema):
+ """AutoSizeParams schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ contains : enum('content', 'padding')
+ Determines how size calculation should be performed, one of ``"content"`` or
+ ``"padding"``. The default setting ( ``"content"`` ) interprets the width and height
+ settings as the data rectangle (plotting) dimensions, to which padding is then
+ added. In contrast, the ``"padding"`` setting includes the padding within the view
+ size calculations, such that the width and height settings indicate the **total**
+ intended size of the view.
+
+ **Default value** : ``"content"``
+ resize : boolean
+ A boolean flag indicating if autosize layout should be re-calculated on every view
+ update.
+
+ **Default value** : ``false``
+ type : :class:`AutosizeType`
+ The sizing format type. One of ``"pad"``, ``"fit"`` or ``"none"``. See the `autosize
+ type <https://vega.github.io/vega-lite/docs/size.html#autosize>`__ documentation for
+ descriptions of each.
+
+ **Default value** : ``"pad"``
+ """
+ _schema = {'$ref': '#/definitions/AutoSizeParams'}
+
+ def __init__(self, contains=Undefined, resize=Undefined, type=Undefined, **kwds):
+ super(AutoSizeParams, self).__init__(contains=contains, resize=resize, type=type, **kwds)
+
+
+class AutosizeType(VegaLiteSchema):
+ """AutosizeType schema wrapper
+
+ enum('pad', 'fit', 'none')
+ """
+ _schema = {'$ref': '#/definitions/AutosizeType'}
+
+ def __init__(self, *args):
+ super(AutosizeType, self).__init__(*args)
+
+
+class Axis(VegaLiteSchema):
+ """Axis schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ bandPosition : float
+ An interpolation fraction indicating where, for ``band`` scales, axis ticks should
+ be positioned. A value of ``0`` places ticks at the left edge of their bands. A
+ value of ``0.5`` places ticks in the middle of their bands.
+
+ **Default value:** ``0.5``
+ domain : boolean
+ A boolean flag indicating if the domain (the axis baseline) should be included as
+ part of the axis.
+
+ **Default value:** ``true``
+ domainColor : :class:`Color`
+ Color of axis domain line.
+
+ **Default value:** ``"gray"``.
+ domainDash : List(float)
+ An array of alternating [stroke, space] lengths for dashed domain lines.
+ domainDashOffset : float
+ The pixel offset at which to start drawing with the domain dash array.
+ domainOpacity : float
+ Opacity of the axis domain line.
+ domainWidth : float
+ Stroke width of axis domain line
+
+ **Default value:** ``1``
+ format : string
+ The text formatting pattern for labels of guides (axes, legends, headers) and text
+ marks.
+
+
+ * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
+ `number format pattern <https://github.com/d3/d3-format#locale_format>`__.
+ * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
+ format pattern <https://github.com/d3/d3-time-format#locale_format>`__.
+
+ See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
+ for more examples.
+
+ **Default value:** Derived from `numberFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
+ format and from `timeFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
+ format.
+ formatType : enum('number', 'time')
+ The format type for labels ( ``"number"`` or ``"time"`` ).
+
+ **Default value:**
+
+
+ * ``"time"`` for temporal fields and ordinal and nomimal fields with ``timeUnit``.
+ * ``"number"`` for quantitative fields as well as ordinal and nomimal fields without
+ ``timeUnit``.
+ grid : boolean
+ A boolean flag indicating if grid lines should be included as part of the axis
+
+ **Default value:** ``true`` for `continuous scales
+ <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__ that are not
+ binned; otherwise, ``false``.
+ gridColor : :class:`Color`
+ Color of gridlines.
+
+ **Default value:** ``"lightGray"``.
+ gridDash : List(float)
+ An array of alternating [stroke, space] lengths for dashed grid lines.
+ gridDashOffset : float
+ The pixel offset at which to start drawing with the grid dash array.
+ gridOpacity : float
+ The stroke opacity of grid (value between [0,1])
+
+ **Default value:** ``1``
+ gridWidth : float
+ The grid width, in pixels.
+
+ **Default value:** ``1``
+ labelAlign : :class:`Align`
+ Horizontal text alignment of axis tick labels, overriding the default setting for
+ the current axis orientation.
+ labelAngle : float
+ The rotation angle of the axis labels.
+
+ **Default value:** ``-90`` for nominal and ordinal fields; ``0`` otherwise.
+ labelBaseline : :class:`TextBaseline`
+ Vertical text baseline of axis tick labels, overriding the default setting for the
+ current axis orientation. Can be ``"top"``, ``"middle"``, ``"bottom"``, or
+ ``"alphabetic"``.
+ labelBound : anyOf(float, boolean)
+ Indicates if labels should be hidden if they exceed the axis range. If ``false``
+ (the default) no bounds overlap analysis is performed. If ``true``, labels will be
+ hidden if they exceed the axis range by more than 1 pixel. If this property is a
+ number, it specifies the pixel tolerance: the maximum amount by which a label
+ bounding box may exceed the axis range.
+
+ **Default value:** ``false``.
+ labelColor : :class:`Color`
+ The color of the tick label, can be in hex color code or regular color name.
+ labelFlush : anyOf(boolean, float)
+ Indicates if the first and last axis labels should be aligned flush with the scale
+ range. Flush alignment for a horizontal axis will left-align the first label and
+ right-align the last label. For vertical axes, bottom and top text baselines are
+ applied instead. If this property is a number, it also indicates the number of
+ pixels by which to offset the first and last labels; for example, a value of 2 will
+ flush-align the first and last labels and also push them 2 pixels outward from the
+ center of the axis. The additional adjustment can sometimes help the labels better
+ visually group with corresponding axis ticks.
+
+ **Default value:** ``true`` for axis of a continuous x-scale. Otherwise, ``false``.
+ labelFlushOffset : float
+ Indicates the number of pixels by which to offset flush-adjusted labels. For
+ example, a value of ``2`` will push flush-adjusted labels 2 pixels outward from the
+ center of the axis. Offsets can help the labels better visually group with
+ corresponding axis ticks.
+
+ **Default value:** ``0``.
+ labelFont : string
+ The font of the tick label.
+ labelFontSize : float
+ The font size of the label, in pixels.
+ labelFontStyle : :class:`FontStyle`
+ Font style of the title.
+ labelFontWeight : :class:`FontWeight`
+ Font weight of axis tick labels.
+ labelLimit : float
+ Maximum allowed pixel width of axis tick labels.
+
+ **Default value:** ``180``
+ labelOpacity : float
+ The opacity of the labels.
+ labelOverlap : :class:`LabelOverlap`
+ The strategy to use for resolving overlap of axis labels. If ``false`` (the
+ default), no overlap reduction is attempted. If set to ``true`` or ``"parity"``, a
+ strategy of removing every other label is used (this works well for standard linear
+ axes). If set to ``"greedy"``, a linear scan of the labels is performed, removing
+ any labels that overlaps with the last visible label (this often works better for
+ log-scaled axes).
+
+ **Default value:** ``true`` for non-nominal fields with non-log scales; ``"greedy"``
+ for log scales; otherwise ``false``.
+ labelPadding : float
+ The padding, in pixels, between axis and text labels.
+
+ **Default value:** ``2``
+ labelSeparation : float
+ The minimum separation that must be between label bounding boxes for them to be
+ considered non-overlapping (default ``0`` ). This property is ignored if
+ *labelOverlap* resolution is not enabled.
+ labels : boolean
+ A boolean flag indicating if labels should be included as part of the axis.
+
+ **Default value:** ``true``.
+ maxExtent : float
+ The maximum extent in pixels that axis ticks and labels should use. This determines
+ a maximum offset value for axis titles.
+
+ **Default value:** ``undefined``.
+ minExtent : float
+ The minimum extent in pixels that axis ticks and labels should use. This determines
+ a minimum offset value for axis titles.
+
+ **Default value:** ``30`` for y-axis; ``undefined`` for x-axis.
+ offset : float
+ The offset, in pixels, by which to displace the axis from the edge of the enclosing
+ group or data rectangle.
+
+ **Default value:** derived from the `axis config
+ <https://vega.github.io/vega-lite/docs/config.html#facet-scale-config>`__ 's
+ ``offset`` ( ``0`` by default)
+ orient : :class:`AxisOrient`
+ The orientation of the axis. One of ``"top"``, ``"bottom"``, ``"left"`` or
+ ``"right"``. The orientation can be used to further specialize the axis type (e.g.,
+ a y-axis oriented towards the right edge of the chart).
+
+ **Default value:** ``"bottom"`` for x-axes and ``"left"`` for y-axes.
+ position : float
+ The anchor position of the axis in pixels. For x-axes with top or bottom
+ orientation, this sets the axis group x coordinate. For y-axes with left or right
+ orientation, this sets the axis group y coordinate.
+
+ **Default value** : ``0``
+ tickColor : :class:`Color`
+ The color of the axis's tick.
+
+ **Default value:** ``"gray"``
+ tickCount : float
+ A desired number of ticks, for axes visualizing quantitative scales. The resulting
+ number may be different so that values are "nice" (multiples of 2, 5, 10) and lie
+ within the underlying scale's range.
+ tickDash : List(float)
+ An array of alternating [stroke, space] lengths for dashed tick mark lines.
+ tickDashOffset : float
+ The pixel offset at which to start drawing with the tick mark dash array.
+ tickExtra : boolean
+ Boolean flag indicating if an extra axis tick should be added for the initial
+ position of the axis. This flag is useful for styling axes for ``band`` scales such
+ that ticks are placed on band boundaries rather in the middle of a band. Use in
+ conjunction with ``"bandPosition": 1`` and an axis ``"padding"`` value of ``0``.
+ tickMinStep : float
+ The minimum desired step between axis ticks, in terms of scale domain values. For
+ example, a value of ``1`` indicates that ticks should not be less than 1 unit apart.
+ If ``tickMinStep`` is specified, the ``tickCount`` value will be adjusted, if
+ necessary, to enforce the minimum step value.
+
+ **Default value** : ``undefined``
+ tickOffset : float
+ Position offset in pixels to apply to ticks, labels, and gridlines.
+ tickOpacity : float
+ Opacity of the ticks.
+ tickRound : boolean
+ Boolean flag indicating if pixel position values should be rounded to the nearest
+ integer.
+
+ **Default value:** ``true``
+ tickSize : float
+ The size in pixels of axis ticks.
+
+ **Default value:** ``5``
+ tickWidth : float
+ The width, in pixels, of ticks.
+
+ **Default value:** ``1``
+ ticks : boolean
+ Boolean value that determines whether the axis should include ticks.
+
+ **Default value:** ``true``
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ titleAlign : :class:`Align`
+ Horizontal text alignment of axis titles.
+ titleAnchor : :class:`TitleAnchor`
+ Text anchor position for placing axis titles.
+ titleAngle : float
+ Angle in degrees of axis titles.
+ titleBaseline : :class:`TextBaseline`
+ Vertical text baseline for axis titles.
+ titleColor : :class:`Color`
+ Color of the title, can be in hex color code or regular color name.
+ titleFont : string
+ Font of the title. (e.g., ``"Helvetica Neue"`` ).
+ titleFontSize : float
+ Font size of the title.
+ titleFontStyle : :class:`FontStyle`
+ Font style of the title.
+ titleFontWeight : :class:`FontWeight`
+ Font weight of the title.
+ This can be either a string (e.g ``"bold"``, ``"normal"`` ) or a number ( ``100``,
+ ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and ``"bold"`` = ``700``
+ ).
+ titleLimit : float
+ Maximum allowed pixel width of axis titles.
+ titleOpacity : float
+ Opacity of the axis title.
+ titlePadding : float
+ The padding, in pixels, between title and axis.
+ titleX : float
+ X-coordinate of the axis title relative to the axis group.
+ titleY : float
+ Y-coordinate of the axis title relative to the axis group.
+ values : anyOf(List(float), List(string), List(boolean), List(:class:`DateTime`))
+ Explicitly set the visible axis tick values.
+ zindex : float
+ A non-negative integer indicating the z-index of the axis.
+ If zindex is 0, axes should be drawn behind all chart elements.
+ To put them in front, use ``"zindex = 1"``.
+
+ **Default value:** ``1`` (in front of the marks) for actual axis and ``0`` (behind
+ the marks) for grids.
+ """
+ _schema = {'$ref': '#/definitions/Axis'}
+
+ def __init__(self, bandPosition=Undefined, domain=Undefined, domainColor=Undefined,
+ domainDash=Undefined, domainDashOffset=Undefined, domainOpacity=Undefined,
+ domainWidth=Undefined, format=Undefined, formatType=Undefined, grid=Undefined,
+ gridColor=Undefined, gridDash=Undefined, gridDashOffset=Undefined,
+ gridOpacity=Undefined, gridWidth=Undefined, labelAlign=Undefined, labelAngle=Undefined,
+ labelBaseline=Undefined, labelBound=Undefined, labelColor=Undefined,
+ labelFlush=Undefined, labelFlushOffset=Undefined, labelFont=Undefined,
+ labelFontSize=Undefined, labelFontStyle=Undefined, labelFontWeight=Undefined,
+ labelLimit=Undefined, labelOpacity=Undefined, labelOverlap=Undefined,
+ labelPadding=Undefined, labelSeparation=Undefined, labels=Undefined,
+ maxExtent=Undefined, minExtent=Undefined, offset=Undefined, orient=Undefined,
+ position=Undefined, tickColor=Undefined, tickCount=Undefined, tickDash=Undefined,
+ tickDashOffset=Undefined, tickExtra=Undefined, tickMinStep=Undefined,
+ tickOffset=Undefined, tickOpacity=Undefined, tickRound=Undefined, tickSize=Undefined,
+ tickWidth=Undefined, ticks=Undefined, title=Undefined, titleAlign=Undefined,
+ titleAnchor=Undefined, titleAngle=Undefined, titleBaseline=Undefined,
+ titleColor=Undefined, titleFont=Undefined, titleFontSize=Undefined,
+ titleFontStyle=Undefined, titleFontWeight=Undefined, titleLimit=Undefined,
+ titleOpacity=Undefined, titlePadding=Undefined, titleX=Undefined, titleY=Undefined,
+ values=Undefined, zindex=Undefined, **kwds):
+ super(Axis, self).__init__(bandPosition=bandPosition, domain=domain, domainColor=domainColor,
+ domainDash=domainDash, domainDashOffset=domainDashOffset,
+ domainOpacity=domainOpacity, domainWidth=domainWidth, format=format,
+ formatType=formatType, grid=grid, gridColor=gridColor,
+ gridDash=gridDash, gridDashOffset=gridDashOffset,
+ gridOpacity=gridOpacity, gridWidth=gridWidth, labelAlign=labelAlign,
+ labelAngle=labelAngle, labelBaseline=labelBaseline,
+ labelBound=labelBound, labelColor=labelColor, labelFlush=labelFlush,
+ labelFlushOffset=labelFlushOffset, labelFont=labelFont,
+ labelFontSize=labelFontSize, labelFontStyle=labelFontStyle,
+ labelFontWeight=labelFontWeight, labelLimit=labelLimit,
+ labelOpacity=labelOpacity, labelOverlap=labelOverlap,
+ labelPadding=labelPadding, labelSeparation=labelSeparation,
+ labels=labels, maxExtent=maxExtent, minExtent=minExtent,
+ offset=offset, orient=orient, position=position, tickColor=tickColor,
+ tickCount=tickCount, tickDash=tickDash,
+ tickDashOffset=tickDashOffset, tickExtra=tickExtra,
+ tickMinStep=tickMinStep, tickOffset=tickOffset,
+ tickOpacity=tickOpacity, tickRound=tickRound, tickSize=tickSize,
+ tickWidth=tickWidth, ticks=ticks, title=title, titleAlign=titleAlign,
+ titleAnchor=titleAnchor, titleAngle=titleAngle,
+ titleBaseline=titleBaseline, titleColor=titleColor,
+ titleFont=titleFont, titleFontSize=titleFontSize,
+ titleFontStyle=titleFontStyle, titleFontWeight=titleFontWeight,
+ titleLimit=titleLimit, titleOpacity=titleOpacity,
+ titlePadding=titlePadding, titleX=titleX, titleY=titleY,
+ values=values, zindex=zindex, **kwds)
+
+
+class AxisConfig(VegaLiteSchema):
+ """AxisConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ bandPosition : float
+ An interpolation fraction indicating where, for ``band`` scales, axis ticks should
+ be positioned. A value of ``0`` places ticks at the left edge of their bands. A
+ value of ``0.5`` places ticks in the middle of their bands.
+
+ **Default value:** ``0.5``
+ domain : boolean
+ A boolean flag indicating if the domain (the axis baseline) should be included as
+ part of the axis.
+
+ **Default value:** ``true``
+ domainColor : :class:`Color`
+ Color of axis domain line.
+
+ **Default value:** ``"gray"``.
+ domainDash : List(float)
+ An array of alternating [stroke, space] lengths for dashed domain lines.
+ domainDashOffset : float
+ The pixel offset at which to start drawing with the domain dash array.
+ domainOpacity : float
+ Opacity of the axis domain line.
+ domainWidth : float
+ Stroke width of axis domain line
+
+ **Default value:** ``1``
+ grid : boolean
+ A boolean flag indicating if grid lines should be included as part of the axis
+
+ **Default value:** ``true`` for `continuous scales
+ <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__ that are not
+ binned; otherwise, ``false``.
+ gridColor : :class:`Color`
+ Color of gridlines.
+
+ **Default value:** ``"lightGray"``.
+ gridDash : List(float)
+ An array of alternating [stroke, space] lengths for dashed grid lines.
+ gridDashOffset : float
+ The pixel offset at which to start drawing with the grid dash array.
+ gridOpacity : float
+ The stroke opacity of grid (value between [0,1])
+
+ **Default value:** ``1``
+ gridWidth : float
+ The grid width, in pixels.
+
+ **Default value:** ``1``
+ labelAlign : :class:`Align`
+ Horizontal text alignment of axis tick labels, overriding the default setting for
+ the current axis orientation.
+ labelAngle : float
+ The rotation angle of the axis labels.
+
+ **Default value:** ``-90`` for nominal and ordinal fields; ``0`` otherwise.
+ labelBaseline : :class:`TextBaseline`
+ Vertical text baseline of axis tick labels, overriding the default setting for the
+ current axis orientation. Can be ``"top"``, ``"middle"``, ``"bottom"``, or
+ ``"alphabetic"``.
+ labelBound : anyOf(float, boolean)
+ Indicates if labels should be hidden if they exceed the axis range. If ``false``
+ (the default) no bounds overlap analysis is performed. If ``true``, labels will be
+ hidden if they exceed the axis range by more than 1 pixel. If this property is a
+ number, it specifies the pixel tolerance: the maximum amount by which a label
+ bounding box may exceed the axis range.
+
+ **Default value:** ``false``.
+ labelColor : :class:`Color`
+ The color of the tick label, can be in hex color code or regular color name.
+ labelFlush : anyOf(boolean, float)
+ Indicates if the first and last axis labels should be aligned flush with the scale
+ range. Flush alignment for a horizontal axis will left-align the first label and
+ right-align the last label. For vertical axes, bottom and top text baselines are
+ applied instead. If this property is a number, it also indicates the number of
+ pixels by which to offset the first and last labels; for example, a value of 2 will
+ flush-align the first and last labels and also push them 2 pixels outward from the
+ center of the axis. The additional adjustment can sometimes help the labels better
+ visually group with corresponding axis ticks.
+
+ **Default value:** ``true`` for axis of a continuous x-scale. Otherwise, ``false``.
+ labelFlushOffset : float
+ Indicates the number of pixels by which to offset flush-adjusted labels. For
+ example, a value of ``2`` will push flush-adjusted labels 2 pixels outward from the
+ center of the axis. Offsets can help the labels better visually group with
+ corresponding axis ticks.
+
+ **Default value:** ``0``.
+ labelFont : string
+ The font of the tick label.
+ labelFontSize : float
+ The font size of the label, in pixels.
+ labelFontStyle : :class:`FontStyle`
+ Font style of the title.
+ labelFontWeight : :class:`FontWeight`
+ Font weight of axis tick labels.
+ labelLimit : float
+ Maximum allowed pixel width of axis tick labels.
+
+ **Default value:** ``180``
+ labelOpacity : float
+ The opacity of the labels.
+ labelOverlap : :class:`LabelOverlap`
+ The strategy to use for resolving overlap of axis labels. If ``false`` (the
+ default), no overlap reduction is attempted. If set to ``true`` or ``"parity"``, a
+ strategy of removing every other label is used (this works well for standard linear
+ axes). If set to ``"greedy"``, a linear scan of the labels is performed, removing
+ any labels that overlaps with the last visible label (this often works better for
+ log-scaled axes).
+
+ **Default value:** ``true`` for non-nominal fields with non-log scales; ``"greedy"``
+ for log scales; otherwise ``false``.
+ labelPadding : float
+ The padding, in pixels, between axis and text labels.
+
+ **Default value:** ``2``
+ labelSeparation : float
+ The minimum separation that must be between label bounding boxes for them to be
+ considered non-overlapping (default ``0`` ). This property is ignored if
+ *labelOverlap* resolution is not enabled.
+ labels : boolean
+ A boolean flag indicating if labels should be included as part of the axis.
+
+ **Default value:** ``true``.
+ maxExtent : float
+ The maximum extent in pixels that axis ticks and labels should use. This determines
+ a maximum offset value for axis titles.
+
+ **Default value:** ``undefined``.
+ minExtent : float
+ The minimum extent in pixels that axis ticks and labels should use. This determines
+ a minimum offset value for axis titles.
+
+ **Default value:** ``30`` for y-axis; ``undefined`` for x-axis.
+ orient : :class:`AxisOrient`
+ The orientation of the axis. One of ``"top"``, ``"bottom"``, ``"left"`` or
+ ``"right"``. The orientation can be used to further specialize the axis type (e.g.,
+ a y-axis oriented towards the right edge of the chart).
+
+ **Default value:** ``"bottom"`` for x-axes and ``"left"`` for y-axes.
+ shortTimeLabels : boolean
+ Whether month names and weekday names should be abbreviated.
+
+ **Default value:** ``false``
+ tickColor : :class:`Color`
+ The color of the axis's tick.
+
+ **Default value:** ``"gray"``
+ tickDash : List(float)
+ An array of alternating [stroke, space] lengths for dashed tick mark lines.
+ tickDashOffset : float
+ The pixel offset at which to start drawing with the tick mark dash array.
+ tickExtra : boolean
+ Boolean flag indicating if an extra axis tick should be added for the initial
+ position of the axis. This flag is useful for styling axes for ``band`` scales such
+ that ticks are placed on band boundaries rather in the middle of a band. Use in
+ conjunction with ``"bandPosition": 1`` and an axis ``"padding"`` value of ``0``.
+ tickOffset : float
+ Position offset in pixels to apply to ticks, labels, and gridlines.
+ tickOpacity : float
+ Opacity of the ticks.
+ tickRound : boolean
+ Boolean flag indicating if pixel position values should be rounded to the nearest
+ integer.
+
+ **Default value:** ``true``
+ tickSize : float
+ The size in pixels of axis ticks.
+
+ **Default value:** ``5``
+ tickWidth : float
+ The width, in pixels, of ticks.
+
+ **Default value:** ``1``
+ ticks : boolean
+ Boolean value that determines whether the axis should include ticks.
+
+ **Default value:** ``true``
+ title : None
+ Set to null to disable title for the axis, legend, or header.
+ titleAlign : :class:`Align`
+ Horizontal text alignment of axis titles.
+ titleAnchor : :class:`TitleAnchor`
+ Text anchor position for placing axis titles.
+ titleAngle : float
+ Angle in degrees of axis titles.
+ titleBaseline : :class:`TextBaseline`
+ Vertical text baseline for axis titles.
+ titleColor : :class:`Color`
+ Color of the title, can be in hex color code or regular color name.
+ titleFont : string
+ Font of the title. (e.g., ``"Helvetica Neue"`` ).
+ titleFontSize : float
+ Font size of the title.
+ titleFontStyle : :class:`FontStyle`
+ Font style of the title.
+ titleFontWeight : :class:`FontWeight`
+ Font weight of the title.
+ This can be either a string (e.g ``"bold"``, ``"normal"`` ) or a number ( ``100``,
+ ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and ``"bold"`` = ``700``
+ ).
+ titleLimit : float
+ Maximum allowed pixel width of axis titles.
+ titleOpacity : float
+ Opacity of the axis title.
+ titlePadding : float
+ The padding, in pixels, between title and axis.
+ titleX : float
+ X-coordinate of the axis title relative to the axis group.
+ titleY : float
+ Y-coordinate of the axis title relative to the axis group.
+ """
+ _schema = {'$ref': '#/definitions/AxisConfig'}
+
+ def __init__(self, bandPosition=Undefined, domain=Undefined, domainColor=Undefined,
+ domainDash=Undefined, domainDashOffset=Undefined, domainOpacity=Undefined,
+ domainWidth=Undefined, grid=Undefined, gridColor=Undefined, gridDash=Undefined,
+ gridDashOffset=Undefined, gridOpacity=Undefined, gridWidth=Undefined,
+ labelAlign=Undefined, labelAngle=Undefined, labelBaseline=Undefined,
+ labelBound=Undefined, labelColor=Undefined, labelFlush=Undefined,
+ labelFlushOffset=Undefined, labelFont=Undefined, labelFontSize=Undefined,
+ labelFontStyle=Undefined, labelFontWeight=Undefined, labelLimit=Undefined,
+ labelOpacity=Undefined, labelOverlap=Undefined, labelPadding=Undefined,
+ labelSeparation=Undefined, labels=Undefined, maxExtent=Undefined, minExtent=Undefined,
+ orient=Undefined, shortTimeLabels=Undefined, tickColor=Undefined, tickDash=Undefined,
+ tickDashOffset=Undefined, tickExtra=Undefined, tickOffset=Undefined,
+ tickOpacity=Undefined, tickRound=Undefined, tickSize=Undefined, tickWidth=Undefined,
+ ticks=Undefined, title=Undefined, titleAlign=Undefined, titleAnchor=Undefined,
+ titleAngle=Undefined, titleBaseline=Undefined, titleColor=Undefined,
+ titleFont=Undefined, titleFontSize=Undefined, titleFontStyle=Undefined,
+ titleFontWeight=Undefined, titleLimit=Undefined, titleOpacity=Undefined,
+ titlePadding=Undefined, titleX=Undefined, titleY=Undefined, **kwds):
+ super(AxisConfig, self).__init__(bandPosition=bandPosition, domain=domain,
+ domainColor=domainColor, domainDash=domainDash,
+ domainDashOffset=domainDashOffset, domainOpacity=domainOpacity,
+ domainWidth=domainWidth, grid=grid, gridColor=gridColor,
+ gridDash=gridDash, gridDashOffset=gridDashOffset,
+ gridOpacity=gridOpacity, gridWidth=gridWidth,
+ labelAlign=labelAlign, labelAngle=labelAngle,
+ labelBaseline=labelBaseline, labelBound=labelBound,
+ labelColor=labelColor, labelFlush=labelFlush,
+ labelFlushOffset=labelFlushOffset, labelFont=labelFont,
+ labelFontSize=labelFontSize, labelFontStyle=labelFontStyle,
+ labelFontWeight=labelFontWeight, labelLimit=labelLimit,
+ labelOpacity=labelOpacity, labelOverlap=labelOverlap,
+ labelPadding=labelPadding, labelSeparation=labelSeparation,
+ labels=labels, maxExtent=maxExtent, minExtent=minExtent,
+ orient=orient, shortTimeLabels=shortTimeLabels,
+ tickColor=tickColor, tickDash=tickDash,
+ tickDashOffset=tickDashOffset, tickExtra=tickExtra,
+ tickOffset=tickOffset, tickOpacity=tickOpacity,
+ tickRound=tickRound, tickSize=tickSize, tickWidth=tickWidth,
+ ticks=ticks, title=title, titleAlign=titleAlign,
+ titleAnchor=titleAnchor, titleAngle=titleAngle,
+ titleBaseline=titleBaseline, titleColor=titleColor,
+ titleFont=titleFont, titleFontSize=titleFontSize,
+ titleFontStyle=titleFontStyle, titleFontWeight=titleFontWeight,
+ titleLimit=titleLimit, titleOpacity=titleOpacity,
+ titlePadding=titlePadding, titleX=titleX, titleY=titleY, **kwds)
+
+
+class AxisOrient(VegaLiteSchema):
+ """AxisOrient schema wrapper
+
+ enum('top', 'bottom', 'left', 'right')
+ """
+ _schema = {'$ref': '#/definitions/AxisOrient'}
+
+ def __init__(self, *args):
+ super(AxisOrient, self).__init__(*args)
+
+
+class AxisResolveMap(VegaLiteSchema):
+ """AxisResolveMap schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ x : :class:`ResolveMode`
+
+ y : :class:`ResolveMode`
+
+ """
+ _schema = {'$ref': '#/definitions/AxisResolveMap'}
+
+ def __init__(self, x=Undefined, y=Undefined, **kwds):
+ super(AxisResolveMap, self).__init__(x=x, y=y, **kwds)
+
+
+class BaseLegendLayout(VegaLiteSchema):
+ """BaseLegendLayout schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ anchor : :class:`TitleAnchor`
+ The anchor point for legend orient group layout.
+ bounds : :class:`LayoutBounds`
+ The bounds calculation to use for legend orient group layout.
+ center : anyOf(boolean, :class:`SignalRef`)
+ A flag to center legends within a shared orient group.
+ direction : anyOf(:class:`Orientation`, :class:`SignalRef`)
+ The layout direction for legend orient group layout.
+ margin : anyOf(float, :class:`SignalRef`)
+ The pixel margin between legends within a orient group.
+ offset : anyOf(float, :class:`SignalRef`)
+ The pixel offset from the chart body for a legend orient group.
+ """
+ _schema = {'$ref': '#/definitions/BaseLegendLayout'}
+
+ def __init__(self, anchor=Undefined, bounds=Undefined, center=Undefined, direction=Undefined,
+ margin=Undefined, offset=Undefined, **kwds):
+ super(BaseLegendLayout, self).__init__(anchor=anchor, bounds=bounds, center=center,
+ direction=direction, margin=margin, offset=offset, **kwds)
+
+
+class BaseMarkConfig(VegaLiteSchema):
+ """BaseMarkConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ align : :class:`Align`
+ The horizontal alignment of the text. One of ``"left"``, ``"right"``, ``"center"``.
+ angle : float
+ The rotation angle of the text, in degrees.
+ baseline : :class:`TextBaseline`
+ The vertical alignment of the text. One of ``"top"``, ``"middle"``, ``"bottom"``.
+
+ **Default value:** ``"middle"``
+ cornerRadius : float
+ The radius in pixels of rounded rectangle corners.
+
+ **Default value:** ``0``
+ cursor : :class:`Cursor`
+ The mouse cursor used over the mark. Any valid `CSS cursor type
+ <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.
+ dir : :class:`Dir`
+ The direction of the text. One of ``"ltr"`` (left-to-right) or ``"rtl"``
+ (right-to-left). This property determines on which side is truncated in response to
+ the limit parameter.
+
+ **Default value:** ``"ltr"``
+ dx : float
+ The horizontal offset, in pixels, between the text label and its anchor point. The
+ offset is applied after rotation by the *angle* property.
+ dy : float
+ The vertical offset, in pixels, between the text label and its anchor point. The
+ offset is applied after rotation by the *angle* property.
+ ellipsis : string
+ The ellipsis string for text truncated in response to the limit parameter.
+
+ **Default value:** ``"…"``
+ fill : :class:`Color`
+ Default Fill Color. This has higher precedence than ``config.color``
+
+ **Default value:** (None)
+ fillOpacity : float
+ The fill opacity (value between [0,1]).
+
+ **Default value:** ``1``
+ font : string
+ The typeface to set the text in (e.g., ``"Helvetica Neue"`` ).
+ fontSize : float
+ The font size, in pixels.
+ fontStyle : :class:`FontStyle`
+ The font style (e.g., ``"italic"`` ).
+ fontWeight : :class:`FontWeight`
+ The font weight.
+ This can be either a string (e.g ``"bold"``, ``"normal"`` ) or a number ( ``100``,
+ ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and ``"bold"`` = ``700``
+ ).
+ height : float
+ Height of the marks.
+ href : string
+ A URL to load upon mouse click. If defined, the mark acts as a hyperlink.
+ interpolate : :class:`Interpolate`
+ The line interpolation method to use for line and area marks. One of the following:
+
+
+ * ``"linear"`` : piecewise linear segments, as in a polyline.
+ * ``"linear-closed"`` : close the linear segments to form a polygon.
+ * ``"step"`` : alternate between horizontal and vertical segments, as in a step
+ function.
+ * ``"step-before"`` : alternate between vertical and horizontal segments, as in a
+ step function.
+ * ``"step-after"`` : alternate between horizontal and vertical segments, as in a
+ step function.
+ * ``"basis"`` : a B-spline, with control point duplication on the ends.
+ * ``"basis-open"`` : an open B-spline; may not intersect the start or end.
+ * ``"basis-closed"`` : a closed B-spline, as in a loop.
+ * ``"cardinal"`` : a Cardinal spline, with control point duplication on the ends.
+ * ``"cardinal-open"`` : an open Cardinal spline; may not intersect the start or end,
+ but will intersect other control points.
+ * ``"cardinal-closed"`` : a closed Cardinal spline, as in a loop.
+ * ``"bundle"`` : equivalent to basis, except the tension parameter is used to
+ straighten the spline.
+ * ``"monotone"`` : cubic interpolation that preserves monotonicity in y.
+ limit : float
+ The maximum length of the text mark in pixels. The text value will be automatically
+ truncated if the rendered size exceeds the limit.
+
+ **Default value:** ``0``, indicating no limit
+ opacity : float
+ The overall opacity (value between [0,1]).
+
+ **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,
+ ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.
+ orient : :class:`Orientation`
+ The orientation of a non-stacked bar, tick, area, and line charts.
+ The value is either horizontal (default) or vertical.
+
+
+ * For bar, rule and tick, this determines whether the size of the bar and tick
+ should be applied to x or y dimension.
+ * For area, this property determines the orient property of the Vega output.
+ * For line and trail marks, this property determines the sort order of the points in
+ the line
+ if ``config.sortLineBy`` is not specified.
+ For stacked charts, this is always determined by the orientation of the stack;
+ therefore explicitly specified value will be ignored.
+ radius : float
+ Polar coordinate radial offset, in pixels, of the text label from the origin
+ determined by the ``x`` and ``y`` properties.
+ shape : string
+ Shape of the point marks. Supported values include:
+
+
+ * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``,
+ ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or
+ ``"triangle-left"``.
+ * the line symbol ``"stroke"``
+ * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"``
+ * a custom `SVG path string
+ <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct
+ sizing, custom shape paths should be defined within a square bounding box with
+ coordinates ranging from -1 to 1 along both the x and y dimensions.)
+
+ **Default value:** ``"circle"``
+ size : float
+ The pixel area each the point/circle/square.
+ For example: in the case of circles, the radius is determined in part by the square
+ root of the size value.
+
+ **Default value:** ``30``
+ stroke : :class:`Color`
+ Default Stroke Color. This has higher precedence than ``config.color``
+
+ **Default value:** (None)
+ strokeCap : :class:`StrokeCap`
+ The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or
+ ``"square"``.
+
+ **Default value:** ``"square"``
+ strokeDash : List(float)
+ An array of alternating stroke, space lengths for creating dashed or dotted lines.
+ strokeDashOffset : float
+ The offset (in pixels) into which to begin drawing with the stroke dash array.
+ strokeJoin : :class:`StrokeJoin`
+ The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``.
+
+ **Default value:** ``"miter"``
+ strokeMiterLimit : float
+ The miter limit at which to bevel a line join.
+ strokeOpacity : float
+ The stroke opacity (value between [0,1]).
+
+ **Default value:** ``1``
+ strokeWidth : float
+ The stroke width, in pixels.
+ tension : float
+ Depending on the interpolation type, sets the tension parameter (for line and area
+ marks).
+ text : string
+ Placeholder text if the ``text`` channel is not specified
+ theta : float
+ Polar coordinate angle, in radians, of the text label from the origin determined by
+ the ``x`` and ``y`` properties. Values for ``theta`` follow the same convention of
+ ``arc`` mark ``startAngle`` and ``endAngle`` properties: angles are measured in
+ radians, with ``0`` indicating "north".
+ tooltip : Any
+ The tooltip text to show upon mouse hover.
+ width : float
+ Width of the marks.
+ x : anyOf(float, enum('width'))
+ X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without
+ specified ``x2`` or ``width``.
+
+ The ``value`` of this channel can be a number or a string ``"width"`` for the width
+ of the plot.
+ x2 : anyOf(float, enum('width'))
+ X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
+
+ The ``value`` of this channel can be a number or a string ``"width"`` for the width
+ of the plot.
+ y : anyOf(float, enum('height'))
+ Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without
+ specified ``y2`` or ``height``.
+
+ The ``value`` of this channel can be a number or a string ``"height"`` for the
+ height of the plot.
+ y2 : anyOf(float, enum('width'))
+ Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
+
+ The ``value`` of this channel can be a number or a string ``"height"`` for the
+ height of the plot.
+ """
+ _schema = {'$ref': '#/definitions/BaseMarkConfig'}
+
+ def __init__(self, align=Undefined, angle=Undefined, baseline=Undefined, cornerRadius=Undefined,
+ cursor=Undefined, dir=Undefined, dx=Undefined, dy=Undefined, ellipsis=Undefined,
+ fill=Undefined, fillOpacity=Undefined, font=Undefined, fontSize=Undefined,
+ fontStyle=Undefined, fontWeight=Undefined, height=Undefined, href=Undefined,
+ interpolate=Undefined, limit=Undefined, opacity=Undefined, orient=Undefined,
+ radius=Undefined, shape=Undefined, size=Undefined, stroke=Undefined,
+ strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined,
+ strokeJoin=Undefined, strokeMiterLimit=Undefined, strokeOpacity=Undefined,
+ strokeWidth=Undefined, tension=Undefined, text=Undefined, theta=Undefined,
+ tooltip=Undefined, width=Undefined, x=Undefined, x2=Undefined, y=Undefined,
+ y2=Undefined, **kwds):
+ super(BaseMarkConfig, self).__init__(align=align, angle=angle, baseline=baseline,
+ cornerRadius=cornerRadius, cursor=cursor, dir=dir, dx=dx,
+ dy=dy, ellipsis=ellipsis, fill=fill,
+ fillOpacity=fillOpacity, font=font, fontSize=fontSize,
+ fontStyle=fontStyle, fontWeight=fontWeight, height=height,
+ href=href, interpolate=interpolate, limit=limit,
+ opacity=opacity, orient=orient, radius=radius, shape=shape,
+ size=size, stroke=stroke, strokeCap=strokeCap,
+ strokeDash=strokeDash, strokeDashOffset=strokeDashOffset,
+ strokeJoin=strokeJoin, strokeMiterLimit=strokeMiterLimit,
+ strokeOpacity=strokeOpacity, strokeWidth=strokeWidth,
+ tension=tension, text=text, theta=theta, tooltip=tooltip,
+ width=width, x=x, x2=x2, y=y, y2=y2, **kwds)
+
+
+class BaseTitleConfig(VegaLiteSchema):
+ """BaseTitleConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ align : :class:`Align`
+
+ anchor : :class:`TitleAnchor`
+ The anchor position for placing the title. One of ``"start"``, ``"middle"``, or
+ ``"end"``. For example, with an orientation of top these anchor positions map to a
+ left-, center-, or right-aligned title.
+ angle : float
+ Angle in degrees of title text.
+ baseline : :class:`TextBaseline`
+ Vertical text baseline for title text. One of ``"top"``, ``"middle"``, ``"bottom"``,
+ or ``"alphabetic"``.
+ color : :class:`Color`
+ Text color for title text.
+ dx : float
+ Delta offset for title text x-coordinate.
+ dy : float
+ Delta offset for title text y-coordinate.
+ font : string
+ Font name for title text.
+ fontSize : float
+ Font size in pixels for title text.
+
+ **Default value:** ``10``.
+ fontStyle : :class:`FontStyle`
+ Font style for title text.
+ fontWeight : :class:`FontWeight`
+ Font weight for title text.
+ This can be either a string (e.g ``"bold"``, ``"normal"`` ) or a number ( ``100``,
+ ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and ``"bold"`` = ``700``
+ ).
+ frame : :class:`TitleFrame`
+ The reference frame for the anchor position, one of ``"bounds"`` (to anchor relative
+ to the full bounding box) or ``"group"`` (to anchor relative to the group width or
+ height).
+ limit : float
+ The maximum allowed length in pixels of legend labels.
+ offset : float
+ The orthogonal offset in pixels by which to displace the title from its position
+ along the edge of the chart.
+ orient : :class:`TitleOrient`
+ Default title orientation ( ``"top"``, ``"bottom"``, ``"left"``, or ``"right"`` )
+ """
+ _schema = {'$ref': '#/definitions/BaseTitleConfig'}
+
+ def __init__(self, align=Undefined, anchor=Undefined, angle=Undefined, baseline=Undefined,
+ color=Undefined, dx=Undefined, dy=Undefined, font=Undefined, fontSize=Undefined,
+ fontStyle=Undefined, fontWeight=Undefined, frame=Undefined, limit=Undefined,
+ offset=Undefined, orient=Undefined, **kwds):
+ super(BaseTitleConfig, self).__init__(align=align, anchor=anchor, angle=angle,
+ baseline=baseline, color=color, dx=dx, dy=dy, font=font,
+ fontSize=fontSize, fontStyle=fontStyle,
+ fontWeight=fontWeight, frame=frame, limit=limit,
+ offset=offset, orient=orient, **kwds)
+
+
+class BinParams(VegaLiteSchema):
+ """BinParams schema wrapper
+
+ Mapping(required=[])
+ Binning properties or boolean flag for determining whether to bin data or not.
+
+ Attributes
+ ----------
+
+ anchor : float
+ A value in the binned domain at which to anchor the bins, shifting the bin
+ boundaries if necessary to ensure that a boundary aligns with the anchor value.
+
+ **Default Value:** the minimum bin extent value
+ base : float
+ The number base to use for automatic bin determination (default is base 10).
+
+ **Default value:** ``10``
+ binned : boolean
+ When set to true, Vega-Lite treats the input data as already binned.
+ divide : List(float)
+ Scale factors indicating allowable subdivisions. The default value is [5, 2], which
+ indicates that for base 10 numbers (the default base), the method may consider
+ dividing bin sizes by 5 and/or 2. For example, for an initial step size of 10, the
+ method can check if bin sizes of 2 (= 10/5), 5 (= 10/2), or 1 (= 10/(5*2)) might
+ also satisfy the given constraints.
+
+ **Default value:** ``[5, 2]``
+ extent : List(float)
+ A two-element ( ``[min, max]`` ) array indicating the range of desired bin values.
+ maxbins : float
+ Maximum number of bins.
+
+ **Default value:** ``6`` for ``row``, ``column`` and ``shape`` channels; ``10`` for
+ other channels
+ minstep : float
+ A minimum allowable step size (particularly useful for integer values).
+ nice : boolean
+ If true (the default), attempts to make the bin boundaries use human-friendly
+ boundaries, such as multiples of ten.
+ step : float
+ An exact step size to use between bins.
+
+ **Note:** If provided, options such as maxbins will be ignored.
+ steps : List(float)
+ An array of allowable step sizes to choose from.
+ """
+ _schema = {'$ref': '#/definitions/BinParams'}
+
+ def __init__(self, anchor=Undefined, base=Undefined, binned=Undefined, divide=Undefined,
+ extent=Undefined, maxbins=Undefined, minstep=Undefined, nice=Undefined, step=Undefined,
+ steps=Undefined, **kwds):
+ super(BinParams, self).__init__(anchor=anchor, base=base, binned=binned, divide=divide,
+ extent=extent, maxbins=maxbins, minstep=minstep, nice=nice,
+ step=step, steps=steps, **kwds)
+
+
+class Binding(VegaLiteSchema):
+ """Binding schema wrapper
+
+ anyOf(:class:`BindCheckbox`, :class:`BindRadioSelect`, :class:`BindRange`,
+ :class:`InputBinding`)
+ """
+ _schema = {'$ref': '#/definitions/Binding'}
+
+ def __init__(self, *args, **kwds):
+ super(Binding, self).__init__(*args, **kwds)
+
+
+class BindCheckbox(Binding):
+ """BindCheckbox schema wrapper
+
+ Mapping(required=[input])
+
+ Attributes
+ ----------
+
+ input : enum('checkbox')
+
+ debounce : float
+
+ element : :class:`Element`
+
+ name : string
+
+ type : string
+
+ """
+ _schema = {'$ref': '#/definitions/BindCheckbox'}
+
+ def __init__(self, input=Undefined, debounce=Undefined, element=Undefined, name=Undefined,
+ type=Undefined, **kwds):
+ super(BindCheckbox, self).__init__(input=input, debounce=debounce, element=element, name=name,
+ type=type, **kwds)
+
+
+class BindRadioSelect(Binding):
+ """BindRadioSelect schema wrapper
+
+ Mapping(required=[input, options])
+
+ Attributes
+ ----------
+
+ input : enum('radio', 'select')
+
+ options : List(Any)
+
+ debounce : float
+
+ element : :class:`Element`
+
+ name : string
+
+ type : string
+
+ """
+ _schema = {'$ref': '#/definitions/BindRadioSelect'}
+
+ def __init__(self, input=Undefined, options=Undefined, debounce=Undefined, element=Undefined,
+ name=Undefined, type=Undefined, **kwds):
+ super(BindRadioSelect, self).__init__(input=input, options=options, debounce=debounce,
+ element=element, name=name, type=type, **kwds)
+
+
+class BindRange(Binding):
+ """BindRange schema wrapper
+
+ Mapping(required=[input])
+
+ Attributes
+ ----------
+
+ input : enum('range')
+
+ debounce : float
+
+ element : :class:`Element`
+
+ max : float
+
+ min : float
+
+ name : string
+
+ step : float
+
+ type : string
+
+ """
+ _schema = {'$ref': '#/definitions/BindRange'}
+
+ def __init__(self, input=Undefined, debounce=Undefined, element=Undefined, max=Undefined,
+ min=Undefined, name=Undefined, step=Undefined, type=Undefined, **kwds):
+ super(BindRange, self).__init__(input=input, debounce=debounce, element=element, max=max,
+ min=min, name=name, step=step, type=type, **kwds)
+
+
+class BoxPlotConfig(VegaLiteSchema):
+ """BoxPlotConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ box : anyOf(boolean, :class:`MarkConfig`)
+
+ extent : anyOf(enum('min-max'), float)
+ The extent of the whiskers. Available options include:
+
+
+ * ``"min-max"`` : min and max are the lower and upper whiskers respectively.
+ * A number representing multiple of the interquartile range. This number will be
+ multiplied by the IQR to determine whisker boundary, which spans from the smallest
+ data to the largest data within the range *[Q1 - k * IQR, Q3 + k * IQR]* where
+ *Q1* and *Q3* are the first and third quartiles while *IQR* is the interquartile
+ range ( *Q3-Q1* ).
+
+ **Default value:** ``1.5``.
+ median : anyOf(boolean, :class:`MarkConfig`)
+
+ outliers : anyOf(boolean, :class:`MarkConfig`)
+
+ rule : anyOf(boolean, :class:`MarkConfig`)
+
+ size : float
+ Size of the box and median tick of a box plot
+ ticks : anyOf(boolean, :class:`MarkConfig`)
+
+ """
+ _schema = {'$ref': '#/definitions/BoxPlotConfig'}
+
+ def __init__(self, box=Undefined, extent=Undefined, median=Undefined, outliers=Undefined,
+ rule=Undefined, size=Undefined, ticks=Undefined, **kwds):
+ super(BoxPlotConfig, self).__init__(box=box, extent=extent, median=median, outliers=outliers,
+ rule=rule, size=size, ticks=ticks, **kwds)
+
+
+class BrushConfig(VegaLiteSchema):
+ """BrushConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ fill : :class:`Color`
+ The fill color of the interval mark.
+
+ **Default value:** ``#333333``
+ fillOpacity : float
+ The fill opacity of the interval mark (a value between 0 and 1).
+
+ **Default value:** ``0.125``
+ stroke : :class:`Color`
+ The stroke color of the interval mark.
+
+ **Default value:** ``#ffffff``
+ strokeDash : List(float)
+ An array of alternating stroke and space lengths,
+ for creating dashed or dotted lines.
+ strokeDashOffset : float
+ The offset (in pixels) with which to begin drawing the stroke dash array.
+ strokeOpacity : float
+ The stroke opacity of the interval mark (a value between 0 and 1).
+ strokeWidth : float
+ The stroke width of the interval mark.
+ """
+ _schema = {'$ref': '#/definitions/BrushConfig'}
+
+ def __init__(self, fill=Undefined, fillOpacity=Undefined, stroke=Undefined, strokeDash=Undefined,
+ strokeDashOffset=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, **kwds):
+ super(BrushConfig, self).__init__(fill=fill, fillOpacity=fillOpacity, stroke=stroke,
+ strokeDash=strokeDash, strokeDashOffset=strokeDashOffset,
+ strokeOpacity=strokeOpacity, strokeWidth=strokeWidth, **kwds)
+
+
+class Color(VegaLiteSchema):
+ """Color schema wrapper
+
+ anyOf(:class:`ColorName`, :class:`HexColor`, string)
+ """
+ _schema = {'$ref': '#/definitions/Color'}
+
+ def __init__(self, *args, **kwds):
+ super(Color, self).__init__(*args, **kwds)
+
+
+class ColorName(Color):
+ """ColorName schema wrapper
+
+ enum('black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green',
+ 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue',
+ 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet',
+ 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue',
+ 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray',
+ 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange',
+ 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray',
+ 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray',
+ 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro',
+ 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink',
+ 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen',
+ 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray',
+ 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue',
+ 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen',
+ 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple',
+ 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise',
+ 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite',
+ 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen',
+ 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum',
+ 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen',
+ 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow',
+ 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat',
+ 'whitesmoke', 'yellowgreen', 'rebeccapurple')
+ """
+ _schema = {'$ref': '#/definitions/ColorName'}
+
+ def __init__(self, *args):
+ super(ColorName, self).__init__(*args)
+
+
+class CompositeMark(AnyMark):
+ """CompositeMark schema wrapper
+
+ anyOf(:class:`BoxPlot`, :class:`ErrorBar`, :class:`ErrorBand`)
+ """
+ _schema = {'$ref': '#/definitions/CompositeMark'}
+
+ def __init__(self, *args, **kwds):
+ super(CompositeMark, self).__init__(*args, **kwds)
+
+
+class BoxPlot(CompositeMark):
+ """BoxPlot schema wrapper
+
+ enum('boxplot')
+ """
+ _schema = {'$ref': '#/definitions/BoxPlot'}
+
+ def __init__(self, *args):
+ super(BoxPlot, self).__init__(*args)
+
+
+class CompositeMarkDef(AnyMark):
+ """CompositeMarkDef schema wrapper
+
+ anyOf(:class:`BoxPlotDef`, :class:`ErrorBarDef`, :class:`ErrorBandDef`)
+ """
+ _schema = {'$ref': '#/definitions/CompositeMarkDef'}
+
+ def __init__(self, *args, **kwds):
+ super(CompositeMarkDef, self).__init__(*args, **kwds)
+
+
+class BoxPlotDef(CompositeMarkDef):
+ """BoxPlotDef schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : :class:`BoxPlot`
+ The mark type. This could a primitive mark type
+ (one of ``"bar"``, ``"circle"``, ``"square"``, ``"tick"``, ``"line"``,
+ ``"area"``, ``"point"``, ``"geoshape"``, ``"rule"``, and ``"text"`` )
+ or a composite mark type ( ``"boxplot"``, ``"errorband"``, ``"errorbar"`` ).
+ box : anyOf(boolean, :class:`MarkConfig`)
+
+ clip : boolean
+ Whether a composite mark be clipped to the enclosing group’s width and height.
+ color : :class:`Color`
+ Default color. Note that ``fill`` and ``stroke`` have higher precedence than
+ ``color`` and will override ``color``.
+
+ **Default value:** :raw-html:`<span style="color: #4682b4;">&#9632;</span>`
+ ``"#4682b4"``
+
+ **Note:** This property cannot be used in a `style config
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
+ extent : anyOf(enum('min-max'), float)
+ The extent of the whiskers. Available options include:
+
+
+ * ``"min-max"`` : min and max are the lower and upper whiskers respectively.
+ * A number representing multiple of the interquartile range. This number will be
+ multiplied by the IQR to determine whisker boundary, which spans from the smallest
+ data to the largest data within the range *[Q1 - k * IQR, Q3 + k * IQR]* where
+ *Q1* and *Q3* are the first and third quartiles while *IQR* is the interquartile
+ range ( *Q3-Q1* ).
+
+ **Default value:** ``1.5``.
+ median : anyOf(boolean, :class:`MarkConfig`)
+
+ opacity : float
+ The opacity (value between [0,1]) of the mark.
+ orient : :class:`Orientation`
+ Orientation of the box plot. This is normally automatically determined based on
+ types of fields on x and y channels. However, an explicit ``orient`` be specified
+ when the orientation is ambiguous.
+
+ **Default value:** ``"vertical"``.
+ outliers : anyOf(boolean, :class:`MarkConfig`)
+
+ rule : anyOf(boolean, :class:`MarkConfig`)
+
+ size : float
+ Size of the box and median tick of a box plot
+ ticks : anyOf(boolean, :class:`MarkConfig`)
+
+ """
+ _schema = {'$ref': '#/definitions/BoxPlotDef'}
+
+ def __init__(self, type=Undefined, box=Undefined, clip=Undefined, color=Undefined, extent=Undefined,
+ median=Undefined, opacity=Undefined, orient=Undefined, outliers=Undefined,
+ rule=Undefined, size=Undefined, ticks=Undefined, **kwds):
+ super(BoxPlotDef, self).__init__(type=type, box=box, clip=clip, color=color, extent=extent,
+ median=median, opacity=opacity, orient=orient,
+ outliers=outliers, rule=rule, size=size, ticks=ticks, **kwds)
+
+
+class CompositionConfig(VegaLiteSchema):
+ """CompositionConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ columns : float
+ The number of columns to include in the view composition layout.
+
+ **Default value** : ``undefined`` -- An infinite number of columns (a single row)
+ will be assumed. This is equivalent to
+ ``hconcat`` (for ``concat`` ) and to using the ``column`` channel (for ``facet`` and
+ ``repeat`` ).
+
+ **Note** :
+
+ 1) This property is only for:
+
+
+ * the general (wrappable) ``concat`` operator (not ``hconcat`` / ``vconcat`` )
+ * the ``facet`` and ``repeat`` operator with one field/repetition definition
+ (without row/column nesting)
+
+ 2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat`` )
+ and to using the ``row`` channel (for ``facet`` and ``repeat`` ).
+ spacing : float
+ The default spacing in pixels between composed sub-views.
+
+ **Default value** : ``20``
+ """
+ _schema = {'$ref': '#/definitions/CompositionConfig'}
+
+ def __init__(self, columns=Undefined, spacing=Undefined, **kwds):
+ super(CompositionConfig, self).__init__(columns=columns, spacing=spacing, **kwds)
+
+
+class ConditionalMarkPropFieldDef(VegaLiteSchema):
+ """ConditionalMarkPropFieldDef schema wrapper
+
+ anyOf(:class:`ConditionalPredicateMarkPropFieldDef`,
+ :class:`ConditionalSelectionMarkPropFieldDef`)
+ """
+ _schema = {'$ref': '#/definitions/ConditionalMarkPropFieldDef'}
+
+ def __init__(self, *args, **kwds):
+ super(ConditionalMarkPropFieldDef, self).__init__(*args, **kwds)
+
+
+class ConditionalMarkPropFieldDefTypeForShape(VegaLiteSchema):
+ """ConditionalMarkPropFieldDefTypeForShape schema wrapper
+
+ anyOf(:class:`ConditionalPredicateMarkPropFieldDefTypeForShape`,
+ :class:`ConditionalSelectionMarkPropFieldDefTypeForShape`)
+ """
+ _schema = {'$ref': '#/definitions/ConditionalMarkPropFieldDef<TypeForShape>'}
+
+ def __init__(self, *args, **kwds):
+ super(ConditionalMarkPropFieldDefTypeForShape, self).__init__(*args, **kwds)
+
+
+class ConditionalNumberValueDef(VegaLiteSchema):
+ """ConditionalNumberValueDef schema wrapper
+
+ anyOf(:class:`ConditionalPredicateNumberValueDef`,
+ :class:`ConditionalSelectionNumberValueDef`)
+ """
+ _schema = {'$ref': '#/definitions/ConditionalNumberValueDef'}
+
+ def __init__(self, *args, **kwds):
+ super(ConditionalNumberValueDef, self).__init__(*args, **kwds)
+
+
+class ConditionalPredicateMarkPropFieldDef(ConditionalMarkPropFieldDef):
+ """ConditionalPredicateMarkPropFieldDef schema wrapper
+
+ Mapping(required=[test, type])
+
+ Attributes
+ ----------
+
+ test : :class:`LogicalOperandPredicate`
+ Predicate for triggering the condition
+ type : :class:`StandardType`
+ The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``,
+ ``"ordinal"``, or ``"nominal"`` ).
+ It can also be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ **Note:**
+
+
+ * Data values for a temporal field can be either a date-time string (e.g.,
+ ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a
+ timestamp number (e.g., ``1552199579097`` ).
+ * Data ``type`` describes the semantics of the data rather than the primitive data
+ types ( ``number``, ``string``, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data.
+ * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
+ or `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `timeUnit
+ <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
+ can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using
+ an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
+ refers to the post-aggregation data type. For example, we can calculate count
+ ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
+ "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output
+ is ``"quantitative"``.
+ * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have
+ ``type`` as they have exactly the same type as their primary channels (e.g.,
+ ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ legend : anyOf(:class:`Legend`, None)
+ An object defining properties of the legend.
+ If ``null``, the legend for the encoding channel will be removed.
+
+ **Default value:** If undefined, default `legend properties
+ <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.
+
+ **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
+ documentation.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ sort : :class:`Sort`
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following:
+
+
+ * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
+ Javascript.
+ * `A sort-by-encoding definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ for sorting
+ by another encoding channel. (This type of sort definition is not available for
+ ``row`` and ``column`` channels.)
+ * `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field.
+ * `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values
+ in their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ).
+ * ``null`` indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` is not supported for ``row`` and ``column``.
+
+ **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
+ documentation.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ """
+ _schema = {'$ref': '#/definitions/ConditionalPredicate<MarkPropFieldDef>'}
+
+ def __init__(self, test=Undefined, type=Undefined, aggregate=Undefined, bin=Undefined,
+ field=Undefined, legend=Undefined, scale=Undefined, sort=Undefined, timeUnit=Undefined,
+ title=Undefined, **kwds):
+ super(ConditionalPredicateMarkPropFieldDef, self).__init__(test=test, type=type,
+ aggregate=aggregate, bin=bin,
+ field=field, legend=legend,
+ scale=scale, sort=sort,
+ timeUnit=timeUnit, title=title,
+ **kwds)
+
+
+class ConditionalPredicateMarkPropFieldDefTypeForShape(ConditionalMarkPropFieldDefTypeForShape):
+ """ConditionalPredicateMarkPropFieldDefTypeForShape schema wrapper
+
+ Mapping(required=[test, type])
+
+ Attributes
+ ----------
+
+ test : :class:`LogicalOperandPredicate`
+ Predicate for triggering the condition
+ type : :class:`TypeForShape`
+ The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``,
+ ``"ordinal"``, or ``"nominal"`` ).
+ It can also be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ **Note:**
+
+
+ * Data values for a temporal field can be either a date-time string (e.g.,
+ ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a
+ timestamp number (e.g., ``1552199579097`` ).
+ * Data ``type`` describes the semantics of the data rather than the primitive data
+ types ( ``number``, ``string``, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data.
+ * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
+ or `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `timeUnit
+ <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
+ can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using
+ an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
+ refers to the post-aggregation data type. For example, we can calculate count
+ ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
+ "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output
+ is ``"quantitative"``.
+ * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have
+ ``type`` as they have exactly the same type as their primary channels (e.g.,
+ ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ legend : anyOf(:class:`Legend`, None)
+ An object defining properties of the legend.
+ If ``null``, the legend for the encoding channel will be removed.
+
+ **Default value:** If undefined, default `legend properties
+ <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.
+
+ **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
+ documentation.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ sort : :class:`Sort`
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following:
+
+
+ * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
+ Javascript.
+ * `A sort-by-encoding definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ for sorting
+ by another encoding channel. (This type of sort definition is not available for
+ ``row`` and ``column`` channels.)
+ * `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field.
+ * `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values
+ in their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ).
+ * ``null`` indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` is not supported for ``row`` and ``column``.
+
+ **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
+ documentation.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ """
+ _schema = {'$ref': '#/definitions/ConditionalPredicate<MarkPropFieldDef<TypeForShape>>'}
+
+ def __init__(self, test=Undefined, type=Undefined, aggregate=Undefined, bin=Undefined,
+ field=Undefined, legend=Undefined, scale=Undefined, sort=Undefined, timeUnit=Undefined,
+ title=Undefined, **kwds):
+ super(ConditionalPredicateMarkPropFieldDefTypeForShape, self).__init__(test=test, type=type,
+ aggregate=aggregate,
+ bin=bin, field=field,
+ legend=legend,
+ scale=scale, sort=sort,
+ timeUnit=timeUnit,
+ title=title, **kwds)
+
+
+class ConditionalPredicateNumberValueDef(ConditionalNumberValueDef):
+ """ConditionalPredicateNumberValueDef schema wrapper
+
+ Mapping(required=[test, value])
+
+ Attributes
+ ----------
+
+ test : :class:`LogicalOperandPredicate`
+ Predicate for triggering the condition
+ value : float
+ A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values
+ between ``0`` to ``1`` for opacity).
+ """
+ _schema = {'$ref': '#/definitions/ConditionalPredicate<NumberValueDef>'}
+
+ def __init__(self, test=Undefined, value=Undefined, **kwds):
+ super(ConditionalPredicateNumberValueDef, self).__init__(test=test, value=value, **kwds)
+
+
+class ConditionalSelectionMarkPropFieldDef(ConditionalMarkPropFieldDef):
+ """ConditionalSelectionMarkPropFieldDef schema wrapper
+
+ Mapping(required=[selection, type])
+
+ Attributes
+ ----------
+
+ selection : :class:`SelectionOperand`
+ A `selection name <https://vega.github.io/vega-lite/docs/selection.html>`__, or a
+ series of `composed selections
+ <https://vega.github.io/vega-lite/docs/selection.html#compose>`__.
+ type : :class:`StandardType`
+ The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``,
+ ``"ordinal"``, or ``"nominal"`` ).
+ It can also be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ **Note:**
+
+
+ * Data values for a temporal field can be either a date-time string (e.g.,
+ ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a
+ timestamp number (e.g., ``1552199579097`` ).
+ * Data ``type`` describes the semantics of the data rather than the primitive data
+ types ( ``number``, ``string``, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data.
+ * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
+ or `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `timeUnit
+ <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
+ can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using
+ an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
+ refers to the post-aggregation data type. For example, we can calculate count
+ ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
+ "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output
+ is ``"quantitative"``.
+ * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have
+ ``type`` as they have exactly the same type as their primary channels (e.g.,
+ ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ legend : anyOf(:class:`Legend`, None)
+ An object defining properties of the legend.
+ If ``null``, the legend for the encoding channel will be removed.
+
+ **Default value:** If undefined, default `legend properties
+ <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.
+
+ **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
+ documentation.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ sort : :class:`Sort`
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following:
+
+
+ * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
+ Javascript.
+ * `A sort-by-encoding definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ for sorting
+ by another encoding channel. (This type of sort definition is not available for
+ ``row`` and ``column`` channels.)
+ * `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field.
+ * `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values
+ in their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ).
+ * ``null`` indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` is not supported for ``row`` and ``column``.
+
+ **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
+ documentation.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ """
+ _schema = {'$ref': '#/definitions/ConditionalSelection<MarkPropFieldDef>'}
+
+ def __init__(self, selection=Undefined, type=Undefined, aggregate=Undefined, bin=Undefined,
+ field=Undefined, legend=Undefined, scale=Undefined, sort=Undefined, timeUnit=Undefined,
+ title=Undefined, **kwds):
+ super(ConditionalSelectionMarkPropFieldDef, self).__init__(selection=selection, type=type,
+ aggregate=aggregate, bin=bin,
+ field=field, legend=legend,
+ scale=scale, sort=sort,
+ timeUnit=timeUnit, title=title,
+ **kwds)
+
+
+class ConditionalSelectionMarkPropFieldDefTypeForShape(ConditionalMarkPropFieldDefTypeForShape):
+ """ConditionalSelectionMarkPropFieldDefTypeForShape schema wrapper
+
+ Mapping(required=[selection, type])
+
+ Attributes
+ ----------
+
+ selection : :class:`SelectionOperand`
+ A `selection name <https://vega.github.io/vega-lite/docs/selection.html>`__, or a
+ series of `composed selections
+ <https://vega.github.io/vega-lite/docs/selection.html#compose>`__.
+ type : :class:`TypeForShape`
+ The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``,
+ ``"ordinal"``, or ``"nominal"`` ).
+ It can also be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ **Note:**
+
+
+ * Data values for a temporal field can be either a date-time string (e.g.,
+ ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a
+ timestamp number (e.g., ``1552199579097`` ).
+ * Data ``type`` describes the semantics of the data rather than the primitive data
+ types ( ``number``, ``string``, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data.
+ * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
+ or `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `timeUnit
+ <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
+ can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using
+ an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
+ refers to the post-aggregation data type. For example, we can calculate count
+ ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
+ "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output
+ is ``"quantitative"``.
+ * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have
+ ``type`` as they have exactly the same type as their primary channels (e.g.,
+ ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ legend : anyOf(:class:`Legend`, None)
+ An object defining properties of the legend.
+ If ``null``, the legend for the encoding channel will be removed.
+
+ **Default value:** If undefined, default `legend properties
+ <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.
+
+ **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
+ documentation.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ sort : :class:`Sort`
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following:
+
+
+ * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
+ Javascript.
+ * `A sort-by-encoding definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ for sorting
+ by another encoding channel. (This type of sort definition is not available for
+ ``row`` and ``column`` channels.)
+ * `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field.
+ * `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values
+ in their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ).
+ * ``null`` indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` is not supported for ``row`` and ``column``.
+
+ **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
+ documentation.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ """
+ _schema = {'$ref': '#/definitions/ConditionalSelection<MarkPropFieldDef<TypeForShape>>'}
+
+ def __init__(self, selection=Undefined, type=Undefined, aggregate=Undefined, bin=Undefined,
+ field=Undefined, legend=Undefined, scale=Undefined, sort=Undefined, timeUnit=Undefined,
+ title=Undefined, **kwds):
+ super(ConditionalSelectionMarkPropFieldDefTypeForShape, self).__init__(selection=selection,
+ type=type,
+ aggregate=aggregate,
+ bin=bin, field=field,
+ legend=legend,
+ scale=scale, sort=sort,
+ timeUnit=timeUnit,
+ title=title, **kwds)
+
+
+class ConditionalSelectionNumberValueDef(ConditionalNumberValueDef):
+ """ConditionalSelectionNumberValueDef schema wrapper
+
+ Mapping(required=[selection, value])
+
+ Attributes
+ ----------
+
+ selection : :class:`SelectionOperand`
+ A `selection name <https://vega.github.io/vega-lite/docs/selection.html>`__, or a
+ series of `composed selections
+ <https://vega.github.io/vega-lite/docs/selection.html#compose>`__.
+ value : float
+ A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values
+ between ``0`` to ``1`` for opacity).
+ """
+ _schema = {'$ref': '#/definitions/ConditionalSelection<NumberValueDef>'}
+
+ def __init__(self, selection=Undefined, value=Undefined, **kwds):
+ super(ConditionalSelectionNumberValueDef, self).__init__(selection=selection, value=value,
+ **kwds)
+
+
+class ConditionalStringValueDef(VegaLiteSchema):
+ """ConditionalStringValueDef schema wrapper
+
+ anyOf(:class:`ConditionalPredicateStringValueDef`,
+ :class:`ConditionalSelectionStringValueDef`)
+ """
+ _schema = {'$ref': '#/definitions/ConditionalStringValueDef'}
+
+ def __init__(self, *args, **kwds):
+ super(ConditionalStringValueDef, self).__init__(*args, **kwds)
+
+
+class ConditionalPredicateStringValueDef(ConditionalStringValueDef):
+ """ConditionalPredicateStringValueDef schema wrapper
+
+ Mapping(required=[test, value])
+
+ Attributes
+ ----------
+
+ test : :class:`LogicalOperandPredicate`
+ Predicate for triggering the condition
+ value : anyOf(string, None)
+ A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values
+ between ``0`` to ``1`` for opacity).
+ """
+ _schema = {'$ref': '#/definitions/ConditionalPredicate<StringValueDef>'}
+
+ def __init__(self, test=Undefined, value=Undefined, **kwds):
+ super(ConditionalPredicateStringValueDef, self).__init__(test=test, value=value, **kwds)
+
+
+class ConditionalSelectionStringValueDef(ConditionalStringValueDef):
+ """ConditionalSelectionStringValueDef schema wrapper
+
+ Mapping(required=[selection, value])
+
+ Attributes
+ ----------
+
+ selection : :class:`SelectionOperand`
+ A `selection name <https://vega.github.io/vega-lite/docs/selection.html>`__, or a
+ series of `composed selections
+ <https://vega.github.io/vega-lite/docs/selection.html#compose>`__.
+ value : anyOf(string, None)
+ A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values
+ between ``0`` to ``1`` for opacity).
+ """
+ _schema = {'$ref': '#/definitions/ConditionalSelection<StringValueDef>'}
+
+ def __init__(self, selection=Undefined, value=Undefined, **kwds):
+ super(ConditionalSelectionStringValueDef, self).__init__(selection=selection, value=value,
+ **kwds)
+
+
+class ConditionalTextFieldDef(VegaLiteSchema):
+ """ConditionalTextFieldDef schema wrapper
+
+ anyOf(:class:`ConditionalPredicateTextFieldDef`, :class:`ConditionalSelectionTextFieldDef`)
+ """
+ _schema = {'$ref': '#/definitions/ConditionalTextFieldDef'}
+
+ def __init__(self, *args, **kwds):
+ super(ConditionalTextFieldDef, self).__init__(*args, **kwds)
+
+
+class ConditionalPredicateTextFieldDef(ConditionalTextFieldDef):
+ """ConditionalPredicateTextFieldDef schema wrapper
+
+ Mapping(required=[test, type])
+
+ Attributes
+ ----------
+
+ test : :class:`LogicalOperandPredicate`
+ Predicate for triggering the condition
+ type : :class:`StandardType`
+ The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``,
+ ``"ordinal"``, or ``"nominal"`` ).
+ It can also be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ **Note:**
+
+
+ * Data values for a temporal field can be either a date-time string (e.g.,
+ ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a
+ timestamp number (e.g., ``1552199579097`` ).
+ * Data ``type`` describes the semantics of the data rather than the primitive data
+ types ( ``number``, ``string``, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data.
+ * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
+ or `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `timeUnit
+ <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
+ can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using
+ an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
+ refers to the post-aggregation data type. For example, we can calculate count
+ ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
+ "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output
+ is ``"quantitative"``.
+ * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have
+ ``type`` as they have exactly the same type as their primary channels (e.g.,
+ ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : anyOf(boolean, :class:`BinParams`, enum('binned'), None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ format : string
+ The text formatting pattern for labels of guides (axes, legends, headers) and text
+ marks.
+
+
+ * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
+ `number format pattern <https://github.com/d3/d3-format#locale_format>`__.
+ * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
+ format pattern <https://github.com/d3/d3-time-format#locale_format>`__.
+
+ See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
+ for more examples.
+
+ **Default value:** Derived from `numberFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
+ format and from `timeFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
+ format.
+ formatType : enum('number', 'time')
+ The format type for labels ( ``"number"`` or ``"time"`` ).
+
+ **Default value:**
+
+
+ * ``"time"`` for temporal fields and ordinal and nomimal fields with ``timeUnit``.
+ * ``"number"`` for quantitative fields as well as ordinal and nomimal fields without
+ ``timeUnit``.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ """
+ _schema = {'$ref': '#/definitions/ConditionalPredicate<TextFieldDef>'}
+
+ def __init__(self, test=Undefined, type=Undefined, aggregate=Undefined, bin=Undefined,
+ field=Undefined, format=Undefined, formatType=Undefined, timeUnit=Undefined,
+ title=Undefined, **kwds):
+ super(ConditionalPredicateTextFieldDef, self).__init__(test=test, type=type,
+ aggregate=aggregate, bin=bin,
+ field=field, format=format,
+ formatType=formatType, timeUnit=timeUnit,
+ title=title, **kwds)
+
+
+class ConditionalSelectionTextFieldDef(ConditionalTextFieldDef):
+ """ConditionalSelectionTextFieldDef schema wrapper
+
+ Mapping(required=[selection, type])
+
+ Attributes
+ ----------
+
+ selection : :class:`SelectionOperand`
+ A `selection name <https://vega.github.io/vega-lite/docs/selection.html>`__, or a
+ series of `composed selections
+ <https://vega.github.io/vega-lite/docs/selection.html#compose>`__.
+ type : :class:`StandardType`
+ The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``,
+ ``"ordinal"``, or ``"nominal"`` ).
+ It can also be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ **Note:**
+
+
+ * Data values for a temporal field can be either a date-time string (e.g.,
+ ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a
+ timestamp number (e.g., ``1552199579097`` ).
+ * Data ``type`` describes the semantics of the data rather than the primitive data
+ types ( ``number``, ``string``, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data.
+ * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
+ or `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `timeUnit
+ <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
+ can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using
+ an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
+ refers to the post-aggregation data type. For example, we can calculate count
+ ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
+ "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output
+ is ``"quantitative"``.
+ * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have
+ ``type`` as they have exactly the same type as their primary channels (e.g.,
+ ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : anyOf(boolean, :class:`BinParams`, enum('binned'), None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ format : string
+ The text formatting pattern for labels of guides (axes, legends, headers) and text
+ marks.
+
+
+ * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
+ `number format pattern <https://github.com/d3/d3-format#locale_format>`__.
+ * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
+ format pattern <https://github.com/d3/d3-time-format#locale_format>`__.
+
+ See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
+ for more examples.
+
+ **Default value:** Derived from `numberFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
+ format and from `timeFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
+ format.
+ formatType : enum('number', 'time')
+ The format type for labels ( ``"number"`` or ``"time"`` ).
+
+ **Default value:**
+
+
+ * ``"time"`` for temporal fields and ordinal and nomimal fields with ``timeUnit``.
+ * ``"number"`` for quantitative fields as well as ordinal and nomimal fields without
+ ``timeUnit``.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ """
+ _schema = {'$ref': '#/definitions/ConditionalSelection<TextFieldDef>'}
+
+ def __init__(self, selection=Undefined, type=Undefined, aggregate=Undefined, bin=Undefined,
+ field=Undefined, format=Undefined, formatType=Undefined, timeUnit=Undefined,
+ title=Undefined, **kwds):
+ super(ConditionalSelectionTextFieldDef, self).__init__(selection=selection, type=type,
+ aggregate=aggregate, bin=bin,
+ field=field, format=format,
+ formatType=formatType, timeUnit=timeUnit,
+ title=title, **kwds)
+
+
+class ConditionalValueDef(VegaLiteSchema):
+ """ConditionalValueDef schema wrapper
+
+ anyOf(:class:`ConditionalPredicateValueDef`, :class:`ConditionalSelectionValueDef`)
+ """
+ _schema = {'$ref': '#/definitions/ConditionalValueDef'}
+
+ def __init__(self, *args, **kwds):
+ super(ConditionalValueDef, self).__init__(*args, **kwds)
+
+
+class ConditionalPredicateValueDef(ConditionalValueDef):
+ """ConditionalPredicateValueDef schema wrapper
+
+ Mapping(required=[test, value])
+
+ Attributes
+ ----------
+
+ test : :class:`LogicalOperandPredicate`
+ Predicate for triggering the condition
+ value : :class:`Value`
+ A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values
+ between ``0`` to ``1`` for opacity).
+ """
+ _schema = {'$ref': '#/definitions/ConditionalPredicate<ValueDef>'}
+
+ def __init__(self, test=Undefined, value=Undefined, **kwds):
+ super(ConditionalPredicateValueDef, self).__init__(test=test, value=value, **kwds)
+
+
+class ConditionalSelectionValueDef(ConditionalValueDef):
+ """ConditionalSelectionValueDef schema wrapper
+
+ Mapping(required=[selection, value])
+
+ Attributes
+ ----------
+
+ selection : :class:`SelectionOperand`
+ A `selection name <https://vega.github.io/vega-lite/docs/selection.html>`__, or a
+ series of `composed selections
+ <https://vega.github.io/vega-lite/docs/selection.html#compose>`__.
+ value : :class:`Value`
+ A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values
+ between ``0`` to ``1`` for opacity).
+ """
+ _schema = {'$ref': '#/definitions/ConditionalSelection<ValueDef>'}
+
+ def __init__(self, selection=Undefined, value=Undefined, **kwds):
+ super(ConditionalSelectionValueDef, self).__init__(selection=selection, value=value, **kwds)
+
+
+class Config(VegaLiteSchema):
+ """Config schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ area : :class:`AreaConfig`
+ Area-Specific Config
+ autosize : anyOf(:class:`AutosizeType`, :class:`AutoSizeParams`)
+ Sets how the visualization size should be determined. If a string, should be one of
+ ``"pad"``, ``"fit"`` or ``"none"``.
+ Object values can additionally specify parameters for content sizing and automatic
+ resizing.
+ ``"fit"`` is only supported for single and layered views that don't use
+ ``rangeStep``.
+
+ **Default value** : ``pad``
+ axis : :class:`AxisConfig`
+ Axis configuration, which determines default properties for all ``x`` and ``y``
+ `axes <https://vega.github.io/vega-lite/docs/axis.html>`__. For a full list of axis
+ configuration options, please see the `corresponding section of the axis
+ documentation <https://vega.github.io/vega-lite/docs/axis.html#config>`__.
+ axisBand : :class:`AxisConfig`
+ Specific axis config for axes with "band" scales.
+ axisBottom : :class:`AxisConfig`
+ Specific axis config for x-axis along the bottom edge of the chart.
+ axisLeft : :class:`AxisConfig`
+ Specific axis config for y-axis along the left edge of the chart.
+ axisRight : :class:`AxisConfig`
+ Specific axis config for y-axis along the right edge of the chart.
+ axisTop : :class:`AxisConfig`
+ Specific axis config for x-axis along the top edge of the chart.
+ axisX : :class:`AxisConfig`
+ X-axis specific config.
+ axisY : :class:`AxisConfig`
+ Y-axis specific config.
+ background : string
+ CSS color property to use as the background of the whole Vega-Lite view
+
+ **Default value:** none (transparent)
+ bar : :class:`RectConfig`
+ Bar-Specific Config
+ boxplot : :class:`BoxPlotConfig`
+ Box Config
+ circle : :class:`MarkConfig`
+ Circle-Specific Config
+ concat : :class:`CompositionConfig`
+ Default configuration for all concatenation view composition operators ( ``concat``,
+ ``hconcat``, and ``vconcat`` )
+ countTitle : string
+ Default axis and legend title for count fields.
+
+ **Default value:** ``'Count of Records``.
+ errorband : :class:`ErrorBandConfig`
+ ErrorBand Config
+ errorbar : :class:`ErrorBarConfig`
+ ErrorBar Config
+ facet : :class:`CompositionConfig`
+ Default configuration for the ``facet`` view composition operator
+ fieldTitle : enum('verbal', 'functional', 'plain')
+ Defines how Vega-Lite generates title for fields. There are three possible styles:
+
+
+ * ``"verbal"`` (Default) - displays function in a verbal style (e.g., "Sum of
+ field", "Year-month of date", "field (binned)").
+ * ``"function"`` - displays function using parentheses and capitalized texts (e.g.,
+ "SUM(field)", "YEARMONTH(date)", "BIN(field)").
+ * ``"plain"`` - displays only the field name without functions (e.g., "field",
+ "date", "field").
+ geoshape : :class:`MarkConfig`
+ Geoshape-Specific Config
+ header : :class:`HeaderConfig`
+ Header configuration, which determines default properties for all `headers
+ <https://vega.github.io/vega-lite/docs/header.html>`__.
+
+ For a full list of header configuration options, please see the `corresponding
+ section of in the header documentation
+ <https://vega.github.io/vega-lite/docs/header.html#config>`__.
+ headerColumn : :class:`HeaderConfig`
+ Header configuration, which determines default properties for column `headers
+ <https://vega.github.io/vega-lite/docs/header.html>`__.
+
+ For a full list of header configuration options, please see the `corresponding
+ section of in the header documentation
+ <https://vega.github.io/vega-lite/docs/header.html#config>`__.
+ headerFacet : :class:`HeaderConfig`
+ Header configuration, which determines default properties for non-row/column facet
+ `headers <https://vega.github.io/vega-lite/docs/header.html>`__.
+
+ For a full list of header configuration options, please see the `corresponding
+ section of in the header documentation
+ <https://vega.github.io/vega-lite/docs/header.html#config>`__.
+ headerRow : :class:`HeaderConfig`
+ Header configuration, which determines default properties for row `headers
+ <https://vega.github.io/vega-lite/docs/header.html>`__.
+
+ For a full list of header configuration options, please see the `corresponding
+ section of in the header documentation
+ <https://vega.github.io/vega-lite/docs/header.html#config>`__.
+ invalidValues : enum('filter', None)
+ Defines how Vega-Lite should handle invalid values ( ``null`` and ``NaN`` ).
+
+
+ * If set to ``"filter"`` (default), all data items with null values will be skipped
+ (for line, trail, and area marks) or filtered (for other marks).
+ * If ``null``, all data items are included. In this case, invalid values will be
+ interpreted as zeroes.
+ legend : :class:`LegendConfig`
+ Legend configuration, which determines default properties for all `legends
+ <https://vega.github.io/vega-lite/docs/legend.html>`__. For a full list of legend
+ configuration options, please see the `corresponding section of in the legend
+ documentation <https://vega.github.io/vega-lite/docs/legend.html#config>`__.
+ line : :class:`LineConfig`
+ Line-Specific Config
+ mark : :class:`MarkConfig`
+ Mark Config
+ numberFormat : string
+ D3 Number format for guide labels and text marks. For example "s" for SI units. Use
+ `D3's number format pattern <https://github.com/d3/d3-format#locale_format>`__.
+ padding : :class:`Padding`
+ The default visualization padding, in pixels, from the edge of the visualization
+ canvas to the data rectangle. If a number, specifies padding for all sides.
+ If an object, the value should have the format ``{"left": 5, "top": 5, "right": 5,
+ "bottom": 5}`` to specify padding for each side of the visualization.
+
+ **Default value** : ``5``
+ point : :class:`MarkConfig`
+ Point-Specific Config
+ projection : :class:`ProjectionConfig`
+ Projection configuration, which determines default properties for all `projections
+ <https://vega.github.io/vega-lite/docs/projection.html>`__. For a full list of
+ projection configuration options, please see the `corresponding section of the
+ projection documentation
+ <https://vega.github.io/vega-lite/docs/projection.html#config>`__.
+ range : :class:`RangeConfig`
+ An object hash that defines default range arrays or schemes for using with scales.
+ For a full list of scale range configuration options, please see the `corresponding
+ section of the scale documentation
+ <https://vega.github.io/vega-lite/docs/scale.html#config>`__.
+ rect : :class:`RectConfig`
+ Rect-Specific Config
+ repeat : :class:`CompositionConfig`
+ Default configuration for the ``repeat`` view composition operator
+ rule : :class:`MarkConfig`
+ Rule-Specific Config
+ scale : :class:`ScaleConfig`
+ Scale configuration determines default properties for all `scales
+ <https://vega.github.io/vega-lite/docs/scale.html>`__. For a full list of scale
+ configuration options, please see the `corresponding section of the scale
+ documentation <https://vega.github.io/vega-lite/docs/scale.html#config>`__.
+ selection : :class:`SelectionConfig`
+ An object hash for defining default properties for each type of selections.
+ square : :class:`MarkConfig`
+ Square-Specific Config
+ stack : :class:`StackOffset`
+ Default stack offset for stackable mark.
+ style : :class:`StyleConfigIndex`
+ An object hash that defines key-value mappings to determine default properties for
+ marks with a given `style
+ <https://vega.github.io/vega-lite/docs/mark.html#mark-def>`__. The keys represent
+ styles names; the values have to be valid `mark configuration objects
+ <https://vega.github.io/vega-lite/docs/mark.html#config>`__.
+ text : :class:`TextConfig`
+ Text-Specific Config
+ tick : :class:`TickConfig`
+ Tick-Specific Config
+ timeFormat : string
+ Default time format for raw time values (without time units) in text marks, legend
+ labels and header labels.
+
+ **Default value:** ``"%b %d, %Y"``
+ **Note:** Axes automatically determine format each label automatically so this
+ config would not affect axes.
+ title : :class:`TitleConfig`
+ Title configuration, which determines default properties for all `titles
+ <https://vega.github.io/vega-lite/docs/title.html>`__. For a full list of title
+ configuration options, please see the `corresponding section of the title
+ documentation <https://vega.github.io/vega-lite/docs/title.html#config>`__.
+ trail : :class:`LineConfig`
+ Trail-Specific Config
+ view : :class:`ViewConfig`
+ Default properties for `single view plots
+ <https://vega.github.io/vega-lite/docs/spec.html#single>`__.
+ """
+ _schema = {'$ref': '#/definitions/Config'}
+
+ def __init__(self, area=Undefined, autosize=Undefined, axis=Undefined, axisBand=Undefined,
+ axisBottom=Undefined, axisLeft=Undefined, axisRight=Undefined, axisTop=Undefined,
+ axisX=Undefined, axisY=Undefined, background=Undefined, bar=Undefined,
+ boxplot=Undefined, circle=Undefined, concat=Undefined, countTitle=Undefined,
+ errorband=Undefined, errorbar=Undefined, facet=Undefined, fieldTitle=Undefined,
+ geoshape=Undefined, header=Undefined, headerColumn=Undefined, headerFacet=Undefined,
+ headerRow=Undefined, invalidValues=Undefined, legend=Undefined, line=Undefined,
+ mark=Undefined, numberFormat=Undefined, padding=Undefined, point=Undefined,
+ projection=Undefined, range=Undefined, rect=Undefined, repeat=Undefined,
+ rule=Undefined, scale=Undefined, selection=Undefined, square=Undefined,
+ stack=Undefined, style=Undefined, text=Undefined, tick=Undefined, timeFormat=Undefined,
+ title=Undefined, trail=Undefined, view=Undefined, **kwds):
+ super(Config, self).__init__(area=area, autosize=autosize, axis=axis, axisBand=axisBand,
+ axisBottom=axisBottom, axisLeft=axisLeft, axisRight=axisRight,
+ axisTop=axisTop, axisX=axisX, axisY=axisY, background=background,
+ bar=bar, boxplot=boxplot, circle=circle, concat=concat,
+ countTitle=countTitle, errorband=errorband, errorbar=errorbar,
+ facet=facet, fieldTitle=fieldTitle, geoshape=geoshape,
+ header=header, headerColumn=headerColumn, headerFacet=headerFacet,
+ headerRow=headerRow, invalidValues=invalidValues, legend=legend,
+ line=line, mark=mark, numberFormat=numberFormat, padding=padding,
+ point=point, projection=projection, range=range, rect=rect,
+ repeat=repeat, rule=rule, scale=scale, selection=selection,
+ square=square, stack=stack, style=style, text=text, tick=tick,
+ timeFormat=timeFormat, title=title, trail=trail, view=view, **kwds)
+
+
+class Cursor(VegaLiteSchema):
+ """Cursor schema wrapper
+
+ enum('auto', 'default', 'none', 'context-menu', 'help', 'pointer', 'progress', 'wait',
+ 'cell', 'crosshair', 'text', 'vertical-text', 'alias', 'copy', 'move', 'no-drop',
+ 'not-allowed', 'e-resize', 'n-resize', 'ne-resize', 'nw-resize', 's-resize', 'se-resize',
+ 'sw-resize', 'w-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize',
+ 'col-resize', 'row-resize', 'all-scroll', 'zoom-in', 'zoom-out', 'grab', 'grabbing')
+ """
+ _schema = {'$ref': '#/definitions/Cursor'}
+
+ def __init__(self, *args):
+ super(Cursor, self).__init__(*args)
+
+
+class Data(VegaLiteSchema):
+ """Data schema wrapper
+
+ anyOf(:class:`DataSource`, :class:`Generator`)
+ """
+ _schema = {'$ref': '#/definitions/Data'}
+
+ def __init__(self, *args, **kwds):
+ super(Data, self).__init__(*args, **kwds)
+
+
+class DataFormat(VegaLiteSchema):
+ """DataFormat schema wrapper
+
+ anyOf(:class:`CsvDataFormat`, :class:`DsvDataFormat`, :class:`JsonDataFormat`,
+ :class:`TopoDataFormat`)
+ """
+ _schema = {'$ref': '#/definitions/DataFormat'}
+
+ def __init__(self, *args, **kwds):
+ super(DataFormat, self).__init__(*args, **kwds)
+
+
+class CsvDataFormat(DataFormat):
+ """CsvDataFormat schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ parse : anyOf(:class:`Parse`, None)
+ If set to ``null``, disable type inference based on the spec and only use type
+ inference based on the data.
+ Alternatively, a parsing directive object can be provided for explicit data types.
+ Each property of the object corresponds to a field name, and the value to the
+ desired data type (one of ``"number"``, ``"boolean"``, ``"date"``, or null (do not
+ parse the field)).
+ For example, ``"parse": {"modified_on": "date"}`` parses the ``modified_on`` field
+ in each input record a Date value.
+
+ For ``"date"``, we parse data based using Javascript's `Date.parse()
+ <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse>`__.
+ For Specific date formats can be provided (e.g., ``{foo: "date:'%m%d%Y'"}`` ), using
+ the `d3-time-format syntax <https://github.com/d3/d3-time-format#locale_format>`__.
+ UTC date format parsing is supported similarly (e.g., ``{foo: "utc:'%m%d%Y'"}`` ).
+ See more about `UTC time
+ <https://vega.github.io/vega-lite/docs/timeunit.html#utc>`__
+ type : enum('csv', 'tsv')
+ Type of input data: ``"json"``, ``"csv"``, ``"tsv"``, ``"dsv"``.
+
+ **Default value:** The default format type is determined by the extension of the
+ file URL.
+ If no extension is detected, ``"json"`` will be used by default.
+ """
+ _schema = {'$ref': '#/definitions/CsvDataFormat'}
+
+ def __init__(self, parse=Undefined, type=Undefined, **kwds):
+ super(CsvDataFormat, self).__init__(parse=parse, type=type, **kwds)
+
+
+class DataSource(Data):
+ """DataSource schema wrapper
+
+ anyOf(:class:`UrlData`, :class:`InlineData`, :class:`NamedData`)
+ """
+ _schema = {'$ref': '#/definitions/DataSource'}
+
+ def __init__(self, *args, **kwds):
+ super(DataSource, self).__init__(*args, **kwds)
+
+
+class Datasets(VegaLiteSchema):
+ """Datasets schema wrapper
+
+ Mapping(required=[])
+ """
+ _schema = {'$ref': '#/definitions/Datasets'}
+
+ def __init__(self, **kwds):
+ super(Datasets, self).__init__(**kwds)
+
+
+class Day(VegaLiteSchema):
+ """Day schema wrapper
+
+ float
+ """
+ _schema = {'$ref': '#/definitions/Day'}
+
+ def __init__(self, *args):
+ super(Day, self).__init__(*args)
+
+
+class DictInlineDataset(VegaLiteSchema):
+ """DictInlineDataset schema wrapper
+
+ Mapping(required=[])
+ """
+ _schema = {'$ref': '#/definitions/Dict<InlineDataset>'}
+
+ def __init__(self, **kwds):
+ super(DictInlineDataset, self).__init__(**kwds)
+
+
+class Dir(VegaLiteSchema):
+ """Dir schema wrapper
+
+ enum('ltr', 'rtl')
+ """
+ _schema = {'$ref': '#/definitions/Dir'}
+
+ def __init__(self, *args):
+ super(Dir, self).__init__(*args)
+
+
+class DsvDataFormat(DataFormat):
+ """DsvDataFormat schema wrapper
+
+ Mapping(required=[delimiter])
+
+ Attributes
+ ----------
+
+ delimiter : string
+ The delimiter between records. The delimiter must be a single character (i.e., a
+ single 16-bit code unit); so, ASCII delimiters are fine, but emoji delimiters are
+ not.
+ parse : anyOf(:class:`Parse`, None)
+ If set to ``null``, disable type inference based on the spec and only use type
+ inference based on the data.
+ Alternatively, a parsing directive object can be provided for explicit data types.
+ Each property of the object corresponds to a field name, and the value to the
+ desired data type (one of ``"number"``, ``"boolean"``, ``"date"``, or null (do not
+ parse the field)).
+ For example, ``"parse": {"modified_on": "date"}`` parses the ``modified_on`` field
+ in each input record a Date value.
+
+ For ``"date"``, we parse data based using Javascript's `Date.parse()
+ <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse>`__.
+ For Specific date formats can be provided (e.g., ``{foo: "date:'%m%d%Y'"}`` ), using
+ the `d3-time-format syntax <https://github.com/d3/d3-time-format#locale_format>`__.
+ UTC date format parsing is supported similarly (e.g., ``{foo: "utc:'%m%d%Y'"}`` ).
+ See more about `UTC time
+ <https://vega.github.io/vega-lite/docs/timeunit.html#utc>`__
+ type : enum('dsv')
+ Type of input data: ``"json"``, ``"csv"``, ``"tsv"``, ``"dsv"``.
+
+ **Default value:** The default format type is determined by the extension of the
+ file URL.
+ If no extension is detected, ``"json"`` will be used by default.
+ """
+ _schema = {'$ref': '#/definitions/DsvDataFormat'}
+
+ def __init__(self, delimiter=Undefined, parse=Undefined, type=Undefined, **kwds):
+ super(DsvDataFormat, self).__init__(delimiter=delimiter, parse=parse, type=type, **kwds)
+
+
+class Element(VegaLiteSchema):
+ """Element schema wrapper
+
+ string
+ """
+ _schema = {'$ref': '#/definitions/Element'}
+
+ def __init__(self, *args):
+ super(Element, self).__init__(*args)
+
+
+class Encoding(VegaLiteSchema):
+ """Encoding schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ color : anyOf(:class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition`)
+ Color of the marks – either fill or stroke color based on the ``filled`` property
+ of mark definition.
+ By default, ``color`` represents fill color for ``"area"``, ``"bar"``, ``"tick"``,
+ ``"text"``, ``"trail"``, ``"circle"``, and ``"square"`` / stroke color for
+ ``"line"`` and ``"point"``.
+
+ **Default value:** If undefined, the default color depends on `mark config
+ <https://vega.github.io/vega-lite/docs/config.html#mark>`__ 's ``color`` property.
+
+ *Note:*
+ 1) For fine-grained control over both fill and stroke colors of the marks, please
+ use the ``fill`` and ``stroke`` channels. If either ``fill`` or ``stroke`` channel
+ is specified, ``color`` channel will be ignored.
+ 2) See the scale documentation for more information about customizing `color scheme
+ <https://vega.github.io/vega-lite/docs/scale.html#scheme>`__.
+ detail : anyOf(:class:`FieldDefWithoutScale`, List(:class:`FieldDefWithoutScale`))
+ Additional levels of detail for grouping data in aggregate views and
+ in line, trail, and area marks without mapping data to a specific visual channel.
+ fill : anyOf(:class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition`)
+ Fill color of the marks.
+ **Default value:** If undefined, the default color depends on `mark config
+ <https://vega.github.io/vega-lite/docs/config.html#mark>`__ 's ``color`` property.
+
+ *Note:* When using ``fill`` channel, ``color`` channel will be ignored. To customize
+ both fill and stroke, please use ``fill`` and ``stroke`` channels (not ``fill`` and
+ ``color`` ).
+ fillOpacity : anyOf(:class:`NumericFieldDefWithCondition`,
+ :class:`NumericValueDefWithCondition`)
+ Fill opacity of the marks.
+
+ **Default value:** If undefined, the default opacity depends on `mark config
+ <https://vega.github.io/vega-lite/docs/config.html#mark>`__ 's ``fillOpacity``
+ property.
+ href : anyOf(:class:`TextFieldDefWithCondition`, :class:`TextValueDefWithCondition`)
+ A URL to load upon mouse click.
+ key : :class:`FieldDefWithoutScale`
+ A data field to use as a unique key for data binding. When a visualization’s data is
+ updated, the key value will be used to match data elements to existing mark
+ instances. Use a key channel to enable object constancy for transitions over dynamic
+ data.
+ latitude : anyOf(:class:`LatLongFieldDef`, :class:`NumberValueDef`)
+ Latitude position of geographically projected marks.
+ latitude2 : anyOf(:class:`SecondaryFieldDef`, :class:`NumberValueDef`)
+ Latitude-2 position for geographically projected ranged ``"area"``, ``"bar"``,
+ ``"rect"``, and ``"rule"``.
+ longitude : anyOf(:class:`LatLongFieldDef`, :class:`NumberValueDef`)
+ Longitude position of geographically projected marks.
+ longitude2 : anyOf(:class:`SecondaryFieldDef`, :class:`NumberValueDef`)
+ Longitude-2 position for geographically projected ranged ``"area"``, ``"bar"``,
+ ``"rect"``, and ``"rule"``.
+ opacity : anyOf(:class:`NumericFieldDefWithCondition`,
+ :class:`NumericValueDefWithCondition`)
+ Opacity of the marks.
+
+ **Default value:** If undefined, the default opacity depends on `mark config
+ <https://vega.github.io/vega-lite/docs/config.html#mark>`__ 's ``opacity`` property.
+ order : anyOf(:class:`OrderFieldDef`, List(:class:`OrderFieldDef`), :class:`NumberValueDef`)
+ Order of the marks.
+
+
+ * For stacked marks, this ``order`` channel encodes `stack order
+ <https://vega.github.io/vega-lite/docs/stack.html#order>`__.
+ * For line and trail marks, this ``order`` channel encodes order of data points in
+ the lines. This can be useful for creating `a connected scatterplot
+ <https://vega.github.io/vega-lite/examples/connected_scatterplot.html>`__.
+ Setting ``order`` to ``{"value": null}`` makes the line marks use the original
+ order in the data sources.
+ * Otherwise, this ``order`` channel encodes layer order of the marks.
+
+ **Note** : In aggregate plots, ``order`` field should be ``aggregate`` d to avoid
+ creating additional aggregation grouping.
+ shape : anyOf(:class:`ShapeFieldDefWithCondition`, :class:`ShapeValueDefWithCondition`)
+ Shape of the mark.
+
+
+ #.
+ For ``point`` marks the supported values include:
+
+
+ * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``,
+ ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or
+ ``"triangle-left"``.
+ * the line symbol ``"stroke"``
+ * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"``
+ * a custom `SVG path string
+ <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct
+ sizing, custom shape paths should be defined within a square bounding box with
+ coordinates ranging from -1 to 1 along both the x and y dimensions.)
+
+ #.
+ For ``geoshape`` marks it should be a field definition of the geojson data
+
+ **Default value:** If undefined, the default shape depends on `mark config
+ <https://vega.github.io/vega-lite/docs/config.html#point-config>`__ 's ``shape``
+ property. ( ``"circle"`` if unset.)
+ size : anyOf(:class:`NumericFieldDefWithCondition`, :class:`NumericValueDefWithCondition`)
+ Size of the mark.
+
+
+ * For ``"point"``, ``"square"`` and ``"circle"``, – the symbol size, or pixel area
+ of the mark.
+ * For ``"bar"`` and ``"tick"`` – the bar and tick's size.
+ * For ``"text"`` – the text's font size.
+ * Size is unsupported for ``"line"``, ``"area"``, and ``"rect"``. (Use ``"trail"``
+ instead of line with varying size)
+ stroke : anyOf(:class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition`)
+ Stroke color of the marks.
+ **Default value:** If undefined, the default color depends on `mark config
+ <https://vega.github.io/vega-lite/docs/config.html#mark>`__ 's ``color`` property.
+
+ *Note:* When using ``stroke`` channel, ``color`` channel will be ignored. To
+ customize both stroke and fill, please use ``stroke`` and ``fill`` channels (not
+ ``stroke`` and ``color`` ).
+ strokeOpacity : anyOf(:class:`NumericFieldDefWithCondition`,
+ :class:`NumericValueDefWithCondition`)
+ Stroke opacity of the marks.
+
+ **Default value:** If undefined, the default opacity depends on `mark config
+ <https://vega.github.io/vega-lite/docs/config.html#mark>`__ 's ``strokeOpacity``
+ property.
+ strokeWidth : anyOf(:class:`NumericFieldDefWithCondition`,
+ :class:`NumericValueDefWithCondition`)
+ Stroke width of the marks.
+
+ **Default value:** If undefined, the default stroke width depends on `mark config
+ <https://vega.github.io/vega-lite/docs/config.html#mark>`__ 's ``strokeWidth``
+ property.
+ text : anyOf(:class:`TextFieldDefWithCondition`, :class:`TextValueDefWithCondition`)
+ Text of the ``text`` mark.
+ tooltip : anyOf(:class:`TextFieldDefWithCondition`, :class:`TextValueDefWithCondition`,
+ List(:class:`TextFieldDef`), None)
+ The tooltip text to show upon mouse hover.
+ x : anyOf(:class:`PositionFieldDef`, :class:`XValueDef`)
+ X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without
+ specified ``x2`` or ``width``.
+
+ The ``value`` of this channel can be a number or a string ``"width"`` for the width
+ of the plot.
+ x2 : anyOf(:class:`SecondaryFieldDef`, :class:`XValueDef`)
+ X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
+
+ The ``value`` of this channel can be a number or a string ``"width"`` for the width
+ of the plot.
+ xError : anyOf(:class:`SecondaryFieldDef`, :class:`NumberValueDef`)
+ Error value of x coordinates for error specified ``"errorbar"`` and ``"errorband"``.
+ xError2 : anyOf(:class:`SecondaryFieldDef`, :class:`NumberValueDef`)
+ Secondary error value of x coordinates for error specified ``"errorbar"`` and
+ ``"errorband"``.
+ y : anyOf(:class:`PositionFieldDef`, :class:`YValueDef`)
+ Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without
+ specified ``y2`` or ``height``.
+
+ The ``value`` of this channel can be a number or a string ``"height"`` for the
+ height of the plot.
+ y2 : anyOf(:class:`SecondaryFieldDef`, :class:`YValueDef`)
+ Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
+
+ The ``value`` of this channel can be a number or a string ``"height"`` for the
+ height of the plot.
+ yError : anyOf(:class:`SecondaryFieldDef`, :class:`NumberValueDef`)
+ Error value of y coordinates for error specified ``"errorbar"`` and ``"errorband"``.
+ yError2 : anyOf(:class:`SecondaryFieldDef`, :class:`NumberValueDef`)
+ Secondary error value of y coordinates for error specified ``"errorbar"`` and
+ ``"errorband"``.
+ """
+ _schema = {'$ref': '#/definitions/Encoding'}
+
+ def __init__(self, color=Undefined, detail=Undefined, fill=Undefined, fillOpacity=Undefined,
+ href=Undefined, key=Undefined, latitude=Undefined, latitude2=Undefined,
+ longitude=Undefined, longitude2=Undefined, opacity=Undefined, order=Undefined,
+ shape=Undefined, size=Undefined, stroke=Undefined, strokeOpacity=Undefined,
+ strokeWidth=Undefined, text=Undefined, tooltip=Undefined, x=Undefined, x2=Undefined,
+ xError=Undefined, xError2=Undefined, y=Undefined, y2=Undefined, yError=Undefined,
+ yError2=Undefined, **kwds):
+ super(Encoding, self).__init__(color=color, detail=detail, fill=fill, fillOpacity=fillOpacity,
+ href=href, key=key, latitude=latitude, latitude2=latitude2,
+ longitude=longitude, longitude2=longitude2, opacity=opacity,
+ order=order, shape=shape, size=size, stroke=stroke,
+ strokeOpacity=strokeOpacity, strokeWidth=strokeWidth, text=text,
+ tooltip=tooltip, x=x, x2=x2, xError=xError, xError2=xError2, y=y,
+ y2=y2, yError=yError, yError2=yError2, **kwds)
+
+
+class ErrorBand(CompositeMark):
+ """ErrorBand schema wrapper
+
+ enum('errorband')
+ """
+ _schema = {'$ref': '#/definitions/ErrorBand'}
+
+ def __init__(self, *args):
+ super(ErrorBand, self).__init__(*args)
+
+
+class ErrorBandConfig(VegaLiteSchema):
+ """ErrorBandConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ band : anyOf(boolean, :class:`MarkConfig`)
+
+ borders : anyOf(boolean, :class:`MarkConfig`)
+
+ extent : :class:`ErrorBarExtent`
+ The extent of the band. Available options include:
+
+
+ * ``"ci"`` : Extend the band to the confidence interval of the mean.
+ * ``"stderr"`` : The size of band are set to the value of standard error, extending
+ from the mean.
+ * ``"stdev"`` : The size of band are set to the value of standard deviation,
+ extending from the mean.
+ * ``"iqr"`` : Extend the band to the q1 and q3.
+
+ **Default value:** ``"stderr"``.
+ interpolate : :class:`Interpolate`
+ The line interpolation method for the error band. One of the following:
+
+
+ * ``"linear"`` : piecewise linear segments, as in a polyline.
+ * ``"linear-closed"`` : close the linear segments to form a polygon.
+ * ``"step"`` : a piecewise constant function (a step function) consisting of
+ alternating horizontal and vertical lines. The y-value changes at the midpoint of
+ each pair of adjacent x-values.
+ * ``"step-before"`` : a piecewise constant function (a step function) consisting of
+ alternating horizontal and vertical lines. The y-value changes before the x-value.
+ * ``"step-after"`` : a piecewise constant function (a step function) consisting of
+ alternating horizontal and vertical lines. The y-value changes after the x-value.
+ * ``"basis"`` : a B-spline, with control point duplication on the ends.
+ * ``"basis-open"`` : an open B-spline; may not intersect the start or end.
+ * ``"basis-closed"`` : a closed B-spline, as in a loop.
+ * ``"cardinal"`` : a Cardinal spline, with control point duplication on the ends.
+ * ``"cardinal-open"`` : an open Cardinal spline; may not intersect the start or end,
+ but will intersect other control points.
+ * ``"cardinal-closed"`` : a closed Cardinal spline, as in a loop.
+ * ``"bundle"`` : equivalent to basis, except the tension parameter is used to
+ straighten the spline.
+ * ``"monotone"`` : cubic interpolation that preserves monotonicity in y.
+ tension : float
+ The tension parameter for the interpolation type of the error band.
+ """
+ _schema = {'$ref': '#/definitions/ErrorBandConfig'}
+
+ def __init__(self, band=Undefined, borders=Undefined, extent=Undefined, interpolate=Undefined,
+ tension=Undefined, **kwds):
+ super(ErrorBandConfig, self).__init__(band=band, borders=borders, extent=extent,
+ interpolate=interpolate, tension=tension, **kwds)
+
+
+class ErrorBandDef(CompositeMarkDef):
+ """ErrorBandDef schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : :class:`ErrorBand`
+ The mark type. This could a primitive mark type
+ (one of ``"bar"``, ``"circle"``, ``"square"``, ``"tick"``, ``"line"``,
+ ``"area"``, ``"point"``, ``"geoshape"``, ``"rule"``, and ``"text"`` )
+ or a composite mark type ( ``"boxplot"``, ``"errorband"``, ``"errorbar"`` ).
+ band : anyOf(boolean, :class:`MarkConfig`)
+
+ borders : anyOf(boolean, :class:`MarkConfig`)
+
+ clip : boolean
+ Whether a composite mark be clipped to the enclosing group’s width and height.
+ color : :class:`Color`
+ Default color. Note that ``fill`` and ``stroke`` have higher precedence than
+ ``color`` and will override ``color``.
+
+ **Default value:** :raw-html:`<span style="color: #4682b4;">&#9632;</span>`
+ ``"#4682b4"``
+
+ **Note:** This property cannot be used in a `style config
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
+ extent : :class:`ErrorBarExtent`
+ The extent of the band. Available options include:
+
+
+ * ``"ci"`` : Extend the band to the confidence interval of the mean.
+ * ``"stderr"`` : The size of band are set to the value of standard error, extending
+ from the mean.
+ * ``"stdev"`` : The size of band are set to the value of standard deviation,
+ extending from the mean.
+ * ``"iqr"`` : Extend the band to the q1 and q3.
+
+ **Default value:** ``"stderr"``.
+ interpolate : :class:`Interpolate`
+ The line interpolation method for the error band. One of the following:
+
+
+ * ``"linear"`` : piecewise linear segments, as in a polyline.
+ * ``"linear-closed"`` : close the linear segments to form a polygon.
+ * ``"step"`` : a piecewise constant function (a step function) consisting of
+ alternating horizontal and vertical lines. The y-value changes at the midpoint of
+ each pair of adjacent x-values.
+ * ``"step-before"`` : a piecewise constant function (a step function) consisting of
+ alternating horizontal and vertical lines. The y-value changes before the x-value.
+ * ``"step-after"`` : a piecewise constant function (a step function) consisting of
+ alternating horizontal and vertical lines. The y-value changes after the x-value.
+ * ``"basis"`` : a B-spline, with control point duplication on the ends.
+ * ``"basis-open"`` : an open B-spline; may not intersect the start or end.
+ * ``"basis-closed"`` : a closed B-spline, as in a loop.
+ * ``"cardinal"`` : a Cardinal spline, with control point duplication on the ends.
+ * ``"cardinal-open"`` : an open Cardinal spline; may not intersect the start or end,
+ but will intersect other control points.
+ * ``"cardinal-closed"`` : a closed Cardinal spline, as in a loop.
+ * ``"bundle"`` : equivalent to basis, except the tension parameter is used to
+ straighten the spline.
+ * ``"monotone"`` : cubic interpolation that preserves monotonicity in y.
+ opacity : float
+ The opacity (value between [0,1]) of the mark.
+ orient : :class:`Orientation`
+ Orientation of the error band. This is normally automatically determined, but can be
+ specified when the orientation is ambiguous and cannot be automatically determined.
+ tension : float
+ The tension parameter for the interpolation type of the error band.
+ """
+ _schema = {'$ref': '#/definitions/ErrorBandDef'}
+
+ def __init__(self, type=Undefined, band=Undefined, borders=Undefined, clip=Undefined,
+ color=Undefined, extent=Undefined, interpolate=Undefined, opacity=Undefined,
+ orient=Undefined, tension=Undefined, **kwds):
+ super(ErrorBandDef, self).__init__(type=type, band=band, borders=borders, clip=clip,
+ color=color, extent=extent, interpolate=interpolate,
+ opacity=opacity, orient=orient, tension=tension, **kwds)
+
+
+class ErrorBar(CompositeMark):
+ """ErrorBar schema wrapper
+
+ enum('errorbar')
+ """
+ _schema = {'$ref': '#/definitions/ErrorBar'}
+
+ def __init__(self, *args):
+ super(ErrorBar, self).__init__(*args)
+
+
+class ErrorBarConfig(VegaLiteSchema):
+ """ErrorBarConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ extent : :class:`ErrorBarExtent`
+ The extent of the rule. Available options include:
+
+
+ * ``"ci"`` : Extend the rule to the confidence interval of the mean.
+ * ``"stderr"`` : The size of rule are set to the value of standard error, extending
+ from the mean.
+ * ``"stdev"`` : The size of rule are set to the value of standard deviation,
+ extending from the mean.
+ * ``"iqr"`` : Extend the rule to the q1 and q3.
+
+ **Default value:** ``"stderr"``.
+ rule : anyOf(boolean, :class:`MarkConfig`)
+
+ ticks : anyOf(boolean, :class:`MarkConfig`)
+
+ """
+ _schema = {'$ref': '#/definitions/ErrorBarConfig'}
+
+ def __init__(self, extent=Undefined, rule=Undefined, ticks=Undefined, **kwds):
+ super(ErrorBarConfig, self).__init__(extent=extent, rule=rule, ticks=ticks, **kwds)
+
+
+class ErrorBarDef(CompositeMarkDef):
+ """ErrorBarDef schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : :class:`ErrorBar`
+ The mark type. This could a primitive mark type
+ (one of ``"bar"``, ``"circle"``, ``"square"``, ``"tick"``, ``"line"``,
+ ``"area"``, ``"point"``, ``"geoshape"``, ``"rule"``, and ``"text"`` )
+ or a composite mark type ( ``"boxplot"``, ``"errorband"``, ``"errorbar"`` ).
+ clip : boolean
+ Whether a composite mark be clipped to the enclosing group’s width and height.
+ color : :class:`Color`
+ Default color. Note that ``fill`` and ``stroke`` have higher precedence than
+ ``color`` and will override ``color``.
+
+ **Default value:** :raw-html:`<span style="color: #4682b4;">&#9632;</span>`
+ ``"#4682b4"``
+
+ **Note:** This property cannot be used in a `style config
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
+ extent : :class:`ErrorBarExtent`
+ The extent of the rule. Available options include:
+
+
+ * ``"ci"`` : Extend the rule to the confidence interval of the mean.
+ * ``"stderr"`` : The size of rule are set to the value of standard error, extending
+ from the mean.
+ * ``"stdev"`` : The size of rule are set to the value of standard deviation,
+ extending from the mean.
+ * ``"iqr"`` : Extend the rule to the q1 and q3.
+
+ **Default value:** ``"stderr"``.
+ opacity : float
+ The opacity (value between [0,1]) of the mark.
+ orient : :class:`Orientation`
+ Orientation of the error bar. This is normally automatically determined, but can be
+ specified when the orientation is ambiguous and cannot be automatically determined.
+ rule : anyOf(boolean, :class:`MarkConfig`)
+
+ ticks : anyOf(boolean, :class:`MarkConfig`)
+
+ """
+ _schema = {'$ref': '#/definitions/ErrorBarDef'}
+
+ def __init__(self, type=Undefined, clip=Undefined, color=Undefined, extent=Undefined,
+ opacity=Undefined, orient=Undefined, rule=Undefined, ticks=Undefined, **kwds):
+ super(ErrorBarDef, self).__init__(type=type, clip=clip, color=color, extent=extent,
+ opacity=opacity, orient=orient, rule=rule, ticks=ticks, **kwds)
+
+
+class ErrorBarExtent(VegaLiteSchema):
+ """ErrorBarExtent schema wrapper
+
+ enum('ci', 'iqr', 'stderr', 'stdev')
+ """
+ _schema = {'$ref': '#/definitions/ErrorBarExtent'}
+
+ def __init__(self, *args):
+ super(ErrorBarExtent, self).__init__(*args)
+
+
+class EventStream(VegaLiteSchema):
+ """EventStream schema wrapper
+
+ Any
+ """
+ _schema = {'$ref': '#/definitions/EventStream'}
+
+ def __init__(self, *args, **kwds):
+ super(EventStream, self).__init__(*args, **kwds)
+
+
+class FacetFieldDef(VegaLiteSchema):
+ """FacetFieldDef schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : :class:`StandardType`
+ The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``,
+ ``"ordinal"``, or ``"nominal"`` ).
+ It can also be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ **Note:**
+
+
+ * Data values for a temporal field can be either a date-time string (e.g.,
+ ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a
+ timestamp number (e.g., ``1552199579097`` ).
+ * Data ``type`` describes the semantics of the data rather than the primitive data
+ types ( ``number``, ``string``, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data.
+ * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
+ or `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `timeUnit
+ <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
+ can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using
+ an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
+ refers to the post-aggregation data type. For example, we can calculate count
+ ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
+ "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output
+ is ``"quantitative"``.
+ * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have
+ ``type`` as they have exactly the same type as their primary channels (e.g.,
+ ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ header : :class:`Header`
+ An object defining properties of a facet's header.
+ sort : anyOf(:class:`SortArray`, :class:`SortOrder`, :class:`EncodingSortField`, None)
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following:
+
+
+ * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
+ Javascript.
+ * `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field.
+ * `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values
+ in their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ).
+ * ``null`` indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` is not supported for ``row`` and ``column``.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ """
+ _schema = {'$ref': '#/definitions/FacetFieldDef'}
+
+ def __init__(self, type=Undefined, aggregate=Undefined, bin=Undefined, field=Undefined,
+ header=Undefined, sort=Undefined, timeUnit=Undefined, title=Undefined, **kwds):
+ super(FacetFieldDef, self).__init__(type=type, aggregate=aggregate, bin=bin, field=field,
+ header=header, sort=sort, timeUnit=timeUnit, title=title,
+ **kwds)
+
+
+class FacetMapping(VegaLiteSchema):
+ """FacetMapping schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ column : :class:`FacetFieldDef`
+ A field definition for the horizontal facet of trellis plots.
+ row : :class:`FacetFieldDef`
+ A field definition for the vertical facet of trellis plots.
+ """
+ _schema = {'$ref': '#/definitions/FacetMapping'}
+
+ def __init__(self, column=Undefined, row=Undefined, **kwds):
+ super(FacetMapping, self).__init__(column=column, row=row, **kwds)
+
+
+class FacetedEncoding(VegaLiteSchema):
+ """FacetedEncoding schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ color : anyOf(:class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition`)
+ Color of the marks – either fill or stroke color based on the ``filled`` property
+ of mark definition.
+ By default, ``color`` represents fill color for ``"area"``, ``"bar"``, ``"tick"``,
+ ``"text"``, ``"trail"``, ``"circle"``, and ``"square"`` / stroke color for
+ ``"line"`` and ``"point"``.
+
+ **Default value:** If undefined, the default color depends on `mark config
+ <https://vega.github.io/vega-lite/docs/config.html#mark>`__ 's ``color`` property.
+
+ *Note:*
+ 1) For fine-grained control over both fill and stroke colors of the marks, please
+ use the ``fill`` and ``stroke`` channels. If either ``fill`` or ``stroke`` channel
+ is specified, ``color`` channel will be ignored.
+ 2) See the scale documentation for more information about customizing `color scheme
+ <https://vega.github.io/vega-lite/docs/scale.html#scheme>`__.
+ column : :class:`FacetFieldDef`
+ A field definition for the horizontal facet of trellis plots.
+ detail : anyOf(:class:`FieldDefWithoutScale`, List(:class:`FieldDefWithoutScale`))
+ Additional levels of detail for grouping data in aggregate views and
+ in line, trail, and area marks without mapping data to a specific visual channel.
+ facet : :class:`FacetFieldDef`
+ A field definition for the (flexible) facet of trellis plots.
+
+ If either ``row`` or ``column`` is specified, this channel will be ignored.
+ fill : anyOf(:class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition`)
+ Fill color of the marks.
+ **Default value:** If undefined, the default color depends on `mark config
+ <https://vega.github.io/vega-lite/docs/config.html#mark>`__ 's ``color`` property.
+
+ *Note:* When using ``fill`` channel, ``color`` channel will be ignored. To customize
+ both fill and stroke, please use ``fill`` and ``stroke`` channels (not ``fill`` and
+ ``color`` ).
+ fillOpacity : anyOf(:class:`NumericFieldDefWithCondition`,
+ :class:`NumericValueDefWithCondition`)
+ Fill opacity of the marks.
+
+ **Default value:** If undefined, the default opacity depends on `mark config
+ <https://vega.github.io/vega-lite/docs/config.html#mark>`__ 's ``fillOpacity``
+ property.
+ href : anyOf(:class:`TextFieldDefWithCondition`, :class:`TextValueDefWithCondition`)
+ A URL to load upon mouse click.
+ key : :class:`FieldDefWithoutScale`
+ A data field to use as a unique key for data binding. When a visualization’s data is
+ updated, the key value will be used to match data elements to existing mark
+ instances. Use a key channel to enable object constancy for transitions over dynamic
+ data.
+ latitude : anyOf(:class:`LatLongFieldDef`, :class:`NumberValueDef`)
+ Latitude position of geographically projected marks.
+ latitude2 : anyOf(:class:`SecondaryFieldDef`, :class:`NumberValueDef`)
+ Latitude-2 position for geographically projected ranged ``"area"``, ``"bar"``,
+ ``"rect"``, and ``"rule"``.
+ longitude : anyOf(:class:`LatLongFieldDef`, :class:`NumberValueDef`)
+ Longitude position of geographically projected marks.
+ longitude2 : anyOf(:class:`SecondaryFieldDef`, :class:`NumberValueDef`)
+ Longitude-2 position for geographically projected ranged ``"area"``, ``"bar"``,
+ ``"rect"``, and ``"rule"``.
+ opacity : anyOf(:class:`NumericFieldDefWithCondition`,
+ :class:`NumericValueDefWithCondition`)
+ Opacity of the marks.
+
+ **Default value:** If undefined, the default opacity depends on `mark config
+ <https://vega.github.io/vega-lite/docs/config.html#mark>`__ 's ``opacity`` property.
+ order : anyOf(:class:`OrderFieldDef`, List(:class:`OrderFieldDef`), :class:`NumberValueDef`)
+ Order of the marks.
+
+
+ * For stacked marks, this ``order`` channel encodes `stack order
+ <https://vega.github.io/vega-lite/docs/stack.html#order>`__.
+ * For line and trail marks, this ``order`` channel encodes order of data points in
+ the lines. This can be useful for creating `a connected scatterplot
+ <https://vega.github.io/vega-lite/examples/connected_scatterplot.html>`__.
+ Setting ``order`` to ``{"value": null}`` makes the line marks use the original
+ order in the data sources.
+ * Otherwise, this ``order`` channel encodes layer order of the marks.
+
+ **Note** : In aggregate plots, ``order`` field should be ``aggregate`` d to avoid
+ creating additional aggregation grouping.
+ row : :class:`FacetFieldDef`
+ A field definition for the vertical facet of trellis plots.
+ shape : anyOf(:class:`ShapeFieldDefWithCondition`, :class:`ShapeValueDefWithCondition`)
+ Shape of the mark.
+
+
+ #.
+ For ``point`` marks the supported values include:
+
+
+ * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``,
+ ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or
+ ``"triangle-left"``.
+ * the line symbol ``"stroke"``
+ * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"``
+ * a custom `SVG path string
+ <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct
+ sizing, custom shape paths should be defined within a square bounding box with
+ coordinates ranging from -1 to 1 along both the x and y dimensions.)
+
+ #.
+ For ``geoshape`` marks it should be a field definition of the geojson data
+
+ **Default value:** If undefined, the default shape depends on `mark config
+ <https://vega.github.io/vega-lite/docs/config.html#point-config>`__ 's ``shape``
+ property. ( ``"circle"`` if unset.)
+ size : anyOf(:class:`NumericFieldDefWithCondition`, :class:`NumericValueDefWithCondition`)
+ Size of the mark.
+
+
+ * For ``"point"``, ``"square"`` and ``"circle"``, – the symbol size, or pixel area
+ of the mark.
+ * For ``"bar"`` and ``"tick"`` – the bar and tick's size.
+ * For ``"text"`` – the text's font size.
+ * Size is unsupported for ``"line"``, ``"area"``, and ``"rect"``. (Use ``"trail"``
+ instead of line with varying size)
+ stroke : anyOf(:class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition`)
+ Stroke color of the marks.
+ **Default value:** If undefined, the default color depends on `mark config
+ <https://vega.github.io/vega-lite/docs/config.html#mark>`__ 's ``color`` property.
+
+ *Note:* When using ``stroke`` channel, ``color`` channel will be ignored. To
+ customize both stroke and fill, please use ``stroke`` and ``fill`` channels (not
+ ``stroke`` and ``color`` ).
+ strokeOpacity : anyOf(:class:`NumericFieldDefWithCondition`,
+ :class:`NumericValueDefWithCondition`)
+ Stroke opacity of the marks.
+
+ **Default value:** If undefined, the default opacity depends on `mark config
+ <https://vega.github.io/vega-lite/docs/config.html#mark>`__ 's ``strokeOpacity``
+ property.
+ strokeWidth : anyOf(:class:`NumericFieldDefWithCondition`,
+ :class:`NumericValueDefWithCondition`)
+ Stroke width of the marks.
+
+ **Default value:** If undefined, the default stroke width depends on `mark config
+ <https://vega.github.io/vega-lite/docs/config.html#mark>`__ 's ``strokeWidth``
+ property.
+ text : anyOf(:class:`TextFieldDefWithCondition`, :class:`TextValueDefWithCondition`)
+ Text of the ``text`` mark.
+ tooltip : anyOf(:class:`TextFieldDefWithCondition`, :class:`TextValueDefWithCondition`,
+ List(:class:`TextFieldDef`), None)
+ The tooltip text to show upon mouse hover.
+ x : anyOf(:class:`PositionFieldDef`, :class:`XValueDef`)
+ X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without
+ specified ``x2`` or ``width``.
+
+ The ``value`` of this channel can be a number or a string ``"width"`` for the width
+ of the plot.
+ x2 : anyOf(:class:`SecondaryFieldDef`, :class:`XValueDef`)
+ X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
+
+ The ``value`` of this channel can be a number or a string ``"width"`` for the width
+ of the plot.
+ xError : anyOf(:class:`SecondaryFieldDef`, :class:`NumberValueDef`)
+ Error value of x coordinates for error specified ``"errorbar"`` and ``"errorband"``.
+ xError2 : anyOf(:class:`SecondaryFieldDef`, :class:`NumberValueDef`)
+ Secondary error value of x coordinates for error specified ``"errorbar"`` and
+ ``"errorband"``.
+ y : anyOf(:class:`PositionFieldDef`, :class:`YValueDef`)
+ Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without
+ specified ``y2`` or ``height``.
+
+ The ``value`` of this channel can be a number or a string ``"height"`` for the
+ height of the plot.
+ y2 : anyOf(:class:`SecondaryFieldDef`, :class:`YValueDef`)
+ Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
+
+ The ``value`` of this channel can be a number or a string ``"height"`` for the
+ height of the plot.
+ yError : anyOf(:class:`SecondaryFieldDef`, :class:`NumberValueDef`)
+ Error value of y coordinates for error specified ``"errorbar"`` and ``"errorband"``.
+ yError2 : anyOf(:class:`SecondaryFieldDef`, :class:`NumberValueDef`)
+ Secondary error value of y coordinates for error specified ``"errorbar"`` and
+ ``"errorband"``.
+ """
+ _schema = {'$ref': '#/definitions/FacetedEncoding'}
+
+ def __init__(self, color=Undefined, column=Undefined, detail=Undefined, facet=Undefined,
+ fill=Undefined, fillOpacity=Undefined, href=Undefined, key=Undefined,
+ latitude=Undefined, latitude2=Undefined, longitude=Undefined, longitude2=Undefined,
+ opacity=Undefined, order=Undefined, row=Undefined, shape=Undefined, size=Undefined,
+ stroke=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, text=Undefined,
+ tooltip=Undefined, x=Undefined, x2=Undefined, xError=Undefined, xError2=Undefined,
+ y=Undefined, y2=Undefined, yError=Undefined, yError2=Undefined, **kwds):
+ super(FacetedEncoding, self).__init__(color=color, column=column, detail=detail, facet=facet,
+ fill=fill, fillOpacity=fillOpacity, href=href, key=key,
+ latitude=latitude, latitude2=latitude2,
+ longitude=longitude, longitude2=longitude2,
+ opacity=opacity, order=order, row=row, shape=shape,
+ size=size, stroke=stroke, strokeOpacity=strokeOpacity,
+ strokeWidth=strokeWidth, text=text, tooltip=tooltip, x=x,
+ x2=x2, xError=xError, xError2=xError2, y=y, y2=y2,
+ yError=yError, yError2=yError2, **kwds)
+
+
+class Field(VegaLiteSchema):
+ """Field schema wrapper
+
+ anyOf(:class:`FieldName`, :class:`RepeatRef`)
+ """
+ _schema = {'$ref': '#/definitions/Field'}
+
+ def __init__(self, *args, **kwds):
+ super(Field, self).__init__(*args, **kwds)
+
+
+class FieldDefWithConditionMarkPropFieldDefTypeForShapestringnull(VegaLiteSchema):
+ """FieldDefWithConditionMarkPropFieldDefTypeForShapestringnull schema wrapper
+
+ Mapping(required=[type])
+ A FieldDef with Condition :raw-html:`<ValueDef>`
+
+ Attributes
+ ----------
+
+ type : :class:`TypeForShape`
+ The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``,
+ ``"ordinal"``, or ``"nominal"`` ).
+ It can also be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ **Note:**
+
+
+ * Data values for a temporal field can be either a date-time string (e.g.,
+ ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a
+ timestamp number (e.g., ``1552199579097`` ).
+ * Data ``type`` describes the semantics of the data rather than the primitive data
+ types ( ``number``, ``string``, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data.
+ * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
+ or `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `timeUnit
+ <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
+ can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using
+ an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
+ refers to the post-aggregation data type. For example, we can calculate count
+ ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
+ "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output
+ is ``"quantitative"``.
+ * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have
+ ``type`` as they have exactly the same type as their primary channels (e.g.,
+ ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ condition : anyOf(:class:`ConditionalStringValueDef`,
+ List(:class:`ConditionalStringValueDef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ legend : anyOf(:class:`Legend`, None)
+ An object defining properties of the legend.
+ If ``null``, the legend for the encoding channel will be removed.
+
+ **Default value:** If undefined, default `legend properties
+ <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.
+
+ **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
+ documentation.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ sort : :class:`Sort`
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following:
+
+
+ * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
+ Javascript.
+ * `A sort-by-encoding definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ for sorting
+ by another encoding channel. (This type of sort definition is not available for
+ ``row`` and ``column`` channels.)
+ * `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field.
+ * `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values
+ in their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ).
+ * ``null`` indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` is not supported for ``row`` and ``column``.
+
+ **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
+ documentation.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ """
+ _schema = {'$ref': '#/definitions/FieldDefWithCondition<MarkPropFieldDef<TypeForShape>,(string|null)>'}
+
+ def __init__(self, type=Undefined, aggregate=Undefined, bin=Undefined, condition=Undefined,
+ field=Undefined, legend=Undefined, scale=Undefined, sort=Undefined, timeUnit=Undefined,
+ title=Undefined, **kwds):
+ super(FieldDefWithConditionMarkPropFieldDefTypeForShapestringnull, self).__init__(type=type,
+ aggregate=aggregate,
+ bin=bin,
+ condition=condition,
+ field=field,
+ legend=legend,
+ scale=scale,
+ sort=sort,
+ timeUnit=timeUnit,
+ title=title,
+ **kwds)
+
+
+class FieldDefWithConditionMarkPropFieldDefnumber(VegaLiteSchema):
+ """FieldDefWithConditionMarkPropFieldDefnumber schema wrapper
+
+ Mapping(required=[type])
+ A FieldDef with Condition :raw-html:`<ValueDef>`
+
+ Attributes
+ ----------
+
+ type : :class:`StandardType`
+ The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``,
+ ``"ordinal"``, or ``"nominal"`` ).
+ It can also be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ **Note:**
+
+
+ * Data values for a temporal field can be either a date-time string (e.g.,
+ ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a
+ timestamp number (e.g., ``1552199579097`` ).
+ * Data ``type`` describes the semantics of the data rather than the primitive data
+ types ( ``number``, ``string``, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data.
+ * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
+ or `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `timeUnit
+ <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
+ can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using
+ an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
+ refers to the post-aggregation data type. For example, we can calculate count
+ ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
+ "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output
+ is ``"quantitative"``.
+ * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have
+ ``type`` as they have exactly the same type as their primary channels (e.g.,
+ ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ condition : anyOf(:class:`ConditionalNumberValueDef`,
+ List(:class:`ConditionalNumberValueDef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ legend : anyOf(:class:`Legend`, None)
+ An object defining properties of the legend.
+ If ``null``, the legend for the encoding channel will be removed.
+
+ **Default value:** If undefined, default `legend properties
+ <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.
+
+ **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
+ documentation.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ sort : :class:`Sort`
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following:
+
+
+ * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
+ Javascript.
+ * `A sort-by-encoding definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ for sorting
+ by another encoding channel. (This type of sort definition is not available for
+ ``row`` and ``column`` channels.)
+ * `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field.
+ * `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values
+ in their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ).
+ * ``null`` indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` is not supported for ``row`` and ``column``.
+
+ **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
+ documentation.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ """
+ _schema = {'$ref': '#/definitions/FieldDefWithCondition<MarkPropFieldDef,number>'}
+
+ def __init__(self, type=Undefined, aggregate=Undefined, bin=Undefined, condition=Undefined,
+ field=Undefined, legend=Undefined, scale=Undefined, sort=Undefined, timeUnit=Undefined,
+ title=Undefined, **kwds):
+ super(FieldDefWithConditionMarkPropFieldDefnumber, self).__init__(type=type,
+ aggregate=aggregate, bin=bin,
+ condition=condition,
+ field=field, legend=legend,
+ scale=scale, sort=sort,
+ timeUnit=timeUnit,
+ title=title, **kwds)
+
+
+class FieldDefWithConditionMarkPropFieldDefstringnull(VegaLiteSchema):
+ """FieldDefWithConditionMarkPropFieldDefstringnull schema wrapper
+
+ Mapping(required=[type])
+ A FieldDef with Condition :raw-html:`<ValueDef>`
+
+ Attributes
+ ----------
+
+ type : :class:`StandardType`
+ The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``,
+ ``"ordinal"``, or ``"nominal"`` ).
+ It can also be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ **Note:**
+
+
+ * Data values for a temporal field can be either a date-time string (e.g.,
+ ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a
+ timestamp number (e.g., ``1552199579097`` ).
+ * Data ``type`` describes the semantics of the data rather than the primitive data
+ types ( ``number``, ``string``, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data.
+ * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
+ or `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `timeUnit
+ <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
+ can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using
+ an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
+ refers to the post-aggregation data type. For example, we can calculate count
+ ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
+ "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output
+ is ``"quantitative"``.
+ * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have
+ ``type`` as they have exactly the same type as their primary channels (e.g.,
+ ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ condition : anyOf(:class:`ConditionalStringValueDef`,
+ List(:class:`ConditionalStringValueDef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ legend : anyOf(:class:`Legend`, None)
+ An object defining properties of the legend.
+ If ``null``, the legend for the encoding channel will be removed.
+
+ **Default value:** If undefined, default `legend properties
+ <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.
+
+ **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
+ documentation.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ sort : :class:`Sort`
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following:
+
+
+ * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
+ Javascript.
+ * `A sort-by-encoding definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ for sorting
+ by another encoding channel. (This type of sort definition is not available for
+ ``row`` and ``column`` channels.)
+ * `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field.
+ * `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values
+ in their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ).
+ * ``null`` indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` is not supported for ``row`` and ``column``.
+
+ **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
+ documentation.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ """
+ _schema = {'$ref': '#/definitions/FieldDefWithCondition<MarkPropFieldDef,(string|null)>'}
+
+ def __init__(self, type=Undefined, aggregate=Undefined, bin=Undefined, condition=Undefined,
+ field=Undefined, legend=Undefined, scale=Undefined, sort=Undefined, timeUnit=Undefined,
+ title=Undefined, **kwds):
+ super(FieldDefWithConditionMarkPropFieldDefstringnull, self).__init__(type=type,
+ aggregate=aggregate,
+ bin=bin,
+ condition=condition,
+ field=field,
+ legend=legend,
+ scale=scale, sort=sort,
+ timeUnit=timeUnit,
+ title=title, **kwds)
+
+
+class FieldDefWithConditionTextFieldDefValue(VegaLiteSchema):
+ """FieldDefWithConditionTextFieldDefValue schema wrapper
+
+ Mapping(required=[type])
+ A FieldDef with Condition :raw-html:`<ValueDef>`
+
+ Attributes
+ ----------
+
+ type : :class:`StandardType`
+ The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``,
+ ``"ordinal"``, or ``"nominal"`` ).
+ It can also be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ **Note:**
+
+
+ * Data values for a temporal field can be either a date-time string (e.g.,
+ ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a
+ timestamp number (e.g., ``1552199579097`` ).
+ * Data ``type`` describes the semantics of the data rather than the primitive data
+ types ( ``number``, ``string``, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data.
+ * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
+ or `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `timeUnit
+ <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
+ can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using
+ an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
+ refers to the post-aggregation data type. For example, we can calculate count
+ ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
+ "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output
+ is ``"quantitative"``.
+ * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have
+ ``type`` as they have exactly the same type as their primary channels (e.g.,
+ ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : anyOf(boolean, :class:`BinParams`, enum('binned'), None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ condition : anyOf(:class:`ConditionalValueDef`, List(:class:`ConditionalValueDef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ format : string
+ The text formatting pattern for labels of guides (axes, legends, headers) and text
+ marks.
+
+
+ * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
+ `number format pattern <https://github.com/d3/d3-format#locale_format>`__.
+ * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
+ format pattern <https://github.com/d3/d3-time-format#locale_format>`__.
+
+ See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
+ for more examples.
+
+ **Default value:** Derived from `numberFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
+ format and from `timeFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
+ format.
+ formatType : enum('number', 'time')
+ The format type for labels ( ``"number"`` or ``"time"`` ).
+
+ **Default value:**
+
+
+ * ``"time"`` for temporal fields and ordinal and nomimal fields with ``timeUnit``.
+ * ``"number"`` for quantitative fields as well as ordinal and nomimal fields without
+ ``timeUnit``.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ """
+ _schema = {'$ref': '#/definitions/FieldDefWithCondition<TextFieldDef,Value>'}
+
+ def __init__(self, type=Undefined, aggregate=Undefined, bin=Undefined, condition=Undefined,
+ field=Undefined, format=Undefined, formatType=Undefined, timeUnit=Undefined,
+ title=Undefined, **kwds):
+ super(FieldDefWithConditionTextFieldDefValue, self).__init__(type=type, aggregate=aggregate,
+ bin=bin, condition=condition,
+ field=field, format=format,
+ formatType=formatType,
+ timeUnit=timeUnit, title=title,
+ **kwds)
+
+
+class FieldDefWithoutScale(VegaLiteSchema):
+ """FieldDefWithoutScale schema wrapper
+
+ Mapping(required=[type])
+ Definition object for a data field, its type and transformation of an encoding channel.
+
+ Attributes
+ ----------
+
+ type : :class:`StandardType`
+ The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``,
+ ``"ordinal"``, or ``"nominal"`` ).
+ It can also be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ **Note:**
+
+
+ * Data values for a temporal field can be either a date-time string (e.g.,
+ ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a
+ timestamp number (e.g., ``1552199579097`` ).
+ * Data ``type`` describes the semantics of the data rather than the primitive data
+ types ( ``number``, ``string``, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data.
+ * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
+ or `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `timeUnit
+ <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
+ can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using
+ an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
+ refers to the post-aggregation data type. For example, we can calculate count
+ ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
+ "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output
+ is ``"quantitative"``.
+ * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have
+ ``type`` as they have exactly the same type as their primary channels (e.g.,
+ ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : anyOf(boolean, :class:`BinParams`, enum('binned'), None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ """
+ _schema = {'$ref': '#/definitions/FieldDefWithoutScale'}
+
+ def __init__(self, type=Undefined, aggregate=Undefined, bin=Undefined, field=Undefined,
+ timeUnit=Undefined, title=Undefined, **kwds):
+ super(FieldDefWithoutScale, self).__init__(type=type, aggregate=aggregate, bin=bin, field=field,
+ timeUnit=timeUnit, title=title, **kwds)
+
+
+class FieldName(Field):
+ """FieldName schema wrapper
+
+ string
+ """
+ _schema = {'$ref': '#/definitions/FieldName'}
+
+ def __init__(self, *args):
+ super(FieldName, self).__init__(*args)
+
+
+class FontStyle(VegaLiteSchema):
+ """FontStyle schema wrapper
+
+ string
+ """
+ _schema = {'$ref': '#/definitions/FontStyle'}
+
+ def __init__(self, *args):
+ super(FontStyle, self).__init__(*args)
+
+
+class FontWeight(VegaLiteSchema):
+ """FontWeight schema wrapper
+
+ enum('normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900)
+ """
+ _schema = {'$ref': '#/definitions/FontWeight'}
+
+ def __init__(self, *args):
+ super(FontWeight, self).__init__(*args)
+
+
+class Generator(Data):
+ """Generator schema wrapper
+
+ anyOf(:class:`SequenceGenerator`, :class:`SphereGenerator`, :class:`GraticuleGenerator`)
+ """
+ _schema = {'$ref': '#/definitions/Generator'}
+
+ def __init__(self, *args, **kwds):
+ super(Generator, self).__init__(*args, **kwds)
+
+
+class GenericUnitSpecEncodingAnyMark(VegaLiteSchema):
+ """GenericUnitSpecEncodingAnyMark schema wrapper
+
+ Mapping(required=[mark])
+ Base interface for a unit (single-view) specification.
+
+ Attributes
+ ----------
+
+ mark : :class:`AnyMark`
+ A string describing the mark type (one of ``"bar"``, ``"circle"``, ``"square"``,
+ ``"tick"``, ``"line"``,
+ ``"area"``, ``"point"``, ``"rule"``, ``"geoshape"``, and ``"text"`` ) or a `mark
+ definition object <https://vega.github.io/vega-lite/docs/mark.html#mark-def>`__.
+ data : anyOf(:class:`Data`, None)
+ An object describing the data source. Set to ``null`` to ignore the parent's data
+ source. If no data is set, it is derived from the parent.
+ description : string
+ Description of this mark for commenting purpose.
+ encoding : :class:`Encoding`
+ A key-value mapping between encoding channels and definition of fields.
+ height : float
+ The height of a visualization.
+
+ **Default value:**
+
+
+ * If a view's `autosize
+ <https://vega.github.io/vega-lite/docs/size.html#autosize>`__ type is ``"fit"`` or
+ its y-channel has a `continuous scale
+ <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__, the height will
+ be the value of `config.view.height
+ <https://vega.github.io/vega-lite/docs/spec.html#config>`__.
+ * For y-axis with a band or point scale: if `rangeStep
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__ is a numeric value or
+ unspecified, the height is `determined by the range step, paddings, and the
+ cardinality of the field mapped to y-channel
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__. Otherwise, if the
+ ``rangeStep`` is ``null``, the height will be the value of `config.view.height
+ <https://vega.github.io/vega-lite/docs/spec.html#config>`__.
+ * If no field is mapped to ``y`` channel, the ``height`` will be the value of
+ ``rangeStep``.
+
+ **Note** : For plots with `row and column channels
+ <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the
+ height of a single view.
+
+ **See also:** The documentation for `width and height
+ <https://vega.github.io/vega-lite/docs/size.html>`__ contains more examples.
+ name : string
+ Name of the visualization for later reference.
+ projection : :class:`Projection`
+ An object defining properties of geographic projection, which will be applied to
+ ``shape`` path for ``"geoshape"`` marks
+ and to ``latitude`` and ``"longitude"`` channels for other marks.
+ selection : Mapping(required=[])
+ A key-value mapping between selection names and definitions.
+ title : anyOf(string, :class:`TitleParams`)
+ Title for the plot.
+ transform : List(:class:`Transform`)
+ An array of data transformations such as filter and new field calculation.
+ view : :class:`ViewBackground`
+ An object defining the view background's fill and stroke.
+
+ **Default value:** none (transparent)
+ width : float
+ The width of a visualization.
+
+ **Default value:** This will be determined by the following rules:
+
+
+ * If a view's `autosize
+ <https://vega.github.io/vega-lite/docs/size.html#autosize>`__ type is ``"fit"`` or
+ its x-channel has a `continuous scale
+ <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__, the width will
+ be the value of `config.view.width
+ <https://vega.github.io/vega-lite/docs/spec.html#config>`__.
+ * For x-axis with a band or point scale: if `rangeStep
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__ is a numeric value or
+ unspecified, the width is `determined by the range step, paddings, and the
+ cardinality of the field mapped to x-channel
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__. Otherwise, if the
+ ``rangeStep`` is ``null``, the width will be the value of `config.view.width
+ <https://vega.github.io/vega-lite/docs/spec.html#config>`__.
+ * If no field is mapped to ``x`` channel, the ``width`` will be the value of
+ `config.scale.textXRangeStep
+ <https://vega.github.io/vega-lite/docs/size.html#default-width-and-height>`__ for
+ ``text`` mark and the value of ``rangeStep`` for other marks.
+
+ **Note:** For plots with `row and column channels
+ <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the
+ width of a single view.
+
+ **See also:** The documentation for `width and height
+ <https://vega.github.io/vega-lite/docs/size.html>`__ contains more examples.
+ """
+ _schema = {'$ref': '#/definitions/GenericUnitSpec<Encoding,AnyMark>'}
+
+ def __init__(self, mark=Undefined, data=Undefined, description=Undefined, encoding=Undefined,
+ height=Undefined, name=Undefined, projection=Undefined, selection=Undefined,
+ title=Undefined, transform=Undefined, view=Undefined, width=Undefined, **kwds):
+ super(GenericUnitSpecEncodingAnyMark, self).__init__(mark=mark, data=data,
+ description=description, encoding=encoding,
+ height=height, name=name,
+ projection=projection, selection=selection,
+ title=title, transform=transform,
+ view=view, width=width, **kwds)
+
+
+class GraticuleGenerator(Generator):
+ """GraticuleGenerator schema wrapper
+
+ Mapping(required=[graticule])
+
+ Attributes
+ ----------
+
+ graticule : anyOf(enum(True), :class:`GraticuleParams`)
+ Generate graticule GeoJSON data for geographic reference lines.
+ name : string
+ Provide a placeholder name and bind data at runtime.
+ """
+ _schema = {'$ref': '#/definitions/GraticuleGenerator'}
+
+ def __init__(self, graticule=Undefined, name=Undefined, **kwds):
+ super(GraticuleGenerator, self).__init__(graticule=graticule, name=name, **kwds)
+
+
+class GraticuleParams(VegaLiteSchema):
+ """GraticuleParams schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ extent : List(List(float))
+ Sets both the major and minor extents to the same values.
+ extentMajor : List(List(float))
+ The major extent of the graticule as a two-element array of coordinates.
+ extentMinor : List(List(float))
+ The minor extent of the graticule as a two-element array of coordinates.
+ precision : float
+ The precision of the graticule in degrees.
+
+ **Default value:** ``2.5``
+ step : List(float)
+ Sets both the major and minor step angles to the same values.
+ stepMajor : List(float)
+ The major step angles of the graticule.
+
+ **Default value:** ``[90, 360]``
+ stepMinor : List(float)
+ The minor step angles of the graticule.
+
+ **Default value:** ``[10, 10]``
+ """
+ _schema = {'$ref': '#/definitions/GraticuleParams'}
+
+ def __init__(self, extent=Undefined, extentMajor=Undefined, extentMinor=Undefined,
+ precision=Undefined, step=Undefined, stepMajor=Undefined, stepMinor=Undefined, **kwds):
+ super(GraticuleParams, self).__init__(extent=extent, extentMajor=extentMajor,
+ extentMinor=extentMinor, precision=precision, step=step,
+ stepMajor=stepMajor, stepMinor=stepMinor, **kwds)
+
+
+class Header(VegaLiteSchema):
+ """Header schema wrapper
+
+ Mapping(required=[])
+ Headers of row / column channels for faceted plots.
+
+ Attributes
+ ----------
+
+ format : string
+ The text formatting pattern for labels of guides (axes, legends, headers) and text
+ marks.
+
+
+ * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
+ `number format pattern <https://github.com/d3/d3-format#locale_format>`__.
+ * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
+ format pattern <https://github.com/d3/d3-time-format#locale_format>`__.
+
+ See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
+ for more examples.
+
+ **Default value:** Derived from `numberFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
+ format and from `timeFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
+ format.
+ formatType : enum('number', 'time')
+ The format type for labels ( ``"number"`` or ``"time"`` ).
+
+ **Default value:**
+
+
+ * ``"time"`` for temporal fields and ordinal and nomimal fields with ``timeUnit``.
+ * ``"number"`` for quantitative fields as well as ordinal and nomimal fields without
+ ``timeUnit``.
+ labelAlign : :class:`Align`
+ Horizontal text alignment of header labels.
+ labelAnchor : :class:`TitleAnchor`
+ The anchor position for placing the labels. One of ``"start"``, ``"middle"``, or
+ ``"end"``. For example, with a label orientation of top these anchor positions map
+ to a left-, center-, or right-aligned label.
+ labelAngle : float
+ The rotation angle of the header labels.
+
+ **Default value:** ``0`` for column header, ``-90`` for row header.
+ labelColor : :class:`Color`
+ The color of the header label, can be in hex color code or regular color name.
+ labelFont : string
+ The font of the header label.
+ labelFontSize : float
+ The font size of the header label, in pixels.
+ labelFontStyle : :class:`FontStyle`
+ The font style of the header label.
+ labelLimit : float
+ The maximum length of the header label in pixels. The text value will be
+ automatically truncated if the rendered size exceeds the limit.
+
+ **Default value:** ``0``, indicating no limit
+ labelOrient : :class:`Orient`
+ The orientation of the header label. One of ``"top"``, ``"bottom"``, ``"left"`` or
+ ``"right"``.
+ labelPadding : float
+ The padding, in pixel, between facet header's label and the plot.
+
+ **Default value:** ``10``
+ labels : boolean
+ A boolean flag indicating if labels should be included as part of the header.
+
+ **Default value:** ``true``.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ titleAlign : :class:`Align`
+ Horizontal text alignment (to the anchor) of header titles.
+ titleAnchor : :class:`TitleAnchor`
+ The anchor position for placing the title. One of ``"start"``, ``"middle"``, or
+ ``"end"``. For example, with an orientation of top these anchor positions map to a
+ left-, center-, or right-aligned title.
+ titleAngle : float
+ The rotation angle of the header title.
+
+ **Default value:** ``0``.
+ titleBaseline : :class:`TextBaseline`
+ Vertical text baseline for the header title. One of ``"top"``, ``"bottom"``,
+ ``"middle"``.
+
+ **Default value:** ``"middle"``
+ titleColor : :class:`Color`
+ Color of the header title, can be in hex color code or regular color name.
+ titleFont : string
+ Font of the header title. (e.g., ``"Helvetica Neue"`` ).
+ titleFontSize : float
+ Font size of the header title.
+ titleFontStyle : :class:`FontStyle`
+ The font style of the header title.
+ titleFontWeight : :class:`FontWeight`
+ Font weight of the header title.
+ This can be either a string (e.g ``"bold"``, ``"normal"`` ) or a number ( ``100``,
+ ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and ``"bold"`` = ``700``
+ ).
+ titleLimit : float
+ The maximum length of the header title in pixels. The text value will be
+ automatically truncated if the rendered size exceeds the limit.
+
+ **Default value:** ``0``, indicating no limit
+ titleOrient : :class:`Orient`
+ The orientation of the header title. One of ``"top"``, ``"bottom"``, ``"left"`` or
+ ``"right"``.
+ titlePadding : float
+ The padding, in pixel, between facet header's title and the label.
+
+ **Default value:** ``10``
+ """
+ _schema = {'$ref': '#/definitions/Header'}
+
+ def __init__(self, format=Undefined, formatType=Undefined, labelAlign=Undefined,
+ labelAnchor=Undefined, labelAngle=Undefined, labelColor=Undefined, labelFont=Undefined,
+ labelFontSize=Undefined, labelFontStyle=Undefined, labelLimit=Undefined,
+ labelOrient=Undefined, labelPadding=Undefined, labels=Undefined, title=Undefined,
+ titleAlign=Undefined, titleAnchor=Undefined, titleAngle=Undefined,
+ titleBaseline=Undefined, titleColor=Undefined, titleFont=Undefined,
+ titleFontSize=Undefined, titleFontStyle=Undefined, titleFontWeight=Undefined,
+ titleLimit=Undefined, titleOrient=Undefined, titlePadding=Undefined, **kwds):
+ super(Header, self).__init__(format=format, formatType=formatType, labelAlign=labelAlign,
+ labelAnchor=labelAnchor, labelAngle=labelAngle,
+ labelColor=labelColor, labelFont=labelFont,
+ labelFontSize=labelFontSize, labelFontStyle=labelFontStyle,
+ labelLimit=labelLimit, labelOrient=labelOrient,
+ labelPadding=labelPadding, labels=labels, title=title,
+ titleAlign=titleAlign, titleAnchor=titleAnchor,
+ titleAngle=titleAngle, titleBaseline=titleBaseline,
+ titleColor=titleColor, titleFont=titleFont,
+ titleFontSize=titleFontSize, titleFontStyle=titleFontStyle,
+ titleFontWeight=titleFontWeight, titleLimit=titleLimit,
+ titleOrient=titleOrient, titlePadding=titlePadding, **kwds)
+
+
+class HeaderConfig(VegaLiteSchema):
+ """HeaderConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ format : string
+ The text formatting pattern for labels of guides (axes, legends, headers) and text
+ marks.
+
+
+ * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
+ `number format pattern <https://github.com/d3/d3-format#locale_format>`__.
+ * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
+ format pattern <https://github.com/d3/d3-time-format#locale_format>`__.
+
+ See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
+ for more examples.
+
+ **Default value:** Derived from `numberFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
+ format and from `timeFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
+ format.
+ formatType : enum('number', 'time')
+ The format type for labels ( ``"number"`` or ``"time"`` ).
+
+ **Default value:**
+
+
+ * ``"time"`` for temporal fields and ordinal and nomimal fields with ``timeUnit``.
+ * ``"number"`` for quantitative fields as well as ordinal and nomimal fields without
+ ``timeUnit``.
+ labelAlign : :class:`Align`
+ Horizontal text alignment of header labels.
+ labelAnchor : :class:`TitleAnchor`
+ The anchor position for placing the labels. One of ``"start"``, ``"middle"``, or
+ ``"end"``. For example, with a label orientation of top these anchor positions map
+ to a left-, center-, or right-aligned label.
+ labelAngle : float
+ The rotation angle of the header labels.
+
+ **Default value:** ``0`` for column header, ``-90`` for row header.
+ labelColor : :class:`Color`
+ The color of the header label, can be in hex color code or regular color name.
+ labelFont : string
+ The font of the header label.
+ labelFontSize : float
+ The font size of the header label, in pixels.
+ labelFontStyle : :class:`FontStyle`
+ The font style of the header label.
+ labelLimit : float
+ The maximum length of the header label in pixels. The text value will be
+ automatically truncated if the rendered size exceeds the limit.
+
+ **Default value:** ``0``, indicating no limit
+ labelOrient : :class:`Orient`
+ The orientation of the header label. One of ``"top"``, ``"bottom"``, ``"left"`` or
+ ``"right"``.
+ labelPadding : float
+ The padding, in pixel, between facet header's label and the plot.
+
+ **Default value:** ``10``
+ labels : boolean
+ A boolean flag indicating if labels should be included as part of the header.
+
+ **Default value:** ``true``.
+ shortTimeLabels : boolean
+ Whether month names and weekday names should be abbreviated.
+
+ **Default value:** ``false``
+ title : None
+ Set to null to disable title for the axis, legend, or header.
+ titleAlign : :class:`Align`
+ Horizontal text alignment (to the anchor) of header titles.
+ titleAnchor : :class:`TitleAnchor`
+ The anchor position for placing the title. One of ``"start"``, ``"middle"``, or
+ ``"end"``. For example, with an orientation of top these anchor positions map to a
+ left-, center-, or right-aligned title.
+ titleAngle : float
+ The rotation angle of the header title.
+
+ **Default value:** ``0``.
+ titleBaseline : :class:`TextBaseline`
+ Vertical text baseline for the header title. One of ``"top"``, ``"bottom"``,
+ ``"middle"``.
+
+ **Default value:** ``"middle"``
+ titleColor : :class:`Color`
+ Color of the header title, can be in hex color code or regular color name.
+ titleFont : string
+ Font of the header title. (e.g., ``"Helvetica Neue"`` ).
+ titleFontSize : float
+ Font size of the header title.
+ titleFontStyle : :class:`FontStyle`
+ The font style of the header title.
+ titleFontWeight : :class:`FontWeight`
+ Font weight of the header title.
+ This can be either a string (e.g ``"bold"``, ``"normal"`` ) or a number ( ``100``,
+ ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and ``"bold"`` = ``700``
+ ).
+ titleLimit : float
+ The maximum length of the header title in pixels. The text value will be
+ automatically truncated if the rendered size exceeds the limit.
+
+ **Default value:** ``0``, indicating no limit
+ titleOrient : :class:`Orient`
+ The orientation of the header title. One of ``"top"``, ``"bottom"``, ``"left"`` or
+ ``"right"``.
+ titlePadding : float
+ The padding, in pixel, between facet header's title and the label.
+
+ **Default value:** ``10``
+ """
+ _schema = {'$ref': '#/definitions/HeaderConfig'}
+
+ def __init__(self, format=Undefined, formatType=Undefined, labelAlign=Undefined,
+ labelAnchor=Undefined, labelAngle=Undefined, labelColor=Undefined, labelFont=Undefined,
+ labelFontSize=Undefined, labelFontStyle=Undefined, labelLimit=Undefined,
+ labelOrient=Undefined, labelPadding=Undefined, labels=Undefined,
+ shortTimeLabels=Undefined, title=Undefined, titleAlign=Undefined,
+ titleAnchor=Undefined, titleAngle=Undefined, titleBaseline=Undefined,
+ titleColor=Undefined, titleFont=Undefined, titleFontSize=Undefined,
+ titleFontStyle=Undefined, titleFontWeight=Undefined, titleLimit=Undefined,
+ titleOrient=Undefined, titlePadding=Undefined, **kwds):
+ super(HeaderConfig, self).__init__(format=format, formatType=formatType, labelAlign=labelAlign,
+ labelAnchor=labelAnchor, labelAngle=labelAngle,
+ labelColor=labelColor, labelFont=labelFont,
+ labelFontSize=labelFontSize, labelFontStyle=labelFontStyle,
+ labelLimit=labelLimit, labelOrient=labelOrient,
+ labelPadding=labelPadding, labels=labels,
+ shortTimeLabels=shortTimeLabels, title=title,
+ titleAlign=titleAlign, titleAnchor=titleAnchor,
+ titleAngle=titleAngle, titleBaseline=titleBaseline,
+ titleColor=titleColor, titleFont=titleFont,
+ titleFontSize=titleFontSize, titleFontStyle=titleFontStyle,
+ titleFontWeight=titleFontWeight, titleLimit=titleLimit,
+ titleOrient=titleOrient, titlePadding=titlePadding, **kwds)
+
+
+class HexColor(Color):
+ """HexColor schema wrapper
+
+ string
+ """
+ _schema = {'$ref': '#/definitions/HexColor'}
+
+ def __init__(self, *args):
+ super(HexColor, self).__init__(*args)
+
+
+class ImputeMethod(VegaLiteSchema):
+ """ImputeMethod schema wrapper
+
+ enum('value', 'median', 'max', 'min', 'mean')
+ """
+ _schema = {'$ref': '#/definitions/ImputeMethod'}
+
+ def __init__(self, *args):
+ super(ImputeMethod, self).__init__(*args)
+
+
+class ImputeParams(VegaLiteSchema):
+ """ImputeParams schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ frame : List(anyOf(None, float))
+ A frame specification as a two-element array used to control the window over which
+ the specified method is applied. The array entries should either be a number
+ indicating the offset from the current data object, or null to indicate unbounded
+ rows preceding or following the current data object. For example, the value ``[-5,
+ 5]`` indicates that the window should include five objects preceding and five
+ objects following the current object.
+
+ **Default value:** : ``[null, null]`` indicating that the window includes all
+ objects.
+ keyvals : anyOf(List(Any), :class:`ImputeSequence`)
+ Defines the key values that should be considered for imputation.
+ An array of key values or an object defining a `number sequence
+ <https://vega.github.io/vega-lite/docs/impute.html#sequence-def>`__.
+
+ If provided, this will be used in addition to the key values observed within the
+ input data. If not provided, the values will be derived from all unique values of
+ the ``key`` field. For ``impute`` in ``encoding``, the key field is the x-field if
+ the y-field is imputed, or vice versa.
+
+ If there is no impute grouping, this property *must* be specified.
+ method : :class:`ImputeMethod`
+ The imputation method to use for the field value of imputed data objects.
+ One of ``value``, ``mean``, ``median``, ``max`` or ``min``.
+
+ **Default value:** ``"value"``
+ value : Any
+ The field value to use when the imputation ``method`` is ``"value"``.
+ """
+ _schema = {'$ref': '#/definitions/ImputeParams'}
+
+ def __init__(self, frame=Undefined, keyvals=Undefined, method=Undefined, value=Undefined, **kwds):
+ super(ImputeParams, self).__init__(frame=frame, keyvals=keyvals, method=method, value=value,
+ **kwds)
+
+
+class ImputeSequence(VegaLiteSchema):
+ """ImputeSequence schema wrapper
+
+ Mapping(required=[stop])
+
+ Attributes
+ ----------
+
+ stop : float
+ The ending value(exclusive) of the sequence.
+ start : float
+ The starting value of the sequence.
+ **Default value:** ``0``
+ step : float
+ The step value between sequence entries.
+ **Default value:** ``1`` or ``-1`` if ``stop < start``
+ """
+ _schema = {'$ref': '#/definitions/ImputeSequence'}
+
+ def __init__(self, stop=Undefined, start=Undefined, step=Undefined, **kwds):
+ super(ImputeSequence, self).__init__(stop=stop, start=start, step=step, **kwds)
+
+
+class InlineData(DataSource):
+ """InlineData schema wrapper
+
+ Mapping(required=[values])
+
+ Attributes
+ ----------
+
+ values : :class:`InlineDataset`
+ The full data set, included inline. This can be an array of objects or primitive
+ values, an object, or a string.
+ Arrays of primitive values are ingested as objects with a ``data`` property. Strings
+ are parsed according to the specified format type.
+ format : :class:`DataFormat`
+ An object that specifies the format for parsing the data.
+ name : string
+ Provide a placeholder name and bind data at runtime.
+ """
+ _schema = {'$ref': '#/definitions/InlineData'}
+
+ def __init__(self, values=Undefined, format=Undefined, name=Undefined, **kwds):
+ super(InlineData, self).__init__(values=values, format=format, name=name, **kwds)
+
+
+class InlineDataset(VegaLiteSchema):
+ """InlineDataset schema wrapper
+
+ anyOf(List(float), List(string), List(boolean), List(Mapping(required=[])), string,
+ Mapping(required=[]))
+ """
+ _schema = {'$ref': '#/definitions/InlineDataset'}
+
+ def __init__(self, *args, **kwds):
+ super(InlineDataset, self).__init__(*args, **kwds)
+
+
+class InputBinding(Binding):
+ """InputBinding schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ autocomplete : string
+
+ debounce : float
+
+ element : :class:`Element`
+
+ input : string
+
+ name : string
+
+ placeholder : string
+
+ type : string
+
+ """
+ _schema = {'$ref': '#/definitions/InputBinding'}
+
+ def __init__(self, autocomplete=Undefined, debounce=Undefined, element=Undefined, input=Undefined,
+ name=Undefined, placeholder=Undefined, type=Undefined, **kwds):
+ super(InputBinding, self).__init__(autocomplete=autocomplete, debounce=debounce,
+ element=element, input=input, name=name,
+ placeholder=placeholder, type=type, **kwds)
+
+
+class Interpolate(VegaLiteSchema):
+ """Interpolate schema wrapper
+
+ enum('linear', 'linear-closed', 'step', 'step-before', 'step-after', 'basis', 'basis-open',
+ 'basis-closed', 'cardinal', 'cardinal-open', 'cardinal-closed', 'bundle', 'monotone')
+ """
+ _schema = {'$ref': '#/definitions/Interpolate'}
+
+ def __init__(self, *args):
+ super(Interpolate, self).__init__(*args)
+
+
+class IntervalSelectionConfig(VegaLiteSchema):
+ """IntervalSelectionConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ bind : enum('scales')
+ Establishes a two-way binding between the interval selection and the scales
+ used within the same view. This allows a user to interactively pan and
+ zoom the view.
+
+ **See also:** `bind <https://vega.github.io/vega-lite/docs/bind.html>`__
+ documentation.
+ clear : anyOf(:class:`EventStream`, boolean)
+ Clears the selection, emptying it of all values. Can be an
+ `EventStream <https://vega.github.io/vega/docs/event-streams/>`__ or ``false`` to
+ disable.
+
+ **Default value:** ``dblclick``.
+
+ **See also:** `clear <https://vega.github.io/vega-lite/docs/clear.html>`__
+ documentation.
+ empty : enum('all', 'none')
+ By default, ``all`` data values are considered to lie within an empty selection.
+ When set to ``none``, empty selections contain no data values.
+ encodings : List(:class:`SingleDefUnitChannel`)
+ An array of encoding channels. The corresponding data field values
+ must match for a data tuple to fall within the selection.
+
+ **See also:** `encodings <https://vega.github.io/vega-lite/docs/project.html>`__
+ documentation.
+ fields : List(:class:`FieldName`)
+ An array of field names whose values must match for a data tuple to
+ fall within the selection.
+
+ **See also:** `fields <https://vega.github.io/vega-lite/docs/project.html>`__
+ documentation.
+ init : :class:`SelectionInitIntervalMapping`
+ Initialize the selection with a mapping between `projected channels or field names
+ <https://vega.github.io/vega-lite/docs/project.html>`__ and arrays of
+ initial values.
+
+ **See also:** `init <https://vega.github.io/vega-lite/docs/init.html>`__
+ documentation.
+ mark : :class:`BrushConfig`
+ An interval selection also adds a rectangle mark to depict the
+ extents of the interval. The ``mark`` property can be used to customize the
+ appearance of the mark.
+
+ **See also:** `mark <https://vega.github.io/vega-lite/docs/selection-mark.html>`__
+ documentation.
+ on : :class:`EventStream`
+ A `Vega event stream <https://vega.github.io/vega/docs/event-streams/>`__ (object or
+ selector) that triggers the selection.
+ For interval selections, the event stream must specify a `start and end
+ <https://vega.github.io/vega/docs/event-streams/#between-filters>`__.
+ resolve : :class:`SelectionResolution`
+ With layered and multi-view displays, a strategy that determines how
+ selections' data queries are resolved when applied in a filter transform,
+ conditional encoding rule, or scale domain.
+
+ **See also:** `resolve
+ <https://vega.github.io/vega-lite/docs/selection-resolve.html>`__ documentation.
+ translate : anyOf(string, boolean)
+ When truthy, allows a user to interactively move an interval selection
+ back-and-forth. Can be ``true``, ``false`` (to disable panning), or a
+ `Vega event stream definition <https://vega.github.io/vega/docs/event-streams/>`__
+ which must include a start and end event to trigger continuous panning.
+
+ **Default value:** ``true``, which corresponds to
+ ``[mousedown, window:mouseup] > window:mousemove!`` which corresponds to
+ clicks and dragging within an interval selection to reposition it.
+
+ **See also:** `translate <https://vega.github.io/vega-lite/docs/translate.html>`__
+ documentation.
+ zoom : anyOf(string, boolean)
+ When truthy, allows a user to interactively resize an interval selection.
+ Can be ``true``, ``false`` (to disable zooming), or a `Vega event stream
+ definition <https://vega.github.io/vega/docs/event-streams/>`__. Currently,
+ only ``wheel`` events are supported.
+
+ **Default value:** ``true``, which corresponds to ``wheel!``.
+
+ **See also:** `zoom <https://vega.github.io/vega-lite/docs/zoom.html>`__
+ documentation.
+ """
+ _schema = {'$ref': '#/definitions/IntervalSelectionConfig'}
+
+ def __init__(self, bind=Undefined, clear=Undefined, empty=Undefined, encodings=Undefined,
+ fields=Undefined, init=Undefined, mark=Undefined, on=Undefined, resolve=Undefined,
+ translate=Undefined, zoom=Undefined, **kwds):
+ super(IntervalSelectionConfig, self).__init__(bind=bind, clear=clear, empty=empty,
+ encodings=encodings, fields=fields, init=init,
+ mark=mark, on=on, resolve=resolve,
+ translate=translate, zoom=zoom, **kwds)
+
+
+class JoinAggregateFieldDef(VegaLiteSchema):
+ """JoinAggregateFieldDef schema wrapper
+
+ Mapping(required=[op, as])
+
+ Attributes
+ ----------
+
+ op : :class:`AggregateOp`
+ The aggregation operation to apply (e.g., sum, average or count). See the list of
+ all supported operations `here
+ <https://vega.github.io/vega-lite/docs/aggregate.html#ops>`__.
+ field : :class:`FieldName`
+ The data field for which to compute the aggregate function. This can be omitted for
+ functions that do not operate over a field such as ``count``.
+ as : :class:`FieldName`
+ The output name for the join aggregate operation.
+ """
+ _schema = {'$ref': '#/definitions/JoinAggregateFieldDef'}
+
+ def __init__(self, op=Undefined, field=Undefined, **kwds):
+ super(JoinAggregateFieldDef, self).__init__(op=op, field=field, **kwds)
+
+
+class JsonDataFormat(DataFormat):
+ """JsonDataFormat schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ parse : anyOf(:class:`Parse`, None)
+ If set to ``null``, disable type inference based on the spec and only use type
+ inference based on the data.
+ Alternatively, a parsing directive object can be provided for explicit data types.
+ Each property of the object corresponds to a field name, and the value to the
+ desired data type (one of ``"number"``, ``"boolean"``, ``"date"``, or null (do not
+ parse the field)).
+ For example, ``"parse": {"modified_on": "date"}`` parses the ``modified_on`` field
+ in each input record a Date value.
+
+ For ``"date"``, we parse data based using Javascript's `Date.parse()
+ <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse>`__.
+ For Specific date formats can be provided (e.g., ``{foo: "date:'%m%d%Y'"}`` ), using
+ the `d3-time-format syntax <https://github.com/d3/d3-time-format#locale_format>`__.
+ UTC date format parsing is supported similarly (e.g., ``{foo: "utc:'%m%d%Y'"}`` ).
+ See more about `UTC time
+ <https://vega.github.io/vega-lite/docs/timeunit.html#utc>`__
+ property : string
+ The JSON property containing the desired data.
+ This parameter can be used when the loaded JSON file may have surrounding structure
+ or meta-data.
+ For example ``"property": "values.features"`` is equivalent to retrieving
+ ``json.values.features``
+ from the loaded JSON object.
+ type : enum('json')
+ Type of input data: ``"json"``, ``"csv"``, ``"tsv"``, ``"dsv"``.
+
+ **Default value:** The default format type is determined by the extension of the
+ file URL.
+ If no extension is detected, ``"json"`` will be used by default.
+ """
+ _schema = {'$ref': '#/definitions/JsonDataFormat'}
+
+ def __init__(self, parse=Undefined, property=Undefined, type=Undefined, **kwds):
+ super(JsonDataFormat, self).__init__(parse=parse, property=property, type=type, **kwds)
+
+
+class LabelOverlap(VegaLiteSchema):
+ """LabelOverlap schema wrapper
+
+ anyOf(boolean, enum('parity'), enum('greedy'))
+ """
+ _schema = {'$ref': '#/definitions/LabelOverlap'}
+
+ def __init__(self, *args, **kwds):
+ super(LabelOverlap, self).__init__(*args, **kwds)
+
+
+class LatLongFieldDef(VegaLiteSchema):
+ """LatLongFieldDef schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : None
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : enum('quantitative')
+ The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``,
+ ``"ordinal"``, or ``"nominal"`` ).
+ It can also be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ **Note:**
+
+
+ * Data values for a temporal field can be either a date-time string (e.g.,
+ ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a
+ timestamp number (e.g., ``1552199579097`` ).
+ * Data ``type`` describes the semantics of the data rather than the primitive data
+ types ( ``number``, ``string``, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data.
+ * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
+ or `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `timeUnit
+ <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
+ can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using
+ an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
+ refers to the post-aggregation data type. For example, we can calculate count
+ ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
+ "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output
+ is ``"quantitative"``.
+ * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have
+ ``type`` as they have exactly the same type as their primary channels (e.g.,
+ ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _schema = {'$ref': '#/definitions/LatLongFieldDef'}
+
+ def __init__(self, aggregate=Undefined, bin=Undefined, field=Undefined, timeUnit=Undefined,
+ title=Undefined, type=Undefined, **kwds):
+ super(LatLongFieldDef, self).__init__(aggregate=aggregate, bin=bin, field=field,
+ timeUnit=timeUnit, title=title, type=type, **kwds)
+
+
+class LayoutAlign(VegaLiteSchema):
+ """LayoutAlign schema wrapper
+
+ enum('all', 'each', 'none')
+ """
+ _schema = {'$ref': '#/definitions/LayoutAlign'}
+
+ def __init__(self, *args):
+ super(LayoutAlign, self).__init__(*args)
+
+
+class LayoutBounds(VegaLiteSchema):
+ """LayoutBounds schema wrapper
+
+ anyOf(enum('full'), enum('flush'), :class:`SignalRef`)
+ """
+ _schema = {'$ref': '#/definitions/LayoutBounds'}
+
+ def __init__(self, *args, **kwds):
+ super(LayoutBounds, self).__init__(*args, **kwds)
+
+
+class Legend(VegaLiteSchema):
+ """Legend schema wrapper
+
+ Mapping(required=[])
+ Properties of a legend or boolean flag for determining whether to show it.
+
+ Attributes
+ ----------
+
+ clipHeight : float
+ The height in pixels to clip symbol legend entries and limit their size.
+ columnPadding : float
+ The horizontal padding in pixels between symbol legend entries.
+
+ **Default value:** ``10``.
+ columns : float
+ The number of columns in which to arrange symbol legend entries. A value of ``0`` or
+ lower indicates a single row with one column per entry.
+ cornerRadius : float
+ Corner radius for the full legend.
+ direction : :class:`Orientation`
+ The direction of the legend, one of ``"vertical"`` or ``"horizontal"``.
+
+ **Default value:**
+
+
+ * For top-/bottom- ``orient`` ed legends, ``"horizontal"``
+ * For left-/right- ``orient`` ed legends, ``"vertical"``
+ * For top/bottom-left/right- ``orient`` ed legends, ``"horizontal"`` for gradient
+ legends and ``"vertical"`` for symbol legends.
+ fillColor : :class:`Color`
+ Background fill color for the full legend.
+ format : string
+ The text formatting pattern for labels of guides (axes, legends, headers) and text
+ marks.
+
+
+ * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
+ `number format pattern <https://github.com/d3/d3-format#locale_format>`__.
+ * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
+ format pattern <https://github.com/d3/d3-time-format#locale_format>`__.
+
+ See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
+ for more examples.
+
+ **Default value:** Derived from `numberFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
+ format and from `timeFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
+ format.
+ formatType : enum('number', 'time')
+ The format type for labels ( ``"number"`` or ``"time"`` ).
+
+ **Default value:**
+
+
+ * ``"time"`` for temporal fields and ordinal and nomimal fields with ``timeUnit``.
+ * ``"number"`` for quantitative fields as well as ordinal and nomimal fields without
+ ``timeUnit``.
+ gradientLength : float
+ The length in pixels of the primary axis of a color gradient. This value corresponds
+ to the height of a vertical gradient or the width of a horizontal gradient.
+
+ **Default value:** ``200``.
+ gradientOpacity : float
+ Opacity of the color gradient.
+ gradientStrokeColor : :class:`Color`
+ The color of the gradient stroke, can be in hex color code or regular color name.
+
+ **Default value:** ``"lightGray"``.
+ gradientStrokeWidth : float
+ The width of the gradient stroke, in pixels.
+
+ **Default value:** ``0``.
+ gradientThickness : float
+ The thickness in pixels of the color gradient. This value corresponds to the width
+ of a vertical gradient or the height of a horizontal gradient.
+
+ **Default value:** ``16``.
+ gridAlign : :class:`LayoutAlign`
+ The alignment to apply to symbol legends rows and columns. The supported string
+ values are ``"all"``, ``"each"`` (the default), and ``none``. For more information,
+ see the `grid layout documentation <https://vega.github.io/vega/docs/layout>`__.
+
+ **Default value:** ``"each"``.
+ labelAlign : :class:`Align`
+ The alignment of the legend label, can be left, center, or right.
+ labelBaseline : :class:`TextBaseline`
+ The position of the baseline of legend label, can be ``"top"``, ``"middle"``,
+ ``"bottom"``, or ``"alphabetic"``.
+
+ **Default value:** ``"middle"``.
+ labelColor : :class:`Color`
+ The color of the legend label, can be in hex color code or regular color name.
+ labelFont : string
+ The font of the legend label.
+ labelFontSize : float
+ The font size of legend label.
+
+ **Default value:** ``10``.
+ labelFontStyle : :class:`FontStyle`
+ The font style of legend label.
+ labelFontWeight : :class:`FontWeight`
+ The font weight of legend label.
+ labelLimit : float
+ Maximum allowed pixel width of legend tick labels.
+
+ **Default value:** ``160``.
+ labelOffset : float
+ The offset of the legend label.
+ labelOpacity : float
+ Opacity of labels.
+ labelOverlap : :class:`LabelOverlap`
+ The strategy to use for resolving overlap of labels in gradient legends. If
+ ``false``, no overlap reduction is attempted. If set to ``true`` (default) or
+ ``"parity"``, a strategy of removing every other label is used. If set to
+ ``"greedy"``, a linear scan of the labels is performed, removing any label that
+ overlaps with the last visible label (this often works better for log-scaled axes).
+
+ **Default value:** ``true``.
+ labelPadding : float
+ Padding in pixels between the legend and legend labels.
+ labelSeparation : float
+ The minimum separation that must be between label bounding boxes for them to be
+ considered non-overlapping (default ``0`` ). This property is ignored if
+ *labelOverlap* resolution is not enabled.
+ legendX : float
+ Custom x-position for legend with orient "none".
+ legendY : float
+ Custom y-position for legend with orient "none".
+ offset : float
+ The offset in pixels by which to displace the legend from the data rectangle and
+ axes.
+
+ **Default value:** ``18``.
+ orient : :class:`LegendOrient`
+ The orientation of the legend, which determines how the legend is positioned within
+ the scene. One of ``"left"``, ``"right"``, ``"top"``, ``"bottom"``, ``"top-left"``,
+ ``"top-right"``, ``"bottom-left"``, ``"bottom-right"``, ``"none"``.
+
+ **Default value:** ``"right"``
+ padding : float
+ The padding between the border and content of the legend group.
+
+ **Default value:** ``0``.
+ rowPadding : float
+ The vertical padding in pixels between symbol legend entries.
+
+ **Default value:** ``2``.
+ strokeColor : :class:`Color`
+ Border stroke color for the full legend.
+ symbolDash : List(float)
+ An array of alternating [stroke, space] lengths for dashed symbol strokes.
+ symbolDashOffset : float
+ The pixel offset at which to start drawing with the symbol stroke dash array.
+ symbolFillColor : :class:`Color`
+ The color of the legend symbol,
+ symbolOffset : float
+ Horizontal pixel offset for legend symbols.
+
+ **Default value:** ``0``.
+ symbolOpacity : float
+ Opacity of the legend symbols.
+ symbolSize : float
+ The size of the legend symbol, in pixels.
+
+ **Default value:** ``100``.
+ symbolStrokeColor : :class:`Color`
+ Stroke color for legend symbols.
+ symbolStrokeWidth : float
+ The width of the symbol's stroke.
+
+ **Default value:** ``1.5``.
+ symbolType : :class:`SymbolShape`
+ The symbol shape. One of the plotting shapes ``circle`` (default), ``square``,
+ ``cross``, ``diamond``, ``triangle-up``, ``triangle-down``, ``triangle-right``, or
+ ``triangle-left``, the line symbol ``stroke``, or one of the centered directional
+ shapes ``arrow``, ``wedge``, or ``triangle``. Alternatively, a custom `SVG path
+ string <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ can be
+ provided. For correct sizing, custom shape paths should be defined within a square
+ bounding box with coordinates ranging from -1 to 1 along both the x and y
+ dimensions.
+
+ **Default value:** ``"circle"``.
+ tickCount : float
+ The desired number of tick values for quantitative legends.
+ tickMinStep : float
+ The minimum desired step between legend ticks, in terms of scale domain values. For
+ example, a value of ``1`` indicates that ticks should not be less than 1 unit apart.
+ If ``tickMinStep`` is specified, the ``tickCount`` value will be adjusted, if
+ necessary, to enforce the minimum step value.
+
+ **Default value** : ``undefined``
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ titleAlign : :class:`Align`
+ Horizontal text alignment for legend titles.
+
+ **Default value:** ``"left"``.
+ titleAnchor : :class:`TitleAnchor`
+ Text anchor position for placing legend titles.
+ titleBaseline : :class:`TextBaseline`
+ Vertical text baseline for legend titles.
+
+ **Default value:** ``"top"``.
+ titleColor : :class:`Color`
+ The color of the legend title, can be in hex color code or regular color name.
+ titleFont : string
+ The font of the legend title.
+ titleFontSize : float
+ The font size of the legend title.
+ titleFontStyle : :class:`FontStyle`
+ The font style of the legend title.
+ titleFontWeight : :class:`FontWeight`
+ The font weight of the legend title.
+ This can be either a string (e.g ``"bold"``, ``"normal"`` ) or a number ( ``100``,
+ ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and ``"bold"`` = ``700``
+ ).
+ titleLimit : float
+ Maximum allowed pixel width of legend titles.
+
+ **Default value:** ``180``.
+ titleOpacity : float
+ Opacity of the legend title.
+ titleOrient : :class:`Orient`
+ Orientation of the legend title.
+ titlePadding : float
+ The padding, in pixels, between title and legend.
+
+ **Default value:** ``5``.
+ type : enum('symbol', 'gradient')
+ The type of the legend. Use ``"symbol"`` to create a discrete legend and
+ ``"gradient"`` for a continuous color gradient.
+
+ **Default value:** ``"gradient"`` for non-binned quantitative fields and temporal
+ fields; ``"symbol"`` otherwise.
+ values : List(anyOf(float, string, boolean, :class:`DateTime`))
+ Explicitly set the visible legend values.
+ zindex : float
+ A non-negative integer indicating the z-index of the legend.
+ If zindex is 0, legend should be drawn behind all chart elements.
+ To put them in front, use zindex = 1.
+ """
+ _schema = {'$ref': '#/definitions/Legend'}
+
+ def __init__(self, clipHeight=Undefined, columnPadding=Undefined, columns=Undefined,
+ cornerRadius=Undefined, direction=Undefined, fillColor=Undefined, format=Undefined,
+ formatType=Undefined, gradientLength=Undefined, gradientOpacity=Undefined,
+ gradientStrokeColor=Undefined, gradientStrokeWidth=Undefined,
+ gradientThickness=Undefined, gridAlign=Undefined, labelAlign=Undefined,
+ labelBaseline=Undefined, labelColor=Undefined, labelFont=Undefined,
+ labelFontSize=Undefined, labelFontStyle=Undefined, labelFontWeight=Undefined,
+ labelLimit=Undefined, labelOffset=Undefined, labelOpacity=Undefined,
+ labelOverlap=Undefined, labelPadding=Undefined, labelSeparation=Undefined,
+ legendX=Undefined, legendY=Undefined, offset=Undefined, orient=Undefined,
+ padding=Undefined, rowPadding=Undefined, strokeColor=Undefined, symbolDash=Undefined,
+ symbolDashOffset=Undefined, symbolFillColor=Undefined, symbolOffset=Undefined,
+ symbolOpacity=Undefined, symbolSize=Undefined, symbolStrokeColor=Undefined,
+ symbolStrokeWidth=Undefined, symbolType=Undefined, tickCount=Undefined,
+ tickMinStep=Undefined, title=Undefined, titleAlign=Undefined, titleAnchor=Undefined,
+ titleBaseline=Undefined, titleColor=Undefined, titleFont=Undefined,
+ titleFontSize=Undefined, titleFontStyle=Undefined, titleFontWeight=Undefined,
+ titleLimit=Undefined, titleOpacity=Undefined, titleOrient=Undefined,
+ titlePadding=Undefined, type=Undefined, values=Undefined, zindex=Undefined, **kwds):
+ super(Legend, self).__init__(clipHeight=clipHeight, columnPadding=columnPadding,
+ columns=columns, cornerRadius=cornerRadius, direction=direction,
+ fillColor=fillColor, format=format, formatType=formatType,
+ gradientLength=gradientLength, gradientOpacity=gradientOpacity,
+ gradientStrokeColor=gradientStrokeColor,
+ gradientStrokeWidth=gradientStrokeWidth,
+ gradientThickness=gradientThickness, gridAlign=gridAlign,
+ labelAlign=labelAlign, labelBaseline=labelBaseline,
+ labelColor=labelColor, labelFont=labelFont,
+ labelFontSize=labelFontSize, labelFontStyle=labelFontStyle,
+ labelFontWeight=labelFontWeight, labelLimit=labelLimit,
+ labelOffset=labelOffset, labelOpacity=labelOpacity,
+ labelOverlap=labelOverlap, labelPadding=labelPadding,
+ labelSeparation=labelSeparation, legendX=legendX, legendY=legendY,
+ offset=offset, orient=orient, padding=padding,
+ rowPadding=rowPadding, strokeColor=strokeColor,
+ symbolDash=symbolDash, symbolDashOffset=symbolDashOffset,
+ symbolFillColor=symbolFillColor, symbolOffset=symbolOffset,
+ symbolOpacity=symbolOpacity, symbolSize=symbolSize,
+ symbolStrokeColor=symbolStrokeColor,
+ symbolStrokeWidth=symbolStrokeWidth, symbolType=symbolType,
+ tickCount=tickCount, tickMinStep=tickMinStep, title=title,
+ titleAlign=titleAlign, titleAnchor=titleAnchor,
+ titleBaseline=titleBaseline, titleColor=titleColor,
+ titleFont=titleFont, titleFontSize=titleFontSize,
+ titleFontStyle=titleFontStyle, titleFontWeight=titleFontWeight,
+ titleLimit=titleLimit, titleOpacity=titleOpacity,
+ titleOrient=titleOrient, titlePadding=titlePadding, type=type,
+ values=values, zindex=zindex, **kwds)
+
+
+class LegendConfig(VegaLiteSchema):
+ """LegendConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ clipHeight : float
+ The height in pixels to clip symbol legend entries and limit their size.
+ columnPadding : float
+ The horizontal padding in pixels between symbol legend entries.
+
+ **Default value:** ``10``.
+ columns : float
+ The number of columns in which to arrange symbol legend entries. A value of ``0`` or
+ lower indicates a single row with one column per entry.
+ cornerRadius : float
+ Corner radius for the full legend.
+ fillColor : :class:`Color`
+ Background fill color for the full legend.
+ gradientDirection : :class:`Orientation`
+ The default direction ( ``"horizontal"`` or ``"vertical"`` ) for gradient legends.
+
+ **Default value:** ``"vertical"``.
+ gradientHorizontalMaxLength : float
+ Max legend length for a horizontal gradient when ``config.legend.gradientLength`` is
+ undefined.
+
+ **Default value:** ``200``
+ gradientHorizontalMinLength : float
+ Min legend length for a horizontal gradient when ``config.legend.gradientLength`` is
+ undefined.
+
+ **Default value:** ``100``
+ gradientLabelLimit : float
+ The maximum allowed length in pixels of color ramp gradient labels.
+ gradientLabelOffset : float
+ Vertical offset in pixels for color ramp gradient labels.
+
+ **Default value:** ``2``.
+ gradientLength : float
+ The length in pixels of the primary axis of a color gradient. This value corresponds
+ to the height of a vertical gradient or the width of a horizontal gradient.
+
+ **Default value:** ``200``.
+ gradientOpacity : float
+ Opacity of the color gradient.
+ gradientStrokeColor : :class:`Color`
+ The color of the gradient stroke, can be in hex color code or regular color name.
+
+ **Default value:** ``"lightGray"``.
+ gradientStrokeWidth : float
+ The width of the gradient stroke, in pixels.
+
+ **Default value:** ``0``.
+ gradientThickness : float
+ The thickness in pixels of the color gradient. This value corresponds to the width
+ of a vertical gradient or the height of a horizontal gradient.
+
+ **Default value:** ``16``.
+ gradientVerticalMaxLength : float
+ Max legend length for a vertical gradient when ``config.legend.gradientLength`` is
+ undefined.
+
+ **Default value:** ``200``
+ gradientVerticalMinLength : float
+ Min legend length for a vertical gradient when ``config.legend.gradientLength`` is
+ undefined.
+
+ **Default value:** ``100``
+ gridAlign : :class:`LayoutAlign`
+ The alignment to apply to symbol legends rows and columns. The supported string
+ values are ``"all"``, ``"each"`` (the default), and ``none``. For more information,
+ see the `grid layout documentation <https://vega.github.io/vega/docs/layout>`__.
+
+ **Default value:** ``"each"``.
+ labelAlign : :class:`Align`
+ The alignment of the legend label, can be left, center, or right.
+ labelBaseline : :class:`TextBaseline`
+ The position of the baseline of legend label, can be ``"top"``, ``"middle"``,
+ ``"bottom"``, or ``"alphabetic"``.
+
+ **Default value:** ``"middle"``.
+ labelColor : :class:`Color`
+ The color of the legend label, can be in hex color code or regular color name.
+ labelFont : string
+ The font of the legend label.
+ labelFontSize : float
+ The font size of legend label.
+
+ **Default value:** ``10``.
+ labelFontStyle : :class:`FontStyle`
+ The font style of legend label.
+ labelFontWeight : :class:`FontWeight`
+ The font weight of legend label.
+ labelLimit : float
+ Maximum allowed pixel width of legend tick labels.
+
+ **Default value:** ``160``.
+ labelOffset : float
+ The offset of the legend label.
+ labelOpacity : float
+ Opacity of labels.
+ labelOverlap : :class:`LabelOverlap`
+ The strategy to use for resolving overlap of labels in gradient legends. If
+ ``false``, no overlap reduction is attempted. If set to ``true`` or ``"parity"``, a
+ strategy of removing every other label is used. If set to ``"greedy"``, a linear
+ scan of the labels is performed, removing any label that overlaps with the last
+ visible label (this often works better for log-scaled axes).
+
+ **Default value:** ``"greedy"`` for ``log scales otherwise`` true`.
+ labelPadding : float
+ Padding in pixels between the legend and legend labels.
+ labelSeparation : float
+ The minimum separation that must be between label bounding boxes for them to be
+ considered non-overlapping (default ``0`` ). This property is ignored if
+ *labelOverlap* resolution is not enabled.
+ layout : :class:`LegendLayout`
+ Legend orient group layout parameters.
+ legendX : float
+ Custom x-position for legend with orient "none".
+ legendY : float
+ Custom y-position for legend with orient "none".
+ offset : float
+ The offset in pixels by which to displace the legend from the data rectangle and
+ axes.
+
+ **Default value:** ``18``.
+ orient : :class:`LegendOrient`
+ The orientation of the legend, which determines how the legend is positioned within
+ the scene. One of "left", "right", "top-left", "top-right", "bottom-left",
+ "bottom-right", "none".
+
+ **Default value:** ``"right"``
+ padding : float
+ The padding between the border and content of the legend group.
+
+ **Default value:** ``0``.
+ rowPadding : float
+ The vertical padding in pixels between symbol legend entries.
+
+ **Default value:** ``2``.
+ shortTimeLabels : boolean
+ Whether month names and weekday names should be abbreviated.
+
+ **Default value:** ``false``
+ strokeColor : :class:`Color`
+ Border stroke color for the full legend.
+ strokeDash : List(float)
+ Border stroke dash pattern for the full legend.
+ strokeWidth : float
+ Border stroke width for the full legend.
+ symbolBaseFillColor : :class:`Color`
+ Default fill color for legend symbols. Only applied if there is no ``"fill"`` scale
+ color encoding for the legend.
+
+ **Default value:** ``"transparent"``.
+ symbolBaseStrokeColor : :class:`Color`
+ Default stroke color for legend symbols. Only applied if there is no ``"fill"``
+ scale color encoding for the legend.
+
+ **Default value:** ``"gray"``.
+ symbolDash : List(float)
+ An array of alternating [stroke, space] lengths for dashed symbol strokes.
+ symbolDashOffset : float
+ The pixel offset at which to start drawing with the symbol stroke dash array.
+ symbolDirection : :class:`Orientation`
+ The default direction ( ``"horizontal"`` or ``"vertical"`` ) for symbol legends.
+
+ **Default value:** ``"vertical"``.
+ symbolFillColor : :class:`Color`
+ The color of the legend symbol,
+ symbolOffset : float
+ Horizontal pixel offset for legend symbols.
+
+ **Default value:** ``0``.
+ symbolOpacity : float
+ Opacity of the legend symbols.
+ symbolSize : float
+ The size of the legend symbol, in pixels.
+
+ **Default value:** ``100``.
+ symbolStrokeColor : :class:`Color`
+ Stroke color for legend symbols.
+ symbolStrokeWidth : float
+ The width of the symbol's stroke.
+
+ **Default value:** ``1.5``.
+ symbolType : :class:`SymbolShape`
+ The symbol shape. One of the plotting shapes ``circle`` (default), ``square``,
+ ``cross``, ``diamond``, ``triangle-up``, ``triangle-down``, ``triangle-right``, or
+ ``triangle-left``, the line symbol ``stroke``, or one of the centered directional
+ shapes ``arrow``, ``wedge``, or ``triangle``. Alternatively, a custom `SVG path
+ string <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ can be
+ provided. For correct sizing, custom shape paths should be defined within a square
+ bounding box with coordinates ranging from -1 to 1 along both the x and y
+ dimensions.
+
+ **Default value:** ``"circle"``.
+ title : None
+ Set to null to disable title for the axis, legend, or header.
+ titleAlign : :class:`Align`
+ Horizontal text alignment for legend titles.
+
+ **Default value:** ``"left"``.
+ titleAnchor : :class:`TitleAnchor`
+ Text anchor position for placing legend titles.
+ titleBaseline : :class:`TextBaseline`
+ Vertical text baseline for legend titles.
+
+ **Default value:** ``"top"``.
+ titleColor : :class:`Color`
+ The color of the legend title, can be in hex color code or regular color name.
+ titleFont : string
+ The font of the legend title.
+ titleFontSize : float
+ The font size of the legend title.
+ titleFontStyle : :class:`FontStyle`
+ The font style of the legend title.
+ titleFontWeight : :class:`FontWeight`
+ The font weight of the legend title.
+ This can be either a string (e.g ``"bold"``, ``"normal"`` ) or a number ( ``100``,
+ ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and ``"bold"`` = ``700``
+ ).
+ titleLimit : float
+ Maximum allowed pixel width of legend titles.
+
+ **Default value:** ``180``.
+ titleOpacity : float
+ Opacity of the legend title.
+ titleOrient : :class:`Orient`
+ Orientation of the legend title.
+ titlePadding : float
+ The padding, in pixels, between title and legend.
+
+ **Default value:** ``5``.
+ """
+ _schema = {'$ref': '#/definitions/LegendConfig'}
+
+ def __init__(self, clipHeight=Undefined, columnPadding=Undefined, columns=Undefined,
+ cornerRadius=Undefined, fillColor=Undefined, gradientDirection=Undefined,
+ gradientHorizontalMaxLength=Undefined, gradientHorizontalMinLength=Undefined,
+ gradientLabelLimit=Undefined, gradientLabelOffset=Undefined, gradientLength=Undefined,
+ gradientOpacity=Undefined, gradientStrokeColor=Undefined,
+ gradientStrokeWidth=Undefined, gradientThickness=Undefined,
+ gradientVerticalMaxLength=Undefined, gradientVerticalMinLength=Undefined,
+ gridAlign=Undefined, labelAlign=Undefined, labelBaseline=Undefined,
+ labelColor=Undefined, labelFont=Undefined, labelFontSize=Undefined,
+ labelFontStyle=Undefined, labelFontWeight=Undefined, labelLimit=Undefined,
+ labelOffset=Undefined, labelOpacity=Undefined, labelOverlap=Undefined,
+ labelPadding=Undefined, labelSeparation=Undefined, layout=Undefined, legendX=Undefined,
+ legendY=Undefined, offset=Undefined, orient=Undefined, padding=Undefined,
+ rowPadding=Undefined, shortTimeLabels=Undefined, strokeColor=Undefined,
+ strokeDash=Undefined, strokeWidth=Undefined, symbolBaseFillColor=Undefined,
+ symbolBaseStrokeColor=Undefined, symbolDash=Undefined, symbolDashOffset=Undefined,
+ symbolDirection=Undefined, symbolFillColor=Undefined, symbolOffset=Undefined,
+ symbolOpacity=Undefined, symbolSize=Undefined, symbolStrokeColor=Undefined,
+ symbolStrokeWidth=Undefined, symbolType=Undefined, title=Undefined,
+ titleAlign=Undefined, titleAnchor=Undefined, titleBaseline=Undefined,
+ titleColor=Undefined, titleFont=Undefined, titleFontSize=Undefined,
+ titleFontStyle=Undefined, titleFontWeight=Undefined, titleLimit=Undefined,
+ titleOpacity=Undefined, titleOrient=Undefined, titlePadding=Undefined, **kwds):
+ super(LegendConfig, self).__init__(clipHeight=clipHeight, columnPadding=columnPadding,
+ columns=columns, cornerRadius=cornerRadius,
+ fillColor=fillColor, gradientDirection=gradientDirection,
+ gradientHorizontalMaxLength=gradientHorizontalMaxLength,
+ gradientHorizontalMinLength=gradientHorizontalMinLength,
+ gradientLabelLimit=gradientLabelLimit,
+ gradientLabelOffset=gradientLabelOffset,
+ gradientLength=gradientLength,
+ gradientOpacity=gradientOpacity,
+ gradientStrokeColor=gradientStrokeColor,
+ gradientStrokeWidth=gradientStrokeWidth,
+ gradientThickness=gradientThickness,
+ gradientVerticalMaxLength=gradientVerticalMaxLength,
+ gradientVerticalMinLength=gradientVerticalMinLength,
+ gridAlign=gridAlign, labelAlign=labelAlign,
+ labelBaseline=labelBaseline, labelColor=labelColor,
+ labelFont=labelFont, labelFontSize=labelFontSize,
+ labelFontStyle=labelFontStyle,
+ labelFontWeight=labelFontWeight, labelLimit=labelLimit,
+ labelOffset=labelOffset, labelOpacity=labelOpacity,
+ labelOverlap=labelOverlap, labelPadding=labelPadding,
+ labelSeparation=labelSeparation, layout=layout,
+ legendX=legendX, legendY=legendY, offset=offset,
+ orient=orient, padding=padding, rowPadding=rowPadding,
+ shortTimeLabels=shortTimeLabels, strokeColor=strokeColor,
+ strokeDash=strokeDash, strokeWidth=strokeWidth,
+ symbolBaseFillColor=symbolBaseFillColor,
+ symbolBaseStrokeColor=symbolBaseStrokeColor,
+ symbolDash=symbolDash, symbolDashOffset=symbolDashOffset,
+ symbolDirection=symbolDirection,
+ symbolFillColor=symbolFillColor, symbolOffset=symbolOffset,
+ symbolOpacity=symbolOpacity, symbolSize=symbolSize,
+ symbolStrokeColor=symbolStrokeColor,
+ symbolStrokeWidth=symbolStrokeWidth, symbolType=symbolType,
+ title=title, titleAlign=titleAlign, titleAnchor=titleAnchor,
+ titleBaseline=titleBaseline, titleColor=titleColor,
+ titleFont=titleFont, titleFontSize=titleFontSize,
+ titleFontStyle=titleFontStyle,
+ titleFontWeight=titleFontWeight, titleLimit=titleLimit,
+ titleOpacity=titleOpacity, titleOrient=titleOrient,
+ titlePadding=titlePadding, **kwds)
+
+
+class LegendLayout(VegaLiteSchema):
+ """LegendLayout schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ anchor : :class:`TitleAnchor`
+ The anchor point for legend orient group layout.
+ bottom : :class:`BaseLegendLayout`
+
+ bounds : :class:`LayoutBounds`
+ The bounds calculation to use for legend orient group layout.
+ center : anyOf(boolean, :class:`SignalRef`)
+ A flag to center legends within a shared orient group.
+ direction : anyOf(:class:`Orientation`, :class:`SignalRef`)
+ The layout direction for legend orient group layout.
+ left : :class:`BaseLegendLayout`
+
+ margin : anyOf(float, :class:`SignalRef`)
+ The pixel margin between legends within a orient group.
+ offset : anyOf(float, :class:`SignalRef`)
+ The pixel offset from the chart body for a legend orient group.
+ right : :class:`BaseLegendLayout`
+
+ top : :class:`BaseLegendLayout`
+
+ bottom-left : :class:`BaseLegendLayout`
+
+ bottom-right : :class:`BaseLegendLayout`
+
+ top-left : :class:`BaseLegendLayout`
+
+ top-right : :class:`BaseLegendLayout`
+
+ """
+ _schema = {'$ref': '#/definitions/LegendLayout'}
+
+ def __init__(self, anchor=Undefined, bottom=Undefined, bounds=Undefined, center=Undefined,
+ direction=Undefined, left=Undefined, margin=Undefined, offset=Undefined,
+ right=Undefined, top=Undefined, **kwds):
+ super(LegendLayout, self).__init__(anchor=anchor, bottom=bottom, bounds=bounds, center=center,
+ direction=direction, left=left, margin=margin, offset=offset,
+ right=right, top=top, **kwds)
+
+
+class LegendOrient(VegaLiteSchema):
+ """LegendOrient schema wrapper
+
+ enum('none', 'left', 'right', 'top', 'bottom', 'top-left', 'top-right', 'bottom-left',
+ 'bottom-right')
+ """
+ _schema = {'$ref': '#/definitions/LegendOrient'}
+
+ def __init__(self, *args):
+ super(LegendOrient, self).__init__(*args)
+
+
+class LegendResolveMap(VegaLiteSchema):
+ """LegendResolveMap schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ color : :class:`ResolveMode`
+
+ fill : :class:`ResolveMode`
+
+ fillOpacity : :class:`ResolveMode`
+
+ opacity : :class:`ResolveMode`
+
+ shape : :class:`ResolveMode`
+
+ size : :class:`ResolveMode`
+
+ stroke : :class:`ResolveMode`
+
+ strokeOpacity : :class:`ResolveMode`
+
+ strokeWidth : :class:`ResolveMode`
+
+ """
+ _schema = {'$ref': '#/definitions/LegendResolveMap'}
+
+ def __init__(self, color=Undefined, fill=Undefined, fillOpacity=Undefined, opacity=Undefined,
+ shape=Undefined, size=Undefined, stroke=Undefined, strokeOpacity=Undefined,
+ strokeWidth=Undefined, **kwds):
+ super(LegendResolveMap, self).__init__(color=color, fill=fill, fillOpacity=fillOpacity,
+ opacity=opacity, shape=shape, size=size, stroke=stroke,
+ strokeOpacity=strokeOpacity, strokeWidth=strokeWidth,
+ **kwds)
+
+
+class LineConfig(VegaLiteSchema):
+ """LineConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ align : :class:`Align`
+ The horizontal alignment of the text. One of ``"left"``, ``"right"``, ``"center"``.
+ angle : float
+ The rotation angle of the text, in degrees.
+ baseline : :class:`TextBaseline`
+ The vertical alignment of the text. One of ``"top"``, ``"middle"``, ``"bottom"``.
+
+ **Default value:** ``"middle"``
+ color : :class:`Color`
+ Default color. Note that ``fill`` and ``stroke`` have higher precedence than
+ ``color`` and will override ``color``.
+
+ **Default value:** :raw-html:`<span style="color: #4682b4;">&#9632;</span>`
+ ``"#4682b4"``
+
+ **Note:** This property cannot be used in a `style config
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
+ cornerRadius : float
+ The radius in pixels of rounded rectangle corners.
+
+ **Default value:** ``0``
+ cursor : :class:`Cursor`
+ The mouse cursor used over the mark. Any valid `CSS cursor type
+ <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.
+ dir : :class:`Dir`
+ The direction of the text. One of ``"ltr"`` (left-to-right) or ``"rtl"``
+ (right-to-left). This property determines on which side is truncated in response to
+ the limit parameter.
+
+ **Default value:** ``"ltr"``
+ dx : float
+ The horizontal offset, in pixels, between the text label and its anchor point. The
+ offset is applied after rotation by the *angle* property.
+ dy : float
+ The vertical offset, in pixels, between the text label and its anchor point. The
+ offset is applied after rotation by the *angle* property.
+ ellipsis : string
+ The ellipsis string for text truncated in response to the limit parameter.
+
+ **Default value:** ``"…"``
+ fill : :class:`Color`
+ Default Fill Color. This has higher precedence than ``config.color``
+
+ **Default value:** (None)
+ fillOpacity : float
+ The fill opacity (value between [0,1]).
+
+ **Default value:** ``1``
+ filled : boolean
+ Whether the mark's color should be used as fill color instead of stroke color.
+
+ **Default value:** ``false`` for ``point``, ``line`` and ``rule`` ; otherwise,
+ ``true``.
+
+ **Note:** This property cannot be used in a `style config
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
+ font : string
+ The typeface to set the text in (e.g., ``"Helvetica Neue"`` ).
+ fontSize : float
+ The font size, in pixels.
+ fontStyle : :class:`FontStyle`
+ The font style (e.g., ``"italic"`` ).
+ fontWeight : :class:`FontWeight`
+ The font weight.
+ This can be either a string (e.g ``"bold"``, ``"normal"`` ) or a number ( ``100``,
+ ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and ``"bold"`` = ``700``
+ ).
+ height : float
+ Height of the marks.
+ href : string
+ A URL to load upon mouse click. If defined, the mark acts as a hyperlink.
+ interpolate : :class:`Interpolate`
+ The line interpolation method to use for line and area marks. One of the following:
+
+
+ * ``"linear"`` : piecewise linear segments, as in a polyline.
+ * ``"linear-closed"`` : close the linear segments to form a polygon.
+ * ``"step"`` : alternate between horizontal and vertical segments, as in a step
+ function.
+ * ``"step-before"`` : alternate between vertical and horizontal segments, as in a
+ step function.
+ * ``"step-after"`` : alternate between horizontal and vertical segments, as in a
+ step function.
+ * ``"basis"`` : a B-spline, with control point duplication on the ends.
+ * ``"basis-open"`` : an open B-spline; may not intersect the start or end.
+ * ``"basis-closed"`` : a closed B-spline, as in a loop.
+ * ``"cardinal"`` : a Cardinal spline, with control point duplication on the ends.
+ * ``"cardinal-open"`` : an open Cardinal spline; may not intersect the start or end,
+ but will intersect other control points.
+ * ``"cardinal-closed"`` : a closed Cardinal spline, as in a loop.
+ * ``"bundle"`` : equivalent to basis, except the tension parameter is used to
+ straighten the spline.
+ * ``"monotone"`` : cubic interpolation that preserves monotonicity in y.
+ limit : float
+ The maximum length of the text mark in pixels. The text value will be automatically
+ truncated if the rendered size exceeds the limit.
+
+ **Default value:** ``0``, indicating no limit
+ opacity : float
+ The overall opacity (value between [0,1]).
+
+ **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,
+ ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.
+ order : anyOf(None, boolean)
+ For line and trail marks, this ``order`` property can be set to ``null`` or
+ ``false`` to make the lines use the original order in the data sources.
+ orient : :class:`Orientation`
+ The orientation of a non-stacked bar, tick, area, and line charts.
+ The value is either horizontal (default) or vertical.
+
+
+ * For bar, rule and tick, this determines whether the size of the bar and tick
+ should be applied to x or y dimension.
+ * For area, this property determines the orient property of the Vega output.
+ * For line and trail marks, this property determines the sort order of the points in
+ the line
+ if ``config.sortLineBy`` is not specified.
+ For stacked charts, this is always determined by the orientation of the stack;
+ therefore explicitly specified value will be ignored.
+ point : anyOf(boolean, :class:`OverlayMarkDef`, enum('transparent'))
+ A flag for overlaying points on top of line or area marks, or an object defining the
+ properties of the overlayed points.
+
+
+ If this property is ``"transparent"``, transparent points will be used (for
+ enhancing tooltips and selections).
+
+ If this property is an empty object ( ``{}`` ) or ``true``, filled points with
+ default properties will be used.
+
+ If this property is ``false``, no points would be automatically added to line or
+ area marks.
+
+ **Default value:** ``false``.
+ radius : float
+ Polar coordinate radial offset, in pixels, of the text label from the origin
+ determined by the ``x`` and ``y`` properties.
+ shape : string
+ Shape of the point marks. Supported values include:
+
+
+ * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``,
+ ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or
+ ``"triangle-left"``.
+ * the line symbol ``"stroke"``
+ * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"``
+ * a custom `SVG path string
+ <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct
+ sizing, custom shape paths should be defined within a square bounding box with
+ coordinates ranging from -1 to 1 along both the x and y dimensions.)
+
+ **Default value:** ``"circle"``
+ size : float
+ Default size for marks.
+
+
+ * For ``point`` / ``circle`` / ``square``, this represents the pixel area of the
+ marks. For example: in the case of circles, the radius is determined in part by
+ the square root of the size value.
+ * For ``bar``, this represents the band size of the bar, in pixels.
+ * For ``text``, this represents the font size, in pixels.
+
+ **Default value:** ``30`` for point, circle, square marks; ``rangeStep`` - 1 for bar
+ marks with discrete dimensions; ``5`` for bar marks with continuous dimensions;
+ ``11`` for text marks.
+ stroke : :class:`Color`
+ Default Stroke Color. This has higher precedence than ``config.color``
+
+ **Default value:** (None)
+ strokeCap : :class:`StrokeCap`
+ The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or
+ ``"square"``.
+
+ **Default value:** ``"square"``
+ strokeDash : List(float)
+ An array of alternating stroke, space lengths for creating dashed or dotted lines.
+ strokeDashOffset : float
+ The offset (in pixels) into which to begin drawing with the stroke dash array.
+ strokeJoin : :class:`StrokeJoin`
+ The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``.
+
+ **Default value:** ``"miter"``
+ strokeMiterLimit : float
+ The miter limit at which to bevel a line join.
+ strokeOpacity : float
+ The stroke opacity (value between [0,1]).
+
+ **Default value:** ``1``
+ strokeWidth : float
+ The stroke width, in pixels.
+ tension : float
+ Depending on the interpolation type, sets the tension parameter (for line and area
+ marks).
+ text : string
+ Placeholder text if the ``text`` channel is not specified
+ theta : float
+ Polar coordinate angle, in radians, of the text label from the origin determined by
+ the ``x`` and ``y`` properties. Values for ``theta`` follow the same convention of
+ ``arc`` mark ``startAngle`` and ``endAngle`` properties: angles are measured in
+ radians, with ``0`` indicating "north".
+ tooltip : anyOf(:class:`Value`, :class:`TooltipContent`, None)
+ The tooltip text string to show upon mouse hover or an object defining which fields
+ should the tooltip be derived from.
+
+
+ * If ``tooltip`` is ``{"content": "encoding"}``, then all fields from ``encoding``
+ will be used.
+ * If ``tooltip`` is ``{"content": "data"}``, then all fields that appear in the
+ highlighted data point will be used.
+ * If set to ``null``, then no tooltip will be used.
+ width : float
+ Width of the marks.
+ x : anyOf(float, enum('width'))
+ X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without
+ specified ``x2`` or ``width``.
+
+ The ``value`` of this channel can be a number or a string ``"width"`` for the width
+ of the plot.
+ x2 : anyOf(float, enum('width'))
+ X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
+
+ The ``value`` of this channel can be a number or a string ``"width"`` for the width
+ of the plot.
+ y : anyOf(float, enum('height'))
+ Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without
+ specified ``y2`` or ``height``.
+
+ The ``value`` of this channel can be a number or a string ``"height"`` for the
+ height of the plot.
+ y2 : anyOf(float, enum('width'))
+ Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
+
+ The ``value`` of this channel can be a number or a string ``"height"`` for the
+ height of the plot.
+ """
+ _schema = {'$ref': '#/definitions/LineConfig'}
+
+ def __init__(self, align=Undefined, angle=Undefined, baseline=Undefined, color=Undefined,
+ cornerRadius=Undefined, cursor=Undefined, dir=Undefined, dx=Undefined, dy=Undefined,
+ ellipsis=Undefined, fill=Undefined, fillOpacity=Undefined, filled=Undefined,
+ font=Undefined, fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined,
+ height=Undefined, href=Undefined, interpolate=Undefined, limit=Undefined,
+ opacity=Undefined, order=Undefined, orient=Undefined, point=Undefined,
+ radius=Undefined, shape=Undefined, size=Undefined, stroke=Undefined,
+ strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined,
+ strokeJoin=Undefined, strokeMiterLimit=Undefined, strokeOpacity=Undefined,
+ strokeWidth=Undefined, tension=Undefined, text=Undefined, theta=Undefined,
+ tooltip=Undefined, width=Undefined, x=Undefined, x2=Undefined, y=Undefined,
+ y2=Undefined, **kwds):
+ super(LineConfig, self).__init__(align=align, angle=angle, baseline=baseline, color=color,
+ cornerRadius=cornerRadius, cursor=cursor, dir=dir, dx=dx,
+ dy=dy, ellipsis=ellipsis, fill=fill, fillOpacity=fillOpacity,
+ filled=filled, font=font, fontSize=fontSize,
+ fontStyle=fontStyle, fontWeight=fontWeight, height=height,
+ href=href, interpolate=interpolate, limit=limit,
+ opacity=opacity, order=order, orient=orient, point=point,
+ radius=radius, shape=shape, size=size, stroke=stroke,
+ strokeCap=strokeCap, strokeDash=strokeDash,
+ strokeDashOffset=strokeDashOffset, strokeJoin=strokeJoin,
+ strokeMiterLimit=strokeMiterLimit, strokeOpacity=strokeOpacity,
+ strokeWidth=strokeWidth, tension=tension, text=text,
+ theta=theta, tooltip=tooltip, width=width, x=x, x2=x2, y=y,
+ y2=y2, **kwds)
+
+
+class LogicalOperandPredicate(VegaLiteSchema):
+ """LogicalOperandPredicate schema wrapper
+
+ anyOf(:class:`LogicalNotPredicate`, :class:`LogicalAndPredicate`,
+ :class:`LogicalOrPredicate`, :class:`Predicate`)
+ """
+ _schema = {'$ref': '#/definitions/LogicalOperand<Predicate>'}
+
+ def __init__(self, *args, **kwds):
+ super(LogicalOperandPredicate, self).__init__(*args, **kwds)
+
+
+class LogicalAndPredicate(LogicalOperandPredicate):
+ """LogicalAndPredicate schema wrapper
+
+ Mapping(required=[and])
+
+ Attributes
+ ----------
+
+ and : List(:class:`LogicalOperandPredicate`)
+
+ """
+ _schema = {'$ref': '#/definitions/LogicalAnd<Predicate>'}
+
+ def __init__(self, **kwds):
+ super(LogicalAndPredicate, self).__init__(**kwds)
+
+
+class LogicalNotPredicate(LogicalOperandPredicate):
+ """LogicalNotPredicate schema wrapper
+
+ Mapping(required=[not])
+
+ Attributes
+ ----------
+
+ not : :class:`LogicalOperandPredicate`
+
+ """
+ _schema = {'$ref': '#/definitions/LogicalNot<Predicate>'}
+
+ def __init__(self, **kwds):
+ super(LogicalNotPredicate, self).__init__(**kwds)
+
+
+class LogicalOrPredicate(LogicalOperandPredicate):
+ """LogicalOrPredicate schema wrapper
+
+ Mapping(required=[or])
+
+ Attributes
+ ----------
+
+ or : List(:class:`LogicalOperandPredicate`)
+
+ """
+ _schema = {'$ref': '#/definitions/LogicalOr<Predicate>'}
+
+ def __init__(self, **kwds):
+ super(LogicalOrPredicate, self).__init__(**kwds)
+
+
+class LookupData(VegaLiteSchema):
+ """LookupData schema wrapper
+
+ Mapping(required=[data, key])
+
+ Attributes
+ ----------
+
+ data : :class:`Data`
+ Secondary data source to lookup in.
+ key : :class:`FieldName`
+ Key in data to lookup.
+ fields : List(:class:`FieldName`)
+ Fields in foreign data to lookup.
+ If not specified, the entire object is queried.
+ """
+ _schema = {'$ref': '#/definitions/LookupData'}
+
+ def __init__(self, data=Undefined, key=Undefined, fields=Undefined, **kwds):
+ super(LookupData, self).__init__(data=data, key=key, fields=fields, **kwds)
+
+
+class Mark(AnyMark):
+ """Mark schema wrapper
+
+ enum('area', 'bar', 'line', 'trail', 'point', 'text', 'tick', 'rect', 'rule', 'circle',
+ 'square', 'geoshape')
+ All types of primitive marks.
+ """
+ _schema = {'$ref': '#/definitions/Mark'}
+
+ def __init__(self, *args):
+ super(Mark, self).__init__(*args)
+
+
+class MarkConfig(VegaLiteSchema):
+ """MarkConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ align : :class:`Align`
+ The horizontal alignment of the text. One of ``"left"``, ``"right"``, ``"center"``.
+ angle : float
+ The rotation angle of the text, in degrees.
+ baseline : :class:`TextBaseline`
+ The vertical alignment of the text. One of ``"top"``, ``"middle"``, ``"bottom"``.
+
+ **Default value:** ``"middle"``
+ color : :class:`Color`
+ Default color. Note that ``fill`` and ``stroke`` have higher precedence than
+ ``color`` and will override ``color``.
+
+ **Default value:** :raw-html:`<span style="color: #4682b4;">&#9632;</span>`
+ ``"#4682b4"``
+
+ **Note:** This property cannot be used in a `style config
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
+ cornerRadius : float
+ The radius in pixels of rounded rectangle corners.
+
+ **Default value:** ``0``
+ cursor : :class:`Cursor`
+ The mouse cursor used over the mark. Any valid `CSS cursor type
+ <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.
+ dir : :class:`Dir`
+ The direction of the text. One of ``"ltr"`` (left-to-right) or ``"rtl"``
+ (right-to-left). This property determines on which side is truncated in response to
+ the limit parameter.
+
+ **Default value:** ``"ltr"``
+ dx : float
+ The horizontal offset, in pixels, between the text label and its anchor point. The
+ offset is applied after rotation by the *angle* property.
+ dy : float
+ The vertical offset, in pixels, between the text label and its anchor point. The
+ offset is applied after rotation by the *angle* property.
+ ellipsis : string
+ The ellipsis string for text truncated in response to the limit parameter.
+
+ **Default value:** ``"…"``
+ fill : :class:`Color`
+ Default Fill Color. This has higher precedence than ``config.color``
+
+ **Default value:** (None)
+ fillOpacity : float
+ The fill opacity (value between [0,1]).
+
+ **Default value:** ``1``
+ filled : boolean
+ Whether the mark's color should be used as fill color instead of stroke color.
+
+ **Default value:** ``false`` for ``point``, ``line`` and ``rule`` ; otherwise,
+ ``true``.
+
+ **Note:** This property cannot be used in a `style config
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
+ font : string
+ The typeface to set the text in (e.g., ``"Helvetica Neue"`` ).
+ fontSize : float
+ The font size, in pixels.
+ fontStyle : :class:`FontStyle`
+ The font style (e.g., ``"italic"`` ).
+ fontWeight : :class:`FontWeight`
+ The font weight.
+ This can be either a string (e.g ``"bold"``, ``"normal"`` ) or a number ( ``100``,
+ ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and ``"bold"`` = ``700``
+ ).
+ height : float
+ Height of the marks.
+ href : string
+ A URL to load upon mouse click. If defined, the mark acts as a hyperlink.
+ interpolate : :class:`Interpolate`
+ The line interpolation method to use for line and area marks. One of the following:
+
+
+ * ``"linear"`` : piecewise linear segments, as in a polyline.
+ * ``"linear-closed"`` : close the linear segments to form a polygon.
+ * ``"step"`` : alternate between horizontal and vertical segments, as in a step
+ function.
+ * ``"step-before"`` : alternate between vertical and horizontal segments, as in a
+ step function.
+ * ``"step-after"`` : alternate between horizontal and vertical segments, as in a
+ step function.
+ * ``"basis"`` : a B-spline, with control point duplication on the ends.
+ * ``"basis-open"`` : an open B-spline; may not intersect the start or end.
+ * ``"basis-closed"`` : a closed B-spline, as in a loop.
+ * ``"cardinal"`` : a Cardinal spline, with control point duplication on the ends.
+ * ``"cardinal-open"`` : an open Cardinal spline; may not intersect the start or end,
+ but will intersect other control points.
+ * ``"cardinal-closed"`` : a closed Cardinal spline, as in a loop.
+ * ``"bundle"`` : equivalent to basis, except the tension parameter is used to
+ straighten the spline.
+ * ``"monotone"`` : cubic interpolation that preserves monotonicity in y.
+ limit : float
+ The maximum length of the text mark in pixels. The text value will be automatically
+ truncated if the rendered size exceeds the limit.
+
+ **Default value:** ``0``, indicating no limit
+ opacity : float
+ The overall opacity (value between [0,1]).
+
+ **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,
+ ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.
+ order : anyOf(None, boolean)
+ For line and trail marks, this ``order`` property can be set to ``null`` or
+ ``false`` to make the lines use the original order in the data sources.
+ orient : :class:`Orientation`
+ The orientation of a non-stacked bar, tick, area, and line charts.
+ The value is either horizontal (default) or vertical.
+
+
+ * For bar, rule and tick, this determines whether the size of the bar and tick
+ should be applied to x or y dimension.
+ * For area, this property determines the orient property of the Vega output.
+ * For line and trail marks, this property determines the sort order of the points in
+ the line
+ if ``config.sortLineBy`` is not specified.
+ For stacked charts, this is always determined by the orientation of the stack;
+ therefore explicitly specified value will be ignored.
+ radius : float
+ Polar coordinate radial offset, in pixels, of the text label from the origin
+ determined by the ``x`` and ``y`` properties.
+ shape : string
+ Shape of the point marks. Supported values include:
+
+
+ * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``,
+ ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or
+ ``"triangle-left"``.
+ * the line symbol ``"stroke"``
+ * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"``
+ * a custom `SVG path string
+ <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct
+ sizing, custom shape paths should be defined within a square bounding box with
+ coordinates ranging from -1 to 1 along both the x and y dimensions.)
+
+ **Default value:** ``"circle"``
+ size : float
+ Default size for marks.
+
+
+ * For ``point`` / ``circle`` / ``square``, this represents the pixel area of the
+ marks. For example: in the case of circles, the radius is determined in part by
+ the square root of the size value.
+ * For ``bar``, this represents the band size of the bar, in pixels.
+ * For ``text``, this represents the font size, in pixels.
+
+ **Default value:** ``30`` for point, circle, square marks; ``rangeStep`` - 1 for bar
+ marks with discrete dimensions; ``5`` for bar marks with continuous dimensions;
+ ``11`` for text marks.
+ stroke : :class:`Color`
+ Default Stroke Color. This has higher precedence than ``config.color``
+
+ **Default value:** (None)
+ strokeCap : :class:`StrokeCap`
+ The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or
+ ``"square"``.
+
+ **Default value:** ``"square"``
+ strokeDash : List(float)
+ An array of alternating stroke, space lengths for creating dashed or dotted lines.
+ strokeDashOffset : float
+ The offset (in pixels) into which to begin drawing with the stroke dash array.
+ strokeJoin : :class:`StrokeJoin`
+ The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``.
+
+ **Default value:** ``"miter"``
+ strokeMiterLimit : float
+ The miter limit at which to bevel a line join.
+ strokeOpacity : float
+ The stroke opacity (value between [0,1]).
+
+ **Default value:** ``1``
+ strokeWidth : float
+ The stroke width, in pixels.
+ tension : float
+ Depending on the interpolation type, sets the tension parameter (for line and area
+ marks).
+ text : string
+ Placeholder text if the ``text`` channel is not specified
+ theta : float
+ Polar coordinate angle, in radians, of the text label from the origin determined by
+ the ``x`` and ``y`` properties. Values for ``theta`` follow the same convention of
+ ``arc`` mark ``startAngle`` and ``endAngle`` properties: angles are measured in
+ radians, with ``0`` indicating "north".
+ tooltip : anyOf(:class:`Value`, :class:`TooltipContent`, None)
+ The tooltip text string to show upon mouse hover or an object defining which fields
+ should the tooltip be derived from.
+
+
+ * If ``tooltip`` is ``{"content": "encoding"}``, then all fields from ``encoding``
+ will be used.
+ * If ``tooltip`` is ``{"content": "data"}``, then all fields that appear in the
+ highlighted data point will be used.
+ * If set to ``null``, then no tooltip will be used.
+ width : float
+ Width of the marks.
+ x : anyOf(float, enum('width'))
+ X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without
+ specified ``x2`` or ``width``.
+
+ The ``value`` of this channel can be a number or a string ``"width"`` for the width
+ of the plot.
+ x2 : anyOf(float, enum('width'))
+ X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
+
+ The ``value`` of this channel can be a number or a string ``"width"`` for the width
+ of the plot.
+ y : anyOf(float, enum('height'))
+ Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without
+ specified ``y2`` or ``height``.
+
+ The ``value`` of this channel can be a number or a string ``"height"`` for the
+ height of the plot.
+ y2 : anyOf(float, enum('width'))
+ Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
+
+ The ``value`` of this channel can be a number or a string ``"height"`` for the
+ height of the plot.
+ """
+ _schema = {'$ref': '#/definitions/MarkConfig'}
+
+ def __init__(self, align=Undefined, angle=Undefined, baseline=Undefined, color=Undefined,
+ cornerRadius=Undefined, cursor=Undefined, dir=Undefined, dx=Undefined, dy=Undefined,
+ ellipsis=Undefined, fill=Undefined, fillOpacity=Undefined, filled=Undefined,
+ font=Undefined, fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined,
+ height=Undefined, href=Undefined, interpolate=Undefined, limit=Undefined,
+ opacity=Undefined, order=Undefined, orient=Undefined, radius=Undefined,
+ shape=Undefined, size=Undefined, stroke=Undefined, strokeCap=Undefined,
+ strokeDash=Undefined, strokeDashOffset=Undefined, strokeJoin=Undefined,
+ strokeMiterLimit=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined,
+ tension=Undefined, text=Undefined, theta=Undefined, tooltip=Undefined, width=Undefined,
+ x=Undefined, x2=Undefined, y=Undefined, y2=Undefined, **kwds):
+ super(MarkConfig, self).__init__(align=align, angle=angle, baseline=baseline, color=color,
+ cornerRadius=cornerRadius, cursor=cursor, dir=dir, dx=dx,
+ dy=dy, ellipsis=ellipsis, fill=fill, fillOpacity=fillOpacity,
+ filled=filled, font=font, fontSize=fontSize,
+ fontStyle=fontStyle, fontWeight=fontWeight, height=height,
+ href=href, interpolate=interpolate, limit=limit,
+ opacity=opacity, order=order, orient=orient, radius=radius,
+ shape=shape, size=size, stroke=stroke, strokeCap=strokeCap,
+ strokeDash=strokeDash, strokeDashOffset=strokeDashOffset,
+ strokeJoin=strokeJoin, strokeMiterLimit=strokeMiterLimit,
+ strokeOpacity=strokeOpacity, strokeWidth=strokeWidth,
+ tension=tension, text=text, theta=theta, tooltip=tooltip,
+ width=width, x=x, x2=x2, y=y, y2=y2, **kwds)
+
+
+class MarkDef(AnyMark):
+ """MarkDef schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : :class:`Mark`
+ The mark type. This could a primitive mark type
+ (one of ``"bar"``, ``"circle"``, ``"square"``, ``"tick"``, ``"line"``,
+ ``"area"``, ``"point"``, ``"geoshape"``, ``"rule"``, and ``"text"`` )
+ or a composite mark type ( ``"boxplot"``, ``"errorband"``, ``"errorbar"`` ).
+ align : :class:`Align`
+ The horizontal alignment of the text. One of ``"left"``, ``"right"``, ``"center"``.
+ angle : float
+ The rotation angle of the text, in degrees.
+ baseline : :class:`TextBaseline`
+ The vertical alignment of the text. One of ``"top"``, ``"middle"``, ``"bottom"``.
+
+ **Default value:** ``"middle"``
+ binSpacing : float
+ Offset between bars for binned field. Ideal value for this is either 0 (Preferred
+ by statisticians) or 1 (Vega-Lite Default, D3 example style).
+
+ **Default value:** ``1``
+ clip : boolean
+ Whether a mark be clipped to the enclosing group’s width and height.
+ color : :class:`Color`
+ Default color. Note that ``fill`` and ``stroke`` have higher precedence than
+ ``color`` and will override ``color``.
+
+ **Default value:** :raw-html:`<span style="color: #4682b4;">&#9632;</span>`
+ ``"#4682b4"``
+
+ **Note:** This property cannot be used in a `style config
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
+ cornerRadius : float
+ The radius in pixels of rounded rectangle corners.
+
+ **Default value:** ``0``
+ cursor : :class:`Cursor`
+ The mouse cursor used over the mark. Any valid `CSS cursor type
+ <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.
+ dir : :class:`Dir`
+ The direction of the text. One of ``"ltr"`` (left-to-right) or ``"rtl"``
+ (right-to-left). This property determines on which side is truncated in response to
+ the limit parameter.
+
+ **Default value:** ``"ltr"``
+ dx : float
+ The horizontal offset, in pixels, between the text label and its anchor point. The
+ offset is applied after rotation by the *angle* property.
+ dy : float
+ The vertical offset, in pixels, between the text label and its anchor point. The
+ offset is applied after rotation by the *angle* property.
+ ellipsis : string
+ The ellipsis string for text truncated in response to the limit parameter.
+
+ **Default value:** ``"…"``
+ fill : :class:`Color`
+ Default Fill Color. This has higher precedence than ``config.color``
+
+ **Default value:** (None)
+ fillOpacity : float
+ The fill opacity (value between [0,1]).
+
+ **Default value:** ``1``
+ filled : boolean
+ Whether the mark's color should be used as fill color instead of stroke color.
+
+ **Default value:** ``false`` for ``point``, ``line`` and ``rule`` ; otherwise,
+ ``true``.
+
+ **Note:** This property cannot be used in a `style config
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
+ font : string
+ The typeface to set the text in (e.g., ``"Helvetica Neue"`` ).
+ fontSize : float
+ The font size, in pixels.
+ fontStyle : :class:`FontStyle`
+ The font style (e.g., ``"italic"`` ).
+ fontWeight : :class:`FontWeight`
+ The font weight.
+ This can be either a string (e.g ``"bold"``, ``"normal"`` ) or a number ( ``100``,
+ ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and ``"bold"`` = ``700``
+ ).
+ height : float
+ Height of the marks.
+ href : string
+ A URL to load upon mouse click. If defined, the mark acts as a hyperlink.
+ interpolate : :class:`Interpolate`
+ The line interpolation method to use for line and area marks. One of the following:
+
+
+ * ``"linear"`` : piecewise linear segments, as in a polyline.
+ * ``"linear-closed"`` : close the linear segments to form a polygon.
+ * ``"step"`` : alternate between horizontal and vertical segments, as in a step
+ function.
+ * ``"step-before"`` : alternate between vertical and horizontal segments, as in a
+ step function.
+ * ``"step-after"`` : alternate between horizontal and vertical segments, as in a
+ step function.
+ * ``"basis"`` : a B-spline, with control point duplication on the ends.
+ * ``"basis-open"`` : an open B-spline; may not intersect the start or end.
+ * ``"basis-closed"`` : a closed B-spline, as in a loop.
+ * ``"cardinal"`` : a Cardinal spline, with control point duplication on the ends.
+ * ``"cardinal-open"`` : an open Cardinal spline; may not intersect the start or end,
+ but will intersect other control points.
+ * ``"cardinal-closed"`` : a closed Cardinal spline, as in a loop.
+ * ``"bundle"`` : equivalent to basis, except the tension parameter is used to
+ straighten the spline.
+ * ``"monotone"`` : cubic interpolation that preserves monotonicity in y.
+ limit : float
+ The maximum length of the text mark in pixels. The text value will be automatically
+ truncated if the rendered size exceeds the limit.
+
+ **Default value:** ``0``, indicating no limit
+ line : anyOf(boolean, :class:`OverlayMarkDef`)
+ A flag for overlaying line on top of area marks, or an object defining the
+ properties of the overlayed lines.
+
+
+ If this value is an empty object ( ``{}`` ) or ``true``, lines with default
+ properties will be used.
+
+ If this value is ``false``, no lines would be automatically added to area marks.
+
+ **Default value:** ``false``.
+ opacity : float
+ The overall opacity (value between [0,1]).
+
+ **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,
+ ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.
+ order : anyOf(None, boolean)
+ For line and trail marks, this ``order`` property can be set to ``null`` or
+ ``false`` to make the lines use the original order in the data sources.
+ orient : :class:`Orientation`
+ The orientation of a non-stacked bar, tick, area, and line charts.
+ The value is either horizontal (default) or vertical.
+
+
+ * For bar, rule and tick, this determines whether the size of the bar and tick
+ should be applied to x or y dimension.
+ * For area, this property determines the orient property of the Vega output.
+ * For line and trail marks, this property determines the sort order of the points in
+ the line
+ if ``config.sortLineBy`` is not specified.
+ For stacked charts, this is always determined by the orientation of the stack;
+ therefore explicitly specified value will be ignored.
+ point : anyOf(boolean, :class:`OverlayMarkDef`, enum('transparent'))
+ A flag for overlaying points on top of line or area marks, or an object defining the
+ properties of the overlayed points.
+
+
+ If this property is ``"transparent"``, transparent points will be used (for
+ enhancing tooltips and selections).
+
+ If this property is an empty object ( ``{}`` ) or ``true``, filled points with
+ default properties will be used.
+
+ If this property is ``false``, no points would be automatically added to line or
+ area marks.
+
+ **Default value:** ``false``.
+ radius : float
+ Polar coordinate radial offset, in pixels, of the text label from the origin
+ determined by the ``x`` and ``y`` properties.
+ shape : string
+ Shape of the point marks. Supported values include:
+
+
+ * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``,
+ ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or
+ ``"triangle-left"``.
+ * the line symbol ``"stroke"``
+ * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"``
+ * a custom `SVG path string
+ <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct
+ sizing, custom shape paths should be defined within a square bounding box with
+ coordinates ranging from -1 to 1 along both the x and y dimensions.)
+
+ **Default value:** ``"circle"``
+ size : float
+ Default size for marks.
+
+
+ * For ``point`` / ``circle`` / ``square``, this represents the pixel area of the
+ marks. For example: in the case of circles, the radius is determined in part by
+ the square root of the size value.
+ * For ``bar``, this represents the band size of the bar, in pixels.
+ * For ``text``, this represents the font size, in pixels.
+
+ **Default value:** ``30`` for point, circle, square marks; ``rangeStep`` - 1 for bar
+ marks with discrete dimensions; ``5`` for bar marks with continuous dimensions;
+ ``11`` for text marks.
+ stroke : :class:`Color`
+ Default Stroke Color. This has higher precedence than ``config.color``
+
+ **Default value:** (None)
+ strokeCap : :class:`StrokeCap`
+ The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or
+ ``"square"``.
+
+ **Default value:** ``"square"``
+ strokeDash : List(float)
+ An array of alternating stroke, space lengths for creating dashed or dotted lines.
+ strokeDashOffset : float
+ The offset (in pixels) into which to begin drawing with the stroke dash array.
+ strokeJoin : :class:`StrokeJoin`
+ The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``.
+
+ **Default value:** ``"miter"``
+ strokeMiterLimit : float
+ The miter limit at which to bevel a line join.
+ strokeOpacity : float
+ The stroke opacity (value between [0,1]).
+
+ **Default value:** ``1``
+ strokeWidth : float
+ The stroke width, in pixels.
+ style : anyOf(string, List(string))
+ A string or array of strings indicating the name of custom styles to apply to the
+ mark. A style is a named collection of mark property defaults defined within the
+ `style configuration
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. If style is an
+ array, later styles will override earlier styles. Any `mark properties
+ <https://vega.github.io/vega-lite/docs/encoding.html#mark-prop>`__ explicitly
+ defined within the ``encoding`` will override a style default.
+
+ **Default value:** The mark's name. For example, a bar mark will have style
+ ``"bar"`` by default.
+ **Note:** Any specified style will augment the default style. For example, a bar
+ mark with ``"style": "foo"`` will receive from ``config.style.bar`` and
+ ``config.style.foo`` (the specified style ``"foo"`` has higher precedence).
+ tension : float
+ Depending on the interpolation type, sets the tension parameter (for line and area
+ marks).
+ text : string
+ Placeholder text if the ``text`` channel is not specified
+ theta : float
+ Polar coordinate angle, in radians, of the text label from the origin determined by
+ the ``x`` and ``y`` properties. Values for ``theta`` follow the same convention of
+ ``arc`` mark ``startAngle`` and ``endAngle`` properties: angles are measured in
+ radians, with ``0`` indicating "north".
+ thickness : float
+ Thickness of the tick mark.
+
+ **Default value:** ``1``
+ tooltip : anyOf(:class:`Value`, :class:`TooltipContent`, None)
+ The tooltip text string to show upon mouse hover or an object defining which fields
+ should the tooltip be derived from.
+
+
+ * If ``tooltip`` is ``{"content": "encoding"}``, then all fields from ``encoding``
+ will be used.
+ * If ``tooltip`` is ``{"content": "data"}``, then all fields that appear in the
+ highlighted data point will be used.
+ * If set to ``null``, then no tooltip will be used.
+ width : float
+ Width of the marks.
+ x : anyOf(float, enum('width'))
+ X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without
+ specified ``x2`` or ``width``.
+
+ The ``value`` of this channel can be a number or a string ``"width"`` for the width
+ of the plot.
+ x2 : anyOf(float, enum('width'))
+ X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
+
+ The ``value`` of this channel can be a number or a string ``"width"`` for the width
+ of the plot.
+ x2Offset : float
+ Offset for x2-position.
+ xOffset : float
+ Offset for x-position.
+ y : anyOf(float, enum('height'))
+ Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without
+ specified ``y2`` or ``height``.
+
+ The ``value`` of this channel can be a number or a string ``"height"`` for the
+ height of the plot.
+ y2 : anyOf(float, enum('width'))
+ Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
+
+ The ``value`` of this channel can be a number or a string ``"height"`` for the
+ height of the plot.
+ y2Offset : float
+ Offset for y2-position.
+ yOffset : float
+ Offset for y-position.
+ """
+ _schema = {'$ref': '#/definitions/MarkDef'}
+
+ def __init__(self, type=Undefined, align=Undefined, angle=Undefined, baseline=Undefined,
+ binSpacing=Undefined, clip=Undefined, color=Undefined, cornerRadius=Undefined,
+ cursor=Undefined, dir=Undefined, dx=Undefined, dy=Undefined, ellipsis=Undefined,
+ fill=Undefined, fillOpacity=Undefined, filled=Undefined, font=Undefined,
+ fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined, height=Undefined,
+ href=Undefined, interpolate=Undefined, limit=Undefined, line=Undefined,
+ opacity=Undefined, order=Undefined, orient=Undefined, point=Undefined,
+ radius=Undefined, shape=Undefined, size=Undefined, stroke=Undefined,
+ strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined,
+ strokeJoin=Undefined, strokeMiterLimit=Undefined, strokeOpacity=Undefined,
+ strokeWidth=Undefined, style=Undefined, tension=Undefined, text=Undefined,
+ theta=Undefined, thickness=Undefined, tooltip=Undefined, width=Undefined, x=Undefined,
+ x2=Undefined, x2Offset=Undefined, xOffset=Undefined, y=Undefined, y2=Undefined,
+ y2Offset=Undefined, yOffset=Undefined, **kwds):
+ super(MarkDef, self).__init__(type=type, align=align, angle=angle, baseline=baseline,
+ binSpacing=binSpacing, clip=clip, color=color,
+ cornerRadius=cornerRadius, cursor=cursor, dir=dir, dx=dx, dy=dy,
+ ellipsis=ellipsis, fill=fill, fillOpacity=fillOpacity,
+ filled=filled, font=font, fontSize=fontSize, fontStyle=fontStyle,
+ fontWeight=fontWeight, height=height, href=href,
+ interpolate=interpolate, limit=limit, line=line, opacity=opacity,
+ order=order, orient=orient, point=point, radius=radius,
+ shape=shape, size=size, stroke=stroke, strokeCap=strokeCap,
+ strokeDash=strokeDash, strokeDashOffset=strokeDashOffset,
+ strokeJoin=strokeJoin, strokeMiterLimit=strokeMiterLimit,
+ strokeOpacity=strokeOpacity, strokeWidth=strokeWidth, style=style,
+ tension=tension, text=text, theta=theta, thickness=thickness,
+ tooltip=tooltip, width=width, x=x, x2=x2, x2Offset=x2Offset,
+ xOffset=xOffset, y=y, y2=y2, y2Offset=y2Offset, yOffset=yOffset,
+ **kwds)
+
+
+class Month(VegaLiteSchema):
+ """Month schema wrapper
+
+ float
+ """
+ _schema = {'$ref': '#/definitions/Month'}
+
+ def __init__(self, *args):
+ super(Month, self).__init__(*args)
+
+
+class MultiSelectionConfig(VegaLiteSchema):
+ """MultiSelectionConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ clear : anyOf(:class:`EventStream`, boolean)
+ Clears the selection, emptying it of all values. Can be an
+ `EventStream <https://vega.github.io/vega/docs/event-streams/>`__ or ``false`` to
+ disable.
+
+ **Default value:** ``dblclick``.
+
+ **See also:** `clear <https://vega.github.io/vega-lite/docs/clear.html>`__
+ documentation.
+ empty : enum('all', 'none')
+ By default, ``all`` data values are considered to lie within an empty selection.
+ When set to ``none``, empty selections contain no data values.
+ encodings : List(:class:`SingleDefUnitChannel`)
+ An array of encoding channels. The corresponding data field values
+ must match for a data tuple to fall within the selection.
+
+ **See also:** `encodings <https://vega.github.io/vega-lite/docs/project.html>`__
+ documentation.
+ fields : List(:class:`FieldName`)
+ An array of field names whose values must match for a data tuple to
+ fall within the selection.
+
+ **See also:** `fields <https://vega.github.io/vega-lite/docs/project.html>`__
+ documentation.
+ init : anyOf(:class:`SelectionInitMapping`, List(:class:`SelectionInitMapping`))
+ Initialize the selection with a mapping between `projected channels or field names
+ <https://vega.github.io/vega-lite/docs/project.html>`__ and an initial
+ value (or array of values).
+
+ **See also:** `init <https://vega.github.io/vega-lite/docs/init.html>`__
+ documentation.
+ nearest : boolean
+ When true, an invisible voronoi diagram is computed to accelerate discrete
+ selection. The data value *nearest* the mouse cursor is added to the selection.
+
+ **See also:** `nearest <https://vega.github.io/vega-lite/docs/nearest.html>`__
+ documentation.
+ on : :class:`EventStream`
+ A `Vega event stream <https://vega.github.io/vega/docs/event-streams/>`__ (object or
+ selector) that triggers the selection.
+ For interval selections, the event stream must specify a `start and end
+ <https://vega.github.io/vega/docs/event-streams/#between-filters>`__.
+ resolve : :class:`SelectionResolution`
+ With layered and multi-view displays, a strategy that determines how
+ selections' data queries are resolved when applied in a filter transform,
+ conditional encoding rule, or scale domain.
+
+ **See also:** `resolve
+ <https://vega.github.io/vega-lite/docs/selection-resolve.html>`__ documentation.
+ toggle : anyOf(string, boolean)
+ Controls whether data values should be toggled or only ever inserted into
+ multi selections. Can be ``true``, ``false`` (for insertion only), or a
+ `Vega expression <https://vega.github.io/vega/docs/expressions/>`__.
+
+ **Default value:** ``true``, which corresponds to ``event.shiftKey`` (i.e.,
+ data values are toggled when a user interacts with the shift-key pressed).
+
+ **See also:** `toggle <https://vega.github.io/vega-lite/docs/toggle.html>`__
+ documentation.
+ """
+ _schema = {'$ref': '#/definitions/MultiSelectionConfig'}
+
+ def __init__(self, clear=Undefined, empty=Undefined, encodings=Undefined, fields=Undefined,
+ init=Undefined, nearest=Undefined, on=Undefined, resolve=Undefined, toggle=Undefined,
+ **kwds):
+ super(MultiSelectionConfig, self).__init__(clear=clear, empty=empty, encodings=encodings,
+ fields=fields, init=init, nearest=nearest, on=on,
+ resolve=resolve, toggle=toggle, **kwds)
+
+
+class NamedData(DataSource):
+ """NamedData schema wrapper
+
+ Mapping(required=[name])
+
+ Attributes
+ ----------
+
+ name : string
+ Provide a placeholder name and bind data at runtime.
+ format : :class:`DataFormat`
+ An object that specifies the format for parsing the data.
+ """
+ _schema = {'$ref': '#/definitions/NamedData'}
+
+ def __init__(self, name=Undefined, format=Undefined, **kwds):
+ super(NamedData, self).__init__(name=name, format=format, **kwds)
+
+
+class NiceTime(VegaLiteSchema):
+ """NiceTime schema wrapper
+
+ enum('second', 'minute', 'hour', 'day', 'week', 'month', 'year')
+ """
+ _schema = {'$ref': '#/definitions/NiceTime'}
+
+ def __init__(self, *args):
+ super(NiceTime, self).__init__(*args)
+
+
+class NumberValueDef(VegaLiteSchema):
+ """NumberValueDef schema wrapper
+
+ Mapping(required=[value])
+ Definition object for a constant value of an encoding channel.
+
+ Attributes
+ ----------
+
+ value : float
+ A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values
+ between ``0`` to ``1`` for opacity).
+ """
+ _schema = {'$ref': '#/definitions/NumberValueDef'}
+
+ def __init__(self, value=Undefined, **kwds):
+ super(NumberValueDef, self).__init__(value=value, **kwds)
+
+
+class NumericFieldDefWithCondition(VegaLiteSchema):
+ """NumericFieldDefWithCondition schema wrapper
+
+ Mapping(required=[type])
+ A FieldDef with Condition :raw-html:`<ValueDef>`
+
+ Attributes
+ ----------
+
+ type : :class:`StandardType`
+ The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``,
+ ``"ordinal"``, or ``"nominal"`` ).
+ It can also be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ **Note:**
+
+
+ * Data values for a temporal field can be either a date-time string (e.g.,
+ ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a
+ timestamp number (e.g., ``1552199579097`` ).
+ * Data ``type`` describes the semantics of the data rather than the primitive data
+ types ( ``number``, ``string``, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data.
+ * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
+ or `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `timeUnit
+ <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
+ can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using
+ an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
+ refers to the post-aggregation data type. For example, we can calculate count
+ ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
+ "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output
+ is ``"quantitative"``.
+ * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have
+ ``type`` as they have exactly the same type as their primary channels (e.g.,
+ ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ condition : anyOf(:class:`ConditionalNumberValueDef`,
+ List(:class:`ConditionalNumberValueDef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ legend : anyOf(:class:`Legend`, None)
+ An object defining properties of the legend.
+ If ``null``, the legend for the encoding channel will be removed.
+
+ **Default value:** If undefined, default `legend properties
+ <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.
+
+ **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
+ documentation.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ sort : :class:`Sort`
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following:
+
+
+ * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
+ Javascript.
+ * `A sort-by-encoding definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ for sorting
+ by another encoding channel. (This type of sort definition is not available for
+ ``row`` and ``column`` channels.)
+ * `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field.
+ * `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values
+ in their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ).
+ * ``null`` indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` is not supported for ``row`` and ``column``.
+
+ **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
+ documentation.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ """
+ _schema = {'$ref': '#/definitions/NumericFieldDefWithCondition'}
+
+ def __init__(self, type=Undefined, aggregate=Undefined, bin=Undefined, condition=Undefined,
+ field=Undefined, legend=Undefined, scale=Undefined, sort=Undefined, timeUnit=Undefined,
+ title=Undefined, **kwds):
+ super(NumericFieldDefWithCondition, self).__init__(type=type, aggregate=aggregate, bin=bin,
+ condition=condition, field=field,
+ legend=legend, scale=scale, sort=sort,
+ timeUnit=timeUnit, title=title, **kwds)
+
+
+class NumericValueDefWithCondition(VegaLiteSchema):
+ """NumericValueDefWithCondition schema wrapper
+
+ Mapping(required=[])
+ A ValueDef with Condition<ValueDef | FieldDef> where either the condition or the value are
+ optional.
+
+ Attributes
+ ----------
+
+ condition : anyOf(:class:`ConditionalMarkPropFieldDef`, :class:`ConditionalNumberValueDef`,
+ List(:class:`ConditionalNumberValueDef`))
+ A field definition or one or more value definition(s) with a selection predicate.
+ value : float
+ A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values
+ between ``0`` to ``1`` for opacity).
+ """
+ _schema = {'$ref': '#/definitions/NumericValueDefWithCondition'}
+
+ def __init__(self, condition=Undefined, value=Undefined, **kwds):
+ super(NumericValueDefWithCondition, self).__init__(condition=condition, value=value, **kwds)
+
+
+class OrderFieldDef(VegaLiteSchema):
+ """OrderFieldDef schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : :class:`StandardType`
+ The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``,
+ ``"ordinal"``, or ``"nominal"`` ).
+ It can also be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ **Note:**
+
+
+ * Data values for a temporal field can be either a date-time string (e.g.,
+ ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a
+ timestamp number (e.g., ``1552199579097`` ).
+ * Data ``type`` describes the semantics of the data rather than the primitive data
+ types ( ``number``, ``string``, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data.
+ * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
+ or `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `timeUnit
+ <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
+ can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using
+ an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
+ refers to the post-aggregation data type. For example, we can calculate count
+ ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
+ "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output
+ is ``"quantitative"``.
+ * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have
+ ``type`` as they have exactly the same type as their primary channels (e.g.,
+ ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : anyOf(boolean, :class:`BinParams`, enum('binned'), None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ sort : :class:`SortOrder`
+ The sort order. One of ``"ascending"`` (default) or ``"descending"``.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ """
+ _schema = {'$ref': '#/definitions/OrderFieldDef'}
+
+ def __init__(self, type=Undefined, aggregate=Undefined, bin=Undefined, field=Undefined,
+ sort=Undefined, timeUnit=Undefined, title=Undefined, **kwds):
+ super(OrderFieldDef, self).__init__(type=type, aggregate=aggregate, bin=bin, field=field,
+ sort=sort, timeUnit=timeUnit, title=title, **kwds)
+
+
+class Orient(VegaLiteSchema):
+ """Orient schema wrapper
+
+ enum('left', 'right', 'top', 'bottom')
+ """
+ _schema = {'$ref': '#/definitions/Orient'}
+
+ def __init__(self, *args):
+ super(Orient, self).__init__(*args)
+
+
+class Orientation(VegaLiteSchema):
+ """Orientation schema wrapper
+
+ enum('horizontal', 'vertical')
+ """
+ _schema = {'$ref': '#/definitions/Orientation'}
+
+ def __init__(self, *args):
+ super(Orientation, self).__init__(*args)
+
+
+class OverlayMarkDef(VegaLiteSchema):
+ """OverlayMarkDef schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ align : :class:`Align`
+ The horizontal alignment of the text. One of ``"left"``, ``"right"``, ``"center"``.
+ angle : float
+ The rotation angle of the text, in degrees.
+ baseline : :class:`TextBaseline`
+ The vertical alignment of the text. One of ``"top"``, ``"middle"``, ``"bottom"``.
+
+ **Default value:** ``"middle"``
+ clip : boolean
+ Whether a mark be clipped to the enclosing group’s width and height.
+ color : :class:`Color`
+ Default color. Note that ``fill`` and ``stroke`` have higher precedence than
+ ``color`` and will override ``color``.
+
+ **Default value:** :raw-html:`<span style="color: #4682b4;">&#9632;</span>`
+ ``"#4682b4"``
+
+ **Note:** This property cannot be used in a `style config
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
+ cornerRadius : float
+ The radius in pixels of rounded rectangle corners.
+
+ **Default value:** ``0``
+ cursor : :class:`Cursor`
+ The mouse cursor used over the mark. Any valid `CSS cursor type
+ <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.
+ dir : :class:`Dir`
+ The direction of the text. One of ``"ltr"`` (left-to-right) or ``"rtl"``
+ (right-to-left). This property determines on which side is truncated in response to
+ the limit parameter.
+
+ **Default value:** ``"ltr"``
+ dx : float
+ The horizontal offset, in pixels, between the text label and its anchor point. The
+ offset is applied after rotation by the *angle* property.
+ dy : float
+ The vertical offset, in pixels, between the text label and its anchor point. The
+ offset is applied after rotation by the *angle* property.
+ ellipsis : string
+ The ellipsis string for text truncated in response to the limit parameter.
+
+ **Default value:** ``"…"``
+ fill : :class:`Color`
+ Default Fill Color. This has higher precedence than ``config.color``
+
+ **Default value:** (None)
+ fillOpacity : float
+ The fill opacity (value between [0,1]).
+
+ **Default value:** ``1``
+ filled : boolean
+ Whether the mark's color should be used as fill color instead of stroke color.
+
+ **Default value:** ``false`` for ``point``, ``line`` and ``rule`` ; otherwise,
+ ``true``.
+
+ **Note:** This property cannot be used in a `style config
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
+ font : string
+ The typeface to set the text in (e.g., ``"Helvetica Neue"`` ).
+ fontSize : float
+ The font size, in pixels.
+ fontStyle : :class:`FontStyle`
+ The font style (e.g., ``"italic"`` ).
+ fontWeight : :class:`FontWeight`
+ The font weight.
+ This can be either a string (e.g ``"bold"``, ``"normal"`` ) or a number ( ``100``,
+ ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and ``"bold"`` = ``700``
+ ).
+ height : float
+ Height of the marks.
+ href : string
+ A URL to load upon mouse click. If defined, the mark acts as a hyperlink.
+ interpolate : :class:`Interpolate`
+ The line interpolation method to use for line and area marks. One of the following:
+
+
+ * ``"linear"`` : piecewise linear segments, as in a polyline.
+ * ``"linear-closed"`` : close the linear segments to form a polygon.
+ * ``"step"`` : alternate between horizontal and vertical segments, as in a step
+ function.
+ * ``"step-before"`` : alternate between vertical and horizontal segments, as in a
+ step function.
+ * ``"step-after"`` : alternate between horizontal and vertical segments, as in a
+ step function.
+ * ``"basis"`` : a B-spline, with control point duplication on the ends.
+ * ``"basis-open"`` : an open B-spline; may not intersect the start or end.
+ * ``"basis-closed"`` : a closed B-spline, as in a loop.
+ * ``"cardinal"`` : a Cardinal spline, with control point duplication on the ends.
+ * ``"cardinal-open"`` : an open Cardinal spline; may not intersect the start or end,
+ but will intersect other control points.
+ * ``"cardinal-closed"`` : a closed Cardinal spline, as in a loop.
+ * ``"bundle"`` : equivalent to basis, except the tension parameter is used to
+ straighten the spline.
+ * ``"monotone"`` : cubic interpolation that preserves monotonicity in y.
+ limit : float
+ The maximum length of the text mark in pixels. The text value will be automatically
+ truncated if the rendered size exceeds the limit.
+
+ **Default value:** ``0``, indicating no limit
+ opacity : float
+ The overall opacity (value between [0,1]).
+
+ **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,
+ ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.
+ order : anyOf(None, boolean)
+ For line and trail marks, this ``order`` property can be set to ``null`` or
+ ``false`` to make the lines use the original order in the data sources.
+ orient : :class:`Orientation`
+ The orientation of a non-stacked bar, tick, area, and line charts.
+ The value is either horizontal (default) or vertical.
+
+
+ * For bar, rule and tick, this determines whether the size of the bar and tick
+ should be applied to x or y dimension.
+ * For area, this property determines the orient property of the Vega output.
+ * For line and trail marks, this property determines the sort order of the points in
+ the line
+ if ``config.sortLineBy`` is not specified.
+ For stacked charts, this is always determined by the orientation of the stack;
+ therefore explicitly specified value will be ignored.
+ radius : float
+ Polar coordinate radial offset, in pixels, of the text label from the origin
+ determined by the ``x`` and ``y`` properties.
+ shape : string
+ Shape of the point marks. Supported values include:
+
+
+ * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``,
+ ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or
+ ``"triangle-left"``.
+ * the line symbol ``"stroke"``
+ * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"``
+ * a custom `SVG path string
+ <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct
+ sizing, custom shape paths should be defined within a square bounding box with
+ coordinates ranging from -1 to 1 along both the x and y dimensions.)
+
+ **Default value:** ``"circle"``
+ size : float
+ Default size for marks.
+
+
+ * For ``point`` / ``circle`` / ``square``, this represents the pixel area of the
+ marks. For example: in the case of circles, the radius is determined in part by
+ the square root of the size value.
+ * For ``bar``, this represents the band size of the bar, in pixels.
+ * For ``text``, this represents the font size, in pixels.
+
+ **Default value:** ``30`` for point, circle, square marks; ``rangeStep`` - 1 for bar
+ marks with discrete dimensions; ``5`` for bar marks with continuous dimensions;
+ ``11`` for text marks.
+ stroke : :class:`Color`
+ Default Stroke Color. This has higher precedence than ``config.color``
+
+ **Default value:** (None)
+ strokeCap : :class:`StrokeCap`
+ The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or
+ ``"square"``.
+
+ **Default value:** ``"square"``
+ strokeDash : List(float)
+ An array of alternating stroke, space lengths for creating dashed or dotted lines.
+ strokeDashOffset : float
+ The offset (in pixels) into which to begin drawing with the stroke dash array.
+ strokeJoin : :class:`StrokeJoin`
+ The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``.
+
+ **Default value:** ``"miter"``
+ strokeMiterLimit : float
+ The miter limit at which to bevel a line join.
+ strokeOpacity : float
+ The stroke opacity (value between [0,1]).
+
+ **Default value:** ``1``
+ strokeWidth : float
+ The stroke width, in pixels.
+ style : anyOf(string, List(string))
+ A string or array of strings indicating the name of custom styles to apply to the
+ mark. A style is a named collection of mark property defaults defined within the
+ `style configuration
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. If style is an
+ array, later styles will override earlier styles. Any `mark properties
+ <https://vega.github.io/vega-lite/docs/encoding.html#mark-prop>`__ explicitly
+ defined within the ``encoding`` will override a style default.
+
+ **Default value:** The mark's name. For example, a bar mark will have style
+ ``"bar"`` by default.
+ **Note:** Any specified style will augment the default style. For example, a bar
+ mark with ``"style": "foo"`` will receive from ``config.style.bar`` and
+ ``config.style.foo`` (the specified style ``"foo"`` has higher precedence).
+ tension : float
+ Depending on the interpolation type, sets the tension parameter (for line and area
+ marks).
+ text : string
+ Placeholder text if the ``text`` channel is not specified
+ theta : float
+ Polar coordinate angle, in radians, of the text label from the origin determined by
+ the ``x`` and ``y`` properties. Values for ``theta`` follow the same convention of
+ ``arc`` mark ``startAngle`` and ``endAngle`` properties: angles are measured in
+ radians, with ``0`` indicating "north".
+ tooltip : anyOf(:class:`Value`, :class:`TooltipContent`, None)
+ The tooltip text string to show upon mouse hover or an object defining which fields
+ should the tooltip be derived from.
+
+
+ * If ``tooltip`` is ``{"content": "encoding"}``, then all fields from ``encoding``
+ will be used.
+ * If ``tooltip`` is ``{"content": "data"}``, then all fields that appear in the
+ highlighted data point will be used.
+ * If set to ``null``, then no tooltip will be used.
+ width : float
+ Width of the marks.
+ x : anyOf(float, enum('width'))
+ X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without
+ specified ``x2`` or ``width``.
+
+ The ``value`` of this channel can be a number or a string ``"width"`` for the width
+ of the plot.
+ x2 : anyOf(float, enum('width'))
+ X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
+
+ The ``value`` of this channel can be a number or a string ``"width"`` for the width
+ of the plot.
+ x2Offset : float
+ Offset for x2-position.
+ xOffset : float
+ Offset for x-position.
+ y : anyOf(float, enum('height'))
+ Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without
+ specified ``y2`` or ``height``.
+
+ The ``value`` of this channel can be a number or a string ``"height"`` for the
+ height of the plot.
+ y2 : anyOf(float, enum('width'))
+ Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
+
+ The ``value`` of this channel can be a number or a string ``"height"`` for the
+ height of the plot.
+ y2Offset : float
+ Offset for y2-position.
+ yOffset : float
+ Offset for y-position.
+ """
+ _schema = {'$ref': '#/definitions/OverlayMarkDef'}
+
+ def __init__(self, align=Undefined, angle=Undefined, baseline=Undefined, clip=Undefined,
+ color=Undefined, cornerRadius=Undefined, cursor=Undefined, dir=Undefined, dx=Undefined,
+ dy=Undefined, ellipsis=Undefined, fill=Undefined, fillOpacity=Undefined,
+ filled=Undefined, font=Undefined, fontSize=Undefined, fontStyle=Undefined,
+ fontWeight=Undefined, height=Undefined, href=Undefined, interpolate=Undefined,
+ limit=Undefined, opacity=Undefined, order=Undefined, orient=Undefined,
+ radius=Undefined, shape=Undefined, size=Undefined, stroke=Undefined,
+ strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined,
+ strokeJoin=Undefined, strokeMiterLimit=Undefined, strokeOpacity=Undefined,
+ strokeWidth=Undefined, style=Undefined, tension=Undefined, text=Undefined,
+ theta=Undefined, tooltip=Undefined, width=Undefined, x=Undefined, x2=Undefined,
+ x2Offset=Undefined, xOffset=Undefined, y=Undefined, y2=Undefined, y2Offset=Undefined,
+ yOffset=Undefined, **kwds):
+ super(OverlayMarkDef, self).__init__(align=align, angle=angle, baseline=baseline, clip=clip,
+ color=color, cornerRadius=cornerRadius, cursor=cursor,
+ dir=dir, dx=dx, dy=dy, ellipsis=ellipsis, fill=fill,
+ fillOpacity=fillOpacity, filled=filled, font=font,
+ fontSize=fontSize, fontStyle=fontStyle,
+ fontWeight=fontWeight, height=height, href=href,
+ interpolate=interpolate, limit=limit, opacity=opacity,
+ order=order, orient=orient, radius=radius, shape=shape,
+ size=size, stroke=stroke, strokeCap=strokeCap,
+ strokeDash=strokeDash, strokeDashOffset=strokeDashOffset,
+ strokeJoin=strokeJoin, strokeMiterLimit=strokeMiterLimit,
+ strokeOpacity=strokeOpacity, strokeWidth=strokeWidth,
+ style=style, tension=tension, text=text, theta=theta,
+ tooltip=tooltip, width=width, x=x, x2=x2,
+ x2Offset=x2Offset, xOffset=xOffset, y=y, y2=y2,
+ y2Offset=y2Offset, yOffset=yOffset, **kwds)
+
+
+class Padding(VegaLiteSchema):
+ """Padding schema wrapper
+
+ anyOf(float, Mapping(required=[]))
+ """
+ _schema = {'$ref': '#/definitions/Padding'}
+
+ def __init__(self, *args, **kwds):
+ super(Padding, self).__init__(*args, **kwds)
+
+
+class Parse(VegaLiteSchema):
+ """Parse schema wrapper
+
+ Mapping(required=[])
+ """
+ _schema = {'$ref': '#/definitions/Parse'}
+
+ def __init__(self, **kwds):
+ super(Parse, self).__init__(**kwds)
+
+
+class ParseValue(VegaLiteSchema):
+ """ParseValue schema wrapper
+
+ anyOf(None, string, enum('string'), enum('boolean'), enum('date'), enum('number'))
+ """
+ _schema = {'$ref': '#/definitions/ParseValue'}
+
+ def __init__(self, *args, **kwds):
+ super(ParseValue, self).__init__(*args, **kwds)
+
+
+class PartsMixinsBoxPlotPart(VegaLiteSchema):
+ """PartsMixinsBoxPlotPart schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ box : anyOf(boolean, :class:`MarkConfig`)
+
+ median : anyOf(boolean, :class:`MarkConfig`)
+
+ outliers : anyOf(boolean, :class:`MarkConfig`)
+
+ rule : anyOf(boolean, :class:`MarkConfig`)
+
+ ticks : anyOf(boolean, :class:`MarkConfig`)
+
+ """
+ _schema = {'$ref': '#/definitions/PartsMixins<BoxPlotPart>'}
+
+ def __init__(self, box=Undefined, median=Undefined, outliers=Undefined, rule=Undefined,
+ ticks=Undefined, **kwds):
+ super(PartsMixinsBoxPlotPart, self).__init__(box=box, median=median, outliers=outliers,
+ rule=rule, ticks=ticks, **kwds)
+
+
+class PartsMixinsErrorBandPart(VegaLiteSchema):
+ """PartsMixinsErrorBandPart schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ band : anyOf(boolean, :class:`MarkConfig`)
+
+ borders : anyOf(boolean, :class:`MarkConfig`)
+
+ """
+ _schema = {'$ref': '#/definitions/PartsMixins<ErrorBandPart>'}
+
+ def __init__(self, band=Undefined, borders=Undefined, **kwds):
+ super(PartsMixinsErrorBandPart, self).__init__(band=band, borders=borders, **kwds)
+
+
+class PartsMixinsErrorBarPart(VegaLiteSchema):
+ """PartsMixinsErrorBarPart schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ rule : anyOf(boolean, :class:`MarkConfig`)
+
+ ticks : anyOf(boolean, :class:`MarkConfig`)
+
+ """
+ _schema = {'$ref': '#/definitions/PartsMixins<ErrorBarPart>'}
+
+ def __init__(self, rule=Undefined, ticks=Undefined, **kwds):
+ super(PartsMixinsErrorBarPart, self).__init__(rule=rule, ticks=ticks, **kwds)
+
+
+class PositionFieldDef(VegaLiteSchema):
+ """PositionFieldDef schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : :class:`StandardType`
+ The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``,
+ ``"ordinal"``, or ``"nominal"`` ).
+ It can also be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ **Note:**
+
+
+ * Data values for a temporal field can be either a date-time string (e.g.,
+ ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a
+ timestamp number (e.g., ``1552199579097`` ).
+ * Data ``type`` describes the semantics of the data rather than the primitive data
+ types ( ``number``, ``string``, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data.
+ * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
+ or `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `timeUnit
+ <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
+ can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using
+ an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
+ refers to the post-aggregation data type. For example, we can calculate count
+ ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
+ "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output
+ is ``"quantitative"``.
+ * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have
+ ``type`` as they have exactly the same type as their primary channels (e.g.,
+ ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ axis : anyOf(:class:`Axis`, None)
+ An object defining properties of axis's gridlines, ticks and labels.
+ If ``null``, the axis for the encoding channel will be removed.
+
+ **Default value:** If undefined, default `axis properties
+ <https://vega.github.io/vega-lite/docs/axis.html>`__ are applied.
+
+ **See also:** `axis <https://vega.github.io/vega-lite/docs/axis.html>`__
+ documentation.
+ bin : anyOf(boolean, :class:`BinParams`, enum('binned'), None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ impute : :class:`ImputeParams`
+ An object defining the properties of the Impute Operation to be applied.
+ The field value of the other positional channel is taken as ``key`` of the
+ ``Impute`` Operation.
+ The field of the ``color`` channel if specified is used as ``groupby`` of the
+ ``Impute`` Operation.
+
+ **See also:** `impute <https://vega.github.io/vega-lite/docs/impute.html>`__
+ documentation.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ sort : :class:`Sort`
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following:
+
+
+ * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
+ Javascript.
+ * `A sort-by-encoding definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ for sorting
+ by another encoding channel. (This type of sort definition is not available for
+ ``row`` and ``column`` channels.)
+ * `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field.
+ * `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values
+ in their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ).
+ * ``null`` indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` is not supported for ``row`` and ``column``.
+
+ **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
+ documentation.
+ stack : anyOf(:class:`StackOffset`, None, boolean)
+ Type of stacking offset if the field should be stacked.
+ ``stack`` is only applicable for ``x`` and ``y`` channels with continuous domains.
+ For example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar
+ chart.
+
+ ``stack`` can be one of the following values:
+
+
+ * ``"zero"`` or `true`: stacking with baseline offset at zero value of the scale
+ (for creating typical stacked
+ [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and `area
+ <https://vega.github.io/vega-lite/docs/stack.html#area>`__ chart).
+ * ``"normalize"`` - stacking with normalized domain (for creating `normalized
+ stacked bar and area charts
+ <https://vega.github.io/vega-lite/docs/stack.html#normalized>`__.
+ :raw-html:`<br/>`
+ - ``"center"`` - stacking with center baseline (for `streamgraph
+ <https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__ ).
+ * ``null`` or ``false`` - No-stacking. This will produce layered `bar
+ <https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area
+ chart.
+
+ **Default value:** ``zero`` for plots with all of the following conditions are true:
+ (1) the mark is ``bar`` or ``area`` ;
+ (2) the stacked measure channel (x or y) has a linear scale;
+ (3) At least one of non-position channels mapped to an unaggregated field that is
+ different from x and y. Otherwise, ``null`` by default.
+
+ **See also:** `stack <https://vega.github.io/vega-lite/docs/stack.html>`__
+ documentation.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ """
+ _schema = {'$ref': '#/definitions/PositionFieldDef'}
+
+ def __init__(self, type=Undefined, aggregate=Undefined, axis=Undefined, bin=Undefined,
+ field=Undefined, impute=Undefined, scale=Undefined, sort=Undefined, stack=Undefined,
+ timeUnit=Undefined, title=Undefined, **kwds):
+ super(PositionFieldDef, self).__init__(type=type, aggregate=aggregate, axis=axis, bin=bin,
+ field=field, impute=impute, scale=scale, sort=sort,
+ stack=stack, timeUnit=timeUnit, title=title, **kwds)
+
+
+class Predicate(LogicalOperandPredicate):
+ """Predicate schema wrapper
+
+ anyOf(:class:`FieldEqualPredicate`, :class:`FieldRangePredicate`,
+ :class:`FieldOneOfPredicate`, :class:`FieldLTPredicate`, :class:`FieldGTPredicate`,
+ :class:`FieldLTEPredicate`, :class:`FieldGTEPredicate`, :class:`FieldValidPredicate`,
+ :class:`SelectionPredicate`, string)
+ """
+ _schema = {'$ref': '#/definitions/Predicate'}
+
+ def __init__(self, *args, **kwds):
+ super(Predicate, self).__init__(*args, **kwds)
+
+
+class FieldEqualPredicate(Predicate):
+ """FieldEqualPredicate schema wrapper
+
+ Mapping(required=[equal, field])
+
+ Attributes
+ ----------
+
+ equal : anyOf(string, float, boolean, :class:`DateTime`)
+ The value that the field should be equal to.
+ field : :class:`FieldName`
+ Field to be filtered.
+ timeUnit : :class:`TimeUnit`
+ Time unit for the field to be filtered.
+ """
+ _schema = {'$ref': '#/definitions/FieldEqualPredicate'}
+
+ def __init__(self, equal=Undefined, field=Undefined, timeUnit=Undefined, **kwds):
+ super(FieldEqualPredicate, self).__init__(equal=equal, field=field, timeUnit=timeUnit, **kwds)
+
+
+class FieldGTEPredicate(Predicate):
+ """FieldGTEPredicate schema wrapper
+
+ Mapping(required=[field, gte])
+
+ Attributes
+ ----------
+
+ field : :class:`FieldName`
+ Field to be filtered.
+ gte : anyOf(string, float, :class:`DateTime`)
+ The value that the field should be greater than or equals to.
+ timeUnit : :class:`TimeUnit`
+ Time unit for the field to be filtered.
+ """
+ _schema = {'$ref': '#/definitions/FieldGTEPredicate'}
+
+ def __init__(self, field=Undefined, gte=Undefined, timeUnit=Undefined, **kwds):
+ super(FieldGTEPredicate, self).__init__(field=field, gte=gte, timeUnit=timeUnit, **kwds)
+
+
+class FieldGTPredicate(Predicate):
+ """FieldGTPredicate schema wrapper
+
+ Mapping(required=[field, gt])
+
+ Attributes
+ ----------
+
+ field : :class:`FieldName`
+ Field to be filtered.
+ gt : anyOf(string, float, :class:`DateTime`)
+ The value that the field should be greater than.
+ timeUnit : :class:`TimeUnit`
+ Time unit for the field to be filtered.
+ """
+ _schema = {'$ref': '#/definitions/FieldGTPredicate'}
+
+ def __init__(self, field=Undefined, gt=Undefined, timeUnit=Undefined, **kwds):
+ super(FieldGTPredicate, self).__init__(field=field, gt=gt, timeUnit=timeUnit, **kwds)
+
+
+class FieldLTEPredicate(Predicate):
+ """FieldLTEPredicate schema wrapper
+
+ Mapping(required=[field, lte])
+
+ Attributes
+ ----------
+
+ field : :class:`FieldName`
+ Field to be filtered.
+ lte : anyOf(string, float, :class:`DateTime`)
+ The value that the field should be less than or equals to.
+ timeUnit : :class:`TimeUnit`
+ Time unit for the field to be filtered.
+ """
+ _schema = {'$ref': '#/definitions/FieldLTEPredicate'}
+
+ def __init__(self, field=Undefined, lte=Undefined, timeUnit=Undefined, **kwds):
+ super(FieldLTEPredicate, self).__init__(field=field, lte=lte, timeUnit=timeUnit, **kwds)
+
+
+class FieldLTPredicate(Predicate):
+ """FieldLTPredicate schema wrapper
+
+ Mapping(required=[field, lt])
+
+ Attributes
+ ----------
+
+ field : :class:`FieldName`
+ Field to be filtered.
+ lt : anyOf(string, float, :class:`DateTime`)
+ The value that the field should be less than.
+ timeUnit : :class:`TimeUnit`
+ Time unit for the field to be filtered.
+ """
+ _schema = {'$ref': '#/definitions/FieldLTPredicate'}
+
+ def __init__(self, field=Undefined, lt=Undefined, timeUnit=Undefined, **kwds):
+ super(FieldLTPredicate, self).__init__(field=field, lt=lt, timeUnit=timeUnit, **kwds)
+
+
+class FieldOneOfPredicate(Predicate):
+ """FieldOneOfPredicate schema wrapper
+
+ Mapping(required=[field, oneOf])
+
+ Attributes
+ ----------
+
+ field : :class:`FieldName`
+ Field to be filtered.
+ oneOf : anyOf(List(string), List(float), List(boolean), List(:class:`DateTime`))
+ A set of values that the ``field`` 's value should be a member of,
+ for a data item included in the filtered data.
+ timeUnit : :class:`TimeUnit`
+ Time unit for the field to be filtered.
+ """
+ _schema = {'$ref': '#/definitions/FieldOneOfPredicate'}
+
+ def __init__(self, field=Undefined, oneOf=Undefined, timeUnit=Undefined, **kwds):
+ super(FieldOneOfPredicate, self).__init__(field=field, oneOf=oneOf, timeUnit=timeUnit, **kwds)
+
+
+class FieldRangePredicate(Predicate):
+ """FieldRangePredicate schema wrapper
+
+ Mapping(required=[field, range])
+
+ Attributes
+ ----------
+
+ field : :class:`FieldName`
+ Field to be filtered.
+ range : List(anyOf(float, :class:`DateTime`, None))
+ An array of inclusive minimum and maximum values
+ for a field value of a data item to be included in the filtered data.
+ timeUnit : :class:`TimeUnit`
+ Time unit for the field to be filtered.
+ """
+ _schema = {'$ref': '#/definitions/FieldRangePredicate'}
+
+ def __init__(self, field=Undefined, range=Undefined, timeUnit=Undefined, **kwds):
+ super(FieldRangePredicate, self).__init__(field=field, range=range, timeUnit=timeUnit, **kwds)
+
+
+class FieldValidPredicate(Predicate):
+ """FieldValidPredicate schema wrapper
+
+ Mapping(required=[field, valid])
+
+ Attributes
+ ----------
+
+ field : :class:`FieldName`
+ Field to be filtered.
+ valid : boolean
+ If set to true the field's value has to be valid, meaning both not ``null`` and not
+ `NaN
+ <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN>`__.
+ timeUnit : :class:`TimeUnit`
+ Time unit for the field to be filtered.
+ """
+ _schema = {'$ref': '#/definitions/FieldValidPredicate'}
+
+ def __init__(self, field=Undefined, valid=Undefined, timeUnit=Undefined, **kwds):
+ super(FieldValidPredicate, self).__init__(field=field, valid=valid, timeUnit=timeUnit, **kwds)
+
+
+class Projection(VegaLiteSchema):
+ """Projection schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ center : List(float)
+ Sets the projection’s center to the specified center, a two-element array of
+ longitude and latitude in degrees.
+
+ **Default value:** ``[0, 0]``
+ clipAngle : float
+ Sets the projection’s clipping circle radius to the specified angle in degrees. If
+ ``null``, switches to `antimeridian <http://bl.ocks.org/mbostock/3788999>`__ cutting
+ rather than small-circle clipping.
+ clipExtent : List(List(float))
+ Sets the projection’s viewport clip extent to the specified bounds in pixels. The
+ extent bounds are specified as an array ``[[x0, y0], [x1, y1]]``, where ``x0`` is
+ the left-side of the viewport, ``y0`` is the top, ``x1`` is the right and ``y1`` is
+ the bottom. If ``null``, no viewport clipping is performed.
+ coefficient : float
+
+ distance : float
+
+ fraction : float
+
+ lobes : float
+
+ parallel : float
+
+ precision : float
+ Sets the threshold for the projection’s `adaptive resampling
+ <http://bl.ocks.org/mbostock/3795544>`__ to the specified value in pixels. This
+ value corresponds to the `Douglas–Peucker distance
+ <http://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm>`__.
+ If precision is not specified, returns the projection’s current resampling precision
+ which defaults to ``√0.5 ≅ 0.70710…``.
+ radius : float
+
+ ratio : float
+
+ reflectX : boolean
+
+ reflectY : boolean
+
+ rotate : List(float)
+ Sets the projection’s three-axis rotation to the specified angles, which must be a
+ two- or three-element array of numbers [ ``lambda``, ``phi``, ``gamma`` ] specifying
+ the rotation angles in degrees about each spherical axis. (These correspond to yaw,
+ pitch and roll.)
+
+ **Default value:** ``[0, 0, 0]``
+ scale : float
+ Sets the projection's scale (zoom) value, overriding automatic fitting.
+ spacing : float
+
+ tilt : float
+
+ translate : List(float)
+ Sets the projection's translation (pan) value, overriding automatic fitting.
+ type : :class:`ProjectionType`
+ The cartographic projection to use. This value is case-insensitive, for example
+ ``"albers"`` and ``"Albers"`` indicate the same projection type. You can find all
+ valid projection types `in the documentation
+ <https://vega.github.io/vega-lite/docs/projection.html#projection-types>`__.
+
+ **Default value:** ``mercator``
+ """
+ _schema = {'$ref': '#/definitions/Projection'}
+
+ def __init__(self, center=Undefined, clipAngle=Undefined, clipExtent=Undefined,
+ coefficient=Undefined, distance=Undefined, fraction=Undefined, lobes=Undefined,
+ parallel=Undefined, precision=Undefined, radius=Undefined, ratio=Undefined,
+ reflectX=Undefined, reflectY=Undefined, rotate=Undefined, scale=Undefined,
+ spacing=Undefined, tilt=Undefined, translate=Undefined, type=Undefined, **kwds):
+ super(Projection, self).__init__(center=center, clipAngle=clipAngle, clipExtent=clipExtent,
+ coefficient=coefficient, distance=distance, fraction=fraction,
+ lobes=lobes, parallel=parallel, precision=precision,
+ radius=radius, ratio=ratio, reflectX=reflectX,
+ reflectY=reflectY, rotate=rotate, scale=scale, spacing=spacing,
+ tilt=tilt, translate=translate, type=type, **kwds)
+
+
+class ProjectionConfig(VegaLiteSchema):
+ """ProjectionConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ center : List(float)
+ Sets the projection’s center to the specified center, a two-element array of
+ longitude and latitude in degrees.
+
+ **Default value:** ``[0, 0]``
+ clipAngle : float
+ Sets the projection’s clipping circle radius to the specified angle in degrees. If
+ ``null``, switches to `antimeridian <http://bl.ocks.org/mbostock/3788999>`__ cutting
+ rather than small-circle clipping.
+ clipExtent : List(List(float))
+ Sets the projection’s viewport clip extent to the specified bounds in pixels. The
+ extent bounds are specified as an array ``[[x0, y0], [x1, y1]]``, where ``x0`` is
+ the left-side of the viewport, ``y0`` is the top, ``x1`` is the right and ``y1`` is
+ the bottom. If ``null``, no viewport clipping is performed.
+ coefficient : float
+
+ distance : float
+
+ fraction : float
+
+ lobes : float
+
+ parallel : float
+
+ precision : float
+ Sets the threshold for the projection’s `adaptive resampling
+ <http://bl.ocks.org/mbostock/3795544>`__ to the specified value in pixels. This
+ value corresponds to the `Douglas–Peucker distance
+ <http://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm>`__.
+ If precision is not specified, returns the projection’s current resampling precision
+ which defaults to ``√0.5 ≅ 0.70710…``.
+ radius : float
+
+ ratio : float
+
+ reflectX : boolean
+
+ reflectY : boolean
+
+ rotate : List(float)
+ Sets the projection’s three-axis rotation to the specified angles, which must be a
+ two- or three-element array of numbers [ ``lambda``, ``phi``, ``gamma`` ] specifying
+ the rotation angles in degrees about each spherical axis. (These correspond to yaw,
+ pitch and roll.)
+
+ **Default value:** ``[0, 0, 0]``
+ scale : float
+ Sets the projection's scale (zoom) value, overriding automatic fitting.
+ spacing : float
+
+ tilt : float
+
+ translate : List(float)
+ Sets the projection's translation (pan) value, overriding automatic fitting.
+ type : :class:`ProjectionType`
+ The cartographic projection to use. This value is case-insensitive, for example
+ ``"albers"`` and ``"Albers"`` indicate the same projection type. You can find all
+ valid projection types `in the documentation
+ <https://vega.github.io/vega-lite/docs/projection.html#projection-types>`__.
+
+ **Default value:** ``mercator``
+ """
+ _schema = {'$ref': '#/definitions/ProjectionConfig'}
+
+ def __init__(self, center=Undefined, clipAngle=Undefined, clipExtent=Undefined,
+ coefficient=Undefined, distance=Undefined, fraction=Undefined, lobes=Undefined,
+ parallel=Undefined, precision=Undefined, radius=Undefined, ratio=Undefined,
+ reflectX=Undefined, reflectY=Undefined, rotate=Undefined, scale=Undefined,
+ spacing=Undefined, tilt=Undefined, translate=Undefined, type=Undefined, **kwds):
+ super(ProjectionConfig, self).__init__(center=center, clipAngle=clipAngle,
+ clipExtent=clipExtent, coefficient=coefficient,
+ distance=distance, fraction=fraction, lobes=lobes,
+ parallel=parallel, precision=precision, radius=radius,
+ ratio=ratio, reflectX=reflectX, reflectY=reflectY,
+ rotate=rotate, scale=scale, spacing=spacing, tilt=tilt,
+ translate=translate, type=type, **kwds)
+
+
+class ProjectionType(VegaLiteSchema):
+ """ProjectionType schema wrapper
+
+ enum('albers', 'albersUsa', 'azimuthalEqualArea', 'azimuthalEquidistant', 'conicConformal',
+ 'conicEqualArea', 'conicEquidistant', 'equirectangular', 'gnomonic', 'identity', 'mercator',
+ 'naturalEarth1', 'orthographic', 'stereographic', 'transverseMercator')
+ """
+ _schema = {'$ref': '#/definitions/ProjectionType'}
+
+ def __init__(self, *args):
+ super(ProjectionType, self).__init__(*args)
+
+
+class RangeConfig(VegaLiteSchema):
+ """RangeConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ category : anyOf(List(string), :class:`SchemeConfig`)
+ Default range for *nominal* (categorical) fields.
+ diverging : anyOf(List(string), :class:`SchemeConfig`)
+ Default range for diverging *quantitative* fields.
+ heatmap : anyOf(List(string), :class:`SchemeConfig`)
+ Default range for *quantitative* heatmaps.
+ ordinal : anyOf(List(string), :class:`SchemeConfig`)
+ Default range for *ordinal* fields.
+ ramp : anyOf(List(string), :class:`SchemeConfig`)
+ Default range for *quantitative* and *temporal* fields.
+ symbol : List(string)
+ Default range palette for the ``shape`` channel.
+ """
+ _schema = {'$ref': '#/definitions/RangeConfig'}
+
+ def __init__(self, category=Undefined, diverging=Undefined, heatmap=Undefined, ordinal=Undefined,
+ ramp=Undefined, symbol=Undefined, **kwds):
+ super(RangeConfig, self).__init__(category=category, diverging=diverging, heatmap=heatmap,
+ ordinal=ordinal, ramp=ramp, symbol=symbol, **kwds)
+
+
+class RangeConfigValue(VegaLiteSchema):
+ """RangeConfigValue schema wrapper
+
+ anyOf(List(anyOf(float, string)), :class:`SchemeConfig`, Mapping(required=[step]))
+ """
+ _schema = {'$ref': '#/definitions/RangeConfigValue'}
+
+ def __init__(self, *args, **kwds):
+ super(RangeConfigValue, self).__init__(*args, **kwds)
+
+
+class RectConfig(VegaLiteSchema):
+ """RectConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ align : :class:`Align`
+ The horizontal alignment of the text. One of ``"left"``, ``"right"``, ``"center"``.
+ angle : float
+ The rotation angle of the text, in degrees.
+ baseline : :class:`TextBaseline`
+ The vertical alignment of the text. One of ``"top"``, ``"middle"``, ``"bottom"``.
+
+ **Default value:** ``"middle"``
+ binSpacing : float
+ Offset between bars for binned field. Ideal value for this is either 0 (Preferred
+ by statisticians) or 1 (Vega-Lite Default, D3 example style).
+
+ **Default value:** ``1``
+ color : :class:`Color`
+ Default color. Note that ``fill`` and ``stroke`` have higher precedence than
+ ``color`` and will override ``color``.
+
+ **Default value:** :raw-html:`<span style="color: #4682b4;">&#9632;</span>`
+ ``"#4682b4"``
+
+ **Note:** This property cannot be used in a `style config
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
+ continuousBandSize : float
+ The default size of the bars on continuous scales.
+
+ **Default value:** ``5``
+ cornerRadius : float
+ The radius in pixels of rounded rectangle corners.
+
+ **Default value:** ``0``
+ cursor : :class:`Cursor`
+ The mouse cursor used over the mark. Any valid `CSS cursor type
+ <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.
+ dir : :class:`Dir`
+ The direction of the text. One of ``"ltr"`` (left-to-right) or ``"rtl"``
+ (right-to-left). This property determines on which side is truncated in response to
+ the limit parameter.
+
+ **Default value:** ``"ltr"``
+ discreteBandSize : float
+ The default size of the bars with discrete dimensions. If unspecified, the default
+ size is ``bandSize-1``,
+ which provides 1 pixel offset between bars.
+ dx : float
+ The horizontal offset, in pixels, between the text label and its anchor point. The
+ offset is applied after rotation by the *angle* property.
+ dy : float
+ The vertical offset, in pixels, between the text label and its anchor point. The
+ offset is applied after rotation by the *angle* property.
+ ellipsis : string
+ The ellipsis string for text truncated in response to the limit parameter.
+
+ **Default value:** ``"…"``
+ fill : :class:`Color`
+ Default Fill Color. This has higher precedence than ``config.color``
+
+ **Default value:** (None)
+ fillOpacity : float
+ The fill opacity (value between [0,1]).
+
+ **Default value:** ``1``
+ filled : boolean
+ Whether the mark's color should be used as fill color instead of stroke color.
+
+ **Default value:** ``false`` for ``point``, ``line`` and ``rule`` ; otherwise,
+ ``true``.
+
+ **Note:** This property cannot be used in a `style config
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
+ font : string
+ The typeface to set the text in (e.g., ``"Helvetica Neue"`` ).
+ fontSize : float
+ The font size, in pixels.
+ fontStyle : :class:`FontStyle`
+ The font style (e.g., ``"italic"`` ).
+ fontWeight : :class:`FontWeight`
+ The font weight.
+ This can be either a string (e.g ``"bold"``, ``"normal"`` ) or a number ( ``100``,
+ ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and ``"bold"`` = ``700``
+ ).
+ height : float
+ Height of the marks.
+ href : string
+ A URL to load upon mouse click. If defined, the mark acts as a hyperlink.
+ interpolate : :class:`Interpolate`
+ The line interpolation method to use for line and area marks. One of the following:
+
+
+ * ``"linear"`` : piecewise linear segments, as in a polyline.
+ * ``"linear-closed"`` : close the linear segments to form a polygon.
+ * ``"step"`` : alternate between horizontal and vertical segments, as in a step
+ function.
+ * ``"step-before"`` : alternate between vertical and horizontal segments, as in a
+ step function.
+ * ``"step-after"`` : alternate between horizontal and vertical segments, as in a
+ step function.
+ * ``"basis"`` : a B-spline, with control point duplication on the ends.
+ * ``"basis-open"`` : an open B-spline; may not intersect the start or end.
+ * ``"basis-closed"`` : a closed B-spline, as in a loop.
+ * ``"cardinal"`` : a Cardinal spline, with control point duplication on the ends.
+ * ``"cardinal-open"`` : an open Cardinal spline; may not intersect the start or end,
+ but will intersect other control points.
+ * ``"cardinal-closed"`` : a closed Cardinal spline, as in a loop.
+ * ``"bundle"`` : equivalent to basis, except the tension parameter is used to
+ straighten the spline.
+ * ``"monotone"`` : cubic interpolation that preserves monotonicity in y.
+ limit : float
+ The maximum length of the text mark in pixels. The text value will be automatically
+ truncated if the rendered size exceeds the limit.
+
+ **Default value:** ``0``, indicating no limit
+ opacity : float
+ The overall opacity (value between [0,1]).
+
+ **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,
+ ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.
+ order : anyOf(None, boolean)
+ For line and trail marks, this ``order`` property can be set to ``null`` or
+ ``false`` to make the lines use the original order in the data sources.
+ orient : :class:`Orientation`
+ The orientation of a non-stacked bar, tick, area, and line charts.
+ The value is either horizontal (default) or vertical.
+
+
+ * For bar, rule and tick, this determines whether the size of the bar and tick
+ should be applied to x or y dimension.
+ * For area, this property determines the orient property of the Vega output.
+ * For line and trail marks, this property determines the sort order of the points in
+ the line
+ if ``config.sortLineBy`` is not specified.
+ For stacked charts, this is always determined by the orientation of the stack;
+ therefore explicitly specified value will be ignored.
+ radius : float
+ Polar coordinate radial offset, in pixels, of the text label from the origin
+ determined by the ``x`` and ``y`` properties.
+ shape : string
+ Shape of the point marks. Supported values include:
+
+
+ * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``,
+ ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or
+ ``"triangle-left"``.
+ * the line symbol ``"stroke"``
+ * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"``
+ * a custom `SVG path string
+ <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct
+ sizing, custom shape paths should be defined within a square bounding box with
+ coordinates ranging from -1 to 1 along both the x and y dimensions.)
+
+ **Default value:** ``"circle"``
+ size : float
+ Default size for marks.
+
+
+ * For ``point`` / ``circle`` / ``square``, this represents the pixel area of the
+ marks. For example: in the case of circles, the radius is determined in part by
+ the square root of the size value.
+ * For ``bar``, this represents the band size of the bar, in pixels.
+ * For ``text``, this represents the font size, in pixels.
+
+ **Default value:** ``30`` for point, circle, square marks; ``rangeStep`` - 1 for bar
+ marks with discrete dimensions; ``5`` for bar marks with continuous dimensions;
+ ``11`` for text marks.
+ stroke : :class:`Color`
+ Default Stroke Color. This has higher precedence than ``config.color``
+
+ **Default value:** (None)
+ strokeCap : :class:`StrokeCap`
+ The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or
+ ``"square"``.
+
+ **Default value:** ``"square"``
+ strokeDash : List(float)
+ An array of alternating stroke, space lengths for creating dashed or dotted lines.
+ strokeDashOffset : float
+ The offset (in pixels) into which to begin drawing with the stroke dash array.
+ strokeJoin : :class:`StrokeJoin`
+ The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``.
+
+ **Default value:** ``"miter"``
+ strokeMiterLimit : float
+ The miter limit at which to bevel a line join.
+ strokeOpacity : float
+ The stroke opacity (value between [0,1]).
+
+ **Default value:** ``1``
+ strokeWidth : float
+ The stroke width, in pixels.
+ tension : float
+ Depending on the interpolation type, sets the tension parameter (for line and area
+ marks).
+ text : string
+ Placeholder text if the ``text`` channel is not specified
+ theta : float
+ Polar coordinate angle, in radians, of the text label from the origin determined by
+ the ``x`` and ``y`` properties. Values for ``theta`` follow the same convention of
+ ``arc`` mark ``startAngle`` and ``endAngle`` properties: angles are measured in
+ radians, with ``0`` indicating "north".
+ tooltip : anyOf(:class:`Value`, :class:`TooltipContent`, None)
+ The tooltip text string to show upon mouse hover or an object defining which fields
+ should the tooltip be derived from.
+
+
+ * If ``tooltip`` is ``{"content": "encoding"}``, then all fields from ``encoding``
+ will be used.
+ * If ``tooltip`` is ``{"content": "data"}``, then all fields that appear in the
+ highlighted data point will be used.
+ * If set to ``null``, then no tooltip will be used.
+ width : float
+ Width of the marks.
+ x : anyOf(float, enum('width'))
+ X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without
+ specified ``x2`` or ``width``.
+
+ The ``value`` of this channel can be a number or a string ``"width"`` for the width
+ of the plot.
+ x2 : anyOf(float, enum('width'))
+ X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
+
+ The ``value`` of this channel can be a number or a string ``"width"`` for the width
+ of the plot.
+ y : anyOf(float, enum('height'))
+ Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without
+ specified ``y2`` or ``height``.
+
+ The ``value`` of this channel can be a number or a string ``"height"`` for the
+ height of the plot.
+ y2 : anyOf(float, enum('width'))
+ Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
+
+ The ``value`` of this channel can be a number or a string ``"height"`` for the
+ height of the plot.
+ """
+ _schema = {'$ref': '#/definitions/RectConfig'}
+
+ def __init__(self, align=Undefined, angle=Undefined, baseline=Undefined, binSpacing=Undefined,
+ color=Undefined, continuousBandSize=Undefined, cornerRadius=Undefined,
+ cursor=Undefined, dir=Undefined, discreteBandSize=Undefined, dx=Undefined,
+ dy=Undefined, ellipsis=Undefined, fill=Undefined, fillOpacity=Undefined,
+ filled=Undefined, font=Undefined, fontSize=Undefined, fontStyle=Undefined,
+ fontWeight=Undefined, height=Undefined, href=Undefined, interpolate=Undefined,
+ limit=Undefined, opacity=Undefined, order=Undefined, orient=Undefined,
+ radius=Undefined, shape=Undefined, size=Undefined, stroke=Undefined,
+ strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined,
+ strokeJoin=Undefined, strokeMiterLimit=Undefined, strokeOpacity=Undefined,
+ strokeWidth=Undefined, tension=Undefined, text=Undefined, theta=Undefined,
+ tooltip=Undefined, width=Undefined, x=Undefined, x2=Undefined, y=Undefined,
+ y2=Undefined, **kwds):
+ super(RectConfig, self).__init__(align=align, angle=angle, baseline=baseline,
+ binSpacing=binSpacing, color=color,
+ continuousBandSize=continuousBandSize,
+ cornerRadius=cornerRadius, cursor=cursor, dir=dir,
+ discreteBandSize=discreteBandSize, dx=dx, dy=dy,
+ ellipsis=ellipsis, fill=fill, fillOpacity=fillOpacity,
+ filled=filled, font=font, fontSize=fontSize,
+ fontStyle=fontStyle, fontWeight=fontWeight, height=height,
+ href=href, interpolate=interpolate, limit=limit,
+ opacity=opacity, order=order, orient=orient, radius=radius,
+ shape=shape, size=size, stroke=stroke, strokeCap=strokeCap,
+ strokeDash=strokeDash, strokeDashOffset=strokeDashOffset,
+ strokeJoin=strokeJoin, strokeMiterLimit=strokeMiterLimit,
+ strokeOpacity=strokeOpacity, strokeWidth=strokeWidth,
+ tension=tension, text=text, theta=theta, tooltip=tooltip,
+ width=width, x=x, x2=x2, y=y, y2=y2, **kwds)
+
+
+class RepeatMapping(VegaLiteSchema):
+ """RepeatMapping schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ column : List(string)
+ An array of fields to be repeated horizontally.
+ row : List(string)
+ An array of fields to be repeated vertically.
+ """
+ _schema = {'$ref': '#/definitions/RepeatMapping'}
+
+ def __init__(self, column=Undefined, row=Undefined, **kwds):
+ super(RepeatMapping, self).__init__(column=column, row=row, **kwds)
+
+
+class RepeatRef(Field):
+ """RepeatRef schema wrapper
+
+ Mapping(required=[repeat])
+ A ValueDef with optional Condition<ValueDef | FieldDef>
+ Reference to a repeated value.
+
+ Attributes
+ ----------
+
+ repeat : enum('row', 'column', 'repeat')
+
+ """
+ _schema = {'$ref': '#/definitions/RepeatRef'}
+
+ def __init__(self, repeat=Undefined, **kwds):
+ super(RepeatRef, self).__init__(repeat=repeat, **kwds)
+
+
+class Resolve(VegaLiteSchema):
+ """Resolve schema wrapper
+
+ Mapping(required=[])
+ Defines how scales, axes, and legends from different specs should be combined. Resolve is a
+ mapping from ``scale``, ``axis``, and ``legend`` to a mapping from channels to resolutions.
+
+ Attributes
+ ----------
+
+ axis : :class:`AxisResolveMap`
+
+ legend : :class:`LegendResolveMap`
+
+ scale : :class:`ScaleResolveMap`
+
+ """
+ _schema = {'$ref': '#/definitions/Resolve'}
+
+ def __init__(self, axis=Undefined, legend=Undefined, scale=Undefined, **kwds):
+ super(Resolve, self).__init__(axis=axis, legend=legend, scale=scale, **kwds)
+
+
+class ResolveMode(VegaLiteSchema):
+ """ResolveMode schema wrapper
+
+ enum('independent', 'shared')
+ """
+ _schema = {'$ref': '#/definitions/ResolveMode'}
+
+ def __init__(self, *args):
+ super(ResolveMode, self).__init__(*args)
+
+
+class RowColLayoutAlign(VegaLiteSchema):
+ """RowColLayoutAlign schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ column : :class:`LayoutAlign`
+
+ row : :class:`LayoutAlign`
+
+ """
+ _schema = {'$ref': '#/definitions/RowCol<LayoutAlign>'}
+
+ def __init__(self, column=Undefined, row=Undefined, **kwds):
+ super(RowColLayoutAlign, self).__init__(column=column, row=row, **kwds)
+
+
+class RowColboolean(VegaLiteSchema):
+ """RowColboolean schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ column : boolean
+
+ row : boolean
+
+ """
+ _schema = {'$ref': '#/definitions/RowCol<boolean>'}
+
+ def __init__(self, column=Undefined, row=Undefined, **kwds):
+ super(RowColboolean, self).__init__(column=column, row=row, **kwds)
+
+
+class RowColnumber(VegaLiteSchema):
+ """RowColnumber schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ column : float
+
+ row : float
+
+ """
+ _schema = {'$ref': '#/definitions/RowCol<number>'}
+
+ def __init__(self, column=Undefined, row=Undefined, **kwds):
+ super(RowColnumber, self).__init__(column=column, row=row, **kwds)
+
+
+class Scale(VegaLiteSchema):
+ """Scale schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ align : float
+ The alignment of the steps within the scale range.
+
+ This value must lie in the range ``[0,1]``. A value of ``0.5`` indicates that the
+ steps should be centered within the range. A value of ``0`` or ``1`` may be used to
+ shift the bands to one side, say to position them adjacent to an axis.
+
+ **Default value:** ``0.5``
+ base : float
+ The logarithm base of the ``log`` scale (default ``10`` ).
+ bins : List(float)
+ An array of bin boundaries over the scale domain. If provided, axes and legends will
+ use the bin boundaries to inform the choice of tick marks and text labels.
+ clamp : boolean
+ If ``true``, values that exceed the data domain are clamped to either the minimum or
+ maximum range value
+
+ **Default value:** derived from the `scale config
+ <https://vega.github.io/vega-lite/docs/config.html#scale-config>`__ 's ``clamp`` (
+ ``true`` by default).
+ constant : float
+ A constant determining the slope of the symlog function around zero. Only used for
+ ``symlog`` scales.
+
+ **Default value:** ``1``
+ domain : anyOf(List(float), List(string), List(boolean), List(:class:`DateTime`),
+ enum('unaggregated'), :class:`SelectionDomain`)
+ Customized domain values.
+
+ For *quantitative* fields, ``domain`` can take the form of a two-element array with
+ minimum and maximum values. `Piecewise scales
+ <https://vega.github.io/vega-lite/docs/scale.html#piecewise>`__ can be created by
+ providing a ``domain`` with more than two entries.
+ If the input field is aggregated, ``domain`` can also be a string value
+ ``"unaggregated"``, indicating that the domain should include the raw data values
+ prior to the aggregation.
+
+ For *temporal* fields, ``domain`` can be a two-element array minimum and maximum
+ values, in the form of either timestamps or the `DateTime definition objects
+ <https://vega.github.io/vega-lite/docs/types.html#datetime>`__.
+
+ For *ordinal* and *nominal* fields, ``domain`` can be an array that lists valid
+ input values.
+
+ The ``selection`` property can be used to `interactively determine
+ <https://vega.github.io/vega-lite/docs/selection.html#scale-domains>`__ the scale
+ domain.
+ exponent : float
+ The exponent of the ``pow`` scale.
+ interpolate : anyOf(:class:`ScaleInterpolate`, :class:`ScaleInterpolateParams`)
+ The interpolation method for range values. By default, a general interpolator for
+ numbers, dates, strings and colors (in HCL space) is used. For color ranges, this
+ property allows interpolation in alternative color spaces. Legal values include
+ ``rgb``, ``hsl``, ``hsl-long``, ``lab``, ``hcl``, ``hcl-long``, ``cubehelix`` and
+ ``cubehelix-long`` ('-long' variants use longer paths in polar coordinate spaces).
+ If object-valued, this property accepts an object with a string-valued *type*
+ property and an optional numeric *gamma* property applicable to rgb and cubehelix
+ interpolators. For more, see the `d3-interpolate documentation
+ <https://github.com/d3/d3-interpolate>`__.
+
+
+ * **Default value:** ``hcl``
+ nice : anyOf(boolean, float, :class:`NiceTime`, Mapping(required=[interval, step]))
+ Extending the domain so that it starts and ends on nice round values. This method
+ typically modifies the scale’s domain, and may only extend the bounds to the nearest
+ round value. Nicing is useful if the domain is computed from data and may be
+ irregular. For example, for a domain of *[0.201479…, 0.996679…]*, a nice domain
+ might be *[0.2, 1.0]*.
+
+ For quantitative scales such as linear, ``nice`` can be either a boolean flag or a
+ number. If ``nice`` is a number, it will represent a desired tick count. This allows
+ greater control over the step size used to extend the bounds, guaranteeing that the
+ returned ticks will exactly cover the domain.
+
+ For temporal fields with time and utc scales, the ``nice`` value can be a string
+ indicating the desired time interval. Legal values are ``"millisecond"``,
+ ``"second"``, ``"minute"``, ``"hour"``, ``"day"``, ``"week"``, ``"month"``, and
+ ``"year"``. Alternatively, ``time`` and ``utc`` scales can accept an object-valued
+ interval specifier of the form ``{"interval": "month", "step": 3}``, which includes
+ a desired number of interval steps. Here, the domain would snap to quarter (Jan,
+ Apr, Jul, Oct) boundaries.
+
+ **Default value:** ``true`` for unbinned *quantitative* fields; ``false`` otherwise.
+ padding : float
+ For * `continuous <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__ *
+ scales, expands the scale domain to accommodate the specified number of pixels on
+ each of the scale range. The scale range must represent pixels for this parameter to
+ function as intended. Padding adjustment is performed prior to all other
+ adjustments, including the effects of the  ``zero``,  ``nice``,  ``domainMin``, and
+ ``domainMax``  properties.
+
+ For * `band <https://vega.github.io/vega-lite/docs/scale.html#band>`__ * scales,
+ shortcut for setting ``paddingInner`` and ``paddingOuter`` to the same value.
+
+ For * `point <https://vega.github.io/vega-lite/docs/scale.html#point>`__ * scales,
+ alias for ``paddingOuter``.
+
+ **Default value:** For *continuous* scales, derived from the `scale config
+ <https://vega.github.io/vega-lite/docs/scale.html#config>`__ 's
+ ``continuousPadding``.
+ For *band and point* scales, see ``paddingInner`` and ``paddingOuter``. By default,
+ Vega-Lite sets padding such that *width/height = number of unique values * step*.
+ paddingInner : float
+ The inner padding (spacing) within each band step of band scales, as a fraction of
+ the step size. This value must lie in the range [0,1].
+
+ For point scale, this property is invalid as point scales do not have internal band
+ widths (only step sizes between bands).
+
+ **Default value:** derived from the `scale config
+ <https://vega.github.io/vega-lite/docs/scale.html#config>`__ 's
+ ``bandPaddingInner``.
+ paddingOuter : float
+ The outer padding (spacing) at the ends of the range of band and point scales,
+ as a fraction of the step size. This value must lie in the range [0,1].
+
+ **Default value:** derived from the `scale config
+ <https://vega.github.io/vega-lite/docs/scale.html#config>`__ 's ``bandPaddingOuter``
+ for band scales and ``pointPadding`` for point scales.
+ By default, Vega-Lite sets outer padding such that *width/height = number of unique
+ values * step*.
+ range : anyOf(List(float), List(string), string)
+ The range of the scale. One of:
+
+
+ A string indicating a `pre-defined named scale range
+ <https://vega.github.io/vega-lite/docs/scale.html#range-config>`__ (e.g., example,
+ ``"symbol"``, or ``"diverging"`` ).
+
+ For `continuous scales
+ <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__, two-element array
+ indicating minimum and maximum values, or an array with more than two entries for
+ specifying a `piecewise scale
+ <https://vega.github.io/vega-lite/docs/scale.html#piecewise>`__.
+
+ For `discrete <https://vega.github.io/vega-lite/docs/scale.html#discrete>`__ and
+ `discretizing <https://vega.github.io/vega-lite/docs/scale.html#discretizing>`__
+ scales, an array of desired output values.
+
+ **Notes:**
+
+ 1) For color scales you can also specify a color `scheme
+ <https://vega.github.io/vega-lite/docs/scale.html#scheme>`__ instead of ``range``.
+
+ 2) Any directly specified ``range`` for ``x`` and ``y`` channels will be ignored.
+ Range can be customized via the view's corresponding `size
+ <https://vega.github.io/vega-lite/docs/size.html>`__ ( ``width`` and ``height`` ) or
+ via `range steps and paddings properties <#range-step>`__ for `band <#band>`__ and
+ `point <#point>`__ scales.
+ rangeStep : anyOf(float, None)
+ The distance between the starts of adjacent bands or points in `band
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__ and `point
+ <https://vega.github.io/vega-lite/docs/scale.html#point>`__ scales.
+
+ If ``rangeStep`` is ``null`` or if the view contains the scale's corresponding `size
+ <https://vega.github.io/vega-lite/docs/size.html>`__ ( ``width`` for ``x`` scales
+ and ``height`` for ``y`` scales), ``rangeStep`` will be automatically determined to
+ fit the size of the view.
+
+ **Default value:** derived the `scale config
+ <https://vega.github.io/vega-lite/docs/config.html#scale-config>`__ 's
+ ``textXRangeStep`` ( ``90`` by default) for x-scales of ``text`` marks and
+ ``rangeStep`` ( ``21`` by default) for x-scales of other marks and y-scales.
+
+ **Warning** : If ``rangeStep`` is ``null`` and the cardinality of the scale's domain
+ is higher than ``width`` or ``height``, the rangeStep might become less than one
+ pixel and the mark might not appear correctly.
+ round : boolean
+ If ``true``, rounds numeric output values to integers. This can be helpful for
+ snapping to the pixel grid.
+
+ **Default value:** ``false``.
+ scheme : anyOf(string, :class:`SchemeParams`)
+ A string indicating a color `scheme
+ <https://vega.github.io/vega-lite/docs/scale.html#scheme>`__ name (e.g.,
+ ``"category10"`` or ``"blues"`` ) or a `scheme parameter object
+ <https://vega.github.io/vega-lite/docs/scale.html#scheme-params>`__.
+
+ Discrete color schemes may be used with `discrete
+ <https://vega.github.io/vega-lite/docs/scale.html#discrete>`__ or `discretizing
+ <https://vega.github.io/vega-lite/docs/scale.html#discretizing>`__ scales.
+ Continuous color schemes are intended for use with color scales.
+
+ For the full list of supported schemes, please refer to the `Vega Scheme
+ <https://vega.github.io/vega/docs/schemes/#reference>`__ reference.
+ type : :class:`ScaleType`
+ The type of scale. Vega-Lite supports the following categories of scale types:
+
+ 1) `Continuous Scales
+ <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__ -- mapping
+ continuous domains to continuous output ranges ( `"linear"
+ <https://vega.github.io/vega-lite/docs/scale.html#linear>`__, `"pow"
+ <https://vega.github.io/vega-lite/docs/scale.html#pow>`__, `"sqrt"
+ <https://vega.github.io/vega-lite/docs/scale.html#sqrt>`__, `"symlog"
+ <https://vega.github.io/vega-lite/docs/scale.html#symlog>`__, `"log"
+ <https://vega.github.io/vega-lite/docs/scale.html#log>`__, `"time"
+ <https://vega.github.io/vega-lite/docs/scale.html#time>`__, `"utc"
+ <https://vega.github.io/vega-lite/docs/scale.html#utc>`__.
+
+ 2) `Discrete Scales <https://vega.github.io/vega-lite/docs/scale.html#discrete>`__
+ -- mapping discrete domains to discrete ( `"ordinal"
+ <https://vega.github.io/vega-lite/docs/scale.html#ordinal>`__ ) or continuous (
+ `"band" <https://vega.github.io/vega-lite/docs/scale.html#band>`__ and `"point"
+ <https://vega.github.io/vega-lite/docs/scale.html#point>`__ ) output ranges.
+
+ 3) `Discretizing Scales
+ <https://vega.github.io/vega-lite/docs/scale.html#discretizing>`__ -- mapping
+ continuous domains to discrete output ranges `"bin-ordinal"
+ <https://vega.github.io/vega-lite/docs/scale.html#bin-ordinal>`__, `"quantile"
+ <https://vega.github.io/vega-lite/docs/scale.html#quantile>`__, `"quantize"
+ <https://vega.github.io/vega-lite/docs/scale.html#quantize>`__ and `"threshold"
+ <https://vega.github.io/vega-lite/docs/scale.html#threshold>`__.
+
+ **Default value:** please see the `scale type table
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
+ zero : boolean
+ If ``true``, ensures that a zero baseline value is included in the scale domain.
+
+ **Default value:** ``true`` for x and y channels if the quantitative field is not
+ binned and no custom ``domain`` is provided; ``false`` otherwise.
+
+ **Note:** Log, time, and utc scales do not support ``zero``.
+ """
+ _schema = {'$ref': '#/definitions/Scale'}
+
+ def __init__(self, align=Undefined, base=Undefined, bins=Undefined, clamp=Undefined,
+ constant=Undefined, domain=Undefined, exponent=Undefined, interpolate=Undefined,
+ nice=Undefined, padding=Undefined, paddingInner=Undefined, paddingOuter=Undefined,
+ range=Undefined, rangeStep=Undefined, round=Undefined, scheme=Undefined,
+ type=Undefined, zero=Undefined, **kwds):
+ super(Scale, self).__init__(align=align, base=base, bins=bins, clamp=clamp, constant=constant,
+ domain=domain, exponent=exponent, interpolate=interpolate,
+ nice=nice, padding=padding, paddingInner=paddingInner,
+ paddingOuter=paddingOuter, range=range, rangeStep=rangeStep,
+ round=round, scheme=scheme, type=type, zero=zero, **kwds)
+
+
+class ScaleConfig(VegaLiteSchema):
+ """ScaleConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ bandPaddingInner : float
+ Default inner padding for ``x`` and ``y`` band-ordinal scales.
+
+ **Default value:**
+
+
+ * ``barBandPaddingInner`` for bar marks ( ``0.1`` by default)
+ * ``rectBandPaddingInner`` for rect and other marks ( ``0`` by default)
+ bandPaddingOuter : float
+ Default outer padding for ``x`` and ``y`` band-ordinal scales.
+
+ **Default value:** ``paddingInner/2`` (which makes *width/height = number of unique
+ values * step* )
+ barBandPaddingInner : float
+ Default inner padding for ``x`` and ``y`` band-ordinal scales of ``"bar"`` marks.
+
+ **Default value:** ``0.1``
+ barBandPaddingOuter : float
+ Default outer padding for ``x`` and ``y`` band-ordinal scales of ``"bar"`` marks.
+ If not specified, by default, band scale's paddingOuter is paddingInner/2.
+ clamp : boolean
+ If true, values that exceed the data domain are clamped to either the minimum or
+ maximum range value
+ continuousPadding : float
+ Default padding for continuous scales.
+
+ **Default:** ``5`` for continuous x-scale of a vertical bar and continuous y-scale
+ of a horizontal bar.; ``0`` otherwise.
+ maxBandSize : float
+ The default max value for mapping quantitative fields to bar's size/bandSize.
+
+ If undefined (default), we will use the scale's ``rangeStep`` - 1.
+ maxFontSize : float
+ The default max value for mapping quantitative fields to text's size/fontSize.
+
+ **Default value:** ``40``
+ maxOpacity : float
+ Default max opacity for mapping a field to opacity.
+
+ **Default value:** ``0.8``
+ maxSize : float
+ Default max value for point size scale.
+ maxStrokeWidth : float
+ Default max strokeWidth for the scale of strokeWidth for rule and line marks and of
+ size for trail marks.
+
+ **Default value:** ``4``
+ minBandSize : float
+ The default min value for mapping quantitative fields to bar and tick's
+ size/bandSize scale with zero=false.
+
+ **Default value:** ``2``
+ minFontSize : float
+ The default min value for mapping quantitative fields to tick's size/fontSize scale
+ with zero=false
+
+ **Default value:** ``8``
+ minOpacity : float
+ Default minimum opacity for mapping a field to opacity.
+
+ **Default value:** ``0.3``
+ minSize : float
+ Default minimum value for point size scale with zero=false.
+
+ **Default value:** ``9``
+ minStrokeWidth : float
+ Default minimum strokeWidth for the scale of strokeWidth for rule and line marks and
+ of size for trail marks with zero=false.
+
+ **Default value:** ``1``
+ pointPadding : float
+ Default outer padding for ``x`` and ``y`` point-ordinal scales.
+
+ **Default value:** ``0.5`` (which makes *width/height = number of unique values *
+ step* )
+ quantileCount : float
+ Default range cardinality for `quantile
+ <https://vega.github.io/vega-lite/docs/scale.html#quantile>`__ scale.
+
+ **Default value:** ``4``
+ quantizeCount : float
+ Default range cardinality for `quantize
+ <https://vega.github.io/vega-lite/docs/scale.html#quantize>`__ scale.
+
+ **Default value:** ``4``
+ rangeStep : anyOf(float, None)
+ Default range step for band and point scales of (1) the ``y`` channel
+ and (2) the ``x`` channel when the mark is not ``text``.
+
+ **Default value:** ``20``
+ rectBandPaddingInner : float
+ Default inner padding for ``x`` and ``y`` band-ordinal scales of ``"rect"`` marks.
+
+ **Default value:** ``0``
+ rectBandPaddingOuter : float
+ Default outer padding for ``x`` and ``y`` band-ordinal scales of ``"rect"`` marks.
+ If not specified, by default, band scale's paddingOuter is paddingInner/2.
+ round : boolean
+ If true, rounds numeric output values to integers.
+ This can be helpful for snapping to the pixel grid.
+ (Only available for ``x``, ``y``, and ``size`` scales.)
+ textXRangeStep : float
+ Default range step for ``x`` band and point scales of text marks.
+
+ **Default value:** ``90``
+ useUnaggregatedDomain : boolean
+ Use the source data range before aggregation as scale domain instead of aggregated
+ data for aggregate axis.
+
+ This is equivalent to setting ``domain`` to ``"unaggregate"`` for aggregated
+ *quantitative* fields by default.
+
+ This property only works with aggregate functions that produce values within the raw
+ data domain ( ``"mean"``, ``"average"``, ``"median"``, ``"q1"``, ``"q3"``,
+ ``"min"``, ``"max"`` ). For other aggregations that produce values outside of the
+ raw data domain (e.g. ``"count"``, ``"sum"`` ), this property is ignored.
+
+ **Default value:** ``false``
+ """
+ _schema = {'$ref': '#/definitions/ScaleConfig'}
+
+ def __init__(self, bandPaddingInner=Undefined, bandPaddingOuter=Undefined,
+ barBandPaddingInner=Undefined, barBandPaddingOuter=Undefined, clamp=Undefined,
+ continuousPadding=Undefined, maxBandSize=Undefined, maxFontSize=Undefined,
+ maxOpacity=Undefined, maxSize=Undefined, maxStrokeWidth=Undefined,
+ minBandSize=Undefined, minFontSize=Undefined, minOpacity=Undefined, minSize=Undefined,
+ minStrokeWidth=Undefined, pointPadding=Undefined, quantileCount=Undefined,
+ quantizeCount=Undefined, rangeStep=Undefined, rectBandPaddingInner=Undefined,
+ rectBandPaddingOuter=Undefined, round=Undefined, textXRangeStep=Undefined,
+ useUnaggregatedDomain=Undefined, **kwds):
+ super(ScaleConfig, self).__init__(bandPaddingInner=bandPaddingInner,
+ bandPaddingOuter=bandPaddingOuter,
+ barBandPaddingInner=barBandPaddingInner,
+ barBandPaddingOuter=barBandPaddingOuter, clamp=clamp,
+ continuousPadding=continuousPadding, maxBandSize=maxBandSize,
+ maxFontSize=maxFontSize, maxOpacity=maxOpacity,
+ maxSize=maxSize, maxStrokeWidth=maxStrokeWidth,
+ minBandSize=minBandSize, minFontSize=minFontSize,
+ minOpacity=minOpacity, minSize=minSize,
+ minStrokeWidth=minStrokeWidth, pointPadding=pointPadding,
+ quantileCount=quantileCount, quantizeCount=quantizeCount,
+ rangeStep=rangeStep,
+ rectBandPaddingInner=rectBandPaddingInner,
+ rectBandPaddingOuter=rectBandPaddingOuter, round=round,
+ textXRangeStep=textXRangeStep,
+ useUnaggregatedDomain=useUnaggregatedDomain, **kwds)
+
+
+class ScaleInterpolate(VegaLiteSchema):
+ """ScaleInterpolate schema wrapper
+
+ enum('rgb', 'lab', 'hcl', 'hsl', 'hsl-long', 'hcl-long', 'cubehelix', 'cubehelix-long')
+ """
+ _schema = {'$ref': '#/definitions/ScaleInterpolate'}
+
+ def __init__(self, *args):
+ super(ScaleInterpolate, self).__init__(*args)
+
+
+class ScaleInterpolateParams(VegaLiteSchema):
+ """ScaleInterpolateParams schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : enum('rgb', 'cubehelix', 'cubehelix-long')
+
+ gamma : float
+
+ """
+ _schema = {'$ref': '#/definitions/ScaleInterpolateParams'}
+
+ def __init__(self, type=Undefined, gamma=Undefined, **kwds):
+ super(ScaleInterpolateParams, self).__init__(type=type, gamma=gamma, **kwds)
+
+
+class ScaleResolveMap(VegaLiteSchema):
+ """ScaleResolveMap schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ color : :class:`ResolveMode`
+
+ fill : :class:`ResolveMode`
+
+ fillOpacity : :class:`ResolveMode`
+
+ opacity : :class:`ResolveMode`
+
+ shape : :class:`ResolveMode`
+
+ size : :class:`ResolveMode`
+
+ stroke : :class:`ResolveMode`
+
+ strokeOpacity : :class:`ResolveMode`
+
+ strokeWidth : :class:`ResolveMode`
+
+ x : :class:`ResolveMode`
+
+ y : :class:`ResolveMode`
+
+ """
+ _schema = {'$ref': '#/definitions/ScaleResolveMap'}
+
+ def __init__(self, color=Undefined, fill=Undefined, fillOpacity=Undefined, opacity=Undefined,
+ shape=Undefined, size=Undefined, stroke=Undefined, strokeOpacity=Undefined,
+ strokeWidth=Undefined, x=Undefined, y=Undefined, **kwds):
+ super(ScaleResolveMap, self).__init__(color=color, fill=fill, fillOpacity=fillOpacity,
+ opacity=opacity, shape=shape, size=size, stroke=stroke,
+ strokeOpacity=strokeOpacity, strokeWidth=strokeWidth, x=x,
+ y=y, **kwds)
+
+
+class ScaleType(VegaLiteSchema):
+ """ScaleType schema wrapper
+
+ enum('linear', 'log', 'pow', 'sqrt', 'symlog', 'time', 'utc', 'quantile', 'quantize',
+ 'threshold', 'bin-ordinal', 'ordinal', 'point', 'band')
+ """
+ _schema = {'$ref': '#/definitions/ScaleType'}
+
+ def __init__(self, *args):
+ super(ScaleType, self).__init__(*args)
+
+
+class SchemeConfig(RangeConfigValue):
+ """SchemeConfig schema wrapper
+
+ Mapping(required=[scheme])
+
+ Attributes
+ ----------
+
+ scheme : string
+
+ count : float
+
+ extent : List(float)
+
+ """
+ _schema = {'$ref': '#/definitions/SchemeConfig'}
+
+ def __init__(self, scheme=Undefined, count=Undefined, extent=Undefined, **kwds):
+ super(SchemeConfig, self).__init__(scheme=scheme, count=count, extent=extent, **kwds)
+
+
+class SchemeParams(VegaLiteSchema):
+ """SchemeParams schema wrapper
+
+ Mapping(required=[name])
+
+ Attributes
+ ----------
+
+ name : string
+ A color scheme name for ordinal scales (e.g., ``"category10"`` or ``"blues"`` ).
+
+ For the full list of supported schemes, please refer to the `Vega Scheme
+ <https://vega.github.io/vega/docs/schemes/#reference>`__ reference.
+ count : float
+ The number of colors to use in the scheme. This can be useful for scale types such
+ as ``"quantize"``, which use the length of the scale range to determine the number
+ of discrete bins for the scale domain.
+ extent : List(float)
+ The extent of the color range to use. For example ``[0.2, 1]`` will rescale the
+ color scheme such that color values in the range *[0, 0.2)* are excluded from the
+ scheme.
+ """
+ _schema = {'$ref': '#/definitions/SchemeParams'}
+
+ def __init__(self, name=Undefined, count=Undefined, extent=Undefined, **kwds):
+ super(SchemeParams, self).__init__(name=name, count=count, extent=extent, **kwds)
+
+
+class SecondaryFieldDef(VegaLiteSchema):
+ """SecondaryFieldDef schema wrapper
+
+ Mapping(required=[])
+ A field definition of a secondary channel that shares a scale with another primary channel.
+ For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``.
+
+ Attributes
+ ----------
+
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : None
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ """
+ _schema = {'$ref': '#/definitions/SecondaryFieldDef'}
+
+ def __init__(self, aggregate=Undefined, bin=Undefined, field=Undefined, timeUnit=Undefined,
+ title=Undefined, **kwds):
+ super(SecondaryFieldDef, self).__init__(aggregate=aggregate, bin=bin, field=field,
+ timeUnit=timeUnit, title=title, **kwds)
+
+
+class SelectionConfig(VegaLiteSchema):
+ """SelectionConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ interval : :class:`IntervalSelectionConfig`
+ The default definition for an `interval
+ <https://vega.github.io/vega-lite/docs/selection.html#type>`__ selection. All
+ properties and transformations
+ for an interval selection definition (except ``type`` ) may be specified here.
+
+ For instance, setting ``interval`` to ``{"translate": false}`` disables the ability
+ to move
+ interval selections by default.
+ multi : :class:`MultiSelectionConfig`
+ The default definition for a `multi
+ <https://vega.github.io/vega-lite/docs/selection.html#type>`__ selection. All
+ properties and transformations
+ for a multi selection definition (except ``type`` ) may be specified here.
+
+ For instance, setting ``multi`` to ``{"toggle": "event.altKey"}`` adds additional
+ values to
+ multi selections when clicking with the alt-key pressed by default.
+ single : :class:`SingleSelectionConfig`
+ The default definition for a `single
+ <https://vega.github.io/vega-lite/docs/selection.html#type>`__ selection. All
+ properties and transformations
+ for a single selection definition (except ``type`` ) may be specified here.
+
+ For instance, setting ``single`` to ``{"on": "dblclick"}`` populates single
+ selections on double-click by default.
+ """
+ _schema = {'$ref': '#/definitions/SelectionConfig'}
+
+ def __init__(self, interval=Undefined, multi=Undefined, single=Undefined, **kwds):
+ super(SelectionConfig, self).__init__(interval=interval, multi=multi, single=single, **kwds)
+
+
+class SelectionDef(VegaLiteSchema):
+ """SelectionDef schema wrapper
+
+ anyOf(:class:`SingleSelection`, :class:`MultiSelection`, :class:`IntervalSelection`)
+ """
+ _schema = {'$ref': '#/definitions/SelectionDef'}
+
+ def __init__(self, *args, **kwds):
+ super(SelectionDef, self).__init__(*args, **kwds)
+
+
+class IntervalSelection(SelectionDef):
+ """IntervalSelection schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : enum('interval')
+ Determines the default event processing and data query for the selection. Vega-Lite
+ currently supports three selection types:
+
+
+ * ``single`` -- to select a single discrete data value on ``click``.
+ * ``multi`` -- to select multiple discrete data value; the first value is selected
+ on ``click`` and additional values toggled on shift- ``click``.
+ * ``interval`` -- to select a continuous range of data values on ``drag``.
+ bind : enum('scales')
+ Establishes a two-way binding between the interval selection and the scales
+ used within the same view. This allows a user to interactively pan and
+ zoom the view.
+
+ **See also:** `bind <https://vega.github.io/vega-lite/docs/bind.html>`__
+ documentation.
+ clear : anyOf(:class:`EventStream`, boolean)
+ Clears the selection, emptying it of all values. Can be an
+ `EventStream <https://vega.github.io/vega/docs/event-streams/>`__ or ``false`` to
+ disable.
+
+ **Default value:** ``dblclick``.
+
+ **See also:** `clear <https://vega.github.io/vega-lite/docs/clear.html>`__
+ documentation.
+ empty : enum('all', 'none')
+ By default, ``all`` data values are considered to lie within an empty selection.
+ When set to ``none``, empty selections contain no data values.
+ encodings : List(:class:`SingleDefUnitChannel`)
+ An array of encoding channels. The corresponding data field values
+ must match for a data tuple to fall within the selection.
+
+ **See also:** `encodings <https://vega.github.io/vega-lite/docs/project.html>`__
+ documentation.
+ fields : List(:class:`FieldName`)
+ An array of field names whose values must match for a data tuple to
+ fall within the selection.
+
+ **See also:** `fields <https://vega.github.io/vega-lite/docs/project.html>`__
+ documentation.
+ init : :class:`SelectionInitIntervalMapping`
+ Initialize the selection with a mapping between `projected channels or field names
+ <https://vega.github.io/vega-lite/docs/project.html>`__ and arrays of
+ initial values.
+
+ **See also:** `init <https://vega.github.io/vega-lite/docs/init.html>`__
+ documentation.
+ mark : :class:`BrushConfig`
+ An interval selection also adds a rectangle mark to depict the
+ extents of the interval. The ``mark`` property can be used to customize the
+ appearance of the mark.
+
+ **See also:** `mark <https://vega.github.io/vega-lite/docs/selection-mark.html>`__
+ documentation.
+ on : :class:`EventStream`
+ A `Vega event stream <https://vega.github.io/vega/docs/event-streams/>`__ (object or
+ selector) that triggers the selection.
+ For interval selections, the event stream must specify a `start and end
+ <https://vega.github.io/vega/docs/event-streams/#between-filters>`__.
+ resolve : :class:`SelectionResolution`
+ With layered and multi-view displays, a strategy that determines how
+ selections' data queries are resolved when applied in a filter transform,
+ conditional encoding rule, or scale domain.
+
+ **See also:** `resolve
+ <https://vega.github.io/vega-lite/docs/selection-resolve.html>`__ documentation.
+ translate : anyOf(string, boolean)
+ When truthy, allows a user to interactively move an interval selection
+ back-and-forth. Can be ``true``, ``false`` (to disable panning), or a
+ `Vega event stream definition <https://vega.github.io/vega/docs/event-streams/>`__
+ which must include a start and end event to trigger continuous panning.
+
+ **Default value:** ``true``, which corresponds to
+ ``[mousedown, window:mouseup] > window:mousemove!`` which corresponds to
+ clicks and dragging within an interval selection to reposition it.
+
+ **See also:** `translate <https://vega.github.io/vega-lite/docs/translate.html>`__
+ documentation.
+ zoom : anyOf(string, boolean)
+ When truthy, allows a user to interactively resize an interval selection.
+ Can be ``true``, ``false`` (to disable zooming), or a `Vega event stream
+ definition <https://vega.github.io/vega/docs/event-streams/>`__. Currently,
+ only ``wheel`` events are supported.
+
+ **Default value:** ``true``, which corresponds to ``wheel!``.
+
+ **See also:** `zoom <https://vega.github.io/vega-lite/docs/zoom.html>`__
+ documentation.
+ """
+ _schema = {'$ref': '#/definitions/IntervalSelection'}
+
+ def __init__(self, type=Undefined, bind=Undefined, clear=Undefined, empty=Undefined,
+ encodings=Undefined, fields=Undefined, init=Undefined, mark=Undefined, on=Undefined,
+ resolve=Undefined, translate=Undefined, zoom=Undefined, **kwds):
+ super(IntervalSelection, self).__init__(type=type, bind=bind, clear=clear, empty=empty,
+ encodings=encodings, fields=fields, init=init,
+ mark=mark, on=on, resolve=resolve, translate=translate,
+ zoom=zoom, **kwds)
+
+
+class MultiSelection(SelectionDef):
+ """MultiSelection schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : enum('multi')
+ Determines the default event processing and data query for the selection. Vega-Lite
+ currently supports three selection types:
+
+
+ * ``single`` -- to select a single discrete data value on ``click``.
+ * ``multi`` -- to select multiple discrete data value; the first value is selected
+ on ``click`` and additional values toggled on shift- ``click``.
+ * ``interval`` -- to select a continuous range of data values on ``drag``.
+ clear : anyOf(:class:`EventStream`, boolean)
+ Clears the selection, emptying it of all values. Can be an
+ `EventStream <https://vega.github.io/vega/docs/event-streams/>`__ or ``false`` to
+ disable.
+
+ **Default value:** ``dblclick``.
+
+ **See also:** `clear <https://vega.github.io/vega-lite/docs/clear.html>`__
+ documentation.
+ empty : enum('all', 'none')
+ By default, ``all`` data values are considered to lie within an empty selection.
+ When set to ``none``, empty selections contain no data values.
+ encodings : List(:class:`SingleDefUnitChannel`)
+ An array of encoding channels. The corresponding data field values
+ must match for a data tuple to fall within the selection.
+
+ **See also:** `encodings <https://vega.github.io/vega-lite/docs/project.html>`__
+ documentation.
+ fields : List(:class:`FieldName`)
+ An array of field names whose values must match for a data tuple to
+ fall within the selection.
+
+ **See also:** `fields <https://vega.github.io/vega-lite/docs/project.html>`__
+ documentation.
+ init : anyOf(:class:`SelectionInitMapping`, List(:class:`SelectionInitMapping`))
+ Initialize the selection with a mapping between `projected channels or field names
+ <https://vega.github.io/vega-lite/docs/project.html>`__ and an initial
+ value (or array of values).
+
+ **See also:** `init <https://vega.github.io/vega-lite/docs/init.html>`__
+ documentation.
+ nearest : boolean
+ When true, an invisible voronoi diagram is computed to accelerate discrete
+ selection. The data value *nearest* the mouse cursor is added to the selection.
+
+ **See also:** `nearest <https://vega.github.io/vega-lite/docs/nearest.html>`__
+ documentation.
+ on : :class:`EventStream`
+ A `Vega event stream <https://vega.github.io/vega/docs/event-streams/>`__ (object or
+ selector) that triggers the selection.
+ For interval selections, the event stream must specify a `start and end
+ <https://vega.github.io/vega/docs/event-streams/#between-filters>`__.
+ resolve : :class:`SelectionResolution`
+ With layered and multi-view displays, a strategy that determines how
+ selections' data queries are resolved when applied in a filter transform,
+ conditional encoding rule, or scale domain.
+
+ **See also:** `resolve
+ <https://vega.github.io/vega-lite/docs/selection-resolve.html>`__ documentation.
+ toggle : anyOf(string, boolean)
+ Controls whether data values should be toggled or only ever inserted into
+ multi selections. Can be ``true``, ``false`` (for insertion only), or a
+ `Vega expression <https://vega.github.io/vega/docs/expressions/>`__.
+
+ **Default value:** ``true``, which corresponds to ``event.shiftKey`` (i.e.,
+ data values are toggled when a user interacts with the shift-key pressed).
+
+ **See also:** `toggle <https://vega.github.io/vega-lite/docs/toggle.html>`__
+ documentation.
+ """
+ _schema = {'$ref': '#/definitions/MultiSelection'}
+
+ def __init__(self, type=Undefined, clear=Undefined, empty=Undefined, encodings=Undefined,
+ fields=Undefined, init=Undefined, nearest=Undefined, on=Undefined, resolve=Undefined,
+ toggle=Undefined, **kwds):
+ super(MultiSelection, self).__init__(type=type, clear=clear, empty=empty, encodings=encodings,
+ fields=fields, init=init, nearest=nearest, on=on,
+ resolve=resolve, toggle=toggle, **kwds)
+
+
+class SelectionDomain(VegaLiteSchema):
+ """SelectionDomain schema wrapper
+
+ anyOf(Mapping(required=[selection]), Mapping(required=[selection]))
+ """
+ _schema = {'$ref': '#/definitions/SelectionDomain'}
+
+ def __init__(self, *args, **kwds):
+ super(SelectionDomain, self).__init__(*args, **kwds)
+
+
+class SelectionInit(VegaLiteSchema):
+ """SelectionInit schema wrapper
+
+ anyOf(boolean, float, string, :class:`DateTime`)
+ """
+ _schema = {'$ref': '#/definitions/SelectionInit'}
+
+ def __init__(self, *args, **kwds):
+ super(SelectionInit, self).__init__(*args, **kwds)
+
+
+class DateTime(SelectionInit):
+ """DateTime schema wrapper
+
+ Mapping(required=[])
+ Object for defining datetime in Vega-Lite Filter.
+ If both month and quarter are provided, month has higher precedence.
+ ``day`` cannot be combined with other date.
+ We accept string for month and day names.
+
+ Attributes
+ ----------
+
+ date : float
+ Integer value representing the date from 1-31.
+ day : anyOf(:class:`Day`, string)
+ Value representing the day of a week. This can be one of: (1) integer value --
+ ``1`` represents Monday; (2) case-insensitive day name (e.g., ``"Monday"`` ); (3)
+ case-insensitive, 3-character short day name (e.g., ``"Mon"`` ). :raw-html:`<br/>`
+ **Warning:** A DateTime definition object with ``day`` ** should not be combined
+ with ``year``, ``quarter``, ``month``, or ``date``.
+ hours : float
+ Integer value representing the hour of a day from 0-23.
+ milliseconds : float
+ Integer value representing the millisecond segment of time.
+ minutes : float
+ Integer value representing the minute segment of time from 0-59.
+ month : anyOf(:class:`Month`, string)
+ One of: (1) integer value representing the month from ``1`` - ``12``. ``1``
+ represents January; (2) case-insensitive month name (e.g., ``"January"`` ); (3)
+ case-insensitive, 3-character short month name (e.g., ``"Jan"`` ).
+ quarter : float
+ Integer value representing the quarter of the year (from 1-4).
+ seconds : float
+ Integer value representing the second segment (0-59) of a time value
+ utc : boolean
+ A boolean flag indicating if date time is in utc time. If false, the date time is in
+ local time
+ year : float
+ Integer value representing the year.
+ """
+ _schema = {'$ref': '#/definitions/DateTime'}
+
+ def __init__(self, date=Undefined, day=Undefined, hours=Undefined, milliseconds=Undefined,
+ minutes=Undefined, month=Undefined, quarter=Undefined, seconds=Undefined,
+ utc=Undefined, year=Undefined, **kwds):
+ super(DateTime, self).__init__(date=date, day=day, hours=hours, milliseconds=milliseconds,
+ minutes=minutes, month=month, quarter=quarter, seconds=seconds,
+ utc=utc, year=year, **kwds)
+
+
+class SelectionInitInterval(VegaLiteSchema):
+ """SelectionInitInterval schema wrapper
+
+ anyOf(List([boolean, boolean]), List([float, float]), List([string, string]),
+ List([:class:`DateTime`, :class:`DateTime`]))
+ """
+ _schema = {'$ref': '#/definitions/SelectionInitInterval'}
+
+ def __init__(self, *args, **kwds):
+ super(SelectionInitInterval, self).__init__(*args, **kwds)
+
+
+class SelectionInitIntervalMapping(VegaLiteSchema):
+ """SelectionInitIntervalMapping schema wrapper
+
+ Mapping(required=[])
+ """
+ _schema = {'$ref': '#/definitions/SelectionInitIntervalMapping'}
+
+ def __init__(self, **kwds):
+ super(SelectionInitIntervalMapping, self).__init__(**kwds)
+
+
+class SelectionInitMapping(VegaLiteSchema):
+ """SelectionInitMapping schema wrapper
+
+ Mapping(required=[])
+ """
+ _schema = {'$ref': '#/definitions/SelectionInitMapping'}
+
+ def __init__(self, **kwds):
+ super(SelectionInitMapping, self).__init__(**kwds)
+
+
+class SelectionOperand(VegaLiteSchema):
+ """SelectionOperand schema wrapper
+
+ anyOf(:class:`SelectionNot`, :class:`SelectionAnd`, :class:`SelectionOr`, string)
+ """
+ _schema = {'$ref': '#/definitions/SelectionOperand'}
+
+ def __init__(self, *args, **kwds):
+ super(SelectionOperand, self).__init__(*args, **kwds)
+
+
+class SelectionAnd(SelectionOperand):
+ """SelectionAnd schema wrapper
+
+ Mapping(required=[and])
+
+ Attributes
+ ----------
+
+ and : List(:class:`SelectionOperand`)
+
+ """
+ _schema = {'$ref': '#/definitions/SelectionAnd'}
+
+ def __init__(self, **kwds):
+ super(SelectionAnd, self).__init__(**kwds)
+
+
+class SelectionNot(SelectionOperand):
+ """SelectionNot schema wrapper
+
+ Mapping(required=[not])
+
+ Attributes
+ ----------
+
+ not : :class:`SelectionOperand`
+
+ """
+ _schema = {'$ref': '#/definitions/SelectionNot'}
+
+ def __init__(self, **kwds):
+ super(SelectionNot, self).__init__(**kwds)
+
+
+class SelectionOr(SelectionOperand):
+ """SelectionOr schema wrapper
+
+ Mapping(required=[or])
+
+ Attributes
+ ----------
+
+ or : List(:class:`SelectionOperand`)
+
+ """
+ _schema = {'$ref': '#/definitions/SelectionOr'}
+
+ def __init__(self, **kwds):
+ super(SelectionOr, self).__init__(**kwds)
+
+
+class SelectionPredicate(Predicate):
+ """SelectionPredicate schema wrapper
+
+ Mapping(required=[selection])
+
+ Attributes
+ ----------
+
+ selection : :class:`SelectionOperand`
+ Filter using a selection name.
+ """
+ _schema = {'$ref': '#/definitions/SelectionPredicate'}
+
+ def __init__(self, selection=Undefined, **kwds):
+ super(SelectionPredicate, self).__init__(selection=selection, **kwds)
+
+
+class SelectionResolution(VegaLiteSchema):
+ """SelectionResolution schema wrapper
+
+ enum('global', 'union', 'intersect')
+ """
+ _schema = {'$ref': '#/definitions/SelectionResolution'}
+
+ def __init__(self, *args):
+ super(SelectionResolution, self).__init__(*args)
+
+
+class SequenceGenerator(Generator):
+ """SequenceGenerator schema wrapper
+
+ Mapping(required=[sequence])
+
+ Attributes
+ ----------
+
+ sequence : :class:`SequenceParams`
+ Generate a sequence of numbers.
+ name : string
+ Provide a placeholder name and bind data at runtime.
+ """
+ _schema = {'$ref': '#/definitions/SequenceGenerator'}
+
+ def __init__(self, sequence=Undefined, name=Undefined, **kwds):
+ super(SequenceGenerator, self).__init__(sequence=sequence, name=name, **kwds)
+
+
+class SequenceParams(VegaLiteSchema):
+ """SequenceParams schema wrapper
+
+ Mapping(required=[start, stop])
+
+ Attributes
+ ----------
+
+ start : float
+ The starting value of the sequence (inclusive).
+ stop : float
+ The ending value of the sequence (exclusive).
+ step : float
+ The step value between sequence entries.
+
+ **Default value:** ``1``
+ as : :class:`FieldName`
+ The name of the generated sequence field.
+
+ **Default value:** ``"data"``
+ """
+ _schema = {'$ref': '#/definitions/SequenceParams'}
+
+ def __init__(self, start=Undefined, stop=Undefined, step=Undefined, **kwds):
+ super(SequenceParams, self).__init__(start=start, stop=stop, step=step, **kwds)
+
+
+class ShapeFieldDefWithCondition(VegaLiteSchema):
+ """ShapeFieldDefWithCondition schema wrapper
+
+ Mapping(required=[type])
+ A FieldDef with Condition :raw-html:`<ValueDef>`
+
+ Attributes
+ ----------
+
+ type : :class:`TypeForShape`
+ The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``,
+ ``"ordinal"``, or ``"nominal"`` ).
+ It can also be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ **Note:**
+
+
+ * Data values for a temporal field can be either a date-time string (e.g.,
+ ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a
+ timestamp number (e.g., ``1552199579097`` ).
+ * Data ``type`` describes the semantics of the data rather than the primitive data
+ types ( ``number``, ``string``, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data.
+ * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
+ or `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `timeUnit
+ <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
+ can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using
+ an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
+ refers to the post-aggregation data type. For example, we can calculate count
+ ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
+ "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output
+ is ``"quantitative"``.
+ * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have
+ ``type`` as they have exactly the same type as their primary channels (e.g.,
+ ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ condition : anyOf(:class:`ConditionalStringValueDef`,
+ List(:class:`ConditionalStringValueDef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ legend : anyOf(:class:`Legend`, None)
+ An object defining properties of the legend.
+ If ``null``, the legend for the encoding channel will be removed.
+
+ **Default value:** If undefined, default `legend properties
+ <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.
+
+ **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
+ documentation.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ sort : :class:`Sort`
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following:
+
+
+ * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
+ Javascript.
+ * `A sort-by-encoding definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ for sorting
+ by another encoding channel. (This type of sort definition is not available for
+ ``row`` and ``column`` channels.)
+ * `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field.
+ * `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values
+ in their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ).
+ * ``null`` indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` is not supported for ``row`` and ``column``.
+
+ **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
+ documentation.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ """
+ _schema = {'$ref': '#/definitions/ShapeFieldDefWithCondition'}
+
+ def __init__(self, type=Undefined, aggregate=Undefined, bin=Undefined, condition=Undefined,
+ field=Undefined, legend=Undefined, scale=Undefined, sort=Undefined, timeUnit=Undefined,
+ title=Undefined, **kwds):
+ super(ShapeFieldDefWithCondition, self).__init__(type=type, aggregate=aggregate, bin=bin,
+ condition=condition, field=field,
+ legend=legend, scale=scale, sort=sort,
+ timeUnit=timeUnit, title=title, **kwds)
+
+
+class ShapeValueDefWithCondition(VegaLiteSchema):
+ """ShapeValueDefWithCondition schema wrapper
+
+ Mapping(required=[])
+ A ValueDef with Condition<ValueDef | FieldDef> where either the condition or the value are
+ optional.
+
+ Attributes
+ ----------
+
+ condition : anyOf(:class:`ConditionalMarkPropFieldDefTypeForShape`,
+ :class:`ConditionalStringValueDef`, List(:class:`ConditionalStringValueDef`))
+ A field definition or one or more value definition(s) with a selection predicate.
+ value : anyOf(string, None)
+ A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values
+ between ``0`` to ``1`` for opacity).
+ """
+ _schema = {'$ref': '#/definitions/ShapeValueDefWithCondition'}
+
+ def __init__(self, condition=Undefined, value=Undefined, **kwds):
+ super(ShapeValueDefWithCondition, self).__init__(condition=condition, value=value, **kwds)
+
+
+class SignalRef(LayoutBounds):
+ """SignalRef schema wrapper
+
+ Mapping(required=[signal])
+
+ Attributes
+ ----------
+
+ signal : string
+
+ """
+ _schema = {'$ref': '#/definitions/SignalRef'}
+
+ def __init__(self, signal=Undefined, **kwds):
+ super(SignalRef, self).__init__(signal=signal, **kwds)
+
+
+class SingleDefUnitChannel(VegaLiteSchema):
+ """SingleDefUnitChannel schema wrapper
+
+ enum('x', 'y', 'x2', 'y2', 'longitude', 'latitude', 'longitude2', 'latitude2', 'color',
+ 'fill', 'stroke', 'opacity', 'fillOpacity', 'strokeOpacity', 'strokeWidth', 'size', 'shape',
+ 'key', 'text', 'tooltip', 'href')
+ """
+ _schema = {'$ref': '#/definitions/SingleDefUnitChannel'}
+
+ def __init__(self, *args):
+ super(SingleDefUnitChannel, self).__init__(*args)
+
+
+class SingleSelection(SelectionDef):
+ """SingleSelection schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : enum('single')
+ Determines the default event processing and data query for the selection. Vega-Lite
+ currently supports three selection types:
+
+
+ * ``single`` -- to select a single discrete data value on ``click``.
+ * ``multi`` -- to select multiple discrete data value; the first value is selected
+ on ``click`` and additional values toggled on shift- ``click``.
+ * ``interval`` -- to select a continuous range of data values on ``drag``.
+ bind : anyOf(:class:`Binding`, Mapping(required=[]))
+ Establish a two-way binding between a single selection and input elements
+ (also known as dynamic query widgets). A binding takes the form of
+ Vega's `input element binding definition
+ <https://vega.github.io/vega/docs/signals/#bind>`__
+ or can be a mapping between projected field/encodings and binding definitions.
+
+ **See also:** `bind <https://vega.github.io/vega-lite/docs/bind.html>`__
+ documentation.
+ clear : anyOf(:class:`EventStream`, boolean)
+ Clears the selection, emptying it of all values. Can be an
+ `EventStream <https://vega.github.io/vega/docs/event-streams/>`__ or ``false`` to
+ disable.
+
+ **Default value:** ``dblclick``.
+
+ **See also:** `clear <https://vega.github.io/vega-lite/docs/clear.html>`__
+ documentation.
+ empty : enum('all', 'none')
+ By default, ``all`` data values are considered to lie within an empty selection.
+ When set to ``none``, empty selections contain no data values.
+ encodings : List(:class:`SingleDefUnitChannel`)
+ An array of encoding channels. The corresponding data field values
+ must match for a data tuple to fall within the selection.
+
+ **See also:** `encodings <https://vega.github.io/vega-lite/docs/project.html>`__
+ documentation.
+ fields : List(:class:`FieldName`)
+ An array of field names whose values must match for a data tuple to
+ fall within the selection.
+
+ **See also:** `fields <https://vega.github.io/vega-lite/docs/project.html>`__
+ documentation.
+ init : :class:`SelectionInitMapping`
+ Initialize the selection with a mapping between `projected channels or field names
+ <https://vega.github.io/vega-lite/docs/project.html>`__ and initial values.
+
+ **See also:** `init <https://vega.github.io/vega-lite/docs/init.html>`__
+ documentation.
+ nearest : boolean
+ When true, an invisible voronoi diagram is computed to accelerate discrete
+ selection. The data value *nearest* the mouse cursor is added to the selection.
+
+ **See also:** `nearest <https://vega.github.io/vega-lite/docs/nearest.html>`__
+ documentation.
+ on : :class:`EventStream`
+ A `Vega event stream <https://vega.github.io/vega/docs/event-streams/>`__ (object or
+ selector) that triggers the selection.
+ For interval selections, the event stream must specify a `start and end
+ <https://vega.github.io/vega/docs/event-streams/#between-filters>`__.
+ resolve : :class:`SelectionResolution`
+ With layered and multi-view displays, a strategy that determines how
+ selections' data queries are resolved when applied in a filter transform,
+ conditional encoding rule, or scale domain.
+
+ **See also:** `resolve
+ <https://vega.github.io/vega-lite/docs/selection-resolve.html>`__ documentation.
+ """
+ _schema = {'$ref': '#/definitions/SingleSelection'}
+
+ def __init__(self, type=Undefined, bind=Undefined, clear=Undefined, empty=Undefined,
+ encodings=Undefined, fields=Undefined, init=Undefined, nearest=Undefined, on=Undefined,
+ resolve=Undefined, **kwds):
+ super(SingleSelection, self).__init__(type=type, bind=bind, clear=clear, empty=empty,
+ encodings=encodings, fields=fields, init=init,
+ nearest=nearest, on=on, resolve=resolve, **kwds)
+
+
+class SingleSelectionConfig(VegaLiteSchema):
+ """SingleSelectionConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ bind : anyOf(:class:`Binding`, Mapping(required=[]))
+ Establish a two-way binding between a single selection and input elements
+ (also known as dynamic query widgets). A binding takes the form of
+ Vega's `input element binding definition
+ <https://vega.github.io/vega/docs/signals/#bind>`__
+ or can be a mapping between projected field/encodings and binding definitions.
+
+ **See also:** `bind <https://vega.github.io/vega-lite/docs/bind.html>`__
+ documentation.
+ clear : anyOf(:class:`EventStream`, boolean)
+ Clears the selection, emptying it of all values. Can be an
+ `EventStream <https://vega.github.io/vega/docs/event-streams/>`__ or ``false`` to
+ disable.
+
+ **Default value:** ``dblclick``.
+
+ **See also:** `clear <https://vega.github.io/vega-lite/docs/clear.html>`__
+ documentation.
+ empty : enum('all', 'none')
+ By default, ``all`` data values are considered to lie within an empty selection.
+ When set to ``none``, empty selections contain no data values.
+ encodings : List(:class:`SingleDefUnitChannel`)
+ An array of encoding channels. The corresponding data field values
+ must match for a data tuple to fall within the selection.
+
+ **See also:** `encodings <https://vega.github.io/vega-lite/docs/project.html>`__
+ documentation.
+ fields : List(:class:`FieldName`)
+ An array of field names whose values must match for a data tuple to
+ fall within the selection.
+
+ **See also:** `fields <https://vega.github.io/vega-lite/docs/project.html>`__
+ documentation.
+ init : :class:`SelectionInitMapping`
+ Initialize the selection with a mapping between `projected channels or field names
+ <https://vega.github.io/vega-lite/docs/project.html>`__ and initial values.
+
+ **See also:** `init <https://vega.github.io/vega-lite/docs/init.html>`__
+ documentation.
+ nearest : boolean
+ When true, an invisible voronoi diagram is computed to accelerate discrete
+ selection. The data value *nearest* the mouse cursor is added to the selection.
+
+ **See also:** `nearest <https://vega.github.io/vega-lite/docs/nearest.html>`__
+ documentation.
+ on : :class:`EventStream`
+ A `Vega event stream <https://vega.github.io/vega/docs/event-streams/>`__ (object or
+ selector) that triggers the selection.
+ For interval selections, the event stream must specify a `start and end
+ <https://vega.github.io/vega/docs/event-streams/#between-filters>`__.
+ resolve : :class:`SelectionResolution`
+ With layered and multi-view displays, a strategy that determines how
+ selections' data queries are resolved when applied in a filter transform,
+ conditional encoding rule, or scale domain.
+
+ **See also:** `resolve
+ <https://vega.github.io/vega-lite/docs/selection-resolve.html>`__ documentation.
+ """
+ _schema = {'$ref': '#/definitions/SingleSelectionConfig'}
+
+ def __init__(self, bind=Undefined, clear=Undefined, empty=Undefined, encodings=Undefined,
+ fields=Undefined, init=Undefined, nearest=Undefined, on=Undefined, resolve=Undefined,
+ **kwds):
+ super(SingleSelectionConfig, self).__init__(bind=bind, clear=clear, empty=empty,
+ encodings=encodings, fields=fields, init=init,
+ nearest=nearest, on=on, resolve=resolve, **kwds)
+
+
+class Sort(VegaLiteSchema):
+ """Sort schema wrapper
+
+ anyOf(:class:`SortArray`, :class:`SortOrder`, :class:`EncodingSortField`,
+ :class:`SortByEncoding`, None)
+ """
+ _schema = {'$ref': '#/definitions/Sort'}
+
+ def __init__(self, *args, **kwds):
+ super(Sort, self).__init__(*args, **kwds)
+
+
+class EncodingSortField(Sort):
+ """EncodingSortField schema wrapper
+
+ Mapping(required=[])
+ A sort definition for sorting a discrete scale in an encoding field definition.
+
+ Attributes
+ ----------
+
+ field : :class:`Field`
+ The data `field <https://vega.github.io/vega-lite/docs/field.html>`__ to sort by.
+
+ **Default value:** If unspecified, defaults to the field specified in the outer data
+ reference.
+ op : :class:`AggregateOp`
+ An `aggregate operation
+ <https://vega.github.io/vega-lite/docs/aggregate.html#ops>`__ to perform on the
+ field prior to sorting (e.g., ``"count"``, ``"mean"`` and ``"median"`` ).
+ An aggregation is required when there are multiple values of the sort field for each
+ encoded data field.
+ The input data objects will be aggregated, grouped by the encoded data field.
+
+ For a full list of operations, please see the documentation for `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html#ops>`__.
+
+ **Default value:** ``"sum"`` for stacked plots. Otherwise, ``"mean"``.
+ order : anyOf(:class:`SortOrder`, None)
+ The sort order. One of ``"ascending"`` (default), ``"descending"``, or ``null`` (no
+ not sort).
+ """
+ _schema = {'$ref': '#/definitions/EncodingSortField'}
+
+ def __init__(self, field=Undefined, op=Undefined, order=Undefined, **kwds):
+ super(EncodingSortField, self).__init__(field=field, op=op, order=order, **kwds)
+
+
+class SortArray(Sort):
+ """SortArray schema wrapper
+
+ anyOf(List(float), List(string), List(boolean), List(:class:`DateTime`))
+ """
+ _schema = {'$ref': '#/definitions/SortArray'}
+
+ def __init__(self, *args, **kwds):
+ super(SortArray, self).__init__(*args, **kwds)
+
+
+class SortByEncoding(Sort):
+ """SortByEncoding schema wrapper
+
+ Mapping(required=[encoding])
+
+ Attributes
+ ----------
+
+ encoding : :class:`SingleDefUnitChannel`
+ The `encoding channel
+ <https://vega.github.io/vega-lite/docs/encoding.html#channels>`__ to sort by (e.g.,
+ ``"x"``, ``"y"`` )
+ order : anyOf(:class:`SortOrder`, None)
+ The sort order. One of ``"ascending"`` (default), ``"descending"``, or ``null`` (no
+ not sort).
+ """
+ _schema = {'$ref': '#/definitions/SortByEncoding'}
+
+ def __init__(self, encoding=Undefined, order=Undefined, **kwds):
+ super(SortByEncoding, self).__init__(encoding=encoding, order=order, **kwds)
+
+
+class SortField(VegaLiteSchema):
+ """SortField schema wrapper
+
+ Mapping(required=[field])
+ A sort definition for transform
+
+ Attributes
+ ----------
+
+ field : :class:`FieldName`
+ The name of the field to sort.
+ order : anyOf(:class:`SortOrder`, None)
+ Whether to sort the field in ascending or descending order. One of ``"ascending"``
+ (default), ``"descending"``, or ``null`` (no not sort).
+ """
+ _schema = {'$ref': '#/definitions/SortField'}
+
+ def __init__(self, field=Undefined, order=Undefined, **kwds):
+ super(SortField, self).__init__(field=field, order=order, **kwds)
+
+
+class SortOrder(Sort):
+ """SortOrder schema wrapper
+
+ enum('ascending', 'descending')
+ """
+ _schema = {'$ref': '#/definitions/SortOrder'}
+
+ def __init__(self, *args):
+ super(SortOrder, self).__init__(*args)
+
+
+class Spec(VegaLiteSchema):
+ """Spec schema wrapper
+
+ anyOf(:class:`FacetedUnitSpec`, :class:`LayerSpec`, :class:`FacetSpec`, :class:`RepeatSpec`,
+ :class:`ConcatSpec`, :class:`VConcatSpec`, :class:`HConcatSpec`)
+ Any specification in Vega-Lite.
+ """
+ _schema = {'$ref': '#/definitions/Spec'}
+
+ def __init__(self, *args, **kwds):
+ super(Spec, self).__init__(*args, **kwds)
+
+
+class ConcatSpec(Spec):
+ """ConcatSpec schema wrapper
+
+ Mapping(required=[concat])
+ Base interface for a generalized concatenation specification.
+
+ Attributes
+ ----------
+
+ concat : List(:class:`Spec`)
+ A list of views to be concatenated.
+ align : anyOf(:class:`LayoutAlign`, :class:`RowColLayoutAlign`)
+ The alignment to apply to grid rows and columns.
+ The supported string values are ``"all"``, ``"each"``, and ``"none"``.
+
+
+ * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply
+ placed one after the other.
+ * For ``"each"``, subviews will be aligned into a clean grid structure, but each row
+ or column may be of variable size.
+ * For ``"all"``, subviews will be aligned and each row or column will be sized
+ identically based on the maximum observed size. String values for this property
+ will be applied to both grid rows and columns.
+
+ Alternatively, an object value of the form ``{"row": string, "column": string}`` can
+ be used to supply different alignments for rows and columns.
+
+ **Default value:** ``"all"``.
+ bounds : enum('full', 'flush')
+ The bounds calculation method to use for determining the extent of a sub-plot. One
+ of ``full`` (the default) or ``flush``.
+
+
+ * If set to ``full``, the entire calculated bounds (including axes, title, and
+ legend) will be used.
+ * If set to ``flush``, only the specified width and height values for the sub-view
+ will be used. The ``flush`` setting can be useful when attempting to place
+ sub-plots without axes or legends into a uniform grid structure.
+
+ **Default value:** ``"full"``
+ center : anyOf(boolean, :class:`RowColboolean`)
+ Boolean flag indicating if subviews should be centered relative to their respective
+ rows or columns.
+
+ An object value of the form ``{"row": boolean, "column": boolean}`` can be used to
+ supply different centering values for rows and columns.
+
+ **Default value:** ``false``
+ columns : float
+ The number of columns to include in the view composition layout.
+
+ **Default value** : ``undefined`` -- An infinite number of columns (a single row)
+ will be assumed. This is equivalent to
+ ``hconcat`` (for ``concat`` ) and to using the ``column`` channel (for ``facet`` and
+ ``repeat`` ).
+
+ **Note** :
+
+ 1) This property is only for:
+
+
+ * the general (wrappable) ``concat`` operator (not ``hconcat`` / ``vconcat`` )
+ * the ``facet`` and ``repeat`` operator with one field/repetition definition
+ (without row/column nesting)
+
+ 2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat`` )
+ and to using the ``row`` channel (for ``facet`` and ``repeat`` ).
+ data : anyOf(:class:`Data`, None)
+ An object describing the data source. Set to ``null`` to ignore the parent's data
+ source. If no data is set, it is derived from the parent.
+ description : string
+ Description of this mark for commenting purpose.
+ name : string
+ Name of the visualization for later reference.
+ resolve : :class:`Resolve`
+ Scale, axis, and legend resolutions for view composition specifications.
+ spacing : anyOf(float, :class:`RowColnumber`)
+ The spacing in pixels between sub-views of the composition operator.
+ An object of the form ``{"row": number, "column": number}`` can be used to set
+ different spacing values for rows and columns.
+
+ **Default value** : Depends on ``"spacing"`` property of `the view composition
+ configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__ (
+ ``20`` by default)
+ title : anyOf(string, :class:`TitleParams`)
+ Title for the plot.
+ transform : List(:class:`Transform`)
+ An array of data transformations such as filter and new field calculation.
+ """
+ _schema = {'$ref': '#/definitions/ConcatSpec'}
+
+ def __init__(self, concat=Undefined, align=Undefined, bounds=Undefined, center=Undefined,
+ columns=Undefined, data=Undefined, description=Undefined, name=Undefined,
+ resolve=Undefined, spacing=Undefined, title=Undefined, transform=Undefined, **kwds):
+ super(ConcatSpec, self).__init__(concat=concat, align=align, bounds=bounds, center=center,
+ columns=columns, data=data, description=description, name=name,
+ resolve=resolve, spacing=spacing, title=title,
+ transform=transform, **kwds)
+
+
+class FacetSpec(Spec):
+ """FacetSpec schema wrapper
+
+ Mapping(required=[facet, spec])
+ Base interface for a facet specification.
+
+ Attributes
+ ----------
+
+ facet : anyOf(:class:`FacetFieldDef`, :class:`FacetMapping`)
+ Definition for how to facet the data. One of:
+ 1) `a field definition for faceting the plot by one field
+ <https://vega.github.io/vega-lite/docs/facet.html#field-def>`__
+ 2) `An object that maps row and column channels to their field definitions
+ <https://vega.github.io/vega-lite/docs/facet.html#mapping>`__
+ spec : anyOf(:class:`LayerSpec`, :class:`FacetedUnitSpec`)
+ A specification of the view that gets faceted.
+ align : anyOf(:class:`LayoutAlign`, :class:`RowColLayoutAlign`)
+ The alignment to apply to grid rows and columns.
+ The supported string values are ``"all"``, ``"each"``, and ``"none"``.
+
+
+ * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply
+ placed one after the other.
+ * For ``"each"``, subviews will be aligned into a clean grid structure, but each row
+ or column may be of variable size.
+ * For ``"all"``, subviews will be aligned and each row or column will be sized
+ identically based on the maximum observed size. String values for this property
+ will be applied to both grid rows and columns.
+
+ Alternatively, an object value of the form ``{"row": string, "column": string}`` can
+ be used to supply different alignments for rows and columns.
+
+ **Default value:** ``"all"``.
+ bounds : enum('full', 'flush')
+ The bounds calculation method to use for determining the extent of a sub-plot. One
+ of ``full`` (the default) or ``flush``.
+
+
+ * If set to ``full``, the entire calculated bounds (including axes, title, and
+ legend) will be used.
+ * If set to ``flush``, only the specified width and height values for the sub-view
+ will be used. The ``flush`` setting can be useful when attempting to place
+ sub-plots without axes or legends into a uniform grid structure.
+
+ **Default value:** ``"full"``
+ center : anyOf(boolean, :class:`RowColboolean`)
+ Boolean flag indicating if subviews should be centered relative to their respective
+ rows or columns.
+
+ An object value of the form ``{"row": boolean, "column": boolean}`` can be used to
+ supply different centering values for rows and columns.
+
+ **Default value:** ``false``
+ columns : float
+ The number of columns to include in the view composition layout.
+
+ **Default value** : ``undefined`` -- An infinite number of columns (a single row)
+ will be assumed. This is equivalent to
+ ``hconcat`` (for ``concat`` ) and to using the ``column`` channel (for ``facet`` and
+ ``repeat`` ).
+
+ **Note** :
+
+ 1) This property is only for:
+
+
+ * the general (wrappable) ``concat`` operator (not ``hconcat`` / ``vconcat`` )
+ * the ``facet`` and ``repeat`` operator with one field/repetition definition
+ (without row/column nesting)
+
+ 2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat`` )
+ and to using the ``row`` channel (for ``facet`` and ``repeat`` ).
+ data : anyOf(:class:`Data`, None)
+ An object describing the data source. Set to ``null`` to ignore the parent's data
+ source. If no data is set, it is derived from the parent.
+ description : string
+ Description of this mark for commenting purpose.
+ name : string
+ Name of the visualization for later reference.
+ resolve : :class:`Resolve`
+ Scale, axis, and legend resolutions for view composition specifications.
+ spacing : anyOf(float, :class:`RowColnumber`)
+ The spacing in pixels between sub-views of the composition operator.
+ An object of the form ``{"row": number, "column": number}`` can be used to set
+ different spacing values for rows and columns.
+
+ **Default value** : Depends on ``"spacing"`` property of `the view composition
+ configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__ (
+ ``20`` by default)
+ title : anyOf(string, :class:`TitleParams`)
+ Title for the plot.
+ transform : List(:class:`Transform`)
+ An array of data transformations such as filter and new field calculation.
+ """
+ _schema = {'$ref': '#/definitions/FacetSpec'}
+
+ def __init__(self, facet=Undefined, spec=Undefined, align=Undefined, bounds=Undefined,
+ center=Undefined, columns=Undefined, data=Undefined, description=Undefined,
+ name=Undefined, resolve=Undefined, spacing=Undefined, title=Undefined,
+ transform=Undefined, **kwds):
+ super(FacetSpec, self).__init__(facet=facet, spec=spec, align=align, bounds=bounds,
+ center=center, columns=columns, data=data,
+ description=description, name=name, resolve=resolve,
+ spacing=spacing, title=title, transform=transform, **kwds)
+
+
+class FacetedUnitSpec(Spec):
+ """FacetedUnitSpec schema wrapper
+
+ Mapping(required=[mark])
+ Unit spec that can have a composite mark and row or column channels (shorthand for a facet
+ spec).
+
+ Attributes
+ ----------
+
+ mark : :class:`AnyMark`
+ A string describing the mark type (one of ``"bar"``, ``"circle"``, ``"square"``,
+ ``"tick"``, ``"line"``,
+ ``"area"``, ``"point"``, ``"rule"``, ``"geoshape"``, and ``"text"`` ) or a `mark
+ definition object <https://vega.github.io/vega-lite/docs/mark.html#mark-def>`__.
+ align : anyOf(:class:`LayoutAlign`, :class:`RowColLayoutAlign`)
+ The alignment to apply to grid rows and columns.
+ The supported string values are ``"all"``, ``"each"``, and ``"none"``.
+
+
+ * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply
+ placed one after the other.
+ * For ``"each"``, subviews will be aligned into a clean grid structure, but each row
+ or column may be of variable size.
+ * For ``"all"``, subviews will be aligned and each row or column will be sized
+ identically based on the maximum observed size. String values for this property
+ will be applied to both grid rows and columns.
+
+ Alternatively, an object value of the form ``{"row": string, "column": string}`` can
+ be used to supply different alignments for rows and columns.
+
+ **Default value:** ``"all"``.
+ bounds : enum('full', 'flush')
+ The bounds calculation method to use for determining the extent of a sub-plot. One
+ of ``full`` (the default) or ``flush``.
+
+
+ * If set to ``full``, the entire calculated bounds (including axes, title, and
+ legend) will be used.
+ * If set to ``flush``, only the specified width and height values for the sub-view
+ will be used. The ``flush`` setting can be useful when attempting to place
+ sub-plots without axes or legends into a uniform grid structure.
+
+ **Default value:** ``"full"``
+ center : anyOf(boolean, :class:`RowColboolean`)
+ Boolean flag indicating if subviews should be centered relative to their respective
+ rows or columns.
+
+ An object value of the form ``{"row": boolean, "column": boolean}`` can be used to
+ supply different centering values for rows and columns.
+
+ **Default value:** ``false``
+ columns : float
+ The number of columns to include in the view composition layout.
+
+ **Default value** : ``undefined`` -- An infinite number of columns (a single row)
+ will be assumed. This is equivalent to
+ ``hconcat`` (for ``concat`` ) and to using the ``column`` channel (for ``facet`` and
+ ``repeat`` ).
+
+ **Note** :
+
+ 1) This property is only for:
+
+
+ * the general (wrappable) ``concat`` operator (not ``hconcat`` / ``vconcat`` )
+ * the ``facet`` and ``repeat`` operator with one field/repetition definition
+ (without row/column nesting)
+
+ 2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat`` )
+ and to using the ``row`` channel (for ``facet`` and ``repeat`` ).
+ data : anyOf(:class:`Data`, None)
+ An object describing the data source. Set to ``null`` to ignore the parent's data
+ source. If no data is set, it is derived from the parent.
+ description : string
+ Description of this mark for commenting purpose.
+ encoding : :class:`FacetedEncoding`
+ A key-value mapping between encoding channels and definition of fields.
+ height : float
+ The height of a visualization.
+
+ **Default value:**
+
+
+ * If a view's `autosize
+ <https://vega.github.io/vega-lite/docs/size.html#autosize>`__ type is ``"fit"`` or
+ its y-channel has a `continuous scale
+ <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__, the height will
+ be the value of `config.view.height
+ <https://vega.github.io/vega-lite/docs/spec.html#config>`__.
+ * For y-axis with a band or point scale: if `rangeStep
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__ is a numeric value or
+ unspecified, the height is `determined by the range step, paddings, and the
+ cardinality of the field mapped to y-channel
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__. Otherwise, if the
+ ``rangeStep`` is ``null``, the height will be the value of `config.view.height
+ <https://vega.github.io/vega-lite/docs/spec.html#config>`__.
+ * If no field is mapped to ``y`` channel, the ``height`` will be the value of
+ ``rangeStep``.
+
+ **Note** : For plots with `row and column channels
+ <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the
+ height of a single view.
+
+ **See also:** The documentation for `width and height
+ <https://vega.github.io/vega-lite/docs/size.html>`__ contains more examples.
+ name : string
+ Name of the visualization for later reference.
+ projection : :class:`Projection`
+ An object defining properties of geographic projection, which will be applied to
+ ``shape`` path for ``"geoshape"`` marks
+ and to ``latitude`` and ``"longitude"`` channels for other marks.
+ resolve : :class:`Resolve`
+ Scale, axis, and legend resolutions for view composition specifications.
+ selection : Mapping(required=[])
+ A key-value mapping between selection names and definitions.
+ spacing : anyOf(float, :class:`RowColnumber`)
+ The spacing in pixels between sub-views of the composition operator.
+ An object of the form ``{"row": number, "column": number}`` can be used to set
+ different spacing values for rows and columns.
+
+ **Default value** : Depends on ``"spacing"`` property of `the view composition
+ configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__ (
+ ``20`` by default)
+ title : anyOf(string, :class:`TitleParams`)
+ Title for the plot.
+ transform : List(:class:`Transform`)
+ An array of data transformations such as filter and new field calculation.
+ view : :class:`ViewBackground`
+ An object defining the view background's fill and stroke.
+
+ **Default value:** none (transparent)
+ width : float
+ The width of a visualization.
+
+ **Default value:** This will be determined by the following rules:
+
+
+ * If a view's `autosize
+ <https://vega.github.io/vega-lite/docs/size.html#autosize>`__ type is ``"fit"`` or
+ its x-channel has a `continuous scale
+ <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__, the width will
+ be the value of `config.view.width
+ <https://vega.github.io/vega-lite/docs/spec.html#config>`__.
+ * For x-axis with a band or point scale: if `rangeStep
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__ is a numeric value or
+ unspecified, the width is `determined by the range step, paddings, and the
+ cardinality of the field mapped to x-channel
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__. Otherwise, if the
+ ``rangeStep`` is ``null``, the width will be the value of `config.view.width
+ <https://vega.github.io/vega-lite/docs/spec.html#config>`__.
+ * If no field is mapped to ``x`` channel, the ``width`` will be the value of
+ `config.scale.textXRangeStep
+ <https://vega.github.io/vega-lite/docs/size.html#default-width-and-height>`__ for
+ ``text`` mark and the value of ``rangeStep`` for other marks.
+
+ **Note:** For plots with `row and column channels
+ <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the
+ width of a single view.
+
+ **See also:** The documentation for `width and height
+ <https://vega.github.io/vega-lite/docs/size.html>`__ contains more examples.
+ """
+ _schema = {'$ref': '#/definitions/FacetedUnitSpec'}
+
+ def __init__(self, mark=Undefined, align=Undefined, bounds=Undefined, center=Undefined,
+ columns=Undefined, data=Undefined, description=Undefined, encoding=Undefined,
+ height=Undefined, name=Undefined, projection=Undefined, resolve=Undefined,
+ selection=Undefined, spacing=Undefined, title=Undefined, transform=Undefined,
+ view=Undefined, width=Undefined, **kwds):
+ super(FacetedUnitSpec, self).__init__(mark=mark, align=align, bounds=bounds, center=center,
+ columns=columns, data=data, description=description,
+ encoding=encoding, height=height, name=name,
+ projection=projection, resolve=resolve,
+ selection=selection, spacing=spacing, title=title,
+ transform=transform, view=view, width=width, **kwds)
+
+
+class HConcatSpec(Spec):
+ """HConcatSpec schema wrapper
+
+ Mapping(required=[hconcat])
+ Base interface for a horizontal concatenation specification.
+
+ Attributes
+ ----------
+
+ hconcat : List(:class:`Spec`)
+ A list of views to be concatenated and put into a row.
+ bounds : enum('full', 'flush')
+ The bounds calculation method to use for determining the extent of a sub-plot. One
+ of ``full`` (the default) or ``flush``.
+
+
+ * If set to ``full``, the entire calculated bounds (including axes, title, and
+ legend) will be used.
+ * If set to ``flush``, only the specified width and height values for the sub-view
+ will be used. The ``flush`` setting can be useful when attempting to place
+ sub-plots without axes or legends into a uniform grid structure.
+
+ **Default value:** ``"full"``
+ center : boolean
+ Boolean flag indicating if subviews should be centered relative to their respective
+ rows or columns.
+
+ **Default value:** ``false``
+ data : anyOf(:class:`Data`, None)
+ An object describing the data source. Set to ``null`` to ignore the parent's data
+ source. If no data is set, it is derived from the parent.
+ description : string
+ Description of this mark for commenting purpose.
+ name : string
+ Name of the visualization for later reference.
+ resolve : :class:`Resolve`
+ Scale, axis, and legend resolutions for view composition specifications.
+ spacing : float
+ The spacing in pixels between sub-views of the concat operator.
+
+ **Default value** : ``10``
+ title : anyOf(string, :class:`TitleParams`)
+ Title for the plot.
+ transform : List(:class:`Transform`)
+ An array of data transformations such as filter and new field calculation.
+ """
+ _schema = {'$ref': '#/definitions/HConcatSpec'}
+
+ def __init__(self, hconcat=Undefined, bounds=Undefined, center=Undefined, data=Undefined,
+ description=Undefined, name=Undefined, resolve=Undefined, spacing=Undefined,
+ title=Undefined, transform=Undefined, **kwds):
+ super(HConcatSpec, self).__init__(hconcat=hconcat, bounds=bounds, center=center, data=data,
+ description=description, name=name, resolve=resolve,
+ spacing=spacing, title=title, transform=transform, **kwds)
+
+
+class LayerSpec(Spec):
+ """LayerSpec schema wrapper
+
+ Mapping(required=[layer])
+ A full layered plot specification, which may contains ``encoding`` and ``projection``
+ properties that will be applied to underlying unit (single-view) specifications.
+
+ Attributes
+ ----------
+
+ layer : List(anyOf(:class:`LayerSpec`, :class:`UnitSpec`))
+ Layer or single view specifications to be layered.
+
+ **Note** : Specifications inside ``layer`` cannot use ``row`` and ``column``
+ channels as layering facet specifications is not allowed. Instead, use the `facet
+ operator <https://vega.github.io/vega-lite/docs/facet.html>`__ and place a layer
+ inside a facet.
+ data : anyOf(:class:`Data`, None)
+ An object describing the data source. Set to ``null`` to ignore the parent's data
+ source. If no data is set, it is derived from the parent.
+ description : string
+ Description of this mark for commenting purpose.
+ encoding : :class:`Encoding`
+ A shared key-value mapping between encoding channels and definition of fields in the
+ underlying layers.
+ height : float
+ The height of a visualization.
+
+ **Default value:**
+
+
+ * If a view's `autosize
+ <https://vega.github.io/vega-lite/docs/size.html#autosize>`__ type is ``"fit"`` or
+ its y-channel has a `continuous scale
+ <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__, the height will
+ be the value of `config.view.height
+ <https://vega.github.io/vega-lite/docs/spec.html#config>`__.
+ * For y-axis with a band or point scale: if `rangeStep
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__ is a numeric value or
+ unspecified, the height is `determined by the range step, paddings, and the
+ cardinality of the field mapped to y-channel
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__. Otherwise, if the
+ ``rangeStep`` is ``null``, the height will be the value of `config.view.height
+ <https://vega.github.io/vega-lite/docs/spec.html#config>`__.
+ * If no field is mapped to ``y`` channel, the ``height`` will be the value of
+ ``rangeStep``.
+
+ **Note** : For plots with `row and column channels
+ <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the
+ height of a single view.
+
+ **See also:** The documentation for `width and height
+ <https://vega.github.io/vega-lite/docs/size.html>`__ contains more examples.
+ name : string
+ Name of the visualization for later reference.
+ projection : :class:`Projection`
+ An object defining properties of the geographic projection shared by underlying
+ layers.
+ resolve : :class:`Resolve`
+ Scale, axis, and legend resolutions for view composition specifications.
+ title : anyOf(string, :class:`TitleParams`)
+ Title for the plot.
+ transform : List(:class:`Transform`)
+ An array of data transformations such as filter and new field calculation.
+ view : :class:`ViewBackground`
+ An object defining the view background's fill and stroke.
+
+ **Default value:** none (transparent)
+ width : float
+ The width of a visualization.
+
+ **Default value:** This will be determined by the following rules:
+
+
+ * If a view's `autosize
+ <https://vega.github.io/vega-lite/docs/size.html#autosize>`__ type is ``"fit"`` or
+ its x-channel has a `continuous scale
+ <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__, the width will
+ be the value of `config.view.width
+ <https://vega.github.io/vega-lite/docs/spec.html#config>`__.
+ * For x-axis with a band or point scale: if `rangeStep
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__ is a numeric value or
+ unspecified, the width is `determined by the range step, paddings, and the
+ cardinality of the field mapped to x-channel
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__. Otherwise, if the
+ ``rangeStep`` is ``null``, the width will be the value of `config.view.width
+ <https://vega.github.io/vega-lite/docs/spec.html#config>`__.
+ * If no field is mapped to ``x`` channel, the ``width`` will be the value of
+ `config.scale.textXRangeStep
+ <https://vega.github.io/vega-lite/docs/size.html#default-width-and-height>`__ for
+ ``text`` mark and the value of ``rangeStep`` for other marks.
+
+ **Note:** For plots with `row and column channels
+ <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the
+ width of a single view.
+
+ **See also:** The documentation for `width and height
+ <https://vega.github.io/vega-lite/docs/size.html>`__ contains more examples.
+ """
+ _schema = {'$ref': '#/definitions/LayerSpec'}
+
+ def __init__(self, layer=Undefined, data=Undefined, description=Undefined, encoding=Undefined,
+ height=Undefined, name=Undefined, projection=Undefined, resolve=Undefined,
+ title=Undefined, transform=Undefined, view=Undefined, width=Undefined, **kwds):
+ super(LayerSpec, self).__init__(layer=layer, data=data, description=description,
+ encoding=encoding, height=height, name=name,
+ projection=projection, resolve=resolve, title=title,
+ transform=transform, view=view, width=width, **kwds)
+
+
+class RepeatSpec(Spec):
+ """RepeatSpec schema wrapper
+
+ Mapping(required=[repeat, spec])
+ Base interface for a repeat specification.
+
+ Attributes
+ ----------
+
+ repeat : anyOf(List(string), :class:`RepeatMapping`)
+ Definition for fields to be repeated. One of:
+ 1) An array of fields to be repeated. If ``"repeat"`` is an array, the field can be
+ referred using ``{"repeat": "repeat"}``
+ 2) An object that mapped ``"row"`` and/or ``"column"`` to the listed of fields to be
+ repeated along the particular orientations. The objects ``{"repeat": "row"}`` and
+ ``{"repeat": "column"}`` can be used to refer to the repeated field respectively.
+ spec : :class:`Spec`
+ A specification of the view that gets repeated.
+ align : anyOf(:class:`LayoutAlign`, :class:`RowColLayoutAlign`)
+ The alignment to apply to grid rows and columns.
+ The supported string values are ``"all"``, ``"each"``, and ``"none"``.
+
+
+ * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply
+ placed one after the other.
+ * For ``"each"``, subviews will be aligned into a clean grid structure, but each row
+ or column may be of variable size.
+ * For ``"all"``, subviews will be aligned and each row or column will be sized
+ identically based on the maximum observed size. String values for this property
+ will be applied to both grid rows and columns.
+
+ Alternatively, an object value of the form ``{"row": string, "column": string}`` can
+ be used to supply different alignments for rows and columns.
+
+ **Default value:** ``"all"``.
+ bounds : enum('full', 'flush')
+ The bounds calculation method to use for determining the extent of a sub-plot. One
+ of ``full`` (the default) or ``flush``.
+
+
+ * If set to ``full``, the entire calculated bounds (including axes, title, and
+ legend) will be used.
+ * If set to ``flush``, only the specified width and height values for the sub-view
+ will be used. The ``flush`` setting can be useful when attempting to place
+ sub-plots without axes or legends into a uniform grid structure.
+
+ **Default value:** ``"full"``
+ center : anyOf(boolean, :class:`RowColboolean`)
+ Boolean flag indicating if subviews should be centered relative to their respective
+ rows or columns.
+
+ An object value of the form ``{"row": boolean, "column": boolean}`` can be used to
+ supply different centering values for rows and columns.
+
+ **Default value:** ``false``
+ columns : float
+ The number of columns to include in the view composition layout.
+
+ **Default value** : ``undefined`` -- An infinite number of columns (a single row)
+ will be assumed. This is equivalent to
+ ``hconcat`` (for ``concat`` ) and to using the ``column`` channel (for ``facet`` and
+ ``repeat`` ).
+
+ **Note** :
+
+ 1) This property is only for:
+
+
+ * the general (wrappable) ``concat`` operator (not ``hconcat`` / ``vconcat`` )
+ * the ``facet`` and ``repeat`` operator with one field/repetition definition
+ (without row/column nesting)
+
+ 2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat`` )
+ and to using the ``row`` channel (for ``facet`` and ``repeat`` ).
+ data : anyOf(:class:`Data`, None)
+ An object describing the data source. Set to ``null`` to ignore the parent's data
+ source. If no data is set, it is derived from the parent.
+ description : string
+ Description of this mark for commenting purpose.
+ name : string
+ Name of the visualization for later reference.
+ resolve : :class:`Resolve`
+ Scale, axis, and legend resolutions for view composition specifications.
+ spacing : anyOf(float, :class:`RowColnumber`)
+ The spacing in pixels between sub-views of the composition operator.
+ An object of the form ``{"row": number, "column": number}`` can be used to set
+ different spacing values for rows and columns.
+
+ **Default value** : Depends on ``"spacing"`` property of `the view composition
+ configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__ (
+ ``20`` by default)
+ title : anyOf(string, :class:`TitleParams`)
+ Title for the plot.
+ transform : List(:class:`Transform`)
+ An array of data transformations such as filter and new field calculation.
+ """
+ _schema = {'$ref': '#/definitions/RepeatSpec'}
+
+ def __init__(self, repeat=Undefined, spec=Undefined, align=Undefined, bounds=Undefined,
+ center=Undefined, columns=Undefined, data=Undefined, description=Undefined,
+ name=Undefined, resolve=Undefined, spacing=Undefined, title=Undefined,
+ transform=Undefined, **kwds):
+ super(RepeatSpec, self).__init__(repeat=repeat, spec=spec, align=align, bounds=bounds,
+ center=center, columns=columns, data=data,
+ description=description, name=name, resolve=resolve,
+ spacing=spacing, title=title, transform=transform, **kwds)
+
+
+class SphereGenerator(Generator):
+ """SphereGenerator schema wrapper
+
+ Mapping(required=[sphere])
+
+ Attributes
+ ----------
+
+ sphere : anyOf(enum(True), Mapping(required=[]))
+ Generate sphere GeoJSON data for the full globe.
+ name : string
+ Provide a placeholder name and bind data at runtime.
+ """
+ _schema = {'$ref': '#/definitions/SphereGenerator'}
+
+ def __init__(self, sphere=Undefined, name=Undefined, **kwds):
+ super(SphereGenerator, self).__init__(sphere=sphere, name=name, **kwds)
+
+
+class StackOffset(VegaLiteSchema):
+ """StackOffset schema wrapper
+
+ enum('zero', 'center', 'normalize')
+ """
+ _schema = {'$ref': '#/definitions/StackOffset'}
+
+ def __init__(self, *args):
+ super(StackOffset, self).__init__(*args)
+
+
+class StandardType(VegaLiteSchema):
+ """StandardType schema wrapper
+
+ enum('quantitative', 'ordinal', 'temporal', 'nominal')
+ """
+ _schema = {'$ref': '#/definitions/StandardType'}
+
+ def __init__(self, *args):
+ super(StandardType, self).__init__(*args)
+
+
+class StringFieldDefWithCondition(VegaLiteSchema):
+ """StringFieldDefWithCondition schema wrapper
+
+ Mapping(required=[type])
+ A FieldDef with Condition :raw-html:`<ValueDef>`
+
+ Attributes
+ ----------
+
+ type : :class:`StandardType`
+ The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``,
+ ``"ordinal"``, or ``"nominal"`` ).
+ It can also be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ **Note:**
+
+
+ * Data values for a temporal field can be either a date-time string (e.g.,
+ ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a
+ timestamp number (e.g., ``1552199579097`` ).
+ * Data ``type`` describes the semantics of the data rather than the primitive data
+ types ( ``number``, ``string``, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data.
+ * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
+ or `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `timeUnit
+ <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
+ can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using
+ an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
+ refers to the post-aggregation data type. For example, we can calculate count
+ ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
+ "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output
+ is ``"quantitative"``.
+ * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have
+ ``type`` as they have exactly the same type as their primary channels (e.g.,
+ ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ condition : anyOf(:class:`ConditionalStringValueDef`,
+ List(:class:`ConditionalStringValueDef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ legend : anyOf(:class:`Legend`, None)
+ An object defining properties of the legend.
+ If ``null``, the legend for the encoding channel will be removed.
+
+ **Default value:** If undefined, default `legend properties
+ <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.
+
+ **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
+ documentation.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ sort : :class:`Sort`
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following:
+
+
+ * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
+ Javascript.
+ * `A sort-by-encoding definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ for sorting
+ by another encoding channel. (This type of sort definition is not available for
+ ``row`` and ``column`` channels.)
+ * `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field.
+ * `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values
+ in their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ).
+ * ``null`` indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` is not supported for ``row`` and ``column``.
+
+ **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
+ documentation.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ """
+ _schema = {'$ref': '#/definitions/StringFieldDefWithCondition'}
+
+ def __init__(self, type=Undefined, aggregate=Undefined, bin=Undefined, condition=Undefined,
+ field=Undefined, legend=Undefined, scale=Undefined, sort=Undefined, timeUnit=Undefined,
+ title=Undefined, **kwds):
+ super(StringFieldDefWithCondition, self).__init__(type=type, aggregate=aggregate, bin=bin,
+ condition=condition, field=field,
+ legend=legend, scale=scale, sort=sort,
+ timeUnit=timeUnit, title=title, **kwds)
+
+
+class StringFieldDefWithConditionTypeForShape(VegaLiteSchema):
+ """StringFieldDefWithConditionTypeForShape schema wrapper
+
+ Mapping(required=[type])
+ A FieldDef with Condition :raw-html:`<ValueDef>`
+
+ Attributes
+ ----------
+
+ type : :class:`TypeForShape`
+ The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``,
+ ``"ordinal"``, or ``"nominal"`` ).
+ It can also be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ **Note:**
+
+
+ * Data values for a temporal field can be either a date-time string (e.g.,
+ ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a
+ timestamp number (e.g., ``1552199579097`` ).
+ * Data ``type`` describes the semantics of the data rather than the primitive data
+ types ( ``number``, ``string``, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data.
+ * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
+ or `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `timeUnit
+ <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
+ can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using
+ an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
+ refers to the post-aggregation data type. For example, we can calculate count
+ ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
+ "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output
+ is ``"quantitative"``.
+ * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have
+ ``type`` as they have exactly the same type as their primary channels (e.g.,
+ ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ condition : anyOf(:class:`ConditionalStringValueDef`,
+ List(:class:`ConditionalStringValueDef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ legend : anyOf(:class:`Legend`, None)
+ An object defining properties of the legend.
+ If ``null``, the legend for the encoding channel will be removed.
+
+ **Default value:** If undefined, default `legend properties
+ <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.
+
+ **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
+ documentation.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ sort : :class:`Sort`
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following:
+
+
+ * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
+ Javascript.
+ * `A sort-by-encoding definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ for sorting
+ by another encoding channel. (This type of sort definition is not available for
+ ``row`` and ``column`` channels.)
+ * `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field.
+ * `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values
+ in their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ).
+ * ``null`` indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` is not supported for ``row`` and ``column``.
+
+ **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
+ documentation.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ """
+ _schema = {'$ref': '#/definitions/StringFieldDefWithCondition<TypeForShape>'}
+
+ def __init__(self, type=Undefined, aggregate=Undefined, bin=Undefined, condition=Undefined,
+ field=Undefined, legend=Undefined, scale=Undefined, sort=Undefined, timeUnit=Undefined,
+ title=Undefined, **kwds):
+ super(StringFieldDefWithConditionTypeForShape, self).__init__(type=type, aggregate=aggregate,
+ bin=bin, condition=condition,
+ field=field, legend=legend,
+ scale=scale, sort=sort,
+ timeUnit=timeUnit, title=title,
+ **kwds)
+
+
+class StringValueDefWithCondition(VegaLiteSchema):
+ """StringValueDefWithCondition schema wrapper
+
+ Mapping(required=[])
+ A ValueDef with Condition<ValueDef | FieldDef> where either the condition or the value are
+ optional.
+
+ Attributes
+ ----------
+
+ condition : anyOf(:class:`ConditionalMarkPropFieldDef`, :class:`ConditionalStringValueDef`,
+ List(:class:`ConditionalStringValueDef`))
+ A field definition or one or more value definition(s) with a selection predicate.
+ value : anyOf(string, None)
+ A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values
+ between ``0`` to ``1`` for opacity).
+ """
+ _schema = {'$ref': '#/definitions/StringValueDefWithCondition'}
+
+ def __init__(self, condition=Undefined, value=Undefined, **kwds):
+ super(StringValueDefWithCondition, self).__init__(condition=condition, value=value, **kwds)
+
+
+class StringValueDefWithConditionTypeForShape(VegaLiteSchema):
+ """StringValueDefWithConditionTypeForShape schema wrapper
+
+ Mapping(required=[])
+ A ValueDef with Condition<ValueDef | FieldDef> where either the condition or the value are
+ optional.
+
+ Attributes
+ ----------
+
+ condition : anyOf(:class:`ConditionalMarkPropFieldDefTypeForShape`,
+ :class:`ConditionalStringValueDef`, List(:class:`ConditionalStringValueDef`))
+ A field definition or one or more value definition(s) with a selection predicate.
+ value : anyOf(string, None)
+ A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values
+ between ``0`` to ``1`` for opacity).
+ """
+ _schema = {'$ref': '#/definitions/StringValueDefWithCondition<TypeForShape>'}
+
+ def __init__(self, condition=Undefined, value=Undefined, **kwds):
+ super(StringValueDefWithConditionTypeForShape, self).__init__(condition=condition, value=value,
+ **kwds)
+
+
+class StrokeCap(VegaLiteSchema):
+ """StrokeCap schema wrapper
+
+ enum('butt', 'round', 'square')
+ """
+ _schema = {'$ref': '#/definitions/StrokeCap'}
+
+ def __init__(self, *args):
+ super(StrokeCap, self).__init__(*args)
+
+
+class StrokeJoin(VegaLiteSchema):
+ """StrokeJoin schema wrapper
+
+ enum('miter', 'round', 'bevel')
+ """
+ _schema = {'$ref': '#/definitions/StrokeJoin'}
+
+ def __init__(self, *args):
+ super(StrokeJoin, self).__init__(*args)
+
+
+class StyleConfigIndex(VegaLiteSchema):
+ """StyleConfigIndex schema wrapper
+
+ Mapping(required=[])
+ """
+ _schema = {'$ref': '#/definitions/StyleConfigIndex'}
+
+ def __init__(self, **kwds):
+ super(StyleConfigIndex, self).__init__(**kwds)
+
+
+class SymbolShape(VegaLiteSchema):
+ """SymbolShape schema wrapper
+
+ string
+ """
+ _schema = {'$ref': '#/definitions/SymbolShape'}
+
+ def __init__(self, *args):
+ super(SymbolShape, self).__init__(*args)
+
+
+class TextBaseline(VegaLiteSchema):
+ """TextBaseline schema wrapper
+
+ anyOf(enum('alphabetic'), :class:`Baseline`)
+ """
+ _schema = {'$ref': '#/definitions/TextBaseline'}
+
+ def __init__(self, *args, **kwds):
+ super(TextBaseline, self).__init__(*args, **kwds)
+
+
+class Baseline(TextBaseline):
+ """Baseline schema wrapper
+
+ enum('top', 'middle', 'bottom')
+ """
+ _schema = {'$ref': '#/definitions/Baseline'}
+
+ def __init__(self, *args):
+ super(Baseline, self).__init__(*args)
+
+
+class TextConfig(VegaLiteSchema):
+ """TextConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ align : :class:`Align`
+ The horizontal alignment of the text. One of ``"left"``, ``"right"``, ``"center"``.
+ angle : float
+ The rotation angle of the text, in degrees.
+ baseline : :class:`TextBaseline`
+ The vertical alignment of the text. One of ``"top"``, ``"middle"``, ``"bottom"``.
+
+ **Default value:** ``"middle"``
+ color : :class:`Color`
+ Default color. Note that ``fill`` and ``stroke`` have higher precedence than
+ ``color`` and will override ``color``.
+
+ **Default value:** :raw-html:`<span style="color: #4682b4;">&#9632;</span>`
+ ``"#4682b4"``
+
+ **Note:** This property cannot be used in a `style config
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
+ cornerRadius : float
+ The radius in pixels of rounded rectangle corners.
+
+ **Default value:** ``0``
+ cursor : :class:`Cursor`
+ The mouse cursor used over the mark. Any valid `CSS cursor type
+ <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.
+ dir : :class:`Dir`
+ The direction of the text. One of ``"ltr"`` (left-to-right) or ``"rtl"``
+ (right-to-left). This property determines on which side is truncated in response to
+ the limit parameter.
+
+ **Default value:** ``"ltr"``
+ dx : float
+ The horizontal offset, in pixels, between the text label and its anchor point. The
+ offset is applied after rotation by the *angle* property.
+ dy : float
+ The vertical offset, in pixels, between the text label and its anchor point. The
+ offset is applied after rotation by the *angle* property.
+ ellipsis : string
+ The ellipsis string for text truncated in response to the limit parameter.
+
+ **Default value:** ``"…"``
+ fill : :class:`Color`
+ Default Fill Color. This has higher precedence than ``config.color``
+
+ **Default value:** (None)
+ fillOpacity : float
+ The fill opacity (value between [0,1]).
+
+ **Default value:** ``1``
+ filled : boolean
+ Whether the mark's color should be used as fill color instead of stroke color.
+
+ **Default value:** ``false`` for ``point``, ``line`` and ``rule`` ; otherwise,
+ ``true``.
+
+ **Note:** This property cannot be used in a `style config
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
+ font : string
+ The typeface to set the text in (e.g., ``"Helvetica Neue"`` ).
+ fontSize : float
+ The font size, in pixels.
+ fontStyle : :class:`FontStyle`
+ The font style (e.g., ``"italic"`` ).
+ fontWeight : :class:`FontWeight`
+ The font weight.
+ This can be either a string (e.g ``"bold"``, ``"normal"`` ) or a number ( ``100``,
+ ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and ``"bold"`` = ``700``
+ ).
+ height : float
+ Height of the marks.
+ href : string
+ A URL to load upon mouse click. If defined, the mark acts as a hyperlink.
+ interpolate : :class:`Interpolate`
+ The line interpolation method to use for line and area marks. One of the following:
+
+
+ * ``"linear"`` : piecewise linear segments, as in a polyline.
+ * ``"linear-closed"`` : close the linear segments to form a polygon.
+ * ``"step"`` : alternate between horizontal and vertical segments, as in a step
+ function.
+ * ``"step-before"`` : alternate between vertical and horizontal segments, as in a
+ step function.
+ * ``"step-after"`` : alternate between horizontal and vertical segments, as in a
+ step function.
+ * ``"basis"`` : a B-spline, with control point duplication on the ends.
+ * ``"basis-open"`` : an open B-spline; may not intersect the start or end.
+ * ``"basis-closed"`` : a closed B-spline, as in a loop.
+ * ``"cardinal"`` : a Cardinal spline, with control point duplication on the ends.
+ * ``"cardinal-open"`` : an open Cardinal spline; may not intersect the start or end,
+ but will intersect other control points.
+ * ``"cardinal-closed"`` : a closed Cardinal spline, as in a loop.
+ * ``"bundle"`` : equivalent to basis, except the tension parameter is used to
+ straighten the spline.
+ * ``"monotone"`` : cubic interpolation that preserves monotonicity in y.
+ limit : float
+ The maximum length of the text mark in pixels. The text value will be automatically
+ truncated if the rendered size exceeds the limit.
+
+ **Default value:** ``0``, indicating no limit
+ opacity : float
+ The overall opacity (value between [0,1]).
+
+ **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,
+ ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.
+ order : anyOf(None, boolean)
+ For line and trail marks, this ``order`` property can be set to ``null`` or
+ ``false`` to make the lines use the original order in the data sources.
+ orient : :class:`Orientation`
+ The orientation of a non-stacked bar, tick, area, and line charts.
+ The value is either horizontal (default) or vertical.
+
+
+ * For bar, rule and tick, this determines whether the size of the bar and tick
+ should be applied to x or y dimension.
+ * For area, this property determines the orient property of the Vega output.
+ * For line and trail marks, this property determines the sort order of the points in
+ the line
+ if ``config.sortLineBy`` is not specified.
+ For stacked charts, this is always determined by the orientation of the stack;
+ therefore explicitly specified value will be ignored.
+ radius : float
+ Polar coordinate radial offset, in pixels, of the text label from the origin
+ determined by the ``x`` and ``y`` properties.
+ shape : string
+ Shape of the point marks. Supported values include:
+
+
+ * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``,
+ ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or
+ ``"triangle-left"``.
+ * the line symbol ``"stroke"``
+ * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"``
+ * a custom `SVG path string
+ <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct
+ sizing, custom shape paths should be defined within a square bounding box with
+ coordinates ranging from -1 to 1 along both the x and y dimensions.)
+
+ **Default value:** ``"circle"``
+ shortTimeLabels : boolean
+ Whether month names and weekday names should be abbreviated.
+ size : float
+ Default size for marks.
+
+
+ * For ``point`` / ``circle`` / ``square``, this represents the pixel area of the
+ marks. For example: in the case of circles, the radius is determined in part by
+ the square root of the size value.
+ * For ``bar``, this represents the band size of the bar, in pixels.
+ * For ``text``, this represents the font size, in pixels.
+
+ **Default value:** ``30`` for point, circle, square marks; ``rangeStep`` - 1 for bar
+ marks with discrete dimensions; ``5`` for bar marks with continuous dimensions;
+ ``11`` for text marks.
+ stroke : :class:`Color`
+ Default Stroke Color. This has higher precedence than ``config.color``
+
+ **Default value:** (None)
+ strokeCap : :class:`StrokeCap`
+ The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or
+ ``"square"``.
+
+ **Default value:** ``"square"``
+ strokeDash : List(float)
+ An array of alternating stroke, space lengths for creating dashed or dotted lines.
+ strokeDashOffset : float
+ The offset (in pixels) into which to begin drawing with the stroke dash array.
+ strokeJoin : :class:`StrokeJoin`
+ The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``.
+
+ **Default value:** ``"miter"``
+ strokeMiterLimit : float
+ The miter limit at which to bevel a line join.
+ strokeOpacity : float
+ The stroke opacity (value between [0,1]).
+
+ **Default value:** ``1``
+ strokeWidth : float
+ The stroke width, in pixels.
+ tension : float
+ Depending on the interpolation type, sets the tension parameter (for line and area
+ marks).
+ text : string
+ Placeholder text if the ``text`` channel is not specified
+ theta : float
+ Polar coordinate angle, in radians, of the text label from the origin determined by
+ the ``x`` and ``y`` properties. Values for ``theta`` follow the same convention of
+ ``arc`` mark ``startAngle`` and ``endAngle`` properties: angles are measured in
+ radians, with ``0`` indicating "north".
+ tooltip : anyOf(:class:`Value`, :class:`TooltipContent`, None)
+ The tooltip text string to show upon mouse hover or an object defining which fields
+ should the tooltip be derived from.
+
+
+ * If ``tooltip`` is ``{"content": "encoding"}``, then all fields from ``encoding``
+ will be used.
+ * If ``tooltip`` is ``{"content": "data"}``, then all fields that appear in the
+ highlighted data point will be used.
+ * If set to ``null``, then no tooltip will be used.
+ width : float
+ Width of the marks.
+ x : anyOf(float, enum('width'))
+ X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without
+ specified ``x2`` or ``width``.
+
+ The ``value`` of this channel can be a number or a string ``"width"`` for the width
+ of the plot.
+ x2 : anyOf(float, enum('width'))
+ X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
+
+ The ``value`` of this channel can be a number or a string ``"width"`` for the width
+ of the plot.
+ y : anyOf(float, enum('height'))
+ Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without
+ specified ``y2`` or ``height``.
+
+ The ``value`` of this channel can be a number or a string ``"height"`` for the
+ height of the plot.
+ y2 : anyOf(float, enum('width'))
+ Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
+
+ The ``value`` of this channel can be a number or a string ``"height"`` for the
+ height of the plot.
+ """
+ _schema = {'$ref': '#/definitions/TextConfig'}
+
+ def __init__(self, align=Undefined, angle=Undefined, baseline=Undefined, color=Undefined,
+ cornerRadius=Undefined, cursor=Undefined, dir=Undefined, dx=Undefined, dy=Undefined,
+ ellipsis=Undefined, fill=Undefined, fillOpacity=Undefined, filled=Undefined,
+ font=Undefined, fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined,
+ height=Undefined, href=Undefined, interpolate=Undefined, limit=Undefined,
+ opacity=Undefined, order=Undefined, orient=Undefined, radius=Undefined,
+ shape=Undefined, shortTimeLabels=Undefined, size=Undefined, stroke=Undefined,
+ strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined,
+ strokeJoin=Undefined, strokeMiterLimit=Undefined, strokeOpacity=Undefined,
+ strokeWidth=Undefined, tension=Undefined, text=Undefined, theta=Undefined,
+ tooltip=Undefined, width=Undefined, x=Undefined, x2=Undefined, y=Undefined,
+ y2=Undefined, **kwds):
+ super(TextConfig, self).__init__(align=align, angle=angle, baseline=baseline, color=color,
+ cornerRadius=cornerRadius, cursor=cursor, dir=dir, dx=dx,
+ dy=dy, ellipsis=ellipsis, fill=fill, fillOpacity=fillOpacity,
+ filled=filled, font=font, fontSize=fontSize,
+ fontStyle=fontStyle, fontWeight=fontWeight, height=height,
+ href=href, interpolate=interpolate, limit=limit,
+ opacity=opacity, order=order, orient=orient, radius=radius,
+ shape=shape, shortTimeLabels=shortTimeLabels, size=size,
+ stroke=stroke, strokeCap=strokeCap, strokeDash=strokeDash,
+ strokeDashOffset=strokeDashOffset, strokeJoin=strokeJoin,
+ strokeMiterLimit=strokeMiterLimit, strokeOpacity=strokeOpacity,
+ strokeWidth=strokeWidth, tension=tension, text=text,
+ theta=theta, tooltip=tooltip, width=width, x=x, x2=x2, y=y,
+ y2=y2, **kwds)
+
+
+class TextFieldDef(VegaLiteSchema):
+ """TextFieldDef schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : :class:`StandardType`
+ The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``,
+ ``"ordinal"``, or ``"nominal"`` ).
+ It can also be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ **Note:**
+
+
+ * Data values for a temporal field can be either a date-time string (e.g.,
+ ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a
+ timestamp number (e.g., ``1552199579097`` ).
+ * Data ``type`` describes the semantics of the data rather than the primitive data
+ types ( ``number``, ``string``, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data.
+ * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
+ or `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `timeUnit
+ <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
+ can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using
+ an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
+ refers to the post-aggregation data type. For example, we can calculate count
+ ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
+ "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output
+ is ``"quantitative"``.
+ * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have
+ ``type`` as they have exactly the same type as their primary channels (e.g.,
+ ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : anyOf(boolean, :class:`BinParams`, enum('binned'), None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ format : string
+ The text formatting pattern for labels of guides (axes, legends, headers) and text
+ marks.
+
+
+ * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
+ `number format pattern <https://github.com/d3/d3-format#locale_format>`__.
+ * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
+ format pattern <https://github.com/d3/d3-time-format#locale_format>`__.
+
+ See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
+ for more examples.
+
+ **Default value:** Derived from `numberFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
+ format and from `timeFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
+ format.
+ formatType : enum('number', 'time')
+ The format type for labels ( ``"number"`` or ``"time"`` ).
+
+ **Default value:**
+
+
+ * ``"time"`` for temporal fields and ordinal and nomimal fields with ``timeUnit``.
+ * ``"number"`` for quantitative fields as well as ordinal and nomimal fields without
+ ``timeUnit``.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ """
+ _schema = {'$ref': '#/definitions/TextFieldDef'}
+
+ def __init__(self, type=Undefined, aggregate=Undefined, bin=Undefined, field=Undefined,
+ format=Undefined, formatType=Undefined, timeUnit=Undefined, title=Undefined, **kwds):
+ super(TextFieldDef, self).__init__(type=type, aggregate=aggregate, bin=bin, field=field,
+ format=format, formatType=formatType, timeUnit=timeUnit,
+ title=title, **kwds)
+
+
+class TextFieldDefWithCondition(VegaLiteSchema):
+ """TextFieldDefWithCondition schema wrapper
+
+ Mapping(required=[type])
+ A FieldDef with Condition :raw-html:`<ValueDef>`
+
+ Attributes
+ ----------
+
+ type : :class:`StandardType`
+ The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``,
+ ``"ordinal"``, or ``"nominal"`` ).
+ It can also be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ **Note:**
+
+
+ * Data values for a temporal field can be either a date-time string (e.g.,
+ ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a
+ timestamp number (e.g., ``1552199579097`` ).
+ * Data ``type`` describes the semantics of the data rather than the primitive data
+ types ( ``number``, ``string``, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data.
+ * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
+ or `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `timeUnit
+ <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
+ can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using
+ an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
+ refers to the post-aggregation data type. For example, we can calculate count
+ ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
+ "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output
+ is ``"quantitative"``.
+ * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have
+ ``type`` as they have exactly the same type as their primary channels (e.g.,
+ ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : anyOf(boolean, :class:`BinParams`, enum('binned'), None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ condition : anyOf(:class:`ConditionalValueDef`, List(:class:`ConditionalValueDef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ format : string
+ The text formatting pattern for labels of guides (axes, legends, headers) and text
+ marks.
+
+
+ * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
+ `number format pattern <https://github.com/d3/d3-format#locale_format>`__.
+ * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
+ format pattern <https://github.com/d3/d3-time-format#locale_format>`__.
+
+ See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
+ for more examples.
+
+ **Default value:** Derived from `numberFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
+ format and from `timeFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
+ format.
+ formatType : enum('number', 'time')
+ The format type for labels ( ``"number"`` or ``"time"`` ).
+
+ **Default value:**
+
+
+ * ``"time"`` for temporal fields and ordinal and nomimal fields with ``timeUnit``.
+ * ``"number"`` for quantitative fields as well as ordinal and nomimal fields without
+ ``timeUnit``.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ """
+ _schema = {'$ref': '#/definitions/TextFieldDefWithCondition'}
+
+ def __init__(self, type=Undefined, aggregate=Undefined, bin=Undefined, condition=Undefined,
+ field=Undefined, format=Undefined, formatType=Undefined, timeUnit=Undefined,
+ title=Undefined, **kwds):
+ super(TextFieldDefWithCondition, self).__init__(type=type, aggregate=aggregate, bin=bin,
+ condition=condition, field=field, format=format,
+ formatType=formatType, timeUnit=timeUnit,
+ title=title, **kwds)
+
+
+class TextValueDefWithCondition(VegaLiteSchema):
+ """TextValueDefWithCondition schema wrapper
+
+ Mapping(required=[])
+ A ValueDef with Condition<ValueDef | FieldDef> where either the condition or the value are
+ optional.
+
+ Attributes
+ ----------
+
+ condition : anyOf(:class:`ConditionalTextFieldDef`, :class:`ConditionalValueDef`,
+ List(:class:`ConditionalValueDef`))
+ A field definition or one or more value definition(s) with a selection predicate.
+ value : :class:`Value`
+ A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values
+ between ``0`` to ``1`` for opacity).
+ """
+ _schema = {'$ref': '#/definitions/TextValueDefWithCondition'}
+
+ def __init__(self, condition=Undefined, value=Undefined, **kwds):
+ super(TextValueDefWithCondition, self).__init__(condition=condition, value=value, **kwds)
+
+
+class TickConfig(VegaLiteSchema):
+ """TickConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ align : :class:`Align`
+ The horizontal alignment of the text. One of ``"left"``, ``"right"``, ``"center"``.
+ angle : float
+ The rotation angle of the text, in degrees.
+ bandSize : float
+ The width of the ticks.
+
+ **Default value:** 3/4 of rangeStep.
+ baseline : :class:`TextBaseline`
+ The vertical alignment of the text. One of ``"top"``, ``"middle"``, ``"bottom"``.
+
+ **Default value:** ``"middle"``
+ color : :class:`Color`
+ Default color. Note that ``fill`` and ``stroke`` have higher precedence than
+ ``color`` and will override ``color``.
+
+ **Default value:** :raw-html:`<span style="color: #4682b4;">&#9632;</span>`
+ ``"#4682b4"``
+
+ **Note:** This property cannot be used in a `style config
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
+ cornerRadius : float
+ The radius in pixels of rounded rectangle corners.
+
+ **Default value:** ``0``
+ cursor : :class:`Cursor`
+ The mouse cursor used over the mark. Any valid `CSS cursor type
+ <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.
+ dir : :class:`Dir`
+ The direction of the text. One of ``"ltr"`` (left-to-right) or ``"rtl"``
+ (right-to-left). This property determines on which side is truncated in response to
+ the limit parameter.
+
+ **Default value:** ``"ltr"``
+ dx : float
+ The horizontal offset, in pixels, between the text label and its anchor point. The
+ offset is applied after rotation by the *angle* property.
+ dy : float
+ The vertical offset, in pixels, between the text label and its anchor point. The
+ offset is applied after rotation by the *angle* property.
+ ellipsis : string
+ The ellipsis string for text truncated in response to the limit parameter.
+
+ **Default value:** ``"…"``
+ fill : :class:`Color`
+ Default Fill Color. This has higher precedence than ``config.color``
+
+ **Default value:** (None)
+ fillOpacity : float
+ The fill opacity (value between [0,1]).
+
+ **Default value:** ``1``
+ filled : boolean
+ Whether the mark's color should be used as fill color instead of stroke color.
+
+ **Default value:** ``false`` for ``point``, ``line`` and ``rule`` ; otherwise,
+ ``true``.
+
+ **Note:** This property cannot be used in a `style config
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
+ font : string
+ The typeface to set the text in (e.g., ``"Helvetica Neue"`` ).
+ fontSize : float
+ The font size, in pixels.
+ fontStyle : :class:`FontStyle`
+ The font style (e.g., ``"italic"`` ).
+ fontWeight : :class:`FontWeight`
+ The font weight.
+ This can be either a string (e.g ``"bold"``, ``"normal"`` ) or a number ( ``100``,
+ ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and ``"bold"`` = ``700``
+ ).
+ height : float
+ Height of the marks.
+ href : string
+ A URL to load upon mouse click. If defined, the mark acts as a hyperlink.
+ interpolate : :class:`Interpolate`
+ The line interpolation method to use for line and area marks. One of the following:
+
+
+ * ``"linear"`` : piecewise linear segments, as in a polyline.
+ * ``"linear-closed"`` : close the linear segments to form a polygon.
+ * ``"step"`` : alternate between horizontal and vertical segments, as in a step
+ function.
+ * ``"step-before"`` : alternate between vertical and horizontal segments, as in a
+ step function.
+ * ``"step-after"`` : alternate between horizontal and vertical segments, as in a
+ step function.
+ * ``"basis"`` : a B-spline, with control point duplication on the ends.
+ * ``"basis-open"`` : an open B-spline; may not intersect the start or end.
+ * ``"basis-closed"`` : a closed B-spline, as in a loop.
+ * ``"cardinal"`` : a Cardinal spline, with control point duplication on the ends.
+ * ``"cardinal-open"`` : an open Cardinal spline; may not intersect the start or end,
+ but will intersect other control points.
+ * ``"cardinal-closed"`` : a closed Cardinal spline, as in a loop.
+ * ``"bundle"`` : equivalent to basis, except the tension parameter is used to
+ straighten the spline.
+ * ``"monotone"`` : cubic interpolation that preserves monotonicity in y.
+ limit : float
+ The maximum length of the text mark in pixels. The text value will be automatically
+ truncated if the rendered size exceeds the limit.
+
+ **Default value:** ``0``, indicating no limit
+ opacity : float
+ The overall opacity (value between [0,1]).
+
+ **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,
+ ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.
+ order : anyOf(None, boolean)
+ For line and trail marks, this ``order`` property can be set to ``null`` or
+ ``false`` to make the lines use the original order in the data sources.
+ orient : :class:`Orientation`
+ The orientation of a non-stacked bar, tick, area, and line charts.
+ The value is either horizontal (default) or vertical.
+
+
+ * For bar, rule and tick, this determines whether the size of the bar and tick
+ should be applied to x or y dimension.
+ * For area, this property determines the orient property of the Vega output.
+ * For line and trail marks, this property determines the sort order of the points in
+ the line
+ if ``config.sortLineBy`` is not specified.
+ For stacked charts, this is always determined by the orientation of the stack;
+ therefore explicitly specified value will be ignored.
+ radius : float
+ Polar coordinate radial offset, in pixels, of the text label from the origin
+ determined by the ``x`` and ``y`` properties.
+ shape : string
+ Shape of the point marks. Supported values include:
+
+
+ * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``,
+ ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or
+ ``"triangle-left"``.
+ * the line symbol ``"stroke"``
+ * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"``
+ * a custom `SVG path string
+ <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct
+ sizing, custom shape paths should be defined within a square bounding box with
+ coordinates ranging from -1 to 1 along both the x and y dimensions.)
+
+ **Default value:** ``"circle"``
+ size : float
+ Default size for marks.
+
+
+ * For ``point`` / ``circle`` / ``square``, this represents the pixel area of the
+ marks. For example: in the case of circles, the radius is determined in part by
+ the square root of the size value.
+ * For ``bar``, this represents the band size of the bar, in pixels.
+ * For ``text``, this represents the font size, in pixels.
+
+ **Default value:** ``30`` for point, circle, square marks; ``rangeStep`` - 1 for bar
+ marks with discrete dimensions; ``5`` for bar marks with continuous dimensions;
+ ``11`` for text marks.
+ stroke : :class:`Color`
+ Default Stroke Color. This has higher precedence than ``config.color``
+
+ **Default value:** (None)
+ strokeCap : :class:`StrokeCap`
+ The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or
+ ``"square"``.
+
+ **Default value:** ``"square"``
+ strokeDash : List(float)
+ An array of alternating stroke, space lengths for creating dashed or dotted lines.
+ strokeDashOffset : float
+ The offset (in pixels) into which to begin drawing with the stroke dash array.
+ strokeJoin : :class:`StrokeJoin`
+ The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``.
+
+ **Default value:** ``"miter"``
+ strokeMiterLimit : float
+ The miter limit at which to bevel a line join.
+ strokeOpacity : float
+ The stroke opacity (value between [0,1]).
+
+ **Default value:** ``1``
+ strokeWidth : float
+ The stroke width, in pixels.
+ tension : float
+ Depending on the interpolation type, sets the tension parameter (for line and area
+ marks).
+ text : string
+ Placeholder text if the ``text`` channel is not specified
+ theta : float
+ Polar coordinate angle, in radians, of the text label from the origin determined by
+ the ``x`` and ``y`` properties. Values for ``theta`` follow the same convention of
+ ``arc`` mark ``startAngle`` and ``endAngle`` properties: angles are measured in
+ radians, with ``0`` indicating "north".
+ thickness : float
+ Thickness of the tick mark.
+
+ **Default value:** ``1``
+ tooltip : anyOf(:class:`Value`, :class:`TooltipContent`, None)
+ The tooltip text string to show upon mouse hover or an object defining which fields
+ should the tooltip be derived from.
+
+
+ * If ``tooltip`` is ``{"content": "encoding"}``, then all fields from ``encoding``
+ will be used.
+ * If ``tooltip`` is ``{"content": "data"}``, then all fields that appear in the
+ highlighted data point will be used.
+ * If set to ``null``, then no tooltip will be used.
+ width : float
+ Width of the marks.
+ x : anyOf(float, enum('width'))
+ X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without
+ specified ``x2`` or ``width``.
+
+ The ``value`` of this channel can be a number or a string ``"width"`` for the width
+ of the plot.
+ x2 : anyOf(float, enum('width'))
+ X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
+
+ The ``value`` of this channel can be a number or a string ``"width"`` for the width
+ of the plot.
+ y : anyOf(float, enum('height'))
+ Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without
+ specified ``y2`` or ``height``.
+
+ The ``value`` of this channel can be a number or a string ``"height"`` for the
+ height of the plot.
+ y2 : anyOf(float, enum('width'))
+ Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
+
+ The ``value`` of this channel can be a number or a string ``"height"`` for the
+ height of the plot.
+ """
+ _schema = {'$ref': '#/definitions/TickConfig'}
+
+ def __init__(self, align=Undefined, angle=Undefined, bandSize=Undefined, baseline=Undefined,
+ color=Undefined, cornerRadius=Undefined, cursor=Undefined, dir=Undefined, dx=Undefined,
+ dy=Undefined, ellipsis=Undefined, fill=Undefined, fillOpacity=Undefined,
+ filled=Undefined, font=Undefined, fontSize=Undefined, fontStyle=Undefined,
+ fontWeight=Undefined, height=Undefined, href=Undefined, interpolate=Undefined,
+ limit=Undefined, opacity=Undefined, order=Undefined, orient=Undefined,
+ radius=Undefined, shape=Undefined, size=Undefined, stroke=Undefined,
+ strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined,
+ strokeJoin=Undefined, strokeMiterLimit=Undefined, strokeOpacity=Undefined,
+ strokeWidth=Undefined, tension=Undefined, text=Undefined, theta=Undefined,
+ thickness=Undefined, tooltip=Undefined, width=Undefined, x=Undefined, x2=Undefined,
+ y=Undefined, y2=Undefined, **kwds):
+ super(TickConfig, self).__init__(align=align, angle=angle, bandSize=bandSize, baseline=baseline,
+ color=color, cornerRadius=cornerRadius, cursor=cursor, dir=dir,
+ dx=dx, dy=dy, ellipsis=ellipsis, fill=fill,
+ fillOpacity=fillOpacity, filled=filled, font=font,
+ fontSize=fontSize, fontStyle=fontStyle, fontWeight=fontWeight,
+ height=height, href=href, interpolate=interpolate, limit=limit,
+ opacity=opacity, order=order, orient=orient, radius=radius,
+ shape=shape, size=size, stroke=stroke, strokeCap=strokeCap,
+ strokeDash=strokeDash, strokeDashOffset=strokeDashOffset,
+ strokeJoin=strokeJoin, strokeMiterLimit=strokeMiterLimit,
+ strokeOpacity=strokeOpacity, strokeWidth=strokeWidth,
+ tension=tension, text=text, theta=theta, thickness=thickness,
+ tooltip=tooltip, width=width, x=x, x2=x2, y=y, y2=y2, **kwds)
+
+
+class TimeUnit(VegaLiteSchema):
+ """TimeUnit schema wrapper
+
+ anyOf(:class:`SingleTimeUnit`, :class:`MultiTimeUnit`)
+ """
+ _schema = {'$ref': '#/definitions/TimeUnit'}
+
+ def __init__(self, *args, **kwds):
+ super(TimeUnit, self).__init__(*args, **kwds)
+
+
+class MultiTimeUnit(TimeUnit):
+ """MultiTimeUnit schema wrapper
+
+ anyOf(:class:`LocalMultiTimeUnit`, :class:`UtcMultiTimeUnit`)
+ """
+ _schema = {'$ref': '#/definitions/MultiTimeUnit'}
+
+ def __init__(self, *args, **kwds):
+ super(MultiTimeUnit, self).__init__(*args, **kwds)
+
+
+class LocalMultiTimeUnit(MultiTimeUnit):
+ """LocalMultiTimeUnit schema wrapper
+
+ enum('yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours',
+ 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'quartermonth',
+ 'monthdate', 'monthdatehours', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds',
+ 'secondsmilliseconds')
+ """
+ _schema = {'$ref': '#/definitions/LocalMultiTimeUnit'}
+
+ def __init__(self, *args):
+ super(LocalMultiTimeUnit, self).__init__(*args)
+
+
+class SingleTimeUnit(TimeUnit):
+ """SingleTimeUnit schema wrapper
+
+ anyOf(:class:`LocalSingleTimeUnit`, :class:`UtcSingleTimeUnit`)
+ """
+ _schema = {'$ref': '#/definitions/SingleTimeUnit'}
+
+ def __init__(self, *args, **kwds):
+ super(SingleTimeUnit, self).__init__(*args, **kwds)
+
+
+class LocalSingleTimeUnit(SingleTimeUnit):
+ """LocalSingleTimeUnit schema wrapper
+
+ enum('year', 'quarter', 'month', 'day', 'date', 'hours', 'minutes', 'seconds',
+ 'milliseconds')
+ """
+ _schema = {'$ref': '#/definitions/LocalSingleTimeUnit'}
+
+ def __init__(self, *args):
+ super(LocalSingleTimeUnit, self).__init__(*args)
+
+
+class TitleAnchor(VegaLiteSchema):
+ """TitleAnchor schema wrapper
+
+ enum(None, 'start', 'middle', 'end')
+ """
+ _schema = {'$ref': '#/definitions/TitleAnchor'}
+
+ def __init__(self, *args):
+ super(TitleAnchor, self).__init__(*args)
+
+
+class TitleConfig(VegaLiteSchema):
+ """TitleConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ align : :class:`Align`
+
+ anchor : :class:`TitleAnchor`
+ The anchor position for placing the title. One of ``"start"``, ``"middle"``, or
+ ``"end"``. For example, with an orientation of top these anchor positions map to a
+ left-, center-, or right-aligned title.
+ angle : float
+ Angle in degrees of title text.
+ baseline : :class:`TextBaseline`
+ Vertical text baseline for title text. One of ``"top"``, ``"middle"``, ``"bottom"``,
+ or ``"alphabetic"``.
+ color : :class:`Color`
+ Text color for title text.
+ dx : float
+ Delta offset for title text x-coordinate.
+ dy : float
+ Delta offset for title text y-coordinate.
+ font : string
+ Font name for title text.
+ fontSize : float
+ Font size in pixels for title text.
+
+ **Default value:** ``10``.
+ fontStyle : :class:`FontStyle`
+ Font style for title text.
+ fontWeight : :class:`FontWeight`
+ Font weight for title text.
+ This can be either a string (e.g ``"bold"``, ``"normal"`` ) or a number ( ``100``,
+ ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and ``"bold"`` = ``700``
+ ).
+ frame : :class:`TitleFrame`
+ The reference frame for the anchor position, one of ``"bounds"`` (to anchor relative
+ to the full bounding box) or ``"group"`` (to anchor relative to the group width or
+ height).
+ limit : float
+ The maximum allowed length in pixels of legend labels.
+ offset : float
+ The orthogonal offset in pixels by which to displace the title from its position
+ along the edge of the chart.
+ orient : :class:`TitleOrient`
+ Default title orientation ( ``"top"``, ``"bottom"``, ``"left"``, or ``"right"`` )
+ """
+ _schema = {'$ref': '#/definitions/TitleConfig'}
+
+ def __init__(self, align=Undefined, anchor=Undefined, angle=Undefined, baseline=Undefined,
+ color=Undefined, dx=Undefined, dy=Undefined, font=Undefined, fontSize=Undefined,
+ fontStyle=Undefined, fontWeight=Undefined, frame=Undefined, limit=Undefined,
+ offset=Undefined, orient=Undefined, **kwds):
+ super(TitleConfig, self).__init__(align=align, anchor=anchor, angle=angle, baseline=baseline,
+ color=color, dx=dx, dy=dy, font=font, fontSize=fontSize,
+ fontStyle=fontStyle, fontWeight=fontWeight, frame=frame,
+ limit=limit, offset=offset, orient=orient, **kwds)
+
+
+class TitleFrame(VegaLiteSchema):
+ """TitleFrame schema wrapper
+
+ enum('bounds', 'group')
+ """
+ _schema = {'$ref': '#/definitions/TitleFrame'}
+
+ def __init__(self, *args):
+ super(TitleFrame, self).__init__(*args)
+
+
+class TitleOrient(VegaLiteSchema):
+ """TitleOrient schema wrapper
+
+ enum('none', 'left', 'right', 'top', 'bottom')
+ """
+ _schema = {'$ref': '#/definitions/TitleOrient'}
+
+ def __init__(self, *args):
+ super(TitleOrient, self).__init__(*args)
+
+
+class TitleParams(VegaLiteSchema):
+ """TitleParams schema wrapper
+
+ Mapping(required=[text])
+
+ Attributes
+ ----------
+
+ text : string
+ The title text.
+ align : :class:`Align`
+
+ anchor : :class:`TitleAnchor`
+ The anchor position for placing the title. One of ``"start"``, ``"middle"``, or
+ ``"end"``. For example, with an orientation of top these anchor positions map to a
+ left-, center-, or right-aligned title.
+
+ **Default value:** ``"middle"`` for `single
+ <https://vega.github.io/vega-lite/docs/spec.html>`__ and `layered
+ <https://vega.github.io/vega-lite/docs/layer.html>`__ views.
+ ``"start"`` for other composite views.
+
+ **Note:** `For now <https://github.com/vega/vega-lite/issues/2875>`__, ``anchor`` is
+ only customizable only for `single
+ <https://vega.github.io/vega-lite/docs/spec.html>`__ and `layered
+ <https://vega.github.io/vega-lite/docs/layer.html>`__ views. For other composite
+ views, ``anchor`` is always ``"start"``.
+ angle : float
+ Angle in degrees of title text.
+ baseline : :class:`TextBaseline`
+ Vertical text baseline for title text. One of ``"top"``, ``"middle"``, ``"bottom"``,
+ or ``"alphabetic"``.
+ color : :class:`Color`
+ Text color for title text.
+ dx : float
+ Delta offset for title text x-coordinate.
+ dy : float
+ Delta offset for title text y-coordinate.
+ font : string
+ Font name for title text.
+ fontSize : float
+ Font size in pixels for title text.
+
+ **Default value:** ``10``.
+ fontStyle : :class:`FontStyle`
+ Font style for title text.
+ fontWeight : :class:`FontWeight`
+ Font weight for title text.
+ This can be either a string (e.g ``"bold"``, ``"normal"`` ) or a number ( ``100``,
+ ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and ``"bold"`` = ``700``
+ ).
+ frame : :class:`TitleFrame`
+ The reference frame for the anchor position, one of ``"bounds"`` (to anchor relative
+ to the full bounding box) or ``"group"`` (to anchor relative to the group width or
+ height).
+ limit : float
+ The maximum allowed length in pixels of legend labels.
+ offset : float
+ The orthogonal offset in pixels by which to displace the title from its position
+ along the edge of the chart.
+ orient : :class:`TitleOrient`
+ Default title orientation ( ``"top"``, ``"bottom"``, ``"left"``, or ``"right"`` )
+ style : anyOf(string, List(string))
+ A `mark style property <https://vega.github.io/vega-lite/docs/config.html#style>`__
+ to apply to the title text mark.
+
+ **Default value:** ``"group-title"``.
+ zindex : float
+ The integer z-index indicating the layering of the title group relative to other
+ axis, mark and legend groups.
+
+ **Default value:** ``0``.
+ """
+ _schema = {'$ref': '#/definitions/TitleParams'}
+
+ def __init__(self, text=Undefined, align=Undefined, anchor=Undefined, angle=Undefined,
+ baseline=Undefined, color=Undefined, dx=Undefined, dy=Undefined, font=Undefined,
+ fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined, frame=Undefined,
+ limit=Undefined, offset=Undefined, orient=Undefined, style=Undefined, zindex=Undefined,
+ **kwds):
+ super(TitleParams, self).__init__(text=text, align=align, anchor=anchor, angle=angle,
+ baseline=baseline, color=color, dx=dx, dy=dy, font=font,
+ fontSize=fontSize, fontStyle=fontStyle, fontWeight=fontWeight,
+ frame=frame, limit=limit, offset=offset, orient=orient,
+ style=style, zindex=zindex, **kwds)
+
+
+class TooltipContent(VegaLiteSchema):
+ """TooltipContent schema wrapper
+
+ Mapping(required=[content])
+
+ Attributes
+ ----------
+
+ content : enum('encoding', 'data')
+
+ """
+ _schema = {'$ref': '#/definitions/TooltipContent'}
+
+ def __init__(self, content=Undefined, **kwds):
+ super(TooltipContent, self).__init__(content=content, **kwds)
+
+
+class TopLevelSpec(VegaLiteSchema):
+ """TopLevelSpec schema wrapper
+
+ anyOf(:class:`TopLevelUnitSpec`, :class:`TopLevelFacetSpec`, :class:`TopLevelLayerSpec`,
+ :class:`TopLevelRepeatSpec`, :class:`TopLevelConcatSpec`, :class:`TopLevelVConcatSpec`,
+ :class:`TopLevelHConcatSpec`)
+ A Vega-Lite top-level specification.
+ This is the root class for all Vega-Lite specifications.
+ (The json schema is generated from this type.)
+ """
+ _schema = {'$ref': '#/definitions/TopLevelSpec'}
+
+ def __init__(self, *args, **kwds):
+ super(TopLevelSpec, self).__init__(*args, **kwds)
+
+
+class TopLevelConcatSpec(TopLevelSpec):
+ """TopLevelConcatSpec schema wrapper
+
+ Mapping(required=[concat])
+
+ Attributes
+ ----------
+
+ concat : List(:class:`Spec`)
+ A list of views to be concatenated.
+ align : anyOf(:class:`LayoutAlign`, :class:`RowColLayoutAlign`)
+ The alignment to apply to grid rows and columns.
+ The supported string values are ``"all"``, ``"each"``, and ``"none"``.
+
+
+ * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply
+ placed one after the other.
+ * For ``"each"``, subviews will be aligned into a clean grid structure, but each row
+ or column may be of variable size.
+ * For ``"all"``, subviews will be aligned and each row or column will be sized
+ identically based on the maximum observed size. String values for this property
+ will be applied to both grid rows and columns.
+
+ Alternatively, an object value of the form ``{"row": string, "column": string}`` can
+ be used to supply different alignments for rows and columns.
+
+ **Default value:** ``"all"``.
+ autosize : anyOf(:class:`AutosizeType`, :class:`AutoSizeParams`)
+ Sets how the visualization size should be determined. If a string, should be one of
+ ``"pad"``, ``"fit"`` or ``"none"``.
+ Object values can additionally specify parameters for content sizing and automatic
+ resizing.
+ ``"fit"`` is only supported for single and layered views that don't use
+ ``rangeStep``.
+
+ **Default value** : ``pad``
+ background : string
+ CSS color property to use as the background of the entire view.
+
+ **Default value:** none (transparent)
+ bounds : enum('full', 'flush')
+ The bounds calculation method to use for determining the extent of a sub-plot. One
+ of ``full`` (the default) or ``flush``.
+
+
+ * If set to ``full``, the entire calculated bounds (including axes, title, and
+ legend) will be used.
+ * If set to ``flush``, only the specified width and height values for the sub-view
+ will be used. The ``flush`` setting can be useful when attempting to place
+ sub-plots without axes or legends into a uniform grid structure.
+
+ **Default value:** ``"full"``
+ center : anyOf(boolean, :class:`RowColboolean`)
+ Boolean flag indicating if subviews should be centered relative to their respective
+ rows or columns.
+
+ An object value of the form ``{"row": boolean, "column": boolean}`` can be used to
+ supply different centering values for rows and columns.
+
+ **Default value:** ``false``
+ columns : float
+ The number of columns to include in the view composition layout.
+
+ **Default value** : ``undefined`` -- An infinite number of columns (a single row)
+ will be assumed. This is equivalent to
+ ``hconcat`` (for ``concat`` ) and to using the ``column`` channel (for ``facet`` and
+ ``repeat`` ).
+
+ **Note** :
+
+ 1) This property is only for:
+
+
+ * the general (wrappable) ``concat`` operator (not ``hconcat`` / ``vconcat`` )
+ * the ``facet`` and ``repeat`` operator with one field/repetition definition
+ (without row/column nesting)
+
+ 2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat`` )
+ and to using the ``row`` channel (for ``facet`` and ``repeat`` ).
+ config : :class:`Config`
+ Vega-Lite configuration object. This property can only be defined at the top-level
+ of a specification.
+ data : anyOf(:class:`Data`, None)
+ An object describing the data source. Set to ``null`` to ignore the parent's data
+ source. If no data is set, it is derived from the parent.
+ datasets : :class:`Datasets`
+ A global data store for named datasets. This is a mapping from names to inline
+ datasets.
+ This can be an array of objects or primitive values or a string. Arrays of primitive
+ values are ingested as objects with a ``data`` property.
+ description : string
+ Description of this mark for commenting purpose.
+ name : string
+ Name of the visualization for later reference.
+ padding : :class:`Padding`
+ The default visualization padding, in pixels, from the edge of the visualization
+ canvas to the data rectangle. If a number, specifies padding for all sides.
+ If an object, the value should have the format ``{"left": 5, "top": 5, "right": 5,
+ "bottom": 5}`` to specify padding for each side of the visualization.
+
+ **Default value** : ``5``
+ resolve : :class:`Resolve`
+ Scale, axis, and legend resolutions for view composition specifications.
+ spacing : anyOf(float, :class:`RowColnumber`)
+ The spacing in pixels between sub-views of the composition operator.
+ An object of the form ``{"row": number, "column": number}`` can be used to set
+ different spacing values for rows and columns.
+
+ **Default value** : Depends on ``"spacing"`` property of `the view composition
+ configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__ (
+ ``20`` by default)
+ title : anyOf(string, :class:`TitleParams`)
+ Title for the plot.
+ transform : List(:class:`Transform`)
+ An array of data transformations such as filter and new field calculation.
+ usermeta : Mapping(required=[])
+ Optional metadata that will be passed to Vega.
+ This object is completely ignored by Vega and Vega-Lite and can be used for custom
+ metadata.
+ $schema : string
+ URL to `JSON schema <http://json-schema.org/>`__ for a Vega-Lite specification.
+ Unless you have a reason to change this, use
+ ``https://vega.github.io/schema/vega-lite/v3.json``. Setting the ``$schema``
+ property allows automatic validation and autocomplete in editors that support JSON
+ schema.
+ """
+ _schema = {'$ref': '#/definitions/TopLevelConcatSpec'}
+
+ def __init__(self, concat=Undefined, align=Undefined, autosize=Undefined, background=Undefined,
+ bounds=Undefined, center=Undefined, columns=Undefined, config=Undefined,
+ data=Undefined, datasets=Undefined, description=Undefined, name=Undefined,
+ padding=Undefined, resolve=Undefined, spacing=Undefined, title=Undefined,
+ transform=Undefined, usermeta=Undefined, **kwds):
+ super(TopLevelConcatSpec, self).__init__(concat=concat, align=align, autosize=autosize,
+ background=background, bounds=bounds, center=center,
+ columns=columns, config=config, data=data,
+ datasets=datasets, description=description, name=name,
+ padding=padding, resolve=resolve, spacing=spacing,
+ title=title, transform=transform, usermeta=usermeta,
+ **kwds)
+
+
+class TopLevelFacetSpec(TopLevelSpec):
+ """TopLevelFacetSpec schema wrapper
+
+ Mapping(required=[data, facet, spec])
+
+ Attributes
+ ----------
+
+ data : anyOf(:class:`Data`, None)
+ An object describing the data source. Set to ``null`` to ignore the parent's data
+ source. If no data is set, it is derived from the parent.
+ facet : anyOf(:class:`FacetFieldDef`, :class:`FacetMapping`)
+ Definition for how to facet the data. One of:
+ 1) `a field definition for faceting the plot by one field
+ <https://vega.github.io/vega-lite/docs/facet.html#field-def>`__
+ 2) `An object that maps row and column channels to their field definitions
+ <https://vega.github.io/vega-lite/docs/facet.html#mapping>`__
+ spec : anyOf(:class:`LayerSpec`, :class:`FacetedUnitSpec`)
+ A specification of the view that gets faceted.
+ align : anyOf(:class:`LayoutAlign`, :class:`RowColLayoutAlign`)
+ The alignment to apply to grid rows and columns.
+ The supported string values are ``"all"``, ``"each"``, and ``"none"``.
+
+
+ * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply
+ placed one after the other.
+ * For ``"each"``, subviews will be aligned into a clean grid structure, but each row
+ or column may be of variable size.
+ * For ``"all"``, subviews will be aligned and each row or column will be sized
+ identically based on the maximum observed size. String values for this property
+ will be applied to both grid rows and columns.
+
+ Alternatively, an object value of the form ``{"row": string, "column": string}`` can
+ be used to supply different alignments for rows and columns.
+
+ **Default value:** ``"all"``.
+ autosize : anyOf(:class:`AutosizeType`, :class:`AutoSizeParams`)
+ Sets how the visualization size should be determined. If a string, should be one of
+ ``"pad"``, ``"fit"`` or ``"none"``.
+ Object values can additionally specify parameters for content sizing and automatic
+ resizing.
+ ``"fit"`` is only supported for single and layered views that don't use
+ ``rangeStep``.
+
+ **Default value** : ``pad``
+ background : string
+ CSS color property to use as the background of the entire view.
+
+ **Default value:** none (transparent)
+ bounds : enum('full', 'flush')
+ The bounds calculation method to use for determining the extent of a sub-plot. One
+ of ``full`` (the default) or ``flush``.
+
+
+ * If set to ``full``, the entire calculated bounds (including axes, title, and
+ legend) will be used.
+ * If set to ``flush``, only the specified width and height values for the sub-view
+ will be used. The ``flush`` setting can be useful when attempting to place
+ sub-plots without axes or legends into a uniform grid structure.
+
+ **Default value:** ``"full"``
+ center : anyOf(boolean, :class:`RowColboolean`)
+ Boolean flag indicating if subviews should be centered relative to their respective
+ rows or columns.
+
+ An object value of the form ``{"row": boolean, "column": boolean}`` can be used to
+ supply different centering values for rows and columns.
+
+ **Default value:** ``false``
+ columns : float
+ The number of columns to include in the view composition layout.
+
+ **Default value** : ``undefined`` -- An infinite number of columns (a single row)
+ will be assumed. This is equivalent to
+ ``hconcat`` (for ``concat`` ) and to using the ``column`` channel (for ``facet`` and
+ ``repeat`` ).
+
+ **Note** :
+
+ 1) This property is only for:
+
+
+ * the general (wrappable) ``concat`` operator (not ``hconcat`` / ``vconcat`` )
+ * the ``facet`` and ``repeat`` operator with one field/repetition definition
+ (without row/column nesting)
+
+ 2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat`` )
+ and to using the ``row`` channel (for ``facet`` and ``repeat`` ).
+ config : :class:`Config`
+ Vega-Lite configuration object. This property can only be defined at the top-level
+ of a specification.
+ datasets : :class:`Datasets`
+ A global data store for named datasets. This is a mapping from names to inline
+ datasets.
+ This can be an array of objects or primitive values or a string. Arrays of primitive
+ values are ingested as objects with a ``data`` property.
+ description : string
+ Description of this mark for commenting purpose.
+ name : string
+ Name of the visualization for later reference.
+ padding : :class:`Padding`
+ The default visualization padding, in pixels, from the edge of the visualization
+ canvas to the data rectangle. If a number, specifies padding for all sides.
+ If an object, the value should have the format ``{"left": 5, "top": 5, "right": 5,
+ "bottom": 5}`` to specify padding for each side of the visualization.
+
+ **Default value** : ``5``
+ resolve : :class:`Resolve`
+ Scale, axis, and legend resolutions for view composition specifications.
+ spacing : anyOf(float, :class:`RowColnumber`)
+ The spacing in pixels between sub-views of the composition operator.
+ An object of the form ``{"row": number, "column": number}`` can be used to set
+ different spacing values for rows and columns.
+
+ **Default value** : Depends on ``"spacing"`` property of `the view composition
+ configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__ (
+ ``20`` by default)
+ title : anyOf(string, :class:`TitleParams`)
+ Title for the plot.
+ transform : List(:class:`Transform`)
+ An array of data transformations such as filter and new field calculation.
+ usermeta : Mapping(required=[])
+ Optional metadata that will be passed to Vega.
+ This object is completely ignored by Vega and Vega-Lite and can be used for custom
+ metadata.
+ $schema : string
+ URL to `JSON schema <http://json-schema.org/>`__ for a Vega-Lite specification.
+ Unless you have a reason to change this, use
+ ``https://vega.github.io/schema/vega-lite/v3.json``. Setting the ``$schema``
+ property allows automatic validation and autocomplete in editors that support JSON
+ schema.
+ """
+ _schema = {'$ref': '#/definitions/TopLevelFacetSpec'}
+
+ def __init__(self, data=Undefined, facet=Undefined, spec=Undefined, align=Undefined,
+ autosize=Undefined, background=Undefined, bounds=Undefined, center=Undefined,
+ columns=Undefined, config=Undefined, datasets=Undefined, description=Undefined,
+ name=Undefined, padding=Undefined, resolve=Undefined, spacing=Undefined,
+ title=Undefined, transform=Undefined, usermeta=Undefined, **kwds):
+ super(TopLevelFacetSpec, self).__init__(data=data, facet=facet, spec=spec, align=align,
+ autosize=autosize, background=background, bounds=bounds,
+ center=center, columns=columns, config=config,
+ datasets=datasets, description=description, name=name,
+ padding=padding, resolve=resolve, spacing=spacing,
+ title=title, transform=transform, usermeta=usermeta,
+ **kwds)
+
+
+class TopLevelHConcatSpec(TopLevelSpec):
+ """TopLevelHConcatSpec schema wrapper
+
+ Mapping(required=[hconcat])
+
+ Attributes
+ ----------
+
+ hconcat : List(:class:`Spec`)
+ A list of views to be concatenated and put into a row.
+ autosize : anyOf(:class:`AutosizeType`, :class:`AutoSizeParams`)
+ Sets how the visualization size should be determined. If a string, should be one of
+ ``"pad"``, ``"fit"`` or ``"none"``.
+ Object values can additionally specify parameters for content sizing and automatic
+ resizing.
+ ``"fit"`` is only supported for single and layered views that don't use
+ ``rangeStep``.
+
+ **Default value** : ``pad``
+ background : string
+ CSS color property to use as the background of the entire view.
+
+ **Default value:** none (transparent)
+ bounds : enum('full', 'flush')
+ The bounds calculation method to use for determining the extent of a sub-plot. One
+ of ``full`` (the default) or ``flush``.
+
+
+ * If set to ``full``, the entire calculated bounds (including axes, title, and
+ legend) will be used.
+ * If set to ``flush``, only the specified width and height values for the sub-view
+ will be used. The ``flush`` setting can be useful when attempting to place
+ sub-plots without axes or legends into a uniform grid structure.
+
+ **Default value:** ``"full"``
+ center : boolean
+ Boolean flag indicating if subviews should be centered relative to their respective
+ rows or columns.
+
+ **Default value:** ``false``
+ config : :class:`Config`
+ Vega-Lite configuration object. This property can only be defined at the top-level
+ of a specification.
+ data : anyOf(:class:`Data`, None)
+ An object describing the data source. Set to ``null`` to ignore the parent's data
+ source. If no data is set, it is derived from the parent.
+ datasets : :class:`Datasets`
+ A global data store for named datasets. This is a mapping from names to inline
+ datasets.
+ This can be an array of objects or primitive values or a string. Arrays of primitive
+ values are ingested as objects with a ``data`` property.
+ description : string
+ Description of this mark for commenting purpose.
+ name : string
+ Name of the visualization for later reference.
+ padding : :class:`Padding`
+ The default visualization padding, in pixels, from the edge of the visualization
+ canvas to the data rectangle. If a number, specifies padding for all sides.
+ If an object, the value should have the format ``{"left": 5, "top": 5, "right": 5,
+ "bottom": 5}`` to specify padding for each side of the visualization.
+
+ **Default value** : ``5``
+ resolve : :class:`Resolve`
+ Scale, axis, and legend resolutions for view composition specifications.
+ spacing : float
+ The spacing in pixels between sub-views of the concat operator.
+
+ **Default value** : ``10``
+ title : anyOf(string, :class:`TitleParams`)
+ Title for the plot.
+ transform : List(:class:`Transform`)
+ An array of data transformations such as filter and new field calculation.
+ usermeta : Mapping(required=[])
+ Optional metadata that will be passed to Vega.
+ This object is completely ignored by Vega and Vega-Lite and can be used for custom
+ metadata.
+ $schema : string
+ URL to `JSON schema <http://json-schema.org/>`__ for a Vega-Lite specification.
+ Unless you have a reason to change this, use
+ ``https://vega.github.io/schema/vega-lite/v3.json``. Setting the ``$schema``
+ property allows automatic validation and autocomplete in editors that support JSON
+ schema.
+ """
+ _schema = {'$ref': '#/definitions/TopLevelHConcatSpec'}
+
+ def __init__(self, hconcat=Undefined, autosize=Undefined, background=Undefined, bounds=Undefined,
+ center=Undefined, config=Undefined, data=Undefined, datasets=Undefined,
+ description=Undefined, name=Undefined, padding=Undefined, resolve=Undefined,
+ spacing=Undefined, title=Undefined, transform=Undefined, usermeta=Undefined, **kwds):
+ super(TopLevelHConcatSpec, self).__init__(hconcat=hconcat, autosize=autosize,
+ background=background, bounds=bounds, center=center,
+ config=config, data=data, datasets=datasets,
+ description=description, name=name, padding=padding,
+ resolve=resolve, spacing=spacing, title=title,
+ transform=transform, usermeta=usermeta, **kwds)
+
+
+class TopLevelLayerSpec(TopLevelSpec):
+ """TopLevelLayerSpec schema wrapper
+
+ Mapping(required=[layer])
+
+ Attributes
+ ----------
+
+ layer : List(anyOf(:class:`LayerSpec`, :class:`UnitSpec`))
+ Layer or single view specifications to be layered.
+
+ **Note** : Specifications inside ``layer`` cannot use ``row`` and ``column``
+ channels as layering facet specifications is not allowed. Instead, use the `facet
+ operator <https://vega.github.io/vega-lite/docs/facet.html>`__ and place a layer
+ inside a facet.
+ autosize : anyOf(:class:`AutosizeType`, :class:`AutoSizeParams`)
+ Sets how the visualization size should be determined. If a string, should be one of
+ ``"pad"``, ``"fit"`` or ``"none"``.
+ Object values can additionally specify parameters for content sizing and automatic
+ resizing.
+ ``"fit"`` is only supported for single and layered views that don't use
+ ``rangeStep``.
+
+ **Default value** : ``pad``
+ background : string
+ CSS color property to use as the background of the entire view.
+
+ **Default value:** none (transparent)
+ config : :class:`Config`
+ Vega-Lite configuration object. This property can only be defined at the top-level
+ of a specification.
+ data : anyOf(:class:`Data`, None)
+ An object describing the data source. Set to ``null`` to ignore the parent's data
+ source. If no data is set, it is derived from the parent.
+ datasets : :class:`Datasets`
+ A global data store for named datasets. This is a mapping from names to inline
+ datasets.
+ This can be an array of objects or primitive values or a string. Arrays of primitive
+ values are ingested as objects with a ``data`` property.
+ description : string
+ Description of this mark for commenting purpose.
+ encoding : :class:`Encoding`
+ A shared key-value mapping between encoding channels and definition of fields in the
+ underlying layers.
+ height : float
+ The height of a visualization.
+
+ **Default value:**
+
+
+ * If a view's `autosize
+ <https://vega.github.io/vega-lite/docs/size.html#autosize>`__ type is ``"fit"`` or
+ its y-channel has a `continuous scale
+ <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__, the height will
+ be the value of `config.view.height
+ <https://vega.github.io/vega-lite/docs/spec.html#config>`__.
+ * For y-axis with a band or point scale: if `rangeStep
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__ is a numeric value or
+ unspecified, the height is `determined by the range step, paddings, and the
+ cardinality of the field mapped to y-channel
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__. Otherwise, if the
+ ``rangeStep`` is ``null``, the height will be the value of `config.view.height
+ <https://vega.github.io/vega-lite/docs/spec.html#config>`__.
+ * If no field is mapped to ``y`` channel, the ``height`` will be the value of
+ ``rangeStep``.
+
+ **Note** : For plots with `row and column channels
+ <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the
+ height of a single view.
+
+ **See also:** The documentation for `width and height
+ <https://vega.github.io/vega-lite/docs/size.html>`__ contains more examples.
+ name : string
+ Name of the visualization for later reference.
+ padding : :class:`Padding`
+ The default visualization padding, in pixels, from the edge of the visualization
+ canvas to the data rectangle. If a number, specifies padding for all sides.
+ If an object, the value should have the format ``{"left": 5, "top": 5, "right": 5,
+ "bottom": 5}`` to specify padding for each side of the visualization.
+
+ **Default value** : ``5``
+ projection : :class:`Projection`
+ An object defining properties of the geographic projection shared by underlying
+ layers.
+ resolve : :class:`Resolve`
+ Scale, axis, and legend resolutions for view composition specifications.
+ title : anyOf(string, :class:`TitleParams`)
+ Title for the plot.
+ transform : List(:class:`Transform`)
+ An array of data transformations such as filter and new field calculation.
+ usermeta : Mapping(required=[])
+ Optional metadata that will be passed to Vega.
+ This object is completely ignored by Vega and Vega-Lite and can be used for custom
+ metadata.
+ view : :class:`ViewBackground`
+ An object defining the view background's fill and stroke.
+
+ **Default value:** none (transparent)
+ width : float
+ The width of a visualization.
+
+ **Default value:** This will be determined by the following rules:
+
+
+ * If a view's `autosize
+ <https://vega.github.io/vega-lite/docs/size.html#autosize>`__ type is ``"fit"`` or
+ its x-channel has a `continuous scale
+ <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__, the width will
+ be the value of `config.view.width
+ <https://vega.github.io/vega-lite/docs/spec.html#config>`__.
+ * For x-axis with a band or point scale: if `rangeStep
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__ is a numeric value or
+ unspecified, the width is `determined by the range step, paddings, and the
+ cardinality of the field mapped to x-channel
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__. Otherwise, if the
+ ``rangeStep`` is ``null``, the width will be the value of `config.view.width
+ <https://vega.github.io/vega-lite/docs/spec.html#config>`__.
+ * If no field is mapped to ``x`` channel, the ``width`` will be the value of
+ `config.scale.textXRangeStep
+ <https://vega.github.io/vega-lite/docs/size.html#default-width-and-height>`__ for
+ ``text`` mark and the value of ``rangeStep`` for other marks.
+
+ **Note:** For plots with `row and column channels
+ <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the
+ width of a single view.
+
+ **See also:** The documentation for `width and height
+ <https://vega.github.io/vega-lite/docs/size.html>`__ contains more examples.
+ $schema : string
+ URL to `JSON schema <http://json-schema.org/>`__ for a Vega-Lite specification.
+ Unless you have a reason to change this, use
+ ``https://vega.github.io/schema/vega-lite/v3.json``. Setting the ``$schema``
+ property allows automatic validation and autocomplete in editors that support JSON
+ schema.
+ """
+ _schema = {'$ref': '#/definitions/TopLevelLayerSpec'}
+
+ def __init__(self, layer=Undefined, autosize=Undefined, background=Undefined, config=Undefined,
+ data=Undefined, datasets=Undefined, description=Undefined, encoding=Undefined,
+ height=Undefined, name=Undefined, padding=Undefined, projection=Undefined,
+ resolve=Undefined, title=Undefined, transform=Undefined, usermeta=Undefined,
+ view=Undefined, width=Undefined, **kwds):
+ super(TopLevelLayerSpec, self).__init__(layer=layer, autosize=autosize, background=background,
+ config=config, data=data, datasets=datasets,
+ description=description, encoding=encoding,
+ height=height, name=name, padding=padding,
+ projection=projection, resolve=resolve, title=title,
+ transform=transform, usermeta=usermeta, view=view,
+ width=width, **kwds)
+
+
+class TopLevelRepeatSpec(TopLevelSpec):
+ """TopLevelRepeatSpec schema wrapper
+
+ Mapping(required=[repeat, spec])
+
+ Attributes
+ ----------
+
+ repeat : anyOf(List(string), :class:`RepeatMapping`)
+ Definition for fields to be repeated. One of:
+ 1) An array of fields to be repeated. If ``"repeat"`` is an array, the field can be
+ referred using ``{"repeat": "repeat"}``
+ 2) An object that mapped ``"row"`` and/or ``"column"`` to the listed of fields to be
+ repeated along the particular orientations. The objects ``{"repeat": "row"}`` and
+ ``{"repeat": "column"}`` can be used to refer to the repeated field respectively.
+ spec : :class:`Spec`
+ A specification of the view that gets repeated.
+ align : anyOf(:class:`LayoutAlign`, :class:`RowColLayoutAlign`)
+ The alignment to apply to grid rows and columns.
+ The supported string values are ``"all"``, ``"each"``, and ``"none"``.
+
+
+ * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply
+ placed one after the other.
+ * For ``"each"``, subviews will be aligned into a clean grid structure, but each row
+ or column may be of variable size.
+ * For ``"all"``, subviews will be aligned and each row or column will be sized
+ identically based on the maximum observed size. String values for this property
+ will be applied to both grid rows and columns.
+
+ Alternatively, an object value of the form ``{"row": string, "column": string}`` can
+ be used to supply different alignments for rows and columns.
+
+ **Default value:** ``"all"``.
+ autosize : anyOf(:class:`AutosizeType`, :class:`AutoSizeParams`)
+ Sets how the visualization size should be determined. If a string, should be one of
+ ``"pad"``, ``"fit"`` or ``"none"``.
+ Object values can additionally specify parameters for content sizing and automatic
+ resizing.
+ ``"fit"`` is only supported for single and layered views that don't use
+ ``rangeStep``.
+
+ **Default value** : ``pad``
+ background : string
+ CSS color property to use as the background of the entire view.
+
+ **Default value:** none (transparent)
+ bounds : enum('full', 'flush')
+ The bounds calculation method to use for determining the extent of a sub-plot. One
+ of ``full`` (the default) or ``flush``.
+
+
+ * If set to ``full``, the entire calculated bounds (including axes, title, and
+ legend) will be used.
+ * If set to ``flush``, only the specified width and height values for the sub-view
+ will be used. The ``flush`` setting can be useful when attempting to place
+ sub-plots without axes or legends into a uniform grid structure.
+
+ **Default value:** ``"full"``
+ center : anyOf(boolean, :class:`RowColboolean`)
+ Boolean flag indicating if subviews should be centered relative to their respective
+ rows or columns.
+
+ An object value of the form ``{"row": boolean, "column": boolean}`` can be used to
+ supply different centering values for rows and columns.
+
+ **Default value:** ``false``
+ columns : float
+ The number of columns to include in the view composition layout.
+
+ **Default value** : ``undefined`` -- An infinite number of columns (a single row)
+ will be assumed. This is equivalent to
+ ``hconcat`` (for ``concat`` ) and to using the ``column`` channel (for ``facet`` and
+ ``repeat`` ).
+
+ **Note** :
+
+ 1) This property is only for:
+
+
+ * the general (wrappable) ``concat`` operator (not ``hconcat`` / ``vconcat`` )
+ * the ``facet`` and ``repeat`` operator with one field/repetition definition
+ (without row/column nesting)
+
+ 2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat`` )
+ and to using the ``row`` channel (for ``facet`` and ``repeat`` ).
+ config : :class:`Config`
+ Vega-Lite configuration object. This property can only be defined at the top-level
+ of a specification.
+ data : anyOf(:class:`Data`, None)
+ An object describing the data source. Set to ``null`` to ignore the parent's data
+ source. If no data is set, it is derived from the parent.
+ datasets : :class:`Datasets`
+ A global data store for named datasets. This is a mapping from names to inline
+ datasets.
+ This can be an array of objects or primitive values or a string. Arrays of primitive
+ values are ingested as objects with a ``data`` property.
+ description : string
+ Description of this mark for commenting purpose.
+ name : string
+ Name of the visualization for later reference.
+ padding : :class:`Padding`
+ The default visualization padding, in pixels, from the edge of the visualization
+ canvas to the data rectangle. If a number, specifies padding for all sides.
+ If an object, the value should have the format ``{"left": 5, "top": 5, "right": 5,
+ "bottom": 5}`` to specify padding for each side of the visualization.
+
+ **Default value** : ``5``
+ resolve : :class:`Resolve`
+ Scale, axis, and legend resolutions for view composition specifications.
+ spacing : anyOf(float, :class:`RowColnumber`)
+ The spacing in pixels between sub-views of the composition operator.
+ An object of the form ``{"row": number, "column": number}`` can be used to set
+ different spacing values for rows and columns.
+
+ **Default value** : Depends on ``"spacing"`` property of `the view composition
+ configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__ (
+ ``20`` by default)
+ title : anyOf(string, :class:`TitleParams`)
+ Title for the plot.
+ transform : List(:class:`Transform`)
+ An array of data transformations such as filter and new field calculation.
+ usermeta : Mapping(required=[])
+ Optional metadata that will be passed to Vega.
+ This object is completely ignored by Vega and Vega-Lite and can be used for custom
+ metadata.
+ $schema : string
+ URL to `JSON schema <http://json-schema.org/>`__ for a Vega-Lite specification.
+ Unless you have a reason to change this, use
+ ``https://vega.github.io/schema/vega-lite/v3.json``. Setting the ``$schema``
+ property allows automatic validation and autocomplete in editors that support JSON
+ schema.
+ """
+ _schema = {'$ref': '#/definitions/TopLevelRepeatSpec'}
+
+ def __init__(self, repeat=Undefined, spec=Undefined, align=Undefined, autosize=Undefined,
+ background=Undefined, bounds=Undefined, center=Undefined, columns=Undefined,
+ config=Undefined, data=Undefined, datasets=Undefined, description=Undefined,
+ name=Undefined, padding=Undefined, resolve=Undefined, spacing=Undefined,
+ title=Undefined, transform=Undefined, usermeta=Undefined, **kwds):
+ super(TopLevelRepeatSpec, self).__init__(repeat=repeat, spec=spec, align=align,
+ autosize=autosize, background=background,
+ bounds=bounds, center=center, columns=columns,
+ config=config, data=data, datasets=datasets,
+ description=description, name=name, padding=padding,
+ resolve=resolve, spacing=spacing, title=title,
+ transform=transform, usermeta=usermeta, **kwds)
+
+
+class TopLevelUnitSpec(TopLevelSpec):
+ """TopLevelUnitSpec schema wrapper
+
+ Mapping(required=[data, mark])
+
+ Attributes
+ ----------
+
+ data : anyOf(:class:`Data`, None)
+ An object describing the data source. Set to ``null`` to ignore the parent's data
+ source. If no data is set, it is derived from the parent.
+ mark : :class:`AnyMark`
+ A string describing the mark type (one of ``"bar"``, ``"circle"``, ``"square"``,
+ ``"tick"``, ``"line"``,
+ ``"area"``, ``"point"``, ``"rule"``, ``"geoshape"``, and ``"text"`` ) or a `mark
+ definition object <https://vega.github.io/vega-lite/docs/mark.html#mark-def>`__.
+ align : anyOf(:class:`LayoutAlign`, :class:`RowColLayoutAlign`)
+ The alignment to apply to grid rows and columns.
+ The supported string values are ``"all"``, ``"each"``, and ``"none"``.
+
+
+ * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply
+ placed one after the other.
+ * For ``"each"``, subviews will be aligned into a clean grid structure, but each row
+ or column may be of variable size.
+ * For ``"all"``, subviews will be aligned and each row or column will be sized
+ identically based on the maximum observed size. String values for this property
+ will be applied to both grid rows and columns.
+
+ Alternatively, an object value of the form ``{"row": string, "column": string}`` can
+ be used to supply different alignments for rows and columns.
+
+ **Default value:** ``"all"``.
+ autosize : anyOf(:class:`AutosizeType`, :class:`AutoSizeParams`)
+ Sets how the visualization size should be determined. If a string, should be one of
+ ``"pad"``, ``"fit"`` or ``"none"``.
+ Object values can additionally specify parameters for content sizing and automatic
+ resizing.
+ ``"fit"`` is only supported for single and layered views that don't use
+ ``rangeStep``.
+
+ **Default value** : ``pad``
+ background : string
+ CSS color property to use as the background of the entire view.
+
+ **Default value:** none (transparent)
+ bounds : enum('full', 'flush')
+ The bounds calculation method to use for determining the extent of a sub-plot. One
+ of ``full`` (the default) or ``flush``.
+
+
+ * If set to ``full``, the entire calculated bounds (including axes, title, and
+ legend) will be used.
+ * If set to ``flush``, only the specified width and height values for the sub-view
+ will be used. The ``flush`` setting can be useful when attempting to place
+ sub-plots without axes or legends into a uniform grid structure.
+
+ **Default value:** ``"full"``
+ center : anyOf(boolean, :class:`RowColboolean`)
+ Boolean flag indicating if subviews should be centered relative to their respective
+ rows or columns.
+
+ An object value of the form ``{"row": boolean, "column": boolean}`` can be used to
+ supply different centering values for rows and columns.
+
+ **Default value:** ``false``
+ columns : float
+ The number of columns to include in the view composition layout.
+
+ **Default value** : ``undefined`` -- An infinite number of columns (a single row)
+ will be assumed. This is equivalent to
+ ``hconcat`` (for ``concat`` ) and to using the ``column`` channel (for ``facet`` and
+ ``repeat`` ).
+
+ **Note** :
+
+ 1) This property is only for:
+
+
+ * the general (wrappable) ``concat`` operator (not ``hconcat`` / ``vconcat`` )
+ * the ``facet`` and ``repeat`` operator with one field/repetition definition
+ (without row/column nesting)
+
+ 2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat`` )
+ and to using the ``row`` channel (for ``facet`` and ``repeat`` ).
+ config : :class:`Config`
+ Vega-Lite configuration object. This property can only be defined at the top-level
+ of a specification.
+ datasets : :class:`Datasets`
+ A global data store for named datasets. This is a mapping from names to inline
+ datasets.
+ This can be an array of objects or primitive values or a string. Arrays of primitive
+ values are ingested as objects with a ``data`` property.
+ description : string
+ Description of this mark for commenting purpose.
+ encoding : :class:`FacetedEncoding`
+ A key-value mapping between encoding channels and definition of fields.
+ height : float
+ The height of a visualization.
+
+ **Default value:**
+
+
+ * If a view's `autosize
+ <https://vega.github.io/vega-lite/docs/size.html#autosize>`__ type is ``"fit"`` or
+ its y-channel has a `continuous scale
+ <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__, the height will
+ be the value of `config.view.height
+ <https://vega.github.io/vega-lite/docs/spec.html#config>`__.
+ * For y-axis with a band or point scale: if `rangeStep
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__ is a numeric value or
+ unspecified, the height is `determined by the range step, paddings, and the
+ cardinality of the field mapped to y-channel
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__. Otherwise, if the
+ ``rangeStep`` is ``null``, the height will be the value of `config.view.height
+ <https://vega.github.io/vega-lite/docs/spec.html#config>`__.
+ * If no field is mapped to ``y`` channel, the ``height`` will be the value of
+ ``rangeStep``.
+
+ **Note** : For plots with `row and column channels
+ <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the
+ height of a single view.
+
+ **See also:** The documentation for `width and height
+ <https://vega.github.io/vega-lite/docs/size.html>`__ contains more examples.
+ name : string
+ Name of the visualization for later reference.
+ padding : :class:`Padding`
+ The default visualization padding, in pixels, from the edge of the visualization
+ canvas to the data rectangle. If a number, specifies padding for all sides.
+ If an object, the value should have the format ``{"left": 5, "top": 5, "right": 5,
+ "bottom": 5}`` to specify padding for each side of the visualization.
+
+ **Default value** : ``5``
+ projection : :class:`Projection`
+ An object defining properties of geographic projection, which will be applied to
+ ``shape`` path for ``"geoshape"`` marks
+ and to ``latitude`` and ``"longitude"`` channels for other marks.
+ resolve : :class:`Resolve`
+ Scale, axis, and legend resolutions for view composition specifications.
+ selection : Mapping(required=[])
+ A key-value mapping between selection names and definitions.
+ spacing : anyOf(float, :class:`RowColnumber`)
+ The spacing in pixels between sub-views of the composition operator.
+ An object of the form ``{"row": number, "column": number}`` can be used to set
+ different spacing values for rows and columns.
+
+ **Default value** : Depends on ``"spacing"`` property of `the view composition
+ configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__ (
+ ``20`` by default)
+ title : anyOf(string, :class:`TitleParams`)
+ Title for the plot.
+ transform : List(:class:`Transform`)
+ An array of data transformations such as filter and new field calculation.
+ usermeta : Mapping(required=[])
+ Optional metadata that will be passed to Vega.
+ This object is completely ignored by Vega and Vega-Lite and can be used for custom
+ metadata.
+ view : :class:`ViewBackground`
+ An object defining the view background's fill and stroke.
+
+ **Default value:** none (transparent)
+ width : float
+ The width of a visualization.
+
+ **Default value:** This will be determined by the following rules:
+
+
+ * If a view's `autosize
+ <https://vega.github.io/vega-lite/docs/size.html#autosize>`__ type is ``"fit"`` or
+ its x-channel has a `continuous scale
+ <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__, the width will
+ be the value of `config.view.width
+ <https://vega.github.io/vega-lite/docs/spec.html#config>`__.
+ * For x-axis with a band or point scale: if `rangeStep
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__ is a numeric value or
+ unspecified, the width is `determined by the range step, paddings, and the
+ cardinality of the field mapped to x-channel
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__. Otherwise, if the
+ ``rangeStep`` is ``null``, the width will be the value of `config.view.width
+ <https://vega.github.io/vega-lite/docs/spec.html#config>`__.
+ * If no field is mapped to ``x`` channel, the ``width`` will be the value of
+ `config.scale.textXRangeStep
+ <https://vega.github.io/vega-lite/docs/size.html#default-width-and-height>`__ for
+ ``text`` mark and the value of ``rangeStep`` for other marks.
+
+ **Note:** For plots with `row and column channels
+ <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the
+ width of a single view.
+
+ **See also:** The documentation for `width and height
+ <https://vega.github.io/vega-lite/docs/size.html>`__ contains more examples.
+ $schema : string
+ URL to `JSON schema <http://json-schema.org/>`__ for a Vega-Lite specification.
+ Unless you have a reason to change this, use
+ ``https://vega.github.io/schema/vega-lite/v3.json``. Setting the ``$schema``
+ property allows automatic validation and autocomplete in editors that support JSON
+ schema.
+ """
+ _schema = {'$ref': '#/definitions/TopLevelUnitSpec'}
+
+ def __init__(self, data=Undefined, mark=Undefined, align=Undefined, autosize=Undefined,
+ background=Undefined, bounds=Undefined, center=Undefined, columns=Undefined,
+ config=Undefined, datasets=Undefined, description=Undefined, encoding=Undefined,
+ height=Undefined, name=Undefined, padding=Undefined, projection=Undefined,
+ resolve=Undefined, selection=Undefined, spacing=Undefined, title=Undefined,
+ transform=Undefined, usermeta=Undefined, view=Undefined, width=Undefined, **kwds):
+ super(TopLevelUnitSpec, self).__init__(data=data, mark=mark, align=align, autosize=autosize,
+ background=background, bounds=bounds, center=center,
+ columns=columns, config=config, datasets=datasets,
+ description=description, encoding=encoding,
+ height=height, name=name, padding=padding,
+ projection=projection, resolve=resolve,
+ selection=selection, spacing=spacing, title=title,
+ transform=transform, usermeta=usermeta, view=view,
+ width=width, **kwds)
+
+
+class TopLevelVConcatSpec(TopLevelSpec):
+ """TopLevelVConcatSpec schema wrapper
+
+ Mapping(required=[vconcat])
+
+ Attributes
+ ----------
+
+ vconcat : List(:class:`Spec`)
+ A list of views to be concatenated and put into a column.
+ autosize : anyOf(:class:`AutosizeType`, :class:`AutoSizeParams`)
+ Sets how the visualization size should be determined. If a string, should be one of
+ ``"pad"``, ``"fit"`` or ``"none"``.
+ Object values can additionally specify parameters for content sizing and automatic
+ resizing.
+ ``"fit"`` is only supported for single and layered views that don't use
+ ``rangeStep``.
+
+ **Default value** : ``pad``
+ background : string
+ CSS color property to use as the background of the entire view.
+
+ **Default value:** none (transparent)
+ bounds : enum('full', 'flush')
+ The bounds calculation method to use for determining the extent of a sub-plot. One
+ of ``full`` (the default) or ``flush``.
+
+
+ * If set to ``full``, the entire calculated bounds (including axes, title, and
+ legend) will be used.
+ * If set to ``flush``, only the specified width and height values for the sub-view
+ will be used. The ``flush`` setting can be useful when attempting to place
+ sub-plots without axes or legends into a uniform grid structure.
+
+ **Default value:** ``"full"``
+ center : boolean
+ Boolean flag indicating if subviews should be centered relative to their respective
+ rows or columns.
+
+ **Default value:** ``false``
+ config : :class:`Config`
+ Vega-Lite configuration object. This property can only be defined at the top-level
+ of a specification.
+ data : anyOf(:class:`Data`, None)
+ An object describing the data source. Set to ``null`` to ignore the parent's data
+ source. If no data is set, it is derived from the parent.
+ datasets : :class:`Datasets`
+ A global data store for named datasets. This is a mapping from names to inline
+ datasets.
+ This can be an array of objects or primitive values or a string. Arrays of primitive
+ values are ingested as objects with a ``data`` property.
+ description : string
+ Description of this mark for commenting purpose.
+ name : string
+ Name of the visualization for later reference.
+ padding : :class:`Padding`
+ The default visualization padding, in pixels, from the edge of the visualization
+ canvas to the data rectangle. If a number, specifies padding for all sides.
+ If an object, the value should have the format ``{"left": 5, "top": 5, "right": 5,
+ "bottom": 5}`` to specify padding for each side of the visualization.
+
+ **Default value** : ``5``
+ resolve : :class:`Resolve`
+ Scale, axis, and legend resolutions for view composition specifications.
+ spacing : float
+ The spacing in pixels between sub-views of the concat operator.
+
+ **Default value** : ``10``
+ title : anyOf(string, :class:`TitleParams`)
+ Title for the plot.
+ transform : List(:class:`Transform`)
+ An array of data transformations such as filter and new field calculation.
+ usermeta : Mapping(required=[])
+ Optional metadata that will be passed to Vega.
+ This object is completely ignored by Vega and Vega-Lite and can be used for custom
+ metadata.
+ $schema : string
+ URL to `JSON schema <http://json-schema.org/>`__ for a Vega-Lite specification.
+ Unless you have a reason to change this, use
+ ``https://vega.github.io/schema/vega-lite/v3.json``. Setting the ``$schema``
+ property allows automatic validation and autocomplete in editors that support JSON
+ schema.
+ """
+ _schema = {'$ref': '#/definitions/TopLevelVConcatSpec'}
+
+ def __init__(self, vconcat=Undefined, autosize=Undefined, background=Undefined, bounds=Undefined,
+ center=Undefined, config=Undefined, data=Undefined, datasets=Undefined,
+ description=Undefined, name=Undefined, padding=Undefined, resolve=Undefined,
+ spacing=Undefined, title=Undefined, transform=Undefined, usermeta=Undefined, **kwds):
+ super(TopLevelVConcatSpec, self).__init__(vconcat=vconcat, autosize=autosize,
+ background=background, bounds=bounds, center=center,
+ config=config, data=data, datasets=datasets,
+ description=description, name=name, padding=padding,
+ resolve=resolve, spacing=spacing, title=title,
+ transform=transform, usermeta=usermeta, **kwds)
+
+
+class TopoDataFormat(DataFormat):
+ """TopoDataFormat schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ feature : string
+ The name of the TopoJSON object set to convert to a GeoJSON feature collection.
+ For example, in a map of the world, there may be an object set named
+ ``"countries"``.
+ Using the feature property, we can extract this set and generate a GeoJSON feature
+ object for each country.
+ mesh : string
+ The name of the TopoJSON object set to convert to mesh.
+ Similar to the ``feature`` option, ``mesh`` extracts a named TopoJSON object set.
+ Unlike the ``feature`` option, the corresponding geo data is returned as a single,
+ unified mesh instance, not as individual GeoJSON features.
+ Extracting a mesh is useful for more efficiently drawing borders or other geographic
+ elements that you do not need to associate with specific regions such as individual
+ countries, states or counties.
+ parse : anyOf(:class:`Parse`, None)
+ If set to ``null``, disable type inference based on the spec and only use type
+ inference based on the data.
+ Alternatively, a parsing directive object can be provided for explicit data types.
+ Each property of the object corresponds to a field name, and the value to the
+ desired data type (one of ``"number"``, ``"boolean"``, ``"date"``, or null (do not
+ parse the field)).
+ For example, ``"parse": {"modified_on": "date"}`` parses the ``modified_on`` field
+ in each input record a Date value.
+
+ For ``"date"``, we parse data based using Javascript's `Date.parse()
+ <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse>`__.
+ For Specific date formats can be provided (e.g., ``{foo: "date:'%m%d%Y'"}`` ), using
+ the `d3-time-format syntax <https://github.com/d3/d3-time-format#locale_format>`__.
+ UTC date format parsing is supported similarly (e.g., ``{foo: "utc:'%m%d%Y'"}`` ).
+ See more about `UTC time
+ <https://vega.github.io/vega-lite/docs/timeunit.html#utc>`__
+ type : enum('topojson')
+ Type of input data: ``"json"``, ``"csv"``, ``"tsv"``, ``"dsv"``.
+
+ **Default value:** The default format type is determined by the extension of the
+ file URL.
+ If no extension is detected, ``"json"`` will be used by default.
+ """
+ _schema = {'$ref': '#/definitions/TopoDataFormat'}
+
+ def __init__(self, feature=Undefined, mesh=Undefined, parse=Undefined, type=Undefined, **kwds):
+ super(TopoDataFormat, self).__init__(feature=feature, mesh=mesh, parse=parse, type=type, **kwds)
+
+
+class Transform(VegaLiteSchema):
+ """Transform schema wrapper
+
+ anyOf(:class:`AggregateTransform`, :class:`BinTransform`, :class:`CalculateTransform`,
+ :class:`FilterTransform`, :class:`FlattenTransform`, :class:`FoldTransform`,
+ :class:`ImputeTransform`, :class:`JoinAggregateTransform`, :class:`LookupTransform`,
+ :class:`TimeUnitTransform`, :class:`SampleTransform`, :class:`StackTransform`,
+ :class:`WindowTransform`)
+ """
+ _schema = {'$ref': '#/definitions/Transform'}
+
+ def __init__(self, *args, **kwds):
+ super(Transform, self).__init__(*args, **kwds)
+
+
+class AggregateTransform(Transform):
+ """AggregateTransform schema wrapper
+
+ Mapping(required=[aggregate])
+
+ Attributes
+ ----------
+
+ aggregate : List(:class:`AggregatedFieldDef`)
+ Array of objects that define fields to aggregate.
+ groupby : List(:class:`FieldName`)
+ The data fields to group by. If not specified, a single group containing all data
+ objects will be used.
+ """
+ _schema = {'$ref': '#/definitions/AggregateTransform'}
+
+ def __init__(self, aggregate=Undefined, groupby=Undefined, **kwds):
+ super(AggregateTransform, self).__init__(aggregate=aggregate, groupby=groupby, **kwds)
+
+
+class BinTransform(Transform):
+ """BinTransform schema wrapper
+
+ Mapping(required=[bin, field, as])
+
+ Attributes
+ ----------
+
+ bin : anyOf(enum(True), :class:`BinParams`)
+ An object indicating bin properties, or simply ``true`` for using default bin
+ parameters.
+ field : :class:`FieldName`
+ The data field to bin.
+ as : anyOf(:class:`FieldName`, List(:class:`FieldName`))
+ The output fields at which to write the start and end bin values.
+ """
+ _schema = {'$ref': '#/definitions/BinTransform'}
+
+ def __init__(self, bin=Undefined, field=Undefined, **kwds):
+ super(BinTransform, self).__init__(bin=bin, field=field, **kwds)
+
+
+class CalculateTransform(Transform):
+ """CalculateTransform schema wrapper
+
+ Mapping(required=[calculate, as])
+
+ Attributes
+ ----------
+
+ calculate : string
+ A `expression <https://vega.github.io/vega-lite/docs/types.html#expression>`__
+ string. Use the variable ``datum`` to refer to the current data object.
+ as : :class:`FieldName`
+ The field for storing the computed formula value.
+ """
+ _schema = {'$ref': '#/definitions/CalculateTransform'}
+
+ def __init__(self, calculate=Undefined, **kwds):
+ super(CalculateTransform, self).__init__(calculate=calculate, **kwds)
+
+
+class FilterTransform(Transform):
+ """FilterTransform schema wrapper
+
+ Mapping(required=[filter])
+
+ Attributes
+ ----------
+
+ filter : :class:`LogicalOperandPredicate`
+ The ``filter`` property must be one of the predicate definitions:
+
+ 1) an `expression <https://vega.github.io/vega-lite/docs/types.html#expression>`__
+ string,
+ where ``datum`` can be used to refer to the current data object
+
+ 2) one of the field predicates: `equal
+ <https://vega.github.io/vega-lite/docs/filter.html#equal-predicate>`__,
+ `lt <https://vega.github.io/vega-lite/docs/filter.html#lt-predicate>`__,
+ `lte <https://vega.github.io/vega-lite/docs/filter.html#lte-predicate>`__,
+ `gt <https://vega.github.io/vega-lite/docs/filter.html#gt-predicate>`__,
+ `gte <https://vega.github.io/vega-lite/docs/filter.html#gte-predicate>`__,
+ `range <https://vega.github.io/vega-lite/docs/filter.html#range-predicate>`__,
+ `oneOf <https://vega.github.io/vega-lite/docs/filter.html#one-of-predicate>`__,
+ or `valid <https://vega.github.io/vega-lite/docs/filter.html#valid-predicate>`__,
+
+ 3) a `selection predicate
+ <https://vega.github.io/vega-lite/docs/filter.html#selection-predicate>`__
+
+ 4) a logical operand that combines (1), (2), or (3).
+ """
+ _schema = {'$ref': '#/definitions/FilterTransform'}
+
+ def __init__(self, filter=Undefined, **kwds):
+ super(FilterTransform, self).__init__(filter=filter, **kwds)
+
+
+class FlattenTransform(Transform):
+ """FlattenTransform schema wrapper
+
+ Mapping(required=[flatten])
+
+ Attributes
+ ----------
+
+ flatten : List(:class:`FieldName`)
+ An array of one or more data fields containing arrays to flatten.
+ If multiple fields are specified, their array values should have a parallel
+ structure, ideally with the same length.
+ If the lengths of parallel arrays do not match,
+ the longest array will be used with ``null`` values added for missing entries.
+ as : List(:class:`FieldName`)
+ The output field names for extracted array values.
+
+ **Default value:** The field name of the corresponding array field
+ """
+ _schema = {'$ref': '#/definitions/FlattenTransform'}
+
+ def __init__(self, flatten=Undefined, **kwds):
+ super(FlattenTransform, self).__init__(flatten=flatten, **kwds)
+
+
+class FoldTransform(Transform):
+ """FoldTransform schema wrapper
+
+ Mapping(required=[fold])
+
+ Attributes
+ ----------
+
+ fold : List(:class:`FieldName`)
+ An array of data fields indicating the properties to fold.
+ as : List([:class:`FieldName`, :class:`FieldName`])
+ The output field names for the key and value properties produced by the fold
+ transform.
+ **Default value:** ``["key", "value"]``
+ """
+ _schema = {'$ref': '#/definitions/FoldTransform'}
+
+ def __init__(self, fold=Undefined, **kwds):
+ super(FoldTransform, self).__init__(fold=fold, **kwds)
+
+
+class ImputeTransform(Transform):
+ """ImputeTransform schema wrapper
+
+ Mapping(required=[impute, key])
+
+ Attributes
+ ----------
+
+ impute : :class:`FieldName`
+ The data field for which the missing values should be imputed.
+ key : :class:`FieldName`
+ A key field that uniquely identifies data objects within a group.
+ Missing key values (those occurring in the data but not in the current group) will
+ be imputed.
+ frame : List(anyOf(None, float))
+ A frame specification as a two-element array used to control the window over which
+ the specified method is applied. The array entries should either be a number
+ indicating the offset from the current data object, or null to indicate unbounded
+ rows preceding or following the current data object. For example, the value ``[-5,
+ 5]`` indicates that the window should include five objects preceding and five
+ objects following the current object.
+
+ **Default value:** : ``[null, null]`` indicating that the window includes all
+ objects.
+ groupby : List(:class:`FieldName`)
+ An optional array of fields by which to group the values.
+ Imputation will then be performed on a per-group basis.
+ keyvals : anyOf(List(Any), :class:`ImputeSequence`)
+ Defines the key values that should be considered for imputation.
+ An array of key values or an object defining a `number sequence
+ <https://vega.github.io/vega-lite/docs/impute.html#sequence-def>`__.
+
+ If provided, this will be used in addition to the key values observed within the
+ input data. If not provided, the values will be derived from all unique values of
+ the ``key`` field. For ``impute`` in ``encoding``, the key field is the x-field if
+ the y-field is imputed, or vice versa.
+
+ If there is no impute grouping, this property *must* be specified.
+ method : :class:`ImputeMethod`
+ The imputation method to use for the field value of imputed data objects.
+ One of ``value``, ``mean``, ``median``, ``max`` or ``min``.
+
+ **Default value:** ``"value"``
+ value : Any
+ The field value to use when the imputation ``method`` is ``"value"``.
+ """
+ _schema = {'$ref': '#/definitions/ImputeTransform'}
+
+ def __init__(self, impute=Undefined, key=Undefined, frame=Undefined, groupby=Undefined,
+ keyvals=Undefined, method=Undefined, value=Undefined, **kwds):
+ super(ImputeTransform, self).__init__(impute=impute, key=key, frame=frame, groupby=groupby,
+ keyvals=keyvals, method=method, value=value, **kwds)
+
+
+class JoinAggregateTransform(Transform):
+ """JoinAggregateTransform schema wrapper
+
+ Mapping(required=[joinaggregate])
+
+ Attributes
+ ----------
+
+ joinaggregate : List(:class:`JoinAggregateFieldDef`)
+ The definition of the fields in the join aggregate, and what calculations to use.
+ groupby : List(:class:`FieldName`)
+ The data fields for partitioning the data objects into separate groups. If
+ unspecified, all data points will be in a single group.
+ """
+ _schema = {'$ref': '#/definitions/JoinAggregateTransform'}
+
+ def __init__(self, joinaggregate=Undefined, groupby=Undefined, **kwds):
+ super(JoinAggregateTransform, self).__init__(joinaggregate=joinaggregate, groupby=groupby,
+ **kwds)
+
+
+class LookupTransform(Transform):
+ """LookupTransform schema wrapper
+
+ Mapping(required=[lookup, from])
+
+ Attributes
+ ----------
+
+ lookup : :class:`FieldName`
+ Key in primary data source.
+ default : string
+ The default value to use if lookup fails.
+
+ **Default value:** ``null``
+ as : anyOf(:class:`FieldName`, List(:class:`FieldName`))
+ The field or fields for storing the computed formula value.
+ If ``from.fields`` is specified, the transform will use the same names for ``as``.
+ If ``from.fields`` is not specified, ``as`` has to be a string and we put the whole
+ object into the data under the specified name.
+ from : :class:`LookupData`
+ Secondary data reference.
+ """
+ _schema = {'$ref': '#/definitions/LookupTransform'}
+
+ def __init__(self, lookup=Undefined, default=Undefined, **kwds):
+ super(LookupTransform, self).__init__(lookup=lookup, default=default, **kwds)
+
+
+class SampleTransform(Transform):
+ """SampleTransform schema wrapper
+
+ Mapping(required=[sample])
+
+ Attributes
+ ----------
+
+ sample : float
+ The maximum number of data objects to include in the sample.
+
+ **Default value:** ``1000``
+ """
+ _schema = {'$ref': '#/definitions/SampleTransform'}
+
+ def __init__(self, sample=Undefined, **kwds):
+ super(SampleTransform, self).__init__(sample=sample, **kwds)
+
+
+class StackTransform(Transform):
+ """StackTransform schema wrapper
+
+ Mapping(required=[stack, groupby, as])
+
+ Attributes
+ ----------
+
+ groupby : List(:class:`FieldName`)
+ The data fields to group by.
+ stack : :class:`FieldName`
+ The field which is stacked.
+ offset : enum('zero', 'center', 'normalize')
+ Mode for stacking marks.
+ **Default value:** ``"zero"``
+ sort : List(:class:`SortField`)
+ Field that determines the order of leaves in the stacked charts.
+ as : anyOf(:class:`FieldName`, List(:class:`FieldName`))
+ Output field names. This can be either a string or an array of strings with
+ two elements denoting the name for the fields for stack start and stack end
+ respectively.
+ If a single string(eg."val") is provided, the end field will be "val_end".
+ """
+ _schema = {'$ref': '#/definitions/StackTransform'}
+
+ def __init__(self, groupby=Undefined, stack=Undefined, offset=Undefined, sort=Undefined, **kwds):
+ super(StackTransform, self).__init__(groupby=groupby, stack=stack, offset=offset, sort=sort,
+ **kwds)
+
+
+class TimeUnitTransform(Transform):
+ """TimeUnitTransform schema wrapper
+
+ Mapping(required=[timeUnit, field, as])
+
+ Attributes
+ ----------
+
+ field : :class:`FieldName`
+ The data field to apply time unit.
+ timeUnit : :class:`TimeUnit`
+ The timeUnit.
+ as : :class:`FieldName`
+ The output field to write the timeUnit value.
+ """
+ _schema = {'$ref': '#/definitions/TimeUnitTransform'}
+
+ def __init__(self, field=Undefined, timeUnit=Undefined, **kwds):
+ super(TimeUnitTransform, self).__init__(field=field, timeUnit=timeUnit, **kwds)
+
+
+class TypeForShape(VegaLiteSchema):
+ """TypeForShape schema wrapper
+
+ enum('nominal', 'ordinal', 'geojson')
+ """
+ _schema = {'$ref': '#/definitions/TypeForShape'}
+
+ def __init__(self, *args):
+ super(TypeForShape, self).__init__(*args)
+
+
+class TypedFieldDef(VegaLiteSchema):
+ """TypedFieldDef schema wrapper
+
+ Mapping(required=[type])
+ Definition object for a data field, its type and transformation of an encoding channel.
+
+ Attributes
+ ----------
+
+ type : :class:`StandardType`
+ The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``,
+ ``"ordinal"``, or ``"nominal"`` ).
+ It can also be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ **Note:**
+
+
+ * Data values for a temporal field can be either a date-time string (e.g.,
+ ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"`` ) or a
+ timestamp number (e.g., ``1552199579097`` ).
+ * Data ``type`` describes the semantics of the data rather than the primitive data
+ types ( ``number``, ``string``, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data.
+ * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
+ or `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `timeUnit
+ <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
+ can be either ``"temporal"`` (for using a temporal scale) or `"ordinal" (for using
+ an ordinal scale) <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
+ * When using with `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
+ refers to the post-aggregation data type. For example, we can calculate count
+ ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
+ "field": "cat", "type": "quantitative"}``. The ``"type"`` of the aggregate output
+ is ``"quantitative"``.
+ * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError`` ) do not have
+ ``type`` as they have exactly the same type as their primary channels (e.g.,
+ ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field
+ (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ bin : anyOf(boolean, :class:`BinParams`, enum('binned'), None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value
+ or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:**
+ 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access nested
+ objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ).
+ If field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ).
+ See more details about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__.
+ 2) ``field`` is not required if ``aggregate`` is ``count``.
+ timeUnit : :class:`TimeUnit`
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field.
+ or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(string, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ """
+ _schema = {'$ref': '#/definitions/TypedFieldDef'}
+
+ def __init__(self, type=Undefined, aggregate=Undefined, bin=Undefined, field=Undefined,
+ timeUnit=Undefined, title=Undefined, **kwds):
+ super(TypedFieldDef, self).__init__(type=type, aggregate=aggregate, bin=bin, field=field,
+ timeUnit=timeUnit, title=title, **kwds)
+
+
+class UnitSpec(VegaLiteSchema):
+ """UnitSpec schema wrapper
+
+ Mapping(required=[mark])
+ Base interface for a unit (single-view) specification.
+
+ Attributes
+ ----------
+
+ mark : :class:`AnyMark`
+ A string describing the mark type (one of ``"bar"``, ``"circle"``, ``"square"``,
+ ``"tick"``, ``"line"``,
+ ``"area"``, ``"point"``, ``"rule"``, ``"geoshape"``, and ``"text"`` ) or a `mark
+ definition object <https://vega.github.io/vega-lite/docs/mark.html#mark-def>`__.
+ data : anyOf(:class:`Data`, None)
+ An object describing the data source. Set to ``null`` to ignore the parent's data
+ source. If no data is set, it is derived from the parent.
+ description : string
+ Description of this mark for commenting purpose.
+ encoding : :class:`Encoding`
+ A key-value mapping between encoding channels and definition of fields.
+ height : float
+ The height of a visualization.
+
+ **Default value:**
+
+
+ * If a view's `autosize
+ <https://vega.github.io/vega-lite/docs/size.html#autosize>`__ type is ``"fit"`` or
+ its y-channel has a `continuous scale
+ <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__, the height will
+ be the value of `config.view.height
+ <https://vega.github.io/vega-lite/docs/spec.html#config>`__.
+ * For y-axis with a band or point scale: if `rangeStep
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__ is a numeric value or
+ unspecified, the height is `determined by the range step, paddings, and the
+ cardinality of the field mapped to y-channel
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__. Otherwise, if the
+ ``rangeStep`` is ``null``, the height will be the value of `config.view.height
+ <https://vega.github.io/vega-lite/docs/spec.html#config>`__.
+ * If no field is mapped to ``y`` channel, the ``height`` will be the value of
+ ``rangeStep``.
+
+ **Note** : For plots with `row and column channels
+ <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the
+ height of a single view.
+
+ **See also:** The documentation for `width and height
+ <https://vega.github.io/vega-lite/docs/size.html>`__ contains more examples.
+ name : string
+ Name of the visualization for later reference.
+ projection : :class:`Projection`
+ An object defining properties of geographic projection, which will be applied to
+ ``shape`` path for ``"geoshape"`` marks
+ and to ``latitude`` and ``"longitude"`` channels for other marks.
+ selection : Mapping(required=[])
+ A key-value mapping between selection names and definitions.
+ title : anyOf(string, :class:`TitleParams`)
+ Title for the plot.
+ transform : List(:class:`Transform`)
+ An array of data transformations such as filter and new field calculation.
+ view : :class:`ViewBackground`
+ An object defining the view background's fill and stroke.
+
+ **Default value:** none (transparent)
+ width : float
+ The width of a visualization.
+
+ **Default value:** This will be determined by the following rules:
+
+
+ * If a view's `autosize
+ <https://vega.github.io/vega-lite/docs/size.html#autosize>`__ type is ``"fit"`` or
+ its x-channel has a `continuous scale
+ <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__, the width will
+ be the value of `config.view.width
+ <https://vega.github.io/vega-lite/docs/spec.html#config>`__.
+ * For x-axis with a band or point scale: if `rangeStep
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__ is a numeric value or
+ unspecified, the width is `determined by the range step, paddings, and the
+ cardinality of the field mapped to x-channel
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__. Otherwise, if the
+ ``rangeStep`` is ``null``, the width will be the value of `config.view.width
+ <https://vega.github.io/vega-lite/docs/spec.html#config>`__.
+ * If no field is mapped to ``x`` channel, the ``width`` will be the value of
+ `config.scale.textXRangeStep
+ <https://vega.github.io/vega-lite/docs/size.html#default-width-and-height>`__ for
+ ``text`` mark and the value of ``rangeStep`` for other marks.
+
+ **Note:** For plots with `row and column channels
+ <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the
+ width of a single view.
+
+ **See also:** The documentation for `width and height
+ <https://vega.github.io/vega-lite/docs/size.html>`__ contains more examples.
+ """
+ _schema = {'$ref': '#/definitions/UnitSpec'}
+
+ def __init__(self, mark=Undefined, data=Undefined, description=Undefined, encoding=Undefined,
+ height=Undefined, name=Undefined, projection=Undefined, selection=Undefined,
+ title=Undefined, transform=Undefined, view=Undefined, width=Undefined, **kwds):
+ super(UnitSpec, self).__init__(mark=mark, data=data, description=description, encoding=encoding,
+ height=height, name=name, projection=projection,
+ selection=selection, title=title, transform=transform, view=view,
+ width=width, **kwds)
+
+
+class UrlData(DataSource):
+ """UrlData schema wrapper
+
+ Mapping(required=[url])
+
+ Attributes
+ ----------
+
+ url : string
+ An URL from which to load the data set. Use the ``format.type`` property
+ to ensure the loaded data is correctly parsed.
+ format : :class:`DataFormat`
+ An object that specifies the format for parsing the data.
+ name : string
+ Provide a placeholder name and bind data at runtime.
+ """
+ _schema = {'$ref': '#/definitions/UrlData'}
+
+ def __init__(self, url=Undefined, format=Undefined, name=Undefined, **kwds):
+ super(UrlData, self).__init__(url=url, format=format, name=name, **kwds)
+
+
+class UtcMultiTimeUnit(MultiTimeUnit):
+ """UtcMultiTimeUnit schema wrapper
+
+ enum('utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate',
+ 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes',
+ 'utcyearmonthdatehoursminutesseconds', 'utcquartermonth', 'utcmonthdate',
+ 'utcmonthdatehours', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds',
+ 'utcsecondsmilliseconds')
+ """
+ _schema = {'$ref': '#/definitions/UtcMultiTimeUnit'}
+
+ def __init__(self, *args):
+ super(UtcMultiTimeUnit, self).__init__(*args)
+
+
+class UtcSingleTimeUnit(SingleTimeUnit):
+ """UtcSingleTimeUnit schema wrapper
+
+ enum('utcyear', 'utcquarter', 'utcmonth', 'utcday', 'utcdate', 'utchours', 'utcminutes',
+ 'utcseconds', 'utcmilliseconds')
+ """
+ _schema = {'$ref': '#/definitions/UtcSingleTimeUnit'}
+
+ def __init__(self, *args):
+ super(UtcSingleTimeUnit, self).__init__(*args)
+
+
+class VConcatSpec(Spec):
+ """VConcatSpec schema wrapper
+
+ Mapping(required=[vconcat])
+ Base interface for a vertical concatenation specification.
+
+ Attributes
+ ----------
+
+ vconcat : List(:class:`Spec`)
+ A list of views to be concatenated and put into a column.
+ bounds : enum('full', 'flush')
+ The bounds calculation method to use for determining the extent of a sub-plot. One
+ of ``full`` (the default) or ``flush``.
+
+
+ * If set to ``full``, the entire calculated bounds (including axes, title, and
+ legend) will be used.
+ * If set to ``flush``, only the specified width and height values for the sub-view
+ will be used. The ``flush`` setting can be useful when attempting to place
+ sub-plots without axes or legends into a uniform grid structure.
+
+ **Default value:** ``"full"``
+ center : boolean
+ Boolean flag indicating if subviews should be centered relative to their respective
+ rows or columns.
+
+ **Default value:** ``false``
+ data : anyOf(:class:`Data`, None)
+ An object describing the data source. Set to ``null`` to ignore the parent's data
+ source. If no data is set, it is derived from the parent.
+ description : string
+ Description of this mark for commenting purpose.
+ name : string
+ Name of the visualization for later reference.
+ resolve : :class:`Resolve`
+ Scale, axis, and legend resolutions for view composition specifications.
+ spacing : float
+ The spacing in pixels between sub-views of the concat operator.
+
+ **Default value** : ``10``
+ title : anyOf(string, :class:`TitleParams`)
+ Title for the plot.
+ transform : List(:class:`Transform`)
+ An array of data transformations such as filter and new field calculation.
+ """
+ _schema = {'$ref': '#/definitions/VConcatSpec'}
+
+ def __init__(self, vconcat=Undefined, bounds=Undefined, center=Undefined, data=Undefined,
+ description=Undefined, name=Undefined, resolve=Undefined, spacing=Undefined,
+ title=Undefined, transform=Undefined, **kwds):
+ super(VConcatSpec, self).__init__(vconcat=vconcat, bounds=bounds, center=center, data=data,
+ description=description, name=name, resolve=resolve,
+ spacing=spacing, title=title, transform=transform, **kwds)
+
+
+class Value(VegaLiteSchema):
+ """Value schema wrapper
+
+ anyOf(float, string, boolean, None)
+ """
+ _schema = {'$ref': '#/definitions/Value'}
+
+ def __init__(self, *args):
+ super(Value, self).__init__(*args)
+
+
+class ValueDefWithConditionMarkPropFieldDefTypeForShapestringnull(VegaLiteSchema):
+ """ValueDefWithConditionMarkPropFieldDefTypeForShapestringnull schema wrapper
+
+ Mapping(required=[])
+ A ValueDef with Condition<ValueDef | FieldDef> where either the condition or the value are
+ optional.
+
+ Attributes
+ ----------
+
+ condition : anyOf(:class:`ConditionalMarkPropFieldDefTypeForShape`,
+ :class:`ConditionalStringValueDef`, List(:class:`ConditionalStringValueDef`))
+ A field definition or one or more value definition(s) with a selection predicate.
+ value : anyOf(string, None)
+ A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values
+ between ``0`` to ``1`` for opacity).
+ """
+ _schema = {'$ref': '#/definitions/ValueDefWithCondition<MarkPropFieldDef<TypeForShape>,(string|null)>'}
+
+ def __init__(self, condition=Undefined, value=Undefined, **kwds):
+ super(ValueDefWithConditionMarkPropFieldDefTypeForShapestringnull, self).__init__(condition=condition,
+ value=value,
+ **kwds)
+
+
+class ValueDefWithConditionMarkPropFieldDefnumber(VegaLiteSchema):
+ """ValueDefWithConditionMarkPropFieldDefnumber schema wrapper
+
+ Mapping(required=[])
+ A ValueDef with Condition<ValueDef | FieldDef> where either the condition or the value are
+ optional.
+
+ Attributes
+ ----------
+
+ condition : anyOf(:class:`ConditionalMarkPropFieldDef`, :class:`ConditionalNumberValueDef`,
+ List(:class:`ConditionalNumberValueDef`))
+ A field definition or one or more value definition(s) with a selection predicate.
+ value : float
+ A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values
+ between ``0`` to ``1`` for opacity).
+ """
+ _schema = {'$ref': '#/definitions/ValueDefWithCondition<MarkPropFieldDef,number>'}
+
+ def __init__(self, condition=Undefined, value=Undefined, **kwds):
+ super(ValueDefWithConditionMarkPropFieldDefnumber, self).__init__(condition=condition,
+ value=value, **kwds)
+
+
+class ValueDefWithConditionMarkPropFieldDefstringnull(VegaLiteSchema):
+ """ValueDefWithConditionMarkPropFieldDefstringnull schema wrapper
+
+ Mapping(required=[])
+ A ValueDef with Condition<ValueDef | FieldDef> where either the condition or the value are
+ optional.
+
+ Attributes
+ ----------
+
+ condition : anyOf(:class:`ConditionalMarkPropFieldDef`, :class:`ConditionalStringValueDef`,
+ List(:class:`ConditionalStringValueDef`))
+ A field definition or one or more value definition(s) with a selection predicate.
+ value : anyOf(string, None)
+ A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values
+ between ``0`` to ``1`` for opacity).
+ """
+ _schema = {'$ref': '#/definitions/ValueDefWithCondition<MarkPropFieldDef,(string|null)>'}
+
+ def __init__(self, condition=Undefined, value=Undefined, **kwds):
+ super(ValueDefWithConditionMarkPropFieldDefstringnull, self).__init__(condition=condition,
+ value=value, **kwds)
+
+
+class ValueDefWithConditionTextFieldDefValue(VegaLiteSchema):
+ """ValueDefWithConditionTextFieldDefValue schema wrapper
+
+ Mapping(required=[])
+ A ValueDef with Condition<ValueDef | FieldDef> where either the condition or the value are
+ optional.
+
+ Attributes
+ ----------
+
+ condition : anyOf(:class:`ConditionalTextFieldDef`, :class:`ConditionalValueDef`,
+ List(:class:`ConditionalValueDef`))
+ A field definition or one or more value definition(s) with a selection predicate.
+ value : :class:`Value`
+ A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values
+ between ``0`` to ``1`` for opacity).
+ """
+ _schema = {'$ref': '#/definitions/ValueDefWithCondition<TextFieldDef,Value>'}
+
+ def __init__(self, condition=Undefined, value=Undefined, **kwds):
+ super(ValueDefWithConditionTextFieldDefValue, self).__init__(condition=condition, value=value,
+ **kwds)
+
+
+class ViewBackground(VegaLiteSchema):
+ """ViewBackground schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ cornerRadius : float
+ The radius in pixels of rounded rectangle corners.
+
+ **Default value:** ``0``
+ fill : anyOf(:class:`Color`, None)
+ The fill color.
+
+ **Default value:** ``undefined``
+ fillOpacity : float
+ The fill opacity (value between [0,1]).
+
+ **Default value:** ``1``
+ opacity : float
+ The overall opacity (value between [0,1]).
+
+ **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,
+ ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.
+ stroke : anyOf(:class:`Color`, None)
+ The stroke color.
+
+ **Default value:** ``"#ddd"``
+ strokeCap : :class:`StrokeCap`
+ The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or
+ ``"square"``.
+
+ **Default value:** ``"square"``
+ strokeDash : List(float)
+ An array of alternating stroke, space lengths for creating dashed or dotted lines.
+ strokeDashOffset : float
+ The offset (in pixels) into which to begin drawing with the stroke dash array.
+ strokeJoin : :class:`StrokeJoin`
+ The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``.
+
+ **Default value:** ``"miter"``
+ strokeMiterLimit : float
+ The miter limit at which to bevel a line join.
+ strokeOpacity : float
+ The stroke opacity (value between [0,1]).
+
+ **Default value:** ``1``
+ strokeWidth : float
+ The stroke width, in pixels.
+ style : anyOf(string, List(string))
+ A string or array of strings indicating the name of custom styles to apply to the
+ view background. A style is a named collection of mark property defaults defined
+ within the `style configuration
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. If style is an
+ array, later styles will override earlier styles.
+
+ **Default value:** ``"cell"``
+ **Note:** Any specified view background properties will augment the default style.
+ """
+ _schema = {'$ref': '#/definitions/ViewBackground'}
+
+ def __init__(self, cornerRadius=Undefined, fill=Undefined, fillOpacity=Undefined, opacity=Undefined,
+ stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined,
+ strokeDashOffset=Undefined, strokeJoin=Undefined, strokeMiterLimit=Undefined,
+ strokeOpacity=Undefined, strokeWidth=Undefined, style=Undefined, **kwds):
+ super(ViewBackground, self).__init__(cornerRadius=cornerRadius, fill=fill,
+ fillOpacity=fillOpacity, opacity=opacity, stroke=stroke,
+ strokeCap=strokeCap, strokeDash=strokeDash,
+ strokeDashOffset=strokeDashOffset, strokeJoin=strokeJoin,
+ strokeMiterLimit=strokeMiterLimit,
+ strokeOpacity=strokeOpacity, strokeWidth=strokeWidth,
+ style=style, **kwds)
+
+
+class ViewConfig(VegaLiteSchema):
+ """ViewConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ clip : boolean
+ Whether the view should be clipped.
+ cornerRadius : float
+ The radius in pixels of rounded rectangle corners.
+
+ **Default value:** ``0``
+ fill : anyOf(:class:`Color`, None)
+ The fill color.
+
+ **Default value:** ``undefined``
+ fillOpacity : float
+ The fill opacity (value between [0,1]).
+
+ **Default value:** ``1``
+ height : float
+ The default height of the single plot or each plot in a trellis plot when the
+ visualization has a continuous (non-ordinal) y-scale with ``rangeStep`` = ``null``.
+
+ **Default value:** ``200``
+ opacity : float
+ The overall opacity (value between [0,1]).
+
+ **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,
+ ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.
+ stroke : anyOf(:class:`Color`, None)
+ The stroke color.
+
+ **Default value:** ``"#ddd"``
+ strokeCap : :class:`StrokeCap`
+ The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or
+ ``"square"``.
+
+ **Default value:** ``"square"``
+ strokeDash : List(float)
+ An array of alternating stroke, space lengths for creating dashed or dotted lines.
+ strokeDashOffset : float
+ The offset (in pixels) into which to begin drawing with the stroke dash array.
+ strokeJoin : :class:`StrokeJoin`
+ The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``.
+
+ **Default value:** ``"miter"``
+ strokeMiterLimit : float
+ The miter limit at which to bevel a line join.
+ strokeOpacity : float
+ The stroke opacity (value between [0,1]).
+
+ **Default value:** ``1``
+ strokeWidth : float
+ The stroke width, in pixels.
+ width : float
+ The default width of the single plot or each plot in a trellis plot when the
+ visualization has a continuous (non-ordinal) x-scale or ordinal x-scale with
+ ``rangeStep`` = ``null``.
+
+ **Default value:** ``200``
+ """
+ _schema = {'$ref': '#/definitions/ViewConfig'}
+
+ def __init__(self, clip=Undefined, cornerRadius=Undefined, fill=Undefined, fillOpacity=Undefined,
+ height=Undefined, opacity=Undefined, stroke=Undefined, strokeCap=Undefined,
+ strokeDash=Undefined, strokeDashOffset=Undefined, strokeJoin=Undefined,
+ strokeMiterLimit=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined,
+ width=Undefined, **kwds):
+ super(ViewConfig, self).__init__(clip=clip, cornerRadius=cornerRadius, fill=fill,
+ fillOpacity=fillOpacity, height=height, opacity=opacity,
+ stroke=stroke, strokeCap=strokeCap, strokeDash=strokeDash,
+ strokeDashOffset=strokeDashOffset, strokeJoin=strokeJoin,
+ strokeMiterLimit=strokeMiterLimit, strokeOpacity=strokeOpacity,
+ strokeWidth=strokeWidth, width=width, **kwds)
+
+
+class WindowFieldDef(VegaLiteSchema):
+ """WindowFieldDef schema wrapper
+
+ Mapping(required=[op, as])
+
+ Attributes
+ ----------
+
+ op : anyOf(:class:`AggregateOp`, :class:`WindowOnlyOp`)
+ The window or aggregation operation to apply within a window (e.g., ``rank``,
+ ``lead``, ``sum``, ``average`` or ``count`` ). See the list of all supported
+ operations `here <https://vega.github.io/vega-lite/docs/window.html#ops>`__.
+ field : :class:`FieldName`
+ The data field for which to compute the aggregate or window function. This can be
+ omitted for window functions that do not operate over a field such as ``count``,
+ ``rank``, ``dense_rank``.
+ param : float
+ Parameter values for the window functions. Parameter values can be omitted for
+ operations that do not accept a parameter.
+
+ See the list of all supported operations and their parameters `here
+ <https://vega.github.io/vega-lite/docs/transforms/window.html>`__.
+ as : :class:`FieldName`
+ The output name for the window operation.
+ """
+ _schema = {'$ref': '#/definitions/WindowFieldDef'}
+
+ def __init__(self, op=Undefined, field=Undefined, param=Undefined, **kwds):
+ super(WindowFieldDef, self).__init__(op=op, field=field, param=param, **kwds)
+
+
+class WindowOnlyOp(VegaLiteSchema):
+ """WindowOnlyOp schema wrapper
+
+ enum('row_number', 'rank', 'dense_rank', 'percent_rank', 'cume_dist', 'ntile', 'lag',
+ 'lead', 'first_value', 'last_value', 'nth_value')
+ """
+ _schema = {'$ref': '#/definitions/WindowOnlyOp'}
+
+ def __init__(self, *args):
+ super(WindowOnlyOp, self).__init__(*args)
+
+
+class WindowTransform(Transform):
+ """WindowTransform schema wrapper
+
+ Mapping(required=[window])
+
+ Attributes
+ ----------
+
+ window : List(:class:`WindowFieldDef`)
+ The definition of the fields in the window, and what calculations to use.
+ frame : List(anyOf(None, float))
+ A frame specification as a two-element array indicating how the sliding window
+ should proceed. The array entries should either be a number indicating the offset
+ from the current data object, or null to indicate unbounded rows preceding or
+ following the current data object. The default value is ``[null, 0]``, indicating
+ that the sliding window includes the current object and all preceding objects. The
+ value ``[-5, 5]`` indicates that the window should include five objects preceding
+ and five objects following the current object. Finally, ``[null, null]`` indicates
+ that the window frame should always include all data objects. If you this frame and
+ want to assign the same value to add objects, you can use the simpler `join
+ aggregate transform <https://vega.github.io/vega-lite/docs/joinaggregate.html>`__.
+ The only operators affected are the aggregation operations and the ``first_value``,
+ ``last_value``, and ``nth_value`` window operations. The other window operations are
+ not affected by this.
+
+ **Default value:** : ``[null, 0]`` (includes the current object and all preceding
+ objects)
+ groupby : List(:class:`FieldName`)
+ The data fields for partitioning the data objects into separate windows. If
+ unspecified, all data points will be in a single window.
+ ignorePeers : boolean
+ Indicates if the sliding window frame should ignore peer values (data that are
+ considered identical by the sort criteria). The default is false, causing the window
+ frame to expand to include all peer values. If set to true, the window frame will be
+ defined by offset values only. This setting only affects those operations that
+ depend on the window frame, namely aggregation operations and the first_value,
+ last_value, and nth_value window operations.
+
+ **Default value:** ``false``
+ sort : List(:class:`SortField`)
+ A sort field definition for sorting data objects within a window. If two data
+ objects are considered equal by the comparator, they are considered “peer” values of
+ equal rank. If sort is not specified, the order is undefined: data objects are
+ processed in the order they are observed and none are considered peers (the
+ ignorePeers parameter is ignored and treated as if set to ``true`` ).
+ """
+ _schema = {'$ref': '#/definitions/WindowTransform'}
+
+ def __init__(self, window=Undefined, frame=Undefined, groupby=Undefined, ignorePeers=Undefined,
+ sort=Undefined, **kwds):
+ super(WindowTransform, self).__init__(window=window, frame=frame, groupby=groupby,
+ ignorePeers=ignorePeers, sort=sort, **kwds)
+
+
+class XValueDef(VegaLiteSchema):
+ """XValueDef schema wrapper
+
+ Mapping(required=[value])
+ Definition object for a constant value of an encoding channel.
+
+ Attributes
+ ----------
+
+ value : anyOf(float, enum('width'))
+ A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values
+ between ``0`` to ``1`` for opacity).
+ """
+ _schema = {'$ref': '#/definitions/XValueDef'}
+
+ def __init__(self, value=Undefined, **kwds):
+ super(XValueDef, self).__init__(value=value, **kwds)
+
+
+class YValueDef(VegaLiteSchema):
+ """YValueDef schema wrapper
+
+ Mapping(required=[value])
+ Definition object for a constant value of an encoding channel.
+
+ Attributes
+ ----------
+
+ value : anyOf(float, enum('height'))
+ A constant value in visual domain (e.g., ``"red"`` / "#0099ff" for color, values
+ between ``0`` to ``1`` for opacity).
+ """
+ _schema = {'$ref': '#/definitions/YValueDef'}
+
+ def __init__(self, value=Undefined, **kwds):
+ super(YValueDef, self).__init__(value=value, **kwds)
+
diff --git a/venv/lib/python3.9/site-packages/altair/vegalite/v3/schema/mixins.py b/venv/lib/python3.9/site-packages/altair/vegalite/v3/schema/mixins.py
new file mode 100644
index 00000000..0278d400
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vegalite/v3/schema/mixins.py
@@ -0,0 +1,807 @@
+# The contents of this file are automatically written by
+# tools/generate_schema_wrapper.py. Do not modify directly.
+from . import core
+from altair.utils import use_signature
+from altair.utils.schemapi import Undefined
+
+
+class MarkMethodMixin(object):
+ """A mixin class that defines mark methods"""
+
+ def mark_area(self, align=Undefined, angle=Undefined, baseline=Undefined, binSpacing=Undefined,
+ clip=Undefined, color=Undefined, cornerRadius=Undefined, cursor=Undefined,
+ dir=Undefined, dx=Undefined, dy=Undefined, ellipsis=Undefined, fill=Undefined,
+ fillOpacity=Undefined, filled=Undefined, font=Undefined, fontSize=Undefined,
+ fontStyle=Undefined, fontWeight=Undefined, height=Undefined, href=Undefined,
+ interpolate=Undefined, limit=Undefined, line=Undefined, opacity=Undefined,
+ order=Undefined, orient=Undefined, point=Undefined, radius=Undefined, shape=Undefined,
+ size=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined,
+ strokeDashOffset=Undefined, strokeJoin=Undefined, strokeMiterLimit=Undefined,
+ strokeOpacity=Undefined, strokeWidth=Undefined, style=Undefined, tension=Undefined,
+ text=Undefined, theta=Undefined, thickness=Undefined, tooltip=Undefined,
+ width=Undefined, x=Undefined, x2=Undefined, x2Offset=Undefined, xOffset=Undefined,
+ y=Undefined, y2=Undefined, y2Offset=Undefined, yOffset=Undefined, **kwds):
+ """Set the chart's mark to 'area'
+
+ For information on additional arguments, see :class:`MarkDef`
+ """
+ kwds = dict(align=align, angle=angle, baseline=baseline, binSpacing=binSpacing, clip=clip,
+ color=color, cornerRadius=cornerRadius, cursor=cursor, dir=dir, dx=dx, dy=dy,
+ ellipsis=ellipsis, fill=fill, fillOpacity=fillOpacity, filled=filled, font=font,
+ fontSize=fontSize, fontStyle=fontStyle, fontWeight=fontWeight, height=height,
+ href=href, interpolate=interpolate, limit=limit, line=line, opacity=opacity,
+ order=order, orient=orient, point=point, radius=radius, shape=shape, size=size,
+ stroke=stroke, strokeCap=strokeCap, strokeDash=strokeDash,
+ strokeDashOffset=strokeDashOffset, strokeJoin=strokeJoin,
+ strokeMiterLimit=strokeMiterLimit, strokeOpacity=strokeOpacity,
+ strokeWidth=strokeWidth, style=style, tension=tension, text=text, theta=theta,
+ thickness=thickness, tooltip=tooltip, width=width, x=x, x2=x2, x2Offset=x2Offset,
+ xOffset=xOffset, y=y, y2=y2, y2Offset=y2Offset, yOffset=yOffset, **kwds)
+ copy = self.copy(deep=False)
+ if any(val is not Undefined for val in kwds.values()):
+ copy.mark = core.MarkDef(type="area", **kwds)
+ else:
+ copy.mark = "area"
+ return copy
+
+ def mark_bar(self, align=Undefined, angle=Undefined, baseline=Undefined, binSpacing=Undefined,
+ clip=Undefined, color=Undefined, cornerRadius=Undefined, cursor=Undefined,
+ dir=Undefined, dx=Undefined, dy=Undefined, ellipsis=Undefined, fill=Undefined,
+ fillOpacity=Undefined, filled=Undefined, font=Undefined, fontSize=Undefined,
+ fontStyle=Undefined, fontWeight=Undefined, height=Undefined, href=Undefined,
+ interpolate=Undefined, limit=Undefined, line=Undefined, opacity=Undefined,
+ order=Undefined, orient=Undefined, point=Undefined, radius=Undefined, shape=Undefined,
+ size=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined,
+ strokeDashOffset=Undefined, strokeJoin=Undefined, strokeMiterLimit=Undefined,
+ strokeOpacity=Undefined, strokeWidth=Undefined, style=Undefined, tension=Undefined,
+ text=Undefined, theta=Undefined, thickness=Undefined, tooltip=Undefined,
+ width=Undefined, x=Undefined, x2=Undefined, x2Offset=Undefined, xOffset=Undefined,
+ y=Undefined, y2=Undefined, y2Offset=Undefined, yOffset=Undefined, **kwds):
+ """Set the chart's mark to 'bar'
+
+ For information on additional arguments, see :class:`MarkDef`
+ """
+ kwds = dict(align=align, angle=angle, baseline=baseline, binSpacing=binSpacing, clip=clip,
+ color=color, cornerRadius=cornerRadius, cursor=cursor, dir=dir, dx=dx, dy=dy,
+ ellipsis=ellipsis, fill=fill, fillOpacity=fillOpacity, filled=filled, font=font,
+ fontSize=fontSize, fontStyle=fontStyle, fontWeight=fontWeight, height=height,
+ href=href, interpolate=interpolate, limit=limit, line=line, opacity=opacity,
+ order=order, orient=orient, point=point, radius=radius, shape=shape, size=size,
+ stroke=stroke, strokeCap=strokeCap, strokeDash=strokeDash,
+ strokeDashOffset=strokeDashOffset, strokeJoin=strokeJoin,
+ strokeMiterLimit=strokeMiterLimit, strokeOpacity=strokeOpacity,
+ strokeWidth=strokeWidth, style=style, tension=tension, text=text, theta=theta,
+ thickness=thickness, tooltip=tooltip, width=width, x=x, x2=x2, x2Offset=x2Offset,
+ xOffset=xOffset, y=y, y2=y2, y2Offset=y2Offset, yOffset=yOffset, **kwds)
+ copy = self.copy(deep=False)
+ if any(val is not Undefined for val in kwds.values()):
+ copy.mark = core.MarkDef(type="bar", **kwds)
+ else:
+ copy.mark = "bar"
+ return copy
+
+ def mark_line(self, align=Undefined, angle=Undefined, baseline=Undefined, binSpacing=Undefined,
+ clip=Undefined, color=Undefined, cornerRadius=Undefined, cursor=Undefined,
+ dir=Undefined, dx=Undefined, dy=Undefined, ellipsis=Undefined, fill=Undefined,
+ fillOpacity=Undefined, filled=Undefined, font=Undefined, fontSize=Undefined,
+ fontStyle=Undefined, fontWeight=Undefined, height=Undefined, href=Undefined,
+ interpolate=Undefined, limit=Undefined, line=Undefined, opacity=Undefined,
+ order=Undefined, orient=Undefined, point=Undefined, radius=Undefined, shape=Undefined,
+ size=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined,
+ strokeDashOffset=Undefined, strokeJoin=Undefined, strokeMiterLimit=Undefined,
+ strokeOpacity=Undefined, strokeWidth=Undefined, style=Undefined, tension=Undefined,
+ text=Undefined, theta=Undefined, thickness=Undefined, tooltip=Undefined,
+ width=Undefined, x=Undefined, x2=Undefined, x2Offset=Undefined, xOffset=Undefined,
+ y=Undefined, y2=Undefined, y2Offset=Undefined, yOffset=Undefined, **kwds):
+ """Set the chart's mark to 'line'
+
+ For information on additional arguments, see :class:`MarkDef`
+ """
+ kwds = dict(align=align, angle=angle, baseline=baseline, binSpacing=binSpacing, clip=clip,
+ color=color, cornerRadius=cornerRadius, cursor=cursor, dir=dir, dx=dx, dy=dy,
+ ellipsis=ellipsis, fill=fill, fillOpacity=fillOpacity, filled=filled, font=font,
+ fontSize=fontSize, fontStyle=fontStyle, fontWeight=fontWeight, height=height,
+ href=href, interpolate=interpolate, limit=limit, line=line, opacity=opacity,
+ order=order, orient=orient, point=point, radius=radius, shape=shape, size=size,
+ stroke=stroke, strokeCap=strokeCap, strokeDash=strokeDash,
+ strokeDashOffset=strokeDashOffset, strokeJoin=strokeJoin,
+ strokeMiterLimit=strokeMiterLimit, strokeOpacity=strokeOpacity,
+ strokeWidth=strokeWidth, style=style, tension=tension, text=text, theta=theta,
+ thickness=thickness, tooltip=tooltip, width=width, x=x, x2=x2, x2Offset=x2Offset,
+ xOffset=xOffset, y=y, y2=y2, y2Offset=y2Offset, yOffset=yOffset, **kwds)
+ copy = self.copy(deep=False)
+ if any(val is not Undefined for val in kwds.values()):
+ copy.mark = core.MarkDef(type="line", **kwds)
+ else:
+ copy.mark = "line"
+ return copy
+
+ def mark_trail(self, align=Undefined, angle=Undefined, baseline=Undefined, binSpacing=Undefined,
+ clip=Undefined, color=Undefined, cornerRadius=Undefined, cursor=Undefined,
+ dir=Undefined, dx=Undefined, dy=Undefined, ellipsis=Undefined, fill=Undefined,
+ fillOpacity=Undefined, filled=Undefined, font=Undefined, fontSize=Undefined,
+ fontStyle=Undefined, fontWeight=Undefined, height=Undefined, href=Undefined,
+ interpolate=Undefined, limit=Undefined, line=Undefined, opacity=Undefined,
+ order=Undefined, orient=Undefined, point=Undefined, radius=Undefined,
+ shape=Undefined, size=Undefined, stroke=Undefined, strokeCap=Undefined,
+ strokeDash=Undefined, strokeDashOffset=Undefined, strokeJoin=Undefined,
+ strokeMiterLimit=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined,
+ style=Undefined, tension=Undefined, text=Undefined, theta=Undefined,
+ thickness=Undefined, tooltip=Undefined, width=Undefined, x=Undefined, x2=Undefined,
+ x2Offset=Undefined, xOffset=Undefined, y=Undefined, y2=Undefined, y2Offset=Undefined,
+ yOffset=Undefined, **kwds):
+ """Set the chart's mark to 'trail'
+
+ For information on additional arguments, see :class:`MarkDef`
+ """
+ kwds = dict(align=align, angle=angle, baseline=baseline, binSpacing=binSpacing, clip=clip,
+ color=color, cornerRadius=cornerRadius, cursor=cursor, dir=dir, dx=dx, dy=dy,
+ ellipsis=ellipsis, fill=fill, fillOpacity=fillOpacity, filled=filled, font=font,
+ fontSize=fontSize, fontStyle=fontStyle, fontWeight=fontWeight, height=height,
+ href=href, interpolate=interpolate, limit=limit, line=line, opacity=opacity,
+ order=order, orient=orient, point=point, radius=radius, shape=shape, size=size,
+ stroke=stroke, strokeCap=strokeCap, strokeDash=strokeDash,
+ strokeDashOffset=strokeDashOffset, strokeJoin=strokeJoin,
+ strokeMiterLimit=strokeMiterLimit, strokeOpacity=strokeOpacity,
+ strokeWidth=strokeWidth, style=style, tension=tension, text=text, theta=theta,
+ thickness=thickness, tooltip=tooltip, width=width, x=x, x2=x2, x2Offset=x2Offset,
+ xOffset=xOffset, y=y, y2=y2, y2Offset=y2Offset, yOffset=yOffset, **kwds)
+ copy = self.copy(deep=False)
+ if any(val is not Undefined for val in kwds.values()):
+ copy.mark = core.MarkDef(type="trail", **kwds)
+ else:
+ copy.mark = "trail"
+ return copy
+
+ def mark_point(self, align=Undefined, angle=Undefined, baseline=Undefined, binSpacing=Undefined,
+ clip=Undefined, color=Undefined, cornerRadius=Undefined, cursor=Undefined,
+ dir=Undefined, dx=Undefined, dy=Undefined, ellipsis=Undefined, fill=Undefined,
+ fillOpacity=Undefined, filled=Undefined, font=Undefined, fontSize=Undefined,
+ fontStyle=Undefined, fontWeight=Undefined, height=Undefined, href=Undefined,
+ interpolate=Undefined, limit=Undefined, line=Undefined, opacity=Undefined,
+ order=Undefined, orient=Undefined, point=Undefined, radius=Undefined,
+ shape=Undefined, size=Undefined, stroke=Undefined, strokeCap=Undefined,
+ strokeDash=Undefined, strokeDashOffset=Undefined, strokeJoin=Undefined,
+ strokeMiterLimit=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined,
+ style=Undefined, tension=Undefined, text=Undefined, theta=Undefined,
+ thickness=Undefined, tooltip=Undefined, width=Undefined, x=Undefined, x2=Undefined,
+ x2Offset=Undefined, xOffset=Undefined, y=Undefined, y2=Undefined, y2Offset=Undefined,
+ yOffset=Undefined, **kwds):
+ """Set the chart's mark to 'point'
+
+ For information on additional arguments, see :class:`MarkDef`
+ """
+ kwds = dict(align=align, angle=angle, baseline=baseline, binSpacing=binSpacing, clip=clip,
+ color=color, cornerRadius=cornerRadius, cursor=cursor, dir=dir, dx=dx, dy=dy,
+ ellipsis=ellipsis, fill=fill, fillOpacity=fillOpacity, filled=filled, font=font,
+ fontSize=fontSize, fontStyle=fontStyle, fontWeight=fontWeight, height=height,
+ href=href, interpolate=interpolate, limit=limit, line=line, opacity=opacity,
+ order=order, orient=orient, point=point, radius=radius, shape=shape, size=size,
+ stroke=stroke, strokeCap=strokeCap, strokeDash=strokeDash,
+ strokeDashOffset=strokeDashOffset, strokeJoin=strokeJoin,
+ strokeMiterLimit=strokeMiterLimit, strokeOpacity=strokeOpacity,
+ strokeWidth=strokeWidth, style=style, tension=tension, text=text, theta=theta,
+ thickness=thickness, tooltip=tooltip, width=width, x=x, x2=x2, x2Offset=x2Offset,
+ xOffset=xOffset, y=y, y2=y2, y2Offset=y2Offset, yOffset=yOffset, **kwds)
+ copy = self.copy(deep=False)
+ if any(val is not Undefined for val in kwds.values()):
+ copy.mark = core.MarkDef(type="point", **kwds)
+ else:
+ copy.mark = "point"
+ return copy
+
+ def mark_text(self, align=Undefined, angle=Undefined, baseline=Undefined, binSpacing=Undefined,
+ clip=Undefined, color=Undefined, cornerRadius=Undefined, cursor=Undefined,
+ dir=Undefined, dx=Undefined, dy=Undefined, ellipsis=Undefined, fill=Undefined,
+ fillOpacity=Undefined, filled=Undefined, font=Undefined, fontSize=Undefined,
+ fontStyle=Undefined, fontWeight=Undefined, height=Undefined, href=Undefined,
+ interpolate=Undefined, limit=Undefined, line=Undefined, opacity=Undefined,
+ order=Undefined, orient=Undefined, point=Undefined, radius=Undefined, shape=Undefined,
+ size=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined,
+ strokeDashOffset=Undefined, strokeJoin=Undefined, strokeMiterLimit=Undefined,
+ strokeOpacity=Undefined, strokeWidth=Undefined, style=Undefined, tension=Undefined,
+ text=Undefined, theta=Undefined, thickness=Undefined, tooltip=Undefined,
+ width=Undefined, x=Undefined, x2=Undefined, x2Offset=Undefined, xOffset=Undefined,
+ y=Undefined, y2=Undefined, y2Offset=Undefined, yOffset=Undefined, **kwds):
+ """Set the chart's mark to 'text'
+
+ For information on additional arguments, see :class:`MarkDef`
+ """
+ kwds = dict(align=align, angle=angle, baseline=baseline, binSpacing=binSpacing, clip=clip,
+ color=color, cornerRadius=cornerRadius, cursor=cursor, dir=dir, dx=dx, dy=dy,
+ ellipsis=ellipsis, fill=fill, fillOpacity=fillOpacity, filled=filled, font=font,
+ fontSize=fontSize, fontStyle=fontStyle, fontWeight=fontWeight, height=height,
+ href=href, interpolate=interpolate, limit=limit, line=line, opacity=opacity,
+ order=order, orient=orient, point=point, radius=radius, shape=shape, size=size,
+ stroke=stroke, strokeCap=strokeCap, strokeDash=strokeDash,
+ strokeDashOffset=strokeDashOffset, strokeJoin=strokeJoin,
+ strokeMiterLimit=strokeMiterLimit, strokeOpacity=strokeOpacity,
+ strokeWidth=strokeWidth, style=style, tension=tension, text=text, theta=theta,
+ thickness=thickness, tooltip=tooltip, width=width, x=x, x2=x2, x2Offset=x2Offset,
+ xOffset=xOffset, y=y, y2=y2, y2Offset=y2Offset, yOffset=yOffset, **kwds)
+ copy = self.copy(deep=False)
+ if any(val is not Undefined for val in kwds.values()):
+ copy.mark = core.MarkDef(type="text", **kwds)
+ else:
+ copy.mark = "text"
+ return copy
+
+ def mark_tick(self, align=Undefined, angle=Undefined, baseline=Undefined, binSpacing=Undefined,
+ clip=Undefined, color=Undefined, cornerRadius=Undefined, cursor=Undefined,
+ dir=Undefined, dx=Undefined, dy=Undefined, ellipsis=Undefined, fill=Undefined,
+ fillOpacity=Undefined, filled=Undefined, font=Undefined, fontSize=Undefined,
+ fontStyle=Undefined, fontWeight=Undefined, height=Undefined, href=Undefined,
+ interpolate=Undefined, limit=Undefined, line=Undefined, opacity=Undefined,
+ order=Undefined, orient=Undefined, point=Undefined, radius=Undefined, shape=Undefined,
+ size=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined,
+ strokeDashOffset=Undefined, strokeJoin=Undefined, strokeMiterLimit=Undefined,
+ strokeOpacity=Undefined, strokeWidth=Undefined, style=Undefined, tension=Undefined,
+ text=Undefined, theta=Undefined, thickness=Undefined, tooltip=Undefined,
+ width=Undefined, x=Undefined, x2=Undefined, x2Offset=Undefined, xOffset=Undefined,
+ y=Undefined, y2=Undefined, y2Offset=Undefined, yOffset=Undefined, **kwds):
+ """Set the chart's mark to 'tick'
+
+ For information on additional arguments, see :class:`MarkDef`
+ """
+ kwds = dict(align=align, angle=angle, baseline=baseline, binSpacing=binSpacing, clip=clip,
+ color=color, cornerRadius=cornerRadius, cursor=cursor, dir=dir, dx=dx, dy=dy,
+ ellipsis=ellipsis, fill=fill, fillOpacity=fillOpacity, filled=filled, font=font,
+ fontSize=fontSize, fontStyle=fontStyle, fontWeight=fontWeight, height=height,
+ href=href, interpolate=interpolate, limit=limit, line=line, opacity=opacity,
+ order=order, orient=orient, point=point, radius=radius, shape=shape, size=size,
+ stroke=stroke, strokeCap=strokeCap, strokeDash=strokeDash,
+ strokeDashOffset=strokeDashOffset, strokeJoin=strokeJoin,
+ strokeMiterLimit=strokeMiterLimit, strokeOpacity=strokeOpacity,
+ strokeWidth=strokeWidth, style=style, tension=tension, text=text, theta=theta,
+ thickness=thickness, tooltip=tooltip, width=width, x=x, x2=x2, x2Offset=x2Offset,
+ xOffset=xOffset, y=y, y2=y2, y2Offset=y2Offset, yOffset=yOffset, **kwds)
+ copy = self.copy(deep=False)
+ if any(val is not Undefined for val in kwds.values()):
+ copy.mark = core.MarkDef(type="tick", **kwds)
+ else:
+ copy.mark = "tick"
+ return copy
+
+ def mark_rect(self, align=Undefined, angle=Undefined, baseline=Undefined, binSpacing=Undefined,
+ clip=Undefined, color=Undefined, cornerRadius=Undefined, cursor=Undefined,
+ dir=Undefined, dx=Undefined, dy=Undefined, ellipsis=Undefined, fill=Undefined,
+ fillOpacity=Undefined, filled=Undefined, font=Undefined, fontSize=Undefined,
+ fontStyle=Undefined, fontWeight=Undefined, height=Undefined, href=Undefined,
+ interpolate=Undefined, limit=Undefined, line=Undefined, opacity=Undefined,
+ order=Undefined, orient=Undefined, point=Undefined, radius=Undefined, shape=Undefined,
+ size=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined,
+ strokeDashOffset=Undefined, strokeJoin=Undefined, strokeMiterLimit=Undefined,
+ strokeOpacity=Undefined, strokeWidth=Undefined, style=Undefined, tension=Undefined,
+ text=Undefined, theta=Undefined, thickness=Undefined, tooltip=Undefined,
+ width=Undefined, x=Undefined, x2=Undefined, x2Offset=Undefined, xOffset=Undefined,
+ y=Undefined, y2=Undefined, y2Offset=Undefined, yOffset=Undefined, **kwds):
+ """Set the chart's mark to 'rect'
+
+ For information on additional arguments, see :class:`MarkDef`
+ """
+ kwds = dict(align=align, angle=angle, baseline=baseline, binSpacing=binSpacing, clip=clip,
+ color=color, cornerRadius=cornerRadius, cursor=cursor, dir=dir, dx=dx, dy=dy,
+ ellipsis=ellipsis, fill=fill, fillOpacity=fillOpacity, filled=filled, font=font,
+ fontSize=fontSize, fontStyle=fontStyle, fontWeight=fontWeight, height=height,
+ href=href, interpolate=interpolate, limit=limit, line=line, opacity=opacity,
+ order=order, orient=orient, point=point, radius=radius, shape=shape, size=size,
+ stroke=stroke, strokeCap=strokeCap, strokeDash=strokeDash,
+ strokeDashOffset=strokeDashOffset, strokeJoin=strokeJoin,
+ strokeMiterLimit=strokeMiterLimit, strokeOpacity=strokeOpacity,
+ strokeWidth=strokeWidth, style=style, tension=tension, text=text, theta=theta,
+ thickness=thickness, tooltip=tooltip, width=width, x=x, x2=x2, x2Offset=x2Offset,
+ xOffset=xOffset, y=y, y2=y2, y2Offset=y2Offset, yOffset=yOffset, **kwds)
+ copy = self.copy(deep=False)
+ if any(val is not Undefined for val in kwds.values()):
+ copy.mark = core.MarkDef(type="rect", **kwds)
+ else:
+ copy.mark = "rect"
+ return copy
+
+ def mark_rule(self, align=Undefined, angle=Undefined, baseline=Undefined, binSpacing=Undefined,
+ clip=Undefined, color=Undefined, cornerRadius=Undefined, cursor=Undefined,
+ dir=Undefined, dx=Undefined, dy=Undefined, ellipsis=Undefined, fill=Undefined,
+ fillOpacity=Undefined, filled=Undefined, font=Undefined, fontSize=Undefined,
+ fontStyle=Undefined, fontWeight=Undefined, height=Undefined, href=Undefined,
+ interpolate=Undefined, limit=Undefined, line=Undefined, opacity=Undefined,
+ order=Undefined, orient=Undefined, point=Undefined, radius=Undefined, shape=Undefined,
+ size=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined,
+ strokeDashOffset=Undefined, strokeJoin=Undefined, strokeMiterLimit=Undefined,
+ strokeOpacity=Undefined, strokeWidth=Undefined, style=Undefined, tension=Undefined,
+ text=Undefined, theta=Undefined, thickness=Undefined, tooltip=Undefined,
+ width=Undefined, x=Undefined, x2=Undefined, x2Offset=Undefined, xOffset=Undefined,
+ y=Undefined, y2=Undefined, y2Offset=Undefined, yOffset=Undefined, **kwds):
+ """Set the chart's mark to 'rule'
+
+ For information on additional arguments, see :class:`MarkDef`
+ """
+ kwds = dict(align=align, angle=angle, baseline=baseline, binSpacing=binSpacing, clip=clip,
+ color=color, cornerRadius=cornerRadius, cursor=cursor, dir=dir, dx=dx, dy=dy,
+ ellipsis=ellipsis, fill=fill, fillOpacity=fillOpacity, filled=filled, font=font,
+ fontSize=fontSize, fontStyle=fontStyle, fontWeight=fontWeight, height=height,
+ href=href, interpolate=interpolate, limit=limit, line=line, opacity=opacity,
+ order=order, orient=orient, point=point, radius=radius, shape=shape, size=size,
+ stroke=stroke, strokeCap=strokeCap, strokeDash=strokeDash,
+ strokeDashOffset=strokeDashOffset, strokeJoin=strokeJoin,
+ strokeMiterLimit=strokeMiterLimit, strokeOpacity=strokeOpacity,
+ strokeWidth=strokeWidth, style=style, tension=tension, text=text, theta=theta,
+ thickness=thickness, tooltip=tooltip, width=width, x=x, x2=x2, x2Offset=x2Offset,
+ xOffset=xOffset, y=y, y2=y2, y2Offset=y2Offset, yOffset=yOffset, **kwds)
+ copy = self.copy(deep=False)
+ if any(val is not Undefined for val in kwds.values()):
+ copy.mark = core.MarkDef(type="rule", **kwds)
+ else:
+ copy.mark = "rule"
+ return copy
+
+ def mark_circle(self, align=Undefined, angle=Undefined, baseline=Undefined, binSpacing=Undefined,
+ clip=Undefined, color=Undefined, cornerRadius=Undefined, cursor=Undefined,
+ dir=Undefined, dx=Undefined, dy=Undefined, ellipsis=Undefined, fill=Undefined,
+ fillOpacity=Undefined, filled=Undefined, font=Undefined, fontSize=Undefined,
+ fontStyle=Undefined, fontWeight=Undefined, height=Undefined, href=Undefined,
+ interpolate=Undefined, limit=Undefined, line=Undefined, opacity=Undefined,
+ order=Undefined, orient=Undefined, point=Undefined, radius=Undefined,
+ shape=Undefined, size=Undefined, stroke=Undefined, strokeCap=Undefined,
+ strokeDash=Undefined, strokeDashOffset=Undefined, strokeJoin=Undefined,
+ strokeMiterLimit=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined,
+ style=Undefined, tension=Undefined, text=Undefined, theta=Undefined,
+ thickness=Undefined, tooltip=Undefined, width=Undefined, x=Undefined, x2=Undefined,
+ x2Offset=Undefined, xOffset=Undefined, y=Undefined, y2=Undefined,
+ y2Offset=Undefined, yOffset=Undefined, **kwds):
+ """Set the chart's mark to 'circle'
+
+ For information on additional arguments, see :class:`MarkDef`
+ """
+ kwds = dict(align=align, angle=angle, baseline=baseline, binSpacing=binSpacing, clip=clip,
+ color=color, cornerRadius=cornerRadius, cursor=cursor, dir=dir, dx=dx, dy=dy,
+ ellipsis=ellipsis, fill=fill, fillOpacity=fillOpacity, filled=filled, font=font,
+ fontSize=fontSize, fontStyle=fontStyle, fontWeight=fontWeight, height=height,
+ href=href, interpolate=interpolate, limit=limit, line=line, opacity=opacity,
+ order=order, orient=orient, point=point, radius=radius, shape=shape, size=size,
+ stroke=stroke, strokeCap=strokeCap, strokeDash=strokeDash,
+ strokeDashOffset=strokeDashOffset, strokeJoin=strokeJoin,
+ strokeMiterLimit=strokeMiterLimit, strokeOpacity=strokeOpacity,
+ strokeWidth=strokeWidth, style=style, tension=tension, text=text, theta=theta,
+ thickness=thickness, tooltip=tooltip, width=width, x=x, x2=x2, x2Offset=x2Offset,
+ xOffset=xOffset, y=y, y2=y2, y2Offset=y2Offset, yOffset=yOffset, **kwds)
+ copy = self.copy(deep=False)
+ if any(val is not Undefined for val in kwds.values()):
+ copy.mark = core.MarkDef(type="circle", **kwds)
+ else:
+ copy.mark = "circle"
+ return copy
+
+ def mark_square(self, align=Undefined, angle=Undefined, baseline=Undefined, binSpacing=Undefined,
+ clip=Undefined, color=Undefined, cornerRadius=Undefined, cursor=Undefined,
+ dir=Undefined, dx=Undefined, dy=Undefined, ellipsis=Undefined, fill=Undefined,
+ fillOpacity=Undefined, filled=Undefined, font=Undefined, fontSize=Undefined,
+ fontStyle=Undefined, fontWeight=Undefined, height=Undefined, href=Undefined,
+ interpolate=Undefined, limit=Undefined, line=Undefined, opacity=Undefined,
+ order=Undefined, orient=Undefined, point=Undefined, radius=Undefined,
+ shape=Undefined, size=Undefined, stroke=Undefined, strokeCap=Undefined,
+ strokeDash=Undefined, strokeDashOffset=Undefined, strokeJoin=Undefined,
+ strokeMiterLimit=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined,
+ style=Undefined, tension=Undefined, text=Undefined, theta=Undefined,
+ thickness=Undefined, tooltip=Undefined, width=Undefined, x=Undefined, x2=Undefined,
+ x2Offset=Undefined, xOffset=Undefined, y=Undefined, y2=Undefined,
+ y2Offset=Undefined, yOffset=Undefined, **kwds):
+ """Set the chart's mark to 'square'
+
+ For information on additional arguments, see :class:`MarkDef`
+ """
+ kwds = dict(align=align, angle=angle, baseline=baseline, binSpacing=binSpacing, clip=clip,
+ color=color, cornerRadius=cornerRadius, cursor=cursor, dir=dir, dx=dx, dy=dy,
+ ellipsis=ellipsis, fill=fill, fillOpacity=fillOpacity, filled=filled, font=font,
+ fontSize=fontSize, fontStyle=fontStyle, fontWeight=fontWeight, height=height,
+ href=href, interpolate=interpolate, limit=limit, line=line, opacity=opacity,
+ order=order, orient=orient, point=point, radius=radius, shape=shape, size=size,
+ stroke=stroke, strokeCap=strokeCap, strokeDash=strokeDash,
+ strokeDashOffset=strokeDashOffset, strokeJoin=strokeJoin,
+ strokeMiterLimit=strokeMiterLimit, strokeOpacity=strokeOpacity,
+ strokeWidth=strokeWidth, style=style, tension=tension, text=text, theta=theta,
+ thickness=thickness, tooltip=tooltip, width=width, x=x, x2=x2, x2Offset=x2Offset,
+ xOffset=xOffset, y=y, y2=y2, y2Offset=y2Offset, yOffset=yOffset, **kwds)
+ copy = self.copy(deep=False)
+ if any(val is not Undefined for val in kwds.values()):
+ copy.mark = core.MarkDef(type="square", **kwds)
+ else:
+ copy.mark = "square"
+ return copy
+
+ def mark_geoshape(self, align=Undefined, angle=Undefined, baseline=Undefined, binSpacing=Undefined,
+ clip=Undefined, color=Undefined, cornerRadius=Undefined, cursor=Undefined,
+ dir=Undefined, dx=Undefined, dy=Undefined, ellipsis=Undefined, fill=Undefined,
+ fillOpacity=Undefined, filled=Undefined, font=Undefined, fontSize=Undefined,
+ fontStyle=Undefined, fontWeight=Undefined, height=Undefined, href=Undefined,
+ interpolate=Undefined, limit=Undefined, line=Undefined, opacity=Undefined,
+ order=Undefined, orient=Undefined, point=Undefined, radius=Undefined,
+ shape=Undefined, size=Undefined, stroke=Undefined, strokeCap=Undefined,
+ strokeDash=Undefined, strokeDashOffset=Undefined, strokeJoin=Undefined,
+ strokeMiterLimit=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined,
+ style=Undefined, tension=Undefined, text=Undefined, theta=Undefined,
+ thickness=Undefined, tooltip=Undefined, width=Undefined, x=Undefined,
+ x2=Undefined, x2Offset=Undefined, xOffset=Undefined, y=Undefined, y2=Undefined,
+ y2Offset=Undefined, yOffset=Undefined, **kwds):
+ """Set the chart's mark to 'geoshape'
+
+ For information on additional arguments, see :class:`MarkDef`
+ """
+ kwds = dict(align=align, angle=angle, baseline=baseline, binSpacing=binSpacing, clip=clip,
+ color=color, cornerRadius=cornerRadius, cursor=cursor, dir=dir, dx=dx, dy=dy,
+ ellipsis=ellipsis, fill=fill, fillOpacity=fillOpacity, filled=filled, font=font,
+ fontSize=fontSize, fontStyle=fontStyle, fontWeight=fontWeight, height=height,
+ href=href, interpolate=interpolate, limit=limit, line=line, opacity=opacity,
+ order=order, orient=orient, point=point, radius=radius, shape=shape, size=size,
+ stroke=stroke, strokeCap=strokeCap, strokeDash=strokeDash,
+ strokeDashOffset=strokeDashOffset, strokeJoin=strokeJoin,
+ strokeMiterLimit=strokeMiterLimit, strokeOpacity=strokeOpacity,
+ strokeWidth=strokeWidth, style=style, tension=tension, text=text, theta=theta,
+ thickness=thickness, tooltip=tooltip, width=width, x=x, x2=x2, x2Offset=x2Offset,
+ xOffset=xOffset, y=y, y2=y2, y2Offset=y2Offset, yOffset=yOffset, **kwds)
+ copy = self.copy(deep=False)
+ if any(val is not Undefined for val in kwds.values()):
+ copy.mark = core.MarkDef(type="geoshape", **kwds)
+ else:
+ copy.mark = "geoshape"
+ return copy
+
+ def mark_boxplot(self, box=Undefined, clip=Undefined, color=Undefined, extent=Undefined,
+ median=Undefined, opacity=Undefined, orient=Undefined, outliers=Undefined,
+ rule=Undefined, size=Undefined, ticks=Undefined, **kwds):
+ """Set the chart's mark to 'boxplot'
+
+ For information on additional arguments, see :class:`BoxPlotDef`
+ """
+ kwds = dict(box=box, clip=clip, color=color, extent=extent, median=median, opacity=opacity,
+ orient=orient, outliers=outliers, rule=rule, size=size, ticks=ticks, **kwds)
+ copy = self.copy(deep=False)
+ if any(val is not Undefined for val in kwds.values()):
+ copy.mark = core.BoxPlotDef(type="boxplot", **kwds)
+ else:
+ copy.mark = "boxplot"
+ return copy
+
+ def mark_errorbar(self, clip=Undefined, color=Undefined, extent=Undefined, opacity=Undefined,
+ orient=Undefined, rule=Undefined, ticks=Undefined, **kwds):
+ """Set the chart's mark to 'errorbar'
+
+ For information on additional arguments, see :class:`ErrorBarDef`
+ """
+ kwds = dict(clip=clip, color=color, extent=extent, opacity=opacity, orient=orient, rule=rule,
+ ticks=ticks, **kwds)
+ copy = self.copy(deep=False)
+ if any(val is not Undefined for val in kwds.values()):
+ copy.mark = core.ErrorBarDef(type="errorbar", **kwds)
+ else:
+ copy.mark = "errorbar"
+ return copy
+
+ def mark_errorband(self, band=Undefined, borders=Undefined, clip=Undefined, color=Undefined,
+ extent=Undefined, interpolate=Undefined, opacity=Undefined, orient=Undefined,
+ tension=Undefined, **kwds):
+ """Set the chart's mark to 'errorband'
+
+ For information on additional arguments, see :class:`ErrorBandDef`
+ """
+ kwds = dict(band=band, borders=borders, clip=clip, color=color, extent=extent,
+ interpolate=interpolate, opacity=opacity, orient=orient, tension=tension, **kwds)
+ copy = self.copy(deep=False)
+ if any(val is not Undefined for val in kwds.values()):
+ copy.mark = core.ErrorBandDef(type="errorband", **kwds)
+ else:
+ copy.mark = "errorband"
+ return copy
+
+
+class ConfigMethodMixin(object):
+ """A mixin class that defines config methods"""
+
+ @use_signature(core.Config)
+ def configure(self, *args, **kwargs):
+ copy = self.copy(deep=False)
+ copy.config = core.Config(*args, **kwargs)
+ return copy
+
+ @use_signature(core.AreaConfig)
+ def configure_area(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["area"] = core.AreaConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.AxisConfig)
+ def configure_axis(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["axis"] = core.AxisConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.AxisConfig)
+ def configure_axisBand(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["axisBand"] = core.AxisConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.AxisConfig)
+ def configure_axisBottom(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["axisBottom"] = core.AxisConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.AxisConfig)
+ def configure_axisLeft(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["axisLeft"] = core.AxisConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.AxisConfig)
+ def configure_axisRight(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["axisRight"] = core.AxisConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.AxisConfig)
+ def configure_axisTop(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["axisTop"] = core.AxisConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.AxisConfig)
+ def configure_axisX(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["axisX"] = core.AxisConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.AxisConfig)
+ def configure_axisY(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["axisY"] = core.AxisConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.RectConfig)
+ def configure_bar(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["bar"] = core.RectConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.BoxPlotConfig)
+ def configure_boxplot(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["boxplot"] = core.BoxPlotConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.MarkConfig)
+ def configure_circle(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["circle"] = core.MarkConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.CompositionConfig)
+ def configure_concat(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["concat"] = core.CompositionConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.ErrorBandConfig)
+ def configure_errorband(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["errorband"] = core.ErrorBandConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.ErrorBarConfig)
+ def configure_errorbar(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["errorbar"] = core.ErrorBarConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.CompositionConfig)
+ def configure_facet(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["facet"] = core.CompositionConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.MarkConfig)
+ def configure_geoshape(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["geoshape"] = core.MarkConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.HeaderConfig)
+ def configure_header(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["header"] = core.HeaderConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.HeaderConfig)
+ def configure_headerColumn(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["headerColumn"] = core.HeaderConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.HeaderConfig)
+ def configure_headerFacet(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["headerFacet"] = core.HeaderConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.HeaderConfig)
+ def configure_headerRow(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["headerRow"] = core.HeaderConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.LegendConfig)
+ def configure_legend(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["legend"] = core.LegendConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.LineConfig)
+ def configure_line(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["line"] = core.LineConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.MarkConfig)
+ def configure_mark(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["mark"] = core.MarkConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.MarkConfig)
+ def configure_point(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["point"] = core.MarkConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.ProjectionConfig)
+ def configure_projection(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["projection"] = core.ProjectionConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.RangeConfig)
+ def configure_range(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["range"] = core.RangeConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.RectConfig)
+ def configure_rect(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["rect"] = core.RectConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.CompositionConfig)
+ def configure_repeat(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["repeat"] = core.CompositionConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.MarkConfig)
+ def configure_rule(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["rule"] = core.MarkConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.ScaleConfig)
+ def configure_scale(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["scale"] = core.ScaleConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.SelectionConfig)
+ def configure_selection(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["selection"] = core.SelectionConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.MarkConfig)
+ def configure_square(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["square"] = core.MarkConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.TextConfig)
+ def configure_text(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["text"] = core.TextConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.TickConfig)
+ def configure_tick(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["tick"] = core.TickConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.TitleConfig)
+ def configure_title(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["title"] = core.TitleConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.LineConfig)
+ def configure_trail(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["trail"] = core.LineConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.ViewConfig)
+ def configure_view(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["view"] = core.ViewConfig(*args, **kwargs)
+ return copy \ No newline at end of file
diff --git a/venv/lib/python3.9/site-packages/altair/vegalite/v3/schema/vega-lite-schema.json b/venv/lib/python3.9/site-packages/altair/vegalite/v3/schema/vega-lite-schema.json
new file mode 100644
index 00000000..a5e60f81
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vegalite/v3/schema/vega-lite-schema.json
@@ -0,0 +1,13315 @@
+{
+ "$ref": "#/definitions/TopLevelSpec",
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "definitions": {
+ "Aggregate": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/AggregateOp"
+ },
+ {
+ "$ref": "#/definitions/ArgmaxDef"
+ },
+ {
+ "$ref": "#/definitions/ArgminDef"
+ }
+ ]
+ },
+ "AggregateOp": {
+ "enum": [
+ "argmax",
+ "argmin",
+ "average",
+ "count",
+ "distinct",
+ "max",
+ "mean",
+ "median",
+ "min",
+ "missing",
+ "q1",
+ "q3",
+ "ci0",
+ "ci1",
+ "stderr",
+ "stdev",
+ "stdevp",
+ "sum",
+ "valid",
+ "values",
+ "variance",
+ "variancep"
+ ],
+ "type": "string"
+ },
+ "AggregateTransform": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "description": "Array of objects that define fields to aggregate.",
+ "items": {
+ "$ref": "#/definitions/AggregatedFieldDef"
+ },
+ "type": "array"
+ },
+ "groupby": {
+ "description": "The data fields to group by. If not specified, a single group containing all data objects will be used.",
+ "items": {
+ "$ref": "#/definitions/FieldName"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "aggregate"
+ ],
+ "type": "object"
+ },
+ "AggregatedFieldDef": {
+ "additionalProperties": false,
+ "properties": {
+ "as": {
+ "$ref": "#/definitions/FieldName",
+ "description": "The output field names to use for each aggregated field."
+ },
+ "field": {
+ "$ref": "#/definitions/FieldName",
+ "description": "The data field for which to compute aggregate function. This is required for all aggregation operations except `\"count\"`."
+ },
+ "op": {
+ "$ref": "#/definitions/AggregateOp",
+ "description": "The aggregation operation to apply to the fields (e.g., sum, average or count).\nSee the [full list of supported aggregation operations](https://vega.github.io/vega-lite/docs/aggregate.html#ops)\nfor more information."
+ }
+ },
+ "required": [
+ "op",
+ "as"
+ ],
+ "type": "object"
+ },
+ "Align": {
+ "enum": [
+ "left",
+ "center",
+ "right"
+ ],
+ "type": "string"
+ },
+ "AnyMark": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/CompositeMark"
+ },
+ {
+ "$ref": "#/definitions/CompositeMarkDef"
+ },
+ {
+ "$ref": "#/definitions/Mark"
+ },
+ {
+ "$ref": "#/definitions/MarkDef"
+ }
+ ]
+ },
+ "AreaConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "align": {
+ "$ref": "#/definitions/Align",
+ "description": "The horizontal alignment of the text. One of `\"left\"`, `\"right\"`, `\"center\"`."
+ },
+ "angle": {
+ "description": "The rotation angle of the text, in degrees.",
+ "maximum": 360,
+ "minimum": 0,
+ "type": "number"
+ },
+ "baseline": {
+ "$ref": "#/definitions/TextBaseline",
+ "description": "The vertical alignment of the text. One of `\"top\"`, `\"middle\"`, `\"bottom\"`.\n\n__Default value:__ `\"middle\"`"
+ },
+ "color": {
+ "$ref": "#/definitions/Color",
+ "description": "Default color. Note that `fill` and `stroke` have higher precedence than `color` and will override `color`.\n\n__Default value:__ <span style=\"color: #4682b4;\">&#9632;</span> `\"#4682b4\"`\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config)."
+ },
+ "cornerRadius": {
+ "description": "The radius in pixels of rounded rectangle corners.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ "cursor": {
+ "$ref": "#/definitions/Cursor",
+ "description": "The mouse cursor used over the mark. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used."
+ },
+ "dir": {
+ "$ref": "#/definitions/Dir",
+ "description": "The direction of the text. One of `\"ltr\"` (left-to-right) or `\"rtl\"` (right-to-left). This property determines on which side is truncated in response to the limit parameter.\n\n__Default value:__ `\"ltr\"`"
+ },
+ "dx": {
+ "description": "The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
+ "type": "number"
+ },
+ "dy": {
+ "description": "The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
+ "type": "number"
+ },
+ "ellipsis": {
+ "description": "The ellipsis string for text truncated in response to the limit parameter.\n\n__Default value:__ `\"…\"`",
+ "type": "string"
+ },
+ "fill": {
+ "$ref": "#/definitions/Color",
+ "description": "Default Fill Color. This has higher precedence than `config.color`\n\n__Default value:__ (None)"
+ },
+ "fillOpacity": {
+ "description": "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "filled": {
+ "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `false` for `point`, `line` and `rule`; otherwise, `true`.\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).",
+ "type": "boolean"
+ },
+ "font": {
+ "description": "The typeface to set the text in (e.g., `\"Helvetica Neue\"`).",
+ "type": "string"
+ },
+ "fontSize": {
+ "description": "The font size, in pixels.",
+ "type": "number"
+ },
+ "fontStyle": {
+ "$ref": "#/definitions/FontStyle",
+ "description": "The font style (e.g., `\"italic\"`)."
+ },
+ "fontWeight": {
+ "$ref": "#/definitions/FontWeight",
+ "description": "The font weight.\nThis can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)."
+ },
+ "height": {
+ "description": "Height of the marks.",
+ "type": "number"
+ },
+ "href": {
+ "description": "A URL to load upon mouse click. If defined, the mark acts as a hyperlink.",
+ "format": "uri",
+ "type": "string"
+ },
+ "interpolate": {
+ "$ref": "#/definitions/Interpolate",
+ "description": "The line interpolation method to use for line and area marks. One of the following:\n- `\"linear\"`: piecewise linear segments, as in a polyline.\n- `\"linear-closed\"`: close the linear segments to form a polygon.\n- `\"step\"`: alternate between horizontal and vertical segments, as in a step function.\n- `\"step-before\"`: alternate between vertical and horizontal segments, as in a step function.\n- `\"step-after\"`: alternate between horizontal and vertical segments, as in a step function.\n- `\"basis\"`: a B-spline, with control point duplication on the ends.\n- `\"basis-open\"`: an open B-spline; may not intersect the start or end.\n- `\"basis-closed\"`: a closed B-spline, as in a loop.\n- `\"cardinal\"`: a Cardinal spline, with control point duplication on the ends.\n- `\"cardinal-open\"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points.\n- `\"cardinal-closed\"`: a closed Cardinal spline, as in a loop.\n- `\"bundle\"`: equivalent to basis, except the tension parameter is used to straighten the spline.\n- `\"monotone\"`: cubic interpolation that preserves monotonicity in y."
+ },
+ "limit": {
+ "description": "The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0`, indicating no limit",
+ "type": "number"
+ },
+ "line": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/OverlayMarkDef"
+ }
+ ],
+ "description": "A flag for overlaying line on top of area marks, or an object defining the properties of the overlayed lines.\n\n- If this value is an empty object (`{}`) or `true`, lines with default properties will be used.\n\n- If this value is `false`, no lines would be automatically added to area marks.\n\n__Default value:__ `false`."
+ },
+ "opacity": {
+ "description": "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "order": {
+ "description": "For line and trail marks, this `order` property can be set to `null` or `false` to make the lines use the original order in the data sources.",
+ "type": [
+ "null",
+ "boolean"
+ ]
+ },
+ "orient": {
+ "$ref": "#/definitions/Orientation",
+ "description": "The orientation of a non-stacked bar, tick, area, and line charts.\nThe value is either horizontal (default) or vertical.\n- For bar, rule and tick, this determines whether the size of the bar and tick\nshould be applied to x or y dimension.\n- For area, this property determines the orient property of the Vega output.\n- For line and trail marks, this property determines the sort order of the points in the line\nif `config.sortLineBy` is not specified.\nFor stacked charts, this is always determined by the orientation of the stack;\ntherefore explicitly specified value will be ignored."
+ },
+ "point": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/OverlayMarkDef"
+ },
+ {
+ "enum": [
+ "transparent"
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "A flag for overlaying points on top of line or area marks, or an object defining the properties of the overlayed points.\n\n- If this property is `\"transparent\"`, transparent points will be used (for enhancing tooltips and selections).\n\n- If this property is an empty object (`{}`) or `true`, filled points with default properties will be used.\n\n- If this property is `false`, no points would be automatically added to line or area marks.\n\n__Default value:__ `false`."
+ },
+ "radius": {
+ "description": "Polar coordinate radial offset, in pixels, of the text label from the origin determined by the `x` and `y` properties.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "shape": {
+ "description": "Shape of the point marks. Supported values include:\n- plotting shapes: `\"circle\"`, `\"square\"`, `\"cross\"`, `\"diamond\"`, `\"triangle-up\"`, `\"triangle-down\"`, `\"triangle-right\"`, or `\"triangle-left\"`.\n- the line symbol `\"stroke\"`\n- centered directional shapes `\"arrow\"`, `\"wedge\"`, or `\"triangle\"`\n- a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n__Default value:__ `\"circle\"`",
+ "type": "string"
+ },
+ "size": {
+ "description": "Default size for marks.\n- For `point`/`circle`/`square`, this represents the pixel area of the marks. For example: in the case of circles, the radius is determined in part by the square root of the size value.\n- For `bar`, this represents the band size of the bar, in pixels.\n- For `text`, this represents the font size, in pixels.\n\n__Default value:__ `30` for point, circle, square marks; `rangeStep` - 1 for bar marks with discrete dimensions; `5` for bar marks with continuous dimensions; `11` for text marks.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "stroke": {
+ "$ref": "#/definitions/Color",
+ "description": "Default Stroke Color. This has higher precedence than `config.color`\n\n__Default value:__ (None)"
+ },
+ "strokeCap": {
+ "$ref": "#/definitions/StrokeCap",
+ "description": "The stroke cap for line ending style. One of `\"butt\"`, `\"round\"`, or `\"square\"`.\n\n__Default value:__ `\"square\"`"
+ },
+ "strokeDash": {
+ "description": "An array of alternating stroke, space lengths for creating dashed or dotted lines.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "strokeDashOffset": {
+ "description": "The offset (in pixels) into which to begin drawing with the stroke dash array.",
+ "type": "number"
+ },
+ "strokeJoin": {
+ "$ref": "#/definitions/StrokeJoin",
+ "description": "The stroke line join method. One of `\"miter\"`, `\"round\"` or `\"bevel\"`.\n\n__Default value:__ `\"miter\"`"
+ },
+ "strokeMiterLimit": {
+ "description": "The miter limit at which to bevel a line join.",
+ "type": "number"
+ },
+ "strokeOpacity": {
+ "description": "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "strokeWidth": {
+ "description": "The stroke width, in pixels.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "tension": {
+ "description": "Depending on the interpolation type, sets the tension parameter (for line and area marks).",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "text": {
+ "description": "Placeholder text if the `text` channel is not specified",
+ "type": "string"
+ },
+ "theta": {
+ "description": "Polar coordinate angle, in radians, of the text label from the origin determined by the `x` and `y` properties. Values for `theta` follow the same convention of `arc` mark `startAngle` and `endAngle` properties: angles are measured in radians, with `0` indicating \"north\".",
+ "type": "number"
+ },
+ "tooltip": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Value"
+ },
+ {
+ "$ref": "#/definitions/TooltipContent"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.\n\n- If `tooltip` is `{\"content\": \"encoding\"}`, then all fields from `encoding` will be used.\n- If `tooltip` is `{\"content\": \"data\"}`, then all fields that appear in the highlighted data point will be used.\n- If set to `null`, then no tooltip will be used."
+ },
+ "width": {
+ "description": "Width of the marks.",
+ "type": "number"
+ },
+ "x": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "enum": [
+ "width"
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "X coordinates of the marks, or width of horizontal `\"bar\"` and `\"area\"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "x2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "enum": [
+ "width"
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "X2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "y": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "enum": [
+ "height"
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "Y coordinates of the marks, or height of vertical `\"bar\"` and `\"area\"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ },
+ "y2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "enum": [
+ "width"
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "Y2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ }
+ },
+ "type": "object"
+ },
+ "ArgmaxDef": {
+ "additionalProperties": false,
+ "properties": {
+ "argmax": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "argmax"
+ ],
+ "type": "object"
+ },
+ "ArgminDef": {
+ "additionalProperties": false,
+ "properties": {
+ "argmin": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "argmin"
+ ],
+ "type": "object"
+ },
+ "AutoSizeParams": {
+ "additionalProperties": false,
+ "properties": {
+ "contains": {
+ "description": "Determines how size calculation should be performed, one of `\"content\"` or `\"padding\"`. The default setting (`\"content\"`) interprets the width and height settings as the data rectangle (plotting) dimensions, to which padding is then added. In contrast, the `\"padding\"` setting includes the padding within the view size calculations, such that the width and height settings indicate the **total** intended size of the view.\n\n__Default value__: `\"content\"`",
+ "enum": [
+ "content",
+ "padding"
+ ],
+ "type": "string"
+ },
+ "resize": {
+ "description": "A boolean flag indicating if autosize layout should be re-calculated on every view update.\n\n__Default value__: `false`",
+ "type": "boolean"
+ },
+ "type": {
+ "$ref": "#/definitions/AutosizeType",
+ "description": "The sizing format type. One of `\"pad\"`, `\"fit\"` or `\"none\"`. See the [autosize type](https://vega.github.io/vega-lite/docs/size.html#autosize) documentation for descriptions of each.\n\n__Default value__: `\"pad\"`"
+ }
+ },
+ "type": "object"
+ },
+ "AutosizeType": {
+ "enum": [
+ "pad",
+ "fit",
+ "none"
+ ],
+ "type": "string"
+ },
+ "Axis": {
+ "additionalProperties": false,
+ "properties": {
+ "bandPosition": {
+ "description": "An interpolation fraction indicating where, for `band` scales, axis ticks should be positioned. A value of `0` places ticks at the left edge of their bands. A value of `0.5` places ticks in the middle of their bands.\n\n __Default value:__ `0.5`",
+ "type": "number"
+ },
+ "domain": {
+ "description": "A boolean flag indicating if the domain (the axis baseline) should be included as part of the axis.\n\n__Default value:__ `true`",
+ "type": "boolean"
+ },
+ "domainColor": {
+ "$ref": "#/definitions/Color",
+ "description": "Color of axis domain line.\n\n__Default value:__ `\"gray\"`."
+ },
+ "domainDash": {
+ "description": "An array of alternating [stroke, space] lengths for dashed domain lines.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "domainDashOffset": {
+ "description": "The pixel offset at which to start drawing with the domain dash array.",
+ "type": "number"
+ },
+ "domainOpacity": {
+ "description": "Opacity of the axis domain line.",
+ "type": "number"
+ },
+ "domainWidth": {
+ "description": "Stroke width of axis domain line\n\n__Default value:__ `1`",
+ "type": "number"
+ },
+ "format": {
+ "description": "The text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `\"number\"` (e.g., for quantitative fields), this is D3's [number format pattern](https://github.com/d3/d3-format#locale_format).\n- If the format type is `\"time\"` (e.g., for temporal fields), this is D3's [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\n__Default value:__ Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format.",
+ "type": "string"
+ },
+ "formatType": {
+ "description": "The format type for labels (`\"number\"` or `\"time\"`).\n\n__Default value:__\n- `\"time\"` for temporal fields and ordinal and nomimal fields with `timeUnit`.\n- `\"number\"` for quantitative fields as well as ordinal and nomimal fields without `timeUnit`.",
+ "enum": [
+ "number",
+ "time"
+ ],
+ "type": "string"
+ },
+ "grid": {
+ "description": "A boolean flag indicating if grid lines should be included as part of the axis\n\n__Default value:__ `true` for [continuous scales](https://vega.github.io/vega-lite/docs/scale.html#continuous) that are not binned; otherwise, `false`.",
+ "type": "boolean"
+ },
+ "gridColor": {
+ "$ref": "#/definitions/Color",
+ "description": "Color of gridlines.\n\n__Default value:__ `\"lightGray\"`."
+ },
+ "gridDash": {
+ "description": "An array of alternating [stroke, space] lengths for dashed grid lines.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "gridDashOffset": {
+ "description": "The pixel offset at which to start drawing with the grid dash array.",
+ "type": "number"
+ },
+ "gridOpacity": {
+ "description": "The stroke opacity of grid (value between [0,1])\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "gridWidth": {
+ "description": "The grid width, in pixels.\n\n__Default value:__ `1`",
+ "minimum": 0,
+ "type": "number"
+ },
+ "labelAlign": {
+ "$ref": "#/definitions/Align",
+ "description": "Horizontal text alignment of axis tick labels, overriding the default setting for the current axis orientation."
+ },
+ "labelAngle": {
+ "description": "The rotation angle of the axis labels.\n\n__Default value:__ `-90` for nominal and ordinal fields; `0` otherwise.",
+ "maximum": 360,
+ "minimum": -360,
+ "type": "number"
+ },
+ "labelBaseline": {
+ "$ref": "#/definitions/TextBaseline",
+ "description": "Vertical text baseline of axis tick labels, overriding the default setting for the current axis orientation. Can be `\"top\"`, `\"middle\"`, `\"bottom\"`, or `\"alphabetic\"`."
+ },
+ "labelBound": {
+ "description": "Indicates if labels should be hidden if they exceed the axis range. If `false` (the default) no bounds overlap analysis is performed. If `true`, labels will be hidden if they exceed the axis range by more than 1 pixel. If this property is a number, it specifies the pixel tolerance: the maximum amount by which a label bounding box may exceed the axis range.\n\n__Default value:__ `false`.",
+ "type": [
+ "number",
+ "boolean"
+ ]
+ },
+ "labelColor": {
+ "$ref": "#/definitions/Color",
+ "description": "The color of the tick label, can be in hex color code or regular color name."
+ },
+ "labelFlush": {
+ "description": "Indicates if the first and last axis labels should be aligned flush with the scale range. Flush alignment for a horizontal axis will left-align the first label and right-align the last label. For vertical axes, bottom and top text baselines are applied instead. If this property is a number, it also indicates the number of pixels by which to offset the first and last labels; for example, a value of 2 will flush-align the first and last labels and also push them 2 pixels outward from the center of the axis. The additional adjustment can sometimes help the labels better visually group with corresponding axis ticks.\n\n__Default value:__ `true` for axis of a continuous x-scale. Otherwise, `false`.",
+ "type": [
+ "boolean",
+ "number"
+ ]
+ },
+ "labelFlushOffset": {
+ "description": "Indicates the number of pixels by which to offset flush-adjusted labels. For example, a value of `2` will push flush-adjusted labels 2 pixels outward from the center of the axis. Offsets can help the labels better visually group with corresponding axis ticks.\n\n__Default value:__ `0`.",
+ "type": "number"
+ },
+ "labelFont": {
+ "description": "The font of the tick label.",
+ "type": "string"
+ },
+ "labelFontSize": {
+ "description": "The font size of the label, in pixels.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "labelFontStyle": {
+ "$ref": "#/definitions/FontStyle",
+ "description": "Font style of the title."
+ },
+ "labelFontWeight": {
+ "$ref": "#/definitions/FontWeight",
+ "description": "Font weight of axis tick labels."
+ },
+ "labelLimit": {
+ "description": "Maximum allowed pixel width of axis tick labels.\n\n__Default value:__ `180`",
+ "type": "number"
+ },
+ "labelOpacity": {
+ "description": "The opacity of the labels.",
+ "type": "number"
+ },
+ "labelOverlap": {
+ "$ref": "#/definitions/LabelOverlap",
+ "description": "The strategy to use for resolving overlap of axis labels. If `false` (the default), no overlap reduction is attempted. If set to `true` or `\"parity\"`, a strategy of removing every other label is used (this works well for standard linear axes). If set to `\"greedy\"`, a linear scan of the labels is performed, removing any labels that overlaps with the last visible label (this often works better for log-scaled axes).\n\n__Default value:__ `true` for non-nominal fields with non-log scales; `\"greedy\"` for log scales; otherwise `false`."
+ },
+ "labelPadding": {
+ "description": "The padding, in pixels, between axis and text labels.\n\n__Default value:__ `2`",
+ "type": "number"
+ },
+ "labelSeparation": {
+ "description": "The minimum separation that must be between label bounding boxes for them to be considered non-overlapping (default `0`). This property is ignored if *labelOverlap* resolution is not enabled.",
+ "type": "number"
+ },
+ "labels": {
+ "description": "A boolean flag indicating if labels should be included as part of the axis.\n\n__Default value:__ `true`.",
+ "type": "boolean"
+ },
+ "maxExtent": {
+ "description": "The maximum extent in pixels that axis ticks and labels should use. This determines a maximum offset value for axis titles.\n\n__Default value:__ `undefined`.",
+ "type": "number"
+ },
+ "minExtent": {
+ "description": "The minimum extent in pixels that axis ticks and labels should use. This determines a minimum offset value for axis titles.\n\n__Default value:__ `30` for y-axis; `undefined` for x-axis.",
+ "type": "number"
+ },
+ "offset": {
+ "description": "The offset, in pixels, by which to displace the axis from the edge of the enclosing group or data rectangle.\n\n__Default value:__ derived from the [axis config](https://vega.github.io/vega-lite/docs/config.html#facet-scale-config)'s `offset` (`0` by default)",
+ "type": "number"
+ },
+ "orient": {
+ "$ref": "#/definitions/AxisOrient",
+ "description": "The orientation of the axis. One of `\"top\"`, `\"bottom\"`, `\"left\"` or `\"right\"`. The orientation can be used to further specialize the axis type (e.g., a y-axis oriented towards the right edge of the chart).\n\n__Default value:__ `\"bottom\"` for x-axes and `\"left\"` for y-axes."
+ },
+ "position": {
+ "description": "The anchor position of the axis in pixels. For x-axes with top or bottom orientation, this sets the axis group x coordinate. For y-axes with left or right orientation, this sets the axis group y coordinate.\n\n__Default value__: `0`",
+ "type": "number"
+ },
+ "tickColor": {
+ "$ref": "#/definitions/Color",
+ "description": "The color of the axis's tick.\n\n__Default value:__ `\"gray\"`"
+ },
+ "tickCount": {
+ "description": "A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are \"nice\" (multiples of 2, 5, 10) and lie within the underlying scale's range.",
+ "type": "number"
+ },
+ "tickDash": {
+ "description": "An array of alternating [stroke, space] lengths for dashed tick mark lines.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "tickDashOffset": {
+ "description": "The pixel offset at which to start drawing with the tick mark dash array.",
+ "type": "number"
+ },
+ "tickExtra": {
+ "description": "Boolean flag indicating if an extra axis tick should be added for the initial position of the axis. This flag is useful for styling axes for `band` scales such that ticks are placed on band boundaries rather in the middle of a band. Use in conjunction with `\"bandPosition\": 1` and an axis `\"padding\"` value of `0`.",
+ "type": "boolean"
+ },
+ "tickMinStep": {
+ "description": "The minimum desired step between axis ticks, in terms of scale domain values. For example, a value of `1` indicates that ticks should not be less than 1 unit apart. If `tickMinStep` is specified, the `tickCount` value will be adjusted, if necessary, to enforce the minimum step value.\n\n__Default value__: `undefined`",
+ "type": "number"
+ },
+ "tickOffset": {
+ "description": "Position offset in pixels to apply to ticks, labels, and gridlines.",
+ "type": "number"
+ },
+ "tickOpacity": {
+ "description": "Opacity of the ticks.",
+ "type": "number"
+ },
+ "tickRound": {
+ "description": "Boolean flag indicating if pixel position values should be rounded to the nearest integer.\n\n__Default value:__ `true`",
+ "type": "boolean"
+ },
+ "tickSize": {
+ "description": "The size in pixels of axis ticks.\n\n__Default value:__ `5`",
+ "minimum": 0,
+ "type": "number"
+ },
+ "tickWidth": {
+ "description": "The width, in pixels, of ticks.\n\n__Default value:__ `1`",
+ "minimum": 0,
+ "type": "number"
+ },
+ "ticks": {
+ "description": "Boolean value that determines whether the axis should include ticks.\n\n__Default value:__ `true`",
+ "type": "boolean"
+ },
+ "title": {
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.",
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "titleAlign": {
+ "$ref": "#/definitions/Align",
+ "description": "Horizontal text alignment of axis titles."
+ },
+ "titleAnchor": {
+ "$ref": "#/definitions/TitleAnchor",
+ "description": "Text anchor position for placing axis titles."
+ },
+ "titleAngle": {
+ "description": "Angle in degrees of axis titles.",
+ "type": "number"
+ },
+ "titleBaseline": {
+ "$ref": "#/definitions/TextBaseline",
+ "description": "Vertical text baseline for axis titles."
+ },
+ "titleColor": {
+ "$ref": "#/definitions/Color",
+ "description": "Color of the title, can be in hex color code or regular color name."
+ },
+ "titleFont": {
+ "description": "Font of the title. (e.g., `\"Helvetica Neue\"`).",
+ "type": "string"
+ },
+ "titleFontSize": {
+ "description": "Font size of the title.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "titleFontStyle": {
+ "$ref": "#/definitions/FontStyle",
+ "description": "Font style of the title."
+ },
+ "titleFontWeight": {
+ "$ref": "#/definitions/FontWeight",
+ "description": "Font weight of the title.\nThis can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)."
+ },
+ "titleLimit": {
+ "description": "Maximum allowed pixel width of axis titles.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "titleOpacity": {
+ "description": "Opacity of the axis title.",
+ "type": "number"
+ },
+ "titlePadding": {
+ "description": "The padding, in pixels, between title and axis.",
+ "type": "number"
+ },
+ "titleX": {
+ "description": "X-coordinate of the axis title relative to the axis group.",
+ "type": "number"
+ },
+ "titleY": {
+ "description": "Y-coordinate of the axis title relative to the axis group.",
+ "type": "number"
+ },
+ "values": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "items": {
+ "type": "boolean"
+ },
+ "type": "array"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/DateTime"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "Explicitly set the visible axis tick values."
+ },
+ "zindex": {
+ "description": "A non-negative integer indicating the z-index of the axis.\nIf zindex is 0, axes should be drawn behind all chart elements.\nTo put them in front, use `\"zindex = 1\"`.\n\n__Default value:__ `1` (in front of the marks) for actual axis and `0` (behind the marks) for grids.",
+ "minimum": 0,
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "AxisConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "bandPosition": {
+ "description": "An interpolation fraction indicating where, for `band` scales, axis ticks should be positioned. A value of `0` places ticks at the left edge of their bands. A value of `0.5` places ticks in the middle of their bands.\n\n __Default value:__ `0.5`",
+ "type": "number"
+ },
+ "domain": {
+ "description": "A boolean flag indicating if the domain (the axis baseline) should be included as part of the axis.\n\n__Default value:__ `true`",
+ "type": "boolean"
+ },
+ "domainColor": {
+ "$ref": "#/definitions/Color",
+ "description": "Color of axis domain line.\n\n__Default value:__ `\"gray\"`."
+ },
+ "domainDash": {
+ "description": "An array of alternating [stroke, space] lengths for dashed domain lines.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "domainDashOffset": {
+ "description": "The pixel offset at which to start drawing with the domain dash array.",
+ "type": "number"
+ },
+ "domainOpacity": {
+ "description": "Opacity of the axis domain line.",
+ "type": "number"
+ },
+ "domainWidth": {
+ "description": "Stroke width of axis domain line\n\n__Default value:__ `1`",
+ "type": "number"
+ },
+ "grid": {
+ "description": "A boolean flag indicating if grid lines should be included as part of the axis\n\n__Default value:__ `true` for [continuous scales](https://vega.github.io/vega-lite/docs/scale.html#continuous) that are not binned; otherwise, `false`.",
+ "type": "boolean"
+ },
+ "gridColor": {
+ "$ref": "#/definitions/Color",
+ "description": "Color of gridlines.\n\n__Default value:__ `\"lightGray\"`."
+ },
+ "gridDash": {
+ "description": "An array of alternating [stroke, space] lengths for dashed grid lines.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "gridDashOffset": {
+ "description": "The pixel offset at which to start drawing with the grid dash array.",
+ "type": "number"
+ },
+ "gridOpacity": {
+ "description": "The stroke opacity of grid (value between [0,1])\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "gridWidth": {
+ "description": "The grid width, in pixels.\n\n__Default value:__ `1`",
+ "minimum": 0,
+ "type": "number"
+ },
+ "labelAlign": {
+ "$ref": "#/definitions/Align",
+ "description": "Horizontal text alignment of axis tick labels, overriding the default setting for the current axis orientation."
+ },
+ "labelAngle": {
+ "description": "The rotation angle of the axis labels.\n\n__Default value:__ `-90` for nominal and ordinal fields; `0` otherwise.",
+ "maximum": 360,
+ "minimum": -360,
+ "type": "number"
+ },
+ "labelBaseline": {
+ "$ref": "#/definitions/TextBaseline",
+ "description": "Vertical text baseline of axis tick labels, overriding the default setting for the current axis orientation. Can be `\"top\"`, `\"middle\"`, `\"bottom\"`, or `\"alphabetic\"`."
+ },
+ "labelBound": {
+ "description": "Indicates if labels should be hidden if they exceed the axis range. If `false` (the default) no bounds overlap analysis is performed. If `true`, labels will be hidden if they exceed the axis range by more than 1 pixel. If this property is a number, it specifies the pixel tolerance: the maximum amount by which a label bounding box may exceed the axis range.\n\n__Default value:__ `false`.",
+ "type": [
+ "number",
+ "boolean"
+ ]
+ },
+ "labelColor": {
+ "$ref": "#/definitions/Color",
+ "description": "The color of the tick label, can be in hex color code or regular color name."
+ },
+ "labelFlush": {
+ "description": "Indicates if the first and last axis labels should be aligned flush with the scale range. Flush alignment for a horizontal axis will left-align the first label and right-align the last label. For vertical axes, bottom and top text baselines are applied instead. If this property is a number, it also indicates the number of pixels by which to offset the first and last labels; for example, a value of 2 will flush-align the first and last labels and also push them 2 pixels outward from the center of the axis. The additional adjustment can sometimes help the labels better visually group with corresponding axis ticks.\n\n__Default value:__ `true` for axis of a continuous x-scale. Otherwise, `false`.",
+ "type": [
+ "boolean",
+ "number"
+ ]
+ },
+ "labelFlushOffset": {
+ "description": "Indicates the number of pixels by which to offset flush-adjusted labels. For example, a value of `2` will push flush-adjusted labels 2 pixels outward from the center of the axis. Offsets can help the labels better visually group with corresponding axis ticks.\n\n__Default value:__ `0`.",
+ "type": "number"
+ },
+ "labelFont": {
+ "description": "The font of the tick label.",
+ "type": "string"
+ },
+ "labelFontSize": {
+ "description": "The font size of the label, in pixels.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "labelFontStyle": {
+ "$ref": "#/definitions/FontStyle",
+ "description": "Font style of the title."
+ },
+ "labelFontWeight": {
+ "$ref": "#/definitions/FontWeight",
+ "description": "Font weight of axis tick labels."
+ },
+ "labelLimit": {
+ "description": "Maximum allowed pixel width of axis tick labels.\n\n__Default value:__ `180`",
+ "type": "number"
+ },
+ "labelOpacity": {
+ "description": "The opacity of the labels.",
+ "type": "number"
+ },
+ "labelOverlap": {
+ "$ref": "#/definitions/LabelOverlap",
+ "description": "The strategy to use for resolving overlap of axis labels. If `false` (the default), no overlap reduction is attempted. If set to `true` or `\"parity\"`, a strategy of removing every other label is used (this works well for standard linear axes). If set to `\"greedy\"`, a linear scan of the labels is performed, removing any labels that overlaps with the last visible label (this often works better for log-scaled axes).\n\n__Default value:__ `true` for non-nominal fields with non-log scales; `\"greedy\"` for log scales; otherwise `false`."
+ },
+ "labelPadding": {
+ "description": "The padding, in pixels, between axis and text labels.\n\n__Default value:__ `2`",
+ "type": "number"
+ },
+ "labelSeparation": {
+ "description": "The minimum separation that must be between label bounding boxes for them to be considered non-overlapping (default `0`). This property is ignored if *labelOverlap* resolution is not enabled.",
+ "type": "number"
+ },
+ "labels": {
+ "description": "A boolean flag indicating if labels should be included as part of the axis.\n\n__Default value:__ `true`.",
+ "type": "boolean"
+ },
+ "maxExtent": {
+ "description": "The maximum extent in pixels that axis ticks and labels should use. This determines a maximum offset value for axis titles.\n\n__Default value:__ `undefined`.",
+ "type": "number"
+ },
+ "minExtent": {
+ "description": "The minimum extent in pixels that axis ticks and labels should use. This determines a minimum offset value for axis titles.\n\n__Default value:__ `30` for y-axis; `undefined` for x-axis.",
+ "type": "number"
+ },
+ "orient": {
+ "$ref": "#/definitions/AxisOrient",
+ "description": "The orientation of the axis. One of `\"top\"`, `\"bottom\"`, `\"left\"` or `\"right\"`. The orientation can be used to further specialize the axis type (e.g., a y-axis oriented towards the right edge of the chart).\n\n__Default value:__ `\"bottom\"` for x-axes and `\"left\"` for y-axes."
+ },
+ "shortTimeLabels": {
+ "description": "Whether month names and weekday names should be abbreviated.\n\n__Default value:__ `false`",
+ "type": "boolean"
+ },
+ "tickColor": {
+ "$ref": "#/definitions/Color",
+ "description": "The color of the axis's tick.\n\n__Default value:__ `\"gray\"`"
+ },
+ "tickDash": {
+ "description": "An array of alternating [stroke, space] lengths for dashed tick mark lines.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "tickDashOffset": {
+ "description": "The pixel offset at which to start drawing with the tick mark dash array.",
+ "type": "number"
+ },
+ "tickExtra": {
+ "description": "Boolean flag indicating if an extra axis tick should be added for the initial position of the axis. This flag is useful for styling axes for `band` scales such that ticks are placed on band boundaries rather in the middle of a band. Use in conjunction with `\"bandPosition\": 1` and an axis `\"padding\"` value of `0`.",
+ "type": "boolean"
+ },
+ "tickOffset": {
+ "description": "Position offset in pixels to apply to ticks, labels, and gridlines.",
+ "type": "number"
+ },
+ "tickOpacity": {
+ "description": "Opacity of the ticks.",
+ "type": "number"
+ },
+ "tickRound": {
+ "description": "Boolean flag indicating if pixel position values should be rounded to the nearest integer.\n\n__Default value:__ `true`",
+ "type": "boolean"
+ },
+ "tickSize": {
+ "description": "The size in pixels of axis ticks.\n\n__Default value:__ `5`",
+ "minimum": 0,
+ "type": "number"
+ },
+ "tickWidth": {
+ "description": "The width, in pixels, of ticks.\n\n__Default value:__ `1`",
+ "minimum": 0,
+ "type": "number"
+ },
+ "ticks": {
+ "description": "Boolean value that determines whether the axis should include ticks.\n\n__Default value:__ `true`",
+ "type": "boolean"
+ },
+ "title": {
+ "description": "Set to null to disable title for the axis, legend, or header.",
+ "type": "null"
+ },
+ "titleAlign": {
+ "$ref": "#/definitions/Align",
+ "description": "Horizontal text alignment of axis titles."
+ },
+ "titleAnchor": {
+ "$ref": "#/definitions/TitleAnchor",
+ "description": "Text anchor position for placing axis titles."
+ },
+ "titleAngle": {
+ "description": "Angle in degrees of axis titles.",
+ "type": "number"
+ },
+ "titleBaseline": {
+ "$ref": "#/definitions/TextBaseline",
+ "description": "Vertical text baseline for axis titles."
+ },
+ "titleColor": {
+ "$ref": "#/definitions/Color",
+ "description": "Color of the title, can be in hex color code or regular color name."
+ },
+ "titleFont": {
+ "description": "Font of the title. (e.g., `\"Helvetica Neue\"`).",
+ "type": "string"
+ },
+ "titleFontSize": {
+ "description": "Font size of the title.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "titleFontStyle": {
+ "$ref": "#/definitions/FontStyle",
+ "description": "Font style of the title."
+ },
+ "titleFontWeight": {
+ "$ref": "#/definitions/FontWeight",
+ "description": "Font weight of the title.\nThis can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)."
+ },
+ "titleLimit": {
+ "description": "Maximum allowed pixel width of axis titles.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "titleOpacity": {
+ "description": "Opacity of the axis title.",
+ "type": "number"
+ },
+ "titlePadding": {
+ "description": "The padding, in pixels, between title and axis.",
+ "type": "number"
+ },
+ "titleX": {
+ "description": "X-coordinate of the axis title relative to the axis group.",
+ "type": "number"
+ },
+ "titleY": {
+ "description": "Y-coordinate of the axis title relative to the axis group.",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "AxisOrient": {
+ "enum": [
+ "top",
+ "bottom",
+ "left",
+ "right"
+ ],
+ "type": "string"
+ },
+ "AxisResolveMap": {
+ "additionalProperties": false,
+ "properties": {
+ "x": {
+ "$ref": "#/definitions/ResolveMode"
+ },
+ "y": {
+ "$ref": "#/definitions/ResolveMode"
+ }
+ },
+ "type": "object"
+ },
+ "BaseLegendLayout": {
+ "additionalProperties": false,
+ "properties": {
+ "anchor": {
+ "$ref": "#/definitions/TitleAnchor",
+ "description": "The anchor point for legend orient group layout."
+ },
+ "bounds": {
+ "$ref": "#/definitions/LayoutBounds",
+ "description": "The bounds calculation to use for legend orient group layout."
+ },
+ "center": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/SignalRef"
+ }
+ ],
+ "description": "A flag to center legends within a shared orient group."
+ },
+ "direction": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Orientation"
+ },
+ {
+ "$ref": "#/definitions/SignalRef"
+ }
+ ],
+ "description": "The layout direction for legend orient group layout."
+ },
+ "margin": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/SignalRef"
+ }
+ ],
+ "description": "The pixel margin between legends within a orient group."
+ },
+ "offset": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/SignalRef"
+ }
+ ],
+ "description": "The pixel offset from the chart body for a legend orient group."
+ }
+ },
+ "type": "object"
+ },
+ "BaseMarkConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "align": {
+ "$ref": "#/definitions/Align",
+ "description": "The horizontal alignment of the text. One of `\"left\"`, `\"right\"`, `\"center\"`."
+ },
+ "angle": {
+ "description": "The rotation angle of the text, in degrees.",
+ "maximum": 360,
+ "minimum": 0,
+ "type": "number"
+ },
+ "baseline": {
+ "$ref": "#/definitions/TextBaseline",
+ "description": "The vertical alignment of the text. One of `\"top\"`, `\"middle\"`, `\"bottom\"`.\n\n__Default value:__ `\"middle\"`"
+ },
+ "cornerRadius": {
+ "description": "The radius in pixels of rounded rectangle corners.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ "cursor": {
+ "$ref": "#/definitions/Cursor",
+ "description": "The mouse cursor used over the mark. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used."
+ },
+ "dir": {
+ "$ref": "#/definitions/Dir",
+ "description": "The direction of the text. One of `\"ltr\"` (left-to-right) or `\"rtl\"` (right-to-left). This property determines on which side is truncated in response to the limit parameter.\n\n__Default value:__ `\"ltr\"`"
+ },
+ "dx": {
+ "description": "The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
+ "type": "number"
+ },
+ "dy": {
+ "description": "The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
+ "type": "number"
+ },
+ "ellipsis": {
+ "description": "The ellipsis string for text truncated in response to the limit parameter.\n\n__Default value:__ `\"…\"`",
+ "type": "string"
+ },
+ "fill": {
+ "$ref": "#/definitions/Color",
+ "description": "Default Fill Color. This has higher precedence than `config.color`\n\n__Default value:__ (None)"
+ },
+ "fillOpacity": {
+ "description": "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "font": {
+ "description": "The typeface to set the text in (e.g., `\"Helvetica Neue\"`).",
+ "type": "string"
+ },
+ "fontSize": {
+ "description": "The font size, in pixels.",
+ "type": "number"
+ },
+ "fontStyle": {
+ "$ref": "#/definitions/FontStyle",
+ "description": "The font style (e.g., `\"italic\"`)."
+ },
+ "fontWeight": {
+ "$ref": "#/definitions/FontWeight",
+ "description": "The font weight.\nThis can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)."
+ },
+ "height": {
+ "description": "Height of the marks.",
+ "type": "number"
+ },
+ "href": {
+ "description": "A URL to load upon mouse click. If defined, the mark acts as a hyperlink.",
+ "format": "uri",
+ "type": "string"
+ },
+ "interpolate": {
+ "$ref": "#/definitions/Interpolate",
+ "description": "The line interpolation method to use for line and area marks. One of the following:\n- `\"linear\"`: piecewise linear segments, as in a polyline.\n- `\"linear-closed\"`: close the linear segments to form a polygon.\n- `\"step\"`: alternate between horizontal and vertical segments, as in a step function.\n- `\"step-before\"`: alternate between vertical and horizontal segments, as in a step function.\n- `\"step-after\"`: alternate between horizontal and vertical segments, as in a step function.\n- `\"basis\"`: a B-spline, with control point duplication on the ends.\n- `\"basis-open\"`: an open B-spline; may not intersect the start or end.\n- `\"basis-closed\"`: a closed B-spline, as in a loop.\n- `\"cardinal\"`: a Cardinal spline, with control point duplication on the ends.\n- `\"cardinal-open\"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points.\n- `\"cardinal-closed\"`: a closed Cardinal spline, as in a loop.\n- `\"bundle\"`: equivalent to basis, except the tension parameter is used to straighten the spline.\n- `\"monotone\"`: cubic interpolation that preserves monotonicity in y."
+ },
+ "limit": {
+ "description": "The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0`, indicating no limit",
+ "type": "number"
+ },
+ "opacity": {
+ "description": "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "orient": {
+ "$ref": "#/definitions/Orientation",
+ "description": "The orientation of a non-stacked bar, tick, area, and line charts.\nThe value is either horizontal (default) or vertical.\n- For bar, rule and tick, this determines whether the size of the bar and tick\nshould be applied to x or y dimension.\n- For area, this property determines the orient property of the Vega output.\n- For line and trail marks, this property determines the sort order of the points in the line\nif `config.sortLineBy` is not specified.\nFor stacked charts, this is always determined by the orientation of the stack;\ntherefore explicitly specified value will be ignored."
+ },
+ "radius": {
+ "description": "Polar coordinate radial offset, in pixels, of the text label from the origin determined by the `x` and `y` properties.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "shape": {
+ "description": "Shape of the point marks. Supported values include:\n- plotting shapes: `\"circle\"`, `\"square\"`, `\"cross\"`, `\"diamond\"`, `\"triangle-up\"`, `\"triangle-down\"`, `\"triangle-right\"`, or `\"triangle-left\"`.\n- the line symbol `\"stroke\"`\n- centered directional shapes `\"arrow\"`, `\"wedge\"`, or `\"triangle\"`\n- a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n__Default value:__ `\"circle\"`",
+ "type": "string"
+ },
+ "size": {
+ "description": "The pixel area each the point/circle/square.\nFor example: in the case of circles, the radius is determined in part by the square root of the size value.\n\n__Default value:__ `30`",
+ "minimum": 0,
+ "type": "number"
+ },
+ "stroke": {
+ "$ref": "#/definitions/Color",
+ "description": "Default Stroke Color. This has higher precedence than `config.color`\n\n__Default value:__ (None)"
+ },
+ "strokeCap": {
+ "$ref": "#/definitions/StrokeCap",
+ "description": "The stroke cap for line ending style. One of `\"butt\"`, `\"round\"`, or `\"square\"`.\n\n__Default value:__ `\"square\"`"
+ },
+ "strokeDash": {
+ "description": "An array of alternating stroke, space lengths for creating dashed or dotted lines.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "strokeDashOffset": {
+ "description": "The offset (in pixels) into which to begin drawing with the stroke dash array.",
+ "type": "number"
+ },
+ "strokeJoin": {
+ "$ref": "#/definitions/StrokeJoin",
+ "description": "The stroke line join method. One of `\"miter\"`, `\"round\"` or `\"bevel\"`.\n\n__Default value:__ `\"miter\"`"
+ },
+ "strokeMiterLimit": {
+ "description": "The miter limit at which to bevel a line join.",
+ "type": "number"
+ },
+ "strokeOpacity": {
+ "description": "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "strokeWidth": {
+ "description": "The stroke width, in pixels.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "tension": {
+ "description": "Depending on the interpolation type, sets the tension parameter (for line and area marks).",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "text": {
+ "description": "Placeholder text if the `text` channel is not specified",
+ "type": "string"
+ },
+ "theta": {
+ "description": "Polar coordinate angle, in radians, of the text label from the origin determined by the `x` and `y` properties. Values for `theta` follow the same convention of `arc` mark `startAngle` and `endAngle` properties: angles are measured in radians, with `0` indicating \"north\".",
+ "type": "number"
+ },
+ "tooltip": {
+ "description": "The tooltip text to show upon mouse hover."
+ },
+ "width": {
+ "description": "Width of the marks.",
+ "type": "number"
+ },
+ "x": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "enum": [
+ "width"
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "X coordinates of the marks, or width of horizontal `\"bar\"` and `\"area\"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "x2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "enum": [
+ "width"
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "X2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "y": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "enum": [
+ "height"
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "Y coordinates of the marks, or height of vertical `\"bar\"` and `\"area\"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ },
+ "y2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "enum": [
+ "width"
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "Y2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ }
+ },
+ "type": "object"
+ },
+ "BaseTitleConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "align": {
+ "$ref": "#/definitions/Align"
+ },
+ "anchor": {
+ "$ref": "#/definitions/TitleAnchor",
+ "description": "The anchor position for placing the title. One of `\"start\"`, `\"middle\"`, or `\"end\"`. For example, with an orientation of top these anchor positions map to a left-, center-, or right-aligned title."
+ },
+ "angle": {
+ "description": "Angle in degrees of title text.",
+ "type": "number"
+ },
+ "baseline": {
+ "$ref": "#/definitions/TextBaseline",
+ "description": "Vertical text baseline for title text. One of `\"top\"`, `\"middle\"`, `\"bottom\"`, or `\"alphabetic\"`."
+ },
+ "color": {
+ "$ref": "#/definitions/Color",
+ "description": "Text color for title text."
+ },
+ "dx": {
+ "description": "Delta offset for title text x-coordinate.",
+ "type": "number"
+ },
+ "dy": {
+ "description": "Delta offset for title text y-coordinate.",
+ "type": "number"
+ },
+ "font": {
+ "description": "Font name for title text.",
+ "type": "string"
+ },
+ "fontSize": {
+ "description": "Font size in pixels for title text.\n\n__Default value:__ `10`.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "fontStyle": {
+ "$ref": "#/definitions/FontStyle",
+ "description": "Font style for title text."
+ },
+ "fontWeight": {
+ "$ref": "#/definitions/FontWeight",
+ "description": "Font weight for title text.\nThis can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)."
+ },
+ "frame": {
+ "$ref": "#/definitions/TitleFrame",
+ "description": "The reference frame for the anchor position, one of `\"bounds\"` (to anchor relative to the full bounding box) or `\"group\"` (to anchor relative to the group width or height)."
+ },
+ "limit": {
+ "description": "The maximum allowed length in pixels of legend labels.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "offset": {
+ "description": "The orthogonal offset in pixels by which to displace the title from its position along the edge of the chart.",
+ "type": "number"
+ },
+ "orient": {
+ "$ref": "#/definitions/TitleOrient",
+ "description": "Default title orientation (`\"top\"`, `\"bottom\"`, `\"left\"`, or `\"right\"`)"
+ }
+ },
+ "type": "object"
+ },
+ "Baseline": {
+ "enum": [
+ "top",
+ "middle",
+ "bottom"
+ ],
+ "type": "string"
+ },
+ "BinParams": {
+ "additionalProperties": false,
+ "description": "Binning properties or boolean flag for determining whether to bin data or not.",
+ "properties": {
+ "anchor": {
+ "description": "A value in the binned domain at which to anchor the bins, shifting the bin boundaries if necessary to ensure that a boundary aligns with the anchor value.\n\n__Default Value:__ the minimum bin extent value",
+ "type": "number"
+ },
+ "base": {
+ "description": "The number base to use for automatic bin determination (default is base 10).\n\n__Default value:__ `10`",
+ "type": "number"
+ },
+ "binned": {
+ "description": "When set to true, Vega-Lite treats the input data as already binned.",
+ "type": "boolean"
+ },
+ "divide": {
+ "description": "Scale factors indicating allowable subdivisions. The default value is [5, 2], which indicates that for base 10 numbers (the default base), the method may consider dividing bin sizes by 5 and/or 2. For example, for an initial step size of 10, the method can check if bin sizes of 2 (= 10/5), 5 (= 10/2), or 1 (= 10/(5*2)) might also satisfy the given constraints.\n\n__Default value:__ `[5, 2]`",
+ "items": {
+ "type": "number"
+ },
+ "minItems": 1,
+ "type": "array"
+ },
+ "extent": {
+ "description": "A two-element (`[min, max]`) array indicating the range of desired bin values.",
+ "items": {
+ "type": "number"
+ },
+ "maxItems": 2,
+ "minItems": 2,
+ "type": "array"
+ },
+ "maxbins": {
+ "description": "Maximum number of bins.\n\n__Default value:__ `6` for `row`, `column` and `shape` channels; `10` for other channels",
+ "minimum": 2,
+ "type": "number"
+ },
+ "minstep": {
+ "description": "A minimum allowable step size (particularly useful for integer values).",
+ "type": "number"
+ },
+ "nice": {
+ "description": "If true (the default), attempts to make the bin boundaries use human-friendly boundaries, such as multiples of ten.",
+ "type": "boolean"
+ },
+ "step": {
+ "description": "An exact step size to use between bins.\n\n__Note:__ If provided, options such as maxbins will be ignored.",
+ "type": "number"
+ },
+ "steps": {
+ "description": "An array of allowable step sizes to choose from.",
+ "items": {
+ "type": "number"
+ },
+ "minItems": 1,
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "BinTransform": {
+ "additionalProperties": false,
+ "properties": {
+ "as": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FieldName"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/FieldName"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "The output fields at which to write the start and end bin values."
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "enum": [
+ true
+ ],
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ }
+ ],
+ "description": "An object indicating bin properties, or simply `true` for using default bin parameters."
+ },
+ "field": {
+ "$ref": "#/definitions/FieldName",
+ "description": "The data field to bin."
+ }
+ },
+ "required": [
+ "bin",
+ "field",
+ "as"
+ ],
+ "type": "object"
+ },
+ "BindCheckbox": {
+ "additionalProperties": false,
+ "properties": {
+ "debounce": {
+ "type": "number"
+ },
+ "element": {
+ "$ref": "#/definitions/Element"
+ },
+ "input": {
+ "enum": [
+ "checkbox"
+ ],
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "input"
+ ],
+ "type": "object"
+ },
+ "BindRadioSelect": {
+ "additionalProperties": false,
+ "properties": {
+ "debounce": {
+ "type": "number"
+ },
+ "element": {
+ "$ref": "#/definitions/Element"
+ },
+ "input": {
+ "enum": [
+ "radio",
+ "select"
+ ],
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "options": {
+ "items": {
+ },
+ "type": "array"
+ },
+ "type": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "input",
+ "options"
+ ],
+ "type": "object"
+ },
+ "BindRange": {
+ "additionalProperties": false,
+ "properties": {
+ "debounce": {
+ "type": "number"
+ },
+ "element": {
+ "$ref": "#/definitions/Element"
+ },
+ "input": {
+ "enum": [
+ "range"
+ ],
+ "type": "string"
+ },
+ "max": {
+ "type": "number"
+ },
+ "min": {
+ "type": "number"
+ },
+ "name": {
+ "type": "string"
+ },
+ "step": {
+ "type": "number"
+ },
+ "type": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "input"
+ ],
+ "type": "object"
+ },
+ "Binding": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/BindCheckbox"
+ },
+ {
+ "$ref": "#/definitions/BindRadioSelect"
+ },
+ {
+ "$ref": "#/definitions/BindRange"
+ },
+ {
+ "$ref": "#/definitions/InputBinding"
+ }
+ ]
+ },
+ "BoxPlot": {
+ "enum": [
+ "boxplot"
+ ],
+ "type": "string"
+ },
+ "BoxPlotConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "box": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/MarkConfig"
+ }
+ ]
+ },
+ "extent": {
+ "anyOf": [
+ {
+ "enum": [
+ "min-max"
+ ],
+ "type": "string"
+ },
+ {
+ "type": "number"
+ }
+ ],
+ "description": "The extent of the whiskers. Available options include:\n- `\"min-max\"`: min and max are the lower and upper whiskers respectively.\n- A number representing multiple of the interquartile range. This number will be multiplied by the IQR to determine whisker boundary, which spans from the smallest data to the largest data within the range _[Q1 - k * IQR, Q3 + k * IQR]_ where _Q1_ and _Q3_ are the first and third quartiles while _IQR_ is the interquartile range (_Q3-Q1_).\n\n__Default value:__ `1.5`."
+ },
+ "median": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/MarkConfig"
+ }
+ ]
+ },
+ "outliers": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/MarkConfig"
+ }
+ ]
+ },
+ "rule": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/MarkConfig"
+ }
+ ]
+ },
+ "size": {
+ "description": "Size of the box and median tick of a box plot",
+ "type": "number"
+ },
+ "ticks": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/MarkConfig"
+ }
+ ]
+ }
+ },
+ "type": "object"
+ },
+ "BoxPlotDef": {
+ "additionalProperties": false,
+ "properties": {
+ "box": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/MarkConfig"
+ }
+ ]
+ },
+ "clip": {
+ "description": "Whether a composite mark be clipped to the enclosing group’s width and height.",
+ "type": "boolean"
+ },
+ "color": {
+ "$ref": "#/definitions/Color",
+ "description": "Default color. Note that `fill` and `stroke` have higher precedence than `color` and will override `color`.\n\n__Default value:__ <span style=\"color: #4682b4;\">&#9632;</span> `\"#4682b4\"`\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config)."
+ },
+ "extent": {
+ "anyOf": [
+ {
+ "enum": [
+ "min-max"
+ ],
+ "type": "string"
+ },
+ {
+ "type": "number"
+ }
+ ],
+ "description": "The extent of the whiskers. Available options include:\n- `\"min-max\"`: min and max are the lower and upper whiskers respectively.\n- A number representing multiple of the interquartile range. This number will be multiplied by the IQR to determine whisker boundary, which spans from the smallest data to the largest data within the range _[Q1 - k * IQR, Q3 + k * IQR]_ where _Q1_ and _Q3_ are the first and third quartiles while _IQR_ is the interquartile range (_Q3-Q1_).\n\n__Default value:__ `1.5`."
+ },
+ "median": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/MarkConfig"
+ }
+ ]
+ },
+ "opacity": {
+ "description": "The opacity (value between [0,1]) of the mark.",
+ "type": "number"
+ },
+ "orient": {
+ "$ref": "#/definitions/Orientation",
+ "description": "Orientation of the box plot. This is normally automatically determined based on types of fields on x and y channels. However, an explicit `orient` be specified when the orientation is ambiguous.\n\n__Default value:__ `\"vertical\"`."
+ },
+ "outliers": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/MarkConfig"
+ }
+ ]
+ },
+ "rule": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/MarkConfig"
+ }
+ ]
+ },
+ "size": {
+ "description": "Size of the box and median tick of a box plot",
+ "type": "number"
+ },
+ "ticks": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/MarkConfig"
+ }
+ ]
+ },
+ "type": {
+ "$ref": "#/definitions/BoxPlot",
+ "description": "The mark type. This could a primitive mark type\n(one of `\"bar\"`, `\"circle\"`, `\"square\"`, `\"tick\"`, `\"line\"`,\n`\"area\"`, `\"point\"`, `\"geoshape\"`, `\"rule\"`, and `\"text\"`)\nor a composite mark type (`\"boxplot\"`, `\"errorband\"`, `\"errorbar\"`)."
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "type": "object"
+ },
+ "BrushConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "fill": {
+ "$ref": "#/definitions/Color",
+ "description": "The fill color of the interval mark.\n\n__Default value:__ `#333333`"
+ },
+ "fillOpacity": {
+ "description": "The fill opacity of the interval mark (a value between 0 and 1).\n\n__Default value:__ `0.125`",
+ "type": "number"
+ },
+ "stroke": {
+ "$ref": "#/definitions/Color",
+ "description": "The stroke color of the interval mark.\n\n__Default value:__ `#ffffff`"
+ },
+ "strokeDash": {
+ "description": "An array of alternating stroke and space lengths,\nfor creating dashed or dotted lines.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "strokeDashOffset": {
+ "description": "The offset (in pixels) with which to begin drawing the stroke dash array.",
+ "type": "number"
+ },
+ "strokeOpacity": {
+ "description": "The stroke opacity of the interval mark (a value between 0 and 1).",
+ "type": "number"
+ },
+ "strokeWidth": {
+ "description": "The stroke width of the interval mark.",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "CalculateTransform": {
+ "additionalProperties": false,
+ "properties": {
+ "as": {
+ "$ref": "#/definitions/FieldName",
+ "description": "The field for storing the computed formula value."
+ },
+ "calculate": {
+ "description": "A [expression](https://vega.github.io/vega-lite/docs/types.html#expression) string. Use the variable `datum` to refer to the current data object.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "calculate",
+ "as"
+ ],
+ "type": "object"
+ },
+ "Color": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ColorName"
+ },
+ {
+ "$ref": "#/definitions/HexColor"
+ },
+ {
+ "type": "string"
+ }
+ ]
+ },
+ "ColorName": {
+ "enum": [
+ "black",
+ "silver",
+ "gray",
+ "white",
+ "maroon",
+ "red",
+ "purple",
+ "fuchsia",
+ "green",
+ "lime",
+ "olive",
+ "yellow",
+ "navy",
+ "blue",
+ "teal",
+ "aqua",
+ "orange",
+ "aliceblue",
+ "antiquewhite",
+ "aquamarine",
+ "azure",
+ "beige",
+ "bisque",
+ "blanchedalmond",
+ "blueviolet",
+ "brown",
+ "burlywood",
+ "cadetblue",
+ "chartreuse",
+ "chocolate",
+ "coral",
+ "cornflowerblue",
+ "cornsilk",
+ "crimson",
+ "cyan",
+ "darkblue",
+ "darkcyan",
+ "darkgoldenrod",
+ "darkgray",
+ "darkgreen",
+ "darkgrey",
+ "darkkhaki",
+ "darkmagenta",
+ "darkolivegreen",
+ "darkorange",
+ "darkorchid",
+ "darkred",
+ "darksalmon",
+ "darkseagreen",
+ "darkslateblue",
+ "darkslategray",
+ "darkslategrey",
+ "darkturquoise",
+ "darkviolet",
+ "deeppink",
+ "deepskyblue",
+ "dimgray",
+ "dimgrey",
+ "dodgerblue",
+ "firebrick",
+ "floralwhite",
+ "forestgreen",
+ "gainsboro",
+ "ghostwhite",
+ "gold",
+ "goldenrod",
+ "greenyellow",
+ "grey",
+ "honeydew",
+ "hotpink",
+ "indianred",
+ "indigo",
+ "ivory",
+ "khaki",
+ "lavender",
+ "lavenderblush",
+ "lawngreen",
+ "lemonchiffon",
+ "lightblue",
+ "lightcoral",
+ "lightcyan",
+ "lightgoldenrodyellow",
+ "lightgray",
+ "lightgreen",
+ "lightgrey",
+ "lightpink",
+ "lightsalmon",
+ "lightseagreen",
+ "lightskyblue",
+ "lightslategray",
+ "lightslategrey",
+ "lightsteelblue",
+ "lightyellow",
+ "limegreen",
+ "linen",
+ "magenta",
+ "mediumaquamarine",
+ "mediumblue",
+ "mediumorchid",
+ "mediumpurple",
+ "mediumseagreen",
+ "mediumslateblue",
+ "mediumspringgreen",
+ "mediumturquoise",
+ "mediumvioletred",
+ "midnightblue",
+ "mintcream",
+ "mistyrose",
+ "moccasin",
+ "navajowhite",
+ "oldlace",
+ "olivedrab",
+ "orangered",
+ "orchid",
+ "palegoldenrod",
+ "palegreen",
+ "paleturquoise",
+ "palevioletred",
+ "papayawhip",
+ "peachpuff",
+ "peru",
+ "pink",
+ "plum",
+ "powderblue",
+ "rosybrown",
+ "royalblue",
+ "saddlebrown",
+ "salmon",
+ "sandybrown",
+ "seagreen",
+ "seashell",
+ "sienna",
+ "skyblue",
+ "slateblue",
+ "slategray",
+ "slategrey",
+ "snow",
+ "springgreen",
+ "steelblue",
+ "tan",
+ "thistle",
+ "tomato",
+ "turquoise",
+ "violet",
+ "wheat",
+ "whitesmoke",
+ "yellowgreen",
+ "rebeccapurple"
+ ],
+ "type": "string"
+ },
+ "Encoding": {
+ "additionalProperties": false,
+ "properties": {
+ "color": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StringFieldDefWithCondition"
+ },
+ {
+ "$ref": "#/definitions/StringValueDefWithCondition"
+ }
+ ],
+ "description": "Color of the marks – either fill or stroke color based on the `filled` property of mark definition.\nBy default, `color` represents fill color for `\"area\"`, `\"bar\"`, `\"tick\"`,\n`\"text\"`, `\"trail\"`, `\"circle\"`, and `\"square\"` / stroke color for `\"line\"` and `\"point\"`.\n\n__Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark)'s `color` property.\n\n_Note:_\n1) For fine-grained control over both fill and stroke colors of the marks, please use the `fill` and `stroke` channels. If either `fill` or `stroke` channel is specified, `color` channel will be ignored.\n2) See the scale documentation for more information about customizing [color scheme](https://vega.github.io/vega-lite/docs/scale.html#scheme)."
+ },
+ "detail": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FieldDefWithoutScale"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/FieldDefWithoutScale"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "Additional levels of detail for grouping data in aggregate views and\nin line, trail, and area marks without mapping data to a specific visual channel."
+ },
+ "fill": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StringFieldDefWithCondition"
+ },
+ {
+ "$ref": "#/definitions/StringValueDefWithCondition"
+ }
+ ],
+ "description": "Fill color of the marks.\n__Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark)'s `color` property.\n\n_Note:_ When using `fill` channel, `color ` channel will be ignored. To customize both fill and stroke, please use `fill` and `stroke` channels (not `fill` and `color`)."
+ },
+ "fillOpacity": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/NumericFieldDefWithCondition"
+ },
+ {
+ "$ref": "#/definitions/NumericValueDefWithCondition"
+ }
+ ],
+ "description": "Fill opacity of the marks.\n\n__Default value:__ If undefined, the default opacity depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark)'s `fillOpacity` property."
+ },
+ "href": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TextFieldDefWithCondition"
+ },
+ {
+ "$ref": "#/definitions/TextValueDefWithCondition"
+ }
+ ],
+ "description": "A URL to load upon mouse click."
+ },
+ "key": {
+ "$ref": "#/definitions/FieldDefWithoutScale",
+ "description": "A data field to use as a unique key for data binding. When a visualization’s data is updated, the key value will be used to match data elements to existing mark instances. Use a key channel to enable object constancy for transitions over dynamic data."
+ },
+ "latitude": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LatLongFieldDef"
+ },
+ {
+ "$ref": "#/definitions/NumberValueDef"
+ }
+ ],
+ "description": "Latitude position of geographically projected marks."
+ },
+ "latitude2": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SecondaryFieldDef"
+ },
+ {
+ "$ref": "#/definitions/NumberValueDef"
+ }
+ ],
+ "description": "Latitude-2 position for geographically projected ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`."
+ },
+ "longitude": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LatLongFieldDef"
+ },
+ {
+ "$ref": "#/definitions/NumberValueDef"
+ }
+ ],
+ "description": "Longitude position of geographically projected marks."
+ },
+ "longitude2": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SecondaryFieldDef"
+ },
+ {
+ "$ref": "#/definitions/NumberValueDef"
+ }
+ ],
+ "description": "Longitude-2 position for geographically projected ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`."
+ },
+ "opacity": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/NumericFieldDefWithCondition"
+ },
+ {
+ "$ref": "#/definitions/NumericValueDefWithCondition"
+ }
+ ],
+ "description": "Opacity of the marks.\n\n__Default value:__ If undefined, the default opacity depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark)'s `opacity` property."
+ },
+ "order": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/OrderFieldDef"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/OrderFieldDef"
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/NumberValueDef"
+ }
+ ],
+ "description": "Order of the marks.\n- For stacked marks, this `order` channel encodes [stack order](https://vega.github.io/vega-lite/docs/stack.html#order).\n- For line and trail marks, this `order` channel encodes order of data points in the lines. This can be useful for creating [a connected scatterplot](https://vega.github.io/vega-lite/examples/connected_scatterplot.html). Setting `order` to `{\"value\": null}` makes the line marks use the original order in the data sources.\n- Otherwise, this `order` channel encodes layer order of the marks.\n\n__Note__: In aggregate plots, `order` field should be `aggregate`d to avoid creating additional aggregation grouping."
+ },
+ "shape": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ShapeFieldDefWithCondition"
+ },
+ {
+ "$ref": "#/definitions/ShapeValueDefWithCondition"
+ }
+ ],
+ "description": "Shape of the mark.\n\n1. For `point` marks the supported values include:\n - plotting shapes: `\"circle\"`, `\"square\"`, `\"cross\"`, `\"diamond\"`, `\"triangle-up\"`, `\"triangle-down\"`, `\"triangle-right\"`, or `\"triangle-left\"`.\n - the line symbol `\"stroke\"`\n - centered directional shapes `\"arrow\"`, `\"wedge\"`, or `\"triangle\"`\n - a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n2. For `geoshape` marks it should be a field definition of the geojson data\n\n__Default value:__ If undefined, the default shape depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#point-config)'s `shape` property. (`\"circle\"` if unset.)"
+ },
+ "size": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/NumericFieldDefWithCondition"
+ },
+ {
+ "$ref": "#/definitions/NumericValueDefWithCondition"
+ }
+ ],
+ "description": "Size of the mark.\n- For `\"point\"`, `\"square\"` and `\"circle\"`, – the symbol size, or pixel area of the mark.\n- For `\"bar\"` and `\"tick\"` – the bar and tick's size.\n- For `\"text\"` – the text's font size.\n- Size is unsupported for `\"line\"`, `\"area\"`, and `\"rect\"`. (Use `\"trail\"` instead of line with varying size)"
+ },
+ "stroke": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StringFieldDefWithCondition"
+ },
+ {
+ "$ref": "#/definitions/StringValueDefWithCondition"
+ }
+ ],
+ "description": "Stroke color of the marks.\n__Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark)'s `color` property.\n\n_Note:_ When using `stroke` channel, `color ` channel will be ignored. To customize both stroke and fill, please use `stroke` and `fill` channels (not `stroke` and `color`)."
+ },
+ "strokeOpacity": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/NumericFieldDefWithCondition"
+ },
+ {
+ "$ref": "#/definitions/NumericValueDefWithCondition"
+ }
+ ],
+ "description": "Stroke opacity of the marks.\n\n__Default value:__ If undefined, the default opacity depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark)'s `strokeOpacity` property."
+ },
+ "strokeWidth": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/NumericFieldDefWithCondition"
+ },
+ {
+ "$ref": "#/definitions/NumericValueDefWithCondition"
+ }
+ ],
+ "description": "Stroke width of the marks.\n\n__Default value:__ If undefined, the default stroke width depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark)'s `strokeWidth` property."
+ },
+ "text": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TextFieldDefWithCondition"
+ },
+ {
+ "$ref": "#/definitions/TextValueDefWithCondition"
+ }
+ ],
+ "description": "Text of the `text` mark."
+ },
+ "tooltip": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TextFieldDefWithCondition"
+ },
+ {
+ "$ref": "#/definitions/TextValueDefWithCondition"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/TextFieldDef"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The tooltip text to show upon mouse hover."
+ },
+ "x": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/PositionFieldDef"
+ },
+ {
+ "$ref": "#/definitions/XValueDef"
+ }
+ ],
+ "description": "X coordinates of the marks, or width of horizontal `\"bar\"` and `\"area\"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "x2": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SecondaryFieldDef"
+ },
+ {
+ "$ref": "#/definitions/XValueDef"
+ }
+ ],
+ "description": "X2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "xError": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SecondaryFieldDef"
+ },
+ {
+ "$ref": "#/definitions/NumberValueDef"
+ }
+ ],
+ "description": "Error value of x coordinates for error specified `\"errorbar\"` and `\"errorband\"`."
+ },
+ "xError2": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SecondaryFieldDef"
+ },
+ {
+ "$ref": "#/definitions/NumberValueDef"
+ }
+ ],
+ "description": "Secondary error value of x coordinates for error specified `\"errorbar\"` and `\"errorband\"`."
+ },
+ "y": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/PositionFieldDef"
+ },
+ {
+ "$ref": "#/definitions/YValueDef"
+ }
+ ],
+ "description": "Y coordinates of the marks, or height of vertical `\"bar\"` and `\"area\"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ },
+ "y2": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SecondaryFieldDef"
+ },
+ {
+ "$ref": "#/definitions/YValueDef"
+ }
+ ],
+ "description": "Y2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ },
+ "yError": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SecondaryFieldDef"
+ },
+ {
+ "$ref": "#/definitions/NumberValueDef"
+ }
+ ],
+ "description": "Error value of y coordinates for error specified `\"errorbar\"` and `\"errorband\"`."
+ },
+ "yError2": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SecondaryFieldDef"
+ },
+ {
+ "$ref": "#/definitions/NumberValueDef"
+ }
+ ],
+ "description": "Secondary error value of y coordinates for error specified `\"errorbar\"` and `\"errorband\"`."
+ }
+ },
+ "type": "object"
+ },
+ "CompositeMark": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/BoxPlot"
+ },
+ {
+ "$ref": "#/definitions/ErrorBar"
+ },
+ {
+ "$ref": "#/definitions/ErrorBand"
+ }
+ ]
+ },
+ "CompositeMarkDef": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/BoxPlotDef"
+ },
+ {
+ "$ref": "#/definitions/ErrorBarDef"
+ },
+ {
+ "$ref": "#/definitions/ErrorBandDef"
+ }
+ ]
+ },
+ "CompositionConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "columns": {
+ "description": "The number of columns to include in the view composition layout.\n\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to\n`hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\n\n__Note__:\n\n1) This property is only for:\n- the general (wrappable) `concat` operator (not `hconcat`/`vconcat`)\n- the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\n\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).",
+ "type": "number"
+ },
+ "spacing": {
+ "description": "The default spacing in pixels between composed sub-views.\n\n__Default value__: `20`",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "ConditionalMarkPropFieldDef": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalPredicate<MarkPropFieldDef>"
+ },
+ {
+ "$ref": "#/definitions/ConditionalSelection<MarkPropFieldDef>"
+ }
+ ]
+ },
+ "ConditionalMarkPropFieldDef<TypeForShape>": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalPredicate<MarkPropFieldDef<TypeForShape>>"
+ },
+ {
+ "$ref": "#/definitions/ConditionalSelection<MarkPropFieldDef<TypeForShape>>"
+ }
+ ]
+ },
+ "ConditionalTextFieldDef": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalPredicate<TextFieldDef>"
+ },
+ {
+ "$ref": "#/definitions/ConditionalSelection<TextFieldDef>"
+ }
+ ]
+ },
+ "ConditionalStringValueDef": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalPredicate<StringValueDef>"
+ },
+ {
+ "$ref": "#/definitions/ConditionalSelection<StringValueDef>"
+ }
+ ]
+ },
+ "ConditionalValueDef": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalPredicate<ValueDef>"
+ },
+ {
+ "$ref": "#/definitions/ConditionalSelection<ValueDef>"
+ }
+ ]
+ },
+ "ConditionalNumberValueDef": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalPredicate<NumberValueDef>"
+ },
+ {
+ "$ref": "#/definitions/ConditionalSelection<NumberValueDef>"
+ }
+ ]
+ },
+ "ConditionalPredicate<MarkPropFieldDef>": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field\n(e.g., `mean`, `sum`, `median`, `min`, `max`, `count`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value\nor an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__\n1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`).\nIf field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`).\nSee more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html).\n2) `field` is not required if `aggregate` is `count`."
+ },
+ "legend": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Legend"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the legend.\nIf `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
+ },
+ "scale": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Scale"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation."
+ },
+ "sort": {
+ "$ref": "#/definitions/Sort",
+ "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following:\n- `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in Javascript.\n- [A sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) for sorting by another encoding channel. (This type of sort definition is not available for `row` and `column` channels.)\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`).\n- `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation."
+ },
+ "test": {
+ "$ref": "#/definitions/LogicalOperand<Predicate>",
+ "description": "Predicate for triggering the condition"
+ },
+ "timeUnit": {
+ "$ref": "#/definitions/TimeUnit",
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field.\nor [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.",
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "type": {
+ "$ref": "#/definitions/StandardType",
+ "description": "The encoded field's type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`).\nIt can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\n\n__Note:__\n\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- Data `type` describes the semantics of the data rather than the primitive data types (`number`, `string`, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\", \"type\": \"quantitative\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "required": [
+ "test",
+ "type"
+ ],
+ "type": "object"
+ },
+ "ConditionalPredicate<MarkPropFieldDef<TypeForShape>>": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field\n(e.g., `mean`, `sum`, `median`, `min`, `max`, `count`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value\nor an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__\n1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`).\nIf field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`).\nSee more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html).\n2) `field` is not required if `aggregate` is `count`."
+ },
+ "legend": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Legend"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the legend.\nIf `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
+ },
+ "scale": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Scale"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation."
+ },
+ "sort": {
+ "$ref": "#/definitions/Sort",
+ "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following:\n- `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in Javascript.\n- [A sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) for sorting by another encoding channel. (This type of sort definition is not available for `row` and `column` channels.)\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`).\n- `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation."
+ },
+ "test": {
+ "$ref": "#/definitions/LogicalOperand<Predicate>",
+ "description": "Predicate for triggering the condition"
+ },
+ "timeUnit": {
+ "$ref": "#/definitions/TimeUnit",
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field.\nor [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.",
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "type": {
+ "$ref": "#/definitions/TypeForShape",
+ "description": "The encoded field's type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`).\nIt can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\n\n__Note:__\n\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- Data `type` describes the semantics of the data rather than the primitive data types (`number`, `string`, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\", \"type\": \"quantitative\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "required": [
+ "test",
+ "type"
+ ],
+ "type": "object"
+ },
+ "ConditionalPredicate<TextFieldDef>": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field\n(e.g., `mean`, `sum`, `median`, `min`, `max`, `count`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "enum": [
+ "binned"
+ ],
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value\nor an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__\n1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`).\nIf field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`).\nSee more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html).\n2) `field` is not required if `aggregate` is `count`."
+ },
+ "format": {
+ "description": "The text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `\"number\"` (e.g., for quantitative fields), this is D3's [number format pattern](https://github.com/d3/d3-format#locale_format).\n- If the format type is `\"time\"` (e.g., for temporal fields), this is D3's [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\n__Default value:__ Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format.",
+ "type": "string"
+ },
+ "formatType": {
+ "description": "The format type for labels (`\"number\"` or `\"time\"`).\n\n__Default value:__\n- `\"time\"` for temporal fields and ordinal and nomimal fields with `timeUnit`.\n- `\"number\"` for quantitative fields as well as ordinal and nomimal fields without `timeUnit`.",
+ "enum": [
+ "number",
+ "time"
+ ],
+ "type": "string"
+ },
+ "test": {
+ "$ref": "#/definitions/LogicalOperand<Predicate>",
+ "description": "Predicate for triggering the condition"
+ },
+ "timeUnit": {
+ "$ref": "#/definitions/TimeUnit",
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field.\nor [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.",
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "type": {
+ "$ref": "#/definitions/StandardType",
+ "description": "The encoded field's type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`).\nIt can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\n\n__Note:__\n\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- Data `type` describes the semantics of the data rather than the primitive data types (`number`, `string`, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\", \"type\": \"quantitative\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "required": [
+ "test",
+ "type"
+ ],
+ "type": "object"
+ },
+ "ConditionalPredicate<StringValueDef>": {
+ "additionalProperties": false,
+ "properties": {
+ "test": {
+ "$ref": "#/definitions/LogicalOperand<Predicate>",
+ "description": "Predicate for triggering the condition"
+ },
+ "value": {
+ "description": "A constant value in visual domain (e.g., `\"red\"` / \"#0099ff\" for color, values between `0` to `1` for opacity).",
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "test",
+ "value"
+ ],
+ "type": "object"
+ },
+ "ConditionalPredicate<ValueDef>": {
+ "additionalProperties": false,
+ "properties": {
+ "test": {
+ "$ref": "#/definitions/LogicalOperand<Predicate>",
+ "description": "Predicate for triggering the condition"
+ },
+ "value": {
+ "$ref": "#/definitions/Value",
+ "description": "A constant value in visual domain (e.g., `\"red\"` / \"#0099ff\" for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "required": [
+ "test",
+ "value"
+ ],
+ "type": "object"
+ },
+ "ConditionalPredicate<NumberValueDef>": {
+ "additionalProperties": false,
+ "properties": {
+ "test": {
+ "$ref": "#/definitions/LogicalOperand<Predicate>",
+ "description": "Predicate for triggering the condition"
+ },
+ "value": {
+ "description": "A constant value in visual domain (e.g., `\"red\"` / \"#0099ff\" for color, values between `0` to `1` for opacity).",
+ "type": "number"
+ }
+ },
+ "required": [
+ "test",
+ "value"
+ ],
+ "type": "object"
+ },
+ "ConditionalSelection<MarkPropFieldDef>": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field\n(e.g., `mean`, `sum`, `median`, `min`, `max`, `count`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value\nor an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__\n1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`).\nIf field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`).\nSee more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html).\n2) `field` is not required if `aggregate` is `count`."
+ },
+ "legend": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Legend"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the legend.\nIf `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
+ },
+ "scale": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Scale"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation."
+ },
+ "selection": {
+ "$ref": "#/definitions/SelectionOperand",
+ "description": "A [selection name](https://vega.github.io/vega-lite/docs/selection.html), or a series of [composed selections](https://vega.github.io/vega-lite/docs/selection.html#compose)."
+ },
+ "sort": {
+ "$ref": "#/definitions/Sort",
+ "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following:\n- `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in Javascript.\n- [A sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) for sorting by another encoding channel. (This type of sort definition is not available for `row` and `column` channels.)\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`).\n- `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation."
+ },
+ "timeUnit": {
+ "$ref": "#/definitions/TimeUnit",
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field.\nor [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.",
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "type": {
+ "$ref": "#/definitions/StandardType",
+ "description": "The encoded field's type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`).\nIt can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\n\n__Note:__\n\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- Data `type` describes the semantics of the data rather than the primitive data types (`number`, `string`, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\", \"type\": \"quantitative\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "required": [
+ "selection",
+ "type"
+ ],
+ "type": "object"
+ },
+ "ConditionalSelection<MarkPropFieldDef<TypeForShape>>": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field\n(e.g., `mean`, `sum`, `median`, `min`, `max`, `count`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value\nor an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__\n1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`).\nIf field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`).\nSee more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html).\n2) `field` is not required if `aggregate` is `count`."
+ },
+ "legend": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Legend"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the legend.\nIf `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
+ },
+ "scale": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Scale"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation."
+ },
+ "selection": {
+ "$ref": "#/definitions/SelectionOperand",
+ "description": "A [selection name](https://vega.github.io/vega-lite/docs/selection.html), or a series of [composed selections](https://vega.github.io/vega-lite/docs/selection.html#compose)."
+ },
+ "sort": {
+ "$ref": "#/definitions/Sort",
+ "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following:\n- `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in Javascript.\n- [A sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) for sorting by another encoding channel. (This type of sort definition is not available for `row` and `column` channels.)\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`).\n- `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation."
+ },
+ "timeUnit": {
+ "$ref": "#/definitions/TimeUnit",
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field.\nor [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.",
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "type": {
+ "$ref": "#/definitions/TypeForShape",
+ "description": "The encoded field's type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`).\nIt can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\n\n__Note:__\n\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- Data `type` describes the semantics of the data rather than the primitive data types (`number`, `string`, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\", \"type\": \"quantitative\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "required": [
+ "selection",
+ "type"
+ ],
+ "type": "object"
+ },
+ "ConditionalSelection<TextFieldDef>": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field\n(e.g., `mean`, `sum`, `median`, `min`, `max`, `count`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "enum": [
+ "binned"
+ ],
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value\nor an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__\n1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`).\nIf field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`).\nSee more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html).\n2) `field` is not required if `aggregate` is `count`."
+ },
+ "format": {
+ "description": "The text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `\"number\"` (e.g., for quantitative fields), this is D3's [number format pattern](https://github.com/d3/d3-format#locale_format).\n- If the format type is `\"time\"` (e.g., for temporal fields), this is D3's [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\n__Default value:__ Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format.",
+ "type": "string"
+ },
+ "formatType": {
+ "description": "The format type for labels (`\"number\"` or `\"time\"`).\n\n__Default value:__\n- `\"time\"` for temporal fields and ordinal and nomimal fields with `timeUnit`.\n- `\"number\"` for quantitative fields as well as ordinal and nomimal fields without `timeUnit`.",
+ "enum": [
+ "number",
+ "time"
+ ],
+ "type": "string"
+ },
+ "selection": {
+ "$ref": "#/definitions/SelectionOperand",
+ "description": "A [selection name](https://vega.github.io/vega-lite/docs/selection.html), or a series of [composed selections](https://vega.github.io/vega-lite/docs/selection.html#compose)."
+ },
+ "timeUnit": {
+ "$ref": "#/definitions/TimeUnit",
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field.\nor [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.",
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "type": {
+ "$ref": "#/definitions/StandardType",
+ "description": "The encoded field's type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`).\nIt can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\n\n__Note:__\n\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- Data `type` describes the semantics of the data rather than the primitive data types (`number`, `string`, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\", \"type\": \"quantitative\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "required": [
+ "selection",
+ "type"
+ ],
+ "type": "object"
+ },
+ "ConditionalSelection<StringValueDef>": {
+ "additionalProperties": false,
+ "properties": {
+ "selection": {
+ "$ref": "#/definitions/SelectionOperand",
+ "description": "A [selection name](https://vega.github.io/vega-lite/docs/selection.html), or a series of [composed selections](https://vega.github.io/vega-lite/docs/selection.html#compose)."
+ },
+ "value": {
+ "description": "A constant value in visual domain (e.g., `\"red\"` / \"#0099ff\" for color, values between `0` to `1` for opacity).",
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "selection",
+ "value"
+ ],
+ "type": "object"
+ },
+ "ConditionalSelection<ValueDef>": {
+ "additionalProperties": false,
+ "properties": {
+ "selection": {
+ "$ref": "#/definitions/SelectionOperand",
+ "description": "A [selection name](https://vega.github.io/vega-lite/docs/selection.html), or a series of [composed selections](https://vega.github.io/vega-lite/docs/selection.html#compose)."
+ },
+ "value": {
+ "$ref": "#/definitions/Value",
+ "description": "A constant value in visual domain (e.g., `\"red\"` / \"#0099ff\" for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "required": [
+ "selection",
+ "value"
+ ],
+ "type": "object"
+ },
+ "ConditionalSelection<NumberValueDef>": {
+ "additionalProperties": false,
+ "properties": {
+ "selection": {
+ "$ref": "#/definitions/SelectionOperand",
+ "description": "A [selection name](https://vega.github.io/vega-lite/docs/selection.html), or a series of [composed selections](https://vega.github.io/vega-lite/docs/selection.html#compose)."
+ },
+ "value": {
+ "description": "A constant value in visual domain (e.g., `\"red\"` / \"#0099ff\" for color, values between `0` to `1` for opacity).",
+ "type": "number"
+ }
+ },
+ "required": [
+ "selection",
+ "value"
+ ],
+ "type": "object"
+ },
+ "Config": {
+ "additionalProperties": false,
+ "properties": {
+ "area": {
+ "$ref": "#/definitions/AreaConfig",
+ "description": "Area-Specific Config"
+ },
+ "autosize": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/AutosizeType"
+ },
+ {
+ "$ref": "#/definitions/AutoSizeParams"
+ }
+ ],
+ "description": "Sets how the visualization size should be determined. If a string, should be one of `\"pad\"`, `\"fit\"` or `\"none\"`.\nObject values can additionally specify parameters for content sizing and automatic resizing.\n`\"fit\"` is only supported for single and layered views that don't use `rangeStep`.\n\n__Default value__: `pad`"
+ },
+ "axis": {
+ "$ref": "#/definitions/AxisConfig",
+ "description": "Axis configuration, which determines default properties for all `x` and `y` [axes](https://vega.github.io/vega-lite/docs/axis.html). For a full list of axis configuration options, please see the [corresponding section of the axis documentation](https://vega.github.io/vega-lite/docs/axis.html#config)."
+ },
+ "axisBand": {
+ "$ref": "#/definitions/AxisConfig",
+ "description": "Specific axis config for axes with \"band\" scales."
+ },
+ "axisBottom": {
+ "$ref": "#/definitions/AxisConfig",
+ "description": "Specific axis config for x-axis along the bottom edge of the chart."
+ },
+ "axisLeft": {
+ "$ref": "#/definitions/AxisConfig",
+ "description": "Specific axis config for y-axis along the left edge of the chart."
+ },
+ "axisRight": {
+ "$ref": "#/definitions/AxisConfig",
+ "description": "Specific axis config for y-axis along the right edge of the chart."
+ },
+ "axisTop": {
+ "$ref": "#/definitions/AxisConfig",
+ "description": "Specific axis config for x-axis along the top edge of the chart."
+ },
+ "axisX": {
+ "$ref": "#/definitions/AxisConfig",
+ "description": "X-axis specific config."
+ },
+ "axisY": {
+ "$ref": "#/definitions/AxisConfig",
+ "description": "Y-axis specific config."
+ },
+ "background": {
+ "description": "CSS color property to use as the background of the whole Vega-Lite view\n\n__Default value:__ none (transparent)",
+ "type": "string"
+ },
+ "bar": {
+ "$ref": "#/definitions/RectConfig",
+ "description": "Bar-Specific Config"
+ },
+ "boxplot": {
+ "$ref": "#/definitions/BoxPlotConfig",
+ "description": "Box Config"
+ },
+ "circle": {
+ "$ref": "#/definitions/MarkConfig",
+ "description": "Circle-Specific Config"
+ },
+ "concat": {
+ "$ref": "#/definitions/CompositionConfig",
+ "description": "Default configuration for all concatenation view composition operators (`concat`, `hconcat`, and `vconcat`)"
+ },
+ "countTitle": {
+ "description": "Default axis and legend title for count fields.\n\n__Default value:__ `'Count of Records`.",
+ "type": "string"
+ },
+ "errorband": {
+ "$ref": "#/definitions/ErrorBandConfig",
+ "description": "ErrorBand Config"
+ },
+ "errorbar": {
+ "$ref": "#/definitions/ErrorBarConfig",
+ "description": "ErrorBar Config"
+ },
+ "facet": {
+ "$ref": "#/definitions/CompositionConfig",
+ "description": "Default configuration for the `facet` view composition operator"
+ },
+ "fieldTitle": {
+ "description": "Defines how Vega-Lite generates title for fields. There are three possible styles:\n- `\"verbal\"` (Default) - displays function in a verbal style (e.g., \"Sum of field\", \"Year-month of date\", \"field (binned)\").\n- `\"function\"` - displays function using parentheses and capitalized texts (e.g., \"SUM(field)\", \"YEARMONTH(date)\", \"BIN(field)\").\n- `\"plain\"` - displays only the field name without functions (e.g., \"field\", \"date\", \"field\").",
+ "enum": [
+ "verbal",
+ "functional",
+ "plain"
+ ],
+ "type": "string"
+ },
+ "geoshape": {
+ "$ref": "#/definitions/MarkConfig",
+ "description": "Geoshape-Specific Config"
+ },
+ "header": {
+ "$ref": "#/definitions/HeaderConfig",
+ "description": "Header configuration, which determines default properties for all [headers](https://vega.github.io/vega-lite/docs/header.html).\n\nFor a full list of header configuration options, please see the [corresponding section of in the header documentation](https://vega.github.io/vega-lite/docs/header.html#config)."
+ },
+ "headerColumn": {
+ "$ref": "#/definitions/HeaderConfig",
+ "description": "Header configuration, which determines default properties for column [headers](https://vega.github.io/vega-lite/docs/header.html).\n\nFor a full list of header configuration options, please see the [corresponding section of in the header documentation](https://vega.github.io/vega-lite/docs/header.html#config)."
+ },
+ "headerFacet": {
+ "$ref": "#/definitions/HeaderConfig",
+ "description": "Header configuration, which determines default properties for non-row/column facet [headers](https://vega.github.io/vega-lite/docs/header.html).\n\nFor a full list of header configuration options, please see the [corresponding section of in the header documentation](https://vega.github.io/vega-lite/docs/header.html#config)."
+ },
+ "headerRow": {
+ "$ref": "#/definitions/HeaderConfig",
+ "description": "Header configuration, which determines default properties for row [headers](https://vega.github.io/vega-lite/docs/header.html).\n\nFor a full list of header configuration options, please see the [corresponding section of in the header documentation](https://vega.github.io/vega-lite/docs/header.html#config)."
+ },
+ "invalidValues": {
+ "description": "Defines how Vega-Lite should handle invalid values (`null` and `NaN`).\n- If set to `\"filter\"` (default), all data items with null values will be skipped (for line, trail, and area marks) or filtered (for other marks).\n- If `null`, all data items are included. In this case, invalid values will be interpreted as zeroes.",
+ "enum": [
+ "filter",
+ null
+ ],
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "legend": {
+ "$ref": "#/definitions/LegendConfig",
+ "description": "Legend configuration, which determines default properties for all [legends](https://vega.github.io/vega-lite/docs/legend.html). For a full list of legend configuration options, please see the [corresponding section of in the legend documentation](https://vega.github.io/vega-lite/docs/legend.html#config)."
+ },
+ "line": {
+ "$ref": "#/definitions/LineConfig",
+ "description": "Line-Specific Config"
+ },
+ "mark": {
+ "$ref": "#/definitions/MarkConfig",
+ "description": "Mark Config"
+ },
+ "numberFormat": {
+ "description": "D3 Number format for guide labels and text marks. For example \"s\" for SI units. Use [D3's number format pattern](https://github.com/d3/d3-format#locale_format).",
+ "type": "string"
+ },
+ "padding": {
+ "$ref": "#/definitions/Padding",
+ "description": "The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides.\nIf an object, the value should have the format `{\"left\": 5, \"top\": 5, \"right\": 5, \"bottom\": 5}` to specify padding for each side of the visualization.\n\n__Default value__: `5`"
+ },
+ "point": {
+ "$ref": "#/definitions/MarkConfig",
+ "description": "Point-Specific Config"
+ },
+ "projection": {
+ "$ref": "#/definitions/ProjectionConfig",
+ "description": "Projection configuration, which determines default properties for all [projections](https://vega.github.io/vega-lite/docs/projection.html). For a full list of projection configuration options, please see the [corresponding section of the projection documentation](https://vega.github.io/vega-lite/docs/projection.html#config)."
+ },
+ "range": {
+ "$ref": "#/definitions/RangeConfig",
+ "description": "An object hash that defines default range arrays or schemes for using with scales.\nFor a full list of scale range configuration options, please see the [corresponding section of the scale documentation](https://vega.github.io/vega-lite/docs/scale.html#config)."
+ },
+ "rect": {
+ "$ref": "#/definitions/RectConfig",
+ "description": "Rect-Specific Config"
+ },
+ "repeat": {
+ "$ref": "#/definitions/CompositionConfig",
+ "description": "Default configuration for the `repeat` view composition operator"
+ },
+ "rule": {
+ "$ref": "#/definitions/MarkConfig",
+ "description": "Rule-Specific Config"
+ },
+ "scale": {
+ "$ref": "#/definitions/ScaleConfig",
+ "description": "Scale configuration determines default properties for all [scales](https://vega.github.io/vega-lite/docs/scale.html). For a full list of scale configuration options, please see the [corresponding section of the scale documentation](https://vega.github.io/vega-lite/docs/scale.html#config)."
+ },
+ "selection": {
+ "$ref": "#/definitions/SelectionConfig",
+ "description": "An object hash for defining default properties for each type of selections."
+ },
+ "square": {
+ "$ref": "#/definitions/MarkConfig",
+ "description": "Square-Specific Config"
+ },
+ "stack": {
+ "$ref": "#/definitions/StackOffset",
+ "description": "Default stack offset for stackable mark."
+ },
+ "style": {
+ "$ref": "#/definitions/StyleConfigIndex",
+ "description": "An object hash that defines key-value mappings to determine default properties for marks with a given [style](https://vega.github.io/vega-lite/docs/mark.html#mark-def). The keys represent styles names; the values have to be valid [mark configuration objects](https://vega.github.io/vega-lite/docs/mark.html#config)."
+ },
+ "text": {
+ "$ref": "#/definitions/TextConfig",
+ "description": "Text-Specific Config"
+ },
+ "tick": {
+ "$ref": "#/definitions/TickConfig",
+ "description": "Tick-Specific Config"
+ },
+ "timeFormat": {
+ "description": "Default time format for raw time values (without time units) in text marks, legend labels and header labels.\n\n__Default value:__ `\"%b %d, %Y\"`\n__Note:__ Axes automatically determine format each label automatically so this config would not affect axes.",
+ "type": "string"
+ },
+ "title": {
+ "$ref": "#/definitions/TitleConfig",
+ "description": "Title configuration, which determines default properties for all [titles](https://vega.github.io/vega-lite/docs/title.html). For a full list of title configuration options, please see the [corresponding section of the title documentation](https://vega.github.io/vega-lite/docs/title.html#config)."
+ },
+ "trail": {
+ "$ref": "#/definitions/LineConfig",
+ "description": "Trail-Specific Config"
+ },
+ "view": {
+ "$ref": "#/definitions/ViewConfig",
+ "description": "Default properties for [single view plots](https://vega.github.io/vega-lite/docs/spec.html#single)."
+ }
+ },
+ "type": "object"
+ },
+ "CsvDataFormat": {
+ "additionalProperties": false,
+ "properties": {
+ "parse": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Parse"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "If set to `null`, disable type inference based on the spec and only use type inference based on the data.\nAlternatively, a parsing directive object can be provided for explicit data types. Each property of the object corresponds to a field name, and the value to the desired data type (one of `\"number\"`, `\"boolean\"`, `\"date\"`, or null (do not parse the field)).\nFor example, `\"parse\": {\"modified_on\": \"date\"}` parses the `modified_on` field in each input record a Date value.\n\nFor `\"date\"`, we parse data based using Javascript's [`Date.parse()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse).\nFor Specific date formats can be provided (e.g., `{foo: \"date:'%m%d%Y'\"}`), using the [d3-time-format syntax](https://github.com/d3/d3-time-format#locale_format). UTC date format parsing is supported similarly (e.g., `{foo: \"utc:'%m%d%Y'\"}`). See more about [UTC time](https://vega.github.io/vega-lite/docs/timeunit.html#utc)"
+ },
+ "type": {
+ "description": "Type of input data: `\"json\"`, `\"csv\"`, `\"tsv\"`, `\"dsv\"`.\n\n__Default value:__ The default format type is determined by the extension of the file URL.\nIf no extension is detected, `\"json\"` will be used by default.",
+ "enum": [
+ "csv",
+ "tsv"
+ ],
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "Cursor": {
+ "enum": [
+ "auto",
+ "default",
+ "none",
+ "context-menu",
+ "help",
+ "pointer",
+ "progress",
+ "wait",
+ "cell",
+ "crosshair",
+ "text",
+ "vertical-text",
+ "alias",
+ "copy",
+ "move",
+ "no-drop",
+ "not-allowed",
+ "e-resize",
+ "n-resize",
+ "ne-resize",
+ "nw-resize",
+ "s-resize",
+ "se-resize",
+ "sw-resize",
+ "w-resize",
+ "ew-resize",
+ "ns-resize",
+ "nesw-resize",
+ "nwse-resize",
+ "col-resize",
+ "row-resize",
+ "all-scroll",
+ "zoom-in",
+ "zoom-out",
+ "grab",
+ "grabbing"
+ ],
+ "type": "string"
+ },
+ "Data": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/DataSource"
+ },
+ {
+ "$ref": "#/definitions/Generator"
+ }
+ ]
+ },
+ "DataFormat": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/CsvDataFormat"
+ },
+ {
+ "$ref": "#/definitions/DsvDataFormat"
+ },
+ {
+ "$ref": "#/definitions/JsonDataFormat"
+ },
+ {
+ "$ref": "#/definitions/TopoDataFormat"
+ }
+ ]
+ },
+ "DataSource": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/UrlData"
+ },
+ {
+ "$ref": "#/definitions/InlineData"
+ },
+ {
+ "$ref": "#/definitions/NamedData"
+ }
+ ]
+ },
+ "Datasets": {
+ "$ref": "#/definitions/Dict<InlineDataset>"
+ },
+ "DateTime": {
+ "additionalProperties": false,
+ "description": "Object for defining datetime in Vega-Lite Filter.\nIf both month and quarter are provided, month has higher precedence.\n`day` cannot be combined with other date.\nWe accept string for month and day names.",
+ "properties": {
+ "date": {
+ "description": "Integer value representing the date from 1-31.",
+ "maximum": 31,
+ "minimum": 1,
+ "type": "number"
+ },
+ "day": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Day"
+ },
+ {
+ "type": "string"
+ }
+ ],
+ "description": "Value representing the day of a week. This can be one of: (1) integer value -- `1` represents Monday; (2) case-insensitive day name (e.g., `\"Monday\"`); (3) case-insensitive, 3-character short day name (e.g., `\"Mon\"`). <br/> **Warning:** A DateTime definition object with `day`** should not be combined with `year`, `quarter`, `month`, or `date`."
+ },
+ "hours": {
+ "description": "Integer value representing the hour of a day from 0-23.",
+ "maximum": 23,
+ "minimum": 0,
+ "type": "number"
+ },
+ "milliseconds": {
+ "description": "Integer value representing the millisecond segment of time.",
+ "maximum": 999,
+ "minimum": 0,
+ "type": "number"
+ },
+ "minutes": {
+ "description": "Integer value representing the minute segment of time from 0-59.",
+ "maximum": 59,
+ "minimum": 0,
+ "type": "number"
+ },
+ "month": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Month"
+ },
+ {
+ "type": "string"
+ }
+ ],
+ "description": "One of: (1) integer value representing the month from `1`-`12`. `1` represents January; (2) case-insensitive month name (e.g., `\"January\"`); (3) case-insensitive, 3-character short month name (e.g., `\"Jan\"`)."
+ },
+ "quarter": {
+ "description": "Integer value representing the quarter of the year (from 1-4).",
+ "maximum": 4,
+ "minimum": 1,
+ "type": "number"
+ },
+ "seconds": {
+ "description": "Integer value representing the second segment (0-59) of a time value",
+ "maximum": 59,
+ "minimum": 0,
+ "type": "number"
+ },
+ "utc": {
+ "description": "A boolean flag indicating if date time is in utc time. If false, the date time is in local time",
+ "type": "boolean"
+ },
+ "year": {
+ "description": "Integer value representing the year.",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "Day": {
+ "maximum": 7,
+ "minimum": 1,
+ "type": "number"
+ },
+ "Dict<InlineDataset>": {
+ "additionalProperties": {
+ "$ref": "#/definitions/InlineDataset"
+ },
+ "type": "object"
+ },
+ "Dir": {
+ "enum": [
+ "ltr",
+ "rtl"
+ ],
+ "type": "string"
+ },
+ "DsvDataFormat": {
+ "additionalProperties": false,
+ "properties": {
+ "delimiter": {
+ "description": "The delimiter between records. The delimiter must be a single character (i.e., a single 16-bit code unit); so, ASCII delimiters are fine, but emoji delimiters are not.",
+ "maxLength": 1,
+ "minLength": 1,
+ "type": "string"
+ },
+ "parse": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Parse"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "If set to `null`, disable type inference based on the spec and only use type inference based on the data.\nAlternatively, a parsing directive object can be provided for explicit data types. Each property of the object corresponds to a field name, and the value to the desired data type (one of `\"number\"`, `\"boolean\"`, `\"date\"`, or null (do not parse the field)).\nFor example, `\"parse\": {\"modified_on\": \"date\"}` parses the `modified_on` field in each input record a Date value.\n\nFor `\"date\"`, we parse data based using Javascript's [`Date.parse()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse).\nFor Specific date formats can be provided (e.g., `{foo: \"date:'%m%d%Y'\"}`), using the [d3-time-format syntax](https://github.com/d3/d3-time-format#locale_format). UTC date format parsing is supported similarly (e.g., `{foo: \"utc:'%m%d%Y'\"}`). See more about [UTC time](https://vega.github.io/vega-lite/docs/timeunit.html#utc)"
+ },
+ "type": {
+ "description": "Type of input data: `\"json\"`, `\"csv\"`, `\"tsv\"`, `\"dsv\"`.\n\n__Default value:__ The default format type is determined by the extension of the file URL.\nIf no extension is detected, `\"json\"` will be used by default.",
+ "enum": [
+ "dsv"
+ ],
+ "type": "string"
+ }
+ },
+ "required": [
+ "delimiter"
+ ],
+ "type": "object"
+ },
+ "Element": {
+ "type": "string"
+ },
+ "EncodingSortField": {
+ "additionalProperties": false,
+ "description": "A sort definition for sorting a discrete scale in an encoding field definition.",
+ "properties": {
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "The data [field](https://vega.github.io/vega-lite/docs/field.html) to sort by.\n\n__Default value:__ If unspecified, defaults to the field specified in the outer data reference."
+ },
+ "op": {
+ "$ref": "#/definitions/AggregateOp",
+ "description": "An [aggregate operation](https://vega.github.io/vega-lite/docs/aggregate.html#ops) to perform on the field prior to sorting (e.g., `\"count\"`, `\"mean\"` and `\"median\"`).\nAn aggregation is required when there are multiple values of the sort field for each encoded data field.\nThe input data objects will be aggregated, grouped by the encoded data field.\n\nFor a full list of operations, please see the documentation for [aggregate](https://vega.github.io/vega-lite/docs/aggregate.html#ops).\n\n__Default value:__ `\"sum\"` for stacked plots. Otherwise, `\"mean\"`."
+ },
+ "order": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SortOrder"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The sort order. One of `\"ascending\"` (default), `\"descending\"`, or `null` (no not sort)."
+ }
+ },
+ "type": "object"
+ },
+ "ErrorBand": {
+ "enum": [
+ "errorband"
+ ],
+ "type": "string"
+ },
+ "ErrorBandConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "band": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/MarkConfig"
+ }
+ ]
+ },
+ "borders": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/MarkConfig"
+ }
+ ]
+ },
+ "extent": {
+ "$ref": "#/definitions/ErrorBarExtent",
+ "description": "The extent of the band. Available options include:\n- `\"ci\"`: Extend the band to the confidence interval of the mean.\n- `\"stderr\"`: The size of band are set to the value of standard error, extending from the mean.\n- `\"stdev\"`: The size of band are set to the value of standard deviation, extending from the mean.\n- `\"iqr\"`: Extend the band to the q1 and q3.\n\n__Default value:__ `\"stderr\"`."
+ },
+ "interpolate": {
+ "$ref": "#/definitions/Interpolate",
+ "description": "The line interpolation method for the error band. One of the following:\n- `\"linear\"`: piecewise linear segments, as in a polyline.\n- `\"linear-closed\"`: close the linear segments to form a polygon.\n- `\"step\"`: a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. The y-value changes at the midpoint of each pair of adjacent x-values.\n- `\"step-before\"`: a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. The y-value changes before the x-value.\n- `\"step-after\"`: a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. The y-value changes after the x-value.\n- `\"basis\"`: a B-spline, with control point duplication on the ends.\n- `\"basis-open\"`: an open B-spline; may not intersect the start or end.\n- `\"basis-closed\"`: a closed B-spline, as in a loop.\n- `\"cardinal\"`: a Cardinal spline, with control point duplication on the ends.\n- `\"cardinal-open\"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points.\n- `\"cardinal-closed\"`: a closed Cardinal spline, as in a loop.\n- `\"bundle\"`: equivalent to basis, except the tension parameter is used to straighten the spline.\n- `\"monotone\"`: cubic interpolation that preserves monotonicity in y."
+ },
+ "tension": {
+ "description": "The tension parameter for the interpolation type of the error band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "ErrorBandDef": {
+ "additionalProperties": false,
+ "properties": {
+ "band": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/MarkConfig"
+ }
+ ]
+ },
+ "borders": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/MarkConfig"
+ }
+ ]
+ },
+ "clip": {
+ "description": "Whether a composite mark be clipped to the enclosing group’s width and height.",
+ "type": "boolean"
+ },
+ "color": {
+ "$ref": "#/definitions/Color",
+ "description": "Default color. Note that `fill` and `stroke` have higher precedence than `color` and will override `color`.\n\n__Default value:__ <span style=\"color: #4682b4;\">&#9632;</span> `\"#4682b4\"`\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config)."
+ },
+ "extent": {
+ "$ref": "#/definitions/ErrorBarExtent",
+ "description": "The extent of the band. Available options include:\n- `\"ci\"`: Extend the band to the confidence interval of the mean.\n- `\"stderr\"`: The size of band are set to the value of standard error, extending from the mean.\n- `\"stdev\"`: The size of band are set to the value of standard deviation, extending from the mean.\n- `\"iqr\"`: Extend the band to the q1 and q3.\n\n__Default value:__ `\"stderr\"`."
+ },
+ "interpolate": {
+ "$ref": "#/definitions/Interpolate",
+ "description": "The line interpolation method for the error band. One of the following:\n- `\"linear\"`: piecewise linear segments, as in a polyline.\n- `\"linear-closed\"`: close the linear segments to form a polygon.\n- `\"step\"`: a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. The y-value changes at the midpoint of each pair of adjacent x-values.\n- `\"step-before\"`: a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. The y-value changes before the x-value.\n- `\"step-after\"`: a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. The y-value changes after the x-value.\n- `\"basis\"`: a B-spline, with control point duplication on the ends.\n- `\"basis-open\"`: an open B-spline; may not intersect the start or end.\n- `\"basis-closed\"`: a closed B-spline, as in a loop.\n- `\"cardinal\"`: a Cardinal spline, with control point duplication on the ends.\n- `\"cardinal-open\"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points.\n- `\"cardinal-closed\"`: a closed Cardinal spline, as in a loop.\n- `\"bundle\"`: equivalent to basis, except the tension parameter is used to straighten the spline.\n- `\"monotone\"`: cubic interpolation that preserves monotonicity in y."
+ },
+ "opacity": {
+ "description": "The opacity (value between [0,1]) of the mark.",
+ "type": "number"
+ },
+ "orient": {
+ "$ref": "#/definitions/Orientation",
+ "description": "Orientation of the error band. This is normally automatically determined, but can be specified when the orientation is ambiguous and cannot be automatically determined."
+ },
+ "tension": {
+ "description": "The tension parameter for the interpolation type of the error band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "type": {
+ "$ref": "#/definitions/ErrorBand",
+ "description": "The mark type. This could a primitive mark type\n(one of `\"bar\"`, `\"circle\"`, `\"square\"`, `\"tick\"`, `\"line\"`,\n`\"area\"`, `\"point\"`, `\"geoshape\"`, `\"rule\"`, and `\"text\"`)\nor a composite mark type (`\"boxplot\"`, `\"errorband\"`, `\"errorbar\"`)."
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "type": "object"
+ },
+ "ErrorBar": {
+ "enum": [
+ "errorbar"
+ ],
+ "type": "string"
+ },
+ "ErrorBarConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "extent": {
+ "$ref": "#/definitions/ErrorBarExtent",
+ "description": "The extent of the rule. Available options include:\n- `\"ci\"`: Extend the rule to the confidence interval of the mean.\n- `\"stderr\"`: The size of rule are set to the value of standard error, extending from the mean.\n- `\"stdev\"`: The size of rule are set to the value of standard deviation, extending from the mean.\n- `\"iqr\"`: Extend the rule to the q1 and q3.\n\n__Default value:__ `\"stderr\"`."
+ },
+ "rule": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/MarkConfig"
+ }
+ ]
+ },
+ "ticks": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/MarkConfig"
+ }
+ ]
+ }
+ },
+ "type": "object"
+ },
+ "ErrorBarDef": {
+ "additionalProperties": false,
+ "properties": {
+ "clip": {
+ "description": "Whether a composite mark be clipped to the enclosing group’s width and height.",
+ "type": "boolean"
+ },
+ "color": {
+ "$ref": "#/definitions/Color",
+ "description": "Default color. Note that `fill` and `stroke` have higher precedence than `color` and will override `color`.\n\n__Default value:__ <span style=\"color: #4682b4;\">&#9632;</span> `\"#4682b4\"`\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config)."
+ },
+ "extent": {
+ "$ref": "#/definitions/ErrorBarExtent",
+ "description": "The extent of the rule. Available options include:\n- `\"ci\"`: Extend the rule to the confidence interval of the mean.\n- `\"stderr\"`: The size of rule are set to the value of standard error, extending from the mean.\n- `\"stdev\"`: The size of rule are set to the value of standard deviation, extending from the mean.\n- `\"iqr\"`: Extend the rule to the q1 and q3.\n\n__Default value:__ `\"stderr\"`."
+ },
+ "opacity": {
+ "description": "The opacity (value between [0,1]) of the mark.",
+ "type": "number"
+ },
+ "orient": {
+ "$ref": "#/definitions/Orientation",
+ "description": "Orientation of the error bar. This is normally automatically determined, but can be specified when the orientation is ambiguous and cannot be automatically determined."
+ },
+ "rule": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/MarkConfig"
+ }
+ ]
+ },
+ "ticks": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/MarkConfig"
+ }
+ ]
+ },
+ "type": {
+ "$ref": "#/definitions/ErrorBar",
+ "description": "The mark type. This could a primitive mark type\n(one of `\"bar\"`, `\"circle\"`, `\"square\"`, `\"tick\"`, `\"line\"`,\n`\"area\"`, `\"point\"`, `\"geoshape\"`, `\"rule\"`, and `\"text\"`)\nor a composite mark type (`\"boxplot\"`, `\"errorband\"`, `\"errorbar\"`)."
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "type": "object"
+ },
+ "ErrorBarExtent": {
+ "enum": [
+ "ci",
+ "iqr",
+ "stderr",
+ "stdev"
+ ],
+ "type": "string"
+ },
+ "EventStream": {
+ },
+ "FacetFieldDef": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field\n(e.g., `mean`, `sum`, `median`, `min`, `max`, `count`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value\nor an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__\n1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`).\nIf field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`).\nSee more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html).\n2) `field` is not required if `aggregate` is `count`."
+ },
+ "header": {
+ "$ref": "#/definitions/Header",
+ "description": "An object defining properties of a facet's header."
+ },
+ "sort": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SortArray"
+ },
+ {
+ "$ref": "#/definitions/SortOrder"
+ },
+ {
+ "$ref": "#/definitions/EncodingSortField"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following:\n- `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in Javascript.\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`).\n- `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` is not supported for `row` and `column`."
+ },
+ "timeUnit": {
+ "$ref": "#/definitions/TimeUnit",
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field.\nor [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.",
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "type": {
+ "$ref": "#/definitions/StandardType",
+ "description": "The encoded field's type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`).\nIt can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\n\n__Note:__\n\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- Data `type` describes the semantics of the data rather than the primitive data types (`number`, `string`, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\", \"type\": \"quantitative\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "type": "object"
+ },
+ "FacetMapping": {
+ "additionalProperties": false,
+ "properties": {
+ "column": {
+ "$ref": "#/definitions/FacetFieldDef",
+ "description": "A field definition for the horizontal facet of trellis plots."
+ },
+ "row": {
+ "$ref": "#/definitions/FacetFieldDef",
+ "description": "A field definition for the vertical facet of trellis plots."
+ }
+ },
+ "type": "object"
+ },
+ "FacetedEncoding": {
+ "additionalProperties": false,
+ "properties": {
+ "color": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StringFieldDefWithCondition"
+ },
+ {
+ "$ref": "#/definitions/StringValueDefWithCondition"
+ }
+ ],
+ "description": "Color of the marks – either fill or stroke color based on the `filled` property of mark definition.\nBy default, `color` represents fill color for `\"area\"`, `\"bar\"`, `\"tick\"`,\n`\"text\"`, `\"trail\"`, `\"circle\"`, and `\"square\"` / stroke color for `\"line\"` and `\"point\"`.\n\n__Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark)'s `color` property.\n\n_Note:_\n1) For fine-grained control over both fill and stroke colors of the marks, please use the `fill` and `stroke` channels. If either `fill` or `stroke` channel is specified, `color` channel will be ignored.\n2) See the scale documentation for more information about customizing [color scheme](https://vega.github.io/vega-lite/docs/scale.html#scheme)."
+ },
+ "column": {
+ "$ref": "#/definitions/FacetFieldDef",
+ "description": "A field definition for the horizontal facet of trellis plots."
+ },
+ "detail": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FieldDefWithoutScale"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/FieldDefWithoutScale"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "Additional levels of detail for grouping data in aggregate views and\nin line, trail, and area marks without mapping data to a specific visual channel."
+ },
+ "facet": {
+ "$ref": "#/definitions/FacetFieldDef",
+ "description": "A field definition for the (flexible) facet of trellis plots.\n\nIf either `row` or `column` is specified, this channel will be ignored."
+ },
+ "fill": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StringFieldDefWithCondition"
+ },
+ {
+ "$ref": "#/definitions/StringValueDefWithCondition"
+ }
+ ],
+ "description": "Fill color of the marks.\n__Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark)'s `color` property.\n\n_Note:_ When using `fill` channel, `color ` channel will be ignored. To customize both fill and stroke, please use `fill` and `stroke` channels (not `fill` and `color`)."
+ },
+ "fillOpacity": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/NumericFieldDefWithCondition"
+ },
+ {
+ "$ref": "#/definitions/NumericValueDefWithCondition"
+ }
+ ],
+ "description": "Fill opacity of the marks.\n\n__Default value:__ If undefined, the default opacity depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark)'s `fillOpacity` property."
+ },
+ "href": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TextFieldDefWithCondition"
+ },
+ {
+ "$ref": "#/definitions/TextValueDefWithCondition"
+ }
+ ],
+ "description": "A URL to load upon mouse click."
+ },
+ "key": {
+ "$ref": "#/definitions/FieldDefWithoutScale",
+ "description": "A data field to use as a unique key for data binding. When a visualization’s data is updated, the key value will be used to match data elements to existing mark instances. Use a key channel to enable object constancy for transitions over dynamic data."
+ },
+ "latitude": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LatLongFieldDef"
+ },
+ {
+ "$ref": "#/definitions/NumberValueDef"
+ }
+ ],
+ "description": "Latitude position of geographically projected marks."
+ },
+ "latitude2": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SecondaryFieldDef"
+ },
+ {
+ "$ref": "#/definitions/NumberValueDef"
+ }
+ ],
+ "description": "Latitude-2 position for geographically projected ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`."
+ },
+ "longitude": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LatLongFieldDef"
+ },
+ {
+ "$ref": "#/definitions/NumberValueDef"
+ }
+ ],
+ "description": "Longitude position of geographically projected marks."
+ },
+ "longitude2": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SecondaryFieldDef"
+ },
+ {
+ "$ref": "#/definitions/NumberValueDef"
+ }
+ ],
+ "description": "Longitude-2 position for geographically projected ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`."
+ },
+ "opacity": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/NumericFieldDefWithCondition"
+ },
+ {
+ "$ref": "#/definitions/NumericValueDefWithCondition"
+ }
+ ],
+ "description": "Opacity of the marks.\n\n__Default value:__ If undefined, the default opacity depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark)'s `opacity` property."
+ },
+ "order": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/OrderFieldDef"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/OrderFieldDef"
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/NumberValueDef"
+ }
+ ],
+ "description": "Order of the marks.\n- For stacked marks, this `order` channel encodes [stack order](https://vega.github.io/vega-lite/docs/stack.html#order).\n- For line and trail marks, this `order` channel encodes order of data points in the lines. This can be useful for creating [a connected scatterplot](https://vega.github.io/vega-lite/examples/connected_scatterplot.html). Setting `order` to `{\"value\": null}` makes the line marks use the original order in the data sources.\n- Otherwise, this `order` channel encodes layer order of the marks.\n\n__Note__: In aggregate plots, `order` field should be `aggregate`d to avoid creating additional aggregation grouping."
+ },
+ "row": {
+ "$ref": "#/definitions/FacetFieldDef",
+ "description": "A field definition for the vertical facet of trellis plots."
+ },
+ "shape": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ShapeFieldDefWithCondition"
+ },
+ {
+ "$ref": "#/definitions/ShapeValueDefWithCondition"
+ }
+ ],
+ "description": "Shape of the mark.\n\n1. For `point` marks the supported values include:\n - plotting shapes: `\"circle\"`, `\"square\"`, `\"cross\"`, `\"diamond\"`, `\"triangle-up\"`, `\"triangle-down\"`, `\"triangle-right\"`, or `\"triangle-left\"`.\n - the line symbol `\"stroke\"`\n - centered directional shapes `\"arrow\"`, `\"wedge\"`, or `\"triangle\"`\n - a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n2. For `geoshape` marks it should be a field definition of the geojson data\n\n__Default value:__ If undefined, the default shape depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#point-config)'s `shape` property. (`\"circle\"` if unset.)"
+ },
+ "size": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/NumericFieldDefWithCondition"
+ },
+ {
+ "$ref": "#/definitions/NumericValueDefWithCondition"
+ }
+ ],
+ "description": "Size of the mark.\n- For `\"point\"`, `\"square\"` and `\"circle\"`, – the symbol size, or pixel area of the mark.\n- For `\"bar\"` and `\"tick\"` – the bar and tick's size.\n- For `\"text\"` – the text's font size.\n- Size is unsupported for `\"line\"`, `\"area\"`, and `\"rect\"`. (Use `\"trail\"` instead of line with varying size)"
+ },
+ "stroke": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StringFieldDefWithCondition"
+ },
+ {
+ "$ref": "#/definitions/StringValueDefWithCondition"
+ }
+ ],
+ "description": "Stroke color of the marks.\n__Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark)'s `color` property.\n\n_Note:_ When using `stroke` channel, `color ` channel will be ignored. To customize both stroke and fill, please use `stroke` and `fill` channels (not `stroke` and `color`)."
+ },
+ "strokeOpacity": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/NumericFieldDefWithCondition"
+ },
+ {
+ "$ref": "#/definitions/NumericValueDefWithCondition"
+ }
+ ],
+ "description": "Stroke opacity of the marks.\n\n__Default value:__ If undefined, the default opacity depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark)'s `strokeOpacity` property."
+ },
+ "strokeWidth": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/NumericFieldDefWithCondition"
+ },
+ {
+ "$ref": "#/definitions/NumericValueDefWithCondition"
+ }
+ ],
+ "description": "Stroke width of the marks.\n\n__Default value:__ If undefined, the default stroke width depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark)'s `strokeWidth` property."
+ },
+ "text": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TextFieldDefWithCondition"
+ },
+ {
+ "$ref": "#/definitions/TextValueDefWithCondition"
+ }
+ ],
+ "description": "Text of the `text` mark."
+ },
+ "tooltip": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TextFieldDefWithCondition"
+ },
+ {
+ "$ref": "#/definitions/TextValueDefWithCondition"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/TextFieldDef"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The tooltip text to show upon mouse hover."
+ },
+ "x": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/PositionFieldDef"
+ },
+ {
+ "$ref": "#/definitions/XValueDef"
+ }
+ ],
+ "description": "X coordinates of the marks, or width of horizontal `\"bar\"` and `\"area\"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "x2": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SecondaryFieldDef"
+ },
+ {
+ "$ref": "#/definitions/XValueDef"
+ }
+ ],
+ "description": "X2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "xError": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SecondaryFieldDef"
+ },
+ {
+ "$ref": "#/definitions/NumberValueDef"
+ }
+ ],
+ "description": "Error value of x coordinates for error specified `\"errorbar\"` and `\"errorband\"`."
+ },
+ "xError2": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SecondaryFieldDef"
+ },
+ {
+ "$ref": "#/definitions/NumberValueDef"
+ }
+ ],
+ "description": "Secondary error value of x coordinates for error specified `\"errorbar\"` and `\"errorband\"`."
+ },
+ "y": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/PositionFieldDef"
+ },
+ {
+ "$ref": "#/definitions/YValueDef"
+ }
+ ],
+ "description": "Y coordinates of the marks, or height of vertical `\"bar\"` and `\"area\"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ },
+ "y2": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SecondaryFieldDef"
+ },
+ {
+ "$ref": "#/definitions/YValueDef"
+ }
+ ],
+ "description": "Y2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ },
+ "yError": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SecondaryFieldDef"
+ },
+ {
+ "$ref": "#/definitions/NumberValueDef"
+ }
+ ],
+ "description": "Error value of y coordinates for error specified `\"errorbar\"` and `\"errorband\"`."
+ },
+ "yError2": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SecondaryFieldDef"
+ },
+ {
+ "$ref": "#/definitions/NumberValueDef"
+ }
+ ],
+ "description": "Secondary error value of y coordinates for error specified `\"errorbar\"` and `\"errorband\"`."
+ }
+ },
+ "type": "object"
+ },
+ "FacetedUnitSpec": {
+ "additionalProperties": false,
+ "description": "Unit spec that can have a composite mark and row or column channels (shorthand for a facet spec).",
+ "properties": {
+ "align": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LayoutAlign"
+ },
+ {
+ "$ref": "#/definitions/RowCol<LayoutAlign>"
+ }
+ ],
+ "description": "The alignment to apply to grid rows and columns.\nThe supported string values are `\"all\"`, `\"each\"`, and `\"none\"`.\n\n- For `\"none\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other.\n- For `\"each\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size.\n- For `\"all\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\nAlternatively, an object value of the form `{\"row\": string, \"column\": string}` can be used to supply different alignments for rows and columns.\n\n__Default value:__ `\"all\"`."
+ },
+ "bounds": {
+ "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used.\n- If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`",
+ "enum": [
+ "full",
+ "flush"
+ ],
+ "type": "string"
+ },
+ "center": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/RowCol<boolean>"
+ }
+ ],
+ "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\nAn object value of the form `{\"row\": boolean, \"column\": boolean}` can be used to supply different centering values for rows and columns.\n\n__Default value:__ `false`"
+ },
+ "columns": {
+ "description": "The number of columns to include in the view composition layout.\n\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to\n`hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\n\n__Note__:\n\n1) This property is only for:\n- the general (wrappable) `concat` operator (not `hconcat`/`vconcat`)\n- the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\n\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).",
+ "type": "number"
+ },
+ "data": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Data"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
+ },
+ "description": {
+ "description": "Description of this mark for commenting purpose.",
+ "type": "string"
+ },
+ "encoding": {
+ "$ref": "#/definitions/FacetedEncoding",
+ "description": "A key-value mapping between encoding channels and definition of fields."
+ },
+ "height": {
+ "description": "The height of a visualization.\n\n__Default value:__\n- If a view's [`autosize`](https://vega.github.io/vega-lite/docs/size.html#autosize) type is `\"fit\"` or its y-channel has a [continuous scale](https://vega.github.io/vega-lite/docs/scale.html#continuous), the height will be the value of [`config.view.height`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- For y-axis with a band or point scale: if [`rangeStep`](https://vega.github.io/vega-lite/docs/scale.html#band) is a numeric value or unspecified, the height is [determined by the range step, paddings, and the cardinality of the field mapped to y-channel](https://vega.github.io/vega-lite/docs/scale.html#band). Otherwise, if the `rangeStep` is `null`, the height will be the value of [`config.view.height`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- If no field is mapped to `y` channel, the `height` will be the value of `rangeStep`.\n\n__Note__: For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the height of a single view.\n\n__See also:__ The documentation for [width and height](https://vega.github.io/vega-lite/docs/size.html) contains more examples.",
+ "type": "number"
+ },
+ "mark": {
+ "$ref": "#/definitions/AnyMark",
+ "description": "A string describing the mark type (one of `\"bar\"`, `\"circle\"`, `\"square\"`, `\"tick\"`, `\"line\"`,\n`\"area\"`, `\"point\"`, `\"rule\"`, `\"geoshape\"`, and `\"text\"`) or a [mark definition object](https://vega.github.io/vega-lite/docs/mark.html#mark-def)."
+ },
+ "name": {
+ "description": "Name of the visualization for later reference.",
+ "type": "string"
+ },
+ "projection": {
+ "$ref": "#/definitions/Projection",
+ "description": "An object defining properties of geographic projection, which will be applied to `shape` path for `\"geoshape\"` marks\nand to `latitude` and `\"longitude\"` channels for other marks."
+ },
+ "resolve": {
+ "$ref": "#/definitions/Resolve",
+ "description": "Scale, axis, and legend resolutions for view composition specifications."
+ },
+ "selection": {
+ "additionalProperties": {
+ "$ref": "#/definitions/SelectionDef"
+ },
+ "description": "A key-value mapping between selection names and definitions.",
+ "type": "object"
+ },
+ "spacing": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/RowCol<number>"
+ }
+ ],
+ "description": "The spacing in pixels between sub-views of the composition operator.\nAn object of the form `{\"row\": number, \"column\": number}` can be used to set\ndifferent spacing values for rows and columns.\n\n__Default value__: Depends on `\"spacing\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)"
+ },
+ "title": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/TitleParams"
+ }
+ ],
+ "description": "Title for the plot."
+ },
+ "transform": {
+ "description": "An array of data transformations such as filter and new field calculation.",
+ "items": {
+ "$ref": "#/definitions/Transform"
+ },
+ "type": "array"
+ },
+ "view": {
+ "$ref": "#/definitions/ViewBackground",
+ "description": "An object defining the view background's fill and stroke.\n\n__Default value:__ none (transparent)"
+ },
+ "width": {
+ "description": "The width of a visualization.\n\n__Default value:__ This will be determined by the following rules:\n\n- If a view's [`autosize`](https://vega.github.io/vega-lite/docs/size.html#autosize) type is `\"fit\"` or its x-channel has a [continuous scale](https://vega.github.io/vega-lite/docs/scale.html#continuous), the width will be the value of [`config.view.width`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- For x-axis with a band or point scale: if [`rangeStep`](https://vega.github.io/vega-lite/docs/scale.html#band) is a numeric value or unspecified, the width is [determined by the range step, paddings, and the cardinality of the field mapped to x-channel](https://vega.github.io/vega-lite/docs/scale.html#band). Otherwise, if the `rangeStep` is `null`, the width will be the value of [`config.view.width`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- If no field is mapped to `x` channel, the `width` will be the value of [`config.scale.textXRangeStep`](https://vega.github.io/vega-lite/docs/size.html#default-width-and-height) for `text` mark and the value of `rangeStep` for other marks.\n\n__Note:__ For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the width of a single view.\n\n__See also:__ The documentation for [width and height](https://vega.github.io/vega-lite/docs/size.html) contains more examples.",
+ "type": "number"
+ }
+ },
+ "required": [
+ "mark"
+ ],
+ "type": "object"
+ },
+ "Field": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FieldName"
+ },
+ {
+ "$ref": "#/definitions/RepeatRef"
+ }
+ ]
+ },
+ "FieldDefWithCondition<MarkPropFieldDef,(string|null)>": {
+ "additionalProperties": false,
+ "description": "A FieldDef with Condition<ValueDef>\n{\n condition: {value: ...},\n field: ...,\n ...\n}",
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field\n(e.g., `mean`, `sum`, `median`, `min`, `max`, `count`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "condition": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalStringValueDef"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalStringValueDef"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value)\nsince Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value\nor an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__\n1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`).\nIf field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`).\nSee more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html).\n2) `field` is not required if `aggregate` is `count`."
+ },
+ "legend": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Legend"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the legend.\nIf `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
+ },
+ "scale": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Scale"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation."
+ },
+ "sort": {
+ "$ref": "#/definitions/Sort",
+ "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following:\n- `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in Javascript.\n- [A sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) for sorting by another encoding channel. (This type of sort definition is not available for `row` and `column` channels.)\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`).\n- `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation."
+ },
+ "timeUnit": {
+ "$ref": "#/definitions/TimeUnit",
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field.\nor [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.",
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "type": {
+ "$ref": "#/definitions/StandardType",
+ "description": "The encoded field's type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`).\nIt can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\n\n__Note:__\n\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- Data `type` describes the semantics of the data rather than the primitive data types (`number`, `string`, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\", \"type\": \"quantitative\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "type": "object"
+ },
+ "FieldDefWithCondition<MarkPropFieldDef,number>": {
+ "additionalProperties": false,
+ "description": "A FieldDef with Condition<ValueDef>\n{\n condition: {value: ...},\n field: ...,\n ...\n}",
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field\n(e.g., `mean`, `sum`, `median`, `min`, `max`, `count`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "condition": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalNumberValueDef"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalNumberValueDef"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value)\nsince Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value\nor an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__\n1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`).\nIf field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`).\nSee more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html).\n2) `field` is not required if `aggregate` is `count`."
+ },
+ "legend": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Legend"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the legend.\nIf `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
+ },
+ "scale": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Scale"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation."
+ },
+ "sort": {
+ "$ref": "#/definitions/Sort",
+ "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following:\n- `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in Javascript.\n- [A sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) for sorting by another encoding channel. (This type of sort definition is not available for `row` and `column` channels.)\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`).\n- `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation."
+ },
+ "timeUnit": {
+ "$ref": "#/definitions/TimeUnit",
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field.\nor [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.",
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "type": {
+ "$ref": "#/definitions/StandardType",
+ "description": "The encoded field's type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`).\nIt can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\n\n__Note:__\n\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- Data `type` describes the semantics of the data rather than the primitive data types (`number`, `string`, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\", \"type\": \"quantitative\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "type": "object"
+ },
+ "FieldDefWithCondition<MarkPropFieldDef<TypeForShape>,(string|null)>": {
+ "additionalProperties": false,
+ "description": "A FieldDef with Condition<ValueDef>\n{\n condition: {value: ...},\n field: ...,\n ...\n}",
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field\n(e.g., `mean`, `sum`, `median`, `min`, `max`, `count`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "condition": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalStringValueDef"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalStringValueDef"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value)\nsince Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value\nor an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__\n1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`).\nIf field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`).\nSee more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html).\n2) `field` is not required if `aggregate` is `count`."
+ },
+ "legend": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Legend"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the legend.\nIf `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
+ },
+ "scale": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Scale"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation."
+ },
+ "sort": {
+ "$ref": "#/definitions/Sort",
+ "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following:\n- `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in Javascript.\n- [A sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) for sorting by another encoding channel. (This type of sort definition is not available for `row` and `column` channels.)\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`).\n- `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation."
+ },
+ "timeUnit": {
+ "$ref": "#/definitions/TimeUnit",
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field.\nor [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.",
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "type": {
+ "$ref": "#/definitions/TypeForShape",
+ "description": "The encoded field's type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`).\nIt can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\n\n__Note:__\n\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- Data `type` describes the semantics of the data rather than the primitive data types (`number`, `string`, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\", \"type\": \"quantitative\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "type": "object"
+ },
+ "FieldDefWithCondition<TextFieldDef,Value>": {
+ "additionalProperties": false,
+ "description": "A FieldDef with Condition<ValueDef>\n{\n condition: {value: ...},\n field: ...,\n ...\n}",
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field\n(e.g., `mean`, `sum`, `median`, `min`, `max`, `count`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "enum": [
+ "binned"
+ ],
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "condition": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalValueDef"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value)\nsince Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value\nor an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__\n1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`).\nIf field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`).\nSee more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html).\n2) `field` is not required if `aggregate` is `count`."
+ },
+ "format": {
+ "description": "The text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `\"number\"` (e.g., for quantitative fields), this is D3's [number format pattern](https://github.com/d3/d3-format#locale_format).\n- If the format type is `\"time\"` (e.g., for temporal fields), this is D3's [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\n__Default value:__ Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format.",
+ "type": "string"
+ },
+ "formatType": {
+ "description": "The format type for labels (`\"number\"` or `\"time\"`).\n\n__Default value:__\n- `\"time\"` for temporal fields and ordinal and nomimal fields with `timeUnit`.\n- `\"number\"` for quantitative fields as well as ordinal and nomimal fields without `timeUnit`.",
+ "enum": [
+ "number",
+ "time"
+ ],
+ "type": "string"
+ },
+ "timeUnit": {
+ "$ref": "#/definitions/TimeUnit",
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field.\nor [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.",
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "type": {
+ "$ref": "#/definitions/StandardType",
+ "description": "The encoded field's type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`).\nIt can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\n\n__Note:__\n\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- Data `type` describes the semantics of the data rather than the primitive data types (`number`, `string`, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\", \"type\": \"quantitative\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "type": "object"
+ },
+ "FieldDefWithoutScale": {
+ "$ref": "#/definitions/TypedFieldDef",
+ "description": "Field Def without scale (and without bin: \"binned\" support)."
+ },
+ "FieldEqualPredicate": {
+ "additionalProperties": false,
+ "properties": {
+ "equal": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ }
+ ],
+ "description": "The value that the field should be equal to."
+ },
+ "field": {
+ "$ref": "#/definitions/FieldName",
+ "description": "Field to be filtered."
+ },
+ "timeUnit": {
+ "$ref": "#/definitions/TimeUnit",
+ "description": "Time unit for the field to be filtered."
+ }
+ },
+ "required": [
+ "equal",
+ "field"
+ ],
+ "type": "object"
+ },
+ "FieldGTEPredicate": {
+ "additionalProperties": false,
+ "properties": {
+ "field": {
+ "$ref": "#/definitions/FieldName",
+ "description": "Field to be filtered."
+ },
+ "gte": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ }
+ ],
+ "description": "The value that the field should be greater than or equals to."
+ },
+ "timeUnit": {
+ "$ref": "#/definitions/TimeUnit",
+ "description": "Time unit for the field to be filtered."
+ }
+ },
+ "required": [
+ "field",
+ "gte"
+ ],
+ "type": "object"
+ },
+ "FieldGTPredicate": {
+ "additionalProperties": false,
+ "properties": {
+ "field": {
+ "$ref": "#/definitions/FieldName",
+ "description": "Field to be filtered."
+ },
+ "gt": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ }
+ ],
+ "description": "The value that the field should be greater than."
+ },
+ "timeUnit": {
+ "$ref": "#/definitions/TimeUnit",
+ "description": "Time unit for the field to be filtered."
+ }
+ },
+ "required": [
+ "field",
+ "gt"
+ ],
+ "type": "object"
+ },
+ "FieldLTEPredicate": {
+ "additionalProperties": false,
+ "properties": {
+ "field": {
+ "$ref": "#/definitions/FieldName",
+ "description": "Field to be filtered."
+ },
+ "lte": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ }
+ ],
+ "description": "The value that the field should be less than or equals to."
+ },
+ "timeUnit": {
+ "$ref": "#/definitions/TimeUnit",
+ "description": "Time unit for the field to be filtered."
+ }
+ },
+ "required": [
+ "field",
+ "lte"
+ ],
+ "type": "object"
+ },
+ "FieldLTPredicate": {
+ "additionalProperties": false,
+ "properties": {
+ "field": {
+ "$ref": "#/definitions/FieldName",
+ "description": "Field to be filtered."
+ },
+ "lt": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ }
+ ],
+ "description": "The value that the field should be less than."
+ },
+ "timeUnit": {
+ "$ref": "#/definitions/TimeUnit",
+ "description": "Time unit for the field to be filtered."
+ }
+ },
+ "required": [
+ "field",
+ "lt"
+ ],
+ "type": "object"
+ },
+ "FieldName": {
+ "type": "string"
+ },
+ "FieldOneOfPredicate": {
+ "additionalProperties": false,
+ "properties": {
+ "field": {
+ "$ref": "#/definitions/FieldName",
+ "description": "Field to be filtered."
+ },
+ "oneOf": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ {
+ "items": {
+ "type": "boolean"
+ },
+ "type": "array"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/DateTime"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "A set of values that the `field`'s value should be a member of,\nfor a data item included in the filtered data."
+ },
+ "timeUnit": {
+ "$ref": "#/definitions/TimeUnit",
+ "description": "Time unit for the field to be filtered."
+ }
+ },
+ "required": [
+ "field",
+ "oneOf"
+ ],
+ "type": "object"
+ },
+ "FieldRangePredicate": {
+ "additionalProperties": false,
+ "properties": {
+ "field": {
+ "$ref": "#/definitions/FieldName",
+ "description": "Field to be filtered."
+ },
+ "range": {
+ "description": "An array of inclusive minimum and maximum values\nfor a field value of a data item to be included in the filtered data.",
+ "items": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "maxItems": 2,
+ "minItems": 2,
+ "type": "array"
+ },
+ "timeUnit": {
+ "$ref": "#/definitions/TimeUnit",
+ "description": "Time unit for the field to be filtered."
+ }
+ },
+ "required": [
+ "field",
+ "range"
+ ],
+ "type": "object"
+ },
+ "FieldValidPredicate": {
+ "additionalProperties": false,
+ "properties": {
+ "field": {
+ "$ref": "#/definitions/FieldName",
+ "description": "Field to be filtered."
+ },
+ "timeUnit": {
+ "$ref": "#/definitions/TimeUnit",
+ "description": "Time unit for the field to be filtered."
+ },
+ "valid": {
+ "description": "If set to true the field's value has to be valid, meaning both not `null` and not [`NaN`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN).",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "field",
+ "valid"
+ ],
+ "type": "object"
+ },
+ "FilterTransform": {
+ "additionalProperties": false,
+ "properties": {
+ "filter": {
+ "$ref": "#/definitions/LogicalOperand<Predicate>",
+ "description": "The `filter` property must be one of the predicate definitions:\n\n1) an [expression](https://vega.github.io/vega-lite/docs/types.html#expression) string,\nwhere `datum` can be used to refer to the current data object\n\n2) one of the field predicates: [`equal`](https://vega.github.io/vega-lite/docs/filter.html#equal-predicate),\n[`lt`](https://vega.github.io/vega-lite/docs/filter.html#lt-predicate),\n[`lte`](https://vega.github.io/vega-lite/docs/filter.html#lte-predicate),\n[`gt`](https://vega.github.io/vega-lite/docs/filter.html#gt-predicate),\n[`gte`](https://vega.github.io/vega-lite/docs/filter.html#gte-predicate),\n[`range`](https://vega.github.io/vega-lite/docs/filter.html#range-predicate),\n[`oneOf`](https://vega.github.io/vega-lite/docs/filter.html#one-of-predicate),\nor [`valid`](https://vega.github.io/vega-lite/docs/filter.html#valid-predicate),\n\n3) a [selection predicate](https://vega.github.io/vega-lite/docs/filter.html#selection-predicate)\n\n4) a logical operand that combines (1), (2), or (3)."
+ }
+ },
+ "required": [
+ "filter"
+ ],
+ "type": "object"
+ },
+ "FlattenTransform": {
+ "additionalProperties": false,
+ "properties": {
+ "as": {
+ "description": "The output field names for extracted array values.\n\n__Default value:__ The field name of the corresponding array field",
+ "items": {
+ "$ref": "#/definitions/FieldName"
+ },
+ "type": "array"
+ },
+ "flatten": {
+ "description": "An array of one or more data fields containing arrays to flatten.\nIf multiple fields are specified, their array values should have a parallel structure, ideally with the same length.\nIf the lengths of parallel arrays do not match,\nthe longest array will be used with `null` values added for missing entries.",
+ "items": {
+ "$ref": "#/definitions/FieldName"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "flatten"
+ ],
+ "type": "object"
+ },
+ "FoldTransform": {
+ "additionalProperties": false,
+ "properties": {
+ "as": {
+ "description": "The output field names for the key and value properties produced by the fold transform.\n__Default value:__ `[\"key\", \"value\"]`",
+ "items": [
+ {
+ "$ref": "#/definitions/FieldName"
+ },
+ {
+ "$ref": "#/definitions/FieldName"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2,
+ "type": "array"
+ },
+ "fold": {
+ "description": "An array of data fields indicating the properties to fold.",
+ "items": {
+ "$ref": "#/definitions/FieldName"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "fold"
+ ],
+ "type": "object"
+ },
+ "FontStyle": {
+ "type": "string"
+ },
+ "FontWeight": {
+ "enum": [
+ "normal",
+ "bold",
+ "lighter",
+ "bolder",
+ 100,
+ 200,
+ 300,
+ 400,
+ 500,
+ 600,
+ 700,
+ 800,
+ 900
+ ],
+ "type": [
+ "string",
+ "number"
+ ]
+ },
+ "Generator": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SequenceGenerator"
+ },
+ {
+ "$ref": "#/definitions/SphereGenerator"
+ },
+ {
+ "$ref": "#/definitions/GraticuleGenerator"
+ }
+ ]
+ },
+ "ConcatSpec": {
+ "additionalProperties": false,
+ "description": "Base interface for a generalized concatenation specification.",
+ "properties": {
+ "align": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LayoutAlign"
+ },
+ {
+ "$ref": "#/definitions/RowCol<LayoutAlign>"
+ }
+ ],
+ "description": "The alignment to apply to grid rows and columns.\nThe supported string values are `\"all\"`, `\"each\"`, and `\"none\"`.\n\n- For `\"none\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other.\n- For `\"each\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size.\n- For `\"all\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\nAlternatively, an object value of the form `{\"row\": string, \"column\": string}` can be used to supply different alignments for rows and columns.\n\n__Default value:__ `\"all\"`."
+ },
+ "bounds": {
+ "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used.\n- If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`",
+ "enum": [
+ "full",
+ "flush"
+ ],
+ "type": "string"
+ },
+ "center": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/RowCol<boolean>"
+ }
+ ],
+ "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\nAn object value of the form `{\"row\": boolean, \"column\": boolean}` can be used to supply different centering values for rows and columns.\n\n__Default value:__ `false`"
+ },
+ "columns": {
+ "description": "The number of columns to include in the view composition layout.\n\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to\n`hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\n\n__Note__:\n\n1) This property is only for:\n- the general (wrappable) `concat` operator (not `hconcat`/`vconcat`)\n- the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\n\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).",
+ "type": "number"
+ },
+ "concat": {
+ "description": "A list of views to be concatenated.",
+ "items": {
+ "$ref": "#/definitions/Spec"
+ },
+ "type": "array"
+ },
+ "data": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Data"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
+ },
+ "description": {
+ "description": "Description of this mark for commenting purpose.",
+ "type": "string"
+ },
+ "name": {
+ "description": "Name of the visualization for later reference.",
+ "type": "string"
+ },
+ "resolve": {
+ "$ref": "#/definitions/Resolve",
+ "description": "Scale, axis, and legend resolutions for view composition specifications."
+ },
+ "spacing": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/RowCol<number>"
+ }
+ ],
+ "description": "The spacing in pixels between sub-views of the composition operator.\nAn object of the form `{\"row\": number, \"column\": number}` can be used to set\ndifferent spacing values for rows and columns.\n\n__Default value__: Depends on `\"spacing\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)"
+ },
+ "title": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/TitleParams"
+ }
+ ],
+ "description": "Title for the plot."
+ },
+ "transform": {
+ "description": "An array of data transformations such as filter and new field calculation.",
+ "items": {
+ "$ref": "#/definitions/Transform"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "concat"
+ ],
+ "type": "object"
+ },
+ "FacetSpec": {
+ "additionalProperties": false,
+ "description": "Base interface for a facet specification.",
+ "properties": {
+ "align": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LayoutAlign"
+ },
+ {
+ "$ref": "#/definitions/RowCol<LayoutAlign>"
+ }
+ ],
+ "description": "The alignment to apply to grid rows and columns.\nThe supported string values are `\"all\"`, `\"each\"`, and `\"none\"`.\n\n- For `\"none\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other.\n- For `\"each\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size.\n- For `\"all\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\nAlternatively, an object value of the form `{\"row\": string, \"column\": string}` can be used to supply different alignments for rows and columns.\n\n__Default value:__ `\"all\"`."
+ },
+ "bounds": {
+ "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used.\n- If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`",
+ "enum": [
+ "full",
+ "flush"
+ ],
+ "type": "string"
+ },
+ "center": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/RowCol<boolean>"
+ }
+ ],
+ "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\nAn object value of the form `{\"row\": boolean, \"column\": boolean}` can be used to supply different centering values for rows and columns.\n\n__Default value:__ `false`"
+ },
+ "columns": {
+ "description": "The number of columns to include in the view composition layout.\n\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to\n`hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\n\n__Note__:\n\n1) This property is only for:\n- the general (wrappable) `concat` operator (not `hconcat`/`vconcat`)\n- the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\n\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).",
+ "type": "number"
+ },
+ "data": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Data"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
+ },
+ "description": {
+ "description": "Description of this mark for commenting purpose.",
+ "type": "string"
+ },
+ "facet": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FacetFieldDef"
+ },
+ {
+ "$ref": "#/definitions/FacetMapping"
+ }
+ ],
+ "description": "Definition for how to facet the data. One of:\n1) [a field definition for faceting the plot by one field](https://vega.github.io/vega-lite/docs/facet.html#field-def)\n2) [An object that maps `row` and `column` channels to their field definitions](https://vega.github.io/vega-lite/docs/facet.html#mapping)"
+ },
+ "name": {
+ "description": "Name of the visualization for later reference.",
+ "type": "string"
+ },
+ "resolve": {
+ "$ref": "#/definitions/Resolve",
+ "description": "Scale, axis, and legend resolutions for view composition specifications."
+ },
+ "spacing": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/RowCol<number>"
+ }
+ ],
+ "description": "The spacing in pixels between sub-views of the composition operator.\nAn object of the form `{\"row\": number, \"column\": number}` can be used to set\ndifferent spacing values for rows and columns.\n\n__Default value__: Depends on `\"spacing\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)"
+ },
+ "spec": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LayerSpec"
+ },
+ {
+ "$ref": "#/definitions/FacetedUnitSpec"
+ }
+ ],
+ "description": "A specification of the view that gets faceted."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/TitleParams"
+ }
+ ],
+ "description": "Title for the plot."
+ },
+ "transform": {
+ "description": "An array of data transformations such as filter and new field calculation.",
+ "items": {
+ "$ref": "#/definitions/Transform"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "facet",
+ "spec"
+ ],
+ "type": "object"
+ },
+ "HConcatSpec": {
+ "additionalProperties": false,
+ "description": "Base interface for a horizontal concatenation specification.",
+ "properties": {
+ "bounds": {
+ "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used.\n- If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`",
+ "enum": [
+ "full",
+ "flush"
+ ],
+ "type": "string"
+ },
+ "center": {
+ "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\n__Default value:__ `false`",
+ "type": "boolean"
+ },
+ "data": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Data"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
+ },
+ "description": {
+ "description": "Description of this mark for commenting purpose.",
+ "type": "string"
+ },
+ "hconcat": {
+ "description": "A list of views to be concatenated and put into a row.",
+ "items": {
+ "$ref": "#/definitions/Spec"
+ },
+ "type": "array"
+ },
+ "name": {
+ "description": "Name of the visualization for later reference.",
+ "type": "string"
+ },
+ "resolve": {
+ "$ref": "#/definitions/Resolve",
+ "description": "Scale, axis, and legend resolutions for view composition specifications."
+ },
+ "spacing": {
+ "description": "The spacing in pixels between sub-views of the concat operator.\n\n__Default value__: `10`",
+ "type": "number"
+ },
+ "title": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/TitleParams"
+ }
+ ],
+ "description": "Title for the plot."
+ },
+ "transform": {
+ "description": "An array of data transformations such as filter and new field calculation.",
+ "items": {
+ "$ref": "#/definitions/Transform"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "hconcat"
+ ],
+ "type": "object"
+ },
+ "RepeatSpec": {
+ "additionalProperties": false,
+ "description": "Base interface for a repeat specification.",
+ "properties": {
+ "align": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LayoutAlign"
+ },
+ {
+ "$ref": "#/definitions/RowCol<LayoutAlign>"
+ }
+ ],
+ "description": "The alignment to apply to grid rows and columns.\nThe supported string values are `\"all\"`, `\"each\"`, and `\"none\"`.\n\n- For `\"none\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other.\n- For `\"each\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size.\n- For `\"all\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\nAlternatively, an object value of the form `{\"row\": string, \"column\": string}` can be used to supply different alignments for rows and columns.\n\n__Default value:__ `\"all\"`."
+ },
+ "bounds": {
+ "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used.\n- If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`",
+ "enum": [
+ "full",
+ "flush"
+ ],
+ "type": "string"
+ },
+ "center": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/RowCol<boolean>"
+ }
+ ],
+ "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\nAn object value of the form `{\"row\": boolean, \"column\": boolean}` can be used to supply different centering values for rows and columns.\n\n__Default value:__ `false`"
+ },
+ "columns": {
+ "description": "The number of columns to include in the view composition layout.\n\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to\n`hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\n\n__Note__:\n\n1) This property is only for:\n- the general (wrappable) `concat` operator (not `hconcat`/`vconcat`)\n- the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\n\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).",
+ "type": "number"
+ },
+ "data": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Data"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
+ },
+ "description": {
+ "description": "Description of this mark for commenting purpose.",
+ "type": "string"
+ },
+ "name": {
+ "description": "Name of the visualization for later reference.",
+ "type": "string"
+ },
+ "repeat": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/RepeatMapping"
+ }
+ ],
+ "description": "Definition for fields to be repeated. One of:\n1) An array of fields to be repeated. If `\"repeat\"` is an array, the field can be referred using `{\"repeat\": \"repeat\"}`\n2) An object that mapped `\"row\"` and/or `\"column\"` to the listed of fields to be repeated along the particular orientations. The objects `{\"repeat\": \"row\"}` and `{\"repeat\": \"column\"}` can be used to refer to the repeated field respectively."
+ },
+ "resolve": {
+ "$ref": "#/definitions/Resolve",
+ "description": "Scale, axis, and legend resolutions for view composition specifications."
+ },
+ "spacing": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/RowCol<number>"
+ }
+ ],
+ "description": "The spacing in pixels between sub-views of the composition operator.\nAn object of the form `{\"row\": number, \"column\": number}` can be used to set\ndifferent spacing values for rows and columns.\n\n__Default value__: Depends on `\"spacing\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)"
+ },
+ "spec": {
+ "$ref": "#/definitions/Spec",
+ "description": "A specification of the view that gets repeated."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/TitleParams"
+ }
+ ],
+ "description": "Title for the plot."
+ },
+ "transform": {
+ "description": "An array of data transformations such as filter and new field calculation.",
+ "items": {
+ "$ref": "#/definitions/Transform"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "repeat",
+ "spec"
+ ],
+ "type": "object"
+ },
+ "Spec": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FacetedUnitSpec"
+ },
+ {
+ "$ref": "#/definitions/LayerSpec"
+ },
+ {
+ "$ref": "#/definitions/FacetSpec"
+ },
+ {
+ "$ref": "#/definitions/RepeatSpec"
+ },
+ {
+ "$ref": "#/definitions/ConcatSpec"
+ },
+ {
+ "$ref": "#/definitions/VConcatSpec"
+ },
+ {
+ "$ref": "#/definitions/HConcatSpec"
+ }
+ ],
+ "description": "Any specification in Vega-Lite."
+ },
+ "GenericUnitSpec<Encoding,AnyMark>": {
+ "additionalProperties": false,
+ "description": "Base interface for a unit (single-view) specification.",
+ "properties": {
+ "data": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Data"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
+ },
+ "description": {
+ "description": "Description of this mark for commenting purpose.",
+ "type": "string"
+ },
+ "encoding": {
+ "$ref": "#/definitions/Encoding",
+ "description": "A key-value mapping between encoding channels and definition of fields."
+ },
+ "height": {
+ "description": "The height of a visualization.\n\n__Default value:__\n- If a view's [`autosize`](https://vega.github.io/vega-lite/docs/size.html#autosize) type is `\"fit\"` or its y-channel has a [continuous scale](https://vega.github.io/vega-lite/docs/scale.html#continuous), the height will be the value of [`config.view.height`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- For y-axis with a band or point scale: if [`rangeStep`](https://vega.github.io/vega-lite/docs/scale.html#band) is a numeric value or unspecified, the height is [determined by the range step, paddings, and the cardinality of the field mapped to y-channel](https://vega.github.io/vega-lite/docs/scale.html#band). Otherwise, if the `rangeStep` is `null`, the height will be the value of [`config.view.height`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- If no field is mapped to `y` channel, the `height` will be the value of `rangeStep`.\n\n__Note__: For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the height of a single view.\n\n__See also:__ The documentation for [width and height](https://vega.github.io/vega-lite/docs/size.html) contains more examples.",
+ "type": "number"
+ },
+ "mark": {
+ "$ref": "#/definitions/AnyMark",
+ "description": "A string describing the mark type (one of `\"bar\"`, `\"circle\"`, `\"square\"`, `\"tick\"`, `\"line\"`,\n`\"area\"`, `\"point\"`, `\"rule\"`, `\"geoshape\"`, and `\"text\"`) or a [mark definition object](https://vega.github.io/vega-lite/docs/mark.html#mark-def)."
+ },
+ "name": {
+ "description": "Name of the visualization for later reference.",
+ "type": "string"
+ },
+ "projection": {
+ "$ref": "#/definitions/Projection",
+ "description": "An object defining properties of geographic projection, which will be applied to `shape` path for `\"geoshape\"` marks\nand to `latitude` and `\"longitude\"` channels for other marks."
+ },
+ "selection": {
+ "additionalProperties": {
+ "$ref": "#/definitions/SelectionDef"
+ },
+ "description": "A key-value mapping between selection names and definitions.",
+ "type": "object"
+ },
+ "title": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/TitleParams"
+ }
+ ],
+ "description": "Title for the plot."
+ },
+ "transform": {
+ "description": "An array of data transformations such as filter and new field calculation.",
+ "items": {
+ "$ref": "#/definitions/Transform"
+ },
+ "type": "array"
+ },
+ "view": {
+ "$ref": "#/definitions/ViewBackground",
+ "description": "An object defining the view background's fill and stroke.\n\n__Default value:__ none (transparent)"
+ },
+ "width": {
+ "description": "The width of a visualization.\n\n__Default value:__ This will be determined by the following rules:\n\n- If a view's [`autosize`](https://vega.github.io/vega-lite/docs/size.html#autosize) type is `\"fit\"` or its x-channel has a [continuous scale](https://vega.github.io/vega-lite/docs/scale.html#continuous), the width will be the value of [`config.view.width`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- For x-axis with a band or point scale: if [`rangeStep`](https://vega.github.io/vega-lite/docs/scale.html#band) is a numeric value or unspecified, the width is [determined by the range step, paddings, and the cardinality of the field mapped to x-channel](https://vega.github.io/vega-lite/docs/scale.html#band). Otherwise, if the `rangeStep` is `null`, the width will be the value of [`config.view.width`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- If no field is mapped to `x` channel, the `width` will be the value of [`config.scale.textXRangeStep`](https://vega.github.io/vega-lite/docs/size.html#default-width-and-height) for `text` mark and the value of `rangeStep` for other marks.\n\n__Note:__ For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the width of a single view.\n\n__See also:__ The documentation for [width and height](https://vega.github.io/vega-lite/docs/size.html) contains more examples.",
+ "type": "number"
+ }
+ },
+ "required": [
+ "mark"
+ ],
+ "type": "object"
+ },
+ "VConcatSpec": {
+ "additionalProperties": false,
+ "description": "Base interface for a vertical concatenation specification.",
+ "properties": {
+ "bounds": {
+ "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used.\n- If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`",
+ "enum": [
+ "full",
+ "flush"
+ ],
+ "type": "string"
+ },
+ "center": {
+ "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\n__Default value:__ `false`",
+ "type": "boolean"
+ },
+ "data": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Data"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
+ },
+ "description": {
+ "description": "Description of this mark for commenting purpose.",
+ "type": "string"
+ },
+ "name": {
+ "description": "Name of the visualization for later reference.",
+ "type": "string"
+ },
+ "resolve": {
+ "$ref": "#/definitions/Resolve",
+ "description": "Scale, axis, and legend resolutions for view composition specifications."
+ },
+ "spacing": {
+ "description": "The spacing in pixels between sub-views of the concat operator.\n\n__Default value__: `10`",
+ "type": "number"
+ },
+ "title": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/TitleParams"
+ }
+ ],
+ "description": "Title for the plot."
+ },
+ "transform": {
+ "description": "An array of data transformations such as filter and new field calculation.",
+ "items": {
+ "$ref": "#/definitions/Transform"
+ },
+ "type": "array"
+ },
+ "vconcat": {
+ "description": "A list of views to be concatenated and put into a column.",
+ "items": {
+ "$ref": "#/definitions/Spec"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "vconcat"
+ ],
+ "type": "object"
+ },
+ "GraticuleGenerator": {
+ "additionalProperties": false,
+ "properties": {
+ "graticule": {
+ "anyOf": [
+ {
+ "enum": [
+ true
+ ],
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/GraticuleParams"
+ }
+ ],
+ "description": "Generate graticule GeoJSON data for geographic reference lines."
+ },
+ "name": {
+ "description": "Provide a placeholder name and bind data at runtime.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "graticule"
+ ],
+ "type": "object"
+ },
+ "GraticuleParams": {
+ "additionalProperties": false,
+ "properties": {
+ "extent": {
+ "description": "Sets both the major and minor extents to the same values.",
+ "items": {
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "type": "array"
+ },
+ "extentMajor": {
+ "description": "The major extent of the graticule as a two-element array of coordinates.",
+ "items": {
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "type": "array"
+ },
+ "extentMinor": {
+ "description": "The minor extent of the graticule as a two-element array of coordinates.",
+ "items": {
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "type": "array"
+ },
+ "precision": {
+ "description": "The precision of the graticule in degrees.\n\n__Default value:__ `2.5`",
+ "type": "number"
+ },
+ "step": {
+ "description": "Sets both the major and minor step angles to the same values.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "stepMajor": {
+ "description": "The major step angles of the graticule.\n\n\n__Default value:__ `[90, 360]`",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "stepMinor": {
+ "description": "The minor step angles of the graticule.\n\n__Default value:__ `[10, 10]`",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "Header": {
+ "additionalProperties": false,
+ "description": "Headers of row / column channels for faceted plots.",
+ "properties": {
+ "format": {
+ "description": "The text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `\"number\"` (e.g., for quantitative fields), this is D3's [number format pattern](https://github.com/d3/d3-format#locale_format).\n- If the format type is `\"time\"` (e.g., for temporal fields), this is D3's [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\n__Default value:__ Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format.",
+ "type": "string"
+ },
+ "formatType": {
+ "description": "The format type for labels (`\"number\"` or `\"time\"`).\n\n__Default value:__\n- `\"time\"` for temporal fields and ordinal and nomimal fields with `timeUnit`.\n- `\"number\"` for quantitative fields as well as ordinal and nomimal fields without `timeUnit`.",
+ "enum": [
+ "number",
+ "time"
+ ],
+ "type": "string"
+ },
+ "labelAlign": {
+ "$ref": "#/definitions/Align",
+ "description": "Horizontal text alignment of header labels."
+ },
+ "labelAnchor": {
+ "$ref": "#/definitions/TitleAnchor",
+ "description": "The anchor position for placing the labels. One of `\"start\"`, `\"middle\"`, or `\"end\"`. For example, with a label orientation of top these anchor positions map to a left-, center-, or right-aligned label."
+ },
+ "labelAngle": {
+ "description": "The rotation angle of the header labels.\n\n__Default value:__ `0` for column header, `-90` for row header.",
+ "maximum": 360,
+ "minimum": -360,
+ "type": "number"
+ },
+ "labelColor": {
+ "$ref": "#/definitions/Color",
+ "description": "The color of the header label, can be in hex color code or regular color name."
+ },
+ "labelFont": {
+ "description": "The font of the header label.",
+ "type": "string"
+ },
+ "labelFontSize": {
+ "description": "The font size of the header label, in pixels.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "labelFontStyle": {
+ "$ref": "#/definitions/FontStyle",
+ "description": "The font style of the header label."
+ },
+ "labelLimit": {
+ "description": "The maximum length of the header label in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0`, indicating no limit",
+ "type": "number"
+ },
+ "labelOrient": {
+ "$ref": "#/definitions/Orient",
+ "description": "The orientation of the header label. One of `\"top\"`, `\"bottom\"`, `\"left\"` or `\"right\"`."
+ },
+ "labelPadding": {
+ "description": "The padding, in pixel, between facet header's label and the plot.\n\n__Default value:__ `10`",
+ "type": "number"
+ },
+ "labels": {
+ "description": "A boolean flag indicating if labels should be included as part of the header.\n\n__Default value:__ `true`.",
+ "type": "boolean"
+ },
+ "title": {
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.",
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "titleAlign": {
+ "$ref": "#/definitions/Align",
+ "description": "Horizontal text alignment (to the anchor) of header titles."
+ },
+ "titleAnchor": {
+ "$ref": "#/definitions/TitleAnchor",
+ "description": "The anchor position for placing the title. One of `\"start\"`, `\"middle\"`, or `\"end\"`. For example, with an orientation of top these anchor positions map to a left-, center-, or right-aligned title."
+ },
+ "titleAngle": {
+ "description": "The rotation angle of the header title.\n\n__Default value:__ `0`.",
+ "maximum": 360,
+ "minimum": -360,
+ "type": "number"
+ },
+ "titleBaseline": {
+ "$ref": "#/definitions/TextBaseline",
+ "description": "Vertical text baseline for the header title. One of `\"top\"`, `\"bottom\"`, `\"middle\"`.\n\n__Default value:__ `\"middle\"`"
+ },
+ "titleColor": {
+ "$ref": "#/definitions/Color",
+ "description": "Color of the header title, can be in hex color code or regular color name."
+ },
+ "titleFont": {
+ "description": "Font of the header title. (e.g., `\"Helvetica Neue\"`).",
+ "type": "string"
+ },
+ "titleFontSize": {
+ "description": "Font size of the header title.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "titleFontStyle": {
+ "$ref": "#/definitions/FontStyle",
+ "description": "The font style of the header title."
+ },
+ "titleFontWeight": {
+ "$ref": "#/definitions/FontWeight",
+ "description": "Font weight of the header title.\nThis can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)."
+ },
+ "titleLimit": {
+ "description": "The maximum length of the header title in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0`, indicating no limit",
+ "type": "number"
+ },
+ "titleOrient": {
+ "$ref": "#/definitions/Orient",
+ "description": "The orientation of the header title. One of `\"top\"`, `\"bottom\"`, `\"left\"` or `\"right\"`."
+ },
+ "titlePadding": {
+ "description": "The padding, in pixel, between facet header's title and the label.\n\n__Default value:__ `10`",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "HeaderConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "format": {
+ "description": "The text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `\"number\"` (e.g., for quantitative fields), this is D3's [number format pattern](https://github.com/d3/d3-format#locale_format).\n- If the format type is `\"time\"` (e.g., for temporal fields), this is D3's [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\n__Default value:__ Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format.",
+ "type": "string"
+ },
+ "formatType": {
+ "description": "The format type for labels (`\"number\"` or `\"time\"`).\n\n__Default value:__\n- `\"time\"` for temporal fields and ordinal and nomimal fields with `timeUnit`.\n- `\"number\"` for quantitative fields as well as ordinal and nomimal fields without `timeUnit`.",
+ "enum": [
+ "number",
+ "time"
+ ],
+ "type": "string"
+ },
+ "labelAlign": {
+ "$ref": "#/definitions/Align",
+ "description": "Horizontal text alignment of header labels."
+ },
+ "labelAnchor": {
+ "$ref": "#/definitions/TitleAnchor",
+ "description": "The anchor position for placing the labels. One of `\"start\"`, `\"middle\"`, or `\"end\"`. For example, with a label orientation of top these anchor positions map to a left-, center-, or right-aligned label."
+ },
+ "labelAngle": {
+ "description": "The rotation angle of the header labels.\n\n__Default value:__ `0` for column header, `-90` for row header.",
+ "maximum": 360,
+ "minimum": -360,
+ "type": "number"
+ },
+ "labelColor": {
+ "$ref": "#/definitions/Color",
+ "description": "The color of the header label, can be in hex color code or regular color name."
+ },
+ "labelFont": {
+ "description": "The font of the header label.",
+ "type": "string"
+ },
+ "labelFontSize": {
+ "description": "The font size of the header label, in pixels.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "labelFontStyle": {
+ "$ref": "#/definitions/FontStyle",
+ "description": "The font style of the header label."
+ },
+ "labelLimit": {
+ "description": "The maximum length of the header label in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0`, indicating no limit",
+ "type": "number"
+ },
+ "labelOrient": {
+ "$ref": "#/definitions/Orient",
+ "description": "The orientation of the header label. One of `\"top\"`, `\"bottom\"`, `\"left\"` or `\"right\"`."
+ },
+ "labelPadding": {
+ "description": "The padding, in pixel, between facet header's label and the plot.\n\n__Default value:__ `10`",
+ "type": "number"
+ },
+ "labels": {
+ "description": "A boolean flag indicating if labels should be included as part of the header.\n\n__Default value:__ `true`.",
+ "type": "boolean"
+ },
+ "shortTimeLabels": {
+ "description": "Whether month names and weekday names should be abbreviated.\n\n__Default value:__ `false`",
+ "type": "boolean"
+ },
+ "title": {
+ "description": "Set to null to disable title for the axis, legend, or header.",
+ "type": "null"
+ },
+ "titleAlign": {
+ "$ref": "#/definitions/Align",
+ "description": "Horizontal text alignment (to the anchor) of header titles."
+ },
+ "titleAnchor": {
+ "$ref": "#/definitions/TitleAnchor",
+ "description": "The anchor position for placing the title. One of `\"start\"`, `\"middle\"`, or `\"end\"`. For example, with an orientation of top these anchor positions map to a left-, center-, or right-aligned title."
+ },
+ "titleAngle": {
+ "description": "The rotation angle of the header title.\n\n__Default value:__ `0`.",
+ "maximum": 360,
+ "minimum": -360,
+ "type": "number"
+ },
+ "titleBaseline": {
+ "$ref": "#/definitions/TextBaseline",
+ "description": "Vertical text baseline for the header title. One of `\"top\"`, `\"bottom\"`, `\"middle\"`.\n\n__Default value:__ `\"middle\"`"
+ },
+ "titleColor": {
+ "$ref": "#/definitions/Color",
+ "description": "Color of the header title, can be in hex color code or regular color name."
+ },
+ "titleFont": {
+ "description": "Font of the header title. (e.g., `\"Helvetica Neue\"`).",
+ "type": "string"
+ },
+ "titleFontSize": {
+ "description": "Font size of the header title.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "titleFontStyle": {
+ "$ref": "#/definitions/FontStyle",
+ "description": "The font style of the header title."
+ },
+ "titleFontWeight": {
+ "$ref": "#/definitions/FontWeight",
+ "description": "Font weight of the header title.\nThis can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)."
+ },
+ "titleLimit": {
+ "description": "The maximum length of the header title in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0`, indicating no limit",
+ "type": "number"
+ },
+ "titleOrient": {
+ "$ref": "#/definitions/Orient",
+ "description": "The orientation of the header title. One of `\"top\"`, `\"bottom\"`, `\"left\"` or `\"right\"`."
+ },
+ "titlePadding": {
+ "description": "The padding, in pixel, between facet header's title and the label.\n\n__Default value:__ `10`",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "HexColor": {
+ "format": "color-hex",
+ "type": "string"
+ },
+ "ImputeMethod": {
+ "enum": [
+ "value",
+ "median",
+ "max",
+ "min",
+ "mean"
+ ],
+ "type": "string"
+ },
+ "ImputeParams": {
+ "additionalProperties": false,
+ "properties": {
+ "frame": {
+ "description": "A frame specification as a two-element array used to control the window over which the specified method is applied. The array entries should either be a number indicating the offset from the current data object, or null to indicate unbounded rows preceding or following the current data object. For example, the value `[-5, 5]` indicates that the window should include five objects preceding and five objects following the current object.\n\n__Default value:__: `[null, null]` indicating that the window includes all objects.",
+ "items": {
+ "type": [
+ "null",
+ "number"
+ ]
+ },
+ "type": "array"
+ },
+ "keyvals": {
+ "anyOf": [
+ {
+ "items": {
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/ImputeSequence"
+ }
+ ],
+ "description": "Defines the key values that should be considered for imputation.\nAn array of key values or an object defining a [number sequence](https://vega.github.io/vega-lite/docs/impute.html#sequence-def).\n\nIf provided, this will be used in addition to the key values observed within the input data. If not provided, the values will be derived from all unique values of the `key` field. For `impute` in `encoding`, the key field is the x-field if the y-field is imputed, or vice versa.\n\nIf there is no impute grouping, this property _must_ be specified."
+ },
+ "method": {
+ "$ref": "#/definitions/ImputeMethod",
+ "description": "The imputation method to use for the field value of imputed data objects.\nOne of `value`, `mean`, `median`, `max` or `min`.\n\n__Default value:__ `\"value\"`"
+ },
+ "value": {
+ "description": "The field value to use when the imputation `method` is `\"value\"`."
+ }
+ },
+ "type": "object"
+ },
+ "ImputeSequence": {
+ "additionalProperties": false,
+ "properties": {
+ "start": {
+ "description": "The starting value of the sequence.\n__Default value:__ `0`",
+ "type": "number"
+ },
+ "step": {
+ "description": "The step value between sequence entries.\n__Default value:__ `1` or `-1` if `stop < start`",
+ "type": "number"
+ },
+ "stop": {
+ "description": "The ending value(exclusive) of the sequence.",
+ "type": "number"
+ }
+ },
+ "required": [
+ "stop"
+ ],
+ "type": "object"
+ },
+ "ImputeTransform": {
+ "additionalProperties": false,
+ "properties": {
+ "frame": {
+ "description": "A frame specification as a two-element array used to control the window over which the specified method is applied. The array entries should either be a number indicating the offset from the current data object, or null to indicate unbounded rows preceding or following the current data object. For example, the value `[-5, 5]` indicates that the window should include five objects preceding and five objects following the current object.\n\n__Default value:__: `[null, null]` indicating that the window includes all objects.",
+ "items": {
+ "type": [
+ "null",
+ "number"
+ ]
+ },
+ "type": "array"
+ },
+ "groupby": {
+ "description": "An optional array of fields by which to group the values.\nImputation will then be performed on a per-group basis.",
+ "items": {
+ "$ref": "#/definitions/FieldName"
+ },
+ "type": "array"
+ },
+ "impute": {
+ "$ref": "#/definitions/FieldName",
+ "description": "The data field for which the missing values should be imputed."
+ },
+ "key": {
+ "$ref": "#/definitions/FieldName",
+ "description": "A key field that uniquely identifies data objects within a group.\nMissing key values (those occurring in the data but not in the current group) will be imputed."
+ },
+ "keyvals": {
+ "anyOf": [
+ {
+ "items": {
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/ImputeSequence"
+ }
+ ],
+ "description": "Defines the key values that should be considered for imputation.\nAn array of key values or an object defining a [number sequence](https://vega.github.io/vega-lite/docs/impute.html#sequence-def).\n\nIf provided, this will be used in addition to the key values observed within the input data. If not provided, the values will be derived from all unique values of the `key` field. For `impute` in `encoding`, the key field is the x-field if the y-field is imputed, or vice versa.\n\nIf there is no impute grouping, this property _must_ be specified."
+ },
+ "method": {
+ "$ref": "#/definitions/ImputeMethod",
+ "description": "The imputation method to use for the field value of imputed data objects.\nOne of `value`, `mean`, `median`, `max` or `min`.\n\n__Default value:__ `\"value\"`"
+ },
+ "value": {
+ "description": "The field value to use when the imputation `method` is `\"value\"`."
+ }
+ },
+ "required": [
+ "impute",
+ "key"
+ ],
+ "type": "object"
+ },
+ "InlineData": {
+ "additionalProperties": false,
+ "properties": {
+ "format": {
+ "$ref": "#/definitions/DataFormat",
+ "description": "An object that specifies the format for parsing the data."
+ },
+ "name": {
+ "description": "Provide a placeholder name and bind data at runtime.",
+ "type": "string"
+ },
+ "values": {
+ "$ref": "#/definitions/InlineDataset",
+ "description": "The full data set, included inline. This can be an array of objects or primitive values, an object, or a string.\nArrays of primitive values are ingested as objects with a `data` property. Strings are parsed according to the specified format type."
+ }
+ },
+ "required": [
+ "values"
+ ],
+ "type": "object"
+ },
+ "InlineDataset": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "items": {
+ "type": "boolean"
+ },
+ "type": "array"
+ },
+ {
+ "items": {
+ "type": "object"
+ },
+ "type": "array"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "object"
+ }
+ ]
+ },
+ "InputBinding": {
+ "additionalProperties": false,
+ "properties": {
+ "autocomplete": {
+ "type": "string"
+ },
+ "debounce": {
+ "type": "number"
+ },
+ "element": {
+ "$ref": "#/definitions/Element"
+ },
+ "input": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "placeholder": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "Interpolate": {
+ "enum": [
+ "linear",
+ "linear-closed",
+ "step",
+ "step-before",
+ "step-after",
+ "basis",
+ "basis-open",
+ "basis-closed",
+ "cardinal",
+ "cardinal-open",
+ "cardinal-closed",
+ "bundle",
+ "monotone"
+ ],
+ "type": "string"
+ },
+ "IntervalSelection": {
+ "additionalProperties": false,
+ "properties": {
+ "bind": {
+ "description": "Establishes a two-way binding between the interval selection and the scales\nused within the same view. This allows a user to interactively pan and\nzoom the view.\n\n__See also:__ [`bind`](https://vega.github.io/vega-lite/docs/bind.html) documentation.",
+ "enum": [
+ "scales"
+ ],
+ "type": "string"
+ },
+ "clear": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/EventStream"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "description": "Clears the selection, emptying it of all values. Can be an\n[EventStream](https://vega.github.io/vega/docs/event-streams/) or `false` to disable.\n\n__Default value:__ `dblclick`.\n\n__See also:__ [`clear`](https://vega.github.io/vega-lite/docs/clear.html) documentation."
+ },
+ "empty": {
+ "description": "By default, `all` data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.",
+ "enum": [
+ "all",
+ "none"
+ ],
+ "type": "string"
+ },
+ "encodings": {
+ "description": "An array of encoding channels. The corresponding data field values\nmust match for a data tuple to fall within the selection.\n\n__See also:__ [`encodings`](https://vega.github.io/vega-lite/docs/project.html) documentation.",
+ "items": {
+ "$ref": "#/definitions/SingleDefUnitChannel"
+ },
+ "type": "array"
+ },
+ "fields": {
+ "description": "An array of field names whose values must match for a data tuple to\nfall within the selection.\n\n__See also:__ [`fields`](https://vega.github.io/vega-lite/docs/project.html) documentation.",
+ "items": {
+ "$ref": "#/definitions/FieldName"
+ },
+ "type": "array"
+ },
+ "init": {
+ "$ref": "#/definitions/SelectionInitIntervalMapping",
+ "description": "Initialize the selection with a mapping between [projected channels or field names](https://vega.github.io/vega-lite/docs/project.html) and arrays of\ninitial values.\n\n__See also:__ [`init`](https://vega.github.io/vega-lite/docs/init.html) documentation."
+ },
+ "mark": {
+ "$ref": "#/definitions/BrushConfig",
+ "description": "An interval selection also adds a rectangle mark to depict the\nextents of the interval. The `mark` property can be used to customize the\nappearance of the mark.\n\n__See also:__ [`mark`](https://vega.github.io/vega-lite/docs/selection-mark.html) documentation."
+ },
+ "on": {
+ "$ref": "#/definitions/EventStream",
+ "description": "A [Vega event stream](https://vega.github.io/vega/docs/event-streams/) (object or selector) that triggers the selection.\nFor interval selections, the event stream must specify a [start and end](https://vega.github.io/vega/docs/event-streams/#between-filters)."
+ },
+ "resolve": {
+ "$ref": "#/definitions/SelectionResolution",
+ "description": "With layered and multi-view displays, a strategy that determines how\nselections' data queries are resolved when applied in a filter transform,\nconditional encoding rule, or scale domain.\n\n__See also:__ [`resolve`](https://vega.github.io/vega-lite/docs/selection-resolve.html) documentation."
+ },
+ "translate": {
+ "description": "When truthy, allows a user to interactively move an interval selection\nback-and-forth. Can be `true`, `false` (to disable panning), or a\n[Vega event stream definition](https://vega.github.io/vega/docs/event-streams/)\nwhich must include a start and end event to trigger continuous panning.\n\n__Default value:__ `true`, which corresponds to\n`[mousedown, window:mouseup] > window:mousemove!` which corresponds to\nclicks and dragging within an interval selection to reposition it.\n\n__See also:__ [`translate`](https://vega.github.io/vega-lite/docs/translate.html) documentation.",
+ "type": [
+ "string",
+ "boolean"
+ ]
+ },
+ "type": {
+ "description": "Determines the default event processing and data query for the selection. Vega-Lite currently supports three selection types:\n\n- `single` -- to select a single discrete data value on `click`.\n- `multi` -- to select multiple discrete data value; the first value is selected on `click` and additional values toggled on shift-`click`.\n- `interval` -- to select a continuous range of data values on `drag`.",
+ "enum": [
+ "interval"
+ ],
+ "type": "string"
+ },
+ "zoom": {
+ "description": "When truthy, allows a user to interactively resize an interval selection.\nCan be `true`, `false` (to disable zooming), or a [Vega event stream\ndefinition](https://vega.github.io/vega/docs/event-streams/). Currently,\nonly `wheel` events are supported.\n\n__Default value:__ `true`, which corresponds to `wheel!`.\n\n__See also:__ [`zoom`](https://vega.github.io/vega-lite/docs/zoom.html) documentation.",
+ "type": [
+ "string",
+ "boolean"
+ ]
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "type": "object"
+ },
+ "IntervalSelectionConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "bind": {
+ "description": "Establishes a two-way binding between the interval selection and the scales\nused within the same view. This allows a user to interactively pan and\nzoom the view.\n\n__See also:__ [`bind`](https://vega.github.io/vega-lite/docs/bind.html) documentation.",
+ "enum": [
+ "scales"
+ ],
+ "type": "string"
+ },
+ "clear": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/EventStream"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "description": "Clears the selection, emptying it of all values. Can be an\n[EventStream](https://vega.github.io/vega/docs/event-streams/) or `false` to disable.\n\n__Default value:__ `dblclick`.\n\n__See also:__ [`clear`](https://vega.github.io/vega-lite/docs/clear.html) documentation."
+ },
+ "empty": {
+ "description": "By default, `all` data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.",
+ "enum": [
+ "all",
+ "none"
+ ],
+ "type": "string"
+ },
+ "encodings": {
+ "description": "An array of encoding channels. The corresponding data field values\nmust match for a data tuple to fall within the selection.\n\n__See also:__ [`encodings`](https://vega.github.io/vega-lite/docs/project.html) documentation.",
+ "items": {
+ "$ref": "#/definitions/SingleDefUnitChannel"
+ },
+ "type": "array"
+ },
+ "fields": {
+ "description": "An array of field names whose values must match for a data tuple to\nfall within the selection.\n\n__See also:__ [`fields`](https://vega.github.io/vega-lite/docs/project.html) documentation.",
+ "items": {
+ "$ref": "#/definitions/FieldName"
+ },
+ "type": "array"
+ },
+ "init": {
+ "$ref": "#/definitions/SelectionInitIntervalMapping",
+ "description": "Initialize the selection with a mapping between [projected channels or field names](https://vega.github.io/vega-lite/docs/project.html) and arrays of\ninitial values.\n\n__See also:__ [`init`](https://vega.github.io/vega-lite/docs/init.html) documentation."
+ },
+ "mark": {
+ "$ref": "#/definitions/BrushConfig",
+ "description": "An interval selection also adds a rectangle mark to depict the\nextents of the interval. The `mark` property can be used to customize the\nappearance of the mark.\n\n__See also:__ [`mark`](https://vega.github.io/vega-lite/docs/selection-mark.html) documentation."
+ },
+ "on": {
+ "$ref": "#/definitions/EventStream",
+ "description": "A [Vega event stream](https://vega.github.io/vega/docs/event-streams/) (object or selector) that triggers the selection.\nFor interval selections, the event stream must specify a [start and end](https://vega.github.io/vega/docs/event-streams/#between-filters)."
+ },
+ "resolve": {
+ "$ref": "#/definitions/SelectionResolution",
+ "description": "With layered and multi-view displays, a strategy that determines how\nselections' data queries are resolved when applied in a filter transform,\nconditional encoding rule, or scale domain.\n\n__See also:__ [`resolve`](https://vega.github.io/vega-lite/docs/selection-resolve.html) documentation."
+ },
+ "translate": {
+ "description": "When truthy, allows a user to interactively move an interval selection\nback-and-forth. Can be `true`, `false` (to disable panning), or a\n[Vega event stream definition](https://vega.github.io/vega/docs/event-streams/)\nwhich must include a start and end event to trigger continuous panning.\n\n__Default value:__ `true`, which corresponds to\n`[mousedown, window:mouseup] > window:mousemove!` which corresponds to\nclicks and dragging within an interval selection to reposition it.\n\n__See also:__ [`translate`](https://vega.github.io/vega-lite/docs/translate.html) documentation.",
+ "type": [
+ "string",
+ "boolean"
+ ]
+ },
+ "zoom": {
+ "description": "When truthy, allows a user to interactively resize an interval selection.\nCan be `true`, `false` (to disable zooming), or a [Vega event stream\ndefinition](https://vega.github.io/vega/docs/event-streams/). Currently,\nonly `wheel` events are supported.\n\n__Default value:__ `true`, which corresponds to `wheel!`.\n\n__See also:__ [`zoom`](https://vega.github.io/vega-lite/docs/zoom.html) documentation.",
+ "type": [
+ "string",
+ "boolean"
+ ]
+ }
+ },
+ "type": "object"
+ },
+ "JoinAggregateFieldDef": {
+ "additionalProperties": false,
+ "properties": {
+ "as": {
+ "$ref": "#/definitions/FieldName",
+ "description": "The output name for the join aggregate operation."
+ },
+ "field": {
+ "$ref": "#/definitions/FieldName",
+ "description": "The data field for which to compute the aggregate function. This can be omitted for functions that do not operate over a field such as `count`."
+ },
+ "op": {
+ "$ref": "#/definitions/AggregateOp",
+ "description": "The aggregation operation to apply (e.g., sum, average or count). See the list of all supported operations [here](https://vega.github.io/vega-lite/docs/aggregate.html#ops)."
+ }
+ },
+ "required": [
+ "op",
+ "as"
+ ],
+ "type": "object"
+ },
+ "JoinAggregateTransform": {
+ "additionalProperties": false,
+ "properties": {
+ "groupby": {
+ "description": "The data fields for partitioning the data objects into separate groups. If unspecified, all data points will be in a single group.",
+ "items": {
+ "$ref": "#/definitions/FieldName"
+ },
+ "type": "array"
+ },
+ "joinaggregate": {
+ "description": "The definition of the fields in the join aggregate, and what calculations to use.",
+ "items": {
+ "$ref": "#/definitions/JoinAggregateFieldDef"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "joinaggregate"
+ ],
+ "type": "object"
+ },
+ "JsonDataFormat": {
+ "additionalProperties": false,
+ "properties": {
+ "parse": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Parse"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "If set to `null`, disable type inference based on the spec and only use type inference based on the data.\nAlternatively, a parsing directive object can be provided for explicit data types. Each property of the object corresponds to a field name, and the value to the desired data type (one of `\"number\"`, `\"boolean\"`, `\"date\"`, or null (do not parse the field)).\nFor example, `\"parse\": {\"modified_on\": \"date\"}` parses the `modified_on` field in each input record a Date value.\n\nFor `\"date\"`, we parse data based using Javascript's [`Date.parse()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse).\nFor Specific date formats can be provided (e.g., `{foo: \"date:'%m%d%Y'\"}`), using the [d3-time-format syntax](https://github.com/d3/d3-time-format#locale_format). UTC date format parsing is supported similarly (e.g., `{foo: \"utc:'%m%d%Y'\"}`). See more about [UTC time](https://vega.github.io/vega-lite/docs/timeunit.html#utc)"
+ },
+ "property": {
+ "description": "The JSON property containing the desired data.\nThis parameter can be used when the loaded JSON file may have surrounding structure or meta-data.\nFor example `\"property\": \"values.features\"` is equivalent to retrieving `json.values.features`\nfrom the loaded JSON object.",
+ "type": "string"
+ },
+ "type": {
+ "description": "Type of input data: `\"json\"`, `\"csv\"`, `\"tsv\"`, `\"dsv\"`.\n\n__Default value:__ The default format type is determined by the extension of the file URL.\nIf no extension is detected, `\"json\"` will be used by default.",
+ "enum": [
+ "json"
+ ],
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "LabelOverlap": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "enum": [
+ "parity"
+ ],
+ "type": "string"
+ },
+ {
+ "enum": [
+ "greedy"
+ ],
+ "type": "string"
+ }
+ ]
+ },
+ "LatLongFieldDef": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field\n(e.g., `mean`, `sum`, `median`, `min`, `max`, `count`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "bin": {
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.",
+ "type": "null"
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value\nor an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__\n1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`).\nIf field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`).\nSee more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html).\n2) `field` is not required if `aggregate` is `count`."
+ },
+ "timeUnit": {
+ "$ref": "#/definitions/TimeUnit",
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field.\nor [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.",
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "type": {
+ "description": "The encoded field's type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`).\nIt can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\n\n__Note:__\n\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- Data `type` describes the semantics of the data rather than the primitive data types (`number`, `string`, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\", \"type\": \"quantitative\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.",
+ "enum": [
+ "quantitative"
+ ],
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "LayerSpec": {
+ "additionalProperties": false,
+ "description": "A full layered plot specification, which may contains `encoding` and `projection` properties that will be applied to underlying unit (single-view) specifications.",
+ "properties": {
+ "data": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Data"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
+ },
+ "description": {
+ "description": "Description of this mark for commenting purpose.",
+ "type": "string"
+ },
+ "encoding": {
+ "$ref": "#/definitions/Encoding",
+ "description": "A shared key-value mapping between encoding channels and definition of fields in the underlying layers."
+ },
+ "height": {
+ "description": "The height of a visualization.\n\n__Default value:__\n- If a view's [`autosize`](https://vega.github.io/vega-lite/docs/size.html#autosize) type is `\"fit\"` or its y-channel has a [continuous scale](https://vega.github.io/vega-lite/docs/scale.html#continuous), the height will be the value of [`config.view.height`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- For y-axis with a band or point scale: if [`rangeStep`](https://vega.github.io/vega-lite/docs/scale.html#band) is a numeric value or unspecified, the height is [determined by the range step, paddings, and the cardinality of the field mapped to y-channel](https://vega.github.io/vega-lite/docs/scale.html#band). Otherwise, if the `rangeStep` is `null`, the height will be the value of [`config.view.height`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- If no field is mapped to `y` channel, the `height` will be the value of `rangeStep`.\n\n__Note__: For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the height of a single view.\n\n__See also:__ The documentation for [width and height](https://vega.github.io/vega-lite/docs/size.html) contains more examples.",
+ "type": "number"
+ },
+ "layer": {
+ "description": "Layer or single view specifications to be layered.\n\n__Note__: Specifications inside `layer` cannot use `row` and `column` channels as layering facet specifications is not allowed. Instead, use the [facet operator](https://vega.github.io/vega-lite/docs/facet.html) and place a layer inside a facet.",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LayerSpec"
+ },
+ {
+ "$ref": "#/definitions/UnitSpec"
+ }
+ ]
+ },
+ "type": "array"
+ },
+ "name": {
+ "description": "Name of the visualization for later reference.",
+ "type": "string"
+ },
+ "projection": {
+ "$ref": "#/definitions/Projection",
+ "description": "An object defining properties of the geographic projection shared by underlying layers."
+ },
+ "resolve": {
+ "$ref": "#/definitions/Resolve",
+ "description": "Scale, axis, and legend resolutions for view composition specifications."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/TitleParams"
+ }
+ ],
+ "description": "Title for the plot."
+ },
+ "transform": {
+ "description": "An array of data transformations such as filter and new field calculation.",
+ "items": {
+ "$ref": "#/definitions/Transform"
+ },
+ "type": "array"
+ },
+ "view": {
+ "$ref": "#/definitions/ViewBackground",
+ "description": "An object defining the view background's fill and stroke.\n\n__Default value:__ none (transparent)"
+ },
+ "width": {
+ "description": "The width of a visualization.\n\n__Default value:__ This will be determined by the following rules:\n\n- If a view's [`autosize`](https://vega.github.io/vega-lite/docs/size.html#autosize) type is `\"fit\"` or its x-channel has a [continuous scale](https://vega.github.io/vega-lite/docs/scale.html#continuous), the width will be the value of [`config.view.width`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- For x-axis with a band or point scale: if [`rangeStep`](https://vega.github.io/vega-lite/docs/scale.html#band) is a numeric value or unspecified, the width is [determined by the range step, paddings, and the cardinality of the field mapped to x-channel](https://vega.github.io/vega-lite/docs/scale.html#band). Otherwise, if the `rangeStep` is `null`, the width will be the value of [`config.view.width`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- If no field is mapped to `x` channel, the `width` will be the value of [`config.scale.textXRangeStep`](https://vega.github.io/vega-lite/docs/size.html#default-width-and-height) for `text` mark and the value of `rangeStep` for other marks.\n\n__Note:__ For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the width of a single view.\n\n__See also:__ The documentation for [width and height](https://vega.github.io/vega-lite/docs/size.html) contains more examples.",
+ "type": "number"
+ }
+ },
+ "required": [
+ "layer"
+ ],
+ "type": "object"
+ },
+ "LayoutAlign": {
+ "enum": [
+ "all",
+ "each",
+ "none"
+ ],
+ "type": "string"
+ },
+ "LayoutBounds": {
+ "anyOf": [
+ {
+ "enum": [
+ "full"
+ ],
+ "type": "string"
+ },
+ {
+ "enum": [
+ "flush"
+ ],
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/SignalRef"
+ }
+ ]
+ },
+ "Legend": {
+ "additionalProperties": false,
+ "description": "Properties of a legend or boolean flag for determining whether to show it.",
+ "properties": {
+ "clipHeight": {
+ "description": "The height in pixels to clip symbol legend entries and limit their size.",
+ "type": "number"
+ },
+ "columnPadding": {
+ "description": "The horizontal padding in pixels between symbol legend entries.\n\n__Default value:__ `10`.",
+ "type": "number"
+ },
+ "columns": {
+ "description": "The number of columns in which to arrange symbol legend entries. A value of `0` or lower indicates a single row with one column per entry.",
+ "type": "number"
+ },
+ "cornerRadius": {
+ "description": "Corner radius for the full legend.",
+ "type": "number"
+ },
+ "direction": {
+ "$ref": "#/definitions/Orientation",
+ "description": "The direction of the legend, one of `\"vertical\"` or `\"horizontal\"`.\n\n__Default value:__\n- For top-/bottom-`orient`ed legends, `\"horizontal\"`\n- For left-/right-`orient`ed legends, `\"vertical\"`\n- For top/bottom-left/right-`orient`ed legends, `\"horizontal\"` for gradient legends and `\"vertical\"` for symbol legends."
+ },
+ "fillColor": {
+ "$ref": "#/definitions/Color",
+ "description": "Background fill color for the full legend."
+ },
+ "format": {
+ "description": "The text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `\"number\"` (e.g., for quantitative fields), this is D3's [number format pattern](https://github.com/d3/d3-format#locale_format).\n- If the format type is `\"time\"` (e.g., for temporal fields), this is D3's [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\n__Default value:__ Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format.",
+ "type": "string"
+ },
+ "formatType": {
+ "description": "The format type for labels (`\"number\"` or `\"time\"`).\n\n__Default value:__\n- `\"time\"` for temporal fields and ordinal and nomimal fields with `timeUnit`.\n- `\"number\"` for quantitative fields as well as ordinal and nomimal fields without `timeUnit`.",
+ "enum": [
+ "number",
+ "time"
+ ],
+ "type": "string"
+ },
+ "gradientLength": {
+ "description": "The length in pixels of the primary axis of a color gradient. This value corresponds to the height of a vertical gradient or the width of a horizontal gradient.\n\n__Default value:__ `200`.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "gradientOpacity": {
+ "description": "Opacity of the color gradient.",
+ "type": "number"
+ },
+ "gradientStrokeColor": {
+ "$ref": "#/definitions/Color",
+ "description": "The color of the gradient stroke, can be in hex color code or regular color name.\n\n__Default value:__ `\"lightGray\"`."
+ },
+ "gradientStrokeWidth": {
+ "description": "The width of the gradient stroke, in pixels.\n\n__Default value:__ `0`.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "gradientThickness": {
+ "description": "The thickness in pixels of the color gradient. This value corresponds to the width of a vertical gradient or the height of a horizontal gradient.\n\n__Default value:__ `16`.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "gridAlign": {
+ "$ref": "#/definitions/LayoutAlign",
+ "description": "The alignment to apply to symbol legends rows and columns. The supported string values are `\"all\"`, `\"each\"` (the default), and `none`. For more information, see the [grid layout documentation](https://vega.github.io/vega/docs/layout).\n\n__Default value:__ `\"each\"`."
+ },
+ "labelAlign": {
+ "$ref": "#/definitions/Align",
+ "description": "The alignment of the legend label, can be left, center, or right."
+ },
+ "labelBaseline": {
+ "$ref": "#/definitions/TextBaseline",
+ "description": "The position of the baseline of legend label, can be `\"top\"`, `\"middle\"`, `\"bottom\"`, or `\"alphabetic\"`.\n\n__Default value:__ `\"middle\"`."
+ },
+ "labelColor": {
+ "$ref": "#/definitions/Color",
+ "description": "The color of the legend label, can be in hex color code or regular color name."
+ },
+ "labelFont": {
+ "description": "The font of the legend label.",
+ "type": "string"
+ },
+ "labelFontSize": {
+ "description": "The font size of legend label.\n\n__Default value:__ `10`.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "labelFontStyle": {
+ "$ref": "#/definitions/FontStyle",
+ "description": "The font style of legend label."
+ },
+ "labelFontWeight": {
+ "$ref": "#/definitions/FontWeight",
+ "description": "The font weight of legend label."
+ },
+ "labelLimit": {
+ "description": "Maximum allowed pixel width of legend tick labels.\n\n__Default value:__ `160`.",
+ "type": "number"
+ },
+ "labelOffset": {
+ "description": "The offset of the legend label.",
+ "type": "number"
+ },
+ "labelOpacity": {
+ "description": "Opacity of labels.",
+ "type": "number"
+ },
+ "labelOverlap": {
+ "$ref": "#/definitions/LabelOverlap",
+ "description": "The strategy to use for resolving overlap of labels in gradient legends. If `false`, no overlap reduction is attempted. If set to `true` (default) or `\"parity\"`, a strategy of removing every other label is used. If set to `\"greedy\"`, a linear scan of the labels is performed, removing any label that overlaps with the last visible label (this often works better for log-scaled axes).\n\n__Default value:__ `true`."
+ },
+ "labelPadding": {
+ "description": "Padding in pixels between the legend and legend labels.",
+ "type": "number"
+ },
+ "labelSeparation": {
+ "description": "The minimum separation that must be between label bounding boxes for them to be considered non-overlapping (default `0`). This property is ignored if *labelOverlap* resolution is not enabled.",
+ "type": "number"
+ },
+ "legendX": {
+ "description": "Custom x-position for legend with orient \"none\".",
+ "type": "number"
+ },
+ "legendY": {
+ "description": "Custom y-position for legend with orient \"none\".",
+ "type": "number"
+ },
+ "offset": {
+ "description": "The offset in pixels by which to displace the legend from the data rectangle and axes.\n\n__Default value:__ `18`.",
+ "type": "number"
+ },
+ "orient": {
+ "$ref": "#/definitions/LegendOrient",
+ "description": "The orientation of the legend, which determines how the legend is positioned within the scene. One of `\"left\"`, `\"right\"`, `\"top\"`, `\"bottom\"`, `\"top-left\"`, `\"top-right\"`, `\"bottom-left\"`, `\"bottom-right\"`, `\"none\"`.\n\n__Default value:__ `\"right\"`"
+ },
+ "padding": {
+ "description": "The padding between the border and content of the legend group.\n\n__Default value:__ `0`.",
+ "type": "number"
+ },
+ "rowPadding": {
+ "description": "The vertical padding in pixels between symbol legend entries.\n\n__Default value:__ `2`.",
+ "type": "number"
+ },
+ "strokeColor": {
+ "$ref": "#/definitions/Color",
+ "description": "Border stroke color for the full legend."
+ },
+ "symbolDash": {
+ "description": "An array of alternating [stroke, space] lengths for dashed symbol strokes.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "symbolDashOffset": {
+ "description": "The pixel offset at which to start drawing with the symbol stroke dash array.",
+ "type": "number"
+ },
+ "symbolFillColor": {
+ "$ref": "#/definitions/Color",
+ "description": "The color of the legend symbol,"
+ },
+ "symbolOffset": {
+ "description": "Horizontal pixel offset for legend symbols.\n\n__Default value:__ `0`.",
+ "type": "number"
+ },
+ "symbolOpacity": {
+ "description": "Opacity of the legend symbols.",
+ "type": "number"
+ },
+ "symbolSize": {
+ "description": "The size of the legend symbol, in pixels.\n\n__Default value:__ `100`.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "symbolStrokeColor": {
+ "$ref": "#/definitions/Color",
+ "description": "Stroke color for legend symbols."
+ },
+ "symbolStrokeWidth": {
+ "description": "The width of the symbol's stroke.\n\n__Default value:__ `1.5`.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "symbolType": {
+ "$ref": "#/definitions/SymbolShape",
+ "description": "The symbol shape. One of the plotting shapes `circle` (default), `square`, `cross`, `diamond`, `triangle-up`, `triangle-down`, `triangle-right`, or `triangle-left`, the line symbol `stroke`, or one of the centered directional shapes `arrow`, `wedge`, or `triangle`. Alternatively, a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) can be provided. For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.\n\n__Default value:__ `\"circle\"`."
+ },
+ "tickCount": {
+ "description": "The desired number of tick values for quantitative legends.",
+ "type": "number"
+ },
+ "tickMinStep": {
+ "description": "The minimum desired step between legend ticks, in terms of scale domain values. For example, a value of `1` indicates that ticks should not be less than 1 unit apart. If `tickMinStep` is specified, the `tickCount` value will be adjusted, if necessary, to enforce the minimum step value.\n\n__Default value__: `undefined`",
+ "type": "number"
+ },
+ "title": {
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.",
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "titleAlign": {
+ "$ref": "#/definitions/Align",
+ "description": "Horizontal text alignment for legend titles.\n\n__Default value:__ `\"left\"`."
+ },
+ "titleAnchor": {
+ "$ref": "#/definitions/TitleAnchor",
+ "description": "Text anchor position for placing legend titles."
+ },
+ "titleBaseline": {
+ "$ref": "#/definitions/TextBaseline",
+ "description": "Vertical text baseline for legend titles.\n\n__Default value:__ `\"top\"`."
+ },
+ "titleColor": {
+ "$ref": "#/definitions/Color",
+ "description": "The color of the legend title, can be in hex color code or regular color name."
+ },
+ "titleFont": {
+ "description": "The font of the legend title.",
+ "type": "string"
+ },
+ "titleFontSize": {
+ "description": "The font size of the legend title.",
+ "type": "number"
+ },
+ "titleFontStyle": {
+ "$ref": "#/definitions/FontStyle",
+ "description": "The font style of the legend title."
+ },
+ "titleFontWeight": {
+ "$ref": "#/definitions/FontWeight",
+ "description": "The font weight of the legend title.\nThis can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)."
+ },
+ "titleLimit": {
+ "description": "Maximum allowed pixel width of legend titles.\n\n__Default value:__ `180`.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "titleOpacity": {
+ "description": "Opacity of the legend title.",
+ "type": "number"
+ },
+ "titleOrient": {
+ "$ref": "#/definitions/Orient",
+ "description": "Orientation of the legend title."
+ },
+ "titlePadding": {
+ "description": "The padding, in pixels, between title and legend.\n\n__Default value:__ `5`.",
+ "type": "number"
+ },
+ "type": {
+ "description": "The type of the legend. Use `\"symbol\"` to create a discrete legend and `\"gradient\"` for a continuous color gradient.\n\n__Default value:__ `\"gradient\"` for non-binned quantitative fields and temporal fields; `\"symbol\"` otherwise.",
+ "enum": [
+ "symbol",
+ "gradient"
+ ],
+ "type": "string"
+ },
+ "values": {
+ "description": "Explicitly set the visible legend values.",
+ "items": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ }
+ ]
+ },
+ "type": "array"
+ },
+ "zindex": {
+ "description": "A non-negative integer indicating the z-index of the legend.\nIf zindex is 0, legend should be drawn behind all chart elements.\nTo put them in front, use zindex = 1.",
+ "minimum": 0,
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "LegendConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "clipHeight": {
+ "description": "The height in pixels to clip symbol legend entries and limit their size.",
+ "type": "number"
+ },
+ "columnPadding": {
+ "description": "The horizontal padding in pixels between symbol legend entries.\n\n__Default value:__ `10`.",
+ "type": "number"
+ },
+ "columns": {
+ "description": "The number of columns in which to arrange symbol legend entries. A value of `0` or lower indicates a single row with one column per entry.",
+ "type": "number"
+ },
+ "cornerRadius": {
+ "description": "Corner radius for the full legend.",
+ "type": "number"
+ },
+ "fillColor": {
+ "$ref": "#/definitions/Color",
+ "description": "Background fill color for the full legend."
+ },
+ "gradientDirection": {
+ "$ref": "#/definitions/Orientation",
+ "description": "The default direction (`\"horizontal\"` or `\"vertical\"`) for gradient legends.\n\n__Default value:__ `\"vertical\"`."
+ },
+ "gradientHorizontalMaxLength": {
+ "description": "Max legend length for a horizontal gradient when `config.legend.gradientLength` is undefined.\n\n__Default value:__ `200`",
+ "type": "number"
+ },
+ "gradientHorizontalMinLength": {
+ "description": "Min legend length for a horizontal gradient when `config.legend.gradientLength` is undefined.\n\n__Default value:__ `100`",
+ "type": "number"
+ },
+ "gradientLabelLimit": {
+ "description": "The maximum allowed length in pixels of color ramp gradient labels.",
+ "type": "number"
+ },
+ "gradientLabelOffset": {
+ "description": "Vertical offset in pixels for color ramp gradient labels.\n\n__Default value:__ `2`.",
+ "type": "number"
+ },
+ "gradientLength": {
+ "description": "The length in pixels of the primary axis of a color gradient. This value corresponds to the height of a vertical gradient or the width of a horizontal gradient.\n\n__Default value:__ `200`.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "gradientOpacity": {
+ "description": "Opacity of the color gradient.",
+ "type": "number"
+ },
+ "gradientStrokeColor": {
+ "$ref": "#/definitions/Color",
+ "description": "The color of the gradient stroke, can be in hex color code or regular color name.\n\n__Default value:__ `\"lightGray\"`."
+ },
+ "gradientStrokeWidth": {
+ "description": "The width of the gradient stroke, in pixels.\n\n__Default value:__ `0`.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "gradientThickness": {
+ "description": "The thickness in pixels of the color gradient. This value corresponds to the width of a vertical gradient or the height of a horizontal gradient.\n\n__Default value:__ `16`.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "gradientVerticalMaxLength": {
+ "description": "Max legend length for a vertical gradient when `config.legend.gradientLength` is undefined.\n\n__Default value:__ `200`",
+ "type": "number"
+ },
+ "gradientVerticalMinLength": {
+ "description": "Min legend length for a vertical gradient when `config.legend.gradientLength` is undefined.\n\n__Default value:__ `100`",
+ "type": "number"
+ },
+ "gridAlign": {
+ "$ref": "#/definitions/LayoutAlign",
+ "description": "The alignment to apply to symbol legends rows and columns. The supported string values are `\"all\"`, `\"each\"` (the default), and `none`. For more information, see the [grid layout documentation](https://vega.github.io/vega/docs/layout).\n\n__Default value:__ `\"each\"`."
+ },
+ "labelAlign": {
+ "$ref": "#/definitions/Align",
+ "description": "The alignment of the legend label, can be left, center, or right."
+ },
+ "labelBaseline": {
+ "$ref": "#/definitions/TextBaseline",
+ "description": "The position of the baseline of legend label, can be `\"top\"`, `\"middle\"`, `\"bottom\"`, or `\"alphabetic\"`.\n\n__Default value:__ `\"middle\"`."
+ },
+ "labelColor": {
+ "$ref": "#/definitions/Color",
+ "description": "The color of the legend label, can be in hex color code or regular color name."
+ },
+ "labelFont": {
+ "description": "The font of the legend label.",
+ "type": "string"
+ },
+ "labelFontSize": {
+ "description": "The font size of legend label.\n\n__Default value:__ `10`.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "labelFontStyle": {
+ "$ref": "#/definitions/FontStyle",
+ "description": "The font style of legend label."
+ },
+ "labelFontWeight": {
+ "$ref": "#/definitions/FontWeight",
+ "description": "The font weight of legend label."
+ },
+ "labelLimit": {
+ "description": "Maximum allowed pixel width of legend tick labels.\n\n__Default value:__ `160`.",
+ "type": "number"
+ },
+ "labelOffset": {
+ "description": "The offset of the legend label.",
+ "type": "number"
+ },
+ "labelOpacity": {
+ "description": "Opacity of labels.",
+ "type": "number"
+ },
+ "labelOverlap": {
+ "$ref": "#/definitions/LabelOverlap",
+ "description": "The strategy to use for resolving overlap of labels in gradient legends. If `false`, no overlap reduction is attempted. If set to `true` or `\"parity\"`, a strategy of removing every other label is used. If set to `\"greedy\"`, a linear scan of the labels is performed, removing any label that overlaps with the last visible label (this often works better for log-scaled axes).\n\n__Default value:__ `\"greedy\"` for `log scales otherwise `true`."
+ },
+ "labelPadding": {
+ "description": "Padding in pixels between the legend and legend labels.",
+ "type": "number"
+ },
+ "labelSeparation": {
+ "description": "The minimum separation that must be between label bounding boxes for them to be considered non-overlapping (default `0`). This property is ignored if *labelOverlap* resolution is not enabled.",
+ "type": "number"
+ },
+ "layout": {
+ "$ref": "#/definitions/LegendLayout",
+ "description": "Legend orient group layout parameters."
+ },
+ "legendX": {
+ "description": "Custom x-position for legend with orient \"none\".",
+ "type": "number"
+ },
+ "legendY": {
+ "description": "Custom y-position for legend with orient \"none\".",
+ "type": "number"
+ },
+ "offset": {
+ "description": "The offset in pixels by which to displace the legend from the data rectangle and axes.\n\n__Default value:__ `18`.",
+ "type": "number"
+ },
+ "orient": {
+ "$ref": "#/definitions/LegendOrient",
+ "description": "The orientation of the legend, which determines how the legend is positioned within the scene. One of \"left\", \"right\", \"top-left\", \"top-right\", \"bottom-left\", \"bottom-right\", \"none\".\n\n__Default value:__ `\"right\"`"
+ },
+ "padding": {
+ "description": "The padding between the border and content of the legend group.\n\n__Default value:__ `0`.",
+ "type": "number"
+ },
+ "rowPadding": {
+ "description": "The vertical padding in pixels between symbol legend entries.\n\n__Default value:__ `2`.",
+ "type": "number"
+ },
+ "shortTimeLabels": {
+ "description": "Whether month names and weekday names should be abbreviated.\n\n__Default value:__ `false`",
+ "type": "boolean"
+ },
+ "strokeColor": {
+ "$ref": "#/definitions/Color",
+ "description": "Border stroke color for the full legend."
+ },
+ "strokeDash": {
+ "description": "Border stroke dash pattern for the full legend.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "strokeWidth": {
+ "description": "Border stroke width for the full legend.",
+ "type": "number"
+ },
+ "symbolBaseFillColor": {
+ "$ref": "#/definitions/Color",
+ "description": "Default fill color for legend symbols. Only applied if there is no `\"fill\"` scale color encoding for the legend.\n\n__Default value:__ `\"transparent\"`."
+ },
+ "symbolBaseStrokeColor": {
+ "$ref": "#/definitions/Color",
+ "description": "Default stroke color for legend symbols. Only applied if there is no `\"fill\"` scale color encoding for the legend.\n\n__Default value:__ `\"gray\"`."
+ },
+ "symbolDash": {
+ "description": "An array of alternating [stroke, space] lengths for dashed symbol strokes.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "symbolDashOffset": {
+ "description": "The pixel offset at which to start drawing with the symbol stroke dash array.",
+ "type": "number"
+ },
+ "symbolDirection": {
+ "$ref": "#/definitions/Orientation",
+ "description": "The default direction (`\"horizontal\"` or `\"vertical\"`) for symbol legends.\n\n__Default value:__ `\"vertical\"`."
+ },
+ "symbolFillColor": {
+ "$ref": "#/definitions/Color",
+ "description": "The color of the legend symbol,"
+ },
+ "symbolOffset": {
+ "description": "Horizontal pixel offset for legend symbols.\n\n__Default value:__ `0`.",
+ "type": "number"
+ },
+ "symbolOpacity": {
+ "description": "Opacity of the legend symbols.",
+ "type": "number"
+ },
+ "symbolSize": {
+ "description": "The size of the legend symbol, in pixels.\n\n__Default value:__ `100`.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "symbolStrokeColor": {
+ "$ref": "#/definitions/Color",
+ "description": "Stroke color for legend symbols."
+ },
+ "symbolStrokeWidth": {
+ "description": "The width of the symbol's stroke.\n\n__Default value:__ `1.5`.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "symbolType": {
+ "$ref": "#/definitions/SymbolShape",
+ "description": "The symbol shape. One of the plotting shapes `circle` (default), `square`, `cross`, `diamond`, `triangle-up`, `triangle-down`, `triangle-right`, or `triangle-left`, the line symbol `stroke`, or one of the centered directional shapes `arrow`, `wedge`, or `triangle`. Alternatively, a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) can be provided. For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.\n\n__Default value:__ `\"circle\"`."
+ },
+ "title": {
+ "description": "Set to null to disable title for the axis, legend, or header.",
+ "type": "null"
+ },
+ "titleAlign": {
+ "$ref": "#/definitions/Align",
+ "description": "Horizontal text alignment for legend titles.\n\n__Default value:__ `\"left\"`."
+ },
+ "titleAnchor": {
+ "$ref": "#/definitions/TitleAnchor",
+ "description": "Text anchor position for placing legend titles."
+ },
+ "titleBaseline": {
+ "$ref": "#/definitions/TextBaseline",
+ "description": "Vertical text baseline for legend titles.\n\n__Default value:__ `\"top\"`."
+ },
+ "titleColor": {
+ "$ref": "#/definitions/Color",
+ "description": "The color of the legend title, can be in hex color code or regular color name."
+ },
+ "titleFont": {
+ "description": "The font of the legend title.",
+ "type": "string"
+ },
+ "titleFontSize": {
+ "description": "The font size of the legend title.",
+ "type": "number"
+ },
+ "titleFontStyle": {
+ "$ref": "#/definitions/FontStyle",
+ "description": "The font style of the legend title."
+ },
+ "titleFontWeight": {
+ "$ref": "#/definitions/FontWeight",
+ "description": "The font weight of the legend title.\nThis can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)."
+ },
+ "titleLimit": {
+ "description": "Maximum allowed pixel width of legend titles.\n\n__Default value:__ `180`.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "titleOpacity": {
+ "description": "Opacity of the legend title.",
+ "type": "number"
+ },
+ "titleOrient": {
+ "$ref": "#/definitions/Orient",
+ "description": "Orientation of the legend title."
+ },
+ "titlePadding": {
+ "description": "The padding, in pixels, between title and legend.\n\n__Default value:__ `5`.",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "LegendLayout": {
+ "additionalProperties": false,
+ "properties": {
+ "anchor": {
+ "$ref": "#/definitions/TitleAnchor",
+ "description": "The anchor point for legend orient group layout."
+ },
+ "bottom": {
+ "$ref": "#/definitions/BaseLegendLayout"
+ },
+ "bottom-left": {
+ "$ref": "#/definitions/BaseLegendLayout"
+ },
+ "bottom-right": {
+ "$ref": "#/definitions/BaseLegendLayout"
+ },
+ "bounds": {
+ "$ref": "#/definitions/LayoutBounds",
+ "description": "The bounds calculation to use for legend orient group layout."
+ },
+ "center": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/SignalRef"
+ }
+ ],
+ "description": "A flag to center legends within a shared orient group."
+ },
+ "direction": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Orientation"
+ },
+ {
+ "$ref": "#/definitions/SignalRef"
+ }
+ ],
+ "description": "The layout direction for legend orient group layout."
+ },
+ "left": {
+ "$ref": "#/definitions/BaseLegendLayout"
+ },
+ "margin": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/SignalRef"
+ }
+ ],
+ "description": "The pixel margin between legends within a orient group."
+ },
+ "offset": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/SignalRef"
+ }
+ ],
+ "description": "The pixel offset from the chart body for a legend orient group."
+ },
+ "right": {
+ "$ref": "#/definitions/BaseLegendLayout"
+ },
+ "top": {
+ "$ref": "#/definitions/BaseLegendLayout"
+ },
+ "top-left": {
+ "$ref": "#/definitions/BaseLegendLayout"
+ },
+ "top-right": {
+ "$ref": "#/definitions/BaseLegendLayout"
+ }
+ },
+ "type": "object"
+ },
+ "LegendOrient": {
+ "enum": [
+ "none",
+ "left",
+ "right",
+ "top",
+ "bottom",
+ "top-left",
+ "top-right",
+ "bottom-left",
+ "bottom-right"
+ ],
+ "type": "string"
+ },
+ "LegendResolveMap": {
+ "additionalProperties": false,
+ "properties": {
+ "color": {
+ "$ref": "#/definitions/ResolveMode"
+ },
+ "fill": {
+ "$ref": "#/definitions/ResolveMode"
+ },
+ "fillOpacity": {
+ "$ref": "#/definitions/ResolveMode"
+ },
+ "opacity": {
+ "$ref": "#/definitions/ResolveMode"
+ },
+ "shape": {
+ "$ref": "#/definitions/ResolveMode"
+ },
+ "size": {
+ "$ref": "#/definitions/ResolveMode"
+ },
+ "stroke": {
+ "$ref": "#/definitions/ResolveMode"
+ },
+ "strokeOpacity": {
+ "$ref": "#/definitions/ResolveMode"
+ },
+ "strokeWidth": {
+ "$ref": "#/definitions/ResolveMode"
+ }
+ },
+ "type": "object"
+ },
+ "LineConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "align": {
+ "$ref": "#/definitions/Align",
+ "description": "The horizontal alignment of the text. One of `\"left\"`, `\"right\"`, `\"center\"`."
+ },
+ "angle": {
+ "description": "The rotation angle of the text, in degrees.",
+ "maximum": 360,
+ "minimum": 0,
+ "type": "number"
+ },
+ "baseline": {
+ "$ref": "#/definitions/TextBaseline",
+ "description": "The vertical alignment of the text. One of `\"top\"`, `\"middle\"`, `\"bottom\"`.\n\n__Default value:__ `\"middle\"`"
+ },
+ "color": {
+ "$ref": "#/definitions/Color",
+ "description": "Default color. Note that `fill` and `stroke` have higher precedence than `color` and will override `color`.\n\n__Default value:__ <span style=\"color: #4682b4;\">&#9632;</span> `\"#4682b4\"`\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config)."
+ },
+ "cornerRadius": {
+ "description": "The radius in pixels of rounded rectangle corners.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ "cursor": {
+ "$ref": "#/definitions/Cursor",
+ "description": "The mouse cursor used over the mark. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used."
+ },
+ "dir": {
+ "$ref": "#/definitions/Dir",
+ "description": "The direction of the text. One of `\"ltr\"` (left-to-right) or `\"rtl\"` (right-to-left). This property determines on which side is truncated in response to the limit parameter.\n\n__Default value:__ `\"ltr\"`"
+ },
+ "dx": {
+ "description": "The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
+ "type": "number"
+ },
+ "dy": {
+ "description": "The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
+ "type": "number"
+ },
+ "ellipsis": {
+ "description": "The ellipsis string for text truncated in response to the limit parameter.\n\n__Default value:__ `\"…\"`",
+ "type": "string"
+ },
+ "fill": {
+ "$ref": "#/definitions/Color",
+ "description": "Default Fill Color. This has higher precedence than `config.color`\n\n__Default value:__ (None)"
+ },
+ "fillOpacity": {
+ "description": "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "filled": {
+ "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `false` for `point`, `line` and `rule`; otherwise, `true`.\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).",
+ "type": "boolean"
+ },
+ "font": {
+ "description": "The typeface to set the text in (e.g., `\"Helvetica Neue\"`).",
+ "type": "string"
+ },
+ "fontSize": {
+ "description": "The font size, in pixels.",
+ "type": "number"
+ },
+ "fontStyle": {
+ "$ref": "#/definitions/FontStyle",
+ "description": "The font style (e.g., `\"italic\"`)."
+ },
+ "fontWeight": {
+ "$ref": "#/definitions/FontWeight",
+ "description": "The font weight.\nThis can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)."
+ },
+ "height": {
+ "description": "Height of the marks.",
+ "type": "number"
+ },
+ "href": {
+ "description": "A URL to load upon mouse click. If defined, the mark acts as a hyperlink.",
+ "format": "uri",
+ "type": "string"
+ },
+ "interpolate": {
+ "$ref": "#/definitions/Interpolate",
+ "description": "The line interpolation method to use for line and area marks. One of the following:\n- `\"linear\"`: piecewise linear segments, as in a polyline.\n- `\"linear-closed\"`: close the linear segments to form a polygon.\n- `\"step\"`: alternate between horizontal and vertical segments, as in a step function.\n- `\"step-before\"`: alternate between vertical and horizontal segments, as in a step function.\n- `\"step-after\"`: alternate between horizontal and vertical segments, as in a step function.\n- `\"basis\"`: a B-spline, with control point duplication on the ends.\n- `\"basis-open\"`: an open B-spline; may not intersect the start or end.\n- `\"basis-closed\"`: a closed B-spline, as in a loop.\n- `\"cardinal\"`: a Cardinal spline, with control point duplication on the ends.\n- `\"cardinal-open\"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points.\n- `\"cardinal-closed\"`: a closed Cardinal spline, as in a loop.\n- `\"bundle\"`: equivalent to basis, except the tension parameter is used to straighten the spline.\n- `\"monotone\"`: cubic interpolation that preserves monotonicity in y."
+ },
+ "limit": {
+ "description": "The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0`, indicating no limit",
+ "type": "number"
+ },
+ "opacity": {
+ "description": "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "order": {
+ "description": "For line and trail marks, this `order` property can be set to `null` or `false` to make the lines use the original order in the data sources.",
+ "type": [
+ "null",
+ "boolean"
+ ]
+ },
+ "orient": {
+ "$ref": "#/definitions/Orientation",
+ "description": "The orientation of a non-stacked bar, tick, area, and line charts.\nThe value is either horizontal (default) or vertical.\n- For bar, rule and tick, this determines whether the size of the bar and tick\nshould be applied to x or y dimension.\n- For area, this property determines the orient property of the Vega output.\n- For line and trail marks, this property determines the sort order of the points in the line\nif `config.sortLineBy` is not specified.\nFor stacked charts, this is always determined by the orientation of the stack;\ntherefore explicitly specified value will be ignored."
+ },
+ "point": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/OverlayMarkDef"
+ },
+ {
+ "enum": [
+ "transparent"
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "A flag for overlaying points on top of line or area marks, or an object defining the properties of the overlayed points.\n\n- If this property is `\"transparent\"`, transparent points will be used (for enhancing tooltips and selections).\n\n- If this property is an empty object (`{}`) or `true`, filled points with default properties will be used.\n\n- If this property is `false`, no points would be automatically added to line or area marks.\n\n__Default value:__ `false`."
+ },
+ "radius": {
+ "description": "Polar coordinate radial offset, in pixels, of the text label from the origin determined by the `x` and `y` properties.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "shape": {
+ "description": "Shape of the point marks. Supported values include:\n- plotting shapes: `\"circle\"`, `\"square\"`, `\"cross\"`, `\"diamond\"`, `\"triangle-up\"`, `\"triangle-down\"`, `\"triangle-right\"`, or `\"triangle-left\"`.\n- the line symbol `\"stroke\"`\n- centered directional shapes `\"arrow\"`, `\"wedge\"`, or `\"triangle\"`\n- a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n__Default value:__ `\"circle\"`",
+ "type": "string"
+ },
+ "size": {
+ "description": "Default size for marks.\n- For `point`/`circle`/`square`, this represents the pixel area of the marks. For example: in the case of circles, the radius is determined in part by the square root of the size value.\n- For `bar`, this represents the band size of the bar, in pixels.\n- For `text`, this represents the font size, in pixels.\n\n__Default value:__ `30` for point, circle, square marks; `rangeStep` - 1 for bar marks with discrete dimensions; `5` for bar marks with continuous dimensions; `11` for text marks.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "stroke": {
+ "$ref": "#/definitions/Color",
+ "description": "Default Stroke Color. This has higher precedence than `config.color`\n\n__Default value:__ (None)"
+ },
+ "strokeCap": {
+ "$ref": "#/definitions/StrokeCap",
+ "description": "The stroke cap for line ending style. One of `\"butt\"`, `\"round\"`, or `\"square\"`.\n\n__Default value:__ `\"square\"`"
+ },
+ "strokeDash": {
+ "description": "An array of alternating stroke, space lengths for creating dashed or dotted lines.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "strokeDashOffset": {
+ "description": "The offset (in pixels) into which to begin drawing with the stroke dash array.",
+ "type": "number"
+ },
+ "strokeJoin": {
+ "$ref": "#/definitions/StrokeJoin",
+ "description": "The stroke line join method. One of `\"miter\"`, `\"round\"` or `\"bevel\"`.\n\n__Default value:__ `\"miter\"`"
+ },
+ "strokeMiterLimit": {
+ "description": "The miter limit at which to bevel a line join.",
+ "type": "number"
+ },
+ "strokeOpacity": {
+ "description": "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "strokeWidth": {
+ "description": "The stroke width, in pixels.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "tension": {
+ "description": "Depending on the interpolation type, sets the tension parameter (for line and area marks).",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "text": {
+ "description": "Placeholder text if the `text` channel is not specified",
+ "type": "string"
+ },
+ "theta": {
+ "description": "Polar coordinate angle, in radians, of the text label from the origin determined by the `x` and `y` properties. Values for `theta` follow the same convention of `arc` mark `startAngle` and `endAngle` properties: angles are measured in radians, with `0` indicating \"north\".",
+ "type": "number"
+ },
+ "tooltip": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Value"
+ },
+ {
+ "$ref": "#/definitions/TooltipContent"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.\n\n- If `tooltip` is `{\"content\": \"encoding\"}`, then all fields from `encoding` will be used.\n- If `tooltip` is `{\"content\": \"data\"}`, then all fields that appear in the highlighted data point will be used.\n- If set to `null`, then no tooltip will be used."
+ },
+ "width": {
+ "description": "Width of the marks.",
+ "type": "number"
+ },
+ "x": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "enum": [
+ "width"
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "X coordinates of the marks, or width of horizontal `\"bar\"` and `\"area\"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "x2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "enum": [
+ "width"
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "X2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "y": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "enum": [
+ "height"
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "Y coordinates of the marks, or height of vertical `\"bar\"` and `\"area\"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ },
+ "y2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "enum": [
+ "width"
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "Y2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ }
+ },
+ "type": "object"
+ },
+ "LocalMultiTimeUnit": {
+ "enum": [
+ "yearquarter",
+ "yearquartermonth",
+ "yearmonth",
+ "yearmonthdate",
+ "yearmonthdatehours",
+ "yearmonthdatehoursminutes",
+ "yearmonthdatehoursminutesseconds",
+ "quartermonth",
+ "monthdate",
+ "monthdatehours",
+ "hoursminutes",
+ "hoursminutesseconds",
+ "minutesseconds",
+ "secondsmilliseconds"
+ ],
+ "type": "string"
+ },
+ "LocalSingleTimeUnit": {
+ "enum": [
+ "year",
+ "quarter",
+ "month",
+ "day",
+ "date",
+ "hours",
+ "minutes",
+ "seconds",
+ "milliseconds"
+ ],
+ "type": "string"
+ },
+ "LogicalAnd<Predicate>": {
+ "additionalProperties": false,
+ "properties": {
+ "and": {
+ "items": {
+ "$ref": "#/definitions/LogicalOperand<Predicate>"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "and"
+ ],
+ "type": "object"
+ },
+ "SelectionAnd": {
+ "additionalProperties": false,
+ "properties": {
+ "and": {
+ "items": {
+ "$ref": "#/definitions/SelectionOperand"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "and"
+ ],
+ "type": "object"
+ },
+ "LogicalNot<Predicate>": {
+ "additionalProperties": false,
+ "properties": {
+ "not": {
+ "$ref": "#/definitions/LogicalOperand<Predicate>"
+ }
+ },
+ "required": [
+ "not"
+ ],
+ "type": "object"
+ },
+ "SelectionNot": {
+ "additionalProperties": false,
+ "properties": {
+ "not": {
+ "$ref": "#/definitions/SelectionOperand"
+ }
+ },
+ "required": [
+ "not"
+ ],
+ "type": "object"
+ },
+ "LogicalOperand<Predicate>": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LogicalNot<Predicate>"
+ },
+ {
+ "$ref": "#/definitions/LogicalAnd<Predicate>"
+ },
+ {
+ "$ref": "#/definitions/LogicalOr<Predicate>"
+ },
+ {
+ "$ref": "#/definitions/Predicate"
+ }
+ ]
+ },
+ "SelectionOperand": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SelectionNot"
+ },
+ {
+ "$ref": "#/definitions/SelectionAnd"
+ },
+ {
+ "$ref": "#/definitions/SelectionOr"
+ },
+ {
+ "type": "string"
+ }
+ ]
+ },
+ "LogicalOr<Predicate>": {
+ "additionalProperties": false,
+ "properties": {
+ "or": {
+ "items": {
+ "$ref": "#/definitions/LogicalOperand<Predicate>"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "or"
+ ],
+ "type": "object"
+ },
+ "SelectionOr": {
+ "additionalProperties": false,
+ "properties": {
+ "or": {
+ "items": {
+ "$ref": "#/definitions/SelectionOperand"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "or"
+ ],
+ "type": "object"
+ },
+ "LookupData": {
+ "additionalProperties": false,
+ "properties": {
+ "data": {
+ "$ref": "#/definitions/Data",
+ "description": "Secondary data source to lookup in."
+ },
+ "fields": {
+ "description": "Fields in foreign data to lookup.\nIf not specified, the entire object is queried.",
+ "items": {
+ "$ref": "#/definitions/FieldName"
+ },
+ "type": "array"
+ },
+ "key": {
+ "$ref": "#/definitions/FieldName",
+ "description": "Key in data to lookup."
+ }
+ },
+ "required": [
+ "data",
+ "key"
+ ],
+ "type": "object"
+ },
+ "LookupTransform": {
+ "additionalProperties": false,
+ "properties": {
+ "as": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FieldName"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/FieldName"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "The field or fields for storing the computed formula value.\nIf `from.fields` is specified, the transform will use the same names for `as`.\nIf `from.fields` is not specified, `as` has to be a string and we put the whole object into the data under the specified name."
+ },
+ "default": {
+ "description": "The default value to use if lookup fails.\n\n__Default value:__ `null`",
+ "type": "string"
+ },
+ "from": {
+ "$ref": "#/definitions/LookupData",
+ "description": "Secondary data reference."
+ },
+ "lookup": {
+ "$ref": "#/definitions/FieldName",
+ "description": "Key in primary data source."
+ }
+ },
+ "required": [
+ "lookup",
+ "from"
+ ],
+ "type": "object"
+ },
+ "Mark": {
+ "description": "All types of primitive marks.",
+ "enum": [
+ "area",
+ "bar",
+ "line",
+ "trail",
+ "point",
+ "text",
+ "tick",
+ "rect",
+ "rule",
+ "circle",
+ "square",
+ "geoshape"
+ ],
+ "type": "string"
+ },
+ "MarkConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "align": {
+ "$ref": "#/definitions/Align",
+ "description": "The horizontal alignment of the text. One of `\"left\"`, `\"right\"`, `\"center\"`."
+ },
+ "angle": {
+ "description": "The rotation angle of the text, in degrees.",
+ "maximum": 360,
+ "minimum": 0,
+ "type": "number"
+ },
+ "baseline": {
+ "$ref": "#/definitions/TextBaseline",
+ "description": "The vertical alignment of the text. One of `\"top\"`, `\"middle\"`, `\"bottom\"`.\n\n__Default value:__ `\"middle\"`"
+ },
+ "color": {
+ "$ref": "#/definitions/Color",
+ "description": "Default color. Note that `fill` and `stroke` have higher precedence than `color` and will override `color`.\n\n__Default value:__ <span style=\"color: #4682b4;\">&#9632;</span> `\"#4682b4\"`\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config)."
+ },
+ "cornerRadius": {
+ "description": "The radius in pixels of rounded rectangle corners.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ "cursor": {
+ "$ref": "#/definitions/Cursor",
+ "description": "The mouse cursor used over the mark. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used."
+ },
+ "dir": {
+ "$ref": "#/definitions/Dir",
+ "description": "The direction of the text. One of `\"ltr\"` (left-to-right) or `\"rtl\"` (right-to-left). This property determines on which side is truncated in response to the limit parameter.\n\n__Default value:__ `\"ltr\"`"
+ },
+ "dx": {
+ "description": "The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
+ "type": "number"
+ },
+ "dy": {
+ "description": "The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
+ "type": "number"
+ },
+ "ellipsis": {
+ "description": "The ellipsis string for text truncated in response to the limit parameter.\n\n__Default value:__ `\"…\"`",
+ "type": "string"
+ },
+ "fill": {
+ "$ref": "#/definitions/Color",
+ "description": "Default Fill Color. This has higher precedence than `config.color`\n\n__Default value:__ (None)"
+ },
+ "fillOpacity": {
+ "description": "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "filled": {
+ "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `false` for `point`, `line` and `rule`; otherwise, `true`.\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).",
+ "type": "boolean"
+ },
+ "font": {
+ "description": "The typeface to set the text in (e.g., `\"Helvetica Neue\"`).",
+ "type": "string"
+ },
+ "fontSize": {
+ "description": "The font size, in pixels.",
+ "type": "number"
+ },
+ "fontStyle": {
+ "$ref": "#/definitions/FontStyle",
+ "description": "The font style (e.g., `\"italic\"`)."
+ },
+ "fontWeight": {
+ "$ref": "#/definitions/FontWeight",
+ "description": "The font weight.\nThis can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)."
+ },
+ "height": {
+ "description": "Height of the marks.",
+ "type": "number"
+ },
+ "href": {
+ "description": "A URL to load upon mouse click. If defined, the mark acts as a hyperlink.",
+ "format": "uri",
+ "type": "string"
+ },
+ "interpolate": {
+ "$ref": "#/definitions/Interpolate",
+ "description": "The line interpolation method to use for line and area marks. One of the following:\n- `\"linear\"`: piecewise linear segments, as in a polyline.\n- `\"linear-closed\"`: close the linear segments to form a polygon.\n- `\"step\"`: alternate between horizontal and vertical segments, as in a step function.\n- `\"step-before\"`: alternate between vertical and horizontal segments, as in a step function.\n- `\"step-after\"`: alternate between horizontal and vertical segments, as in a step function.\n- `\"basis\"`: a B-spline, with control point duplication on the ends.\n- `\"basis-open\"`: an open B-spline; may not intersect the start or end.\n- `\"basis-closed\"`: a closed B-spline, as in a loop.\n- `\"cardinal\"`: a Cardinal spline, with control point duplication on the ends.\n- `\"cardinal-open\"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points.\n- `\"cardinal-closed\"`: a closed Cardinal spline, as in a loop.\n- `\"bundle\"`: equivalent to basis, except the tension parameter is used to straighten the spline.\n- `\"monotone\"`: cubic interpolation that preserves monotonicity in y."
+ },
+ "limit": {
+ "description": "The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0`, indicating no limit",
+ "type": "number"
+ },
+ "opacity": {
+ "description": "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "order": {
+ "description": "For line and trail marks, this `order` property can be set to `null` or `false` to make the lines use the original order in the data sources.",
+ "type": [
+ "null",
+ "boolean"
+ ]
+ },
+ "orient": {
+ "$ref": "#/definitions/Orientation",
+ "description": "The orientation of a non-stacked bar, tick, area, and line charts.\nThe value is either horizontal (default) or vertical.\n- For bar, rule and tick, this determines whether the size of the bar and tick\nshould be applied to x or y dimension.\n- For area, this property determines the orient property of the Vega output.\n- For line and trail marks, this property determines the sort order of the points in the line\nif `config.sortLineBy` is not specified.\nFor stacked charts, this is always determined by the orientation of the stack;\ntherefore explicitly specified value will be ignored."
+ },
+ "radius": {
+ "description": "Polar coordinate radial offset, in pixels, of the text label from the origin determined by the `x` and `y` properties.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "shape": {
+ "description": "Shape of the point marks. Supported values include:\n- plotting shapes: `\"circle\"`, `\"square\"`, `\"cross\"`, `\"diamond\"`, `\"triangle-up\"`, `\"triangle-down\"`, `\"triangle-right\"`, or `\"triangle-left\"`.\n- the line symbol `\"stroke\"`\n- centered directional shapes `\"arrow\"`, `\"wedge\"`, or `\"triangle\"`\n- a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n__Default value:__ `\"circle\"`",
+ "type": "string"
+ },
+ "size": {
+ "description": "Default size for marks.\n- For `point`/`circle`/`square`, this represents the pixel area of the marks. For example: in the case of circles, the radius is determined in part by the square root of the size value.\n- For `bar`, this represents the band size of the bar, in pixels.\n- For `text`, this represents the font size, in pixels.\n\n__Default value:__ `30` for point, circle, square marks; `rangeStep` - 1 for bar marks with discrete dimensions; `5` for bar marks with continuous dimensions; `11` for text marks.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "stroke": {
+ "$ref": "#/definitions/Color",
+ "description": "Default Stroke Color. This has higher precedence than `config.color`\n\n__Default value:__ (None)"
+ },
+ "strokeCap": {
+ "$ref": "#/definitions/StrokeCap",
+ "description": "The stroke cap for line ending style. One of `\"butt\"`, `\"round\"`, or `\"square\"`.\n\n__Default value:__ `\"square\"`"
+ },
+ "strokeDash": {
+ "description": "An array of alternating stroke, space lengths for creating dashed or dotted lines.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "strokeDashOffset": {
+ "description": "The offset (in pixels) into which to begin drawing with the stroke dash array.",
+ "type": "number"
+ },
+ "strokeJoin": {
+ "$ref": "#/definitions/StrokeJoin",
+ "description": "The stroke line join method. One of `\"miter\"`, `\"round\"` or `\"bevel\"`.\n\n__Default value:__ `\"miter\"`"
+ },
+ "strokeMiterLimit": {
+ "description": "The miter limit at which to bevel a line join.",
+ "type": "number"
+ },
+ "strokeOpacity": {
+ "description": "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "strokeWidth": {
+ "description": "The stroke width, in pixels.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "tension": {
+ "description": "Depending on the interpolation type, sets the tension parameter (for line and area marks).",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "text": {
+ "description": "Placeholder text if the `text` channel is not specified",
+ "type": "string"
+ },
+ "theta": {
+ "description": "Polar coordinate angle, in radians, of the text label from the origin determined by the `x` and `y` properties. Values for `theta` follow the same convention of `arc` mark `startAngle` and `endAngle` properties: angles are measured in radians, with `0` indicating \"north\".",
+ "type": "number"
+ },
+ "tooltip": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Value"
+ },
+ {
+ "$ref": "#/definitions/TooltipContent"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.\n\n- If `tooltip` is `{\"content\": \"encoding\"}`, then all fields from `encoding` will be used.\n- If `tooltip` is `{\"content\": \"data\"}`, then all fields that appear in the highlighted data point will be used.\n- If set to `null`, then no tooltip will be used."
+ },
+ "width": {
+ "description": "Width of the marks.",
+ "type": "number"
+ },
+ "x": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "enum": [
+ "width"
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "X coordinates of the marks, or width of horizontal `\"bar\"` and `\"area\"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "x2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "enum": [
+ "width"
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "X2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "y": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "enum": [
+ "height"
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "Y coordinates of the marks, or height of vertical `\"bar\"` and `\"area\"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ },
+ "y2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "enum": [
+ "width"
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "Y2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ }
+ },
+ "type": "object"
+ },
+ "MarkDef": {
+ "additionalProperties": false,
+ "properties": {
+ "align": {
+ "$ref": "#/definitions/Align",
+ "description": "The horizontal alignment of the text. One of `\"left\"`, `\"right\"`, `\"center\"`."
+ },
+ "angle": {
+ "description": "The rotation angle of the text, in degrees.",
+ "maximum": 360,
+ "minimum": 0,
+ "type": "number"
+ },
+ "baseline": {
+ "$ref": "#/definitions/TextBaseline",
+ "description": "The vertical alignment of the text. One of `\"top\"`, `\"middle\"`, `\"bottom\"`.\n\n__Default value:__ `\"middle\"`"
+ },
+ "binSpacing": {
+ "description": "Offset between bars for binned field. Ideal value for this is either 0 (Preferred by statisticians) or 1 (Vega-Lite Default, D3 example style).\n\n__Default value:__ `1`",
+ "minimum": 0,
+ "type": "number"
+ },
+ "clip": {
+ "description": "Whether a mark be clipped to the enclosing group’s width and height.",
+ "type": "boolean"
+ },
+ "color": {
+ "$ref": "#/definitions/Color",
+ "description": "Default color. Note that `fill` and `stroke` have higher precedence than `color` and will override `color`.\n\n__Default value:__ <span style=\"color: #4682b4;\">&#9632;</span> `\"#4682b4\"`\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config)."
+ },
+ "cornerRadius": {
+ "description": "The radius in pixels of rounded rectangle corners.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ "cursor": {
+ "$ref": "#/definitions/Cursor",
+ "description": "The mouse cursor used over the mark. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used."
+ },
+ "dir": {
+ "$ref": "#/definitions/Dir",
+ "description": "The direction of the text. One of `\"ltr\"` (left-to-right) or `\"rtl\"` (right-to-left). This property determines on which side is truncated in response to the limit parameter.\n\n__Default value:__ `\"ltr\"`"
+ },
+ "dx": {
+ "description": "The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
+ "type": "number"
+ },
+ "dy": {
+ "description": "The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
+ "type": "number"
+ },
+ "ellipsis": {
+ "description": "The ellipsis string for text truncated in response to the limit parameter.\n\n__Default value:__ `\"…\"`",
+ "type": "string"
+ },
+ "fill": {
+ "$ref": "#/definitions/Color",
+ "description": "Default Fill Color. This has higher precedence than `config.color`\n\n__Default value:__ (None)"
+ },
+ "fillOpacity": {
+ "description": "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "filled": {
+ "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `false` for `point`, `line` and `rule`; otherwise, `true`.\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).",
+ "type": "boolean"
+ },
+ "font": {
+ "description": "The typeface to set the text in (e.g., `\"Helvetica Neue\"`).",
+ "type": "string"
+ },
+ "fontSize": {
+ "description": "The font size, in pixels.",
+ "type": "number"
+ },
+ "fontStyle": {
+ "$ref": "#/definitions/FontStyle",
+ "description": "The font style (e.g., `\"italic\"`)."
+ },
+ "fontWeight": {
+ "$ref": "#/definitions/FontWeight",
+ "description": "The font weight.\nThis can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)."
+ },
+ "height": {
+ "description": "Height of the marks.",
+ "type": "number"
+ },
+ "href": {
+ "description": "A URL to load upon mouse click. If defined, the mark acts as a hyperlink.",
+ "format": "uri",
+ "type": "string"
+ },
+ "interpolate": {
+ "$ref": "#/definitions/Interpolate",
+ "description": "The line interpolation method to use for line and area marks. One of the following:\n- `\"linear\"`: piecewise linear segments, as in a polyline.\n- `\"linear-closed\"`: close the linear segments to form a polygon.\n- `\"step\"`: alternate between horizontal and vertical segments, as in a step function.\n- `\"step-before\"`: alternate between vertical and horizontal segments, as in a step function.\n- `\"step-after\"`: alternate between horizontal and vertical segments, as in a step function.\n- `\"basis\"`: a B-spline, with control point duplication on the ends.\n- `\"basis-open\"`: an open B-spline; may not intersect the start or end.\n- `\"basis-closed\"`: a closed B-spline, as in a loop.\n- `\"cardinal\"`: a Cardinal spline, with control point duplication on the ends.\n- `\"cardinal-open\"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points.\n- `\"cardinal-closed\"`: a closed Cardinal spline, as in a loop.\n- `\"bundle\"`: equivalent to basis, except the tension parameter is used to straighten the spline.\n- `\"monotone\"`: cubic interpolation that preserves monotonicity in y."
+ },
+ "limit": {
+ "description": "The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0`, indicating no limit",
+ "type": "number"
+ },
+ "line": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/OverlayMarkDef"
+ }
+ ],
+ "description": "A flag for overlaying line on top of area marks, or an object defining the properties of the overlayed lines.\n\n- If this value is an empty object (`{}`) or `true`, lines with default properties will be used.\n\n- If this value is `false`, no lines would be automatically added to area marks.\n\n__Default value:__ `false`."
+ },
+ "opacity": {
+ "description": "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "order": {
+ "description": "For line and trail marks, this `order` property can be set to `null` or `false` to make the lines use the original order in the data sources.",
+ "type": [
+ "null",
+ "boolean"
+ ]
+ },
+ "orient": {
+ "$ref": "#/definitions/Orientation",
+ "description": "The orientation of a non-stacked bar, tick, area, and line charts.\nThe value is either horizontal (default) or vertical.\n- For bar, rule and tick, this determines whether the size of the bar and tick\nshould be applied to x or y dimension.\n- For area, this property determines the orient property of the Vega output.\n- For line and trail marks, this property determines the sort order of the points in the line\nif `config.sortLineBy` is not specified.\nFor stacked charts, this is always determined by the orientation of the stack;\ntherefore explicitly specified value will be ignored."
+ },
+ "point": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/OverlayMarkDef"
+ },
+ {
+ "enum": [
+ "transparent"
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "A flag for overlaying points on top of line or area marks, or an object defining the properties of the overlayed points.\n\n- If this property is `\"transparent\"`, transparent points will be used (for enhancing tooltips and selections).\n\n- If this property is an empty object (`{}`) or `true`, filled points with default properties will be used.\n\n- If this property is `false`, no points would be automatically added to line or area marks.\n\n__Default value:__ `false`."
+ },
+ "radius": {
+ "description": "Polar coordinate radial offset, in pixels, of the text label from the origin determined by the `x` and `y` properties.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "shape": {
+ "description": "Shape of the point marks. Supported values include:\n- plotting shapes: `\"circle\"`, `\"square\"`, `\"cross\"`, `\"diamond\"`, `\"triangle-up\"`, `\"triangle-down\"`, `\"triangle-right\"`, or `\"triangle-left\"`.\n- the line symbol `\"stroke\"`\n- centered directional shapes `\"arrow\"`, `\"wedge\"`, or `\"triangle\"`\n- a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n__Default value:__ `\"circle\"`",
+ "type": "string"
+ },
+ "size": {
+ "description": "Default size for marks.\n- For `point`/`circle`/`square`, this represents the pixel area of the marks. For example: in the case of circles, the radius is determined in part by the square root of the size value.\n- For `bar`, this represents the band size of the bar, in pixels.\n- For `text`, this represents the font size, in pixels.\n\n__Default value:__ `30` for point, circle, square marks; `rangeStep` - 1 for bar marks with discrete dimensions; `5` for bar marks with continuous dimensions; `11` for text marks.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "stroke": {
+ "$ref": "#/definitions/Color",
+ "description": "Default Stroke Color. This has higher precedence than `config.color`\n\n__Default value:__ (None)"
+ },
+ "strokeCap": {
+ "$ref": "#/definitions/StrokeCap",
+ "description": "The stroke cap for line ending style. One of `\"butt\"`, `\"round\"`, or `\"square\"`.\n\n__Default value:__ `\"square\"`"
+ },
+ "strokeDash": {
+ "description": "An array of alternating stroke, space lengths for creating dashed or dotted lines.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "strokeDashOffset": {
+ "description": "The offset (in pixels) into which to begin drawing with the stroke dash array.",
+ "type": "number"
+ },
+ "strokeJoin": {
+ "$ref": "#/definitions/StrokeJoin",
+ "description": "The stroke line join method. One of `\"miter\"`, `\"round\"` or `\"bevel\"`.\n\n__Default value:__ `\"miter\"`"
+ },
+ "strokeMiterLimit": {
+ "description": "The miter limit at which to bevel a line join.",
+ "type": "number"
+ },
+ "strokeOpacity": {
+ "description": "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "strokeWidth": {
+ "description": "The stroke width, in pixels.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "style": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "A string or array of strings indicating the name of custom styles to apply to the mark. A style is a named collection of mark property defaults defined within the [style configuration](https://vega.github.io/vega-lite/docs/mark.html#style-config). If style is an array, later styles will override earlier styles. Any [mark properties](https://vega.github.io/vega-lite/docs/encoding.html#mark-prop) explicitly defined within the `encoding` will override a style default.\n\n__Default value:__ The mark's name. For example, a bar mark will have style `\"bar\"` by default.\n__Note:__ Any specified style will augment the default style. For example, a bar mark with `\"style\": \"foo\"` will receive from `config.style.bar` and `config.style.foo` (the specified style `\"foo\"` has higher precedence)."
+ },
+ "tension": {
+ "description": "Depending on the interpolation type, sets the tension parameter (for line and area marks).",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "text": {
+ "description": "Placeholder text if the `text` channel is not specified",
+ "type": "string"
+ },
+ "theta": {
+ "description": "Polar coordinate angle, in radians, of the text label from the origin determined by the `x` and `y` properties. Values for `theta` follow the same convention of `arc` mark `startAngle` and `endAngle` properties: angles are measured in radians, with `0` indicating \"north\".",
+ "type": "number"
+ },
+ "thickness": {
+ "description": "Thickness of the tick mark.\n\n__Default value:__ `1`",
+ "minimum": 0,
+ "type": "number"
+ },
+ "tooltip": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Value"
+ },
+ {
+ "$ref": "#/definitions/TooltipContent"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.\n\n- If `tooltip` is `{\"content\": \"encoding\"}`, then all fields from `encoding` will be used.\n- If `tooltip` is `{\"content\": \"data\"}`, then all fields that appear in the highlighted data point will be used.\n- If set to `null`, then no tooltip will be used."
+ },
+ "type": {
+ "$ref": "#/definitions/Mark",
+ "description": "The mark type. This could a primitive mark type\n(one of `\"bar\"`, `\"circle\"`, `\"square\"`, `\"tick\"`, `\"line\"`,\n`\"area\"`, `\"point\"`, `\"geoshape\"`, `\"rule\"`, and `\"text\"`)\nor a composite mark type (`\"boxplot\"`, `\"errorband\"`, `\"errorbar\"`)."
+ },
+ "width": {
+ "description": "Width of the marks.",
+ "type": "number"
+ },
+ "x": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "enum": [
+ "width"
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "X coordinates of the marks, or width of horizontal `\"bar\"` and `\"area\"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "x2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "enum": [
+ "width"
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "X2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "x2Offset": {
+ "description": "Offset for x2-position.",
+ "type": "number"
+ },
+ "xOffset": {
+ "description": "Offset for x-position.",
+ "type": "number"
+ },
+ "y": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "enum": [
+ "height"
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "Y coordinates of the marks, or height of vertical `\"bar\"` and `\"area\"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ },
+ "y2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "enum": [
+ "width"
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "Y2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ },
+ "y2Offset": {
+ "description": "Offset for y2-position.",
+ "type": "number"
+ },
+ "yOffset": {
+ "description": "Offset for y-position.",
+ "type": "number"
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "type": "object"
+ },
+ "Month": {
+ "maximum": 12,
+ "minimum": 1,
+ "type": "number"
+ },
+ "MultiSelection": {
+ "additionalProperties": false,
+ "properties": {
+ "clear": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/EventStream"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "description": "Clears the selection, emptying it of all values. Can be an\n[EventStream](https://vega.github.io/vega/docs/event-streams/) or `false` to disable.\n\n__Default value:__ `dblclick`.\n\n__See also:__ [`clear`](https://vega.github.io/vega-lite/docs/clear.html) documentation."
+ },
+ "empty": {
+ "description": "By default, `all` data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.",
+ "enum": [
+ "all",
+ "none"
+ ],
+ "type": "string"
+ },
+ "encodings": {
+ "description": "An array of encoding channels. The corresponding data field values\nmust match for a data tuple to fall within the selection.\n\n__See also:__ [`encodings`](https://vega.github.io/vega-lite/docs/project.html) documentation.",
+ "items": {
+ "$ref": "#/definitions/SingleDefUnitChannel"
+ },
+ "type": "array"
+ },
+ "fields": {
+ "description": "An array of field names whose values must match for a data tuple to\nfall within the selection.\n\n__See also:__ [`fields`](https://vega.github.io/vega-lite/docs/project.html) documentation.",
+ "items": {
+ "$ref": "#/definitions/FieldName"
+ },
+ "type": "array"
+ },
+ "init": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SelectionInitMapping"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/SelectionInitMapping"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "Initialize the selection with a mapping between [projected channels or field names](https://vega.github.io/vega-lite/docs/project.html) and an initial\nvalue (or array of values).\n\n__See also:__ [`init`](https://vega.github.io/vega-lite/docs/init.html) documentation."
+ },
+ "nearest": {
+ "description": "When true, an invisible voronoi diagram is computed to accelerate discrete\nselection. The data value _nearest_ the mouse cursor is added to the selection.\n\n__See also:__ [`nearest`](https://vega.github.io/vega-lite/docs/nearest.html) documentation.",
+ "type": "boolean"
+ },
+ "on": {
+ "$ref": "#/definitions/EventStream",
+ "description": "A [Vega event stream](https://vega.github.io/vega/docs/event-streams/) (object or selector) that triggers the selection.\nFor interval selections, the event stream must specify a [start and end](https://vega.github.io/vega/docs/event-streams/#between-filters)."
+ },
+ "resolve": {
+ "$ref": "#/definitions/SelectionResolution",
+ "description": "With layered and multi-view displays, a strategy that determines how\nselections' data queries are resolved when applied in a filter transform,\nconditional encoding rule, or scale domain.\n\n__See also:__ [`resolve`](https://vega.github.io/vega-lite/docs/selection-resolve.html) documentation."
+ },
+ "toggle": {
+ "description": "Controls whether data values should be toggled or only ever inserted into\nmulti selections. Can be `true`, `false` (for insertion only), or a\n[Vega expression](https://vega.github.io/vega/docs/expressions/).\n\n__Default value:__ `true`, which corresponds to `event.shiftKey` (i.e.,\ndata values are toggled when a user interacts with the shift-key pressed).\n\n__See also:__ [`toggle`](https://vega.github.io/vega-lite/docs/toggle.html) documentation.",
+ "type": [
+ "string",
+ "boolean"
+ ]
+ },
+ "type": {
+ "description": "Determines the default event processing and data query for the selection. Vega-Lite currently supports three selection types:\n\n- `single` -- to select a single discrete data value on `click`.\n- `multi` -- to select multiple discrete data value; the first value is selected on `click` and additional values toggled on shift-`click`.\n- `interval` -- to select a continuous range of data values on `drag`.",
+ "enum": [
+ "multi"
+ ],
+ "type": "string"
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "type": "object"
+ },
+ "MultiSelectionConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "clear": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/EventStream"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "description": "Clears the selection, emptying it of all values. Can be an\n[EventStream](https://vega.github.io/vega/docs/event-streams/) or `false` to disable.\n\n__Default value:__ `dblclick`.\n\n__See also:__ [`clear`](https://vega.github.io/vega-lite/docs/clear.html) documentation."
+ },
+ "empty": {
+ "description": "By default, `all` data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.",
+ "enum": [
+ "all",
+ "none"
+ ],
+ "type": "string"
+ },
+ "encodings": {
+ "description": "An array of encoding channels. The corresponding data field values\nmust match for a data tuple to fall within the selection.\n\n__See also:__ [`encodings`](https://vega.github.io/vega-lite/docs/project.html) documentation.",
+ "items": {
+ "$ref": "#/definitions/SingleDefUnitChannel"
+ },
+ "type": "array"
+ },
+ "fields": {
+ "description": "An array of field names whose values must match for a data tuple to\nfall within the selection.\n\n__See also:__ [`fields`](https://vega.github.io/vega-lite/docs/project.html) documentation.",
+ "items": {
+ "$ref": "#/definitions/FieldName"
+ },
+ "type": "array"
+ },
+ "init": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SelectionInitMapping"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/SelectionInitMapping"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "Initialize the selection with a mapping between [projected channels or field names](https://vega.github.io/vega-lite/docs/project.html) and an initial\nvalue (or array of values).\n\n__See also:__ [`init`](https://vega.github.io/vega-lite/docs/init.html) documentation."
+ },
+ "nearest": {
+ "description": "When true, an invisible voronoi diagram is computed to accelerate discrete\nselection. The data value _nearest_ the mouse cursor is added to the selection.\n\n__See also:__ [`nearest`](https://vega.github.io/vega-lite/docs/nearest.html) documentation.",
+ "type": "boolean"
+ },
+ "on": {
+ "$ref": "#/definitions/EventStream",
+ "description": "A [Vega event stream](https://vega.github.io/vega/docs/event-streams/) (object or selector) that triggers the selection.\nFor interval selections, the event stream must specify a [start and end](https://vega.github.io/vega/docs/event-streams/#between-filters)."
+ },
+ "resolve": {
+ "$ref": "#/definitions/SelectionResolution",
+ "description": "With layered and multi-view displays, a strategy that determines how\nselections' data queries are resolved when applied in a filter transform,\nconditional encoding rule, or scale domain.\n\n__See also:__ [`resolve`](https://vega.github.io/vega-lite/docs/selection-resolve.html) documentation."
+ },
+ "toggle": {
+ "description": "Controls whether data values should be toggled or only ever inserted into\nmulti selections. Can be `true`, `false` (for insertion only), or a\n[Vega expression](https://vega.github.io/vega/docs/expressions/).\n\n__Default value:__ `true`, which corresponds to `event.shiftKey` (i.e.,\ndata values are toggled when a user interacts with the shift-key pressed).\n\n__See also:__ [`toggle`](https://vega.github.io/vega-lite/docs/toggle.html) documentation.",
+ "type": [
+ "string",
+ "boolean"
+ ]
+ }
+ },
+ "type": "object"
+ },
+ "MultiTimeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LocalMultiTimeUnit"
+ },
+ {
+ "$ref": "#/definitions/UtcMultiTimeUnit"
+ }
+ ]
+ },
+ "NamedData": {
+ "additionalProperties": false,
+ "properties": {
+ "format": {
+ "$ref": "#/definitions/DataFormat",
+ "description": "An object that specifies the format for parsing the data."
+ },
+ "name": {
+ "description": "Provide a placeholder name and bind data at runtime.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "type": "object"
+ },
+ "NiceTime": {
+ "enum": [
+ "second",
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "year"
+ ],
+ "type": "string"
+ },
+ "NumericFieldDefWithCondition": {
+ "$ref": "#/definitions/FieldDefWithCondition<MarkPropFieldDef,number>"
+ },
+ "NumericValueDefWithCondition": {
+ "$ref": "#/definitions/ValueDefWithCondition<MarkPropFieldDef,number>"
+ },
+ "OrderFieldDef": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field\n(e.g., `mean`, `sum`, `median`, `min`, `max`, `count`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "enum": [
+ "binned"
+ ],
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value\nor an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__\n1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`).\nIf field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`).\nSee more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html).\n2) `field` is not required if `aggregate` is `count`."
+ },
+ "sort": {
+ "$ref": "#/definitions/SortOrder",
+ "description": "The sort order. One of `\"ascending\"` (default) or `\"descending\"`."
+ },
+ "timeUnit": {
+ "$ref": "#/definitions/TimeUnit",
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field.\nor [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.",
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "type": {
+ "$ref": "#/definitions/StandardType",
+ "description": "The encoded field's type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`).\nIt can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\n\n__Note:__\n\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- Data `type` describes the semantics of the data rather than the primitive data types (`number`, `string`, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\", \"type\": \"quantitative\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "type": "object"
+ },
+ "Orient": {
+ "enum": [
+ "left",
+ "right",
+ "top",
+ "bottom"
+ ],
+ "type": "string"
+ },
+ "Orientation": {
+ "enum": [
+ "horizontal",
+ "vertical"
+ ],
+ "type": "string"
+ },
+ "OverlayMarkDef": {
+ "additionalProperties": false,
+ "properties": {
+ "align": {
+ "$ref": "#/definitions/Align",
+ "description": "The horizontal alignment of the text. One of `\"left\"`, `\"right\"`, `\"center\"`."
+ },
+ "angle": {
+ "description": "The rotation angle of the text, in degrees.",
+ "maximum": 360,
+ "minimum": 0,
+ "type": "number"
+ },
+ "baseline": {
+ "$ref": "#/definitions/TextBaseline",
+ "description": "The vertical alignment of the text. One of `\"top\"`, `\"middle\"`, `\"bottom\"`.\n\n__Default value:__ `\"middle\"`"
+ },
+ "clip": {
+ "description": "Whether a mark be clipped to the enclosing group’s width and height.",
+ "type": "boolean"
+ },
+ "color": {
+ "$ref": "#/definitions/Color",
+ "description": "Default color. Note that `fill` and `stroke` have higher precedence than `color` and will override `color`.\n\n__Default value:__ <span style=\"color: #4682b4;\">&#9632;</span> `\"#4682b4\"`\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config)."
+ },
+ "cornerRadius": {
+ "description": "The radius in pixels of rounded rectangle corners.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ "cursor": {
+ "$ref": "#/definitions/Cursor",
+ "description": "The mouse cursor used over the mark. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used."
+ },
+ "dir": {
+ "$ref": "#/definitions/Dir",
+ "description": "The direction of the text. One of `\"ltr\"` (left-to-right) or `\"rtl\"` (right-to-left). This property determines on which side is truncated in response to the limit parameter.\n\n__Default value:__ `\"ltr\"`"
+ },
+ "dx": {
+ "description": "The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
+ "type": "number"
+ },
+ "dy": {
+ "description": "The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
+ "type": "number"
+ },
+ "ellipsis": {
+ "description": "The ellipsis string for text truncated in response to the limit parameter.\n\n__Default value:__ `\"…\"`",
+ "type": "string"
+ },
+ "fill": {
+ "$ref": "#/definitions/Color",
+ "description": "Default Fill Color. This has higher precedence than `config.color`\n\n__Default value:__ (None)"
+ },
+ "fillOpacity": {
+ "description": "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "filled": {
+ "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `false` for `point`, `line` and `rule`; otherwise, `true`.\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).",
+ "type": "boolean"
+ },
+ "font": {
+ "description": "The typeface to set the text in (e.g., `\"Helvetica Neue\"`).",
+ "type": "string"
+ },
+ "fontSize": {
+ "description": "The font size, in pixels.",
+ "type": "number"
+ },
+ "fontStyle": {
+ "$ref": "#/definitions/FontStyle",
+ "description": "The font style (e.g., `\"italic\"`)."
+ },
+ "fontWeight": {
+ "$ref": "#/definitions/FontWeight",
+ "description": "The font weight.\nThis can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)."
+ },
+ "height": {
+ "description": "Height of the marks.",
+ "type": "number"
+ },
+ "href": {
+ "description": "A URL to load upon mouse click. If defined, the mark acts as a hyperlink.",
+ "format": "uri",
+ "type": "string"
+ },
+ "interpolate": {
+ "$ref": "#/definitions/Interpolate",
+ "description": "The line interpolation method to use for line and area marks. One of the following:\n- `\"linear\"`: piecewise linear segments, as in a polyline.\n- `\"linear-closed\"`: close the linear segments to form a polygon.\n- `\"step\"`: alternate between horizontal and vertical segments, as in a step function.\n- `\"step-before\"`: alternate between vertical and horizontal segments, as in a step function.\n- `\"step-after\"`: alternate between horizontal and vertical segments, as in a step function.\n- `\"basis\"`: a B-spline, with control point duplication on the ends.\n- `\"basis-open\"`: an open B-spline; may not intersect the start or end.\n- `\"basis-closed\"`: a closed B-spline, as in a loop.\n- `\"cardinal\"`: a Cardinal spline, with control point duplication on the ends.\n- `\"cardinal-open\"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points.\n- `\"cardinal-closed\"`: a closed Cardinal spline, as in a loop.\n- `\"bundle\"`: equivalent to basis, except the tension parameter is used to straighten the spline.\n- `\"monotone\"`: cubic interpolation that preserves monotonicity in y."
+ },
+ "limit": {
+ "description": "The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0`, indicating no limit",
+ "type": "number"
+ },
+ "opacity": {
+ "description": "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "order": {
+ "description": "For line and trail marks, this `order` property can be set to `null` or `false` to make the lines use the original order in the data sources.",
+ "type": [
+ "null",
+ "boolean"
+ ]
+ },
+ "orient": {
+ "$ref": "#/definitions/Orientation",
+ "description": "The orientation of a non-stacked bar, tick, area, and line charts.\nThe value is either horizontal (default) or vertical.\n- For bar, rule and tick, this determines whether the size of the bar and tick\nshould be applied to x or y dimension.\n- For area, this property determines the orient property of the Vega output.\n- For line and trail marks, this property determines the sort order of the points in the line\nif `config.sortLineBy` is not specified.\nFor stacked charts, this is always determined by the orientation of the stack;\ntherefore explicitly specified value will be ignored."
+ },
+ "radius": {
+ "description": "Polar coordinate radial offset, in pixels, of the text label from the origin determined by the `x` and `y` properties.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "shape": {
+ "description": "Shape of the point marks. Supported values include:\n- plotting shapes: `\"circle\"`, `\"square\"`, `\"cross\"`, `\"diamond\"`, `\"triangle-up\"`, `\"triangle-down\"`, `\"triangle-right\"`, or `\"triangle-left\"`.\n- the line symbol `\"stroke\"`\n- centered directional shapes `\"arrow\"`, `\"wedge\"`, or `\"triangle\"`\n- a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n__Default value:__ `\"circle\"`",
+ "type": "string"
+ },
+ "size": {
+ "description": "Default size for marks.\n- For `point`/`circle`/`square`, this represents the pixel area of the marks. For example: in the case of circles, the radius is determined in part by the square root of the size value.\n- For `bar`, this represents the band size of the bar, in pixels.\n- For `text`, this represents the font size, in pixels.\n\n__Default value:__ `30` for point, circle, square marks; `rangeStep` - 1 for bar marks with discrete dimensions; `5` for bar marks with continuous dimensions; `11` for text marks.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "stroke": {
+ "$ref": "#/definitions/Color",
+ "description": "Default Stroke Color. This has higher precedence than `config.color`\n\n__Default value:__ (None)"
+ },
+ "strokeCap": {
+ "$ref": "#/definitions/StrokeCap",
+ "description": "The stroke cap for line ending style. One of `\"butt\"`, `\"round\"`, or `\"square\"`.\n\n__Default value:__ `\"square\"`"
+ },
+ "strokeDash": {
+ "description": "An array of alternating stroke, space lengths for creating dashed or dotted lines.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "strokeDashOffset": {
+ "description": "The offset (in pixels) into which to begin drawing with the stroke dash array.",
+ "type": "number"
+ },
+ "strokeJoin": {
+ "$ref": "#/definitions/StrokeJoin",
+ "description": "The stroke line join method. One of `\"miter\"`, `\"round\"` or `\"bevel\"`.\n\n__Default value:__ `\"miter\"`"
+ },
+ "strokeMiterLimit": {
+ "description": "The miter limit at which to bevel a line join.",
+ "type": "number"
+ },
+ "strokeOpacity": {
+ "description": "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "strokeWidth": {
+ "description": "The stroke width, in pixels.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "style": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "A string or array of strings indicating the name of custom styles to apply to the mark. A style is a named collection of mark property defaults defined within the [style configuration](https://vega.github.io/vega-lite/docs/mark.html#style-config). If style is an array, later styles will override earlier styles. Any [mark properties](https://vega.github.io/vega-lite/docs/encoding.html#mark-prop) explicitly defined within the `encoding` will override a style default.\n\n__Default value:__ The mark's name. For example, a bar mark will have style `\"bar\"` by default.\n__Note:__ Any specified style will augment the default style. For example, a bar mark with `\"style\": \"foo\"` will receive from `config.style.bar` and `config.style.foo` (the specified style `\"foo\"` has higher precedence)."
+ },
+ "tension": {
+ "description": "Depending on the interpolation type, sets the tension parameter (for line and area marks).",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "text": {
+ "description": "Placeholder text if the `text` channel is not specified",
+ "type": "string"
+ },
+ "theta": {
+ "description": "Polar coordinate angle, in radians, of the text label from the origin determined by the `x` and `y` properties. Values for `theta` follow the same convention of `arc` mark `startAngle` and `endAngle` properties: angles are measured in radians, with `0` indicating \"north\".",
+ "type": "number"
+ },
+ "tooltip": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Value"
+ },
+ {
+ "$ref": "#/definitions/TooltipContent"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.\n\n- If `tooltip` is `{\"content\": \"encoding\"}`, then all fields from `encoding` will be used.\n- If `tooltip` is `{\"content\": \"data\"}`, then all fields that appear in the highlighted data point will be used.\n- If set to `null`, then no tooltip will be used."
+ },
+ "width": {
+ "description": "Width of the marks.",
+ "type": "number"
+ },
+ "x": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "enum": [
+ "width"
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "X coordinates of the marks, or width of horizontal `\"bar\"` and `\"area\"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "x2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "enum": [
+ "width"
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "X2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "x2Offset": {
+ "description": "Offset for x2-position.",
+ "type": "number"
+ },
+ "xOffset": {
+ "description": "Offset for x-position.",
+ "type": "number"
+ },
+ "y": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "enum": [
+ "height"
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "Y coordinates of the marks, or height of vertical `\"bar\"` and `\"area\"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ },
+ "y2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "enum": [
+ "width"
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "Y2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ },
+ "y2Offset": {
+ "description": "Offset for y2-position.",
+ "type": "number"
+ },
+ "yOffset": {
+ "description": "Offset for y-position.",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "Padding": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "bottom": {
+ "type": "number"
+ },
+ "left": {
+ "type": "number"
+ },
+ "right": {
+ "type": "number"
+ },
+ "top": {
+ "type": "number"
+ }
+ },
+ "type": "object"
+ }
+ ],
+ "minimum": 0
+ },
+ "Parse": {
+ "additionalProperties": {
+ "$ref": "#/definitions/ParseValue"
+ },
+ "type": "object"
+ },
+ "ParseValue": {
+ "anyOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "enum": [
+ "string"
+ ],
+ "type": "string"
+ },
+ {
+ "enum": [
+ "boolean"
+ ],
+ "type": "string"
+ },
+ {
+ "enum": [
+ "date"
+ ],
+ "type": "string"
+ },
+ {
+ "enum": [
+ "number"
+ ],
+ "type": "string"
+ }
+ ]
+ },
+ "PartsMixins<BoxPlotPart>": {
+ "additionalProperties": false,
+ "properties": {
+ "box": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/MarkConfig"
+ }
+ ]
+ },
+ "median": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/MarkConfig"
+ }
+ ]
+ },
+ "outliers": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/MarkConfig"
+ }
+ ]
+ },
+ "rule": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/MarkConfig"
+ }
+ ]
+ },
+ "ticks": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/MarkConfig"
+ }
+ ]
+ }
+ },
+ "type": "object"
+ },
+ "PartsMixins<ErrorBandPart>": {
+ "additionalProperties": false,
+ "properties": {
+ "band": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/MarkConfig"
+ }
+ ]
+ },
+ "borders": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/MarkConfig"
+ }
+ ]
+ }
+ },
+ "type": "object"
+ },
+ "PartsMixins<ErrorBarPart>": {
+ "additionalProperties": false,
+ "properties": {
+ "rule": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/MarkConfig"
+ }
+ ]
+ },
+ "ticks": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/MarkConfig"
+ }
+ ]
+ }
+ },
+ "type": "object"
+ },
+ "PositionFieldDef": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field\n(e.g., `mean`, `sum`, `median`, `min`, `max`, `count`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "axis": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Axis"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of axis's gridlines, ticks and labels.\nIf `null`, the axis for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [axis properties](https://vega.github.io/vega-lite/docs/axis.html) are applied.\n\n__See also:__ [`axis`](https://vega.github.io/vega-lite/docs/axis.html) documentation."
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "enum": [
+ "binned"
+ ],
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value\nor an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__\n1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`).\nIf field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`).\nSee more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html).\n2) `field` is not required if `aggregate` is `count`."
+ },
+ "impute": {
+ "$ref": "#/definitions/ImputeParams",
+ "description": "An object defining the properties of the Impute Operation to be applied.\nThe field value of the other positional channel is taken as `key` of the `Impute` Operation.\nThe field of the `color` channel if specified is used as `groupby` of the `Impute` Operation.\n\n__See also:__ [`impute`](https://vega.github.io/vega-lite/docs/impute.html) documentation."
+ },
+ "scale": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Scale"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation."
+ },
+ "sort": {
+ "$ref": "#/definitions/Sort",
+ "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following:\n- `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in Javascript.\n- [A sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) for sorting by another encoding channel. (This type of sort definition is not available for `row` and `column` channels.)\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`).\n- `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation."
+ },
+ "stack": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StackOffset"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "description": "Type of stacking offset if the field should be stacked.\n`stack` is only applicable for `x` and `y` channels with continuous domains.\nFor example, `stack` of `y` can be used to customize stacking for a vertical bar chart.\n\n`stack` can be one of the following values:\n- `\"zero\"` or `true`: stacking with baseline offset at zero value of the scale (for creating typical stacked [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and [area](https://vega.github.io/vega-lite/docs/stack.html#area) chart).\n- `\"normalize\"` - stacking with normalized domain (for creating [normalized stacked bar and area charts](https://vega.github.io/vega-lite/docs/stack.html#normalized). <br/>\n-`\"center\"` - stacking with center baseline (for [streamgraph](https://vega.github.io/vega-lite/docs/stack.html#streamgraph)).\n- `null` or `false` - No-stacking. This will produce layered [bar](https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart) and area chart.\n\n__Default value:__ `zero` for plots with all of the following conditions are true:\n(1) the mark is `bar` or `area`;\n(2) the stacked measure channel (x or y) has a linear scale;\n(3) At least one of non-position channels mapped to an unaggregated field that is different from x and y. Otherwise, `null` by default.\n\n__See also:__ [`stack`](https://vega.github.io/vega-lite/docs/stack.html) documentation."
+ },
+ "timeUnit": {
+ "$ref": "#/definitions/TimeUnit",
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field.\nor [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.",
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "type": {
+ "$ref": "#/definitions/StandardType",
+ "description": "The encoded field's type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`).\nIt can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\n\n__Note:__\n\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- Data `type` describes the semantics of the data rather than the primitive data types (`number`, `string`, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\", \"type\": \"quantitative\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "type": "object"
+ },
+ "Predicate": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FieldEqualPredicate"
+ },
+ {
+ "$ref": "#/definitions/FieldRangePredicate"
+ },
+ {
+ "$ref": "#/definitions/FieldOneOfPredicate"
+ },
+ {
+ "$ref": "#/definitions/FieldLTPredicate"
+ },
+ {
+ "$ref": "#/definitions/FieldGTPredicate"
+ },
+ {
+ "$ref": "#/definitions/FieldLTEPredicate"
+ },
+ {
+ "$ref": "#/definitions/FieldGTEPredicate"
+ },
+ {
+ "$ref": "#/definitions/FieldValidPredicate"
+ },
+ {
+ "$ref": "#/definitions/SelectionPredicate"
+ },
+ {
+ "type": "string"
+ }
+ ]
+ },
+ "Projection": {
+ "additionalProperties": false,
+ "properties": {
+ "center": {
+ "description": "Sets the projection’s center to the specified center, a two-element array of longitude and latitude in degrees.\n\n__Default value:__ `[0, 0]`",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "clipAngle": {
+ "description": "Sets the projection’s clipping circle radius to the specified angle in degrees. If `null`, switches to [antimeridian](http://bl.ocks.org/mbostock/3788999) cutting rather than small-circle clipping.",
+ "type": "number"
+ },
+ "clipExtent": {
+ "description": "Sets the projection’s viewport clip extent to the specified bounds in pixels. The extent bounds are specified as an array `[[x0, y0], [x1, y1]]`, where `x0` is the left-side of the viewport, `y0` is the top, `x1` is the right and `y1` is the bottom. If `null`, no viewport clipping is performed.",
+ "items": {
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "type": "array"
+ },
+ "coefficient": {
+ "type": "number"
+ },
+ "distance": {
+ "type": "number"
+ },
+ "fraction": {
+ "type": "number"
+ },
+ "lobes": {
+ "type": "number"
+ },
+ "parallel": {
+ "type": "number"
+ },
+ "precision": {
+ "description": "Sets the threshold for the projection’s [adaptive resampling](http://bl.ocks.org/mbostock/3795544) to the specified value in pixels. This value corresponds to the [Douglas–Peucker distance](http://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm). If precision is not specified, returns the projection’s current resampling precision which defaults to `√0.5 ≅ 0.70710…`.",
+ "type": "number"
+ },
+ "radius": {
+ "type": "number"
+ },
+ "ratio": {
+ "type": "number"
+ },
+ "reflectX": {
+ "type": "boolean"
+ },
+ "reflectY": {
+ "type": "boolean"
+ },
+ "rotate": {
+ "description": "Sets the projection’s three-axis rotation to the specified angles, which must be a two- or three-element array of numbers [`lambda`, `phi`, `gamma`] specifying the rotation angles in degrees about each spherical axis. (These correspond to yaw, pitch and roll.)\n\n__Default value:__ `[0, 0, 0]`",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "scale": {
+ "description": "Sets the projection's scale (zoom) value, overriding automatic fitting.",
+ "type": "number"
+ },
+ "spacing": {
+ "type": "number"
+ },
+ "tilt": {
+ "type": "number"
+ },
+ "translate": {
+ "description": "Sets the projection's translation (pan) value, overriding automatic fitting.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "type": {
+ "$ref": "#/definitions/ProjectionType",
+ "description": "The cartographic projection to use. This value is case-insensitive, for example `\"albers\"` and `\"Albers\"` indicate the same projection type. You can find all valid projection types [in the documentation](https://vega.github.io/vega-lite/docs/projection.html#projection-types).\n\n__Default value:__ `mercator`"
+ }
+ },
+ "type": "object"
+ },
+ "ProjectionConfig": {
+ "$ref": "#/definitions/Projection",
+ "description": "Any property of Projection can be in config"
+ },
+ "ProjectionType": {
+ "enum": [
+ "albers",
+ "albersUsa",
+ "azimuthalEqualArea",
+ "azimuthalEquidistant",
+ "conicConformal",
+ "conicEqualArea",
+ "conicEquidistant",
+ "equirectangular",
+ "gnomonic",
+ "identity",
+ "mercator",
+ "naturalEarth1",
+ "orthographic",
+ "stereographic",
+ "transverseMercator"
+ ],
+ "type": "string"
+ },
+ "RangeConfig": {
+ "additionalProperties": {
+ "$ref": "#/definitions/RangeConfigValue"
+ },
+ "properties": {
+ "category": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/SchemeConfig"
+ }
+ ],
+ "description": "Default range for _nominal_ (categorical) fields."
+ },
+ "diverging": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/SchemeConfig"
+ }
+ ],
+ "description": "Default range for diverging _quantitative_ fields."
+ },
+ "heatmap": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/SchemeConfig"
+ }
+ ],
+ "description": "Default range for _quantitative_ heatmaps."
+ },
+ "ordinal": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/SchemeConfig"
+ }
+ ],
+ "description": "Default range for _ordinal_ fields."
+ },
+ "ramp": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/SchemeConfig"
+ }
+ ],
+ "description": "Default range for _quantitative_ and _temporal_ fields."
+ },
+ "symbol": {
+ "description": "Default range palette for the `shape` channel.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "RangeConfigValue": {
+ "anyOf": [
+ {
+ "items": {
+ "type": [
+ "number",
+ "string"
+ ]
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/SchemeConfig"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "step": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "step"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "RectConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "align": {
+ "$ref": "#/definitions/Align",
+ "description": "The horizontal alignment of the text. One of `\"left\"`, `\"right\"`, `\"center\"`."
+ },
+ "angle": {
+ "description": "The rotation angle of the text, in degrees.",
+ "maximum": 360,
+ "minimum": 0,
+ "type": "number"
+ },
+ "baseline": {
+ "$ref": "#/definitions/TextBaseline",
+ "description": "The vertical alignment of the text. One of `\"top\"`, `\"middle\"`, `\"bottom\"`.\n\n__Default value:__ `\"middle\"`"
+ },
+ "binSpacing": {
+ "description": "Offset between bars for binned field. Ideal value for this is either 0 (Preferred by statisticians) or 1 (Vega-Lite Default, D3 example style).\n\n__Default value:__ `1`",
+ "minimum": 0,
+ "type": "number"
+ },
+ "color": {
+ "$ref": "#/definitions/Color",
+ "description": "Default color. Note that `fill` and `stroke` have higher precedence than `color` and will override `color`.\n\n__Default value:__ <span style=\"color: #4682b4;\">&#9632;</span> `\"#4682b4\"`\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config)."
+ },
+ "continuousBandSize": {
+ "description": "The default size of the bars on continuous scales.\n\n__Default value:__ `5`",
+ "minimum": 0,
+ "type": "number"
+ },
+ "cornerRadius": {
+ "description": "The radius in pixels of rounded rectangle corners.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ "cursor": {
+ "$ref": "#/definitions/Cursor",
+ "description": "The mouse cursor used over the mark. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used."
+ },
+ "dir": {
+ "$ref": "#/definitions/Dir",
+ "description": "The direction of the text. One of `\"ltr\"` (left-to-right) or `\"rtl\"` (right-to-left). This property determines on which side is truncated in response to the limit parameter.\n\n__Default value:__ `\"ltr\"`"
+ },
+ "discreteBandSize": {
+ "description": "The default size of the bars with discrete dimensions. If unspecified, the default size is `bandSize-1`,\nwhich provides 1 pixel offset between bars.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "dx": {
+ "description": "The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
+ "type": "number"
+ },
+ "dy": {
+ "description": "The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
+ "type": "number"
+ },
+ "ellipsis": {
+ "description": "The ellipsis string for text truncated in response to the limit parameter.\n\n__Default value:__ `\"…\"`",
+ "type": "string"
+ },
+ "fill": {
+ "$ref": "#/definitions/Color",
+ "description": "Default Fill Color. This has higher precedence than `config.color`\n\n__Default value:__ (None)"
+ },
+ "fillOpacity": {
+ "description": "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "filled": {
+ "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `false` for `point`, `line` and `rule`; otherwise, `true`.\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).",
+ "type": "boolean"
+ },
+ "font": {
+ "description": "The typeface to set the text in (e.g., `\"Helvetica Neue\"`).",
+ "type": "string"
+ },
+ "fontSize": {
+ "description": "The font size, in pixels.",
+ "type": "number"
+ },
+ "fontStyle": {
+ "$ref": "#/definitions/FontStyle",
+ "description": "The font style (e.g., `\"italic\"`)."
+ },
+ "fontWeight": {
+ "$ref": "#/definitions/FontWeight",
+ "description": "The font weight.\nThis can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)."
+ },
+ "height": {
+ "description": "Height of the marks.",
+ "type": "number"
+ },
+ "href": {
+ "description": "A URL to load upon mouse click. If defined, the mark acts as a hyperlink.",
+ "format": "uri",
+ "type": "string"
+ },
+ "interpolate": {
+ "$ref": "#/definitions/Interpolate",
+ "description": "The line interpolation method to use for line and area marks. One of the following:\n- `\"linear\"`: piecewise linear segments, as in a polyline.\n- `\"linear-closed\"`: close the linear segments to form a polygon.\n- `\"step\"`: alternate between horizontal and vertical segments, as in a step function.\n- `\"step-before\"`: alternate between vertical and horizontal segments, as in a step function.\n- `\"step-after\"`: alternate between horizontal and vertical segments, as in a step function.\n- `\"basis\"`: a B-spline, with control point duplication on the ends.\n- `\"basis-open\"`: an open B-spline; may not intersect the start or end.\n- `\"basis-closed\"`: a closed B-spline, as in a loop.\n- `\"cardinal\"`: a Cardinal spline, with control point duplication on the ends.\n- `\"cardinal-open\"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points.\n- `\"cardinal-closed\"`: a closed Cardinal spline, as in a loop.\n- `\"bundle\"`: equivalent to basis, except the tension parameter is used to straighten the spline.\n- `\"monotone\"`: cubic interpolation that preserves monotonicity in y."
+ },
+ "limit": {
+ "description": "The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0`, indicating no limit",
+ "type": "number"
+ },
+ "opacity": {
+ "description": "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "order": {
+ "description": "For line and trail marks, this `order` property can be set to `null` or `false` to make the lines use the original order in the data sources.",
+ "type": [
+ "null",
+ "boolean"
+ ]
+ },
+ "orient": {
+ "$ref": "#/definitions/Orientation",
+ "description": "The orientation of a non-stacked bar, tick, area, and line charts.\nThe value is either horizontal (default) or vertical.\n- For bar, rule and tick, this determines whether the size of the bar and tick\nshould be applied to x or y dimension.\n- For area, this property determines the orient property of the Vega output.\n- For line and trail marks, this property determines the sort order of the points in the line\nif `config.sortLineBy` is not specified.\nFor stacked charts, this is always determined by the orientation of the stack;\ntherefore explicitly specified value will be ignored."
+ },
+ "radius": {
+ "description": "Polar coordinate radial offset, in pixels, of the text label from the origin determined by the `x` and `y` properties.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "shape": {
+ "description": "Shape of the point marks. Supported values include:\n- plotting shapes: `\"circle\"`, `\"square\"`, `\"cross\"`, `\"diamond\"`, `\"triangle-up\"`, `\"triangle-down\"`, `\"triangle-right\"`, or `\"triangle-left\"`.\n- the line symbol `\"stroke\"`\n- centered directional shapes `\"arrow\"`, `\"wedge\"`, or `\"triangle\"`\n- a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n__Default value:__ `\"circle\"`",
+ "type": "string"
+ },
+ "size": {
+ "description": "Default size for marks.\n- For `point`/`circle`/`square`, this represents the pixel area of the marks. For example: in the case of circles, the radius is determined in part by the square root of the size value.\n- For `bar`, this represents the band size of the bar, in pixels.\n- For `text`, this represents the font size, in pixels.\n\n__Default value:__ `30` for point, circle, square marks; `rangeStep` - 1 for bar marks with discrete dimensions; `5` for bar marks with continuous dimensions; `11` for text marks.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "stroke": {
+ "$ref": "#/definitions/Color",
+ "description": "Default Stroke Color. This has higher precedence than `config.color`\n\n__Default value:__ (None)"
+ },
+ "strokeCap": {
+ "$ref": "#/definitions/StrokeCap",
+ "description": "The stroke cap for line ending style. One of `\"butt\"`, `\"round\"`, or `\"square\"`.\n\n__Default value:__ `\"square\"`"
+ },
+ "strokeDash": {
+ "description": "An array of alternating stroke, space lengths for creating dashed or dotted lines.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "strokeDashOffset": {
+ "description": "The offset (in pixels) into which to begin drawing with the stroke dash array.",
+ "type": "number"
+ },
+ "strokeJoin": {
+ "$ref": "#/definitions/StrokeJoin",
+ "description": "The stroke line join method. One of `\"miter\"`, `\"round\"` or `\"bevel\"`.\n\n__Default value:__ `\"miter\"`"
+ },
+ "strokeMiterLimit": {
+ "description": "The miter limit at which to bevel a line join.",
+ "type": "number"
+ },
+ "strokeOpacity": {
+ "description": "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "strokeWidth": {
+ "description": "The stroke width, in pixels.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "tension": {
+ "description": "Depending on the interpolation type, sets the tension parameter (for line and area marks).",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "text": {
+ "description": "Placeholder text if the `text` channel is not specified",
+ "type": "string"
+ },
+ "theta": {
+ "description": "Polar coordinate angle, in radians, of the text label from the origin determined by the `x` and `y` properties. Values for `theta` follow the same convention of `arc` mark `startAngle` and `endAngle` properties: angles are measured in radians, with `0` indicating \"north\".",
+ "type": "number"
+ },
+ "tooltip": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Value"
+ },
+ {
+ "$ref": "#/definitions/TooltipContent"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.\n\n- If `tooltip` is `{\"content\": \"encoding\"}`, then all fields from `encoding` will be used.\n- If `tooltip` is `{\"content\": \"data\"}`, then all fields that appear in the highlighted data point will be used.\n- If set to `null`, then no tooltip will be used."
+ },
+ "width": {
+ "description": "Width of the marks.",
+ "type": "number"
+ },
+ "x": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "enum": [
+ "width"
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "X coordinates of the marks, or width of horizontal `\"bar\"` and `\"area\"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "x2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "enum": [
+ "width"
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "X2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "y": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "enum": [
+ "height"
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "Y coordinates of the marks, or height of vertical `\"bar\"` and `\"area\"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ },
+ "y2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "enum": [
+ "width"
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "Y2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ }
+ },
+ "type": "object"
+ },
+ "RepeatMapping": {
+ "additionalProperties": false,
+ "properties": {
+ "column": {
+ "description": "An array of fields to be repeated horizontally.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "row": {
+ "description": "An array of fields to be repeated vertically.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "RepeatRef": {
+ "additionalProperties": false,
+ "description": "A ValueDef with optional Condition<ValueDef | FieldDef>\n{\n condition: {field: ...} | {value: ...},\n value: ...,\n} \n Reference to a repeated value.",
+ "properties": {
+ "repeat": {
+ "enum": [
+ "row",
+ "column",
+ "repeat"
+ ],
+ "type": "string"
+ }
+ },
+ "required": [
+ "repeat"
+ ],
+ "type": "object"
+ },
+ "Resolve": {
+ "additionalProperties": false,
+ "description": "Defines how scales, axes, and legends from different specs should be combined. Resolve is a mapping from `scale`, `axis`, and `legend` to a mapping from channels to resolutions.",
+ "properties": {
+ "axis": {
+ "$ref": "#/definitions/AxisResolveMap"
+ },
+ "legend": {
+ "$ref": "#/definitions/LegendResolveMap"
+ },
+ "scale": {
+ "$ref": "#/definitions/ScaleResolveMap"
+ }
+ },
+ "type": "object"
+ },
+ "ResolveMode": {
+ "enum": [
+ "independent",
+ "shared"
+ ],
+ "type": "string"
+ },
+ "RowCol<LayoutAlign>": {
+ "additionalProperties": false,
+ "properties": {
+ "column": {
+ "$ref": "#/definitions/LayoutAlign"
+ },
+ "row": {
+ "$ref": "#/definitions/LayoutAlign"
+ }
+ },
+ "type": "object"
+ },
+ "RowCol<boolean>": {
+ "additionalProperties": false,
+ "properties": {
+ "column": {
+ "type": "boolean"
+ },
+ "row": {
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ },
+ "RowCol<number>": {
+ "additionalProperties": false,
+ "properties": {
+ "column": {
+ "type": "number"
+ },
+ "row": {
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "SampleTransform": {
+ "additionalProperties": false,
+ "properties": {
+ "sample": {
+ "description": "The maximum number of data objects to include in the sample.\n\n__Default value:__ `1000`",
+ "type": "number"
+ }
+ },
+ "required": [
+ "sample"
+ ],
+ "type": "object"
+ },
+ "Scale": {
+ "additionalProperties": false,
+ "properties": {
+ "align": {
+ "description": "The alignment of the steps within the scale range.\n\nThis value must lie in the range `[0,1]`. A value of `0.5` indicates that the steps should be centered within the range. A value of `0` or `1` may be used to shift the bands to one side, say to position them adjacent to an axis.\n\n__Default value:__ `0.5`",
+ "type": "number"
+ },
+ "base": {
+ "description": "The logarithm base of the `log` scale (default `10`).",
+ "type": "number"
+ },
+ "bins": {
+ "description": "An array of bin boundaries over the scale domain. If provided, axes and legends will use the bin boundaries to inform the choice of tick marks and text labels.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "clamp": {
+ "description": "If `true`, values that exceed the data domain are clamped to either the minimum or maximum range value\n\n__Default value:__ derived from the [scale config](https://vega.github.io/vega-lite/docs/config.html#scale-config)'s `clamp` (`true` by default).",
+ "type": "boolean"
+ },
+ "constant": {
+ "description": "A constant determining the slope of the symlog function around zero. Only used for `symlog` scales.\n\n__Default value:__ `1`",
+ "type": "number"
+ },
+ "domain": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "items": {
+ "type": "boolean"
+ },
+ "type": "array"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/DateTime"
+ },
+ "type": "array"
+ },
+ {
+ "enum": [
+ "unaggregated"
+ ],
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/SelectionDomain"
+ }
+ ],
+ "description": "Customized domain values.\n\nFor _quantitative_ fields, `domain` can take the form of a two-element array with minimum and maximum values. [Piecewise scales](https://vega.github.io/vega-lite/docs/scale.html#piecewise) can be created by providing a `domain` with more than two entries.\nIf the input field is aggregated, `domain` can also be a string value `\"unaggregated\"`, indicating that the domain should include the raw data values prior to the aggregation.\n\nFor _temporal_ fields, `domain` can be a two-element array minimum and maximum values, in the form of either timestamps or the [DateTime definition objects](https://vega.github.io/vega-lite/docs/types.html#datetime).\n\nFor _ordinal_ and _nominal_ fields, `domain` can be an array that lists valid input values.\n\nThe `selection` property can be used to [interactively determine](https://vega.github.io/vega-lite/docs/selection.html#scale-domains) the scale domain."
+ },
+ "exponent": {
+ "description": "The exponent of the `pow` scale.",
+ "type": "number"
+ },
+ "interpolate": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ScaleInterpolate"
+ },
+ {
+ "$ref": "#/definitions/ScaleInterpolateParams"
+ }
+ ],
+ "description": "The interpolation method for range values. By default, a general interpolator for numbers, dates, strings and colors (in HCL space) is used. For color ranges, this property allows interpolation in alternative color spaces. Legal values include `rgb`, `hsl`, `hsl-long`, `lab`, `hcl`, `hcl-long`, `cubehelix` and `cubehelix-long` ('-long' variants use longer paths in polar coordinate spaces). If object-valued, this property accepts an object with a string-valued _type_ property and an optional numeric _gamma_ property applicable to rgb and cubehelix interpolators. For more, see the [d3-interpolate documentation](https://github.com/d3/d3-interpolate).\n\n* __Default value:__ `hcl`"
+ },
+ "nice": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/NiceTime"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "interval": {
+ "type": "string"
+ },
+ "step": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "interval",
+ "step"
+ ],
+ "type": "object"
+ }
+ ],
+ "description": "Extending the domain so that it starts and ends on nice round values. This method typically modifies the scale’s domain, and may only extend the bounds to the nearest round value. Nicing is useful if the domain is computed from data and may be irregular. For example, for a domain of _[0.201479…, 0.996679…]_, a nice domain might be _[0.2, 1.0]_.\n\nFor quantitative scales such as linear, `nice` can be either a boolean flag or a number. If `nice` is a number, it will represent a desired tick count. This allows greater control over the step size used to extend the bounds, guaranteeing that the returned ticks will exactly cover the domain.\n\nFor temporal fields with time and utc scales, the `nice` value can be a string indicating the desired time interval. Legal values are `\"millisecond\"`, `\"second\"`, `\"minute\"`, `\"hour\"`, `\"day\"`, `\"week\"`, `\"month\"`, and `\"year\"`. Alternatively, `time` and `utc` scales can accept an object-valued interval specifier of the form `{\"interval\": \"month\", \"step\": 3}`, which includes a desired number of interval steps. Here, the domain would snap to quarter (Jan, Apr, Jul, Oct) boundaries.\n\n__Default value:__ `true` for unbinned _quantitative_ fields; `false` otherwise."
+ },
+ "padding": {
+ "description": "For _[continuous](https://vega.github.io/vega-lite/docs/scale.html#continuous)_ scales, expands the scale domain to accommodate the specified number of pixels on each of the scale range. The scale range must represent pixels for this parameter to function as intended. Padding adjustment is performed prior to all other adjustments, including the effects of the `zero`, `nice`, `domainMin`, and `domainMax` properties.\n\nFor _[band](https://vega.github.io/vega-lite/docs/scale.html#band)_ scales, shortcut for setting `paddingInner` and `paddingOuter` to the same value.\n\nFor _[point](https://vega.github.io/vega-lite/docs/scale.html#point)_ scales, alias for `paddingOuter`.\n\n__Default value:__ For _continuous_ scales, derived from the [scale config](https://vega.github.io/vega-lite/docs/scale.html#config)'s `continuousPadding`.\nFor _band and point_ scales, see `paddingInner` and `paddingOuter`. By default, Vega-Lite sets padding such that _width/height = number of unique values * step_.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "paddingInner": {
+ "description": "The inner padding (spacing) within each band step of band scales, as a fraction of the step size. This value must lie in the range [0,1].\n\nFor point scale, this property is invalid as point scales do not have internal band widths (only step sizes between bands).\n\n__Default value:__ derived from the [scale config](https://vega.github.io/vega-lite/docs/scale.html#config)'s `bandPaddingInner`.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "paddingOuter": {
+ "description": "The outer padding (spacing) at the ends of the range of band and point scales,\nas a fraction of the step size. This value must lie in the range [0,1].\n\n__Default value:__ derived from the [scale config](https://vega.github.io/vega-lite/docs/scale.html#config)'s `bandPaddingOuter` for band scales and `pointPadding` for point scales.\nBy default, Vega-Lite sets outer padding such that _width/height = number of unique values * step_.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "range": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "string"
+ }
+ ],
+ "description": "The range of the scale. One of:\n\n- A string indicating a [pre-defined named scale range](https://vega.github.io/vega-lite/docs/scale.html#range-config) (e.g., example, `\"symbol\"`, or `\"diverging\"`).\n\n- For [continuous scales](https://vega.github.io/vega-lite/docs/scale.html#continuous), two-element array indicating minimum and maximum values, or an array with more than two entries for specifying a [piecewise scale](https://vega.github.io/vega-lite/docs/scale.html#piecewise).\n\n- For [discrete](https://vega.github.io/vega-lite/docs/scale.html#discrete) and [discretizing](https://vega.github.io/vega-lite/docs/scale.html#discretizing) scales, an array of desired output values.\n\n__Notes:__\n\n1) For color scales you can also specify a color [`scheme`](https://vega.github.io/vega-lite/docs/scale.html#scheme) instead of `range`.\n\n2) Any directly specified `range` for `x` and `y` channels will be ignored. Range can be customized via the view's corresponding [size](https://vega.github.io/vega-lite/docs/size.html) (`width` and `height`) or via [range steps and paddings properties](#range-step) for [band](#band) and [point](#point) scales."
+ },
+ "rangeStep": {
+ "description": "The distance between the starts of adjacent bands or points in [band](https://vega.github.io/vega-lite/docs/scale.html#band) and [point](https://vega.github.io/vega-lite/docs/scale.html#point) scales.\n\nIf `rangeStep` is `null` or if the view contains the scale's corresponding [size](https://vega.github.io/vega-lite/docs/size.html) (`width` for `x` scales and `height` for `y` scales), `rangeStep` will be automatically determined to fit the size of the view.\n\n__Default value:__ derived the [scale config](https://vega.github.io/vega-lite/docs/config.html#scale-config)'s `textXRangeStep` (`90` by default) for x-scales of `text` marks and `rangeStep` (`21` by default) for x-scales of other marks and y-scales.\n\n__Warning__: If `rangeStep` is `null` and the cardinality of the scale's domain is higher than `width` or `height`, the rangeStep might become less than one pixel and the mark might not appear correctly.",
+ "minimum": 0,
+ "type": [
+ "number",
+ "null"
+ ]
+ },
+ "round": {
+ "description": "If `true`, rounds numeric output values to integers. This can be helpful for snapping to the pixel grid.\n\n__Default value:__ `false`.",
+ "type": "boolean"
+ },
+ "scheme": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/SchemeParams"
+ }
+ ],
+ "description": "A string indicating a color [scheme](https://vega.github.io/vega-lite/docs/scale.html#scheme) name (e.g., `\"category10\"` or `\"blues\"`) or a [scheme parameter object](https://vega.github.io/vega-lite/docs/scale.html#scheme-params).\n\nDiscrete color schemes may be used with [discrete](https://vega.github.io/vega-lite/docs/scale.html#discrete) or [discretizing](https://vega.github.io/vega-lite/docs/scale.html#discretizing) scales. Continuous color schemes are intended for use with color scales.\n\nFor the full list of supported schemes, please refer to the [Vega Scheme](https://vega.github.io/vega/docs/schemes/#reference) reference."
+ },
+ "type": {
+ "$ref": "#/definitions/ScaleType",
+ "description": "The type of scale. Vega-Lite supports the following categories of scale types:\n\n1) [**Continuous Scales**](https://vega.github.io/vega-lite/docs/scale.html#continuous) -- mapping continuous domains to continuous output ranges ([`\"linear\"`](https://vega.github.io/vega-lite/docs/scale.html#linear), [`\"pow\"`](https://vega.github.io/vega-lite/docs/scale.html#pow), [`\"sqrt\"`](https://vega.github.io/vega-lite/docs/scale.html#sqrt), [`\"symlog\"`](https://vega.github.io/vega-lite/docs/scale.html#symlog), [`\"log\"`](https://vega.github.io/vega-lite/docs/scale.html#log), [`\"time\"`](https://vega.github.io/vega-lite/docs/scale.html#time), [`\"utc\"`](https://vega.github.io/vega-lite/docs/scale.html#utc).\n\n2) [**Discrete Scales**](https://vega.github.io/vega-lite/docs/scale.html#discrete) -- mapping discrete domains to discrete ([`\"ordinal\"`](https://vega.github.io/vega-lite/docs/scale.html#ordinal)) or continuous ([`\"band\"`](https://vega.github.io/vega-lite/docs/scale.html#band) and [`\"point\"`](https://vega.github.io/vega-lite/docs/scale.html#point)) output ranges.\n\n3) [**Discretizing Scales**](https://vega.github.io/vega-lite/docs/scale.html#discretizing) -- mapping continuous domains to discrete output ranges [`\"bin-ordinal\"`](https://vega.github.io/vega-lite/docs/scale.html#bin-ordinal), [`\"quantile\"`](https://vega.github.io/vega-lite/docs/scale.html#quantile), [`\"quantize\"`](https://vega.github.io/vega-lite/docs/scale.html#quantize) and [`\"threshold\"`](https://vega.github.io/vega-lite/docs/scale.html#threshold).\n\n__Default value:__ please see the [scale type table](https://vega.github.io/vega-lite/docs/scale.html#type)."
+ },
+ "zero": {
+ "description": "If `true`, ensures that a zero baseline value is included in the scale domain.\n\n__Default value:__ `true` for x and y channels if the quantitative field is not binned and no custom `domain` is provided; `false` otherwise.\n\n__Note:__ Log, time, and utc scales do not support `zero`.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ },
+ "ScaleConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "bandPaddingInner": {
+ "description": "Default inner padding for `x` and `y` band-ordinal scales.\n\n__Default value:__\n- `barBandPaddingInner` for bar marks (`0.1` by default)\n- `rectBandPaddingInner` for rect and other marks (`0` by default)",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bandPaddingOuter": {
+ "description": "Default outer padding for `x` and `y` band-ordinal scales.\n\n__Default value:__ `paddingInner/2` (which makes _width/height = number of unique values * step_)",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "barBandPaddingInner": {
+ "description": "Default inner padding for `x` and `y` band-ordinal scales of `\"bar\"` marks.\n\n__Default value:__ `0.1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "barBandPaddingOuter": {
+ "description": "Default outer padding for `x` and `y` band-ordinal scales of `\"bar\"` marks.\nIf not specified, by default, band scale's paddingOuter is paddingInner/2.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "clamp": {
+ "description": "If true, values that exceed the data domain are clamped to either the minimum or maximum range value",
+ "type": "boolean"
+ },
+ "continuousPadding": {
+ "description": "Default padding for continuous scales.\n\n__Default:__ `5` for continuous x-scale of a vertical bar and continuous y-scale of a horizontal bar.; `0` otherwise.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "maxBandSize": {
+ "description": "The default max value for mapping quantitative fields to bar's size/bandSize.\n\nIf undefined (default), we will use the scale's `rangeStep` - 1.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "maxFontSize": {
+ "description": "The default max value for mapping quantitative fields to text's size/fontSize.\n\n__Default value:__ `40`",
+ "minimum": 0,
+ "type": "number"
+ },
+ "maxOpacity": {
+ "description": "Default max opacity for mapping a field to opacity.\n\n__Default value:__ `0.8`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "maxSize": {
+ "description": "Default max value for point size scale.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "maxStrokeWidth": {
+ "description": "Default max strokeWidth for the scale of strokeWidth for rule and line marks and of size for trail marks.\n\n__Default value:__ `4`",
+ "minimum": 0,
+ "type": "number"
+ },
+ "minBandSize": {
+ "description": "The default min value for mapping quantitative fields to bar and tick's size/bandSize scale with zero=false.\n\n__Default value:__ `2`",
+ "minimum": 0,
+ "type": "number"
+ },
+ "minFontSize": {
+ "description": "The default min value for mapping quantitative fields to tick's size/fontSize scale with zero=false\n\n__Default value:__ `8`",
+ "minimum": 0,
+ "type": "number"
+ },
+ "minOpacity": {
+ "description": "Default minimum opacity for mapping a field to opacity.\n\n__Default value:__ `0.3`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "minSize": {
+ "description": "Default minimum value for point size scale with zero=false.\n\n__Default value:__ `9`",
+ "minimum": 0,
+ "type": "number"
+ },
+ "minStrokeWidth": {
+ "description": "Default minimum strokeWidth for the scale of strokeWidth for rule and line marks and of size for trail marks with zero=false.\n\n__Default value:__ `1`",
+ "minimum": 0,
+ "type": "number"
+ },
+ "pointPadding": {
+ "description": "Default outer padding for `x` and `y` point-ordinal scales.\n\n__Default value:__ `0.5` (which makes _width/height = number of unique values * step_)",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "quantileCount": {
+ "description": "Default range cardinality for [`quantile`](https://vega.github.io/vega-lite/docs/scale.html#quantile) scale.\n\n__Default value:__ `4`",
+ "minimum": 0,
+ "type": "number"
+ },
+ "quantizeCount": {
+ "description": "Default range cardinality for [`quantize`](https://vega.github.io/vega-lite/docs/scale.html#quantize) scale.\n\n__Default value:__ `4`",
+ "minimum": 0,
+ "type": "number"
+ },
+ "rangeStep": {
+ "description": "Default range step for band and point scales of (1) the `y` channel\nand (2) the `x` channel when the mark is not `text`.\n\n__Default value:__ `20`",
+ "minimum": 0,
+ "type": [
+ "number",
+ "null"
+ ]
+ },
+ "rectBandPaddingInner": {
+ "description": "Default inner padding for `x` and `y` band-ordinal scales of `\"rect\"` marks.\n\n__Default value:__ `0`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "rectBandPaddingOuter": {
+ "description": "Default outer padding for `x` and `y` band-ordinal scales of `\"rect\"` marks.\nIf not specified, by default, band scale's paddingOuter is paddingInner/2.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "round": {
+ "description": "If true, rounds numeric output values to integers.\nThis can be helpful for snapping to the pixel grid.\n(Only available for `x`, `y`, and `size` scales.)",
+ "type": "boolean"
+ },
+ "textXRangeStep": {
+ "description": "Default range step for `x` band and point scales of text marks.\n\n__Default value:__ `90`",
+ "minimum": 0,
+ "type": "number"
+ },
+ "useUnaggregatedDomain": {
+ "description": "Use the source data range before aggregation as scale domain instead of aggregated data for aggregate axis.\n\nThis is equivalent to setting `domain` to `\"unaggregate\"` for aggregated _quantitative_ fields by default.\n\nThis property only works with aggregate functions that produce values within the raw data domain (`\"mean\"`, `\"average\"`, `\"median\"`, `\"q1\"`, `\"q3\"`, `\"min\"`, `\"max\"`). For other aggregations that produce values outside of the raw data domain (e.g. `\"count\"`, `\"sum\"`), this property is ignored.\n\n__Default value:__ `false`",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ },
+ "ScaleInterpolate": {
+ "enum": [
+ "rgb",
+ "lab",
+ "hcl",
+ "hsl",
+ "hsl-long",
+ "hcl-long",
+ "cubehelix",
+ "cubehelix-long"
+ ],
+ "type": "string"
+ },
+ "ScaleInterpolateParams": {
+ "additionalProperties": false,
+ "properties": {
+ "gamma": {
+ "type": "number"
+ },
+ "type": {
+ "enum": [
+ "rgb",
+ "cubehelix",
+ "cubehelix-long"
+ ],
+ "type": "string"
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "type": "object"
+ },
+ "ScaleResolveMap": {
+ "additionalProperties": false,
+ "properties": {
+ "color": {
+ "$ref": "#/definitions/ResolveMode"
+ },
+ "fill": {
+ "$ref": "#/definitions/ResolveMode"
+ },
+ "fillOpacity": {
+ "$ref": "#/definitions/ResolveMode"
+ },
+ "opacity": {
+ "$ref": "#/definitions/ResolveMode"
+ },
+ "shape": {
+ "$ref": "#/definitions/ResolveMode"
+ },
+ "size": {
+ "$ref": "#/definitions/ResolveMode"
+ },
+ "stroke": {
+ "$ref": "#/definitions/ResolveMode"
+ },
+ "strokeOpacity": {
+ "$ref": "#/definitions/ResolveMode"
+ },
+ "strokeWidth": {
+ "$ref": "#/definitions/ResolveMode"
+ },
+ "x": {
+ "$ref": "#/definitions/ResolveMode"
+ },
+ "y": {
+ "$ref": "#/definitions/ResolveMode"
+ }
+ },
+ "type": "object"
+ },
+ "ScaleType": {
+ "enum": [
+ "linear",
+ "log",
+ "pow",
+ "sqrt",
+ "symlog",
+ "time",
+ "utc",
+ "quantile",
+ "quantize",
+ "threshold",
+ "bin-ordinal",
+ "ordinal",
+ "point",
+ "band"
+ ],
+ "type": "string"
+ },
+ "SchemeConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "count": {
+ "type": "number"
+ },
+ "extent": {
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "scheme": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "scheme"
+ ],
+ "type": "object"
+ },
+ "SchemeParams": {
+ "additionalProperties": false,
+ "properties": {
+ "count": {
+ "description": "The number of colors to use in the scheme. This can be useful for scale types such as `\"quantize\"`, which use the length of the scale range to determine the number of discrete bins for the scale domain.",
+ "type": "number"
+ },
+ "extent": {
+ "description": "The extent of the color range to use. For example `[0.2, 1]` will rescale the color scheme such that color values in the range _[0, 0.2)_ are excluded from the scheme.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "name": {
+ "description": "A color scheme name for ordinal scales (e.g., `\"category10\"` or `\"blues\"`).\n\nFor the full list of supported schemes, please refer to the [Vega Scheme](https://vega.github.io/vega/docs/schemes/#reference) reference.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "type": "object"
+ },
+ "SecondaryFieldDef": {
+ "additionalProperties": false,
+ "description": "A field definition of a secondary channel that shares a scale with another primary channel. For example, `x2`, `xError` and `xError2` share the same scale with `x`.",
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field\n(e.g., `mean`, `sum`, `median`, `min`, `max`, `count`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "bin": {
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.",
+ "type": "null"
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value\nor an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__\n1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`).\nIf field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`).\nSee more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html).\n2) `field` is not required if `aggregate` is `count`."
+ },
+ "timeUnit": {
+ "$ref": "#/definitions/TimeUnit",
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field.\nor [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.",
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "type": "object"
+ },
+ "SelectionConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "interval": {
+ "$ref": "#/definitions/IntervalSelectionConfig",
+ "description": "The default definition for an [`interval`](https://vega.github.io/vega-lite/docs/selection.html#type) selection. All properties and transformations\nfor an interval selection definition (except `type`) may be specified here.\n\nFor instance, setting `interval` to `{\"translate\": false}` disables the ability to move\ninterval selections by default."
+ },
+ "multi": {
+ "$ref": "#/definitions/MultiSelectionConfig",
+ "description": "The default definition for a [`multi`](https://vega.github.io/vega-lite/docs/selection.html#type) selection. All properties and transformations\nfor a multi selection definition (except `type`) may be specified here.\n\nFor instance, setting `multi` to `{\"toggle\": \"event.altKey\"}` adds additional values to\nmulti selections when clicking with the alt-key pressed by default."
+ },
+ "single": {
+ "$ref": "#/definitions/SingleSelectionConfig",
+ "description": "The default definition for a [`single`](https://vega.github.io/vega-lite/docs/selection.html#type) selection. All properties and transformations\n for a single selection definition (except `type`) may be specified here.\n\nFor instance, setting `single` to `{\"on\": \"dblclick\"}` populates single selections on double-click by default."
+ }
+ },
+ "type": "object"
+ },
+ "SelectionDef": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SingleSelection"
+ },
+ {
+ "$ref": "#/definitions/MultiSelection"
+ },
+ {
+ "$ref": "#/definitions/IntervalSelection"
+ }
+ ]
+ },
+ "SelectionDomain": {
+ "anyOf": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "field": {
+ "$ref": "#/definitions/FieldName",
+ "description": "The field name to extract selected values for, when a selection is [projected](https://vega.github.io/vega-lite/docs/project.html)\nover multiple fields or encodings."
+ },
+ "selection": {
+ "description": "The name of a selection.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "selection"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "encoding": {
+ "description": "The encoding channel to extract selected values for, when a selection is [projected](https://vega.github.io/vega-lite/docs/project.html)\nover multiple fields or encodings.",
+ "type": "string"
+ },
+ "selection": {
+ "description": "The name of a selection.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "selection"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "SelectionInit": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ }
+ ]
+ },
+ "SelectionInitInterval": {
+ "anyOf": [
+ {
+ "items": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2,
+ "type": "array"
+ },
+ {
+ "items": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "number"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2,
+ "type": "array"
+ },
+ {
+ "items": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "string"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2,
+ "type": "array"
+ },
+ {
+ "items": [
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2,
+ "type": "array"
+ }
+ ]
+ },
+ "SelectionInitIntervalMapping": {
+ "additionalProperties": {
+ "$ref": "#/definitions/SelectionInitInterval"
+ },
+ "type": "object"
+ },
+ "SelectionInitMapping": {
+ "additionalProperties": {
+ "$ref": "#/definitions/SelectionInit"
+ },
+ "type": "object"
+ },
+ "SelectionPredicate": {
+ "additionalProperties": false,
+ "properties": {
+ "selection": {
+ "$ref": "#/definitions/SelectionOperand",
+ "description": "Filter using a selection name."
+ }
+ },
+ "required": [
+ "selection"
+ ],
+ "type": "object"
+ },
+ "SelectionResolution": {
+ "enum": [
+ "global",
+ "union",
+ "intersect"
+ ],
+ "type": "string"
+ },
+ "SequenceGenerator": {
+ "additionalProperties": false,
+ "properties": {
+ "name": {
+ "description": "Provide a placeholder name and bind data at runtime.",
+ "type": "string"
+ },
+ "sequence": {
+ "$ref": "#/definitions/SequenceParams",
+ "description": "Generate a sequence of numbers."
+ }
+ },
+ "required": [
+ "sequence"
+ ],
+ "type": "object"
+ },
+ "SequenceParams": {
+ "additionalProperties": false,
+ "properties": {
+ "as": {
+ "$ref": "#/definitions/FieldName",
+ "description": "The name of the generated sequence field.\n\n__Default value:__ `\"data\"`"
+ },
+ "start": {
+ "description": "The starting value of the sequence (inclusive).",
+ "type": "number"
+ },
+ "step": {
+ "description": "The step value between sequence entries.\n\n__Default value:__ `1`",
+ "type": "number"
+ },
+ "stop": {
+ "description": "The ending value of the sequence (exclusive).",
+ "type": "number"
+ }
+ },
+ "required": [
+ "start",
+ "stop"
+ ],
+ "type": "object"
+ },
+ "ShapeFieldDefWithCondition": {
+ "$ref": "#/definitions/StringFieldDefWithCondition<TypeForShape>"
+ },
+ "ShapeValueDefWithCondition": {
+ "$ref": "#/definitions/StringValueDefWithCondition<TypeForShape>"
+ },
+ "SignalRef": {
+ "additionalProperties": false,
+ "properties": {
+ "signal": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "signal"
+ ],
+ "type": "object"
+ },
+ "SingleDefUnitChannel": {
+ "enum": [
+ "x",
+ "y",
+ "x2",
+ "y2",
+ "longitude",
+ "latitude",
+ "longitude2",
+ "latitude2",
+ "color",
+ "fill",
+ "stroke",
+ "opacity",
+ "fillOpacity",
+ "strokeOpacity",
+ "strokeWidth",
+ "size",
+ "shape",
+ "key",
+ "text",
+ "tooltip",
+ "href"
+ ],
+ "type": "string"
+ },
+ "SingleSelection": {
+ "additionalProperties": false,
+ "properties": {
+ "bind": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Binding"
+ },
+ {
+ "additionalProperties": {
+ "$ref": "#/definitions/Binding"
+ },
+ "type": "object"
+ }
+ ],
+ "description": "Establish a two-way binding between a single selection and input elements\n(also known as dynamic query widgets). A binding takes the form of\nVega's [input element binding definition](https://vega.github.io/vega/docs/signals/#bind)\nor can be a mapping between projected field/encodings and binding definitions.\n\n__See also:__ [`bind`](https://vega.github.io/vega-lite/docs/bind.html) documentation."
+ },
+ "clear": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/EventStream"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "description": "Clears the selection, emptying it of all values. Can be an\n[EventStream](https://vega.github.io/vega/docs/event-streams/) or `false` to disable.\n\n__Default value:__ `dblclick`.\n\n__See also:__ [`clear`](https://vega.github.io/vega-lite/docs/clear.html) documentation."
+ },
+ "empty": {
+ "description": "By default, `all` data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.",
+ "enum": [
+ "all",
+ "none"
+ ],
+ "type": "string"
+ },
+ "encodings": {
+ "description": "An array of encoding channels. The corresponding data field values\nmust match for a data tuple to fall within the selection.\n\n__See also:__ [`encodings`](https://vega.github.io/vega-lite/docs/project.html) documentation.",
+ "items": {
+ "$ref": "#/definitions/SingleDefUnitChannel"
+ },
+ "type": "array"
+ },
+ "fields": {
+ "description": "An array of field names whose values must match for a data tuple to\nfall within the selection.\n\n__See also:__ [`fields`](https://vega.github.io/vega-lite/docs/project.html) documentation.",
+ "items": {
+ "$ref": "#/definitions/FieldName"
+ },
+ "type": "array"
+ },
+ "init": {
+ "$ref": "#/definitions/SelectionInitMapping",
+ "description": "Initialize the selection with a mapping between [projected channels or field names](https://vega.github.io/vega-lite/docs/project.html) and initial values.\n\n__See also:__ [`init`](https://vega.github.io/vega-lite/docs/init.html) documentation."
+ },
+ "nearest": {
+ "description": "When true, an invisible voronoi diagram is computed to accelerate discrete\nselection. The data value _nearest_ the mouse cursor is added to the selection.\n\n__See also:__ [`nearest`](https://vega.github.io/vega-lite/docs/nearest.html) documentation.",
+ "type": "boolean"
+ },
+ "on": {
+ "$ref": "#/definitions/EventStream",
+ "description": "A [Vega event stream](https://vega.github.io/vega/docs/event-streams/) (object or selector) that triggers the selection.\nFor interval selections, the event stream must specify a [start and end](https://vega.github.io/vega/docs/event-streams/#between-filters)."
+ },
+ "resolve": {
+ "$ref": "#/definitions/SelectionResolution",
+ "description": "With layered and multi-view displays, a strategy that determines how\nselections' data queries are resolved when applied in a filter transform,\nconditional encoding rule, or scale domain.\n\n__See also:__ [`resolve`](https://vega.github.io/vega-lite/docs/selection-resolve.html) documentation."
+ },
+ "type": {
+ "description": "Determines the default event processing and data query for the selection. Vega-Lite currently supports three selection types:\n\n- `single` -- to select a single discrete data value on `click`.\n- `multi` -- to select multiple discrete data value; the first value is selected on `click` and additional values toggled on shift-`click`.\n- `interval` -- to select a continuous range of data values on `drag`.",
+ "enum": [
+ "single"
+ ],
+ "type": "string"
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "type": "object"
+ },
+ "SingleSelectionConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "bind": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Binding"
+ },
+ {
+ "additionalProperties": {
+ "$ref": "#/definitions/Binding"
+ },
+ "type": "object"
+ }
+ ],
+ "description": "Establish a two-way binding between a single selection and input elements\n(also known as dynamic query widgets). A binding takes the form of\nVega's [input element binding definition](https://vega.github.io/vega/docs/signals/#bind)\nor can be a mapping between projected field/encodings and binding definitions.\n\n__See also:__ [`bind`](https://vega.github.io/vega-lite/docs/bind.html) documentation."
+ },
+ "clear": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/EventStream"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "description": "Clears the selection, emptying it of all values. Can be an\n[EventStream](https://vega.github.io/vega/docs/event-streams/) or `false` to disable.\n\n__Default value:__ `dblclick`.\n\n__See also:__ [`clear`](https://vega.github.io/vega-lite/docs/clear.html) documentation."
+ },
+ "empty": {
+ "description": "By default, `all` data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.",
+ "enum": [
+ "all",
+ "none"
+ ],
+ "type": "string"
+ },
+ "encodings": {
+ "description": "An array of encoding channels. The corresponding data field values\nmust match for a data tuple to fall within the selection.\n\n__See also:__ [`encodings`](https://vega.github.io/vega-lite/docs/project.html) documentation.",
+ "items": {
+ "$ref": "#/definitions/SingleDefUnitChannel"
+ },
+ "type": "array"
+ },
+ "fields": {
+ "description": "An array of field names whose values must match for a data tuple to\nfall within the selection.\n\n__See also:__ [`fields`](https://vega.github.io/vega-lite/docs/project.html) documentation.",
+ "items": {
+ "$ref": "#/definitions/FieldName"
+ },
+ "type": "array"
+ },
+ "init": {
+ "$ref": "#/definitions/SelectionInitMapping",
+ "description": "Initialize the selection with a mapping between [projected channels or field names](https://vega.github.io/vega-lite/docs/project.html) and initial values.\n\n__See also:__ [`init`](https://vega.github.io/vega-lite/docs/init.html) documentation."
+ },
+ "nearest": {
+ "description": "When true, an invisible voronoi diagram is computed to accelerate discrete\nselection. The data value _nearest_ the mouse cursor is added to the selection.\n\n__See also:__ [`nearest`](https://vega.github.io/vega-lite/docs/nearest.html) documentation.",
+ "type": "boolean"
+ },
+ "on": {
+ "$ref": "#/definitions/EventStream",
+ "description": "A [Vega event stream](https://vega.github.io/vega/docs/event-streams/) (object or selector) that triggers the selection.\nFor interval selections, the event stream must specify a [start and end](https://vega.github.io/vega/docs/event-streams/#between-filters)."
+ },
+ "resolve": {
+ "$ref": "#/definitions/SelectionResolution",
+ "description": "With layered and multi-view displays, a strategy that determines how\nselections' data queries are resolved when applied in a filter transform,\nconditional encoding rule, or scale domain.\n\n__See also:__ [`resolve`](https://vega.github.io/vega-lite/docs/selection-resolve.html) documentation."
+ }
+ },
+ "type": "object"
+ },
+ "SingleTimeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LocalSingleTimeUnit"
+ },
+ {
+ "$ref": "#/definitions/UtcSingleTimeUnit"
+ }
+ ]
+ },
+ "Sort": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SortArray"
+ },
+ {
+ "$ref": "#/definitions/SortOrder"
+ },
+ {
+ "$ref": "#/definitions/EncodingSortField"
+ },
+ {
+ "$ref": "#/definitions/SortByEncoding"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "SortArray": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "items": {
+ "type": "boolean"
+ },
+ "type": "array"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/DateTime"
+ },
+ "type": "array"
+ }
+ ]
+ },
+ "SortByEncoding": {
+ "additionalProperties": false,
+ "properties": {
+ "encoding": {
+ "$ref": "#/definitions/SingleDefUnitChannel",
+ "description": "The [encoding channel](https://vega.github.io/vega-lite/docs/encoding.html#channels) to sort by (e.g., `\"x\"`, `\"y\"`)"
+ },
+ "order": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SortOrder"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The sort order. One of `\"ascending\"` (default), `\"descending\"`, or `null` (no not sort)."
+ }
+ },
+ "required": [
+ "encoding"
+ ],
+ "type": "object"
+ },
+ "SortField": {
+ "additionalProperties": false,
+ "description": "A sort definition for transform",
+ "properties": {
+ "field": {
+ "$ref": "#/definitions/FieldName",
+ "description": "The name of the field to sort."
+ },
+ "order": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SortOrder"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Whether to sort the field in ascending or descending order. One of `\"ascending\"` (default), `\"descending\"`, or `null` (no not sort)."
+ }
+ },
+ "required": [
+ "field"
+ ],
+ "type": "object"
+ },
+ "SortOrder": {
+ "enum": [
+ "ascending",
+ "descending"
+ ],
+ "type": "string"
+ },
+ "SphereGenerator": {
+ "additionalProperties": false,
+ "properties": {
+ "name": {
+ "description": "Provide a placeholder name and bind data at runtime.",
+ "type": "string"
+ },
+ "sphere": {
+ "anyOf": [
+ {
+ "enum": [
+ true
+ ],
+ "type": "boolean"
+ },
+ {
+ "additionalProperties": false,
+ "type": "object"
+ }
+ ],
+ "description": "Generate sphere GeoJSON data for the full globe."
+ }
+ },
+ "required": [
+ "sphere"
+ ],
+ "type": "object"
+ },
+ "StackOffset": {
+ "enum": [
+ "zero",
+ "center",
+ "normalize"
+ ],
+ "type": "string"
+ },
+ "StackTransform": {
+ "additionalProperties": false,
+ "properties": {
+ "as": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FieldName"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/FieldName"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "Output field names. This can be either a string or an array of strings with\ntwo elements denoting the name for the fields for stack start and stack end\nrespectively.\nIf a single string(eg.\"val\") is provided, the end field will be \"val_end\"."
+ },
+ "groupby": {
+ "description": "The data fields to group by.",
+ "items": {
+ "$ref": "#/definitions/FieldName"
+ },
+ "type": "array"
+ },
+ "offset": {
+ "description": "Mode for stacking marks.\n__Default value:__ `\"zero\"`",
+ "enum": [
+ "zero",
+ "center",
+ "normalize"
+ ],
+ "type": "string"
+ },
+ "sort": {
+ "description": "Field that determines the order of leaves in the stacked charts.",
+ "items": {
+ "$ref": "#/definitions/SortField"
+ },
+ "type": "array"
+ },
+ "stack": {
+ "$ref": "#/definitions/FieldName",
+ "description": "The field which is stacked."
+ }
+ },
+ "required": [
+ "stack",
+ "groupby",
+ "as"
+ ],
+ "type": "object"
+ },
+ "StandardType": {
+ "enum": [
+ "quantitative",
+ "ordinal",
+ "temporal",
+ "nominal"
+ ],
+ "type": "string"
+ },
+ "StringFieldDefWithCondition<TypeForShape>": {
+ "$ref": "#/definitions/FieldDefWithCondition<MarkPropFieldDef<TypeForShape>,(string|null)>"
+ },
+ "StringFieldDefWithCondition": {
+ "$ref": "#/definitions/FieldDefWithCondition<MarkPropFieldDef,(string|null)>"
+ },
+ "StringValueDefWithCondition<TypeForShape>": {
+ "$ref": "#/definitions/ValueDefWithCondition<MarkPropFieldDef<TypeForShape>,(string|null)>"
+ },
+ "StringValueDefWithCondition": {
+ "$ref": "#/definitions/ValueDefWithCondition<MarkPropFieldDef,(string|null)>"
+ },
+ "StrokeCap": {
+ "enum": [
+ "butt",
+ "round",
+ "square"
+ ],
+ "type": "string"
+ },
+ "StrokeJoin": {
+ "enum": [
+ "miter",
+ "round",
+ "bevel"
+ ],
+ "type": "string"
+ },
+ "StyleConfigIndex": {
+ "additionalProperties": {
+ "$ref": "#/definitions/BaseMarkConfig"
+ },
+ "type": "object"
+ },
+ "SymbolShape": {
+ "type": "string"
+ },
+ "TextBaseline": {
+ "anyOf": [
+ {
+ "enum": [
+ "alphabetic"
+ ],
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/Baseline"
+ }
+ ]
+ },
+ "TextConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "align": {
+ "$ref": "#/definitions/Align",
+ "description": "The horizontal alignment of the text. One of `\"left\"`, `\"right\"`, `\"center\"`."
+ },
+ "angle": {
+ "description": "The rotation angle of the text, in degrees.",
+ "maximum": 360,
+ "minimum": 0,
+ "type": "number"
+ },
+ "baseline": {
+ "$ref": "#/definitions/TextBaseline",
+ "description": "The vertical alignment of the text. One of `\"top\"`, `\"middle\"`, `\"bottom\"`.\n\n__Default value:__ `\"middle\"`"
+ },
+ "color": {
+ "$ref": "#/definitions/Color",
+ "description": "Default color. Note that `fill` and `stroke` have higher precedence than `color` and will override `color`.\n\n__Default value:__ <span style=\"color: #4682b4;\">&#9632;</span> `\"#4682b4\"`\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config)."
+ },
+ "cornerRadius": {
+ "description": "The radius in pixels of rounded rectangle corners.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ "cursor": {
+ "$ref": "#/definitions/Cursor",
+ "description": "The mouse cursor used over the mark. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used."
+ },
+ "dir": {
+ "$ref": "#/definitions/Dir",
+ "description": "The direction of the text. One of `\"ltr\"` (left-to-right) or `\"rtl\"` (right-to-left). This property determines on which side is truncated in response to the limit parameter.\n\n__Default value:__ `\"ltr\"`"
+ },
+ "dx": {
+ "description": "The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
+ "type": "number"
+ },
+ "dy": {
+ "description": "The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
+ "type": "number"
+ },
+ "ellipsis": {
+ "description": "The ellipsis string for text truncated in response to the limit parameter.\n\n__Default value:__ `\"…\"`",
+ "type": "string"
+ },
+ "fill": {
+ "$ref": "#/definitions/Color",
+ "description": "Default Fill Color. This has higher precedence than `config.color`\n\n__Default value:__ (None)"
+ },
+ "fillOpacity": {
+ "description": "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "filled": {
+ "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `false` for `point`, `line` and `rule`; otherwise, `true`.\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).",
+ "type": "boolean"
+ },
+ "font": {
+ "description": "The typeface to set the text in (e.g., `\"Helvetica Neue\"`).",
+ "type": "string"
+ },
+ "fontSize": {
+ "description": "The font size, in pixels.",
+ "type": "number"
+ },
+ "fontStyle": {
+ "$ref": "#/definitions/FontStyle",
+ "description": "The font style (e.g., `\"italic\"`)."
+ },
+ "fontWeight": {
+ "$ref": "#/definitions/FontWeight",
+ "description": "The font weight.\nThis can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)."
+ },
+ "height": {
+ "description": "Height of the marks.",
+ "type": "number"
+ },
+ "href": {
+ "description": "A URL to load upon mouse click. If defined, the mark acts as a hyperlink.",
+ "format": "uri",
+ "type": "string"
+ },
+ "interpolate": {
+ "$ref": "#/definitions/Interpolate",
+ "description": "The line interpolation method to use for line and area marks. One of the following:\n- `\"linear\"`: piecewise linear segments, as in a polyline.\n- `\"linear-closed\"`: close the linear segments to form a polygon.\n- `\"step\"`: alternate between horizontal and vertical segments, as in a step function.\n- `\"step-before\"`: alternate between vertical and horizontal segments, as in a step function.\n- `\"step-after\"`: alternate between horizontal and vertical segments, as in a step function.\n- `\"basis\"`: a B-spline, with control point duplication on the ends.\n- `\"basis-open\"`: an open B-spline; may not intersect the start or end.\n- `\"basis-closed\"`: a closed B-spline, as in a loop.\n- `\"cardinal\"`: a Cardinal spline, with control point duplication on the ends.\n- `\"cardinal-open\"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points.\n- `\"cardinal-closed\"`: a closed Cardinal spline, as in a loop.\n- `\"bundle\"`: equivalent to basis, except the tension parameter is used to straighten the spline.\n- `\"monotone\"`: cubic interpolation that preserves monotonicity in y."
+ },
+ "limit": {
+ "description": "The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0`, indicating no limit",
+ "type": "number"
+ },
+ "opacity": {
+ "description": "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "order": {
+ "description": "For line and trail marks, this `order` property can be set to `null` or `false` to make the lines use the original order in the data sources.",
+ "type": [
+ "null",
+ "boolean"
+ ]
+ },
+ "orient": {
+ "$ref": "#/definitions/Orientation",
+ "description": "The orientation of a non-stacked bar, tick, area, and line charts.\nThe value is either horizontal (default) or vertical.\n- For bar, rule and tick, this determines whether the size of the bar and tick\nshould be applied to x or y dimension.\n- For area, this property determines the orient property of the Vega output.\n- For line and trail marks, this property determines the sort order of the points in the line\nif `config.sortLineBy` is not specified.\nFor stacked charts, this is always determined by the orientation of the stack;\ntherefore explicitly specified value will be ignored."
+ },
+ "radius": {
+ "description": "Polar coordinate radial offset, in pixels, of the text label from the origin determined by the `x` and `y` properties.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "shape": {
+ "description": "Shape of the point marks. Supported values include:\n- plotting shapes: `\"circle\"`, `\"square\"`, `\"cross\"`, `\"diamond\"`, `\"triangle-up\"`, `\"triangle-down\"`, `\"triangle-right\"`, or `\"triangle-left\"`.\n- the line symbol `\"stroke\"`\n- centered directional shapes `\"arrow\"`, `\"wedge\"`, or `\"triangle\"`\n- a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n__Default value:__ `\"circle\"`",
+ "type": "string"
+ },
+ "shortTimeLabels": {
+ "description": "Whether month names and weekday names should be abbreviated.",
+ "type": "boolean"
+ },
+ "size": {
+ "description": "Default size for marks.\n- For `point`/`circle`/`square`, this represents the pixel area of the marks. For example: in the case of circles, the radius is determined in part by the square root of the size value.\n- For `bar`, this represents the band size of the bar, in pixels.\n- For `text`, this represents the font size, in pixels.\n\n__Default value:__ `30` for point, circle, square marks; `rangeStep` - 1 for bar marks with discrete dimensions; `5` for bar marks with continuous dimensions; `11` for text marks.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "stroke": {
+ "$ref": "#/definitions/Color",
+ "description": "Default Stroke Color. This has higher precedence than `config.color`\n\n__Default value:__ (None)"
+ },
+ "strokeCap": {
+ "$ref": "#/definitions/StrokeCap",
+ "description": "The stroke cap for line ending style. One of `\"butt\"`, `\"round\"`, or `\"square\"`.\n\n__Default value:__ `\"square\"`"
+ },
+ "strokeDash": {
+ "description": "An array of alternating stroke, space lengths for creating dashed or dotted lines.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "strokeDashOffset": {
+ "description": "The offset (in pixels) into which to begin drawing with the stroke dash array.",
+ "type": "number"
+ },
+ "strokeJoin": {
+ "$ref": "#/definitions/StrokeJoin",
+ "description": "The stroke line join method. One of `\"miter\"`, `\"round\"` or `\"bevel\"`.\n\n__Default value:__ `\"miter\"`"
+ },
+ "strokeMiterLimit": {
+ "description": "The miter limit at which to bevel a line join.",
+ "type": "number"
+ },
+ "strokeOpacity": {
+ "description": "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "strokeWidth": {
+ "description": "The stroke width, in pixels.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "tension": {
+ "description": "Depending on the interpolation type, sets the tension parameter (for line and area marks).",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "text": {
+ "description": "Placeholder text if the `text` channel is not specified",
+ "type": "string"
+ },
+ "theta": {
+ "description": "Polar coordinate angle, in radians, of the text label from the origin determined by the `x` and `y` properties. Values for `theta` follow the same convention of `arc` mark `startAngle` and `endAngle` properties: angles are measured in radians, with `0` indicating \"north\".",
+ "type": "number"
+ },
+ "tooltip": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Value"
+ },
+ {
+ "$ref": "#/definitions/TooltipContent"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.\n\n- If `tooltip` is `{\"content\": \"encoding\"}`, then all fields from `encoding` will be used.\n- If `tooltip` is `{\"content\": \"data\"}`, then all fields that appear in the highlighted data point will be used.\n- If set to `null`, then no tooltip will be used."
+ },
+ "width": {
+ "description": "Width of the marks.",
+ "type": "number"
+ },
+ "x": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "enum": [
+ "width"
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "X coordinates of the marks, or width of horizontal `\"bar\"` and `\"area\"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "x2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "enum": [
+ "width"
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "X2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "y": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "enum": [
+ "height"
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "Y coordinates of the marks, or height of vertical `\"bar\"` and `\"area\"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ },
+ "y2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "enum": [
+ "width"
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "Y2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ }
+ },
+ "type": "object"
+ },
+ "TextFieldDef": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field\n(e.g., `mean`, `sum`, `median`, `min`, `max`, `count`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "enum": [
+ "binned"
+ ],
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value\nor an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__\n1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`).\nIf field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`).\nSee more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html).\n2) `field` is not required if `aggregate` is `count`."
+ },
+ "format": {
+ "description": "The text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `\"number\"` (e.g., for quantitative fields), this is D3's [number format pattern](https://github.com/d3/d3-format#locale_format).\n- If the format type is `\"time\"` (e.g., for temporal fields), this is D3's [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\n__Default value:__ Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format.",
+ "type": "string"
+ },
+ "formatType": {
+ "description": "The format type for labels (`\"number\"` or `\"time\"`).\n\n__Default value:__\n- `\"time\"` for temporal fields and ordinal and nomimal fields with `timeUnit`.\n- `\"number\"` for quantitative fields as well as ordinal and nomimal fields without `timeUnit`.",
+ "enum": [
+ "number",
+ "time"
+ ],
+ "type": "string"
+ },
+ "timeUnit": {
+ "$ref": "#/definitions/TimeUnit",
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field.\nor [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.",
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "type": {
+ "$ref": "#/definitions/StandardType",
+ "description": "The encoded field's type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`).\nIt can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\n\n__Note:__\n\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- Data `type` describes the semantics of the data rather than the primitive data types (`number`, `string`, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\", \"type\": \"quantitative\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "type": "object"
+ },
+ "TextFieldDefWithCondition": {
+ "$ref": "#/definitions/FieldDefWithCondition<TextFieldDef,Value>"
+ },
+ "TextValueDefWithCondition": {
+ "$ref": "#/definitions/ValueDefWithCondition<TextFieldDef,Value>"
+ },
+ "TickConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "align": {
+ "$ref": "#/definitions/Align",
+ "description": "The horizontal alignment of the text. One of `\"left\"`, `\"right\"`, `\"center\"`."
+ },
+ "angle": {
+ "description": "The rotation angle of the text, in degrees.",
+ "maximum": 360,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bandSize": {
+ "description": "The width of the ticks.\n\n__Default value:__ 3/4 of rangeStep.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "baseline": {
+ "$ref": "#/definitions/TextBaseline",
+ "description": "The vertical alignment of the text. One of `\"top\"`, `\"middle\"`, `\"bottom\"`.\n\n__Default value:__ `\"middle\"`"
+ },
+ "color": {
+ "$ref": "#/definitions/Color",
+ "description": "Default color. Note that `fill` and `stroke` have higher precedence than `color` and will override `color`.\n\n__Default value:__ <span style=\"color: #4682b4;\">&#9632;</span> `\"#4682b4\"`\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config)."
+ },
+ "cornerRadius": {
+ "description": "The radius in pixels of rounded rectangle corners.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ "cursor": {
+ "$ref": "#/definitions/Cursor",
+ "description": "The mouse cursor used over the mark. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used."
+ },
+ "dir": {
+ "$ref": "#/definitions/Dir",
+ "description": "The direction of the text. One of `\"ltr\"` (left-to-right) or `\"rtl\"` (right-to-left). This property determines on which side is truncated in response to the limit parameter.\n\n__Default value:__ `\"ltr\"`"
+ },
+ "dx": {
+ "description": "The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
+ "type": "number"
+ },
+ "dy": {
+ "description": "The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
+ "type": "number"
+ },
+ "ellipsis": {
+ "description": "The ellipsis string for text truncated in response to the limit parameter.\n\n__Default value:__ `\"…\"`",
+ "type": "string"
+ },
+ "fill": {
+ "$ref": "#/definitions/Color",
+ "description": "Default Fill Color. This has higher precedence than `config.color`\n\n__Default value:__ (None)"
+ },
+ "fillOpacity": {
+ "description": "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "filled": {
+ "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `false` for `point`, `line` and `rule`; otherwise, `true`.\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).",
+ "type": "boolean"
+ },
+ "font": {
+ "description": "The typeface to set the text in (e.g., `\"Helvetica Neue\"`).",
+ "type": "string"
+ },
+ "fontSize": {
+ "description": "The font size, in pixels.",
+ "type": "number"
+ },
+ "fontStyle": {
+ "$ref": "#/definitions/FontStyle",
+ "description": "The font style (e.g., `\"italic\"`)."
+ },
+ "fontWeight": {
+ "$ref": "#/definitions/FontWeight",
+ "description": "The font weight.\nThis can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)."
+ },
+ "height": {
+ "description": "Height of the marks.",
+ "type": "number"
+ },
+ "href": {
+ "description": "A URL to load upon mouse click. If defined, the mark acts as a hyperlink.",
+ "format": "uri",
+ "type": "string"
+ },
+ "interpolate": {
+ "$ref": "#/definitions/Interpolate",
+ "description": "The line interpolation method to use for line and area marks. One of the following:\n- `\"linear\"`: piecewise linear segments, as in a polyline.\n- `\"linear-closed\"`: close the linear segments to form a polygon.\n- `\"step\"`: alternate between horizontal and vertical segments, as in a step function.\n- `\"step-before\"`: alternate between vertical and horizontal segments, as in a step function.\n- `\"step-after\"`: alternate between horizontal and vertical segments, as in a step function.\n- `\"basis\"`: a B-spline, with control point duplication on the ends.\n- `\"basis-open\"`: an open B-spline; may not intersect the start or end.\n- `\"basis-closed\"`: a closed B-spline, as in a loop.\n- `\"cardinal\"`: a Cardinal spline, with control point duplication on the ends.\n- `\"cardinal-open\"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points.\n- `\"cardinal-closed\"`: a closed Cardinal spline, as in a loop.\n- `\"bundle\"`: equivalent to basis, except the tension parameter is used to straighten the spline.\n- `\"monotone\"`: cubic interpolation that preserves monotonicity in y."
+ },
+ "limit": {
+ "description": "The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0`, indicating no limit",
+ "type": "number"
+ },
+ "opacity": {
+ "description": "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "order": {
+ "description": "For line and trail marks, this `order` property can be set to `null` or `false` to make the lines use the original order in the data sources.",
+ "type": [
+ "null",
+ "boolean"
+ ]
+ },
+ "orient": {
+ "$ref": "#/definitions/Orientation",
+ "description": "The orientation of a non-stacked bar, tick, area, and line charts.\nThe value is either horizontal (default) or vertical.\n- For bar, rule and tick, this determines whether the size of the bar and tick\nshould be applied to x or y dimension.\n- For area, this property determines the orient property of the Vega output.\n- For line and trail marks, this property determines the sort order of the points in the line\nif `config.sortLineBy` is not specified.\nFor stacked charts, this is always determined by the orientation of the stack;\ntherefore explicitly specified value will be ignored."
+ },
+ "radius": {
+ "description": "Polar coordinate radial offset, in pixels, of the text label from the origin determined by the `x` and `y` properties.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "shape": {
+ "description": "Shape of the point marks. Supported values include:\n- plotting shapes: `\"circle\"`, `\"square\"`, `\"cross\"`, `\"diamond\"`, `\"triangle-up\"`, `\"triangle-down\"`, `\"triangle-right\"`, or `\"triangle-left\"`.\n- the line symbol `\"stroke\"`\n- centered directional shapes `\"arrow\"`, `\"wedge\"`, or `\"triangle\"`\n- a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n__Default value:__ `\"circle\"`",
+ "type": "string"
+ },
+ "size": {
+ "description": "Default size for marks.\n- For `point`/`circle`/`square`, this represents the pixel area of the marks. For example: in the case of circles, the radius is determined in part by the square root of the size value.\n- For `bar`, this represents the band size of the bar, in pixels.\n- For `text`, this represents the font size, in pixels.\n\n__Default value:__ `30` for point, circle, square marks; `rangeStep` - 1 for bar marks with discrete dimensions; `5` for bar marks with continuous dimensions; `11` for text marks.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "stroke": {
+ "$ref": "#/definitions/Color",
+ "description": "Default Stroke Color. This has higher precedence than `config.color`\n\n__Default value:__ (None)"
+ },
+ "strokeCap": {
+ "$ref": "#/definitions/StrokeCap",
+ "description": "The stroke cap for line ending style. One of `\"butt\"`, `\"round\"`, or `\"square\"`.\n\n__Default value:__ `\"square\"`"
+ },
+ "strokeDash": {
+ "description": "An array of alternating stroke, space lengths for creating dashed or dotted lines.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "strokeDashOffset": {
+ "description": "The offset (in pixels) into which to begin drawing with the stroke dash array.",
+ "type": "number"
+ },
+ "strokeJoin": {
+ "$ref": "#/definitions/StrokeJoin",
+ "description": "The stroke line join method. One of `\"miter\"`, `\"round\"` or `\"bevel\"`.\n\n__Default value:__ `\"miter\"`"
+ },
+ "strokeMiterLimit": {
+ "description": "The miter limit at which to bevel a line join.",
+ "type": "number"
+ },
+ "strokeOpacity": {
+ "description": "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "strokeWidth": {
+ "description": "The stroke width, in pixels.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "tension": {
+ "description": "Depending on the interpolation type, sets the tension parameter (for line and area marks).",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "text": {
+ "description": "Placeholder text if the `text` channel is not specified",
+ "type": "string"
+ },
+ "theta": {
+ "description": "Polar coordinate angle, in radians, of the text label from the origin determined by the `x` and `y` properties. Values for `theta` follow the same convention of `arc` mark `startAngle` and `endAngle` properties: angles are measured in radians, with `0` indicating \"north\".",
+ "type": "number"
+ },
+ "thickness": {
+ "description": "Thickness of the tick mark.\n\n__Default value:__ `1`",
+ "minimum": 0,
+ "type": "number"
+ },
+ "tooltip": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Value"
+ },
+ {
+ "$ref": "#/definitions/TooltipContent"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.\n\n- If `tooltip` is `{\"content\": \"encoding\"}`, then all fields from `encoding` will be used.\n- If `tooltip` is `{\"content\": \"data\"}`, then all fields that appear in the highlighted data point will be used.\n- If set to `null`, then no tooltip will be used."
+ },
+ "width": {
+ "description": "Width of the marks.",
+ "type": "number"
+ },
+ "x": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "enum": [
+ "width"
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "X coordinates of the marks, or width of horizontal `\"bar\"` and `\"area\"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "x2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "enum": [
+ "width"
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "X2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "y": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "enum": [
+ "height"
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "Y coordinates of the marks, or height of vertical `\"bar\"` and `\"area\"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ },
+ "y2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "enum": [
+ "width"
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "Y2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ }
+ },
+ "type": "object"
+ },
+ "TimeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SingleTimeUnit"
+ },
+ {
+ "$ref": "#/definitions/MultiTimeUnit"
+ }
+ ]
+ },
+ "TimeUnitTransform": {
+ "additionalProperties": false,
+ "properties": {
+ "as": {
+ "$ref": "#/definitions/FieldName",
+ "description": "The output field to write the timeUnit value."
+ },
+ "field": {
+ "$ref": "#/definitions/FieldName",
+ "description": "The data field to apply time unit."
+ },
+ "timeUnit": {
+ "$ref": "#/definitions/TimeUnit",
+ "description": "The timeUnit."
+ }
+ },
+ "required": [
+ "timeUnit",
+ "field",
+ "as"
+ ],
+ "type": "object"
+ },
+ "TitleAnchor": {
+ "enum": [
+ null,
+ "start",
+ "middle",
+ "end"
+ ],
+ "type": [
+ "null",
+ "string"
+ ]
+ },
+ "TitleConfig": {
+ "$ref": "#/definitions/BaseTitleConfig"
+ },
+ "TitleFrame": {
+ "enum": [
+ "bounds",
+ "group"
+ ],
+ "type": "string"
+ },
+ "TitleOrient": {
+ "enum": [
+ "none",
+ "left",
+ "right",
+ "top",
+ "bottom"
+ ],
+ "type": "string"
+ },
+ "TitleParams": {
+ "additionalProperties": false,
+ "properties": {
+ "align": {
+ "$ref": "#/definitions/Align"
+ },
+ "anchor": {
+ "$ref": "#/definitions/TitleAnchor",
+ "description": "The anchor position for placing the title. One of `\"start\"`, `\"middle\"`, or `\"end\"`. For example, with an orientation of top these anchor positions map to a left-, center-, or right-aligned title.\n\n__Default value:__ `\"middle\"` for [single](https://vega.github.io/vega-lite/docs/spec.html) and [layered](https://vega.github.io/vega-lite/docs/layer.html) views.\n`\"start\"` for other composite views.\n\n__Note:__ [For now](https://github.com/vega/vega-lite/issues/2875), `anchor` is only customizable only for [single](https://vega.github.io/vega-lite/docs/spec.html) and [layered](https://vega.github.io/vega-lite/docs/layer.html) views. For other composite views, `anchor` is always `\"start\"`."
+ },
+ "angle": {
+ "description": "Angle in degrees of title text.",
+ "type": "number"
+ },
+ "baseline": {
+ "$ref": "#/definitions/TextBaseline",
+ "description": "Vertical text baseline for title text. One of `\"top\"`, `\"middle\"`, `\"bottom\"`, or `\"alphabetic\"`."
+ },
+ "color": {
+ "$ref": "#/definitions/Color",
+ "description": "Text color for title text."
+ },
+ "dx": {
+ "description": "Delta offset for title text x-coordinate.",
+ "type": "number"
+ },
+ "dy": {
+ "description": "Delta offset for title text y-coordinate.",
+ "type": "number"
+ },
+ "font": {
+ "description": "Font name for title text.",
+ "type": "string"
+ },
+ "fontSize": {
+ "description": "Font size in pixels for title text.\n\n__Default value:__ `10`.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "fontStyle": {
+ "$ref": "#/definitions/FontStyle",
+ "description": "Font style for title text."
+ },
+ "fontWeight": {
+ "$ref": "#/definitions/FontWeight",
+ "description": "Font weight for title text.\nThis can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)."
+ },
+ "frame": {
+ "$ref": "#/definitions/TitleFrame",
+ "description": "The reference frame for the anchor position, one of `\"bounds\"` (to anchor relative to the full bounding box) or `\"group\"` (to anchor relative to the group width or height)."
+ },
+ "limit": {
+ "description": "The maximum allowed length in pixels of legend labels.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "offset": {
+ "description": "The orthogonal offset in pixels by which to displace the title from its position along the edge of the chart.",
+ "type": "number"
+ },
+ "orient": {
+ "$ref": "#/definitions/TitleOrient",
+ "description": "Default title orientation (`\"top\"`, `\"bottom\"`, `\"left\"`, or `\"right\"`)"
+ },
+ "style": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "A [mark style property](https://vega.github.io/vega-lite/docs/config.html#style) to apply to the title text mark.\n\n__Default value:__ `\"group-title\"`."
+ },
+ "text": {
+ "description": "The title text.",
+ "type": "string"
+ },
+ "zindex": {
+ "description": "The integer z-index indicating the layering of the title group relative to other axis, mark and legend groups.\n\n__Default value:__ `0`.",
+ "minimum": 0,
+ "type": "number"
+ }
+ },
+ "required": [
+ "text"
+ ],
+ "type": "object"
+ },
+ "TooltipContent": {
+ "additionalProperties": false,
+ "properties": {
+ "content": {
+ "enum": [
+ "encoding",
+ "data"
+ ],
+ "type": "string"
+ }
+ },
+ "required": [
+ "content"
+ ],
+ "type": "object"
+ },
+ "TopLevelConcatSpec": {
+ "additionalProperties": false,
+ "properties": {
+ "$schema": {
+ "description": "URL to [JSON schema](http://json-schema.org/) for a Vega-Lite specification. Unless you have a reason to change this, use `https://vega.github.io/schema/vega-lite/v3.json`. Setting the `$schema` property allows automatic validation and autocomplete in editors that support JSON schema.",
+ "format": "uri",
+ "type": "string"
+ },
+ "align": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LayoutAlign"
+ },
+ {
+ "$ref": "#/definitions/RowCol<LayoutAlign>"
+ }
+ ],
+ "description": "The alignment to apply to grid rows and columns.\nThe supported string values are `\"all\"`, `\"each\"`, and `\"none\"`.\n\n- For `\"none\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other.\n- For `\"each\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size.\n- For `\"all\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\nAlternatively, an object value of the form `{\"row\": string, \"column\": string}` can be used to supply different alignments for rows and columns.\n\n__Default value:__ `\"all\"`."
+ },
+ "autosize": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/AutosizeType"
+ },
+ {
+ "$ref": "#/definitions/AutoSizeParams"
+ }
+ ],
+ "description": "Sets how the visualization size should be determined. If a string, should be one of `\"pad\"`, `\"fit\"` or `\"none\"`.\nObject values can additionally specify parameters for content sizing and automatic resizing.\n`\"fit\"` is only supported for single and layered views that don't use `rangeStep`.\n\n__Default value__: `pad`"
+ },
+ "background": {
+ "description": "CSS color property to use as the background of the entire view.\n\n__Default value:__ none (transparent)",
+ "type": "string"
+ },
+ "bounds": {
+ "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used.\n- If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`",
+ "enum": [
+ "full",
+ "flush"
+ ],
+ "type": "string"
+ },
+ "center": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/RowCol<boolean>"
+ }
+ ],
+ "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\nAn object value of the form `{\"row\": boolean, \"column\": boolean}` can be used to supply different centering values for rows and columns.\n\n__Default value:__ `false`"
+ },
+ "columns": {
+ "description": "The number of columns to include in the view composition layout.\n\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to\n`hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\n\n__Note__:\n\n1) This property is only for:\n- the general (wrappable) `concat` operator (not `hconcat`/`vconcat`)\n- the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\n\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).",
+ "type": "number"
+ },
+ "concat": {
+ "description": "A list of views to be concatenated.",
+ "items": {
+ "$ref": "#/definitions/Spec"
+ },
+ "type": "array"
+ },
+ "config": {
+ "$ref": "#/definitions/Config",
+ "description": "Vega-Lite configuration object. This property can only be defined at the top-level of a specification."
+ },
+ "data": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Data"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
+ },
+ "datasets": {
+ "$ref": "#/definitions/Datasets",
+ "description": "A global data store for named datasets. This is a mapping from names to inline datasets.\nThis can be an array of objects or primitive values or a string. Arrays of primitive values are ingested as objects with a `data` property."
+ },
+ "description": {
+ "description": "Description of this mark for commenting purpose.",
+ "type": "string"
+ },
+ "name": {
+ "description": "Name of the visualization for later reference.",
+ "type": "string"
+ },
+ "padding": {
+ "$ref": "#/definitions/Padding",
+ "description": "The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides.\nIf an object, the value should have the format `{\"left\": 5, \"top\": 5, \"right\": 5, \"bottom\": 5}` to specify padding for each side of the visualization.\n\n__Default value__: `5`"
+ },
+ "resolve": {
+ "$ref": "#/definitions/Resolve",
+ "description": "Scale, axis, and legend resolutions for view composition specifications."
+ },
+ "spacing": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/RowCol<number>"
+ }
+ ],
+ "description": "The spacing in pixels between sub-views of the composition operator.\nAn object of the form `{\"row\": number, \"column\": number}` can be used to set\ndifferent spacing values for rows and columns.\n\n__Default value__: Depends on `\"spacing\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)"
+ },
+ "title": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/TitleParams"
+ }
+ ],
+ "description": "Title for the plot."
+ },
+ "transform": {
+ "description": "An array of data transformations such as filter and new field calculation.",
+ "items": {
+ "$ref": "#/definitions/Transform"
+ },
+ "type": "array"
+ },
+ "usermeta": {
+ "description": "Optional metadata that will be passed to Vega.\nThis object is completely ignored by Vega and Vega-Lite and can be used for custom metadata.",
+ "type": "object"
+ }
+ },
+ "required": [
+ "concat"
+ ],
+ "type": "object"
+ },
+ "TopLevelHConcatSpec": {
+ "additionalProperties": false,
+ "properties": {
+ "$schema": {
+ "description": "URL to [JSON schema](http://json-schema.org/) for a Vega-Lite specification. Unless you have a reason to change this, use `https://vega.github.io/schema/vega-lite/v3.json`. Setting the `$schema` property allows automatic validation and autocomplete in editors that support JSON schema.",
+ "format": "uri",
+ "type": "string"
+ },
+ "autosize": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/AutosizeType"
+ },
+ {
+ "$ref": "#/definitions/AutoSizeParams"
+ }
+ ],
+ "description": "Sets how the visualization size should be determined. If a string, should be one of `\"pad\"`, `\"fit\"` or `\"none\"`.\nObject values can additionally specify parameters for content sizing and automatic resizing.\n`\"fit\"` is only supported for single and layered views that don't use `rangeStep`.\n\n__Default value__: `pad`"
+ },
+ "background": {
+ "description": "CSS color property to use as the background of the entire view.\n\n__Default value:__ none (transparent)",
+ "type": "string"
+ },
+ "bounds": {
+ "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used.\n- If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`",
+ "enum": [
+ "full",
+ "flush"
+ ],
+ "type": "string"
+ },
+ "center": {
+ "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\n__Default value:__ `false`",
+ "type": "boolean"
+ },
+ "config": {
+ "$ref": "#/definitions/Config",
+ "description": "Vega-Lite configuration object. This property can only be defined at the top-level of a specification."
+ },
+ "data": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Data"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
+ },
+ "datasets": {
+ "$ref": "#/definitions/Datasets",
+ "description": "A global data store for named datasets. This is a mapping from names to inline datasets.\nThis can be an array of objects or primitive values or a string. Arrays of primitive values are ingested as objects with a `data` property."
+ },
+ "description": {
+ "description": "Description of this mark for commenting purpose.",
+ "type": "string"
+ },
+ "hconcat": {
+ "description": "A list of views to be concatenated and put into a row.",
+ "items": {
+ "$ref": "#/definitions/Spec"
+ },
+ "type": "array"
+ },
+ "name": {
+ "description": "Name of the visualization for later reference.",
+ "type": "string"
+ },
+ "padding": {
+ "$ref": "#/definitions/Padding",
+ "description": "The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides.\nIf an object, the value should have the format `{\"left\": 5, \"top\": 5, \"right\": 5, \"bottom\": 5}` to specify padding for each side of the visualization.\n\n__Default value__: `5`"
+ },
+ "resolve": {
+ "$ref": "#/definitions/Resolve",
+ "description": "Scale, axis, and legend resolutions for view composition specifications."
+ },
+ "spacing": {
+ "description": "The spacing in pixels between sub-views of the concat operator.\n\n__Default value__: `10`",
+ "type": "number"
+ },
+ "title": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/TitleParams"
+ }
+ ],
+ "description": "Title for the plot."
+ },
+ "transform": {
+ "description": "An array of data transformations such as filter and new field calculation.",
+ "items": {
+ "$ref": "#/definitions/Transform"
+ },
+ "type": "array"
+ },
+ "usermeta": {
+ "description": "Optional metadata that will be passed to Vega.\nThis object is completely ignored by Vega and Vega-Lite and can be used for custom metadata.",
+ "type": "object"
+ }
+ },
+ "required": [
+ "hconcat"
+ ],
+ "type": "object"
+ },
+ "TopLevelRepeatSpec": {
+ "additionalProperties": false,
+ "properties": {
+ "$schema": {
+ "description": "URL to [JSON schema](http://json-schema.org/) for a Vega-Lite specification. Unless you have a reason to change this, use `https://vega.github.io/schema/vega-lite/v3.json`. Setting the `$schema` property allows automatic validation and autocomplete in editors that support JSON schema.",
+ "format": "uri",
+ "type": "string"
+ },
+ "align": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LayoutAlign"
+ },
+ {
+ "$ref": "#/definitions/RowCol<LayoutAlign>"
+ }
+ ],
+ "description": "The alignment to apply to grid rows and columns.\nThe supported string values are `\"all\"`, `\"each\"`, and `\"none\"`.\n\n- For `\"none\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other.\n- For `\"each\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size.\n- For `\"all\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\nAlternatively, an object value of the form `{\"row\": string, \"column\": string}` can be used to supply different alignments for rows and columns.\n\n__Default value:__ `\"all\"`."
+ },
+ "autosize": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/AutosizeType"
+ },
+ {
+ "$ref": "#/definitions/AutoSizeParams"
+ }
+ ],
+ "description": "Sets how the visualization size should be determined. If a string, should be one of `\"pad\"`, `\"fit\"` or `\"none\"`.\nObject values can additionally specify parameters for content sizing and automatic resizing.\n`\"fit\"` is only supported for single and layered views that don't use `rangeStep`.\n\n__Default value__: `pad`"
+ },
+ "background": {
+ "description": "CSS color property to use as the background of the entire view.\n\n__Default value:__ none (transparent)",
+ "type": "string"
+ },
+ "bounds": {
+ "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used.\n- If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`",
+ "enum": [
+ "full",
+ "flush"
+ ],
+ "type": "string"
+ },
+ "center": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/RowCol<boolean>"
+ }
+ ],
+ "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\nAn object value of the form `{\"row\": boolean, \"column\": boolean}` can be used to supply different centering values for rows and columns.\n\n__Default value:__ `false`"
+ },
+ "columns": {
+ "description": "The number of columns to include in the view composition layout.\n\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to\n`hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\n\n__Note__:\n\n1) This property is only for:\n- the general (wrappable) `concat` operator (not `hconcat`/`vconcat`)\n- the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\n\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).",
+ "type": "number"
+ },
+ "config": {
+ "$ref": "#/definitions/Config",
+ "description": "Vega-Lite configuration object. This property can only be defined at the top-level of a specification."
+ },
+ "data": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Data"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
+ },
+ "datasets": {
+ "$ref": "#/definitions/Datasets",
+ "description": "A global data store for named datasets. This is a mapping from names to inline datasets.\nThis can be an array of objects or primitive values or a string. Arrays of primitive values are ingested as objects with a `data` property."
+ },
+ "description": {
+ "description": "Description of this mark for commenting purpose.",
+ "type": "string"
+ },
+ "name": {
+ "description": "Name of the visualization for later reference.",
+ "type": "string"
+ },
+ "padding": {
+ "$ref": "#/definitions/Padding",
+ "description": "The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides.\nIf an object, the value should have the format `{\"left\": 5, \"top\": 5, \"right\": 5, \"bottom\": 5}` to specify padding for each side of the visualization.\n\n__Default value__: `5`"
+ },
+ "repeat": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/RepeatMapping"
+ }
+ ],
+ "description": "Definition for fields to be repeated. One of:\n1) An array of fields to be repeated. If `\"repeat\"` is an array, the field can be referred using `{\"repeat\": \"repeat\"}`\n2) An object that mapped `\"row\"` and/or `\"column\"` to the listed of fields to be repeated along the particular orientations. The objects `{\"repeat\": \"row\"}` and `{\"repeat\": \"column\"}` can be used to refer to the repeated field respectively."
+ },
+ "resolve": {
+ "$ref": "#/definitions/Resolve",
+ "description": "Scale, axis, and legend resolutions for view composition specifications."
+ },
+ "spacing": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/RowCol<number>"
+ }
+ ],
+ "description": "The spacing in pixels between sub-views of the composition operator.\nAn object of the form `{\"row\": number, \"column\": number}` can be used to set\ndifferent spacing values for rows and columns.\n\n__Default value__: Depends on `\"spacing\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)"
+ },
+ "spec": {
+ "$ref": "#/definitions/Spec",
+ "description": "A specification of the view that gets repeated."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/TitleParams"
+ }
+ ],
+ "description": "Title for the plot."
+ },
+ "transform": {
+ "description": "An array of data transformations such as filter and new field calculation.",
+ "items": {
+ "$ref": "#/definitions/Transform"
+ },
+ "type": "array"
+ },
+ "usermeta": {
+ "description": "Optional metadata that will be passed to Vega.\nThis object is completely ignored by Vega and Vega-Lite and can be used for custom metadata.",
+ "type": "object"
+ }
+ },
+ "required": [
+ "repeat",
+ "spec"
+ ],
+ "type": "object"
+ },
+ "TopLevelVConcatSpec": {
+ "additionalProperties": false,
+ "properties": {
+ "$schema": {
+ "description": "URL to [JSON schema](http://json-schema.org/) for a Vega-Lite specification. Unless you have a reason to change this, use `https://vega.github.io/schema/vega-lite/v3.json`. Setting the `$schema` property allows automatic validation and autocomplete in editors that support JSON schema.",
+ "format": "uri",
+ "type": "string"
+ },
+ "autosize": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/AutosizeType"
+ },
+ {
+ "$ref": "#/definitions/AutoSizeParams"
+ }
+ ],
+ "description": "Sets how the visualization size should be determined. If a string, should be one of `\"pad\"`, `\"fit\"` or `\"none\"`.\nObject values can additionally specify parameters for content sizing and automatic resizing.\n`\"fit\"` is only supported for single and layered views that don't use `rangeStep`.\n\n__Default value__: `pad`"
+ },
+ "background": {
+ "description": "CSS color property to use as the background of the entire view.\n\n__Default value:__ none (transparent)",
+ "type": "string"
+ },
+ "bounds": {
+ "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used.\n- If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`",
+ "enum": [
+ "full",
+ "flush"
+ ],
+ "type": "string"
+ },
+ "center": {
+ "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\n__Default value:__ `false`",
+ "type": "boolean"
+ },
+ "config": {
+ "$ref": "#/definitions/Config",
+ "description": "Vega-Lite configuration object. This property can only be defined at the top-level of a specification."
+ },
+ "data": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Data"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
+ },
+ "datasets": {
+ "$ref": "#/definitions/Datasets",
+ "description": "A global data store for named datasets. This is a mapping from names to inline datasets.\nThis can be an array of objects or primitive values or a string. Arrays of primitive values are ingested as objects with a `data` property."
+ },
+ "description": {
+ "description": "Description of this mark for commenting purpose.",
+ "type": "string"
+ },
+ "name": {
+ "description": "Name of the visualization for later reference.",
+ "type": "string"
+ },
+ "padding": {
+ "$ref": "#/definitions/Padding",
+ "description": "The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides.\nIf an object, the value should have the format `{\"left\": 5, \"top\": 5, \"right\": 5, \"bottom\": 5}` to specify padding for each side of the visualization.\n\n__Default value__: `5`"
+ },
+ "resolve": {
+ "$ref": "#/definitions/Resolve",
+ "description": "Scale, axis, and legend resolutions for view composition specifications."
+ },
+ "spacing": {
+ "description": "The spacing in pixels between sub-views of the concat operator.\n\n__Default value__: `10`",
+ "type": "number"
+ },
+ "title": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/TitleParams"
+ }
+ ],
+ "description": "Title for the plot."
+ },
+ "transform": {
+ "description": "An array of data transformations such as filter and new field calculation.",
+ "items": {
+ "$ref": "#/definitions/Transform"
+ },
+ "type": "array"
+ },
+ "usermeta": {
+ "description": "Optional metadata that will be passed to Vega.\nThis object is completely ignored by Vega and Vega-Lite and can be used for custom metadata.",
+ "type": "object"
+ },
+ "vconcat": {
+ "description": "A list of views to be concatenated and put into a column.",
+ "items": {
+ "$ref": "#/definitions/Spec"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "vconcat"
+ ],
+ "type": "object"
+ },
+ "TopLevelLayerSpec": {
+ "additionalProperties": false,
+ "properties": {
+ "$schema": {
+ "description": "URL to [JSON schema](http://json-schema.org/) for a Vega-Lite specification. Unless you have a reason to change this, use `https://vega.github.io/schema/vega-lite/v3.json`. Setting the `$schema` property allows automatic validation and autocomplete in editors that support JSON schema.",
+ "format": "uri",
+ "type": "string"
+ },
+ "autosize": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/AutosizeType"
+ },
+ {
+ "$ref": "#/definitions/AutoSizeParams"
+ }
+ ],
+ "description": "Sets how the visualization size should be determined. If a string, should be one of `\"pad\"`, `\"fit\"` or `\"none\"`.\nObject values can additionally specify parameters for content sizing and automatic resizing.\n`\"fit\"` is only supported for single and layered views that don't use `rangeStep`.\n\n__Default value__: `pad`"
+ },
+ "background": {
+ "description": "CSS color property to use as the background of the entire view.\n\n__Default value:__ none (transparent)",
+ "type": "string"
+ },
+ "config": {
+ "$ref": "#/definitions/Config",
+ "description": "Vega-Lite configuration object. This property can only be defined at the top-level of a specification."
+ },
+ "data": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Data"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
+ },
+ "datasets": {
+ "$ref": "#/definitions/Datasets",
+ "description": "A global data store for named datasets. This is a mapping from names to inline datasets.\nThis can be an array of objects or primitive values or a string. Arrays of primitive values are ingested as objects with a `data` property."
+ },
+ "description": {
+ "description": "Description of this mark for commenting purpose.",
+ "type": "string"
+ },
+ "encoding": {
+ "$ref": "#/definitions/Encoding",
+ "description": "A shared key-value mapping between encoding channels and definition of fields in the underlying layers."
+ },
+ "height": {
+ "description": "The height of a visualization.\n\n__Default value:__\n- If a view's [`autosize`](https://vega.github.io/vega-lite/docs/size.html#autosize) type is `\"fit\"` or its y-channel has a [continuous scale](https://vega.github.io/vega-lite/docs/scale.html#continuous), the height will be the value of [`config.view.height`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- For y-axis with a band or point scale: if [`rangeStep`](https://vega.github.io/vega-lite/docs/scale.html#band) is a numeric value or unspecified, the height is [determined by the range step, paddings, and the cardinality of the field mapped to y-channel](https://vega.github.io/vega-lite/docs/scale.html#band). Otherwise, if the `rangeStep` is `null`, the height will be the value of [`config.view.height`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- If no field is mapped to `y` channel, the `height` will be the value of `rangeStep`.\n\n__Note__: For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the height of a single view.\n\n__See also:__ The documentation for [width and height](https://vega.github.io/vega-lite/docs/size.html) contains more examples.",
+ "type": "number"
+ },
+ "layer": {
+ "description": "Layer or single view specifications to be layered.\n\n__Note__: Specifications inside `layer` cannot use `row` and `column` channels as layering facet specifications is not allowed. Instead, use the [facet operator](https://vega.github.io/vega-lite/docs/facet.html) and place a layer inside a facet.",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LayerSpec"
+ },
+ {
+ "$ref": "#/definitions/UnitSpec"
+ }
+ ]
+ },
+ "type": "array"
+ },
+ "name": {
+ "description": "Name of the visualization for later reference.",
+ "type": "string"
+ },
+ "padding": {
+ "$ref": "#/definitions/Padding",
+ "description": "The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides.\nIf an object, the value should have the format `{\"left\": 5, \"top\": 5, \"right\": 5, \"bottom\": 5}` to specify padding for each side of the visualization.\n\n__Default value__: `5`"
+ },
+ "projection": {
+ "$ref": "#/definitions/Projection",
+ "description": "An object defining properties of the geographic projection shared by underlying layers."
+ },
+ "resolve": {
+ "$ref": "#/definitions/Resolve",
+ "description": "Scale, axis, and legend resolutions for view composition specifications."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/TitleParams"
+ }
+ ],
+ "description": "Title for the plot."
+ },
+ "transform": {
+ "description": "An array of data transformations such as filter and new field calculation.",
+ "items": {
+ "$ref": "#/definitions/Transform"
+ },
+ "type": "array"
+ },
+ "usermeta": {
+ "description": "Optional metadata that will be passed to Vega.\nThis object is completely ignored by Vega and Vega-Lite and can be used for custom metadata.",
+ "type": "object"
+ },
+ "view": {
+ "$ref": "#/definitions/ViewBackground",
+ "description": "An object defining the view background's fill and stroke.\n\n__Default value:__ none (transparent)"
+ },
+ "width": {
+ "description": "The width of a visualization.\n\n__Default value:__ This will be determined by the following rules:\n\n- If a view's [`autosize`](https://vega.github.io/vega-lite/docs/size.html#autosize) type is `\"fit\"` or its x-channel has a [continuous scale](https://vega.github.io/vega-lite/docs/scale.html#continuous), the width will be the value of [`config.view.width`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- For x-axis with a band or point scale: if [`rangeStep`](https://vega.github.io/vega-lite/docs/scale.html#band) is a numeric value or unspecified, the width is [determined by the range step, paddings, and the cardinality of the field mapped to x-channel](https://vega.github.io/vega-lite/docs/scale.html#band). Otherwise, if the `rangeStep` is `null`, the width will be the value of [`config.view.width`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- If no field is mapped to `x` channel, the `width` will be the value of [`config.scale.textXRangeStep`](https://vega.github.io/vega-lite/docs/size.html#default-width-and-height) for `text` mark and the value of `rangeStep` for other marks.\n\n__Note:__ For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the width of a single view.\n\n__See also:__ The documentation for [width and height](https://vega.github.io/vega-lite/docs/size.html) contains more examples.",
+ "type": "number"
+ }
+ },
+ "required": [
+ "layer"
+ ],
+ "type": "object"
+ },
+ "TopLevelFacetSpec": {
+ "additionalProperties": false,
+ "properties": {
+ "$schema": {
+ "description": "URL to [JSON schema](http://json-schema.org/) for a Vega-Lite specification. Unless you have a reason to change this, use `https://vega.github.io/schema/vega-lite/v3.json`. Setting the `$schema` property allows automatic validation and autocomplete in editors that support JSON schema.",
+ "format": "uri",
+ "type": "string"
+ },
+ "align": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LayoutAlign"
+ },
+ {
+ "$ref": "#/definitions/RowCol<LayoutAlign>"
+ }
+ ],
+ "description": "The alignment to apply to grid rows and columns.\nThe supported string values are `\"all\"`, `\"each\"`, and `\"none\"`.\n\n- For `\"none\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other.\n- For `\"each\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size.\n- For `\"all\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\nAlternatively, an object value of the form `{\"row\": string, \"column\": string}` can be used to supply different alignments for rows and columns.\n\n__Default value:__ `\"all\"`."
+ },
+ "autosize": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/AutosizeType"
+ },
+ {
+ "$ref": "#/definitions/AutoSizeParams"
+ }
+ ],
+ "description": "Sets how the visualization size should be determined. If a string, should be one of `\"pad\"`, `\"fit\"` or `\"none\"`.\nObject values can additionally specify parameters for content sizing and automatic resizing.\n`\"fit\"` is only supported for single and layered views that don't use `rangeStep`.\n\n__Default value__: `pad`"
+ },
+ "background": {
+ "description": "CSS color property to use as the background of the entire view.\n\n__Default value:__ none (transparent)",
+ "type": "string"
+ },
+ "bounds": {
+ "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used.\n- If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`",
+ "enum": [
+ "full",
+ "flush"
+ ],
+ "type": "string"
+ },
+ "center": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/RowCol<boolean>"
+ }
+ ],
+ "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\nAn object value of the form `{\"row\": boolean, \"column\": boolean}` can be used to supply different centering values for rows and columns.\n\n__Default value:__ `false`"
+ },
+ "columns": {
+ "description": "The number of columns to include in the view composition layout.\n\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to\n`hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\n\n__Note__:\n\n1) This property is only for:\n- the general (wrappable) `concat` operator (not `hconcat`/`vconcat`)\n- the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\n\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).",
+ "type": "number"
+ },
+ "config": {
+ "$ref": "#/definitions/Config",
+ "description": "Vega-Lite configuration object. This property can only be defined at the top-level of a specification."
+ },
+ "data": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Data"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
+ },
+ "datasets": {
+ "$ref": "#/definitions/Datasets",
+ "description": "A global data store for named datasets. This is a mapping from names to inline datasets.\nThis can be an array of objects or primitive values or a string. Arrays of primitive values are ingested as objects with a `data` property."
+ },
+ "description": {
+ "description": "Description of this mark for commenting purpose.",
+ "type": "string"
+ },
+ "facet": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FacetFieldDef"
+ },
+ {
+ "$ref": "#/definitions/FacetMapping"
+ }
+ ],
+ "description": "Definition for how to facet the data. One of:\n1) [a field definition for faceting the plot by one field](https://vega.github.io/vega-lite/docs/facet.html#field-def)\n2) [An object that maps `row` and `column` channels to their field definitions](https://vega.github.io/vega-lite/docs/facet.html#mapping)"
+ },
+ "name": {
+ "description": "Name of the visualization for later reference.",
+ "type": "string"
+ },
+ "padding": {
+ "$ref": "#/definitions/Padding",
+ "description": "The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides.\nIf an object, the value should have the format `{\"left\": 5, \"top\": 5, \"right\": 5, \"bottom\": 5}` to specify padding for each side of the visualization.\n\n__Default value__: `5`"
+ },
+ "resolve": {
+ "$ref": "#/definitions/Resolve",
+ "description": "Scale, axis, and legend resolutions for view composition specifications."
+ },
+ "spacing": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/RowCol<number>"
+ }
+ ],
+ "description": "The spacing in pixels between sub-views of the composition operator.\nAn object of the form `{\"row\": number, \"column\": number}` can be used to set\ndifferent spacing values for rows and columns.\n\n__Default value__: Depends on `\"spacing\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)"
+ },
+ "spec": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LayerSpec"
+ },
+ {
+ "$ref": "#/definitions/FacetedUnitSpec"
+ }
+ ],
+ "description": "A specification of the view that gets faceted."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/TitleParams"
+ }
+ ],
+ "description": "Title for the plot."
+ },
+ "transform": {
+ "description": "An array of data transformations such as filter and new field calculation.",
+ "items": {
+ "$ref": "#/definitions/Transform"
+ },
+ "type": "array"
+ },
+ "usermeta": {
+ "description": "Optional metadata that will be passed to Vega.\nThis object is completely ignored by Vega and Vega-Lite and can be used for custom metadata.",
+ "type": "object"
+ }
+ },
+ "required": [
+ "data",
+ "facet",
+ "spec"
+ ],
+ "type": "object"
+ },
+ "TopLevelSpec": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TopLevelUnitSpec"
+ },
+ {
+ "$ref": "#/definitions/TopLevelFacetSpec"
+ },
+ {
+ "$ref": "#/definitions/TopLevelLayerSpec"
+ },
+ {
+ "$ref": "#/definitions/TopLevelRepeatSpec"
+ },
+ {
+ "$ref": "#/definitions/TopLevelConcatSpec"
+ },
+ {
+ "$ref": "#/definitions/TopLevelVConcatSpec"
+ },
+ {
+ "$ref": "#/definitions/TopLevelHConcatSpec"
+ }
+ ],
+ "description": "A Vega-Lite top-level specification.\nThis is the root class for all Vega-Lite specifications.\n(The json schema is generated from this type.)"
+ },
+ "TopLevelUnitSpec": {
+ "additionalProperties": false,
+ "properties": {
+ "$schema": {
+ "description": "URL to [JSON schema](http://json-schema.org/) for a Vega-Lite specification. Unless you have a reason to change this, use `https://vega.github.io/schema/vega-lite/v3.json`. Setting the `$schema` property allows automatic validation and autocomplete in editors that support JSON schema.",
+ "format": "uri",
+ "type": "string"
+ },
+ "align": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LayoutAlign"
+ },
+ {
+ "$ref": "#/definitions/RowCol<LayoutAlign>"
+ }
+ ],
+ "description": "The alignment to apply to grid rows and columns.\nThe supported string values are `\"all\"`, `\"each\"`, and `\"none\"`.\n\n- For `\"none\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other.\n- For `\"each\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size.\n- For `\"all\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\nAlternatively, an object value of the form `{\"row\": string, \"column\": string}` can be used to supply different alignments for rows and columns.\n\n__Default value:__ `\"all\"`."
+ },
+ "autosize": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/AutosizeType"
+ },
+ {
+ "$ref": "#/definitions/AutoSizeParams"
+ }
+ ],
+ "description": "Sets how the visualization size should be determined. If a string, should be one of `\"pad\"`, `\"fit\"` or `\"none\"`.\nObject values can additionally specify parameters for content sizing and automatic resizing.\n`\"fit\"` is only supported for single and layered views that don't use `rangeStep`.\n\n__Default value__: `pad`"
+ },
+ "background": {
+ "description": "CSS color property to use as the background of the entire view.\n\n__Default value:__ none (transparent)",
+ "type": "string"
+ },
+ "bounds": {
+ "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used.\n- If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`",
+ "enum": [
+ "full",
+ "flush"
+ ],
+ "type": "string"
+ },
+ "center": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/RowCol<boolean>"
+ }
+ ],
+ "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\nAn object value of the form `{\"row\": boolean, \"column\": boolean}` can be used to supply different centering values for rows and columns.\n\n__Default value:__ `false`"
+ },
+ "columns": {
+ "description": "The number of columns to include in the view composition layout.\n\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to\n`hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\n\n__Note__:\n\n1) This property is only for:\n- the general (wrappable) `concat` operator (not `hconcat`/`vconcat`)\n- the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\n\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).",
+ "type": "number"
+ },
+ "config": {
+ "$ref": "#/definitions/Config",
+ "description": "Vega-Lite configuration object. This property can only be defined at the top-level of a specification."
+ },
+ "data": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Data"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
+ },
+ "datasets": {
+ "$ref": "#/definitions/Datasets",
+ "description": "A global data store for named datasets. This is a mapping from names to inline datasets.\nThis can be an array of objects or primitive values or a string. Arrays of primitive values are ingested as objects with a `data` property."
+ },
+ "description": {
+ "description": "Description of this mark for commenting purpose.",
+ "type": "string"
+ },
+ "encoding": {
+ "$ref": "#/definitions/FacetedEncoding",
+ "description": "A key-value mapping between encoding channels and definition of fields."
+ },
+ "height": {
+ "description": "The height of a visualization.\n\n__Default value:__\n- If a view's [`autosize`](https://vega.github.io/vega-lite/docs/size.html#autosize) type is `\"fit\"` or its y-channel has a [continuous scale](https://vega.github.io/vega-lite/docs/scale.html#continuous), the height will be the value of [`config.view.height`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- For y-axis with a band or point scale: if [`rangeStep`](https://vega.github.io/vega-lite/docs/scale.html#band) is a numeric value or unspecified, the height is [determined by the range step, paddings, and the cardinality of the field mapped to y-channel](https://vega.github.io/vega-lite/docs/scale.html#band). Otherwise, if the `rangeStep` is `null`, the height will be the value of [`config.view.height`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- If no field is mapped to `y` channel, the `height` will be the value of `rangeStep`.\n\n__Note__: For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the height of a single view.\n\n__See also:__ The documentation for [width and height](https://vega.github.io/vega-lite/docs/size.html) contains more examples.",
+ "type": "number"
+ },
+ "mark": {
+ "$ref": "#/definitions/AnyMark",
+ "description": "A string describing the mark type (one of `\"bar\"`, `\"circle\"`, `\"square\"`, `\"tick\"`, `\"line\"`,\n`\"area\"`, `\"point\"`, `\"rule\"`, `\"geoshape\"`, and `\"text\"`) or a [mark definition object](https://vega.github.io/vega-lite/docs/mark.html#mark-def)."
+ },
+ "name": {
+ "description": "Name of the visualization for later reference.",
+ "type": "string"
+ },
+ "padding": {
+ "$ref": "#/definitions/Padding",
+ "description": "The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides.\nIf an object, the value should have the format `{\"left\": 5, \"top\": 5, \"right\": 5, \"bottom\": 5}` to specify padding for each side of the visualization.\n\n__Default value__: `5`"
+ },
+ "projection": {
+ "$ref": "#/definitions/Projection",
+ "description": "An object defining properties of geographic projection, which will be applied to `shape` path for `\"geoshape\"` marks\nand to `latitude` and `\"longitude\"` channels for other marks."
+ },
+ "resolve": {
+ "$ref": "#/definitions/Resolve",
+ "description": "Scale, axis, and legend resolutions for view composition specifications."
+ },
+ "selection": {
+ "additionalProperties": {
+ "$ref": "#/definitions/SelectionDef"
+ },
+ "description": "A key-value mapping between selection names and definitions.",
+ "type": "object"
+ },
+ "spacing": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/RowCol<number>"
+ }
+ ],
+ "description": "The spacing in pixels between sub-views of the composition operator.\nAn object of the form `{\"row\": number, \"column\": number}` can be used to set\ndifferent spacing values for rows and columns.\n\n__Default value__: Depends on `\"spacing\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)"
+ },
+ "title": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/TitleParams"
+ }
+ ],
+ "description": "Title for the plot."
+ },
+ "transform": {
+ "description": "An array of data transformations such as filter and new field calculation.",
+ "items": {
+ "$ref": "#/definitions/Transform"
+ },
+ "type": "array"
+ },
+ "usermeta": {
+ "description": "Optional metadata that will be passed to Vega.\nThis object is completely ignored by Vega and Vega-Lite and can be used for custom metadata.",
+ "type": "object"
+ },
+ "view": {
+ "$ref": "#/definitions/ViewBackground",
+ "description": "An object defining the view background's fill and stroke.\n\n__Default value:__ none (transparent)"
+ },
+ "width": {
+ "description": "The width of a visualization.\n\n__Default value:__ This will be determined by the following rules:\n\n- If a view's [`autosize`](https://vega.github.io/vega-lite/docs/size.html#autosize) type is `\"fit\"` or its x-channel has a [continuous scale](https://vega.github.io/vega-lite/docs/scale.html#continuous), the width will be the value of [`config.view.width`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- For x-axis with a band or point scale: if [`rangeStep`](https://vega.github.io/vega-lite/docs/scale.html#band) is a numeric value or unspecified, the width is [determined by the range step, paddings, and the cardinality of the field mapped to x-channel](https://vega.github.io/vega-lite/docs/scale.html#band). Otherwise, if the `rangeStep` is `null`, the width will be the value of [`config.view.width`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- If no field is mapped to `x` channel, the `width` will be the value of [`config.scale.textXRangeStep`](https://vega.github.io/vega-lite/docs/size.html#default-width-and-height) for `text` mark and the value of `rangeStep` for other marks.\n\n__Note:__ For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the width of a single view.\n\n__See also:__ The documentation for [width and height](https://vega.github.io/vega-lite/docs/size.html) contains more examples.",
+ "type": "number"
+ }
+ },
+ "required": [
+ "data",
+ "mark"
+ ],
+ "type": "object"
+ },
+ "TopoDataFormat": {
+ "additionalProperties": false,
+ "properties": {
+ "feature": {
+ "description": "The name of the TopoJSON object set to convert to a GeoJSON feature collection.\nFor example, in a map of the world, there may be an object set named `\"countries\"`.\nUsing the feature property, we can extract this set and generate a GeoJSON feature object for each country.",
+ "type": "string"
+ },
+ "mesh": {
+ "description": "The name of the TopoJSON object set to convert to mesh.\nSimilar to the `feature` option, `mesh` extracts a named TopoJSON object set.\n Unlike the `feature` option, the corresponding geo data is returned as a single, unified mesh instance, not as individual GeoJSON features.\nExtracting a mesh is useful for more efficiently drawing borders or other geographic elements that you do not need to associate with specific regions such as individual countries, states or counties.",
+ "type": "string"
+ },
+ "parse": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Parse"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "If set to `null`, disable type inference based on the spec and only use type inference based on the data.\nAlternatively, a parsing directive object can be provided for explicit data types. Each property of the object corresponds to a field name, and the value to the desired data type (one of `\"number\"`, `\"boolean\"`, `\"date\"`, or null (do not parse the field)).\nFor example, `\"parse\": {\"modified_on\": \"date\"}` parses the `modified_on` field in each input record a Date value.\n\nFor `\"date\"`, we parse data based using Javascript's [`Date.parse()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse).\nFor Specific date formats can be provided (e.g., `{foo: \"date:'%m%d%Y'\"}`), using the [d3-time-format syntax](https://github.com/d3/d3-time-format#locale_format). UTC date format parsing is supported similarly (e.g., `{foo: \"utc:'%m%d%Y'\"}`). See more about [UTC time](https://vega.github.io/vega-lite/docs/timeunit.html#utc)"
+ },
+ "type": {
+ "description": "Type of input data: `\"json\"`, `\"csv\"`, `\"tsv\"`, `\"dsv\"`.\n\n__Default value:__ The default format type is determined by the extension of the file URL.\nIf no extension is detected, `\"json\"` will be used by default.",
+ "enum": [
+ "topojson"
+ ],
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "Transform": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/AggregateTransform"
+ },
+ {
+ "$ref": "#/definitions/BinTransform"
+ },
+ {
+ "$ref": "#/definitions/CalculateTransform"
+ },
+ {
+ "$ref": "#/definitions/FilterTransform"
+ },
+ {
+ "$ref": "#/definitions/FlattenTransform"
+ },
+ {
+ "$ref": "#/definitions/FoldTransform"
+ },
+ {
+ "$ref": "#/definitions/ImputeTransform"
+ },
+ {
+ "$ref": "#/definitions/JoinAggregateTransform"
+ },
+ {
+ "$ref": "#/definitions/LookupTransform"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitTransform"
+ },
+ {
+ "$ref": "#/definitions/SampleTransform"
+ },
+ {
+ "$ref": "#/definitions/StackTransform"
+ },
+ {
+ "$ref": "#/definitions/WindowTransform"
+ }
+ ]
+ },
+ "TypeForShape": {
+ "enum": [
+ "nominal",
+ "ordinal",
+ "geojson"
+ ],
+ "type": "string"
+ },
+ "TypedFieldDef": {
+ "additionalProperties": false,
+ "description": "Definition object for a data field, its type and transformation of an encoding channel.",
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field\n(e.g., `mean`, `sum`, `median`, `min`, `max`, `count`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "enum": [
+ "binned"
+ ],
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value\nor an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__\n1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`).\nIf field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`).\nSee more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html).\n2) `field` is not required if `aggregate` is `count`."
+ },
+ "timeUnit": {
+ "$ref": "#/definitions/TimeUnit",
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field.\nor [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.",
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "type": {
+ "$ref": "#/definitions/StandardType",
+ "description": "The encoded field's type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`).\nIt can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\n\n__Note:__\n\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- Data `type` describes the semantics of the data rather than the primitive data types (`number`, `string`, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\", \"type\": \"quantitative\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "type": "object"
+ },
+ "UnitSpec": {
+ "$ref": "#/definitions/GenericUnitSpec<Encoding,AnyMark>",
+ "description": "A unit specification, which can contain either [primitive marks or composite marks](https://vega.github.io/vega-lite/docs/mark.html#types)."
+ },
+ "UrlData": {
+ "additionalProperties": false,
+ "properties": {
+ "format": {
+ "$ref": "#/definitions/DataFormat",
+ "description": "An object that specifies the format for parsing the data."
+ },
+ "name": {
+ "description": "Provide a placeholder name and bind data at runtime.",
+ "type": "string"
+ },
+ "url": {
+ "description": "An URL from which to load the data set. Use the `format.type` property\nto ensure the loaded data is correctly parsed.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "url"
+ ],
+ "type": "object"
+ },
+ "UtcMultiTimeUnit": {
+ "enum": [
+ "utcyearquarter",
+ "utcyearquartermonth",
+ "utcyearmonth",
+ "utcyearmonthdate",
+ "utcyearmonthdatehours",
+ "utcyearmonthdatehoursminutes",
+ "utcyearmonthdatehoursminutesseconds",
+ "utcquartermonth",
+ "utcmonthdate",
+ "utcmonthdatehours",
+ "utchoursminutes",
+ "utchoursminutesseconds",
+ "utcminutesseconds",
+ "utcsecondsmilliseconds"
+ ],
+ "type": "string"
+ },
+ "UtcSingleTimeUnit": {
+ "enum": [
+ "utcyear",
+ "utcquarter",
+ "utcmonth",
+ "utcday",
+ "utcdate",
+ "utchours",
+ "utcminutes",
+ "utcseconds",
+ "utcmilliseconds"
+ ],
+ "type": "string"
+ },
+ "Value": {
+ "type": [
+ "number",
+ "string",
+ "boolean",
+ "null"
+ ]
+ },
+ "YValueDef": {
+ "additionalProperties": false,
+ "description": "Definition object for a constant value of an encoding channel.",
+ "properties": {
+ "value": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "enum": [
+ "height"
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / \"#0099ff\" for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "required": [
+ "value"
+ ],
+ "type": "object"
+ },
+ "XValueDef": {
+ "additionalProperties": false,
+ "description": "Definition object for a constant value of an encoding channel.",
+ "properties": {
+ "value": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "enum": [
+ "width"
+ ],
+ "type": "string"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / \"#0099ff\" for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "required": [
+ "value"
+ ],
+ "type": "object"
+ },
+ "NumberValueDef": {
+ "additionalProperties": false,
+ "description": "Definition object for a constant value of an encoding channel.",
+ "properties": {
+ "value": {
+ "description": "A constant value in visual domain (e.g., `\"red\"` / \"#0099ff\" for color, values between `0` to `1` for opacity).",
+ "type": "number"
+ }
+ },
+ "required": [
+ "value"
+ ],
+ "type": "object"
+ },
+ "ValueDefWithCondition<MarkPropFieldDef,(string|null)>": {
+ "additionalProperties": false,
+ "description": "A ValueDef with Condition<ValueDef | FieldDef> where either the condition or the value are optional.\n{\n condition: {field: ...} | {value: ...},\n value: ...,\n}",
+ "minProperties": 1,
+ "properties": {
+ "condition": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalMarkPropFieldDef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalStringValueDef"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalStringValueDef"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "A field definition or one or more value definition(s) with a selection predicate."
+ },
+ "value": {
+ "description": "A constant value in visual domain (e.g., `\"red\"` / \"#0099ff\" for color, values between `0` to `1` for opacity).",
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "type": "object"
+ },
+ "ValueDefWithCondition<MarkPropFieldDef,number>": {
+ "additionalProperties": false,
+ "description": "A ValueDef with Condition<ValueDef | FieldDef> where either the condition or the value are optional.\n{\n condition: {field: ...} | {value: ...},\n value: ...,\n}",
+ "minProperties": 1,
+ "properties": {
+ "condition": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalMarkPropFieldDef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalNumberValueDef"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalNumberValueDef"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "A field definition or one or more value definition(s) with a selection predicate."
+ },
+ "value": {
+ "description": "A constant value in visual domain (e.g., `\"red\"` / \"#0099ff\" for color, values between `0` to `1` for opacity).",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "ValueDefWithCondition<MarkPropFieldDef<TypeForShape>,(string|null)>": {
+ "additionalProperties": false,
+ "description": "A ValueDef with Condition<ValueDef | FieldDef> where either the condition or the value are optional.\n{\n condition: {field: ...} | {value: ...},\n value: ...,\n}",
+ "minProperties": 1,
+ "properties": {
+ "condition": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalMarkPropFieldDef<TypeForShape>"
+ },
+ {
+ "$ref": "#/definitions/ConditionalStringValueDef"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalStringValueDef"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "A field definition or one or more value definition(s) with a selection predicate."
+ },
+ "value": {
+ "description": "A constant value in visual domain (e.g., `\"red\"` / \"#0099ff\" for color, values between `0` to `1` for opacity).",
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "type": "object"
+ },
+ "ValueDefWithCondition<TextFieldDef,Value>": {
+ "additionalProperties": false,
+ "description": "A ValueDef with Condition<ValueDef | FieldDef> where either the condition or the value are optional.\n{\n condition: {field: ...} | {value: ...},\n value: ...,\n}",
+ "minProperties": 1,
+ "properties": {
+ "condition": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalTextFieldDef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalValueDef"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "A field definition or one or more value definition(s) with a selection predicate."
+ },
+ "value": {
+ "$ref": "#/definitions/Value",
+ "description": "A constant value in visual domain (e.g., `\"red\"` / \"#0099ff\" for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "type": "object"
+ },
+ "ViewBackground": {
+ "additionalProperties": false,
+ "properties": {
+ "cornerRadius": {
+ "description": "The radius in pixels of rounded rectangle corners.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ "fill": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The fill color.\n\n__Default value:__ `undefined`"
+ },
+ "fillOpacity": {
+ "description": "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "opacity": {
+ "description": "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "stroke": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The stroke color.\n\n__Default value:__ `\"#ddd\"`"
+ },
+ "strokeCap": {
+ "$ref": "#/definitions/StrokeCap",
+ "description": "The stroke cap for line ending style. One of `\"butt\"`, `\"round\"`, or `\"square\"`.\n\n__Default value:__ `\"square\"`"
+ },
+ "strokeDash": {
+ "description": "An array of alternating stroke, space lengths for creating dashed or dotted lines.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "strokeDashOffset": {
+ "description": "The offset (in pixels) into which to begin drawing with the stroke dash array.",
+ "type": "number"
+ },
+ "strokeJoin": {
+ "$ref": "#/definitions/StrokeJoin",
+ "description": "The stroke line join method. One of `\"miter\"`, `\"round\"` or `\"bevel\"`.\n\n__Default value:__ `\"miter\"`"
+ },
+ "strokeMiterLimit": {
+ "description": "The miter limit at which to bevel a line join.",
+ "type": "number"
+ },
+ "strokeOpacity": {
+ "description": "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "strokeWidth": {
+ "description": "The stroke width, in pixels.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "style": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "A string or array of strings indicating the name of custom styles to apply to the view background. A style is a named collection of mark property defaults defined within the [style configuration](https://vega.github.io/vega-lite/docs/mark.html#style-config). If style is an array, later styles will override earlier styles.\n\n__Default value:__ `\"cell\"`\n__Note:__ Any specified view background properties will augment the default style."
+ }
+ },
+ "type": "object"
+ },
+ "ViewConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "clip": {
+ "description": "Whether the view should be clipped.",
+ "type": "boolean"
+ },
+ "cornerRadius": {
+ "description": "The radius in pixels of rounded rectangle corners.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ "fill": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The fill color.\n\n__Default value:__ `undefined`"
+ },
+ "fillOpacity": {
+ "description": "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "height": {
+ "description": "The default height of the single plot or each plot in a trellis plot when the visualization has a continuous (non-ordinal) y-scale with `rangeStep` = `null`.\n\n__Default value:__ `200`",
+ "type": "number"
+ },
+ "opacity": {
+ "description": "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "stroke": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The stroke color.\n\n__Default value:__ `\"#ddd\"`"
+ },
+ "strokeCap": {
+ "$ref": "#/definitions/StrokeCap",
+ "description": "The stroke cap for line ending style. One of `\"butt\"`, `\"round\"`, or `\"square\"`.\n\n__Default value:__ `\"square\"`"
+ },
+ "strokeDash": {
+ "description": "An array of alternating stroke, space lengths for creating dashed or dotted lines.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "strokeDashOffset": {
+ "description": "The offset (in pixels) into which to begin drawing with the stroke dash array.",
+ "type": "number"
+ },
+ "strokeJoin": {
+ "$ref": "#/definitions/StrokeJoin",
+ "description": "The stroke line join method. One of `\"miter\"`, `\"round\"` or `\"bevel\"`.\n\n__Default value:__ `\"miter\"`"
+ },
+ "strokeMiterLimit": {
+ "description": "The miter limit at which to bevel a line join.",
+ "type": "number"
+ },
+ "strokeOpacity": {
+ "description": "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "strokeWidth": {
+ "description": "The stroke width, in pixels.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "width": {
+ "description": "The default width of the single plot or each plot in a trellis plot when the visualization has a continuous (non-ordinal) x-scale or ordinal x-scale with `rangeStep` = `null`.\n\n__Default value:__ `200`",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "WindowFieldDef": {
+ "additionalProperties": false,
+ "properties": {
+ "as": {
+ "$ref": "#/definitions/FieldName",
+ "description": "The output name for the window operation."
+ },
+ "field": {
+ "$ref": "#/definitions/FieldName",
+ "description": "The data field for which to compute the aggregate or window function. This can be omitted for window functions that do not operate over a field such as `count`, `rank`, `dense_rank`."
+ },
+ "op": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/AggregateOp"
+ },
+ {
+ "$ref": "#/definitions/WindowOnlyOp"
+ }
+ ],
+ "description": "The window or aggregation operation to apply within a window (e.g.,`rank`, `lead`, `sum`, `average` or `count`). See the list of all supported operations [here](https://vega.github.io/vega-lite/docs/window.html#ops)."
+ },
+ "param": {
+ "description": "Parameter values for the window functions. Parameter values can be omitted for operations that do not accept a parameter.\n\nSee the list of all supported operations and their parameters [here](https://vega.github.io/vega-lite/docs/transforms/window.html).",
+ "type": "number"
+ }
+ },
+ "required": [
+ "op",
+ "as"
+ ],
+ "type": "object"
+ },
+ "WindowOnlyOp": {
+ "enum": [
+ "row_number",
+ "rank",
+ "dense_rank",
+ "percent_rank",
+ "cume_dist",
+ "ntile",
+ "lag",
+ "lead",
+ "first_value",
+ "last_value",
+ "nth_value"
+ ],
+ "type": "string"
+ },
+ "WindowTransform": {
+ "additionalProperties": false,
+ "properties": {
+ "frame": {
+ "description": "A frame specification as a two-element array indicating how the sliding window should proceed. The array entries should either be a number indicating the offset from the current data object, or null to indicate unbounded rows preceding or following the current data object. The default value is `[null, 0]`, indicating that the sliding window includes the current object and all preceding objects. The value `[-5, 5]` indicates that the window should include five objects preceding and five objects following the current object. Finally, `[null, null]` indicates that the window frame should always include all data objects. If you this frame and want to assign the same value to add objects, you can use the simpler [join aggregate transform](https://vega.github.io/vega-lite/docs/joinaggregate.html). The only operators affected are the aggregation operations and the `first_value`, `last_value`, and `nth_value` window operations. The other window operations are not affected by this.\n\n__Default value:__: `[null, 0]` (includes the current object and all preceding objects)",
+ "items": {
+ "type": [
+ "null",
+ "number"
+ ]
+ },
+ "type": "array"
+ },
+ "groupby": {
+ "description": "The data fields for partitioning the data objects into separate windows. If unspecified, all data points will be in a single window.",
+ "items": {
+ "$ref": "#/definitions/FieldName"
+ },
+ "type": "array"
+ },
+ "ignorePeers": {
+ "description": "Indicates if the sliding window frame should ignore peer values (data that are considered identical by the sort criteria). The default is false, causing the window frame to expand to include all peer values. If set to true, the window frame will be defined by offset values only. This setting only affects those operations that depend on the window frame, namely aggregation operations and the first_value, last_value, and nth_value window operations.\n\n__Default value:__ `false`",
+ "type": "boolean"
+ },
+ "sort": {
+ "description": "A sort field definition for sorting data objects within a window. If two data objects are considered equal by the comparator, they are considered “peer” values of equal rank. If sort is not specified, the order is undefined: data objects are processed in the order they are observed and none are considered peers (the ignorePeers parameter is ignored and treated as if set to `true`).",
+ "items": {
+ "$ref": "#/definitions/SortField"
+ },
+ "type": "array"
+ },
+ "window": {
+ "description": "The definition of the fields in the window, and what calculations to use.",
+ "items": {
+ "$ref": "#/definitions/WindowFieldDef"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "window"
+ ],
+ "type": "object"
+ }
+ }
+} \ No newline at end of file
diff --git a/venv/lib/python3.9/site-packages/altair/vegalite/v3/tests/__init__.py b/venv/lib/python3.9/site-packages/altair/vegalite/v3/tests/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vegalite/v3/tests/__init__.py
diff --git a/venv/lib/python3.9/site-packages/altair/vegalite/v3/tests/test_api.py b/venv/lib/python3.9/site-packages/altair/vegalite/v3/tests/test_api.py
new file mode 100644
index 00000000..489d8cf6
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vegalite/v3/tests/test_api.py
@@ -0,0 +1,937 @@
+"""Unit tests for altair API"""
+
+import io
+import json
+import operator
+import os
+import tempfile
+
+import jsonschema
+import pytest
+import pandas as pd
+
+import altair.vegalite.v3 as alt
+from altair.utils import AltairDeprecationWarning
+
+try:
+ import altair_saver # noqa: F401
+except ImportError:
+ altair_saver = None
+
+
+def getargs(*args, **kwargs):
+ return args, kwargs
+
+
+OP_DICT = {
+ "layer": operator.add,
+ "hconcat": operator.or_,
+ "vconcat": operator.and_,
+}
+
+
+def _make_chart_type(chart_type):
+ data = pd.DataFrame(
+ {
+ "x": [28, 55, 43, 91, 81, 53, 19, 87],
+ "y": [43, 91, 81, 53, 19, 87, 52, 28],
+ "color": list("AAAABBBB"),
+ }
+ )
+ base = (
+ alt.Chart(data)
+ .mark_point()
+ .encode(
+ x="x",
+ y="y",
+ color="color",
+ )
+ )
+
+ if chart_type in ["layer", "hconcat", "vconcat", "concat"]:
+ func = getattr(alt, chart_type)
+ return func(base.mark_square(), base.mark_circle())
+ elif chart_type == "facet":
+ return base.facet("color")
+ elif chart_type == "facet_encoding":
+ return base.encode(facet="color")
+ elif chart_type == "repeat":
+ return base.encode(alt.X(alt.repeat(), type="quantitative")).repeat(["x", "y"])
+ elif chart_type == "chart":
+ return base
+ else:
+ raise ValueError("chart_type='{}' is not recognized".format(chart_type))
+
+
+@pytest.fixture
+def basic_chart():
+ data = pd.DataFrame(
+ {
+ "a": ["A", "B", "C", "D", "E", "F", "G", "H", "I"],
+ "b": [28, 55, 43, 91, 81, 53, 19, 87, 52],
+ }
+ )
+
+ return alt.Chart(data).mark_bar().encode(x="a", y="b")
+
+
+def test_chart_data_types():
+ def Chart(data):
+ return alt.Chart(data).mark_point().encode(x="x:Q", y="y:Q")
+
+ # Url Data
+ data = "/path/to/my/data.csv"
+ dct = Chart(data).to_dict()
+ assert dct["data"] == {"url": data}
+
+ # Dict Data
+ data = {"values": [{"x": 1, "y": 2}, {"x": 2, "y": 3}]}
+ with alt.data_transformers.enable(consolidate_datasets=False):
+ dct = Chart(data).to_dict()
+ assert dct["data"] == data
+
+ with alt.data_transformers.enable(consolidate_datasets=True):
+ dct = Chart(data).to_dict()
+ name = dct["data"]["name"]
+ assert dct["datasets"][name] == data["values"]
+
+ # DataFrame data
+ data = pd.DataFrame({"x": range(5), "y": range(5)})
+ with alt.data_transformers.enable(consolidate_datasets=False):
+ dct = Chart(data).to_dict()
+ assert dct["data"]["values"] == data.to_dict(orient="records")
+
+ with alt.data_transformers.enable(consolidate_datasets=True):
+ dct = Chart(data).to_dict()
+ name = dct["data"]["name"]
+ assert dct["datasets"][name] == data.to_dict(orient="records")
+
+ # Named data object
+ data = alt.NamedData(name="Foo")
+ dct = Chart(data).to_dict()
+ assert dct["data"] == {"name": "Foo"}
+
+
+def test_chart_infer_types():
+ data = pd.DataFrame(
+ {
+ "x": pd.date_range("2012", periods=10, freq="Y"),
+ "y": range(10),
+ "c": list("abcabcabca"),
+ }
+ )
+
+ def _check_encodings(chart):
+ dct = chart.to_dict()
+ assert dct["encoding"]["x"]["type"] == "temporal"
+ assert dct["encoding"]["x"]["field"] == "x"
+ assert dct["encoding"]["y"]["type"] == "quantitative"
+ assert dct["encoding"]["y"]["field"] == "y"
+ assert dct["encoding"]["color"]["type"] == "nominal"
+ assert dct["encoding"]["color"]["field"] == "c"
+
+ # Pass field names by keyword
+ chart = alt.Chart(data).mark_point().encode(x="x", y="y", color="c")
+ _check_encodings(chart)
+
+ # pass Channel objects by keyword
+ chart = (
+ alt.Chart(data)
+ .mark_point()
+ .encode(x=alt.X("x"), y=alt.Y("y"), color=alt.Color("c"))
+ )
+ _check_encodings(chart)
+
+ # pass Channel objects by value
+ chart = alt.Chart(data).mark_point().encode(alt.X("x"), alt.Y("y"), alt.Color("c"))
+ _check_encodings(chart)
+
+ # override default types
+ chart = (
+ alt.Chart(data)
+ .mark_point()
+ .encode(alt.X("x", type="nominal"), alt.Y("y", type="ordinal"))
+ )
+ dct = chart.to_dict()
+ assert dct["encoding"]["x"]["type"] == "nominal"
+ assert dct["encoding"]["y"]["type"] == "ordinal"
+
+
+@pytest.mark.parametrize(
+ "args, kwargs",
+ [
+ getargs(detail=["value:Q", "name:N"], tooltip=["value:Q", "name:N"]),
+ getargs(detail=["value", "name"], tooltip=["value", "name"]),
+ getargs(alt.Detail(["value:Q", "name:N"]), alt.Tooltip(["value:Q", "name:N"])),
+ getargs(alt.Detail(["value", "name"]), alt.Tooltip(["value", "name"])),
+ getargs(
+ [alt.Detail("value:Q"), alt.Detail("name:N")],
+ [alt.Tooltip("value:Q"), alt.Tooltip("name:N")],
+ ),
+ getargs(
+ [alt.Detail("value"), alt.Detail("name")],
+ [alt.Tooltip("value"), alt.Tooltip("name")],
+ ),
+ ],
+)
+def test_multiple_encodings(args, kwargs):
+ df = pd.DataFrame({"value": [1, 2, 3], "name": ["A", "B", "C"]})
+ encoding_dct = [
+ {"field": "value", "type": "quantitative"},
+ {"field": "name", "type": "nominal"},
+ ]
+ chart = alt.Chart(df).mark_point().encode(*args, **kwargs)
+ dct = chart.to_dict()
+ assert dct["encoding"]["detail"] == encoding_dct
+ assert dct["encoding"]["tooltip"] == encoding_dct
+
+
+def test_chart_operations():
+ data = pd.DataFrame(
+ {
+ "x": pd.date_range("2012", periods=10, freq="Y"),
+ "y": range(10),
+ "c": list("abcabcabca"),
+ }
+ )
+ chart1 = alt.Chart(data).mark_line().encode(x="x", y="y", color="c")
+ chart2 = chart1.mark_point()
+ chart3 = chart1.mark_circle()
+ chart4 = chart1.mark_square()
+
+ chart = chart1 + chart2 + chart3
+ assert isinstance(chart, alt.LayerChart)
+ assert len(chart.layer) == 3
+ chart += chart4
+ assert len(chart.layer) == 4
+
+ chart = chart1 | chart2 | chart3
+ assert isinstance(chart, alt.HConcatChart)
+ assert len(chart.hconcat) == 3
+ chart |= chart4
+ assert len(chart.hconcat) == 4
+
+ chart = chart1 & chart2 & chart3
+ assert isinstance(chart, alt.VConcatChart)
+ assert len(chart.vconcat) == 3
+ chart &= chart4
+ assert len(chart.vconcat) == 4
+
+
+def test_selection_to_dict():
+ brush = alt.selection(type="interval")
+
+ # test some value selections
+ # Note: X and Y cannot have conditions
+ alt.Chart("path/to/data.json").mark_point().encode(
+ color=alt.condition(brush, alt.ColorValue("red"), alt.ColorValue("blue")),
+ opacity=alt.condition(brush, alt.value(0.5), alt.value(1.0)),
+ text=alt.condition(brush, alt.TextValue("foo"), alt.value("bar")),
+ ).to_dict()
+
+ # test some field selections
+ # Note: X and Y cannot have conditions
+ # Conditions cannot both be fields
+ alt.Chart("path/to/data.json").mark_point().encode(
+ color=alt.condition(brush, alt.Color("col1:N"), alt.value("blue")),
+ opacity=alt.condition(brush, "col1:N", alt.value(0.5)),
+ text=alt.condition(brush, alt.value("abc"), alt.Text("col2:N")),
+ size=alt.condition(brush, alt.value(20), "col2:N"),
+ ).to_dict()
+
+
+def test_selection_expression():
+ selection = alt.selection_single(fields=["value"])
+
+ assert isinstance(selection.value, alt.expr.Expression)
+ assert selection.value.to_dict() == "{0}.value".format(selection.name)
+
+ assert isinstance(selection["value"], alt.expr.Expression)
+ assert selection["value"].to_dict() == "{0}['value']".format(selection.name)
+
+ with pytest.raises(AttributeError):
+ selection.__magic__
+
+
+@pytest.mark.parametrize("format", ["html", "json", "png", "svg", "pdf"])
+def test_save(format, basic_chart):
+ if format in ["pdf", "png"]:
+ out = io.BytesIO()
+ mode = "rb"
+ else:
+ out = io.StringIO()
+ mode = "r"
+
+ if format in ["svg", "png", "pdf"]:
+ if not altair_saver:
+ with pytest.raises(ValueError) as err:
+ basic_chart.save(out, format=format)
+ assert "github.com/altair-viz/altair_saver" in str(err.value)
+ return
+ elif format not in altair_saver.available_formats():
+ with pytest.raises(ValueError) as err:
+ basic_chart.save(out, format=format)
+ assert f"No enabled saver found that supports format='{format}'" in str(
+ err.value
+ )
+ return
+
+ basic_chart.save(out, format=format)
+ out.seek(0)
+ content = out.read()
+
+ if format == "json":
+ assert "$schema" in json.loads(content)
+ if format == "html":
+ assert content.startswith("<!DOCTYPE html>")
+
+ fid, filename = tempfile.mkstemp(suffix="." + format)
+ os.close(fid)
+
+ try:
+ basic_chart.save(filename)
+ with open(filename, mode) as f:
+ assert f.read()[:1000] == content[:1000]
+ finally:
+ os.remove(filename)
+
+
+def test_facet_basic():
+ # wrapped facet
+ chart1 = (
+ alt.Chart("data.csv")
+ .mark_point()
+ .encode(
+ x="x:Q",
+ y="y:Q",
+ )
+ .facet("category:N", columns=2)
+ )
+
+ dct1 = chart1.to_dict()
+
+ assert dct1["facet"] == alt.Facet("category:N").to_dict()
+ assert dct1["columns"] == 2
+ assert dct1["data"] == alt.UrlData("data.csv").to_dict()
+
+ # explicit row/col facet
+ chart2 = (
+ alt.Chart("data.csv")
+ .mark_point()
+ .encode(
+ x="x:Q",
+ y="y:Q",
+ )
+ .facet(row="category1:Q", column="category2:Q")
+ )
+
+ dct2 = chart2.to_dict()
+
+ assert dct2["facet"]["row"] == alt.Facet("category1:Q").to_dict()
+ assert dct2["facet"]["column"] == alt.Facet("category2:Q").to_dict()
+ assert "columns" not in dct2
+ assert dct2["data"] == alt.UrlData("data.csv").to_dict()
+
+
+def test_facet_parse():
+ chart = (
+ alt.Chart("data.csv")
+ .mark_point()
+ .encode(x="x:Q", y="y:Q")
+ .facet(row="row:N", column="column:O")
+ )
+ dct = chart.to_dict()
+ assert dct["data"] == {"url": "data.csv"}
+ assert "data" not in dct["spec"]
+ assert dct["facet"] == {
+ "column": {"field": "column", "type": "ordinal"},
+ "row": {"field": "row", "type": "nominal"},
+ }
+
+
+def test_facet_parse_data():
+ data = pd.DataFrame({"x": range(5), "y": range(5), "row": list("abcab")})
+ chart = (
+ alt.Chart(data)
+ .mark_point()
+ .encode(x="x", y="y:O")
+ .facet(row="row", column="column:O")
+ )
+ with alt.data_transformers.enable(consolidate_datasets=False):
+ dct = chart.to_dict()
+ assert "values" in dct["data"]
+ assert "data" not in dct["spec"]
+ assert dct["facet"] == {
+ "column": {"field": "column", "type": "ordinal"},
+ "row": {"field": "row", "type": "nominal"},
+ }
+
+ with alt.data_transformers.enable(consolidate_datasets=True):
+ dct = chart.to_dict()
+ assert "datasets" in dct
+ assert "name" in dct["data"]
+ assert "data" not in dct["spec"]
+ assert dct["facet"] == {
+ "column": {"field": "column", "type": "ordinal"},
+ "row": {"field": "row", "type": "nominal"},
+ }
+
+
+def test_selection():
+ # test instantiation of selections
+ interval = alt.selection_interval(name="selec_1")
+ assert interval.selection.type == "interval"
+ assert interval.name == "selec_1"
+
+ single = alt.selection_single(name="selec_2")
+ assert single.selection.type == "single"
+ assert single.name == "selec_2"
+
+ multi = alt.selection_multi(name="selec_3")
+ assert multi.selection.type == "multi"
+ assert multi.name == "selec_3"
+
+ # test adding to chart
+ chart = alt.Chart().add_selection(single)
+ chart = chart.add_selection(multi, interval)
+ assert set(chart.selection.keys()) == {"selec_1", "selec_2", "selec_3"}
+
+ # test logical operations
+ assert isinstance(single & multi, alt.Selection)
+ assert isinstance(single | multi, alt.Selection)
+ assert isinstance(~single, alt.Selection)
+ assert isinstance((single & multi)[0].group, alt.SelectionAnd)
+ assert isinstance((single | multi)[0].group, alt.SelectionOr)
+ assert isinstance((~single)[0].group, alt.SelectionNot)
+
+ # test that default names increment (regression for #1454)
+ sel1 = alt.selection_single()
+ sel2 = alt.selection_multi()
+ sel3 = alt.selection_interval()
+ names = {s.name for s in (sel1, sel2, sel3)}
+ assert len(names) == 3
+
+
+def test_transforms():
+ # aggregate transform
+ agg1 = alt.AggregatedFieldDef(**{"as": "x1", "op": "mean", "field": "y"})
+ agg2 = alt.AggregatedFieldDef(**{"as": "x2", "op": "median", "field": "z"})
+ chart = alt.Chart().transform_aggregate([agg1], ["foo"], x2="median(z)")
+ kwds = dict(aggregate=[agg1, agg2], groupby=["foo"])
+ assert chart.transform == [alt.AggregateTransform(**kwds)]
+
+ # bin transform
+ chart = alt.Chart().transform_bin("binned", field="field", bin=True)
+ kwds = {"as": "binned", "field": "field", "bin": True}
+ assert chart.transform == [alt.BinTransform(**kwds)]
+
+ # calcualte transform
+ chart = alt.Chart().transform_calculate("calc", "datum.a * 4")
+ kwds = {"as": "calc", "calculate": "datum.a * 4"}
+ assert chart.transform == [alt.CalculateTransform(**kwds)]
+
+ # impute transform
+ chart = alt.Chart().transform_impute("field", "key", groupby=["x"])
+ kwds = {"impute": "field", "key": "key", "groupby": ["x"]}
+ assert chart.transform == [alt.ImputeTransform(**kwds)]
+
+ # joinaggregate transform
+ chart = alt.Chart().transform_joinaggregate(min="min(x)", groupby=["key"])
+ kwds = {
+ "joinaggregate": [
+ alt.JoinAggregateFieldDef(field="x", op="min", **{"as": "min"})
+ ],
+ "groupby": ["key"],
+ }
+ assert chart.transform == [alt.JoinAggregateTransform(**kwds)]
+
+ # filter transform
+ chart = alt.Chart().transform_filter("datum.a < 4")
+ assert chart.transform == [alt.FilterTransform(filter="datum.a < 4")]
+
+ # flatten transform
+ chart = alt.Chart().transform_flatten(["A", "B"], ["X", "Y"])
+ kwds = {"as": ["X", "Y"], "flatten": ["A", "B"]}
+ assert chart.transform == [alt.FlattenTransform(**kwds)]
+
+ # fold transform
+ chart = alt.Chart().transform_fold(["A", "B", "C"], as_=["key", "val"])
+ kwds = {"as": ["key", "val"], "fold": ["A", "B", "C"]}
+ assert chart.transform == [alt.FoldTransform(**kwds)]
+
+ # lookup transform
+ lookup_data = alt.LookupData(alt.UrlData("foo.csv"), "id", ["rate"])
+ chart = alt.Chart().transform_lookup(
+ from_=lookup_data, as_="a", lookup="a", default="b"
+ )
+ kwds = {"from": lookup_data, "as": "a", "lookup": "a", "default": "b"}
+ assert chart.transform == [alt.LookupTransform(**kwds)]
+
+ # sample transform
+ chart = alt.Chart().transform_sample()
+ assert chart.transform == [alt.SampleTransform(1000)]
+
+ # stack transform
+ chart = alt.Chart().transform_stack("stacked", "x", groupby=["y"])
+ assert chart.transform == [
+ alt.StackTransform(stack="x", groupby=["y"], **{"as": "stacked"})
+ ]
+
+ # timeUnit transform
+ chart = alt.Chart().transform_timeunit("foo", field="x", timeUnit="date")
+ kwds = {"as": "foo", "field": "x", "timeUnit": "date"}
+ assert chart.transform == [alt.TimeUnitTransform(**kwds)]
+
+ # window transform
+ chart = alt.Chart().transform_window(xsum="sum(x)", ymin="min(y)", frame=[None, 0])
+ window = [
+ alt.WindowFieldDef(**{"as": "xsum", "field": "x", "op": "sum"}),
+ alt.WindowFieldDef(**{"as": "ymin", "field": "y", "op": "min"}),
+ ]
+
+ # kwargs don't maintain order in Python < 3.6, so window list can
+ # be reversed
+ assert chart.transform == [
+ alt.WindowTransform(frame=[None, 0], window=window)
+ ] or chart.transform == [alt.WindowTransform(frame=[None, 0], window=window[::-1])]
+
+
+def test_filter_transform_selection_predicates():
+ selector1 = alt.selection_interval(name="s1")
+ selector2 = alt.selection_interval(name="s2")
+ base = alt.Chart("data.txt").mark_point()
+
+ chart = base.transform_filter(selector1)
+ assert chart.to_dict()["transform"] == [{"filter": {"selection": "s1"}}]
+
+ chart = base.transform_filter(~selector1)
+ assert chart.to_dict()["transform"] == [{"filter": {"selection": {"not": "s1"}}}]
+
+ chart = base.transform_filter(selector1 & selector2)
+ assert chart.to_dict()["transform"] == [
+ {"filter": {"selection": {"and": ["s1", "s2"]}}}
+ ]
+
+ chart = base.transform_filter(selector1 | selector2)
+ assert chart.to_dict()["transform"] == [
+ {"filter": {"selection": {"or": ["s1", "s2"]}}}
+ ]
+
+ chart = base.transform_filter(selector1 | ~selector2)
+ assert chart.to_dict()["transform"] == [
+ {"filter": {"selection": {"or": ["s1", {"not": "s2"}]}}}
+ ]
+
+ chart = base.transform_filter(~selector1 | ~selector2)
+ assert chart.to_dict()["transform"] == [
+ {"filter": {"selection": {"or": [{"not": "s1"}, {"not": "s2"}]}}}
+ ]
+
+ chart = base.transform_filter(~(selector1 & selector2))
+ assert chart.to_dict()["transform"] == [
+ {"filter": {"selection": {"not": {"and": ["s1", "s2"]}}}}
+ ]
+
+
+def test_resolve_methods():
+ chart = alt.LayerChart().resolve_axis(x="shared", y="independent")
+ assert chart.resolve == alt.Resolve(
+ axis=alt.AxisResolveMap(x="shared", y="independent")
+ )
+
+ chart = alt.LayerChart().resolve_legend(color="shared", fill="independent")
+ assert chart.resolve == alt.Resolve(
+ legend=alt.LegendResolveMap(color="shared", fill="independent")
+ )
+
+ chart = alt.LayerChart().resolve_scale(x="shared", y="independent")
+ assert chart.resolve == alt.Resolve(
+ scale=alt.ScaleResolveMap(x="shared", y="independent")
+ )
+
+
+def test_layer_encodings():
+ chart = alt.LayerChart().encode(x="column:Q")
+ assert chart.encoding.x == alt.X(shorthand="column:Q")
+
+
+def test_add_selection():
+ selections = [
+ alt.selection_interval(),
+ alt.selection_single(),
+ alt.selection_multi(),
+ ]
+ chart = (
+ alt.Chart()
+ .mark_point()
+ .add_selection(selections[0])
+ .add_selection(selections[1], selections[2])
+ )
+ expected = {s.name: s.selection for s in selections}
+ assert chart.selection == expected
+
+
+def test_repeat_add_selections():
+ base = alt.Chart("data.csv").mark_point()
+ selection = alt.selection_single()
+ chart1 = base.add_selection(selection).repeat(list("ABC"))
+ chart2 = base.repeat(list("ABC")).add_selection(selection)
+ assert chart1.to_dict() == chart2.to_dict()
+
+
+def test_facet_add_selections():
+ base = alt.Chart("data.csv").mark_point()
+ selection = alt.selection_single()
+ chart1 = base.add_selection(selection).facet("val:Q")
+ chart2 = base.facet("val:Q").add_selection(selection)
+ assert chart1.to_dict() == chart2.to_dict()
+
+
+def test_layer_add_selection():
+ base = alt.Chart("data.csv").mark_point()
+ selection = alt.selection_single()
+ chart1 = alt.layer(base.add_selection(selection), base)
+ chart2 = alt.layer(base, base).add_selection(selection)
+ assert chart1.to_dict() == chart2.to_dict()
+
+
+@pytest.mark.parametrize("charttype", [alt.concat, alt.hconcat, alt.vconcat])
+def test_compound_add_selections(charttype):
+ base = alt.Chart("data.csv").mark_point()
+ selection = alt.selection_single()
+ chart1 = charttype(base.add_selection(selection), base.add_selection(selection))
+ chart2 = charttype(base, base).add_selection(selection)
+ assert chart1.to_dict() == chart2.to_dict()
+
+
+def test_selection_property():
+ sel = alt.selection_interval()
+ chart = alt.Chart("data.csv").mark_point().properties(selection=sel)
+
+ assert list(chart["selection"].keys()) == [sel.name]
+
+
+def test_LookupData():
+ df = pd.DataFrame({"x": [1, 2, 3], "y": [4, 5, 6]})
+ lookup = alt.LookupData(data=df, key="x")
+
+ dct = lookup.to_dict()
+ assert dct["key"] == "x"
+ assert dct["data"] == {
+ "values": [{"x": 1, "y": 4}, {"x": 2, "y": 5}, {"x": 3, "y": 6}]
+ }
+
+
+def test_themes():
+ chart = alt.Chart("foo.txt").mark_point()
+ active = alt.themes.active
+
+ try:
+ alt.themes.enable("default")
+ assert chart.to_dict()["config"] == {
+ "mark": {"tooltip": None},
+ "view": {"width": 400, "height": 300},
+ }
+
+ alt.themes.enable("opaque")
+ assert chart.to_dict()["config"] == {
+ "background": "white",
+ "mark": {"tooltip": None},
+ "view": {"width": 400, "height": 300},
+ }
+
+ alt.themes.enable("none")
+ assert "config" not in chart.to_dict()
+
+ finally:
+ # re-enable the original active theme
+ alt.themes.enable(active)
+
+
+def test_chart_from_dict():
+ base = alt.Chart("data.csv").mark_point().encode(x="x:Q", y="y:Q")
+
+ charts = [
+ base,
+ base + base,
+ base | base,
+ base & base,
+ base.facet("c:N"),
+ (base + base).facet(row="c:N", data="data.csv"),
+ base.repeat(["c", "d"]),
+ (base + base).repeat(row=["c", "d"]),
+ ]
+
+ for chart in charts:
+ print(chart)
+ chart_out = alt.Chart.from_dict(chart.to_dict())
+ assert type(chart_out) is type(chart)
+
+ # test that an invalid spec leads to a schema validation error
+ with pytest.raises(jsonschema.ValidationError):
+ alt.Chart.from_dict({"invalid": "spec"})
+
+
+def test_consolidate_datasets(basic_chart):
+ subchart1 = basic_chart
+ subchart2 = basic_chart.copy()
+ subchart2.data = basic_chart.data.copy()
+ chart = subchart1 | subchart2
+
+ with alt.data_transformers.enable(consolidate_datasets=True):
+ dct_consolidated = chart.to_dict()
+
+ with alt.data_transformers.enable(consolidate_datasets=False):
+ dct_standard = chart.to_dict()
+
+ assert "datasets" in dct_consolidated
+ assert "datasets" not in dct_standard
+
+ datasets = dct_consolidated["datasets"]
+
+ # two dataset copies should be recognized as duplicates
+ assert len(datasets) == 1
+
+ # make sure data matches original & names are correct
+ name, data = datasets.popitem()
+
+ for spec in dct_standard["hconcat"]:
+ assert spec["data"]["values"] == data
+
+ for spec in dct_consolidated["hconcat"]:
+ assert spec["data"] == {"name": name}
+
+
+def test_consolidate_InlineData():
+ data = alt.InlineData(
+ values=[{"a": 1, "b": 1}, {"a": 2, "b": 2}], format={"type": "csv"}
+ )
+ chart = alt.Chart(data).mark_point()
+
+ with alt.data_transformers.enable(consolidate_datasets=False):
+ dct = chart.to_dict()
+ assert dct["data"]["format"] == data.format
+ assert dct["data"]["values"] == data.values
+
+ with alt.data_transformers.enable(consolidate_datasets=True):
+ dct = chart.to_dict()
+ assert dct["data"]["format"] == data.format
+ assert list(dct["datasets"].values())[0] == data.values
+
+ data = alt.InlineData(values=[], name="runtime_data")
+ chart = alt.Chart(data).mark_point()
+
+ with alt.data_transformers.enable(consolidate_datasets=False):
+ dct = chart.to_dict()
+ assert dct["data"] == data.to_dict()
+
+ with alt.data_transformers.enable(consolidate_datasets=True):
+ dct = chart.to_dict()
+ assert dct["data"] == data.to_dict()
+
+
+def test_deprecated_encodings():
+ base = alt.Chart("data.txt").mark_point()
+
+ with pytest.warns(AltairDeprecationWarning) as record:
+ chart1 = base.encode(strokeOpacity=alt.Strokeopacity("x:Q")).to_dict()
+ assert "alt.StrokeOpacity" in record[0].message.args[0]
+ chart2 = base.encode(strokeOpacity=alt.StrokeOpacity("x:Q")).to_dict()
+
+ assert chart1 == chart2
+
+
+def test_repeat():
+ # wrapped repeat
+ chart1 = (
+ alt.Chart("data.csv")
+ .mark_point()
+ .encode(
+ x=alt.X(alt.repeat(), type="quantitative"),
+ y="y:Q",
+ )
+ .repeat(["A", "B", "C", "D"], columns=2)
+ )
+
+ dct1 = chart1.to_dict()
+
+ assert dct1["repeat"] == ["A", "B", "C", "D"]
+ assert dct1["columns"] == 2
+ assert dct1["spec"]["encoding"]["x"]["field"] == {"repeat": "repeat"}
+
+ # explicit row/col repeat
+ chart2 = (
+ alt.Chart("data.csv")
+ .mark_point()
+ .encode(
+ x=alt.X(alt.repeat("row"), type="quantitative"),
+ y=alt.Y(alt.repeat("column"), type="quantitative"),
+ )
+ .repeat(row=["A", "B", "C"], column=["C", "B", "A"])
+ )
+
+ dct2 = chart2.to_dict()
+
+ assert dct2["repeat"] == {"row": ["A", "B", "C"], "column": ["C", "B", "A"]}
+ assert "columns" not in dct2
+ assert dct2["spec"]["encoding"]["x"]["field"] == {"repeat": "row"}
+ assert dct2["spec"]["encoding"]["y"]["field"] == {"repeat": "column"}
+
+
+def test_data_property():
+ data = pd.DataFrame({"x": [1, 2, 3], "y": list("ABC")})
+ chart1 = alt.Chart(data).mark_point()
+ chart2 = alt.Chart().mark_point().properties(data=data)
+
+ assert chart1.to_dict() == chart2.to_dict()
+
+
+@pytest.mark.parametrize("method", ["layer", "hconcat", "vconcat", "concat"])
+@pytest.mark.parametrize(
+ "data", ["data.json", pd.DataFrame({"x": range(3), "y": list("abc")})]
+)
+def test_subcharts_with_same_data(method, data):
+ func = getattr(alt, method)
+
+ point = alt.Chart(data).mark_point().encode(x="x:Q", y="y:Q")
+ line = point.mark_line()
+ text = point.mark_text()
+
+ chart1 = func(point, line, text)
+ assert chart1.data is not alt.Undefined
+ assert all(c.data is alt.Undefined for c in getattr(chart1, method))
+
+ if method != "concat":
+ op = OP_DICT[method]
+ chart2 = op(op(point, line), text)
+ assert chart2.data is not alt.Undefined
+ assert all(c.data is alt.Undefined for c in getattr(chart2, method))
+
+
+@pytest.mark.parametrize("method", ["layer", "hconcat", "vconcat", "concat"])
+@pytest.mark.parametrize(
+ "data", ["data.json", pd.DataFrame({"x": range(3), "y": list("abc")})]
+)
+def test_subcharts_different_data(method, data):
+ func = getattr(alt, method)
+
+ point = alt.Chart(data).mark_point().encode(x="x:Q", y="y:Q")
+ otherdata = alt.Chart("data.csv").mark_point().encode(x="x:Q", y="y:Q")
+ nodata = alt.Chart().mark_point().encode(x="x:Q", y="y:Q")
+
+ chart1 = func(point, otherdata)
+ assert chart1.data is alt.Undefined
+ assert getattr(chart1, method)[0].data is data
+
+ chart2 = func(point, nodata)
+ assert chart2.data is alt.Undefined
+ assert getattr(chart2, method)[0].data is data
+
+
+def test_layer_facet(basic_chart):
+ chart = (basic_chart + basic_chart).facet(row="row:Q")
+ assert chart.data is not alt.Undefined
+ assert chart.spec.data is alt.Undefined
+ for layer in chart.spec.layer:
+ assert layer.data is alt.Undefined
+
+ dct = chart.to_dict()
+ assert "data" in dct
+
+
+def test_layer_errors():
+ toplevel_chart = alt.Chart("data.txt").mark_point().configure_legend(columns=2)
+
+ facet_chart1 = alt.Chart("data.txt").mark_point().encode(facet="row:Q")
+
+ facet_chart2 = alt.Chart("data.txt").mark_point().facet("row:Q")
+
+ repeat_chart = alt.Chart("data.txt").mark_point().repeat(["A", "B", "C"])
+
+ simple_chart = alt.Chart("data.txt").mark_point()
+
+ with pytest.raises(ValueError) as err:
+ toplevel_chart + simple_chart
+ assert str(err.value).startswith(
+ 'Objects with "config" attribute cannot be used within LayerChart.'
+ )
+
+ with pytest.raises(ValueError) as err:
+ repeat_chart + simple_chart
+ assert str(err.value) == "Repeat charts cannot be layered."
+
+ with pytest.raises(ValueError) as err:
+ facet_chart1 + simple_chart
+ assert str(err.value) == "Faceted charts cannot be layered."
+
+ with pytest.raises(ValueError) as err:
+ alt.layer(simple_chart) + facet_chart2
+ assert str(err.value) == "Faceted charts cannot be layered."
+
+
+@pytest.mark.parametrize(
+ "chart_type",
+ ["layer", "hconcat", "vconcat", "concat", "facet", "facet_encoding", "repeat"],
+)
+def test_resolve(chart_type):
+ chart = _make_chart_type(chart_type)
+ chart = (
+ chart.resolve_scale(
+ x="independent",
+ )
+ .resolve_legend(color="independent")
+ .resolve_axis(y="independent")
+ )
+ dct = chart.to_dict()
+ assert dct["resolve"] == {
+ "scale": {"x": "independent"},
+ "legend": {"color": "independent"},
+ "axis": {"y": "independent"},
+ }
+
+
+# TODO: test vconcat, hconcat, concat when schema allows them.
+# This is blocked by https://github.com/vega/vega-lite/issues/5261
+@pytest.mark.parametrize("chart_type", ["chart", "layer", "facet_encoding"])
+@pytest.mark.parametrize("facet_arg", [None, "facet", "row", "column"])
+def test_facet(chart_type, facet_arg):
+ chart = _make_chart_type(chart_type)
+ if facet_arg is None:
+ chart = chart.facet("color:N", columns=2)
+ else:
+ chart = chart.facet(**{facet_arg: "color:N", "columns": 2})
+ dct = chart.to_dict()
+
+ assert "spec" in dct
+ assert dct["columns"] == 2
+ expected = {"field": "color", "type": "nominal"}
+ if facet_arg is None or facet_arg == "facet":
+ assert dct["facet"] == expected
+ else:
+ assert dct["facet"][facet_arg] == expected
+
+
+def test_sequence():
+ data = alt.sequence(100)
+ assert data.to_dict() == {"sequence": {"start": 0, "stop": 100}}
+
+ data = alt.sequence(5, 10)
+ assert data.to_dict() == {"sequence": {"start": 5, "stop": 10}}
+
+ data = alt.sequence(0, 1, 0.1, as_="x")
+ assert data.to_dict() == {
+ "sequence": {"start": 0, "stop": 1, "step": 0.1, "as": "x"}
+ }
+
+
+def test_graticule():
+ data = alt.graticule()
+ assert data.to_dict() == {"graticule": True}
+
+ data = alt.graticule(step=[15, 15])
+ assert data.to_dict() == {"graticule": {"step": [15, 15]}}
+
+
+def test_sphere():
+ data = alt.sphere()
+ assert data.to_dict() == {"sphere": True}
diff --git a/venv/lib/python3.9/site-packages/altair/vegalite/v3/tests/test_data.py b/venv/lib/python3.9/site-packages/altair/vegalite/v3/tests/test_data.py
new file mode 100644
index 00000000..8eae11c8
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vegalite/v3/tests/test_data.py
@@ -0,0 +1,33 @@
+import os
+
+import pandas as pd
+import pytest
+
+from .. import data as alt
+
+
+@pytest.fixture
+def sample_data():
+ return pd.DataFrame({"x": range(10), "y": range(10)})
+
+
+def test_disable_max_rows(sample_data):
+ with alt.data_transformers.enable("default", max_rows=5):
+ # Ensure max rows error is raised.
+ with pytest.raises(alt.MaxRowsError):
+ alt.data_transformers.get()(sample_data)
+
+ # Ensure that max rows error is properly disabled.
+ with alt.data_transformers.disable_max_rows():
+ alt.data_transformers.get()(sample_data)
+
+ try:
+ with alt.data_transformers.enable("json"):
+ # Ensure that there is no TypeError for non-max_rows transformers.
+ with alt.data_transformers.disable_max_rows():
+ jsonfile = alt.data_transformers.get()(sample_data)
+ except TypeError:
+ jsonfile = {}
+ finally:
+ if jsonfile:
+ os.remove(jsonfile["url"])
diff --git a/venv/lib/python3.9/site-packages/altair/vegalite/v3/tests/test_display.py b/venv/lib/python3.9/site-packages/altair/vegalite/v3/tests/test_display.py
new file mode 100644
index 00000000..9035ead7
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vegalite/v3/tests/test_display.py
@@ -0,0 +1,69 @@
+from contextlib import contextmanager
+
+import pytest
+
+import altair.vegalite.v3 as alt
+
+
+@contextmanager
+def check_render_options(**options):
+ """
+ Context manager that will assert that alt.renderers.options are equivalent
+ to the given options in the IPython.display.display call
+ """
+ import IPython.display
+
+ def check_options(obj):
+ assert alt.renderers.options == options
+
+ _display = IPython.display.display
+ IPython.display.display = check_options
+ try:
+ yield
+ finally:
+ IPython.display.display = _display
+
+
+def test_check_renderer_options():
+ # this test should pass
+ with check_render_options():
+ from IPython.display import display
+
+ display(None)
+
+ # check that an error is appropriately raised if the test fails
+ with pytest.raises(AssertionError):
+ with check_render_options(foo="bar"):
+ from IPython.display import display
+
+ display(None)
+
+
+def test_display_options():
+ chart = alt.Chart("data.csv").mark_point().encode(x="foo:Q")
+
+ # check that there are no options by default
+ with check_render_options():
+ chart.display()
+
+ # check that display options are passed
+ with check_render_options(embed_options={"tooltip": False, "renderer": "canvas"}):
+ chart.display("canvas", tooltip=False)
+
+ # check that above options do not persist
+ with check_render_options():
+ chart.display()
+
+ # check that display options augment rather than overwrite pre-set options
+ with alt.renderers.enable(embed_options={"tooltip": True, "renderer": "svg"}):
+ with check_render_options(embed_options={"tooltip": True, "renderer": "svg"}):
+ chart.display()
+
+ with check_render_options(
+ embed_options={"tooltip": True, "renderer": "canvas"}
+ ):
+ chart.display("canvas")
+
+ # check that above options do not persist
+ with check_render_options():
+ chart.display()
diff --git a/venv/lib/python3.9/site-packages/altair/vegalite/v3/tests/test_geo_interface.py b/venv/lib/python3.9/site-packages/altair/vegalite/v3/tests/test_geo_interface.py
new file mode 100644
index 00000000..cc157032
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vegalite/v3/tests/test_geo_interface.py
@@ -0,0 +1,204 @@
+import pytest
+import altair.vegalite.v3 as alt
+
+
+def geom_obj(geom):
+ class Geom(object):
+ pass
+
+ geom_obj = Geom()
+ setattr(geom_obj, "__geo_interface__", geom)
+ return geom_obj
+
+
+# correct translation of Polygon geometry to Feature type
+def test_geo_interface_polygon_feature():
+ geom = {
+ "coordinates": [[(0, 0), (0, 2), (2, 2), (2, 0), (0, 0)]],
+ "type": "Polygon",
+ }
+ feat = geom_obj(geom)
+
+ with alt.data_transformers.enable(consolidate_datasets=False):
+ spec = alt.Chart(feat).mark_geoshape().to_dict()
+ assert spec["data"]["values"]["type"] == "Feature"
+
+
+# merge geometry with empty properties dictionary
+def test_geo_interface_removal_empty_properties():
+ geom = {
+ "geometry": {
+ "coordinates": [
+ [[6.90, 53.48], [5.98, 51.85], [6.07, 53.51], [6.90, 53.48]]
+ ],
+ "type": "Polygon",
+ },
+ "id": None,
+ "properties": {},
+ "type": "Feature",
+ }
+ feat = geom_obj(geom)
+
+ with alt.data_transformers.enable(consolidate_datasets=False):
+ spec = alt.Chart(feat).mark_geoshape().to_dict()
+ assert spec["data"]["values"]["type"] == "Feature"
+
+
+# only register metadata in the properties member
+def test_geo_interface_register_foreign_member():
+ geom = {
+ "geometry": {
+ "coordinates": [
+ [[6.90, 53.48], [5.98, 51.85], [6.07, 53.51], [6.90, 53.48]]
+ ],
+ "type": "Polygon",
+ },
+ "id": 2,
+ "properties": {"foo": "bah"},
+ "type": "Feature",
+ }
+ feat = geom_obj(geom)
+
+ with alt.data_transformers.enable(consolidate_datasets=False):
+ spec = alt.Chart(feat).mark_geoshape().to_dict()
+ with pytest.raises(KeyError):
+ spec["data"]["values"]["id"]
+ assert spec["data"]["values"]["foo"] == "bah"
+
+
+# correct serializing of arrays and nested tuples
+def test_geo_interface_serializing_arrays_tuples():
+ import array as arr
+
+ geom = {
+ "bbox": arr.array("d", [1, 2, 3, 4]),
+ "geometry": {
+ "coordinates": [
+ tuple(
+ (
+ tuple((6.90, 53.48)),
+ tuple((5.98, 51.85)),
+ tuple((6.07, 53.51)),
+ tuple((6.90, 53.48)),
+ )
+ )
+ ],
+ "type": "Polygon",
+ },
+ "id": 27,
+ "properties": {},
+ "type": "Feature",
+ }
+ feat = geom_obj(geom)
+
+ with alt.data_transformers.enable(consolidate_datasets=False):
+ spec = alt.Chart(feat).mark_geoshape().to_dict()
+ assert spec["data"]["values"]["geometry"]["coordinates"][0][0] == [6.9, 53.48]
+
+
+# overwrite existing 'type' value in properties with `Feature`
+def test_geo_interface_reserved_members():
+ geom = {
+ "geometry": {
+ "coordinates": [
+ [[6.90, 53.48], [5.98, 51.85], [6.07, 53.51], [6.90, 53.48]]
+ ],
+ "type": "Polygon",
+ },
+ "id": 27,
+ "properties": {"type": "foo"},
+ "type": "Feature",
+ }
+ feat = geom_obj(geom)
+
+ with alt.data_transformers.enable(consolidate_datasets=False):
+ spec = alt.Chart(feat).mark_geoshape().to_dict()
+ assert spec["data"]["values"]["type"] == "Feature"
+
+
+# an empty FeatureCollection is valid
+def test_geo_interface_empty_feature_collection():
+ geom = {"type": "FeatureCollection", "features": []}
+ feat = geom_obj(geom)
+
+ with alt.data_transformers.enable(consolidate_datasets=False):
+ spec = alt.Chart(feat).mark_geoshape().to_dict()
+ assert spec["data"]["values"] == []
+
+
+# Features in a FeatureCollection only keep properties and geometry
+def test_geo_interface_feature_collection():
+ geom = {
+ "type": "FeatureCollection",
+ "features": [
+ {
+ "geometry": {
+ "coordinates": [
+ [[6.90, 53.48], [5.98, 51.85], [6.07, 53.51], [6.90, 53.48]]
+ ],
+ "type": "Polygon",
+ },
+ "id": 27,
+ "properties": {"type": "foo", "id": 1, "geometry": 1},
+ "type": "Feature",
+ },
+ {
+ "geometry": {
+ "coordinates": [
+ [[8.90, 53.48], [7.98, 51.85], [8.07, 53.51], [8.90, 53.48]]
+ ],
+ "type": "Polygon",
+ },
+ "id": 28,
+ "properties": {"type": "foo", "id": 2, "geometry": 1},
+ "type": "Feature",
+ },
+ ],
+ }
+ feat = geom_obj(geom)
+
+ with alt.data_transformers.enable(consolidate_datasets=False):
+ spec = alt.Chart(feat).mark_geoshape().to_dict()
+ assert spec["data"]["values"][0]["id"] == 1
+ assert spec["data"]["values"][1]["id"] == 2
+ assert "coordinates" in spec["data"]["values"][0]["geometry"]
+ assert "coordinates" in spec["data"]["values"][1]["geometry"]
+ assert spec["data"]["values"][0]["type"] == "Feature"
+ assert spec["data"]["values"][1]["type"] == "Feature"
+
+
+# typical output of a __geo_interface__ from geopandas GeoDataFrame
+# notic that the index value is registerd as a commonly used identifier
+# with the name "id" (in this case 49). Similar to serialization of a
+# pandas DataFrame is the index not included in the output
+def test_geo_interface_feature_collection_gdf():
+ geom = {
+ "bbox": (19.89, -26.82, 29.43, -17.66),
+ "features": [
+ {
+ "bbox": (19.89, -26.82, 29.43, -17.66),
+ "geometry": {
+ "coordinates": [
+ [[6.90, 53.48], [5.98, 51.85], [6.07, 53.51], [6.90, 53.48]]
+ ],
+ "type": "Polygon",
+ },
+ "id": "49",
+ "properties": {
+ "continent": "Africa",
+ "gdp_md_est": 35900.0,
+ "id": "BWA",
+ "iso_a3": "BWA",
+ "name": "Botswana",
+ "pop_est": 2214858,
+ },
+ "type": "Feature",
+ }
+ ],
+ "type": "FeatureCollection",
+ }
+ feat = geom_obj(geom)
+
+ with alt.data_transformers.enable(consolidate_datasets=False):
+ spec = alt.Chart(feat).mark_geoshape().to_dict()
+ assert spec["data"]["values"][0]["id"] == "BWA"
diff --git a/venv/lib/python3.9/site-packages/altair/vegalite/v3/tests/test_renderers.py b/venv/lib/python3.9/site-packages/altair/vegalite/v3/tests/test_renderers.py
new file mode 100644
index 00000000..ba8b4c98
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vegalite/v3/tests/test_renderers.py
@@ -0,0 +1,86 @@
+"""Tests of various renderers"""
+
+import json
+import re
+
+import pytest
+
+import altair.vegalite.v3 as alt
+
+
+def _extract_embedOpt(html):
+ """Extract an embedOpt definition from an html string.
+
+ Note: this is very brittle, but works for the specific test in this file.
+ """
+ result = re.search(r"embedOpt\s+=\s+(?P<embedOpt>\{.*?\})", html)
+ if not result:
+ return None
+ else:
+ return json.loads(result.groupdict()["embedOpt"])
+
+
+@pytest.fixture
+def chart():
+ return alt.Chart("data.csv").mark_point()
+
+
+def test_colab_renderer_embed_options(chart):
+ """Test that embed_options in renderer metadata are correctly manifest in html"""
+
+ def assert_actions_true(chart):
+ bundle = chart._repr_mimebundle_(None, None)
+ embedOpt = _extract_embedOpt(bundle["text/html"])
+ assert embedOpt == {"actions": True, "mode": "vega-lite"}
+
+ def assert_actions_false(chart):
+ bundle = chart._repr_mimebundle_(None, None)
+ embedOpt = _extract_embedOpt(bundle["text/html"])
+ assert embedOpt == {"actions": False, "mode": "vega-lite"}
+
+ with alt.renderers.enable("colab", embed_options=dict(actions=False)):
+ assert_actions_false(chart)
+
+ with alt.renderers.enable("colab"):
+ with alt.renderers.enable(embed_options=dict(actions=True)):
+ assert_actions_true(chart)
+
+ with alt.renderers.set_embed_options(actions=False):
+ assert_actions_false(chart)
+
+ with alt.renderers.set_embed_options(actions=True):
+ assert_actions_true(chart)
+
+
+def test_default_renderer_embed_options(chart, renderer="default"):
+ # check that metadata is passed appropriately
+ mimetype = alt.display.VEGALITE_MIME_TYPE
+ spec = chart.to_dict()
+ with alt.renderers.enable(renderer, embed_options=dict(actions=False)):
+ bundle, metadata = chart._repr_mimebundle_(None, None)
+ assert set(bundle.keys()) == {mimetype, "text/plain"}
+ assert bundle[mimetype] == spec
+ assert metadata == {mimetype: {"embed_options": {"actions": False}}}
+
+ # Sanity check: no metadata specified
+ with alt.renderers.enable(renderer):
+ bundle, metadata = chart._repr_mimebundle_(None, None)
+ assert bundle[mimetype] == spec
+ assert metadata == {}
+
+
+def test_json_renderer_embed_options(chart, renderer="json"):
+ """Test that embed_options in renderer metadata are correctly manifest in html"""
+ mimetype = "application/json"
+ spec = chart.to_dict()
+ with alt.renderers.enable("json", option="foo"):
+ bundle, metadata = chart._repr_mimebundle_(None, None)
+ assert set(bundle.keys()) == {mimetype, "text/plain"}
+ assert bundle[mimetype] == spec
+ assert metadata == {mimetype: {"option": "foo"}}
+
+ # Sanity check: no options specified
+ with alt.renderers.enable(renderer):
+ bundle, metadata = chart._repr_mimebundle_(None, None)
+ assert bundle[mimetype] == spec
+ assert metadata == {}
diff --git a/venv/lib/python3.9/site-packages/altair/vegalite/v3/tests/test_theme.py b/venv/lib/python3.9/site-packages/altair/vegalite/v3/tests/test_theme.py
new file mode 100644
index 00000000..430c2193
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vegalite/v3/tests/test_theme.py
@@ -0,0 +1,20 @@
+import pytest
+
+import altair.vegalite.v3 as alt
+from altair.vegalite.v3.theme import VEGA_THEMES
+
+
+@pytest.fixture
+def chart():
+ return alt.Chart("data.csv").mark_bar().encode(x="x:Q")
+
+
+def test_vega_themes(chart):
+ for theme in VEGA_THEMES:
+ with alt.themes.enable(theme):
+ dct = chart.to_dict()
+ assert dct["usermeta"] == {"embedOptions": {"theme": theme}}
+ assert dct["config"] == {
+ "view": {"width": 400, "height": 300},
+ "mark": {"tooltip": None},
+ }
diff --git a/venv/lib/python3.9/site-packages/altair/vegalite/v3/theme.py b/venv/lib/python3.9/site-packages/altair/vegalite/v3/theme.py
new file mode 100644
index 00000000..91d37649
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vegalite/v3/theme.py
@@ -0,0 +1,54 @@
+"""Tools for enabling and registering chart themes"""
+
+from ...utils.theme import ThemeRegistry
+
+VEGA_THEMES = ["ggplot2", "quartz", "vox", "fivethirtyeight", "dark", "latimes"]
+
+
+class VegaTheme(object):
+ """Implementation of a builtin vega theme."""
+
+ def __init__(self, theme):
+ self.theme = theme
+
+ def __call__(self):
+ return {
+ "usermeta": {"embedOptions": {"theme": self.theme}},
+ "config": {
+ "view": {"width": 400, "height": 300},
+ "mark": {"tooltip": None},
+ },
+ }
+
+ def __repr__(self):
+ return "VegaTheme({!r})".format(self.theme)
+
+
+# The entry point group that can be used by other packages to declare other
+# renderers that will be auto-detected. Explicit registration is also
+# allowed by the PluginRegistery API.
+ENTRY_POINT_GROUP = "altair.vegalite.v3.theme" # type: str
+themes = ThemeRegistry(entry_point_group=ENTRY_POINT_GROUP)
+
+themes.register(
+ "default",
+ lambda: {
+ "config": {"view": {"width": 400, "height": 300}, "mark": {"tooltip": None}}
+ },
+)
+themes.register(
+ "opaque",
+ lambda: {
+ "config": {
+ "background": "white",
+ "view": {"width": 400, "height": 300},
+ "mark": {"tooltip": None},
+ }
+ },
+)
+themes.register("none", lambda: {})
+
+for theme in VEGA_THEMES:
+ themes.register(theme, VegaTheme(theme))
+
+themes.enable("default")
diff --git a/venv/lib/python3.9/site-packages/altair/vegalite/v4/__init__.py b/venv/lib/python3.9/site-packages/altair/vegalite/v4/__init__.py
new file mode 100644
index 00000000..90b76bf8
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vegalite/v4/__init__.py
@@ -0,0 +1,23 @@
+# flake8: noqa
+from .schema import *
+from .api import *
+
+from ...datasets import list_datasets, load_dataset
+
+from ... import expr
+from ...expr import datum
+
+from .display import VegaLite, renderers
+
+from .data import (
+ MaxRowsError,
+ pipe,
+ curry,
+ limit_rows,
+ sample,
+ to_json,
+ to_csv,
+ to_values,
+ default_data_transformer,
+ data_transformers,
+)
diff --git a/venv/lib/python3.9/site-packages/altair/vegalite/v4/api.py b/venv/lib/python3.9/site-packages/altair/vegalite/v4/api.py
new file mode 100644
index 00000000..84162e11
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vegalite/v4/api.py
@@ -0,0 +1,2519 @@
+import warnings
+
+import hashlib
+import io
+import json
+import jsonschema
+import pandas as pd
+from toolz.curried import pipe as _pipe
+
+from .schema import core, channels, mixins, Undefined, SCHEMA_URL
+
+from .data import data_transformers
+from ... import utils, expr
+from .display import renderers, VEGALITE_VERSION, VEGAEMBED_VERSION, VEGA_VERSION
+from .theme import themes
+
+
+# ------------------------------------------------------------------------
+# Data Utilities
+def _dataset_name(values):
+ """Generate a unique hash of the data
+
+ Parameters
+ ----------
+ values : list or dict
+ A list/dict representation of data values.
+
+ Returns
+ -------
+ name : string
+ A unique name generated from the hash of the values.
+ """
+ if isinstance(values, core.InlineDataset):
+ values = values.to_dict()
+ if values == [{}]:
+ return "empty"
+ values_json = json.dumps(values, sort_keys=True)
+ hsh = hashlib.md5(values_json.encode()).hexdigest()
+ return "data-" + hsh
+
+
+def _consolidate_data(data, context):
+ """If data is specified inline, then move it to context['datasets']
+
+ This function will modify context in-place, and return a new version of data
+ """
+ values = Undefined
+ kwds = {}
+
+ if isinstance(data, core.InlineData):
+ if data.name is Undefined and data.values is not Undefined:
+ if isinstance(data.values, core.InlineDataset):
+ values = data.to_dict()["values"]
+ else:
+ values = data.values
+ kwds = {"format": data.format}
+
+ elif isinstance(data, dict):
+ if "name" not in data and "values" in data:
+ values = data["values"]
+ kwds = {k: v for k, v in data.items() if k != "values"}
+
+ if values is not Undefined:
+ name = _dataset_name(values)
+ data = core.NamedData(name=name, **kwds)
+ context.setdefault("datasets", {})[name] = values
+
+ return data
+
+
+def _prepare_data(data, context=None):
+ """Convert input data to data for use within schema
+
+ Parameters
+ ----------
+ data :
+ The input dataset in the form of a DataFrame, dictionary, altair data
+ object, or other type that is recognized by the data transformers.
+ context : dict (optional)
+ The to_dict context in which the data is being prepared. This is used
+ to keep track of information that needs to be passed up and down the
+ recursive serialization routine, such as global named datasets.
+ """
+ if data is Undefined:
+ return data
+
+ # convert dataframes or objects with __geo_interface__ to dict
+ if isinstance(data, pd.DataFrame) or hasattr(data, "__geo_interface__"):
+ data = _pipe(data, data_transformers.get())
+
+ # convert string input to a URLData
+ if isinstance(data, str):
+ data = core.UrlData(data)
+
+ # consolidate inline data to top-level datasets
+ if context is not None and data_transformers.consolidate_datasets:
+ data = _consolidate_data(data, context)
+
+ # if data is still not a recognized type, then return
+ if not isinstance(data, (dict, core.Data)):
+ warnings.warn("data of type {} not recognized".format(type(data)))
+
+ return data
+
+
+# ------------------------------------------------------------------------
+# Aliases & specializations
+Bin = core.BinParams
+
+
+@utils.use_signature(core.LookupData)
+class LookupData(core.LookupData):
+ def to_dict(self, *args, **kwargs):
+ """Convert the chart to a dictionary suitable for JSON export."""
+ copy = self.copy(deep=False)
+ copy.data = _prepare_data(copy.data, kwargs.get("context"))
+ return super(LookupData, copy).to_dict(*args, **kwargs)
+
+
+@utils.use_signature(core.FacetMapping)
+class FacetMapping(core.FacetMapping):
+ _class_is_valid_at_instantiation = False
+
+ def to_dict(self, *args, **kwargs):
+ copy = self.copy(deep=False)
+ context = kwargs.get("context", {})
+ data = context.get("data", None)
+ if isinstance(self.row, str):
+ copy.row = core.FacetFieldDef(**utils.parse_shorthand(self.row, data))
+ if isinstance(self.column, str):
+ copy.column = core.FacetFieldDef(**utils.parse_shorthand(self.column, data))
+ return super(FacetMapping, copy).to_dict(*args, **kwargs)
+
+
+# ------------------------------------------------------------------------
+# Encoding will contain channel objects that aren't valid at instantiation
+core.FacetedEncoding._class_is_valid_at_instantiation = False
+
+# ------------------------------------------------------------------------
+# These are parameters that are valid at the top level, but are not valid
+# for specs that are within a composite chart
+# (layer, hconcat, vconcat, facet, repeat)
+TOPLEVEL_ONLY_KEYS = {"background", "config", "autosize", "padding", "$schema"}
+
+
+def _get_channels_mapping():
+ mapping = {}
+ for attr in dir(channels):
+ cls = getattr(channels, attr)
+ if isinstance(cls, type) and issubclass(cls, core.SchemaBase):
+ mapping[cls] = attr.replace("Value", "").lower()
+ return mapping
+
+
+# -------------------------------------------------------------------------
+# Tools for working with selections
+class Selection(object):
+ """A Selection object"""
+
+ _counter = 0
+
+ @classmethod
+ def _get_name(cls):
+ cls._counter += 1
+ return "selector{:03d}".format(cls._counter)
+
+ def __init__(self, name, selection):
+ if name is None:
+ name = self._get_name()
+ self.name = name
+ self.selection = selection
+
+ def __repr__(self):
+ return "Selection({0!r}, {1})".format(self.name, self.selection)
+
+ def ref(self):
+ return self.to_dict()
+
+ def to_dict(self):
+ return {
+ "selection": self.name.to_dict()
+ if hasattr(self.name, "to_dict")
+ else self.name
+ }
+
+ def __invert__(self):
+ return Selection(core.SelectionNot(**{"not": self.name}), self.selection)
+
+ def __and__(self, other):
+ if isinstance(other, Selection):
+ other = other.name
+ return Selection(
+ core.SelectionAnd(**{"and": [self.name, other]}), self.selection
+ )
+
+ def __or__(self, other):
+ if isinstance(other, Selection):
+ other = other.name
+ return Selection(core.SelectionOr(**{"or": [self.name, other]}), self.selection)
+
+ def __getattr__(self, field_name):
+ if field_name.startswith("__") and field_name.endswith("__"):
+ raise AttributeError(field_name)
+ return expr.core.GetAttrExpression(self.name, field_name)
+
+ def __getitem__(self, field_name):
+ return expr.core.GetItemExpression(self.name, field_name)
+
+
+# ------------------------------------------------------------------------
+# Top-Level Functions
+
+
+def value(value, **kwargs):
+ """Specify a value for use in an encoding"""
+ return dict(value=value, **kwargs)
+
+
+def selection(name=None, type=Undefined, **kwds):
+ """Create a named selection.
+
+ Parameters
+ ----------
+ name : string (optional)
+ The name of the selection. If not specified, a unique name will be
+ created.
+ type : string
+ The type of the selection: one of ["interval", "single", or "multi"]
+ **kwds :
+ additional keywords will be used to construct a SelectionDef instance
+ that controls the selection.
+
+ Returns
+ -------
+ selection: Selection
+ The selection object that can be used in chart creation.
+ """
+ return Selection(name, core.SelectionDef(type=type, **kwds))
+
+
+@utils.use_signature(core.IntervalSelection)
+def selection_interval(**kwargs):
+ """Create a selection with type='interval'"""
+ return selection(type="interval", **kwargs)
+
+
+@utils.use_signature(core.MultiSelection)
+def selection_multi(**kwargs):
+ """Create a selection with type='multi'"""
+ return selection(type="multi", **kwargs)
+
+
+@utils.use_signature(core.SingleSelection)
+def selection_single(**kwargs):
+ """Create a selection with type='single'"""
+ return selection(type="single", **kwargs)
+
+
+@utils.use_signature(core.Binding)
+def binding(input, **kwargs):
+ """A generic binding"""
+ return core.Binding(input=input, **kwargs)
+
+
+@utils.use_signature(core.BindCheckbox)
+def binding_checkbox(**kwargs):
+ """A checkbox binding"""
+ return core.BindCheckbox(input="checkbox", **kwargs)
+
+
+@utils.use_signature(core.BindRadioSelect)
+def binding_radio(**kwargs):
+ """A radio button binding"""
+ return core.BindRadioSelect(input="radio", **kwargs)
+
+
+@utils.use_signature(core.BindRadioSelect)
+def binding_select(**kwargs):
+ """A select binding"""
+ return core.BindRadioSelect(input="select", **kwargs)
+
+
+@utils.use_signature(core.BindRange)
+def binding_range(**kwargs):
+ """A range binding"""
+ return core.BindRange(input="range", **kwargs)
+
+
+def condition(predicate, if_true, if_false, **kwargs):
+ """A conditional attribute or encoding
+
+ Parameters
+ ----------
+ predicate: Selection, PredicateComposition, expr.Expression, dict, or string
+ the selection predicate or test predicate for the condition.
+ if a string is passed, it will be treated as a test operand.
+ if_true:
+ the spec or object to use if the selection predicate is true
+ if_false:
+ the spec or object to use if the selection predicate is false
+ **kwargs:
+ additional keyword args are added to the resulting dict
+
+ Returns
+ -------
+ spec: dict or VegaLiteSchema
+ the spec that describes the condition
+ """
+ test_predicates = (str, expr.Expression, core.PredicateComposition)
+
+ if isinstance(predicate, Selection):
+ condition = {"selection": predicate.name}
+ elif isinstance(predicate, core.SelectionComposition):
+ condition = {"selection": predicate}
+ elif isinstance(predicate, test_predicates):
+ condition = {"test": predicate}
+ elif isinstance(predicate, dict):
+ condition = predicate
+ else:
+ raise NotImplementedError(
+ "condition predicate of type {}" "".format(type(predicate))
+ )
+
+ if isinstance(if_true, core.SchemaBase):
+ # convert to dict for now; the from_dict call below will wrap this
+ # dict in the appropriate schema
+ if_true = if_true.to_dict()
+ elif isinstance(if_true, str):
+ if_true = {"shorthand": if_true}
+ if_true.update(kwargs)
+ condition.update(if_true)
+
+ if isinstance(if_false, core.SchemaBase):
+ # For the selection, the channel definitions all allow selections
+ # already. So use this SchemaBase wrapper if possible.
+ selection = if_false.copy()
+ selection.condition = condition
+ elif isinstance(if_false, str):
+ selection = {"condition": condition, "shorthand": if_false}
+ selection.update(kwargs)
+ else:
+ selection = dict(condition=condition, **if_false)
+
+ return selection
+
+
+# --------------------------------------------------------------------
+# Top-level objects
+
+
+class TopLevelMixin(mixins.ConfigMethodMixin):
+ """Mixin for top-level chart objects such as Chart, LayeredChart, etc."""
+
+ _class_is_valid_at_instantiation = False
+
+ def to_dict(self, *args, **kwargs):
+ """Convert the chart to a dictionary suitable for JSON export"""
+ # We make use of three context markers:
+ # - 'data' points to the data that should be referenced for column type
+ # inference.
+ # - 'top_level' is a boolean flag that is assumed to be true; if it's
+ # true then a "$schema" arg is added to the dict.
+ # - 'datasets' is a dict of named datasets that should be inserted
+ # in the top-level object
+
+ # note: not a deep copy because we want datasets and data arguments to
+ # be passed by reference
+ context = kwargs.get("context", {}).copy()
+ context.setdefault("datasets", {})
+ is_top_level = context.get("top_level", True)
+
+ copy = self.copy(deep=False)
+ original_data = getattr(copy, "data", Undefined)
+ copy.data = _prepare_data(original_data, context)
+
+ if original_data is not Undefined:
+ context["data"] = original_data
+
+ # remaining to_dict calls are not at top level
+ context["top_level"] = False
+ kwargs["context"] = context
+
+ try:
+ dct = super(TopLevelMixin, copy).to_dict(*args, **kwargs)
+ except jsonschema.ValidationError:
+ dct = None
+
+ # If we hit an error, then re-convert with validate='deep' to get
+ # a more useful traceback. We don't do this by default because it's
+ # much slower in the case that there are no errors.
+ if dct is None:
+ kwargs["validate"] = "deep"
+ dct = super(TopLevelMixin, copy).to_dict(*args, **kwargs)
+
+ # TODO: following entries are added after validation. Should they be validated?
+ if is_top_level:
+ # since this is top-level we add $schema if it's missing
+ if "$schema" not in dct:
+ dct["$schema"] = SCHEMA_URL
+
+ # apply theme from theme registry
+ the_theme = themes.get()
+ dct = utils.update_nested(the_theme(), dct, copy=True)
+
+ # update datasets
+ if context["datasets"]:
+ dct.setdefault("datasets", {}).update(context["datasets"])
+
+ return dct
+
+ def to_html(
+ self,
+ base_url="https://cdn.jsdelivr.net/npm/",
+ output_div="vis",
+ embed_options=None,
+ json_kwds=None,
+ fullhtml=True,
+ requirejs=False,
+ ):
+ return utils.spec_to_html(
+ self.to_dict(),
+ mode="vega-lite",
+ vegalite_version=VEGALITE_VERSION,
+ vegaembed_version=VEGAEMBED_VERSION,
+ vega_version=VEGA_VERSION,
+ base_url=base_url,
+ output_div=output_div,
+ embed_options=embed_options,
+ json_kwds=json_kwds,
+ fullhtml=fullhtml,
+ requirejs=requirejs,
+ )
+
+ def save(
+ self,
+ fp,
+ format=None,
+ override_data_transformer=True,
+ scale_factor=1.0,
+ vegalite_version=VEGALITE_VERSION,
+ vega_version=VEGA_VERSION,
+ vegaembed_version=VEGAEMBED_VERSION,
+ **kwargs,
+ ):
+ """Save a chart to file in a variety of formats
+
+ Supported formats are json, html, png, svg, pdf; the last three require
+ the altair_saver package to be installed.
+
+ Parameters
+ ----------
+ fp : string filename or file-like object
+ file in which to write the chart.
+ format : string (optional)
+ the format to write: one of ['json', 'html', 'png', 'svg', 'pdf'].
+ If not specified, the format will be determined from the filename.
+ override_data_transformer : boolean (optional)
+ If True (default), then the save action will be done with
+ the MaxRowsError disabled. If False, then do not change the data
+ transformer.
+ scale_factor : float
+ For svg or png formats, scale the image by this factor when saving.
+ This can be used to control the size or resolution of the output.
+ Default is 1.0
+ **kwargs :
+ Additional keyword arguments are passed to the output method
+ associated with the specified format.
+
+ """
+ from ...utils.save import save
+
+ kwds = dict(
+ chart=self,
+ fp=fp,
+ format=format,
+ scale_factor=scale_factor,
+ vegalite_version=vegalite_version,
+ vega_version=vega_version,
+ vegaembed_version=vegaembed_version,
+ **kwargs,
+ )
+
+ # By default we override the data transformer. This makes it so
+ # that save() will succeed even for large datasets that would
+ # normally trigger a MaxRowsError
+ if override_data_transformer:
+ with data_transformers.disable_max_rows():
+ result = save(**kwds)
+ else:
+ result = save(**kwds)
+ return result
+
+ # Fallback for when rendering fails; the full repr is too long to be
+ # useful in nearly all cases.
+ def __repr__(self):
+ return "alt.{}(...)".format(self.__class__.__name__)
+
+ # Layering and stacking
+ def __add__(self, other):
+ if not isinstance(other, TopLevelMixin):
+ raise ValueError("Only Chart objects can be layered.")
+ return layer(self, other)
+
+ def __and__(self, other):
+ if not isinstance(other, TopLevelMixin):
+ raise ValueError("Only Chart objects can be concatenated.")
+ return vconcat(self, other)
+
+ def __or__(self, other):
+ if not isinstance(other, TopLevelMixin):
+ raise ValueError("Only Chart objects can be concatenated.")
+ return hconcat(self, other)
+
+ def repeat(
+ self,
+ repeat=Undefined,
+ row=Undefined,
+ column=Undefined,
+ layer=Undefined,
+ columns=Undefined,
+ **kwargs,
+ ):
+ """Return a RepeatChart built from the chart
+
+ Fields within the chart can be set to correspond to the row or
+ column using `alt.repeat('row')` and `alt.repeat('column')`.
+
+ Parameters
+ ----------
+ repeat : list
+ a list of data column names to be repeated. This cannot be
+ used along with the ``row``, ``column`` or ``layer`` argument.
+ row : list
+ a list of data column names to be mapped to the row facet
+ column : list
+ a list of data column names to be mapped to the column facet
+ layer : list
+ a list of data column names to be layered. This cannot be
+ used along with the ``row``, ``column`` or ``repeat`` argument.
+ columns : int
+ the maximum number of columns before wrapping. Only referenced
+ if ``repeat`` is specified.
+ **kwargs :
+ additional keywords passed to RepeatChart.
+
+ Returns
+ -------
+ chart : RepeatChart
+ a repeated chart.
+ """
+ repeat_specified = repeat is not Undefined
+ rowcol_specified = row is not Undefined or column is not Undefined
+ layer_specified = layer is not Undefined
+
+ if repeat_specified and rowcol_specified:
+ raise ValueError(
+ "repeat argument cannot be combined with row/column argument."
+ )
+ elif repeat_specified and layer_specified:
+ raise ValueError("repeat argument cannot be combined with layer argument.")
+ elif layer_specified and rowcol_specified:
+ raise ValueError(
+ "layer argument cannot be combined with row/column argument."
+ )
+
+ if repeat_specified:
+ repeat = repeat
+ elif layer_specified:
+ repeat = core.LayerRepeatMapping(layer=layer)
+ else:
+ repeat = core.RepeatMapping(row=row, column=column)
+
+ return RepeatChart(spec=self, repeat=repeat, columns=columns, **kwargs)
+
+ def properties(self, **kwargs):
+ """Set top-level properties of the Chart.
+
+ Argument names and types are the same as class initialization.
+ """
+ copy = self.copy(deep=False)
+ for key, val in kwargs.items():
+ if key == "selection" and isinstance(val, Selection):
+ # For backward compatibility with old selection interface.
+ setattr(copy, key, {val.name: val.selection})
+ else:
+ # Don't validate data, because it hasn't been processed.
+ if key != "data":
+ self.validate_property(key, val)
+ setattr(copy, key, val)
+ return copy
+
+ def project(
+ self,
+ type="mercator",
+ center=Undefined,
+ clipAngle=Undefined,
+ clipExtent=Undefined,
+ coefficient=Undefined,
+ distance=Undefined,
+ fraction=Undefined,
+ lobes=Undefined,
+ parallel=Undefined,
+ precision=Undefined,
+ radius=Undefined,
+ ratio=Undefined,
+ reflectX=Undefined,
+ reflectY=Undefined,
+ rotate=Undefined,
+ scale=Undefined,
+ spacing=Undefined,
+ tilt=Undefined,
+ translate=Undefined,
+ **kwds,
+ ):
+ """Add a geographic projection to the chart.
+
+ This is generally used either with ``mark_geoshape`` or with the
+ ``latitude``/``longitude`` encodings.
+
+ Available projection types are
+ ['albers', 'albersUsa', 'azimuthalEqualArea', 'azimuthalEquidistant',
+ 'conicConformal', 'conicEqualArea', 'conicEquidistant', 'equalEarth', 'equirectangular',
+ 'gnomonic', 'identity', 'mercator', 'orthographic', 'stereographic', 'transverseMercator']
+
+ Attributes
+ ----------
+ type : ProjectionType
+ The cartographic projection to use. This value is case-insensitive, for example
+ `"albers"` and `"Albers"` indicate the same projection type. You can find all valid
+ projection types [in the
+ documentation](https://vega.github.io/vega-lite/docs/projection.html#projection-types).
+
+ **Default value:** `mercator`
+ center : List(float)
+ Sets the projection’s center to the specified center, a two-element array of
+ longitude and latitude in degrees.
+
+ **Default value:** `[0, 0]`
+ clipAngle : float
+ Sets the projection’s clipping circle radius to the specified angle in degrees. If
+ `null`, switches to [antimeridian](http://bl.ocks.org/mbostock/3788999) cutting
+ rather than small-circle clipping.
+ clipExtent : List(List(float))
+ Sets the projection’s viewport clip extent to the specified bounds in pixels. The
+ extent bounds are specified as an array `[[x0, y0], [x1, y1]]`, where `x0` is the
+ left-side of the viewport, `y0` is the top, `x1` is the right and `y1` is the
+ bottom. If `null`, no viewport clipping is performed.
+ coefficient : float
+
+ distance : float
+
+ fraction : float
+
+ lobes : float
+
+ parallel : float
+
+ precision : Mapping(required=[length])
+ Sets the threshold for the projection’s [adaptive
+ resampling](http://bl.ocks.org/mbostock/3795544) to the specified value in pixels.
+ This value corresponds to the [Douglas–Peucker
+ distance](http://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm).
+ If precision is not specified, returns the projection’s current resampling
+ precision which defaults to `√0.5 ≅ 0.70710…`.
+ radius : float
+
+ ratio : float
+
+ reflectX : boolean
+
+ reflectY : boolean
+
+ rotate : List(float)
+ Sets the projection’s three-axis rotation to the specified angles, which must be a
+ two- or three-element array of numbers [`lambda`, `phi`, `gamma`] specifying the
+ rotation angles in degrees about each spherical axis. (These correspond to yaw,
+ pitch and roll.)
+
+ **Default value:** `[0, 0, 0]`
+ scale : float
+ Sets the projection's scale (zoom) value, overriding automatic fitting.
+
+ spacing : float
+
+ tilt : float
+
+ translate : List(float)
+ Sets the projection's translation (pan) value, overriding automatic fitting.
+
+ """
+ projection = core.Projection(
+ center=center,
+ clipAngle=clipAngle,
+ clipExtent=clipExtent,
+ coefficient=coefficient,
+ distance=distance,
+ fraction=fraction,
+ lobes=lobes,
+ parallel=parallel,
+ precision=precision,
+ radius=radius,
+ ratio=ratio,
+ reflectX=reflectX,
+ reflectY=reflectY,
+ rotate=rotate,
+ scale=scale,
+ spacing=spacing,
+ tilt=tilt,
+ translate=translate,
+ type=type,
+ **kwds,
+ )
+ return self.properties(projection=projection)
+
+ def _add_transform(self, *transforms):
+ """Copy the chart and add specified transforms to chart.transform"""
+ copy = self.copy(deep=["transform"])
+ if copy.transform is Undefined:
+ copy.transform = []
+ copy.transform.extend(transforms)
+ return copy
+
+ def transform_aggregate(self, aggregate=Undefined, groupby=Undefined, **kwds):
+ """
+ Add an AggregateTransform to the schema.
+
+ Parameters
+ ----------
+ aggregate : List(:class:`AggregatedFieldDef`)
+ Array of objects that define fields to aggregate.
+ groupby : List(string)
+ The data fields to group by. If not specified, a single group containing all data
+ objects will be used.
+ **kwds :
+ additional keywords are converted to aggregates using standard
+ shorthand parsing.
+
+ Returns
+ -------
+ self : Chart object
+ returns chart to allow for chaining
+
+ Examples
+ --------
+ The aggregate transform allows you to specify transforms directly using
+ the same shorthand syntax as used in encodings:
+
+ >>> import altair as alt
+ >>> chart1 = alt.Chart().transform_aggregate(
+ ... mean_acc='mean(Acceleration)',
+ ... groupby=['Origin']
+ ... )
+ >>> print(chart1.transform[0].to_json()) # doctest: +NORMALIZE_WHITESPACE
+ {
+ "aggregate": [
+ {
+ "as": "mean_acc",
+ "field": "Acceleration",
+ "op": "mean"
+ }
+ ],
+ "groupby": [
+ "Origin"
+ ]
+ }
+
+ It also supports including AggregatedFieldDef instances or dicts directly,
+ so you can create the above transform like this:
+
+ >>> chart2 = alt.Chart().transform_aggregate(
+ ... [alt.AggregatedFieldDef(field='Acceleration', op='mean',
+ ... **{'as': 'mean_acc'})],
+ ... groupby=['Origin']
+ ... )
+ >>> chart2.transform == chart1.transform
+ True
+
+ See Also
+ --------
+ alt.AggregateTransform : underlying transform object
+
+ """
+ if aggregate is Undefined:
+ aggregate = []
+ for key, val in kwds.items():
+ parsed = utils.parse_shorthand(val)
+ dct = {
+ "as": key,
+ "field": parsed.get("field", Undefined),
+ "op": parsed.get("aggregate", Undefined),
+ }
+ aggregate.append(core.AggregatedFieldDef(**dct))
+ return self._add_transform(
+ core.AggregateTransform(aggregate=aggregate, groupby=groupby)
+ )
+
+ def transform_bin(self, as_=Undefined, field=Undefined, bin=True, **kwargs):
+ """
+ Add a BinTransform to the schema.
+
+ Parameters
+ ----------
+ as_ : anyOf(string, List(string))
+ The output fields at which to write the start and end bin values.
+ bin : anyOf(boolean, :class:`BinParams`)
+ An object indicating bin properties, or simply ``true`` for using default bin
+ parameters.
+ field : string
+ The data field to bin.
+
+ Returns
+ -------
+ self : Chart object
+ returns chart to allow for chaining
+
+ Examples
+ --------
+ >>> import altair as alt
+ >>> chart = alt.Chart().transform_bin("x_binned", "x")
+ >>> chart.transform[0]
+ BinTransform({
+ as: 'x_binned',
+ bin: True,
+ field: 'x'
+ })
+
+ >>> chart = alt.Chart().transform_bin("x_binned", "x",
+ ... bin=alt.Bin(maxbins=10))
+ >>> chart.transform[0]
+ BinTransform({
+ as: 'x_binned',
+ bin: BinParams({
+ maxbins: 10
+ }),
+ field: 'x'
+ })
+
+ See Also
+ --------
+ alt.BinTransform : underlying transform object
+
+ """
+ if as_ is not Undefined:
+ if "as" in kwargs:
+ raise ValueError(
+ "transform_bin: both 'as_' and 'as' passed as arguments."
+ )
+ kwargs["as"] = as_
+ kwargs["bin"] = bin
+ kwargs["field"] = field
+ return self._add_transform(core.BinTransform(**kwargs))
+
+ def transform_calculate(self, as_=Undefined, calculate=Undefined, **kwargs):
+ """
+ Add a CalculateTransform to the schema.
+
+ Parameters
+ ----------
+ as_ : string
+ The field for storing the computed formula value.
+ calculate : string or alt.expr expression
+ A `expression <https://vega.github.io/vega-lite/docs/types.html#expression>`__
+ string. Use the variable ``datum`` to refer to the current data object.
+ **kwargs
+ transforms can also be passed by keyword argument; see Examples
+
+ Returns
+ -------
+ self : Chart object
+ returns chart to allow for chaining
+
+ Examples
+ --------
+ >>> import altair as alt
+ >>> from altair import datum, expr
+
+ >>> chart = alt.Chart().transform_calculate(y = 2 * expr.sin(datum.x))
+ >>> chart.transform[0]
+ CalculateTransform({
+ as: 'y',
+ calculate: (2 * sin(datum.x))
+ })
+
+ It's also possible to pass the ``CalculateTransform`` arguments directly:
+
+ >>> kwds = {'as': 'y', 'calculate': '2 * sin(datum.x)'}
+ >>> chart = alt.Chart().transform_calculate(**kwds)
+ >>> chart.transform[0]
+ CalculateTransform({
+ as: 'y',
+ calculate: '2 * sin(datum.x)'
+ })
+
+ As the first form is easier to write and understand, that is the
+ recommended method.
+
+ See Also
+ --------
+ alt.CalculateTransform : underlying transform object
+ """
+ if as_ is Undefined:
+ as_ = kwargs.pop("as", Undefined)
+ elif "as" in kwargs:
+ raise ValueError(
+ "transform_calculate: both 'as_' and 'as' passed as arguments."
+ )
+ if as_ is not Undefined or calculate is not Undefined:
+ dct = {"as": as_, "calculate": calculate}
+ self = self._add_transform(core.CalculateTransform(**dct))
+ for as_, calculate in kwargs.items():
+ dct = {"as": as_, "calculate": calculate}
+ self = self._add_transform(core.CalculateTransform(**dct))
+ return self
+
+ def transform_density(
+ self,
+ density,
+ as_=Undefined,
+ bandwidth=Undefined,
+ counts=Undefined,
+ cumulative=Undefined,
+ extent=Undefined,
+ groupby=Undefined,
+ maxsteps=Undefined,
+ minsteps=Undefined,
+ steps=Undefined,
+ ):
+ """Add a DensityTransform to the spec.
+
+ Attributes
+ ----------
+ density : str
+ The data field for which to perform density estimation.
+ as_ : [str, str]
+ The output fields for the sample value and corresponding density estimate.
+ **Default value:** ``["value", "density"]``
+ bandwidth : float
+ The bandwidth (standard deviation) of the Gaussian kernel. If unspecified or set to
+ zero, the bandwidth value is automatically estimated from the input data using
+ Scott’s rule.
+ counts : boolean
+ A boolean flag indicating if the output values should be probability estimates
+ (false) or smoothed counts (true).
+ **Default value:** ``false``
+ cumulative : boolean
+ A boolean flag indicating whether to produce density estimates (false) or cumulative
+ density estimates (true).
+ **Default value:** ``false``
+ extent : List([float, float])
+ A [min, max] domain from which to sample the distribution. If unspecified, the
+ extent will be determined by the observed minimum and maximum values of the density
+ value field.
+ groupby : List(str)
+ The data fields to group by. If not specified, a single group containing all data
+ objects will be used.
+ maxsteps : float
+ The maximum number of samples to take along the extent domain for plotting the
+ density. **Default value:** ``200``
+ minsteps : float
+ The minimum number of samples to take along the extent domain for plotting the
+ density. **Default value:** ``25``
+ steps : float
+ The exact number of samples to take along the extent domain for plotting the
+ density. If specified, overrides both minsteps and maxsteps to set an exact number
+ of uniform samples. Potentially useful in conjunction with a fixed extent to ensure
+ consistent sample points for stacked densities.
+ """
+ return self._add_transform(
+ core.DensityTransform(
+ density=density,
+ bandwidth=bandwidth,
+ counts=counts,
+ cumulative=cumulative,
+ extent=extent,
+ groupby=groupby,
+ maxsteps=maxsteps,
+ minsteps=minsteps,
+ steps=steps,
+ **{"as": as_},
+ )
+ )
+
+ def transform_impute(
+ self,
+ impute,
+ key,
+ frame=Undefined,
+ groupby=Undefined,
+ keyvals=Undefined,
+ method=Undefined,
+ value=Undefined,
+ ):
+ """
+ Add an ImputeTransform to the schema.
+
+ Parameters
+ ----------
+ impute : string
+ The data field for which the missing values should be imputed.
+ key : string
+ A key field that uniquely identifies data objects within a group.
+ Missing key values (those occurring in the data but not in the current group) will
+ be imputed.
+ frame : List(anyOf(None, float))
+ A frame specification as a two-element array used to control the window over which
+ the specified method is applied. The array entries should either be a number
+ indicating the offset from the current data object, or null to indicate unbounded
+ rows preceding or following the current data object. For example, the value ``[-5,
+ 5]`` indicates that the window should include five objects preceding and five
+ objects following the current object.
+ **Default value:** : ``[null, null]`` indicating that the window includes all
+ objects.
+ groupby : List(string)
+ An optional array of fields by which to group the values.
+ Imputation will then be performed on a per-group basis.
+ keyvals : anyOf(List(Mapping(required=[])), :class:`ImputeSequence`)
+ Defines the key values that should be considered for imputation.
+ An array of key values or an object defining a `number sequence
+ <https://vega.github.io/vega-lite/docs/impute.html#sequence-def>`__.
+ If provided, this will be used in addition to the key values observed within the
+ input data. If not provided, the values will be derived from all unique values of
+ the ``key`` field. For ``impute`` in ``encoding``, the key field is the x-field if
+ the y-field is imputed, or vice versa.
+ If there is no impute grouping, this property *must* be specified.
+ method : :class:`ImputeMethod`
+ The imputation method to use for the field value of imputed data objects.
+ One of ``value``, ``mean``, ``median``, ``max`` or ``min``.
+ **Default value:** ``"value"``
+ value : Mapping(required=[])
+ The field value to use when the imputation ``method`` is ``"value"``.
+
+ Returns
+ -------
+ self : Chart object
+ returns chart to allow for chaining
+
+ See Also
+ --------
+ alt.ImputeTransform : underlying transform object
+ """
+ return self._add_transform(
+ core.ImputeTransform(
+ impute=impute,
+ key=key,
+ frame=frame,
+ groupby=groupby,
+ keyvals=keyvals,
+ method=method,
+ value=value,
+ )
+ )
+
+ def transform_joinaggregate(
+ self, joinaggregate=Undefined, groupby=Undefined, **kwargs
+ ):
+ """
+ Add a JoinAggregateTransform to the schema.
+
+ Parameters
+ ----------
+ joinaggregate : List(:class:`JoinAggregateFieldDef`)
+ The definition of the fields in the join aggregate, and what calculations to use.
+ groupby : List(string)
+ The data fields for partitioning the data objects into separate groups. If
+ unspecified, all data points will be in a single group.
+ **kwargs
+ joinaggregates can also be passed by keyword argument; see Examples.
+
+ Returns
+ -------
+ self : Chart object
+ returns chart to allow for chaining
+
+ Examples
+ --------
+ >>> import altair as alt
+ >>> chart = alt.Chart().transform_joinaggregate(x='sum(y)')
+ >>> chart.transform[0]
+ JoinAggregateTransform({
+ joinaggregate: [JoinAggregateFieldDef({
+ as: 'x',
+ field: 'y',
+ op: 'sum'
+ })]
+ })
+
+ See Also
+ --------
+ alt.JoinAggregateTransform : underlying transform object
+ """
+ if joinaggregate is Undefined:
+ joinaggregate = []
+ for key, val in kwargs.items():
+ parsed = utils.parse_shorthand(val)
+ dct = {
+ "as": key,
+ "field": parsed.get("field", Undefined),
+ "op": parsed.get("aggregate", Undefined),
+ }
+ joinaggregate.append(core.JoinAggregateFieldDef(**dct))
+ return self._add_transform(
+ core.JoinAggregateTransform(joinaggregate=joinaggregate, groupby=groupby)
+ )
+
+ def transform_filter(self, filter, **kwargs):
+ """
+ Add a FilterTransform to the schema.
+
+ Parameters
+ ----------
+ filter : a filter expression or :class:`PredicateComposition`
+ The `filter` property must be one of the predicate definitions:
+ (1) a string or alt.expr expression
+ (2) a range predicate
+ (3) a selection predicate
+ (4) a logical operand combining (1)-(3)
+ (5) a Selection object
+
+ Returns
+ -------
+ self : Chart object
+ returns chart to allow for chaining
+
+ See Also
+ --------
+ alt.FilterTransform : underlying transform object
+
+ """
+ if isinstance(filter, Selection):
+ filter = {"selection": filter.name}
+ elif isinstance(filter, core.SelectionComposition):
+ filter = {"selection": filter}
+ return self._add_transform(core.FilterTransform(filter=filter, **kwargs))
+
+ def transform_flatten(self, flatten, as_=Undefined):
+ """Add a FlattenTransform to the schema.
+
+ Parameters
+ ----------
+ flatten : List(string)
+ An array of one or more data fields containing arrays to flatten.
+ If multiple fields are specified, their array values should have a parallel
+ structure, ideally with the same length.
+ If the lengths of parallel arrays do not match,
+ the longest array will be used with ``null`` values added for missing entries.
+ as : List(string)
+ The output field names for extracted array values.
+ **Default value:** The field name of the corresponding array field
+
+ Returns
+ -------
+ self : Chart object
+ returns chart to allow for chaining
+
+ See Also
+ --------
+ alt.FlattenTransform : underlying transform object
+ """
+ return self._add_transform(
+ core.FlattenTransform(flatten=flatten, **{"as": as_})
+ )
+
+ def transform_fold(self, fold, as_=Undefined):
+ """Add a FoldTransform to the spec.
+
+ Parameters
+ ----------
+ fold : List(string)
+ An array of data fields indicating the properties to fold.
+ as : [string, string]
+ The output field names for the key and value properties produced by the fold
+ transform. Default: ``["key", "value"]``
+
+ Returns
+ -------
+ self : Chart object
+ returns chart to allow for chaining
+
+ See Also
+ --------
+ Chart.transform_pivot : pivot transform - opposite of fold.
+ alt.FoldTransform : underlying transform object
+ """
+ return self._add_transform(core.FoldTransform(fold=fold, **{"as": as_}))
+
+ def transform_loess(
+ self, on, loess, as_=Undefined, bandwidth=Undefined, groupby=Undefined
+ ):
+ """Add a LoessTransform to the spec.
+
+ Parameters
+ ----------
+ on : str
+ The data field of the independent variable to use a predictor.
+ loess : str
+ The data field of the dependent variable to smooth.
+ as_ : [str, str]
+ The output field names for the smoothed points generated by the loess transform.
+ **Default value:** The field names of the input x and y values.
+ bandwidth : float
+ A bandwidth parameter in the range ``[0, 1]`` that determines the amount of
+ smoothing. **Default value:** ``0.3``
+ groupby : List(str)
+ The data fields to group by. If not specified, a single group containing all data
+ objects will be used.
+
+ Returns
+ -------
+ self : Chart object
+ returns chart to allow for chaining
+
+ See Also
+ --------
+ Chart.transform_regression: regression transform
+ alt.LoessTransform : underlying transform object
+ """
+ return self._add_transform(
+ core.LoessTransform(
+ loess=loess, on=on, bandwidth=bandwidth, groupby=groupby, **{"as": as_}
+ )
+ )
+
+ def transform_lookup(
+ self,
+ lookup=Undefined,
+ from_=Undefined,
+ as_=Undefined,
+ default=Undefined,
+ **kwargs,
+ ):
+ """Add a DataLookupTransform or SelectionLookupTransform to the chart
+
+ Attributes
+ ----------
+ lookup : string
+ Key in primary data source.
+ from_ : anyOf(:class:`LookupData`, :class:`LookupSelection`)
+ Secondary data reference.
+ as_ : anyOf(string, List(string))
+ The output fields on which to store the looked up data values.
+
+ For data lookups, this property may be left blank if ``from_.fields``
+ has been specified (those field names will be used); if ``from_.fields``
+ has not been specified, ``as_`` must be a string.
+
+ For selection lookups, this property is optional: if unspecified,
+ looked up values will be stored under a property named for the selection;
+ and if specified, it must correspond to ``from_.fields``.
+ default : string
+ The default value to use if lookup fails. **Default value:** ``null``
+
+ Returns
+ -------
+ self : Chart object
+ returns chart to allow for chaining
+
+ See Also
+ --------
+ alt.DataLookupTransform : underlying transform object
+ alt.SelectionLookupTransform : underlying transform object
+ """
+ if as_ is not Undefined:
+ if "as" in kwargs:
+ raise ValueError(
+ "transform_lookup: both 'as_' and 'as' passed as arguments."
+ )
+ kwargs["as"] = as_
+ if from_ is not Undefined:
+ if "from" in kwargs:
+ raise ValueError(
+ "transform_lookup: both 'from_' and 'from' passed as arguments."
+ )
+ kwargs["from"] = from_
+ kwargs["lookup"] = lookup
+ kwargs["default"] = default
+ return self._add_transform(core.LookupTransform(**kwargs))
+
+ def transform_pivot(
+ self, pivot, value, groupby=Undefined, limit=Undefined, op=Undefined
+ ):
+ """Add a pivot transform to the chart.
+
+ Parameters
+ ----------
+ pivot : str
+ The data field to pivot on. The unique values of this field become new field names
+ in the output stream.
+ value : str
+ The data field to populate pivoted fields. The aggregate values of this field become
+ the values of the new pivoted fields.
+ groupby : List(str)
+ The optional data fields to group by. If not specified, a single group containing
+ all data objects will be used.
+ limit : float
+ An optional parameter indicating the maximum number of pivoted fields to generate.
+ The default ( ``0`` ) applies no limit. The pivoted ``pivot`` names are sorted in
+ ascending order prior to enforcing the limit.
+ **Default value:** ``0``
+ op : string
+ The aggregation operation to apply to grouped ``value`` field values.
+ **Default value:** ``sum``
+
+ Returns
+ -------
+ self : Chart object
+ returns chart to allow for chaining
+
+ See Also
+ --------
+ Chart.transform_fold : fold transform - opposite of pivot.
+ alt.PivotTransform : underlying transform object
+ """
+ return self._add_transform(
+ core.PivotTransform(
+ pivot=pivot, value=value, groupby=groupby, limit=limit, op=op
+ )
+ )
+
+ def transform_quantile(
+ self,
+ quantile,
+ as_=Undefined,
+ groupby=Undefined,
+ probs=Undefined,
+ step=Undefined,
+ ):
+ """Add a quantile transform to the chart
+
+ Parameters
+ ----------
+ quantile : str
+ The data field for which to perform quantile estimation.
+ as : [str, str]
+ The output field names for the probability and quantile values.
+ groupby : List(str)
+ The data fields to group by. If not specified, a single group containing all data
+ objects will be used.
+ probs : List(float)
+ An array of probabilities in the range (0, 1) for which to compute quantile values.
+ If not specified, the *step* parameter will be used.
+ step : float
+ A probability step size (default 0.01) for sampling quantile values. All values from
+ one-half the step size up to 1 (exclusive) will be sampled. This parameter is only
+ used if the *probs* parameter is not provided. **Default value:** ``["prob", "value"]``
+
+ Returns
+ -------
+ self : Chart object
+ returns chart to allow for chaining
+
+ See Also
+ --------
+ alt.QuantileTransform : underlying transform object
+ """
+ return self._add_transform(
+ core.QuantileTransform(
+ quantile=quantile,
+ groupby=groupby,
+ probs=probs,
+ step=step,
+ **{"as": as_},
+ )
+ )
+
+ def transform_regression(
+ self,
+ on,
+ regression,
+ as_=Undefined,
+ extent=Undefined,
+ groupby=Undefined,
+ method=Undefined,
+ order=Undefined,
+ params=Undefined,
+ ):
+ """Add a RegressionTransform to the chart.
+
+ Parameters
+ ----------
+ on : str
+ The data field of the independent variable to use a predictor.
+ regression : str
+ The data field of the dependent variable to predict.
+ as_ : [str, str]
+ The output field names for the smoothed points generated by the regression
+ transform. **Default value:** The field names of the input x and y values.
+ extent : [float, float]
+ A [min, max] domain over the independent (x) field for the starting and ending
+ points of the generated trend line.
+ groupby : List(str)
+ The data fields to group by. If not specified, a single group containing all data
+ objects will be used.
+ method : enum('linear', 'log', 'exp', 'pow', 'quad', 'poly')
+ The functional form of the regression model. One of ``"linear"``, ``"log"``,
+ ``"exp"``, ``"pow"``, ``"quad"``, or ``"poly"``. **Default value:** ``"linear"``
+ order : float
+ The polynomial order (number of coefficients) for the 'poly' method.
+ **Default value:** ``3``
+ params : boolean
+ A boolean flag indicating if the transform should return the regression model
+ parameters (one object per group), rather than trend line points.
+ The resulting objects include a ``coef`` array of fitted coefficient values
+ (starting with the intercept term and then including terms of increasing order)
+ and an ``rSquared`` value (indicating the total variance explained by the model).
+ **Default value:** ``false``
+
+ Returns
+ -------
+ self : Chart object
+ returns chart to allow for chaining
+
+ See Also
+ --------
+ Chart.transform_loess : LOESS transform
+ alt.RegressionTransform : underlying transform object
+ """
+ return self._add_transform(
+ core.RegressionTransform(
+ regression=regression,
+ on=on,
+ extent=extent,
+ groupby=groupby,
+ method=method,
+ order=order,
+ params=params,
+ **{"as": as_},
+ )
+ )
+
+ def transform_sample(self, sample=1000):
+ """
+ Add a SampleTransform to the schema.
+
+ Parameters
+ ----------
+ sample : float
+ The maximum number of data objects to include in the sample. Default: 1000.
+
+ Returns
+ -------
+ self : Chart object
+ returns chart to allow for chaining
+
+ See Also
+ --------
+ alt.SampleTransform : underlying transform object
+ """
+ return self._add_transform(core.SampleTransform(sample))
+
+ def transform_stack(self, as_, stack, groupby, offset=Undefined, sort=Undefined):
+ """
+ Add a StackTransform to the schema.
+
+ Parameters
+ ----------
+ as_ : anyOf(string, List(string))
+ Output field names. This can be either a string or an array of strings with
+ two elements denoting the name for the fields for stack start and stack end
+ respectively.
+ If a single string(eg."val") is provided, the end field will be "val_end".
+ stack : string
+ The field which is stacked.
+ groupby : List(string)
+ The data fields to group by.
+ offset : enum('zero', 'center', 'normalize')
+ Mode for stacking marks. Default: 'zero'.
+ sort : List(:class:`SortField`)
+ Field that determines the order of leaves in the stacked charts.
+
+ Returns
+ -------
+ self : Chart object
+ returns chart to allow for chaining
+
+ See Also
+ --------
+ alt.StackTransform : underlying transform object
+ """
+ return self._add_transform(
+ core.StackTransform(
+ stack=stack, groupby=groupby, offset=offset, sort=sort, **{"as": as_}
+ )
+ )
+
+ def transform_timeunit(
+ self, as_=Undefined, field=Undefined, timeUnit=Undefined, **kwargs
+ ):
+ """
+ Add a TimeUnitTransform to the schema.
+
+ Parameters
+ ----------
+ as_ : string
+ The output field to write the timeUnit value.
+ field : string
+ The data field to apply time unit.
+ timeUnit : :class:`TimeUnit`
+ The timeUnit.
+ **kwargs
+ transforms can also be passed by keyword argument; see Examples
+
+ Returns
+ -------
+ self : Chart object
+ returns chart to allow for chaining
+
+ Examples
+ --------
+ >>> import altair as alt
+ >>> from altair import datum, expr
+
+ >>> chart = alt.Chart().transform_timeunit(month='month(date)')
+ >>> chart.transform[0]
+ TimeUnitTransform({
+ as: 'month',
+ field: 'date',
+ timeUnit: 'month'
+ })
+
+ It's also possible to pass the ``TimeUnitTransform`` arguments directly;
+ this is most useful in cases where the desired field name is not a
+ valid python identifier:
+
+ >>> kwds = {'as': 'month', 'timeUnit': 'month', 'field': 'The Month'}
+ >>> chart = alt.Chart().transform_timeunit(**kwds)
+ >>> chart.transform[0]
+ TimeUnitTransform({
+ as: 'month',
+ field: 'The Month',
+ timeUnit: 'month'
+ })
+
+ As the first form is easier to write and understand, that is the
+ recommended method.
+
+ See Also
+ --------
+ alt.TimeUnitTransform : underlying transform object
+
+ """
+ if as_ is Undefined:
+ as_ = kwargs.pop("as", Undefined)
+ else:
+ if "as" in kwargs:
+ raise ValueError(
+ "transform_timeunit: both 'as_' and 'as' passed as arguments."
+ )
+ if as_ is not Undefined:
+ dct = {"as": as_, "timeUnit": timeUnit, "field": field}
+ self = self._add_transform(core.TimeUnitTransform(**dct))
+ for as_, shorthand in kwargs.items():
+ dct = utils.parse_shorthand(
+ shorthand,
+ parse_timeunits=True,
+ parse_aggregates=False,
+ parse_types=False,
+ )
+ dct.pop("type", None)
+ dct["as"] = as_
+ if "timeUnit" not in dct:
+ raise ValueError("'{}' must include a valid timeUnit".format(shorthand))
+ self = self._add_transform(core.TimeUnitTransform(**dct))
+ return self
+
+ def transform_window(
+ self,
+ window=Undefined,
+ frame=Undefined,
+ groupby=Undefined,
+ ignorePeers=Undefined,
+ sort=Undefined,
+ **kwargs,
+ ):
+ """Add a WindowTransform to the schema
+
+ Parameters
+ ----------
+ window : List(:class:`WindowFieldDef`)
+ The definition of the fields in the window, and what calculations to use.
+ frame : List(anyOf(None, float))
+ A frame specification as a two-element array indicating how the sliding window
+ should proceed. The array entries should either be a number indicating the offset
+ from the current data object, or null to indicate unbounded rows preceding or
+ following the current data object. The default value is ``[null, 0]``, indicating
+ that the sliding window includes the current object and all preceding objects. The
+ value ``[-5, 5]`` indicates that the window should include five objects preceding
+ and five objects following the current object. Finally, ``[null, null]`` indicates
+ that the window frame should always include all data objects. The only operators
+ affected are the aggregation operations and the ``first_value``, ``last_value``, and
+ ``nth_value`` window operations. The other window operations are not affected by
+ this.
+
+ **Default value:** : ``[null, 0]`` (includes the current object and all preceding
+ objects)
+ groupby : List(string)
+ The data fields for partitioning the data objects into separate windows. If
+ unspecified, all data points will be in a single group.
+ ignorePeers : boolean
+ Indicates if the sliding window frame should ignore peer values. (Peer values are
+ those considered identical by the sort criteria). The default is false, causing the
+ window frame to expand to include all peer values. If set to true, the window frame
+ will be defined by offset values only. This setting only affects those operations
+ that depend on the window frame, namely aggregation operations and the first_value,
+ last_value, and nth_value window operations.
+
+ **Default value:** ``false``
+ sort : List(:class:`SortField`)
+ A sort field definition for sorting data objects within a window. If two data
+ objects are considered equal by the comparator, they are considered “peer” values of
+ equal rank. If sort is not specified, the order is undefined: data objects are
+ processed in the order they are observed and none are considered peers (the
+ ignorePeers parameter is ignored and treated as if set to ``true`` ).
+ **kwargs
+ transforms can also be passed by keyword argument; see Examples
+
+ Examples
+ --------
+ A cumulative line chart
+
+ >>> import altair as alt
+ >>> import numpy as np
+ >>> import pandas as pd
+ >>> data = pd.DataFrame({'x': np.arange(100),
+ ... 'y': np.random.randn(100)})
+ >>> chart = alt.Chart(data).mark_line().encode(
+ ... x='x:Q',
+ ... y='ycuml:Q'
+ ... ).transform_window(
+ ... ycuml='sum(y)'
+ ... )
+ >>> chart.transform[0]
+ WindowTransform({
+ window: [WindowFieldDef({
+ as: 'ycuml',
+ field: 'y',
+ op: 'sum'
+ })]
+ })
+
+ """
+ if kwargs:
+ if window is Undefined:
+ window = []
+ for as_, shorthand in kwargs.items():
+ kwds = {"as": as_}
+ kwds.update(
+ utils.parse_shorthand(
+ shorthand,
+ parse_aggregates=False,
+ parse_window_ops=True,
+ parse_timeunits=False,
+ parse_types=False,
+ )
+ )
+ window.append(core.WindowFieldDef(**kwds))
+
+ return self._add_transform(
+ core.WindowTransform(
+ window=window,
+ frame=frame,
+ groupby=groupby,
+ ignorePeers=ignorePeers,
+ sort=sort,
+ )
+ )
+
+ # Display-related methods
+
+ def _repr_mimebundle_(self, include=None, exclude=None):
+ """Return a MIME bundle for display in Jupyter frontends."""
+ # Catch errors explicitly to get around issues in Jupyter frontend
+ # see https://github.com/ipython/ipython/issues/11038
+ try:
+ dct = self.to_dict()
+ except Exception:
+ utils.display_traceback(in_ipython=True)
+ return {}
+ else:
+ return renderers.get()(dct)
+
+ def display(self, renderer=Undefined, theme=Undefined, actions=Undefined, **kwargs):
+ """Display chart in Jupyter notebook or JupyterLab
+
+ Parameters are passed as options to vega-embed within supported frontends.
+ See https://github.com/vega/vega-embed#options for details.
+
+ Parameters
+ ----------
+ renderer : string ('canvas' or 'svg')
+ The renderer to use
+ theme : string
+ The Vega theme name to use; see https://github.com/vega/vega-themes
+ actions : bool or dict
+ Specify whether action links ("Open In Vega Editor", etc.) are
+ included in the view.
+ **kwargs :
+ Additional parameters are also passed to vega-embed as options.
+
+ """
+ from IPython.display import display
+
+ if renderer is not Undefined:
+ kwargs["renderer"] = renderer
+ if theme is not Undefined:
+ kwargs["theme"] = theme
+ if actions is not Undefined:
+ kwargs["actions"] = actions
+
+ if kwargs:
+ options = renderers.options.copy()
+ options["embed_options"] = options.get("embed_options", {}).copy()
+ options["embed_options"].update(kwargs)
+ with renderers.enable(**options):
+ display(self)
+ else:
+ display(self)
+
+ @utils.deprecation.deprecated(message="serve() is deprecated. Use show() instead.")
+ def serve(
+ self,
+ ip="127.0.0.1",
+ port=8888,
+ n_retries=50,
+ files=None,
+ jupyter_warning=True,
+ open_browser=True,
+ http_server=None,
+ **kwargs,
+ ):
+ """Open a browser window and display a rendering of the chart
+
+ Parameters
+ ----------
+ html : string
+ HTML to serve
+ ip : string (default = '127.0.0.1')
+ ip address at which the HTML will be served.
+ port : int (default = 8888)
+ the port at which to serve the HTML
+ n_retries : int (default = 50)
+ the number of nearby ports to search if the specified port
+ is already in use.
+ files : dictionary (optional)
+ dictionary of extra content to serve
+ jupyter_warning : bool (optional)
+ if True (default), then print a warning if this is used
+ within the Jupyter notebook
+ open_browser : bool (optional)
+ if True (default), then open a web browser to the given HTML
+ http_server : class (optional)
+ optionally specify an HTTPServer class to use for showing the
+ figure. The default is Python's basic HTTPServer.
+ **kwargs :
+ additional keyword arguments passed to the save() method
+
+ """
+ from ...utils.server import serve
+
+ html = io.StringIO()
+ self.save(html, format="html", **kwargs)
+ html.seek(0)
+
+ serve(
+ html.read(),
+ ip=ip,
+ port=port,
+ n_retries=n_retries,
+ files=files,
+ jupyter_warning=jupyter_warning,
+ open_browser=open_browser,
+ http_server=http_server,
+ )
+
+ def show(self, embed_opt=None, open_browser=None):
+ """Show the chart in an external browser window.
+
+ This requires a recent version of the altair_viewer package.
+
+ Parameters
+ ----------
+ embed_opt : dict (optional)
+ The Vega embed options that control the dispay of the chart.
+ open_browser : bool (optional)
+ Specify whether a browser window should be opened. If not specified,
+ a browser window will be opened only if the server is not already
+ connected to a browser.
+ """
+ try:
+ import altair_viewer # type: ignore
+ except ImportError:
+ raise ValueError(
+ "show() method requires the altair_viewer package. "
+ "See http://github.com/altair-viz/altair_viewer"
+ )
+ altair_viewer.show(self, embed_opt=embed_opt, open_browser=open_browser)
+
+ @utils.use_signature(core.Resolve)
+ def _set_resolve(self, **kwargs):
+ """Copy the chart and update the resolve property with kwargs"""
+ if not hasattr(self, "resolve"):
+ raise ValueError(
+ "{} object has no attribute " "'resolve'".format(self.__class__)
+ )
+ copy = self.copy(deep=["resolve"])
+ if copy.resolve is Undefined:
+ copy.resolve = core.Resolve()
+ for key, val in kwargs.items():
+ copy.resolve[key] = val
+ return copy
+
+ @utils.use_signature(core.AxisResolveMap)
+ def resolve_axis(self, *args, **kwargs):
+ return self._set_resolve(axis=core.AxisResolveMap(*args, **kwargs))
+
+ @utils.use_signature(core.LegendResolveMap)
+ def resolve_legend(self, *args, **kwargs):
+ return self._set_resolve(legend=core.LegendResolveMap(*args, **kwargs))
+
+ @utils.use_signature(core.ScaleResolveMap)
+ def resolve_scale(self, *args, **kwargs):
+ return self._set_resolve(scale=core.ScaleResolveMap(*args, **kwargs))
+
+
+class _EncodingMixin(object):
+ @utils.use_signature(core.FacetedEncoding)
+ def encode(self, *args, **kwargs):
+ # Convert args to kwargs based on their types.
+ kwargs = utils.infer_encoding_types(args, kwargs, channels)
+
+ # get a copy of the dict representation of the previous encoding
+ copy = self.copy(deep=["encoding"])
+ encoding = copy._get("encoding", {})
+ if isinstance(encoding, core.VegaLiteSchema):
+ encoding = {k: v for k, v in encoding._kwds.items() if v is not Undefined}
+
+ # update with the new encodings, and apply them to the copy
+ encoding.update(kwargs)
+ copy.encoding = core.FacetedEncoding(**encoding)
+ return copy
+
+ def facet(
+ self,
+ facet=Undefined,
+ row=Undefined,
+ column=Undefined,
+ data=Undefined,
+ columns=Undefined,
+ **kwargs,
+ ):
+ """Create a facet chart from the current chart.
+
+ Faceted charts require data to be specified at the top level; if data
+ is not specified, the data from the current chart will be used at the
+ top level.
+
+ Parameters
+ ----------
+ facet : string or alt.Facet (optional)
+ The data column to use as an encoding for a wrapped facet.
+ If specified, then neither row nor column may be specified.
+ column : string or alt.Column (optional)
+ The data column to use as an encoding for a column facet.
+ May be combined with row argument, but not with facet argument.
+ row : string or alt.Column (optional)
+ The data column to use as an encoding for a row facet.
+ May be combined with column argument, but not with facet argument.
+ data : string or dataframe (optional)
+ The dataset to use for faceting. If not supplied, then data must
+ be specified in the top-level chart that calls this method.
+ columns : integer
+ the maximum number of columns for a wrapped facet.
+
+ Returns
+ -------
+ self :
+ for chaining
+ """
+ facet_specified = facet is not Undefined
+ rowcol_specified = row is not Undefined or column is not Undefined
+
+ if facet_specified and rowcol_specified:
+ raise ValueError(
+ "facet argument cannot be combined with row/column argument."
+ )
+
+ if data is Undefined:
+ if self.data is Undefined:
+ raise ValueError(
+ "Facet charts require data to be specified at the top level."
+ )
+ self = self.copy(deep=False)
+ data, self.data = self.data, Undefined
+
+ if facet_specified:
+ if isinstance(facet, str):
+ facet = channels.Facet(facet)
+ else:
+ facet = FacetMapping(row=row, column=column)
+
+ return FacetChart(spec=self, facet=facet, data=data, columns=columns, **kwargs)
+
+
+class Chart(
+ TopLevelMixin, _EncodingMixin, mixins.MarkMethodMixin, core.TopLevelUnitSpec
+):
+ """Create a basic Altair/Vega-Lite chart.
+
+ Although it is possible to set all Chart properties as constructor attributes,
+ it is more idiomatic to use methods such as ``mark_point()``, ``encode()``,
+ ``transform_filter()``, ``properties()``, etc. See Altair's documentation
+ for details and examples: http://altair-viz.github.io/.
+
+ Attributes
+ ----------
+ data : Data
+ An object describing the data source
+ mark : AnyMark
+ A string describing the mark type (one of `"bar"`, `"circle"`, `"square"`, `"tick"`,
+ `"line"`, * `"area"`, `"point"`, `"rule"`, `"geoshape"`, and `"text"`) or a
+ MarkDef object.
+ encoding : FacetedEncoding
+ A key-value mapping between encoding channels and definition of fields.
+ autosize : anyOf(AutosizeType, AutoSizeParams)
+ Sets how the visualization size should be determined. If a string, should be one of
+ `"pad"`, `"fit"` or `"none"`. Object values can additionally specify parameters for
+ content sizing and automatic resizing. `"fit"` is only supported for single and
+ layered views that don't use `rangeStep`. __Default value__: `pad`
+ background : string
+ CSS color property to use as the background of visualization.
+
+ **Default value:** none (transparent)
+ config : Config
+ Vega-Lite configuration object. This property can only be defined at the top-level
+ of a specification.
+ description : string
+ Description of this mark for commenting purpose.
+ height : float
+ The height of a visualization.
+ name : string
+ Name of the visualization for later reference.
+ padding : Padding
+ The default visualization padding, in pixels, from the edge of the visualization
+ canvas to the data rectangle. If a number, specifies padding for all sides. If an
+ object, the value should have the format `{"left": 5, "top": 5, "right": 5,
+ "bottom": 5}` to specify padding for each side of the visualization. __Default
+ value__: `5`
+ projection : Projection
+ An object defining properties of geographic projection. Works with `"geoshape"`
+ marks and `"point"` or `"line"` marks that have a channel (one or more of `"X"`,
+ `"X2"`, `"Y"`, `"Y2"`) with type `"latitude"`, or `"longitude"`.
+ selection : Mapping(required=[])
+ A key-value mapping between selection names and definitions.
+ title : anyOf(string, TitleParams)
+ Title for the plot.
+ transform : List(Transform)
+ An array of data transformations such as filter and new field calculation.
+ width : float
+ The width of a visualization.
+ """
+
+ def __init__(
+ self,
+ data=Undefined,
+ encoding=Undefined,
+ mark=Undefined,
+ width=Undefined,
+ height=Undefined,
+ **kwargs,
+ ):
+ super(Chart, self).__init__(
+ data=data,
+ encoding=encoding,
+ mark=mark,
+ width=width,
+ height=height,
+ **kwargs,
+ )
+
+ @classmethod
+ def from_dict(cls, dct, validate=True):
+ """Construct class from a dictionary representation
+
+ Parameters
+ ----------
+ dct : dictionary
+ The dict from which to construct the class
+ validate : boolean
+ If True (default), then validate the input against the schema.
+
+ Returns
+ -------
+ obj : Chart object
+ The wrapped schema
+
+ Raises
+ ------
+ jsonschema.ValidationError :
+ if validate=True and dct does not conform to the schema
+ """
+ for class_ in TopLevelMixin.__subclasses__():
+ if class_ is Chart:
+ class_ = super(Chart, cls)
+ try:
+ return class_.from_dict(dct, validate=validate)
+ except jsonschema.ValidationError:
+ pass
+
+ # As a last resort, try using the Root vegalite object
+ return core.Root.from_dict(dct, validate)
+
+ def to_dict(self, *args, **kwargs):
+ """Convert the chart to a dictionary suitable for JSON export."""
+ context = kwargs.get("context", {})
+ if self.data is Undefined and "data" not in context:
+ # No data specified here or in parent: inject empty data
+ # for easier specification of datum encodings.
+ copy = self.copy(deep=False)
+ copy.data = core.InlineData(values=[{}])
+ return super(Chart, copy).to_dict(*args, **kwargs)
+ return super().to_dict(*args, **kwargs)
+
+ def add_selection(self, *selections):
+ """Add one or more selections to the chart."""
+ if not selections:
+ return self
+ copy = self.copy(deep=["selection"])
+ if copy.selection is Undefined:
+ copy.selection = {}
+
+ for s in selections:
+ copy.selection[s.name] = s.selection
+ return copy
+
+ def interactive(self, name=None, bind_x=True, bind_y=True):
+ """Make chart axes scales interactive
+
+ Parameters
+ ----------
+ name : string
+ The selection name to use for the axes scales. This name should be
+ unique among all selections within the chart.
+ bind_x : boolean, default True
+ If true, then bind the interactive scales to the x-axis
+ bind_y : boolean, default True
+ If true, then bind the interactive scales to the y-axis
+
+ Returns
+ -------
+ chart :
+ copy of self, with interactive axes added
+
+ """
+ encodings = []
+ if bind_x:
+ encodings.append("x")
+ if bind_y:
+ encodings.append("y")
+ return self.add_selection(
+ selection_interval(bind="scales", encodings=encodings)
+ )
+
+
+def _check_if_valid_subspec(spec, classname):
+ """Check if the spec is a valid sub-spec.
+
+ If it is not, then raise a ValueError
+ """
+ err = (
+ 'Objects with "{0}" attribute cannot be used within {1}. '
+ "Consider defining the {0} attribute in the {1} object instead."
+ )
+
+ if not isinstance(spec, (core.SchemaBase, dict)):
+ raise ValueError("Only chart objects can be used in {0}.".format(classname))
+ for attr in TOPLEVEL_ONLY_KEYS:
+ if isinstance(spec, core.SchemaBase):
+ val = getattr(spec, attr, Undefined)
+ else:
+ val = spec.get(attr, Undefined)
+ if val is not Undefined:
+ raise ValueError(err.format(attr, classname))
+
+
+def _check_if_can_be_layered(spec):
+ """Check if the spec can be layered."""
+
+ def _get(spec, attr):
+ if isinstance(spec, core.SchemaBase):
+ return spec._get(attr)
+ else:
+ return spec.get(attr, Undefined)
+
+ encoding = _get(spec, "encoding")
+ if encoding is not Undefined:
+ for channel in ["row", "column", "facet"]:
+ if _get(encoding, channel) is not Undefined:
+ raise ValueError("Faceted charts cannot be layered.")
+ if isinstance(spec, (Chart, LayerChart)):
+ return
+
+ if not isinstance(spec, (core.SchemaBase, dict)):
+ raise ValueError("Only chart objects can be layered.")
+ if _get(spec, "facet") is not Undefined:
+ raise ValueError("Faceted charts cannot be layered.")
+ if isinstance(spec, FacetChart) or _get(spec, "facet") is not Undefined:
+ raise ValueError("Faceted charts cannot be layered.")
+ if isinstance(spec, RepeatChart) or _get(spec, "repeat") is not Undefined:
+ raise ValueError("Repeat charts cannot be layered.")
+ if isinstance(spec, ConcatChart) or _get(spec, "concat") is not Undefined:
+ raise ValueError("Concatenated charts cannot be layered.")
+ if isinstance(spec, HConcatChart) or _get(spec, "hconcat") is not Undefined:
+ raise ValueError("Concatenated charts cannot be layered.")
+ if isinstance(spec, VConcatChart) or _get(spec, "vconcat") is not Undefined:
+ raise ValueError("Concatenated charts cannot be layered.")
+
+
+@utils.use_signature(core.TopLevelRepeatSpec)
+class RepeatChart(TopLevelMixin, core.TopLevelRepeatSpec):
+ """A chart repeated across rows and columns with small changes"""
+
+ # Because TopLevelRepeatSpec is defined as a union as of Vega-Lite schema 4.9,
+ # we set the arguments explicitly here.
+ # TODO: Should we instead use tools/schemapi/codegen._get_args?
+ def __init__(
+ self,
+ repeat=Undefined,
+ spec=Undefined,
+ align=Undefined,
+ autosize=Undefined,
+ background=Undefined,
+ bounds=Undefined,
+ center=Undefined,
+ columns=Undefined,
+ config=Undefined,
+ data=Undefined,
+ datasets=Undefined,
+ description=Undefined,
+ name=Undefined,
+ padding=Undefined,
+ params=Undefined,
+ resolve=Undefined,
+ spacing=Undefined,
+ title=Undefined,
+ transform=Undefined,
+ usermeta=Undefined,
+ **kwds,
+ ):
+ _check_if_valid_subspec(spec, "RepeatChart")
+ super(RepeatChart, self).__init__(
+ repeat=repeat,
+ spec=spec,
+ align=align,
+ autosize=autosize,
+ background=background,
+ bounds=bounds,
+ center=center,
+ columns=columns,
+ config=config,
+ data=data,
+ datasets=datasets,
+ description=description,
+ name=name,
+ padding=padding,
+ params=params,
+ resolve=resolve,
+ spacing=spacing,
+ title=title,
+ transform=transform,
+ usermeta=usermeta,
+ **kwds,
+ )
+
+ def interactive(self, name=None, bind_x=True, bind_y=True):
+ """Make chart axes scales interactive
+
+ Parameters
+ ----------
+ name : string
+ The selection name to use for the axes scales. This name should be
+ unique among all selections within the chart.
+ bind_x : boolean, default True
+ If true, then bind the interactive scales to the x-axis
+ bind_y : boolean, default True
+ If true, then bind the interactive scales to the y-axis
+
+ Returns
+ -------
+ chart :
+ copy of self, with interactive axes added
+
+ """
+ copy = self.copy(deep=False)
+ copy.spec = copy.spec.interactive(name=name, bind_x=bind_x, bind_y=bind_y)
+ return copy
+
+ def add_selection(self, *selections):
+ """Add one or more selections to the chart."""
+ if not selections or self.spec is Undefined:
+ return self
+ copy = self.copy()
+ copy.spec = copy.spec.add_selection(*selections)
+ return copy
+
+
+def repeat(repeater="repeat"):
+ """Tie a channel to the row or column within a repeated chart
+
+ The output of this should be passed to the ``field`` attribute of
+ a channel.
+
+ Parameters
+ ----------
+ repeater : {'row'|'column'|'repeat'|'layer'}
+ The repeater to tie the field to. Default is 'repeat'.
+
+ Returns
+ -------
+ repeat : RepeatRef object
+ """
+ if repeater not in ["row", "column", "repeat", "layer"]:
+ raise ValueError("repeater must be one of ['row', 'column', 'repeat', 'layer']")
+ return core.RepeatRef(repeat=repeater)
+
+
+@utils.use_signature(core.TopLevelNormalizedConcatSpecGenericSpec)
+class ConcatChart(TopLevelMixin, core.TopLevelNormalizedConcatSpecGenericSpec):
+ """A chart with horizontally-concatenated facets"""
+
+ def __init__(self, data=Undefined, concat=(), columns=Undefined, **kwargs):
+ # TODO: move common data to top level?
+ for spec in concat:
+ _check_if_valid_subspec(spec, "ConcatChart")
+ super(ConcatChart, self).__init__(
+ data=data, concat=list(concat), columns=columns, **kwargs
+ )
+ self.data, self.concat = _combine_subchart_data(self.data, self.concat)
+
+ def __ior__(self, other):
+ _check_if_valid_subspec(other, "ConcatChart")
+ self.concat.append(other)
+ self.data, self.concat = _combine_subchart_data(self.data, self.concat)
+ return self
+
+ def __or__(self, other):
+ copy = self.copy(deep=["concat"])
+ copy |= other
+ return copy
+
+ def add_selection(self, *selections):
+ """Add one or more selections to all subcharts."""
+ if not selections or not self.concat:
+ return self
+ copy = self.copy()
+ copy.concat = [chart.add_selection(*selections) for chart in copy.concat]
+ return copy
+
+
+def concat(*charts, **kwargs):
+ """Concatenate charts horizontally"""
+ return ConcatChart(concat=charts, **kwargs)
+
+
+@utils.use_signature(core.TopLevelNormalizedHConcatSpecGenericSpec)
+class HConcatChart(TopLevelMixin, core.TopLevelNormalizedHConcatSpecGenericSpec):
+ """A chart with horizontally-concatenated facets"""
+
+ def __init__(self, data=Undefined, hconcat=(), **kwargs):
+ # TODO: move common data to top level?
+ for spec in hconcat:
+ _check_if_valid_subspec(spec, "HConcatChart")
+ super(HConcatChart, self).__init__(data=data, hconcat=list(hconcat), **kwargs)
+ self.data, self.hconcat = _combine_subchart_data(self.data, self.hconcat)
+
+ def __ior__(self, other):
+ _check_if_valid_subspec(other, "HConcatChart")
+ self.hconcat.append(other)
+ self.data, self.hconcat = _combine_subchart_data(self.data, self.hconcat)
+ return self
+
+ def __or__(self, other):
+ copy = self.copy(deep=["hconcat"])
+ copy |= other
+ return copy
+
+ def add_selection(self, *selections):
+ """Add one or more selections to all subcharts."""
+ if not selections or not self.hconcat:
+ return self
+ copy = self.copy()
+ copy.hconcat = [chart.add_selection(*selections) for chart in copy.hconcat]
+ return copy
+
+
+def hconcat(*charts, **kwargs):
+ """Concatenate charts horizontally"""
+ return HConcatChart(hconcat=charts, **kwargs)
+
+
+@utils.use_signature(core.TopLevelNormalizedVConcatSpecGenericSpec)
+class VConcatChart(TopLevelMixin, core.TopLevelNormalizedVConcatSpecGenericSpec):
+ """A chart with vertically-concatenated facets"""
+
+ def __init__(self, data=Undefined, vconcat=(), **kwargs):
+ # TODO: move common data to top level?
+ for spec in vconcat:
+ _check_if_valid_subspec(spec, "VConcatChart")
+ super(VConcatChart, self).__init__(data=data, vconcat=list(vconcat), **kwargs)
+ self.data, self.vconcat = _combine_subchart_data(self.data, self.vconcat)
+
+ def __iand__(self, other):
+ _check_if_valid_subspec(other, "VConcatChart")
+ self.vconcat.append(other)
+ self.data, self.vconcat = _combine_subchart_data(self.data, self.vconcat)
+ return self
+
+ def __and__(self, other):
+ copy = self.copy(deep=["vconcat"])
+ copy &= other
+ return copy
+
+ def add_selection(self, *selections):
+ """Add one or more selections to all subcharts."""
+ if not selections or not self.vconcat:
+ return self
+ copy = self.copy()
+ copy.vconcat = [chart.add_selection(*selections) for chart in copy.vconcat]
+ return copy
+
+
+def vconcat(*charts, **kwargs):
+ """Concatenate charts vertically"""
+ return VConcatChart(vconcat=charts, **kwargs)
+
+
+@utils.use_signature(core.TopLevelLayerSpec)
+class LayerChart(TopLevelMixin, _EncodingMixin, core.TopLevelLayerSpec):
+ """A Chart with layers within a single panel"""
+
+ def __init__(self, data=Undefined, layer=(), **kwargs):
+ # TODO: move common data to top level?
+ # TODO: check for conflicting interaction
+ for spec in layer:
+ _check_if_valid_subspec(spec, "LayerChart")
+ _check_if_can_be_layered(spec)
+ super(LayerChart, self).__init__(data=data, layer=list(layer), **kwargs)
+ self.data, self.layer = _combine_subchart_data(self.data, self.layer)
+
+ def __iadd__(self, other):
+ _check_if_valid_subspec(other, "LayerChart")
+ _check_if_can_be_layered(other)
+ self.layer.append(other)
+ self.data, self.layer = _combine_subchart_data(self.data, self.layer)
+ return self
+
+ def __add__(self, other):
+ copy = self.copy(deep=["layer"])
+ copy += other
+ return copy
+
+ def add_layers(self, *layers):
+ copy = self.copy(deep=["layer"])
+ for layer in layers:
+ copy += layer
+ return copy
+
+ def interactive(self, name=None, bind_x=True, bind_y=True):
+ """Make chart axes scales interactive
+
+ Parameters
+ ----------
+ name : string
+ The selection name to use for the axes scales. This name should be
+ unique among all selections within the chart.
+ bind_x : boolean, default True
+ If true, then bind the interactive scales to the x-axis
+ bind_y : boolean, default True
+ If true, then bind the interactive scales to the y-axis
+
+ Returns
+ -------
+ chart :
+ copy of self, with interactive axes added
+
+ """
+ if not self.layer:
+ raise ValueError(
+ "LayerChart: cannot call interactive() until a " "layer is defined"
+ )
+ copy = self.copy(deep=["layer"])
+ copy.layer[0] = copy.layer[0].interactive(
+ name=name, bind_x=bind_x, bind_y=bind_y
+ )
+ return copy
+
+ def add_selection(self, *selections):
+ """Add one or more selections to all subcharts."""
+ if not selections or not self.layer:
+ return self
+ copy = self.copy()
+ copy.layer[0] = copy.layer[0].add_selection(*selections)
+ return copy
+
+
+def layer(*charts, **kwargs):
+ """layer multiple charts"""
+ return LayerChart(layer=charts, **kwargs)
+
+
+@utils.use_signature(core.TopLevelFacetSpec)
+class FacetChart(TopLevelMixin, core.TopLevelFacetSpec):
+ """A Chart with layers within a single panel"""
+
+ def __init__(self, data=Undefined, spec=Undefined, facet=Undefined, **kwargs):
+ _check_if_valid_subspec(spec, "FacetChart")
+ super(FacetChart, self).__init__(data=data, spec=spec, facet=facet, **kwargs)
+
+ def interactive(self, name=None, bind_x=True, bind_y=True):
+ """Make chart axes scales interactive
+
+ Parameters
+ ----------
+ name : string
+ The selection name to use for the axes scales. This name should be
+ unique among all selections within the chart.
+ bind_x : boolean, default True
+ If true, then bind the interactive scales to the x-axis
+ bind_y : boolean, default True
+ If true, then bind the interactive scales to the y-axis
+
+ Returns
+ -------
+ chart :
+ copy of self, with interactive axes added
+
+ """
+ copy = self.copy(deep=False)
+ copy.spec = copy.spec.interactive(name=name, bind_x=bind_x, bind_y=bind_y)
+ return copy
+
+ def add_selection(self, *selections):
+ """Add one or more selections to the chart."""
+ if not selections or self.spec is Undefined:
+ return self
+ copy = self.copy()
+ copy.spec = copy.spec.add_selection(*selections)
+ return copy
+
+
+def topo_feature(url, feature, **kwargs):
+ """A convenience function for extracting features from a topojson url
+
+ Parameters
+ ----------
+ url : string
+ An URL from which to load the data set.
+
+ feature : string
+ The name of the TopoJSON object set to convert to a GeoJSON feature collection. For
+ example, in a map of the world, there may be an object set named `"countries"`.
+ Using the feature property, we can extract this set and generate a GeoJSON feature
+ object for each country.
+
+ **kwargs :
+ additional keywords passed to TopoDataFormat
+ """
+ return core.UrlData(
+ url=url, format=core.TopoDataFormat(type="topojson", feature=feature, **kwargs)
+ )
+
+
+def _combine_subchart_data(data, subcharts):
+ def remove_data(subchart):
+ if subchart.data is not Undefined:
+ subchart = subchart.copy()
+ subchart.data = Undefined
+ return subchart
+
+ if not subcharts:
+ # No subcharts = nothing to do.
+ pass
+ elif data is Undefined:
+ # Top level has no data; all subchart data must
+ # be identical to proceed.
+ subdata = subcharts[0].data
+ if subdata is not Undefined and all(c.data is subdata for c in subcharts):
+ data = subdata
+ subcharts = [remove_data(c) for c in subcharts]
+ else:
+ # Top level has data; subchart data must be either
+ # undefined or identical to proceed.
+ if all(c.data is Undefined or c.data is data for c in subcharts):
+ subcharts = [remove_data(c) for c in subcharts]
+
+ return data, subcharts
+
+
+@utils.use_signature(core.SequenceParams)
+def sequence(start, stop=None, step=Undefined, as_=Undefined, **kwds):
+ """Sequence generator."""
+ if stop is None:
+ start, stop = 0, start
+ params = core.SequenceParams(start=start, stop=stop, step=step, **{"as": as_})
+ return core.SequenceGenerator(sequence=params, **kwds)
+
+
+@utils.use_signature(core.GraticuleParams)
+def graticule(**kwds):
+ """Graticule generator."""
+ if not kwds:
+ # graticule: True indicates default parameters
+ graticule = True
+ else:
+ graticule = core.GraticuleParams(**kwds)
+ return core.GraticuleGenerator(graticule=graticule)
+
+
+def sphere():
+ """Sphere generator."""
+ return core.SphereGenerator(sphere=True)
diff --git a/venv/lib/python3.9/site-packages/altair/vegalite/v4/data.py b/venv/lib/python3.9/site-packages/altair/vegalite/v4/data.py
new file mode 100644
index 00000000..e379a203
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vegalite/v4/data.py
@@ -0,0 +1,43 @@
+from ..data import (
+ MaxRowsError,
+ curry,
+ default_data_transformer,
+ limit_rows,
+ pipe,
+ sample,
+ to_csv,
+ to_json,
+ to_values,
+ DataTransformerRegistry,
+)
+
+
+# ==============================================================================
+# VegaLite 4 data transformers
+# ==============================================================================
+
+
+ENTRY_POINT_GROUP = "altair.vegalite.v4.data_transformer" # type: str
+
+
+data_transformers = DataTransformerRegistry(
+ entry_point_group=ENTRY_POINT_GROUP
+) # type: DataTransformerRegistry
+data_transformers.register("default", default_data_transformer)
+data_transformers.register("json", to_json)
+data_transformers.register("csv", to_csv)
+data_transformers.enable("default")
+
+
+__all__ = (
+ "MaxRowsError",
+ "curry",
+ "default_data_transformer",
+ "limit_rows",
+ "pipe",
+ "sample",
+ "to_csv",
+ "to_json",
+ "to_values",
+ "data_transformers",
+)
diff --git a/venv/lib/python3.9/site-packages/altair/vegalite/v4/display.py b/venv/lib/python3.9/site-packages/altair/vegalite/v4/display.py
new file mode 100644
index 00000000..7615fc4f
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vegalite/v4/display.py
@@ -0,0 +1,119 @@
+import os
+
+from ...utils.mimebundle import spec_to_mimebundle
+from ..display import Displayable
+from ..display import default_renderer_base
+from ..display import json_renderer_base
+from ..display import RendererRegistry
+from ..display import HTMLRenderer
+
+from .schema import SCHEMA_VERSION
+
+VEGALITE_VERSION = SCHEMA_VERSION.lstrip("v")
+VEGA_VERSION = "5"
+VEGAEMBED_VERSION = "6"
+
+
+# ==============================================================================
+# VegaLite v4 renderer logic
+# ==============================================================================
+
+
+# The MIME type for Vega-Lite 4.x releases.
+VEGALITE_MIME_TYPE = "application/vnd.vegalite.v4+json" # type: str
+
+# The entry point group that can be used by other packages to declare other
+# renderers that will be auto-detected. Explicit registration is also
+# allowed by the PluginRegistery API.
+ENTRY_POINT_GROUP = "altair.vegalite.v4.renderer" # type: str
+
+# The display message when rendering fails
+DEFAULT_DISPLAY = """\
+<VegaLite 4 object>
+
+If you see this message, it means the renderer has not been properly enabled
+for the frontend that you are using. For more information, see
+https://altair-viz.github.io/user_guide/troubleshooting.html
+"""
+
+renderers = RendererRegistry(entry_point_group=ENTRY_POINT_GROUP)
+
+here = os.path.dirname(os.path.realpath(__file__))
+
+
+def mimetype_renderer(spec, **metadata):
+ return default_renderer_base(spec, VEGALITE_MIME_TYPE, DEFAULT_DISPLAY, **metadata)
+
+
+def json_renderer(spec, **metadata):
+ return json_renderer_base(spec, DEFAULT_DISPLAY, **metadata)
+
+
+def png_renderer(spec, **metadata):
+ return spec_to_mimebundle(
+ spec,
+ format="png",
+ mode="vega-lite",
+ vega_version=VEGA_VERSION,
+ vegaembed_version=VEGAEMBED_VERSION,
+ vegalite_version=VEGALITE_VERSION,
+ **metadata,
+ )
+
+
+def svg_renderer(spec, **metadata):
+ return spec_to_mimebundle(
+ spec,
+ format="svg",
+ mode="vega-lite",
+ vega_version=VEGA_VERSION,
+ vegaembed_version=VEGAEMBED_VERSION,
+ vegalite_version=VEGALITE_VERSION,
+ **metadata,
+ )
+
+
+html_renderer = HTMLRenderer(
+ mode="vega-lite",
+ template="universal",
+ vega_version=VEGA_VERSION,
+ vegaembed_version=VEGAEMBED_VERSION,
+ vegalite_version=VEGALITE_VERSION,
+)
+
+renderers.register("default", html_renderer)
+renderers.register("html", html_renderer)
+renderers.register("colab", html_renderer)
+renderers.register("kaggle", html_renderer)
+renderers.register("zeppelin", html_renderer)
+renderers.register("mimetype", mimetype_renderer)
+renderers.register("jupyterlab", mimetype_renderer)
+renderers.register("nteract", mimetype_renderer)
+renderers.register("json", json_renderer)
+renderers.register("png", png_renderer)
+renderers.register("svg", svg_renderer)
+renderers.enable("default")
+
+
+class VegaLite(Displayable):
+ """An IPython/Jupyter display class for rendering VegaLite 4."""
+
+ renderers = renderers
+ schema_path = (__name__, "schema/vega-lite-schema.json")
+
+
+def vegalite(spec, validate=True):
+ """Render and optionally validate a VegaLite 4 spec.
+
+ This will use the currently enabled renderer to render the spec.
+
+ Parameters
+ ==========
+ spec: dict
+ A fully compliant VegaLite 4 spec, with the data portion fully processed.
+ validate: bool
+ Should the spec be validated against the VegaLite 4 schema?
+ """
+ from IPython.display import display
+
+ display(VegaLite(spec, validate=validate))
diff --git a/venv/lib/python3.9/site-packages/altair/vegalite/v4/schema/__init__.py b/venv/lib/python3.9/site-packages/altair/vegalite/v4/schema/__init__.py
new file mode 100644
index 00000000..618a5035
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vegalite/v4/schema/__init__.py
@@ -0,0 +1,5 @@
+# flake8: noqa
+from .core import *
+from .channels import *
+SCHEMA_VERSION = 'v4.17.0'
+SCHEMA_URL = 'https://vega.github.io/schema/vega-lite/v4.17.0.json'
diff --git a/venv/lib/python3.9/site-packages/altair/vegalite/v4/schema/channels.py b/venv/lib/python3.9/site-packages/altair/vegalite/v4/schema/channels.py
new file mode 100644
index 00000000..1a6dda19
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vegalite/v4/schema/channels.py
@@ -0,0 +1,10343 @@
+# The contents of this file are automatically written by
+# tools/generate_schema_wrapper.py. Do not modify directly.
+
+from . import core
+import pandas as pd
+from altair.utils.schemapi import Undefined
+from altair.utils import parse_shorthand
+
+
+class FieldChannelMixin(object):
+ def to_dict(self, validate=True, ignore=(), context=None):
+ context = context or {}
+ shorthand = self._get('shorthand')
+ field = self._get('field')
+
+ if shorthand is not Undefined and field is not Undefined:
+ raise ValueError("{} specifies both shorthand={} and field={}. "
+ "".format(self.__class__.__name__, shorthand, field))
+
+ if isinstance(shorthand, (tuple, list)):
+ # If given a list of shorthands, then transform it to a list of classes
+ kwds = self._kwds.copy()
+ kwds.pop('shorthand')
+ return [self.__class__(sh, **kwds).to_dict(validate=validate, ignore=ignore, context=context)
+ for sh in shorthand]
+
+ if shorthand is Undefined:
+ parsed = {}
+ elif isinstance(shorthand, str):
+ parsed = parse_shorthand(shorthand, data=context.get('data', None))
+ type_required = 'type' in self._kwds
+ type_in_shorthand = 'type' in parsed
+ type_defined_explicitly = self._get('type') is not Undefined
+ if not type_required:
+ # Secondary field names don't require a type argument in VegaLite 3+.
+ # We still parse it out of the shorthand, but drop it here.
+ parsed.pop('type', None)
+ elif not (type_in_shorthand or type_defined_explicitly):
+ if isinstance(context.get('data', None), pd.DataFrame):
+ raise ValueError("{} encoding field is specified without a type; "
+ "the type cannot be inferred because it does not "
+ "match any column in the data.".format(shorthand))
+ else:
+ raise ValueError("{} encoding field is specified without a type; "
+ "the type cannot be automatically inferred because "
+ "the data is not specified as a pandas.DataFrame."
+ "".format(shorthand))
+ else:
+ # Shorthand is not a string; we pass the definition to field,
+ # and do not do any parsing.
+ parsed = {'field': shorthand}
+
+ # Set shorthand to Undefined, because it's not part of the base schema.
+ self.shorthand = Undefined
+ self._kwds.update({k: v for k, v in parsed.items()
+ if self._get(k) is Undefined})
+ return super(FieldChannelMixin, self).to_dict(
+ validate=validate,
+ ignore=ignore,
+ context=context
+ )
+
+
+class ValueChannelMixin(object):
+ def to_dict(self, validate=True, ignore=(), context=None):
+ context = context or {}
+ condition = getattr(self, 'condition', Undefined)
+ copy = self # don't copy unless we need to
+ if condition is not Undefined:
+ if isinstance(condition, core.SchemaBase):
+ pass
+ elif 'field' in condition and 'type' not in condition:
+ kwds = parse_shorthand(condition['field'], context.get('data', None))
+ copy = self.copy(deep=['condition'])
+ copy.condition.update(kwds)
+ return super(ValueChannelMixin, copy).to_dict(validate=validate,
+ ignore=ignore,
+ context=context)
+
+
+class DatumChannelMixin(object):
+ def to_dict(self, validate=True, ignore=(), context=None):
+ context = context or {}
+ datum = getattr(self, 'datum', Undefined)
+ copy = self # don't copy unless we need to
+ if datum is not Undefined:
+ if isinstance(datum, core.SchemaBase):
+ pass
+ return super(DatumChannelMixin, copy).to_dict(validate=validate,
+ ignore=ignore,
+ context=context)
+
+
+class Angle(FieldChannelMixin, core.FieldOrDatumDefWithConditionMarkPropFieldDefnumber):
+ """Angle schema wrapper
+
+ Mapping(required=[shorthand])
+ A FieldDef with Condition :raw-html:`<ValueDef>` { condition: {value: ...}, field:
+ ..., ... }
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ condition : anyOf(:class:`ConditionalValueDefnumberExprRef`,
+ List(:class:`ConditionalValueDefnumberExprRef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ legend : anyOf(:class:`Legend`, None)
+ An object defining properties of the legend. If ``null``, the legend for the
+ encoding channel will be removed.
+
+ **Default value:** If undefined, default `legend properties
+ <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.
+
+ **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
+ documentation.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ sort : :class:`Sort`
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following: - ``"ascending"`` or
+ ``"descending"`` -- for sorting by the values' natural order in JavaScript. - `A
+ string indicating an encoding channel name to sort by
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g., ``"x"``
+ or ``"y"`` ) with an optional minus prefix for descending sort (e.g., ``"-x"`` to
+ sort by x-field, descending). This channel string is short-form of `a
+ sort-by-encoding definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For example,
+ ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order":
+ "descending"}``. - `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field. - `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values in
+ their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ). - ``null``
+ indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` and sorting by another channel is not supported for ``row`` and
+ ``column``.
+
+ **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
+ documentation.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "angle"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, band=Undefined, bin=Undefined,
+ condition=Undefined, field=Undefined, legend=Undefined, scale=Undefined,
+ sort=Undefined, timeUnit=Undefined, title=Undefined, type=Undefined, **kwds):
+ super(Angle, self).__init__(shorthand=shorthand, aggregate=aggregate, band=band, bin=bin,
+ condition=condition, field=field, legend=legend, scale=scale,
+ sort=sort, timeUnit=timeUnit, title=title, type=type, **kwds)
+
+
+class AngleDatum(DatumChannelMixin, core.FieldOrDatumDefWithConditionDatumDefnumber):
+ """AngleDatum schema wrapper
+
+ Mapping(required=[])
+ A FieldDef with Condition :raw-html:`<ValueDef>` { condition: {value: ...}, field:
+ ..., ... }
+
+ Attributes
+ ----------
+
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ condition : anyOf(:class:`ConditionalValueDefnumberExprRef`,
+ List(:class:`ConditionalValueDefnumberExprRef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ datum : anyOf(:class:`PrimitiveValue`, :class:`DateTime`, :class:`ExprRef`,
+ :class:`RepeatRef`)
+ A constant value in data domain.
+ type : :class:`Type`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "angle"
+ def __init__(self, datum, band=Undefined, condition=Undefined, type=Undefined, **kwds):
+ super(AngleDatum, self).__init__(datum=datum, band=band, condition=condition, type=type, **kwds)
+
+
+class AngleValue(ValueChannelMixin, core.ValueDefWithConditionMarkPropFieldOrDatumDefnumber):
+ """AngleValue schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ condition : anyOf(:class:`ConditionalMarkPropFieldOrDatumDef`,
+ :class:`ConditionalValueDefnumberExprRef`, List(:class:`ConditionalValueDefnumberExprRef`))
+ A field definition or one or more value definition(s) with a selection predicate.
+ value : anyOf(float, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "angle"
+
+ def __init__(self, value, condition=Undefined, **kwds):
+ super(AngleValue, self).__init__(value=value, condition=condition, **kwds)
+
+
+class Color(FieldChannelMixin, core.FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull):
+ """Color schema wrapper
+
+ Mapping(required=[shorthand])
+ A FieldDef with Condition :raw-html:`<ValueDef>` { condition: {value: ...}, field:
+ ..., ... }
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ condition : anyOf(:class:`ConditionalValueDefGradientstringnullExprRef`,
+ List(:class:`ConditionalValueDefGradientstringnullExprRef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ legend : anyOf(:class:`Legend`, None)
+ An object defining properties of the legend. If ``null``, the legend for the
+ encoding channel will be removed.
+
+ **Default value:** If undefined, default `legend properties
+ <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.
+
+ **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
+ documentation.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ sort : :class:`Sort`
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following: - ``"ascending"`` or
+ ``"descending"`` -- for sorting by the values' natural order in JavaScript. - `A
+ string indicating an encoding channel name to sort by
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g., ``"x"``
+ or ``"y"`` ) with an optional minus prefix for descending sort (e.g., ``"-x"`` to
+ sort by x-field, descending). This channel string is short-form of `a
+ sort-by-encoding definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For example,
+ ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order":
+ "descending"}``. - `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field. - `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values in
+ their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ). - ``null``
+ indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` and sorting by another channel is not supported for ``row`` and
+ ``column``.
+
+ **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
+ documentation.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "color"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, band=Undefined, bin=Undefined,
+ condition=Undefined, field=Undefined, legend=Undefined, scale=Undefined,
+ sort=Undefined, timeUnit=Undefined, title=Undefined, type=Undefined, **kwds):
+ super(Color, self).__init__(shorthand=shorthand, aggregate=aggregate, band=band, bin=bin,
+ condition=condition, field=field, legend=legend, scale=scale,
+ sort=sort, timeUnit=timeUnit, title=title, type=type, **kwds)
+
+
+class ColorDatum(DatumChannelMixin, core.FieldOrDatumDefWithConditionDatumDefGradientstringnull):
+ """ColorDatum schema wrapper
+
+ Mapping(required=[])
+ A FieldDef with Condition :raw-html:`<ValueDef>` { condition: {value: ...}, field:
+ ..., ... }
+
+ Attributes
+ ----------
+
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ condition : anyOf(:class:`ConditionalValueDefGradientstringnullExprRef`,
+ List(:class:`ConditionalValueDefGradientstringnullExprRef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ datum : anyOf(:class:`PrimitiveValue`, :class:`DateTime`, :class:`ExprRef`,
+ :class:`RepeatRef`)
+ A constant value in data domain.
+ type : :class:`Type`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "color"
+ def __init__(self, datum, band=Undefined, condition=Undefined, type=Undefined, **kwds):
+ super(ColorDatum, self).__init__(datum=datum, band=band, condition=condition, type=type, **kwds)
+
+
+class ColorValue(ValueChannelMixin, core.ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull):
+ """ColorValue schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ condition : anyOf(:class:`ConditionalMarkPropFieldOrDatumDef`,
+ :class:`ConditionalValueDefGradientstringnullExprRef`,
+ List(:class:`ConditionalValueDefGradientstringnullExprRef`))
+ A field definition or one or more value definition(s) with a selection predicate.
+ value : anyOf(:class:`Gradient`, string, None, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "color"
+
+ def __init__(self, value, condition=Undefined, **kwds):
+ super(ColorValue, self).__init__(value=value, condition=condition, **kwds)
+
+
+class Column(FieldChannelMixin, core.RowColumnEncodingFieldDef):
+ """Column schema wrapper
+
+ Mapping(required=[shorthand])
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ align : :class:`LayoutAlign`
+ The alignment to apply to row/column facet's subplot. The supported string values
+ are ``"all"``, ``"each"``, and ``"none"``.
+
+
+ * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply
+ placed one after the other. - For ``"each"``, subviews will be aligned into a
+ clean grid structure, but each row or column may be of variable size. - For
+ ``"all"``, subviews will be aligned and each row or column will be sized
+ identically based on the maximum observed size. String values for this property
+ will be applied to both grid rows and columns.
+
+ **Default value:** ``"all"``.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ center : boolean
+ Boolean flag indicating if facet's subviews should be centered relative to their
+ respective rows or columns.
+
+ **Default value:** ``false``
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ header : :class:`Header`
+ An object defining properties of a facet's header.
+ sort : anyOf(:class:`SortArray`, :class:`SortOrder`, :class:`EncodingSortField`, None)
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following: - ``"ascending"`` or
+ ``"descending"`` -- for sorting by the values' natural order in JavaScript. - `A
+ sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field. - `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values in
+ their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ). - ``null``
+ indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` is not supported for ``row`` and ``column``.
+ spacing : float
+ The spacing in pixels between facet's sub-views.
+
+ **Default value** : Depends on ``"spacing"`` property of `the view composition
+ configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__ (
+ ``20`` by default)
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "column"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, align=Undefined, band=Undefined,
+ bin=Undefined, center=Undefined, field=Undefined, header=Undefined, sort=Undefined,
+ spacing=Undefined, timeUnit=Undefined, title=Undefined, type=Undefined, **kwds):
+ super(Column, self).__init__(shorthand=shorthand, aggregate=aggregate, align=align, band=band,
+ bin=bin, center=center, field=field, header=header, sort=sort,
+ spacing=spacing, timeUnit=timeUnit, title=title, type=type, **kwds)
+
+
+class Description(FieldChannelMixin, core.StringFieldDefWithCondition):
+ """Description schema wrapper
+
+ Mapping(required=[shorthand])
+ A FieldDef with Condition :raw-html:`<ValueDef>` { condition: {value: ...}, field:
+ ..., ... }
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : anyOf(boolean, :class:`BinParams`, string, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ condition : anyOf(:class:`ConditionalValueDefstringExprRef`,
+ List(:class:`ConditionalValueDefstringExprRef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ format : anyOf(string, :class:`Dictunknown`)
+ When used with the default ``"number"`` and ``"time"`` format type, the text
+ formatting pattern for labels of guides (axes, legends, headers) and text marks.
+
+
+ * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
+ `number format pattern <https://github.com/d3/d3-format#locale_format>`__. - If
+ the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
+ format pattern <https://github.com/d3/d3-time-format#locale_format>`__.
+
+ See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
+ for more examples.
+
+ When used with a `custom formatType
+ <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this
+ value will be passed as ``format`` alongside ``datum.value`` to the registered
+ function.
+
+ **Default value:** Derived from `numberFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
+ format and from `timeFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
+ format.
+ formatType : string
+ The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom
+ format type
+ <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.
+
+ **Default value:** - ``"time"`` for temporal fields and ordinal and nominal fields
+ with ``timeUnit``. - ``"number"`` for quantitative fields as well as ordinal and
+ nominal fields without ``timeUnit``.
+ labelExpr : string
+ `Vega expression <https://vega.github.io/vega/docs/expressions/>`__ for customizing
+ labels text.
+
+ **Note:** The label text and value can be assessed via the ``label`` and ``value``
+ properties of the axis's backing ``datum`` object.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "description"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, band=Undefined, bin=Undefined,
+ condition=Undefined, field=Undefined, format=Undefined, formatType=Undefined,
+ labelExpr=Undefined, timeUnit=Undefined, title=Undefined, type=Undefined, **kwds):
+ super(Description, self).__init__(shorthand=shorthand, aggregate=aggregate, band=band, bin=bin,
+ condition=condition, field=field, format=format,
+ formatType=formatType, labelExpr=labelExpr, timeUnit=timeUnit,
+ title=title, type=type, **kwds)
+
+
+class DescriptionValue(ValueChannelMixin, core.StringValueDefWithCondition):
+ """DescriptionValue schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ condition : anyOf(:class:`ConditionalMarkPropFieldOrDatumDef`,
+ :class:`ConditionalValueDefstringnullExprRef`,
+ List(:class:`ConditionalValueDefstringnullExprRef`))
+ A field definition or one or more value definition(s) with a selection predicate.
+ value : anyOf(string, None, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "description"
+
+ def __init__(self, value, condition=Undefined, **kwds):
+ super(DescriptionValue, self).__init__(value=value, condition=condition, **kwds)
+
+
+class Detail(FieldChannelMixin, core.FieldDefWithoutScale):
+ """Detail schema wrapper
+
+ Mapping(required=[shorthand])
+ Definition object for a data field, its type and transformation of an encoding channel.
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : anyOf(boolean, :class:`BinParams`, string, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "detail"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, band=Undefined, bin=Undefined,
+ field=Undefined, timeUnit=Undefined, title=Undefined, type=Undefined, **kwds):
+ super(Detail, self).__init__(shorthand=shorthand, aggregate=aggregate, band=band, bin=bin,
+ field=field, timeUnit=timeUnit, title=title, type=type, **kwds)
+
+
+class Facet(FieldChannelMixin, core.FacetEncodingFieldDef):
+ """Facet schema wrapper
+
+ Mapping(required=[shorthand])
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ align : anyOf(:class:`LayoutAlign`, :class:`RowColLayoutAlign`)
+ The alignment to apply to grid rows and columns. The supported string values are
+ ``"all"``, ``"each"``, and ``"none"``.
+
+
+ * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply
+ placed one after the other. - For ``"each"``, subviews will be aligned into a
+ clean grid structure, but each row or column may be of variable size. - For
+ ``"all"``, subviews will be aligned and each row or column will be sized
+ identically based on the maximum observed size. String values for this property
+ will be applied to both grid rows and columns.
+
+ Alternatively, an object value of the form ``{"row": string, "column": string}`` can
+ be used to supply different alignments for rows and columns.
+
+ **Default value:** ``"all"``.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ bounds : enum('full', 'flush')
+ The bounds calculation method to use for determining the extent of a sub-plot. One
+ of ``full`` (the default) or ``flush``.
+
+
+ * If set to ``full``, the entire calculated bounds (including axes, title, and
+ legend) will be used. - If set to ``flush``, only the specified width and height
+ values for the sub-view will be used. The ``flush`` setting can be useful when
+ attempting to place sub-plots without axes or legends into a uniform grid
+ structure.
+
+ **Default value:** ``"full"``
+ center : anyOf(boolean, :class:`RowColboolean`)
+ Boolean flag indicating if subviews should be centered relative to their respective
+ rows or columns.
+
+ An object value of the form ``{"row": boolean, "column": boolean}`` can be used to
+ supply different centering values for rows and columns.
+
+ **Default value:** ``false``
+ columns : float
+ The number of columns to include in the view composition layout.
+
+ **Default value** : ``undefined`` -- An infinite number of columns (a single row)
+ will be assumed. This is equivalent to ``hconcat`` (for ``concat`` ) and to using
+ the ``column`` channel (for ``facet`` and ``repeat`` ).
+
+ **Note** :
+
+ 1) This property is only for: - the general (wrappable) ``concat`` operator (not
+ ``hconcat`` / ``vconcat`` ) - the ``facet`` and ``repeat`` operator with one
+ field/repetition definition (without row/column nesting)
+
+ 2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat`` )
+ and to using the ``row`` channel (for ``facet`` and ``repeat`` ).
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ header : :class:`Header`
+ An object defining properties of a facet's header.
+ sort : anyOf(:class:`SortArray`, :class:`SortOrder`, :class:`EncodingSortField`, None)
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following: - ``"ascending"`` or
+ ``"descending"`` -- for sorting by the values' natural order in JavaScript. - `A
+ sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field. - `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values in
+ their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ). - ``null``
+ indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` is not supported for ``row`` and ``column``.
+ spacing : anyOf(float, :class:`RowColnumber`)
+ The spacing in pixels between sub-views of the composition operator. An object of
+ the form ``{"row": number, "column": number}`` can be used to set different spacing
+ values for rows and columns.
+
+ **Default value** : Depends on ``"spacing"`` property of `the view composition
+ configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__ (
+ ``20`` by default)
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "facet"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, align=Undefined, band=Undefined,
+ bin=Undefined, bounds=Undefined, center=Undefined, columns=Undefined, field=Undefined,
+ header=Undefined, sort=Undefined, spacing=Undefined, timeUnit=Undefined,
+ title=Undefined, type=Undefined, **kwds):
+ super(Facet, self).__init__(shorthand=shorthand, aggregate=aggregate, align=align, band=band,
+ bin=bin, bounds=bounds, center=center, columns=columns, field=field,
+ header=header, sort=sort, spacing=spacing, timeUnit=timeUnit,
+ title=title, type=type, **kwds)
+
+
+class Fill(FieldChannelMixin, core.FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull):
+ """Fill schema wrapper
+
+ Mapping(required=[shorthand])
+ A FieldDef with Condition :raw-html:`<ValueDef>` { condition: {value: ...}, field:
+ ..., ... }
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ condition : anyOf(:class:`ConditionalValueDefGradientstringnullExprRef`,
+ List(:class:`ConditionalValueDefGradientstringnullExprRef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ legend : anyOf(:class:`Legend`, None)
+ An object defining properties of the legend. If ``null``, the legend for the
+ encoding channel will be removed.
+
+ **Default value:** If undefined, default `legend properties
+ <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.
+
+ **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
+ documentation.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ sort : :class:`Sort`
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following: - ``"ascending"`` or
+ ``"descending"`` -- for sorting by the values' natural order in JavaScript. - `A
+ string indicating an encoding channel name to sort by
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g., ``"x"``
+ or ``"y"`` ) with an optional minus prefix for descending sort (e.g., ``"-x"`` to
+ sort by x-field, descending). This channel string is short-form of `a
+ sort-by-encoding definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For example,
+ ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order":
+ "descending"}``. - `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field. - `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values in
+ their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ). - ``null``
+ indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` and sorting by another channel is not supported for ``row`` and
+ ``column``.
+
+ **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
+ documentation.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "fill"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, band=Undefined, bin=Undefined,
+ condition=Undefined, field=Undefined, legend=Undefined, scale=Undefined,
+ sort=Undefined, timeUnit=Undefined, title=Undefined, type=Undefined, **kwds):
+ super(Fill, self).__init__(shorthand=shorthand, aggregate=aggregate, band=band, bin=bin,
+ condition=condition, field=field, legend=legend, scale=scale,
+ sort=sort, timeUnit=timeUnit, title=title, type=type, **kwds)
+
+
+class FillDatum(DatumChannelMixin, core.FieldOrDatumDefWithConditionDatumDefGradientstringnull):
+ """FillDatum schema wrapper
+
+ Mapping(required=[])
+ A FieldDef with Condition :raw-html:`<ValueDef>` { condition: {value: ...}, field:
+ ..., ... }
+
+ Attributes
+ ----------
+
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ condition : anyOf(:class:`ConditionalValueDefGradientstringnullExprRef`,
+ List(:class:`ConditionalValueDefGradientstringnullExprRef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ datum : anyOf(:class:`PrimitiveValue`, :class:`DateTime`, :class:`ExprRef`,
+ :class:`RepeatRef`)
+ A constant value in data domain.
+ type : :class:`Type`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "fill"
+ def __init__(self, datum, band=Undefined, condition=Undefined, type=Undefined, **kwds):
+ super(FillDatum, self).__init__(datum=datum, band=band, condition=condition, type=type, **kwds)
+
+
+class FillValue(ValueChannelMixin, core.ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull):
+ """FillValue schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ condition : anyOf(:class:`ConditionalMarkPropFieldOrDatumDef`,
+ :class:`ConditionalValueDefGradientstringnullExprRef`,
+ List(:class:`ConditionalValueDefGradientstringnullExprRef`))
+ A field definition or one or more value definition(s) with a selection predicate.
+ value : anyOf(:class:`Gradient`, string, None, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "fill"
+
+ def __init__(self, value, condition=Undefined, **kwds):
+ super(FillValue, self).__init__(value=value, condition=condition, **kwds)
+
+
+class FillOpacity(FieldChannelMixin, core.FieldOrDatumDefWithConditionMarkPropFieldDefnumber):
+ """FillOpacity schema wrapper
+
+ Mapping(required=[shorthand])
+ A FieldDef with Condition :raw-html:`<ValueDef>` { condition: {value: ...}, field:
+ ..., ... }
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ condition : anyOf(:class:`ConditionalValueDefnumberExprRef`,
+ List(:class:`ConditionalValueDefnumberExprRef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ legend : anyOf(:class:`Legend`, None)
+ An object defining properties of the legend. If ``null``, the legend for the
+ encoding channel will be removed.
+
+ **Default value:** If undefined, default `legend properties
+ <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.
+
+ **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
+ documentation.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ sort : :class:`Sort`
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following: - ``"ascending"`` or
+ ``"descending"`` -- for sorting by the values' natural order in JavaScript. - `A
+ string indicating an encoding channel name to sort by
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g., ``"x"``
+ or ``"y"`` ) with an optional minus prefix for descending sort (e.g., ``"-x"`` to
+ sort by x-field, descending). This channel string is short-form of `a
+ sort-by-encoding definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For example,
+ ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order":
+ "descending"}``. - `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field. - `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values in
+ their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ). - ``null``
+ indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` and sorting by another channel is not supported for ``row`` and
+ ``column``.
+
+ **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
+ documentation.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "fillOpacity"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, band=Undefined, bin=Undefined,
+ condition=Undefined, field=Undefined, legend=Undefined, scale=Undefined,
+ sort=Undefined, timeUnit=Undefined, title=Undefined, type=Undefined, **kwds):
+ super(FillOpacity, self).__init__(shorthand=shorthand, aggregate=aggregate, band=band, bin=bin,
+ condition=condition, field=field, legend=legend, scale=scale,
+ sort=sort, timeUnit=timeUnit, title=title, type=type, **kwds)
+
+
+class FillOpacityDatum(DatumChannelMixin, core.FieldOrDatumDefWithConditionDatumDefnumber):
+ """FillOpacityDatum schema wrapper
+
+ Mapping(required=[])
+ A FieldDef with Condition :raw-html:`<ValueDef>` { condition: {value: ...}, field:
+ ..., ... }
+
+ Attributes
+ ----------
+
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ condition : anyOf(:class:`ConditionalValueDefnumberExprRef`,
+ List(:class:`ConditionalValueDefnumberExprRef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ datum : anyOf(:class:`PrimitiveValue`, :class:`DateTime`, :class:`ExprRef`,
+ :class:`RepeatRef`)
+ A constant value in data domain.
+ type : :class:`Type`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "fillOpacity"
+ def __init__(self, datum, band=Undefined, condition=Undefined, type=Undefined, **kwds):
+ super(FillOpacityDatum, self).__init__(datum=datum, band=band, condition=condition, type=type,
+ **kwds)
+
+
+class FillOpacityValue(ValueChannelMixin, core.ValueDefWithConditionMarkPropFieldOrDatumDefnumber):
+ """FillOpacityValue schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ condition : anyOf(:class:`ConditionalMarkPropFieldOrDatumDef`,
+ :class:`ConditionalValueDefnumberExprRef`, List(:class:`ConditionalValueDefnumberExprRef`))
+ A field definition or one or more value definition(s) with a selection predicate.
+ value : anyOf(float, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "fillOpacity"
+
+ def __init__(self, value, condition=Undefined, **kwds):
+ super(FillOpacityValue, self).__init__(value=value, condition=condition, **kwds)
+
+
+class Href(FieldChannelMixin, core.StringFieldDefWithCondition):
+ """Href schema wrapper
+
+ Mapping(required=[shorthand])
+ A FieldDef with Condition :raw-html:`<ValueDef>` { condition: {value: ...}, field:
+ ..., ... }
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : anyOf(boolean, :class:`BinParams`, string, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ condition : anyOf(:class:`ConditionalValueDefstringExprRef`,
+ List(:class:`ConditionalValueDefstringExprRef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ format : anyOf(string, :class:`Dictunknown`)
+ When used with the default ``"number"`` and ``"time"`` format type, the text
+ formatting pattern for labels of guides (axes, legends, headers) and text marks.
+
+
+ * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
+ `number format pattern <https://github.com/d3/d3-format#locale_format>`__. - If
+ the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
+ format pattern <https://github.com/d3/d3-time-format#locale_format>`__.
+
+ See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
+ for more examples.
+
+ When used with a `custom formatType
+ <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this
+ value will be passed as ``format`` alongside ``datum.value`` to the registered
+ function.
+
+ **Default value:** Derived from `numberFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
+ format and from `timeFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
+ format.
+ formatType : string
+ The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom
+ format type
+ <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.
+
+ **Default value:** - ``"time"`` for temporal fields and ordinal and nominal fields
+ with ``timeUnit``. - ``"number"`` for quantitative fields as well as ordinal and
+ nominal fields without ``timeUnit``.
+ labelExpr : string
+ `Vega expression <https://vega.github.io/vega/docs/expressions/>`__ for customizing
+ labels text.
+
+ **Note:** The label text and value can be assessed via the ``label`` and ``value``
+ properties of the axis's backing ``datum`` object.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "href"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, band=Undefined, bin=Undefined,
+ condition=Undefined, field=Undefined, format=Undefined, formatType=Undefined,
+ labelExpr=Undefined, timeUnit=Undefined, title=Undefined, type=Undefined, **kwds):
+ super(Href, self).__init__(shorthand=shorthand, aggregate=aggregate, band=band, bin=bin,
+ condition=condition, field=field, format=format,
+ formatType=formatType, labelExpr=labelExpr, timeUnit=timeUnit,
+ title=title, type=type, **kwds)
+
+
+class HrefValue(ValueChannelMixin, core.StringValueDefWithCondition):
+ """HrefValue schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ condition : anyOf(:class:`ConditionalMarkPropFieldOrDatumDef`,
+ :class:`ConditionalValueDefstringnullExprRef`,
+ List(:class:`ConditionalValueDefstringnullExprRef`))
+ A field definition or one or more value definition(s) with a selection predicate.
+ value : anyOf(string, None, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "href"
+
+ def __init__(self, value, condition=Undefined, **kwds):
+ super(HrefValue, self).__init__(value=value, condition=condition, **kwds)
+
+
+class Key(FieldChannelMixin, core.FieldDefWithoutScale):
+ """Key schema wrapper
+
+ Mapping(required=[shorthand])
+ Definition object for a data field, its type and transformation of an encoding channel.
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : anyOf(boolean, :class:`BinParams`, string, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "key"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, band=Undefined, bin=Undefined,
+ field=Undefined, timeUnit=Undefined, title=Undefined, type=Undefined, **kwds):
+ super(Key, self).__init__(shorthand=shorthand, aggregate=aggregate, band=band, bin=bin,
+ field=field, timeUnit=timeUnit, title=title, type=type, **kwds)
+
+
+class Latitude(FieldChannelMixin, core.LatLongFieldDef):
+ """Latitude schema wrapper
+
+ Mapping(required=[shorthand])
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : None
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : string
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "latitude"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, band=Undefined, bin=Undefined,
+ field=Undefined, timeUnit=Undefined, title=Undefined, type=Undefined, **kwds):
+ super(Latitude, self).__init__(shorthand=shorthand, aggregate=aggregate, band=band, bin=bin,
+ field=field, timeUnit=timeUnit, title=title, type=type, **kwds)
+
+
+class LatitudeDatum(DatumChannelMixin, core.DatumDef):
+ """LatitudeDatum schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ datum : anyOf(:class:`PrimitiveValue`, :class:`DateTime`, :class:`ExprRef`,
+ :class:`RepeatRef`)
+ A constant value in data domain.
+ type : :class:`Type`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "latitude"
+ def __init__(self, datum, band=Undefined, type=Undefined, **kwds):
+ super(LatitudeDatum, self).__init__(datum=datum, band=band, type=type, **kwds)
+
+
+class LatitudeValue(ValueChannelMixin, core.NumericValueDef):
+ """LatitudeValue schema wrapper
+
+ Mapping(required=[value])
+ Definition object for a constant value (primitive value or gradient definition) of an
+ encoding channel.
+
+ Attributes
+ ----------
+
+ value : anyOf(float, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "latitude"
+
+ def __init__(self, value, **kwds):
+ super(LatitudeValue, self).__init__(value=value, **kwds)
+
+
+class Latitude2(FieldChannelMixin, core.SecondaryFieldDef):
+ """Latitude2 schema wrapper
+
+ Mapping(required=[shorthand])
+ A field definition of a secondary channel that shares a scale with another primary channel.
+ For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``.
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : None
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "latitude2"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, band=Undefined, bin=Undefined,
+ field=Undefined, timeUnit=Undefined, title=Undefined, **kwds):
+ super(Latitude2, self).__init__(shorthand=shorthand, aggregate=aggregate, band=band, bin=bin,
+ field=field, timeUnit=timeUnit, title=title, **kwds)
+
+
+class Latitude2Datum(DatumChannelMixin, core.DatumDef):
+ """Latitude2Datum schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ datum : anyOf(:class:`PrimitiveValue`, :class:`DateTime`, :class:`ExprRef`,
+ :class:`RepeatRef`)
+ A constant value in data domain.
+ type : :class:`Type`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "latitude2"
+ def __init__(self, datum, band=Undefined, type=Undefined, **kwds):
+ super(Latitude2Datum, self).__init__(datum=datum, band=band, type=type, **kwds)
+
+
+class Latitude2Value(ValueChannelMixin, core.PositionValueDef):
+ """Latitude2Value schema wrapper
+
+ Mapping(required=[value])
+ Definition object for a constant value (primitive value or gradient definition) of an
+ encoding channel.
+
+ Attributes
+ ----------
+
+ value : anyOf(float, string, string, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "latitude2"
+
+ def __init__(self, value, **kwds):
+ super(Latitude2Value, self).__init__(value=value, **kwds)
+
+
+class Longitude(FieldChannelMixin, core.LatLongFieldDef):
+ """Longitude schema wrapper
+
+ Mapping(required=[shorthand])
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : None
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : string
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "longitude"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, band=Undefined, bin=Undefined,
+ field=Undefined, timeUnit=Undefined, title=Undefined, type=Undefined, **kwds):
+ super(Longitude, self).__init__(shorthand=shorthand, aggregate=aggregate, band=band, bin=bin,
+ field=field, timeUnit=timeUnit, title=title, type=type, **kwds)
+
+
+class LongitudeDatum(DatumChannelMixin, core.DatumDef):
+ """LongitudeDatum schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ datum : anyOf(:class:`PrimitiveValue`, :class:`DateTime`, :class:`ExprRef`,
+ :class:`RepeatRef`)
+ A constant value in data domain.
+ type : :class:`Type`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "longitude"
+ def __init__(self, datum, band=Undefined, type=Undefined, **kwds):
+ super(LongitudeDatum, self).__init__(datum=datum, band=band, type=type, **kwds)
+
+
+class LongitudeValue(ValueChannelMixin, core.NumericValueDef):
+ """LongitudeValue schema wrapper
+
+ Mapping(required=[value])
+ Definition object for a constant value (primitive value or gradient definition) of an
+ encoding channel.
+
+ Attributes
+ ----------
+
+ value : anyOf(float, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "longitude"
+
+ def __init__(self, value, **kwds):
+ super(LongitudeValue, self).__init__(value=value, **kwds)
+
+
+class Longitude2(FieldChannelMixin, core.SecondaryFieldDef):
+ """Longitude2 schema wrapper
+
+ Mapping(required=[shorthand])
+ A field definition of a secondary channel that shares a scale with another primary channel.
+ For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``.
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : None
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "longitude2"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, band=Undefined, bin=Undefined,
+ field=Undefined, timeUnit=Undefined, title=Undefined, **kwds):
+ super(Longitude2, self).__init__(shorthand=shorthand, aggregate=aggregate, band=band, bin=bin,
+ field=field, timeUnit=timeUnit, title=title, **kwds)
+
+
+class Longitude2Datum(DatumChannelMixin, core.DatumDef):
+ """Longitude2Datum schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ datum : anyOf(:class:`PrimitiveValue`, :class:`DateTime`, :class:`ExprRef`,
+ :class:`RepeatRef`)
+ A constant value in data domain.
+ type : :class:`Type`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "longitude2"
+ def __init__(self, datum, band=Undefined, type=Undefined, **kwds):
+ super(Longitude2Datum, self).__init__(datum=datum, band=band, type=type, **kwds)
+
+
+class Longitude2Value(ValueChannelMixin, core.PositionValueDef):
+ """Longitude2Value schema wrapper
+
+ Mapping(required=[value])
+ Definition object for a constant value (primitive value or gradient definition) of an
+ encoding channel.
+
+ Attributes
+ ----------
+
+ value : anyOf(float, string, string, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "longitude2"
+
+ def __init__(self, value, **kwds):
+ super(Longitude2Value, self).__init__(value=value, **kwds)
+
+
+class Opacity(FieldChannelMixin, core.FieldOrDatumDefWithConditionMarkPropFieldDefnumber):
+ """Opacity schema wrapper
+
+ Mapping(required=[shorthand])
+ A FieldDef with Condition :raw-html:`<ValueDef>` { condition: {value: ...}, field:
+ ..., ... }
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ condition : anyOf(:class:`ConditionalValueDefnumberExprRef`,
+ List(:class:`ConditionalValueDefnumberExprRef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ legend : anyOf(:class:`Legend`, None)
+ An object defining properties of the legend. If ``null``, the legend for the
+ encoding channel will be removed.
+
+ **Default value:** If undefined, default `legend properties
+ <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.
+
+ **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
+ documentation.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ sort : :class:`Sort`
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following: - ``"ascending"`` or
+ ``"descending"`` -- for sorting by the values' natural order in JavaScript. - `A
+ string indicating an encoding channel name to sort by
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g., ``"x"``
+ or ``"y"`` ) with an optional minus prefix for descending sort (e.g., ``"-x"`` to
+ sort by x-field, descending). This channel string is short-form of `a
+ sort-by-encoding definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For example,
+ ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order":
+ "descending"}``. - `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field. - `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values in
+ their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ). - ``null``
+ indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` and sorting by another channel is not supported for ``row`` and
+ ``column``.
+
+ **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
+ documentation.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "opacity"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, band=Undefined, bin=Undefined,
+ condition=Undefined, field=Undefined, legend=Undefined, scale=Undefined,
+ sort=Undefined, timeUnit=Undefined, title=Undefined, type=Undefined, **kwds):
+ super(Opacity, self).__init__(shorthand=shorthand, aggregate=aggregate, band=band, bin=bin,
+ condition=condition, field=field, legend=legend, scale=scale,
+ sort=sort, timeUnit=timeUnit, title=title, type=type, **kwds)
+
+
+class OpacityDatum(DatumChannelMixin, core.FieldOrDatumDefWithConditionDatumDefnumber):
+ """OpacityDatum schema wrapper
+
+ Mapping(required=[])
+ A FieldDef with Condition :raw-html:`<ValueDef>` { condition: {value: ...}, field:
+ ..., ... }
+
+ Attributes
+ ----------
+
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ condition : anyOf(:class:`ConditionalValueDefnumberExprRef`,
+ List(:class:`ConditionalValueDefnumberExprRef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ datum : anyOf(:class:`PrimitiveValue`, :class:`DateTime`, :class:`ExprRef`,
+ :class:`RepeatRef`)
+ A constant value in data domain.
+ type : :class:`Type`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "opacity"
+ def __init__(self, datum, band=Undefined, condition=Undefined, type=Undefined, **kwds):
+ super(OpacityDatum, self).__init__(datum=datum, band=band, condition=condition, type=type,
+ **kwds)
+
+
+class OpacityValue(ValueChannelMixin, core.ValueDefWithConditionMarkPropFieldOrDatumDefnumber):
+ """OpacityValue schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ condition : anyOf(:class:`ConditionalMarkPropFieldOrDatumDef`,
+ :class:`ConditionalValueDefnumberExprRef`, List(:class:`ConditionalValueDefnumberExprRef`))
+ A field definition or one or more value definition(s) with a selection predicate.
+ value : anyOf(float, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "opacity"
+
+ def __init__(self, value, condition=Undefined, **kwds):
+ super(OpacityValue, self).__init__(value=value, condition=condition, **kwds)
+
+
+class Order(FieldChannelMixin, core.OrderFieldDef):
+ """Order schema wrapper
+
+ Mapping(required=[shorthand])
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : anyOf(boolean, :class:`BinParams`, string, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ sort : :class:`SortOrder`
+ The sort order. One of ``"ascending"`` (default) or ``"descending"``.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "order"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, band=Undefined, bin=Undefined,
+ field=Undefined, sort=Undefined, timeUnit=Undefined, title=Undefined, type=Undefined,
+ **kwds):
+ super(Order, self).__init__(shorthand=shorthand, aggregate=aggregate, band=band, bin=bin,
+ field=field, sort=sort, timeUnit=timeUnit, title=title, type=type,
+ **kwds)
+
+
+class OrderValue(ValueChannelMixin, core.OrderValueDef):
+ """OrderValue schema wrapper
+
+ Mapping(required=[value])
+
+ Attributes
+ ----------
+
+ value : anyOf(float, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ condition : anyOf(:class:`ConditionalValueDefnumber`,
+ List(:class:`ConditionalValueDefnumber`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "order"
+
+ def __init__(self, value, condition=Undefined, **kwds):
+ super(OrderValue, self).__init__(value=value, condition=condition, **kwds)
+
+
+class Radius(FieldChannelMixin, core.PositionFieldDefBase):
+ """Radius schema wrapper
+
+ Mapping(required=[shorthand])
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : anyOf(boolean, :class:`BinParams`, string, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ sort : :class:`Sort`
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following: - ``"ascending"`` or
+ ``"descending"`` -- for sorting by the values' natural order in JavaScript. - `A
+ string indicating an encoding channel name to sort by
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g., ``"x"``
+ or ``"y"`` ) with an optional minus prefix for descending sort (e.g., ``"-x"`` to
+ sort by x-field, descending). This channel string is short-form of `a
+ sort-by-encoding definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For example,
+ ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order":
+ "descending"}``. - `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field. - `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values in
+ their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ). - ``null``
+ indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` and sorting by another channel is not supported for ``row`` and
+ ``column``.
+
+ **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
+ documentation.
+ stack : anyOf(:class:`StackOffset`, None, boolean)
+ Type of stacking offset if the field should be stacked. ``stack`` is only applicable
+ for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For
+ example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar
+ chart.
+
+ ``stack`` can be one of the following values: - ``"zero"`` or `true`: stacking with
+ baseline offset at zero value of the scale (for creating typical stacked
+ [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and `area
+ <https://vega.github.io/vega-lite/docs/stack.html#area>`__ chart). - ``"normalize"``
+ - stacking with normalized domain (for creating `normalized stacked bar and area
+ charts <https://vega.github.io/vega-lite/docs/stack.html#normalized>`__.
+ :raw-html:`<br/>` - ``"center"`` - stacking with center baseline (for `streamgraph
+ <https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__ ). - ``null`` or
+ ``false`` - No-stacking. This will produce layered `bar
+ <https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area
+ chart.
+
+ **Default value:** ``zero`` for plots with all of the following conditions are true:
+ (1) the mark is ``bar``, ``area``, or ``arc`` ; (2) the stacked measure channel (x
+ or y) has a linear scale; (3) At least one of non-position channels mapped to an
+ unaggregated field that is different from x and y. Otherwise, ``null`` by default.
+
+ **See also:** `stack <https://vega.github.io/vega-lite/docs/stack.html>`__
+ documentation.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "radius"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, band=Undefined, bin=Undefined,
+ field=Undefined, scale=Undefined, sort=Undefined, stack=Undefined, timeUnit=Undefined,
+ title=Undefined, type=Undefined, **kwds):
+ super(Radius, self).__init__(shorthand=shorthand, aggregate=aggregate, band=band, bin=bin,
+ field=field, scale=scale, sort=sort, stack=stack,
+ timeUnit=timeUnit, title=title, type=type, **kwds)
+
+
+class RadiusDatum(DatumChannelMixin, core.PositionDatumDefBase):
+ """RadiusDatum schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ datum : anyOf(:class:`PrimitiveValue`, :class:`DateTime`, :class:`ExprRef`,
+ :class:`RepeatRef`)
+ A constant value in data domain.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ stack : anyOf(:class:`StackOffset`, None, boolean)
+ Type of stacking offset if the field should be stacked. ``stack`` is only applicable
+ for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For
+ example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar
+ chart.
+
+ ``stack`` can be one of the following values: - ``"zero"`` or `true`: stacking with
+ baseline offset at zero value of the scale (for creating typical stacked
+ [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and `area
+ <https://vega.github.io/vega-lite/docs/stack.html#area>`__ chart). - ``"normalize"``
+ - stacking with normalized domain (for creating `normalized stacked bar and area
+ charts <https://vega.github.io/vega-lite/docs/stack.html#normalized>`__.
+ :raw-html:`<br/>` - ``"center"`` - stacking with center baseline (for `streamgraph
+ <https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__ ). - ``null`` or
+ ``false`` - No-stacking. This will produce layered `bar
+ <https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area
+ chart.
+
+ **Default value:** ``zero`` for plots with all of the following conditions are true:
+ (1) the mark is ``bar``, ``area``, or ``arc`` ; (2) the stacked measure channel (x
+ or y) has a linear scale; (3) At least one of non-position channels mapped to an
+ unaggregated field that is different from x and y. Otherwise, ``null`` by default.
+
+ **See also:** `stack <https://vega.github.io/vega-lite/docs/stack.html>`__
+ documentation.
+ type : :class:`Type`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "radius"
+ def __init__(self, datum, band=Undefined, scale=Undefined, stack=Undefined, type=Undefined, **kwds):
+ super(RadiusDatum, self).__init__(datum=datum, band=band, scale=scale, stack=stack, type=type,
+ **kwds)
+
+
+class RadiusValue(ValueChannelMixin, core.PositionValueDef):
+ """RadiusValue schema wrapper
+
+ Mapping(required=[value])
+ Definition object for a constant value (primitive value or gradient definition) of an
+ encoding channel.
+
+ Attributes
+ ----------
+
+ value : anyOf(float, string, string, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "radius"
+
+ def __init__(self, value, **kwds):
+ super(RadiusValue, self).__init__(value=value, **kwds)
+
+
+class Radius2(FieldChannelMixin, core.SecondaryFieldDef):
+ """Radius2 schema wrapper
+
+ Mapping(required=[shorthand])
+ A field definition of a secondary channel that shares a scale with another primary channel.
+ For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``.
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : None
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "radius2"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, band=Undefined, bin=Undefined,
+ field=Undefined, timeUnit=Undefined, title=Undefined, **kwds):
+ super(Radius2, self).__init__(shorthand=shorthand, aggregate=aggregate, band=band, bin=bin,
+ field=field, timeUnit=timeUnit, title=title, **kwds)
+
+
+class Radius2Datum(DatumChannelMixin, core.DatumDef):
+ """Radius2Datum schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ datum : anyOf(:class:`PrimitiveValue`, :class:`DateTime`, :class:`ExprRef`,
+ :class:`RepeatRef`)
+ A constant value in data domain.
+ type : :class:`Type`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "radius2"
+ def __init__(self, datum, band=Undefined, type=Undefined, **kwds):
+ super(Radius2Datum, self).__init__(datum=datum, band=band, type=type, **kwds)
+
+
+class Radius2Value(ValueChannelMixin, core.PositionValueDef):
+ """Radius2Value schema wrapper
+
+ Mapping(required=[value])
+ Definition object for a constant value (primitive value or gradient definition) of an
+ encoding channel.
+
+ Attributes
+ ----------
+
+ value : anyOf(float, string, string, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "radius2"
+
+ def __init__(self, value, **kwds):
+ super(Radius2Value, self).__init__(value=value, **kwds)
+
+
+class Row(FieldChannelMixin, core.RowColumnEncodingFieldDef):
+ """Row schema wrapper
+
+ Mapping(required=[shorthand])
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ align : :class:`LayoutAlign`
+ The alignment to apply to row/column facet's subplot. The supported string values
+ are ``"all"``, ``"each"``, and ``"none"``.
+
+
+ * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply
+ placed one after the other. - For ``"each"``, subviews will be aligned into a
+ clean grid structure, but each row or column may be of variable size. - For
+ ``"all"``, subviews will be aligned and each row or column will be sized
+ identically based on the maximum observed size. String values for this property
+ will be applied to both grid rows and columns.
+
+ **Default value:** ``"all"``.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ center : boolean
+ Boolean flag indicating if facet's subviews should be centered relative to their
+ respective rows or columns.
+
+ **Default value:** ``false``
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ header : :class:`Header`
+ An object defining properties of a facet's header.
+ sort : anyOf(:class:`SortArray`, :class:`SortOrder`, :class:`EncodingSortField`, None)
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following: - ``"ascending"`` or
+ ``"descending"`` -- for sorting by the values' natural order in JavaScript. - `A
+ sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field. - `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values in
+ their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ). - ``null``
+ indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` is not supported for ``row`` and ``column``.
+ spacing : float
+ The spacing in pixels between facet's sub-views.
+
+ **Default value** : Depends on ``"spacing"`` property of `the view composition
+ configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__ (
+ ``20`` by default)
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "row"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, align=Undefined, band=Undefined,
+ bin=Undefined, center=Undefined, field=Undefined, header=Undefined, sort=Undefined,
+ spacing=Undefined, timeUnit=Undefined, title=Undefined, type=Undefined, **kwds):
+ super(Row, self).__init__(shorthand=shorthand, aggregate=aggregate, align=align, band=band,
+ bin=bin, center=center, field=field, header=header, sort=sort,
+ spacing=spacing, timeUnit=timeUnit, title=title, type=type, **kwds)
+
+
+class Shape(FieldChannelMixin, core.FieldOrDatumDefWithConditionMarkPropFieldDefTypeForShapestringnull):
+ """Shape schema wrapper
+
+ Mapping(required=[shorthand])
+ A FieldDef with Condition :raw-html:`<ValueDef>` { condition: {value: ...}, field:
+ ..., ... }
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ condition : anyOf(:class:`ConditionalValueDefstringnullExprRef`,
+ List(:class:`ConditionalValueDefstringnullExprRef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ legend : anyOf(:class:`Legend`, None)
+ An object defining properties of the legend. If ``null``, the legend for the
+ encoding channel will be removed.
+
+ **Default value:** If undefined, default `legend properties
+ <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.
+
+ **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
+ documentation.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ sort : :class:`Sort`
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following: - ``"ascending"`` or
+ ``"descending"`` -- for sorting by the values' natural order in JavaScript. - `A
+ string indicating an encoding channel name to sort by
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g., ``"x"``
+ or ``"y"`` ) with an optional minus prefix for descending sort (e.g., ``"-x"`` to
+ sort by x-field, descending). This channel string is short-form of `a
+ sort-by-encoding definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For example,
+ ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order":
+ "descending"}``. - `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field. - `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values in
+ their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ). - ``null``
+ indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` and sorting by another channel is not supported for ``row`` and
+ ``column``.
+
+ **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
+ documentation.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`TypeForShape`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "shape"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, band=Undefined, bin=Undefined,
+ condition=Undefined, field=Undefined, legend=Undefined, scale=Undefined,
+ sort=Undefined, timeUnit=Undefined, title=Undefined, type=Undefined, **kwds):
+ super(Shape, self).__init__(shorthand=shorthand, aggregate=aggregate, band=band, bin=bin,
+ condition=condition, field=field, legend=legend, scale=scale,
+ sort=sort, timeUnit=timeUnit, title=title, type=type, **kwds)
+
+
+class ShapeDatum(DatumChannelMixin, core.FieldOrDatumDefWithConditionDatumDefstringnull):
+ """ShapeDatum schema wrapper
+
+ Mapping(required=[])
+ A FieldDef with Condition :raw-html:`<ValueDef>` { condition: {value: ...}, field:
+ ..., ... }
+
+ Attributes
+ ----------
+
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ condition : anyOf(:class:`ConditionalValueDefstringnullExprRef`,
+ List(:class:`ConditionalValueDefstringnullExprRef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ datum : anyOf(:class:`PrimitiveValue`, :class:`DateTime`, :class:`ExprRef`,
+ :class:`RepeatRef`)
+ A constant value in data domain.
+ type : :class:`Type`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "shape"
+ def __init__(self, datum, band=Undefined, condition=Undefined, type=Undefined, **kwds):
+ super(ShapeDatum, self).__init__(datum=datum, band=band, condition=condition, type=type, **kwds)
+
+
+class ShapeValue(ValueChannelMixin, core.ValueDefWithConditionMarkPropFieldOrDatumDefTypeForShapestringnull):
+ """ShapeValue schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ condition : anyOf(:class:`ConditionalMarkPropFieldOrDatumDefTypeForShape`,
+ :class:`ConditionalValueDefstringnullExprRef`,
+ List(:class:`ConditionalValueDefstringnullExprRef`))
+ A field definition or one or more value definition(s) with a selection predicate.
+ value : anyOf(string, None, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "shape"
+
+ def __init__(self, value, condition=Undefined, **kwds):
+ super(ShapeValue, self).__init__(value=value, condition=condition, **kwds)
+
+
+class Size(FieldChannelMixin, core.FieldOrDatumDefWithConditionMarkPropFieldDefnumber):
+ """Size schema wrapper
+
+ Mapping(required=[shorthand])
+ A FieldDef with Condition :raw-html:`<ValueDef>` { condition: {value: ...}, field:
+ ..., ... }
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ condition : anyOf(:class:`ConditionalValueDefnumberExprRef`,
+ List(:class:`ConditionalValueDefnumberExprRef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ legend : anyOf(:class:`Legend`, None)
+ An object defining properties of the legend. If ``null``, the legend for the
+ encoding channel will be removed.
+
+ **Default value:** If undefined, default `legend properties
+ <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.
+
+ **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
+ documentation.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ sort : :class:`Sort`
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following: - ``"ascending"`` or
+ ``"descending"`` -- for sorting by the values' natural order in JavaScript. - `A
+ string indicating an encoding channel name to sort by
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g., ``"x"``
+ or ``"y"`` ) with an optional minus prefix for descending sort (e.g., ``"-x"`` to
+ sort by x-field, descending). This channel string is short-form of `a
+ sort-by-encoding definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For example,
+ ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order":
+ "descending"}``. - `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field. - `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values in
+ their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ). - ``null``
+ indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` and sorting by another channel is not supported for ``row`` and
+ ``column``.
+
+ **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
+ documentation.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "size"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, band=Undefined, bin=Undefined,
+ condition=Undefined, field=Undefined, legend=Undefined, scale=Undefined,
+ sort=Undefined, timeUnit=Undefined, title=Undefined, type=Undefined, **kwds):
+ super(Size, self).__init__(shorthand=shorthand, aggregate=aggregate, band=band, bin=bin,
+ condition=condition, field=field, legend=legend, scale=scale,
+ sort=sort, timeUnit=timeUnit, title=title, type=type, **kwds)
+
+
+class SizeDatum(DatumChannelMixin, core.FieldOrDatumDefWithConditionDatumDefnumber):
+ """SizeDatum schema wrapper
+
+ Mapping(required=[])
+ A FieldDef with Condition :raw-html:`<ValueDef>` { condition: {value: ...}, field:
+ ..., ... }
+
+ Attributes
+ ----------
+
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ condition : anyOf(:class:`ConditionalValueDefnumberExprRef`,
+ List(:class:`ConditionalValueDefnumberExprRef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ datum : anyOf(:class:`PrimitiveValue`, :class:`DateTime`, :class:`ExprRef`,
+ :class:`RepeatRef`)
+ A constant value in data domain.
+ type : :class:`Type`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "size"
+ def __init__(self, datum, band=Undefined, condition=Undefined, type=Undefined, **kwds):
+ super(SizeDatum, self).__init__(datum=datum, band=band, condition=condition, type=type, **kwds)
+
+
+class SizeValue(ValueChannelMixin, core.ValueDefWithConditionMarkPropFieldOrDatumDefnumber):
+ """SizeValue schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ condition : anyOf(:class:`ConditionalMarkPropFieldOrDatumDef`,
+ :class:`ConditionalValueDefnumberExprRef`, List(:class:`ConditionalValueDefnumberExprRef`))
+ A field definition or one or more value definition(s) with a selection predicate.
+ value : anyOf(float, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "size"
+
+ def __init__(self, value, condition=Undefined, **kwds):
+ super(SizeValue, self).__init__(value=value, condition=condition, **kwds)
+
+
+class Stroke(FieldChannelMixin, core.FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull):
+ """Stroke schema wrapper
+
+ Mapping(required=[shorthand])
+ A FieldDef with Condition :raw-html:`<ValueDef>` { condition: {value: ...}, field:
+ ..., ... }
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ condition : anyOf(:class:`ConditionalValueDefGradientstringnullExprRef`,
+ List(:class:`ConditionalValueDefGradientstringnullExprRef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ legend : anyOf(:class:`Legend`, None)
+ An object defining properties of the legend. If ``null``, the legend for the
+ encoding channel will be removed.
+
+ **Default value:** If undefined, default `legend properties
+ <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.
+
+ **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
+ documentation.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ sort : :class:`Sort`
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following: - ``"ascending"`` or
+ ``"descending"`` -- for sorting by the values' natural order in JavaScript. - `A
+ string indicating an encoding channel name to sort by
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g., ``"x"``
+ or ``"y"`` ) with an optional minus prefix for descending sort (e.g., ``"-x"`` to
+ sort by x-field, descending). This channel string is short-form of `a
+ sort-by-encoding definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For example,
+ ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order":
+ "descending"}``. - `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field. - `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values in
+ their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ). - ``null``
+ indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` and sorting by another channel is not supported for ``row`` and
+ ``column``.
+
+ **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
+ documentation.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "stroke"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, band=Undefined, bin=Undefined,
+ condition=Undefined, field=Undefined, legend=Undefined, scale=Undefined,
+ sort=Undefined, timeUnit=Undefined, title=Undefined, type=Undefined, **kwds):
+ super(Stroke, self).__init__(shorthand=shorthand, aggregate=aggregate, band=band, bin=bin,
+ condition=condition, field=field, legend=legend, scale=scale,
+ sort=sort, timeUnit=timeUnit, title=title, type=type, **kwds)
+
+
+class StrokeDatum(DatumChannelMixin, core.FieldOrDatumDefWithConditionDatumDefGradientstringnull):
+ """StrokeDatum schema wrapper
+
+ Mapping(required=[])
+ A FieldDef with Condition :raw-html:`<ValueDef>` { condition: {value: ...}, field:
+ ..., ... }
+
+ Attributes
+ ----------
+
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ condition : anyOf(:class:`ConditionalValueDefGradientstringnullExprRef`,
+ List(:class:`ConditionalValueDefGradientstringnullExprRef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ datum : anyOf(:class:`PrimitiveValue`, :class:`DateTime`, :class:`ExprRef`,
+ :class:`RepeatRef`)
+ A constant value in data domain.
+ type : :class:`Type`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "stroke"
+ def __init__(self, datum, band=Undefined, condition=Undefined, type=Undefined, **kwds):
+ super(StrokeDatum, self).__init__(datum=datum, band=band, condition=condition, type=type, **kwds)
+
+
+class StrokeValue(ValueChannelMixin, core.ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull):
+ """StrokeValue schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ condition : anyOf(:class:`ConditionalMarkPropFieldOrDatumDef`,
+ :class:`ConditionalValueDefGradientstringnullExprRef`,
+ List(:class:`ConditionalValueDefGradientstringnullExprRef`))
+ A field definition or one or more value definition(s) with a selection predicate.
+ value : anyOf(:class:`Gradient`, string, None, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "stroke"
+
+ def __init__(self, value, condition=Undefined, **kwds):
+ super(StrokeValue, self).__init__(value=value, condition=condition, **kwds)
+
+
+class StrokeDash(FieldChannelMixin, core.FieldOrDatumDefWithConditionMarkPropFieldDefnumberArray):
+ """StrokeDash schema wrapper
+
+ Mapping(required=[shorthand])
+ A FieldDef with Condition :raw-html:`<ValueDef>` { condition: {value: ...}, field:
+ ..., ... }
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ condition : anyOf(:class:`ConditionalValueDefnumberArrayExprRef`,
+ List(:class:`ConditionalValueDefnumberArrayExprRef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ legend : anyOf(:class:`Legend`, None)
+ An object defining properties of the legend. If ``null``, the legend for the
+ encoding channel will be removed.
+
+ **Default value:** If undefined, default `legend properties
+ <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.
+
+ **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
+ documentation.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ sort : :class:`Sort`
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following: - ``"ascending"`` or
+ ``"descending"`` -- for sorting by the values' natural order in JavaScript. - `A
+ string indicating an encoding channel name to sort by
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g., ``"x"``
+ or ``"y"`` ) with an optional minus prefix for descending sort (e.g., ``"-x"`` to
+ sort by x-field, descending). This channel string is short-form of `a
+ sort-by-encoding definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For example,
+ ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order":
+ "descending"}``. - `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field. - `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values in
+ their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ). - ``null``
+ indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` and sorting by another channel is not supported for ``row`` and
+ ``column``.
+
+ **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
+ documentation.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "strokeDash"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, band=Undefined, bin=Undefined,
+ condition=Undefined, field=Undefined, legend=Undefined, scale=Undefined,
+ sort=Undefined, timeUnit=Undefined, title=Undefined, type=Undefined, **kwds):
+ super(StrokeDash, self).__init__(shorthand=shorthand, aggregate=aggregate, band=band, bin=bin,
+ condition=condition, field=field, legend=legend, scale=scale,
+ sort=sort, timeUnit=timeUnit, title=title, type=type, **kwds)
+
+
+class StrokeDashDatum(DatumChannelMixin, core.FieldOrDatumDefWithConditionDatumDefnumberArray):
+ """StrokeDashDatum schema wrapper
+
+ Mapping(required=[])
+ A FieldDef with Condition :raw-html:`<ValueDef>` { condition: {value: ...}, field:
+ ..., ... }
+
+ Attributes
+ ----------
+
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ condition : anyOf(:class:`ConditionalValueDefnumberArrayExprRef`,
+ List(:class:`ConditionalValueDefnumberArrayExprRef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ datum : anyOf(:class:`PrimitiveValue`, :class:`DateTime`, :class:`ExprRef`,
+ :class:`RepeatRef`)
+ A constant value in data domain.
+ type : :class:`Type`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "strokeDash"
+ def __init__(self, datum, band=Undefined, condition=Undefined, type=Undefined, **kwds):
+ super(StrokeDashDatum, self).__init__(datum=datum, band=band, condition=condition, type=type,
+ **kwds)
+
+
+class StrokeDashValue(ValueChannelMixin, core.ValueDefWithConditionMarkPropFieldOrDatumDefnumberArray):
+ """StrokeDashValue schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ condition : anyOf(:class:`ConditionalMarkPropFieldOrDatumDef`,
+ :class:`ConditionalValueDefnumberArrayExprRef`,
+ List(:class:`ConditionalValueDefnumberArrayExprRef`))
+ A field definition or one or more value definition(s) with a selection predicate.
+ value : anyOf(List(float), :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "strokeDash"
+
+ def __init__(self, value, condition=Undefined, **kwds):
+ super(StrokeDashValue, self).__init__(value=value, condition=condition, **kwds)
+
+
+class StrokeOpacity(FieldChannelMixin, core.FieldOrDatumDefWithConditionMarkPropFieldDefnumber):
+ """StrokeOpacity schema wrapper
+
+ Mapping(required=[shorthand])
+ A FieldDef with Condition :raw-html:`<ValueDef>` { condition: {value: ...}, field:
+ ..., ... }
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ condition : anyOf(:class:`ConditionalValueDefnumberExprRef`,
+ List(:class:`ConditionalValueDefnumberExprRef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ legend : anyOf(:class:`Legend`, None)
+ An object defining properties of the legend. If ``null``, the legend for the
+ encoding channel will be removed.
+
+ **Default value:** If undefined, default `legend properties
+ <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.
+
+ **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
+ documentation.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ sort : :class:`Sort`
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following: - ``"ascending"`` or
+ ``"descending"`` -- for sorting by the values' natural order in JavaScript. - `A
+ string indicating an encoding channel name to sort by
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g., ``"x"``
+ or ``"y"`` ) with an optional minus prefix for descending sort (e.g., ``"-x"`` to
+ sort by x-field, descending). This channel string is short-form of `a
+ sort-by-encoding definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For example,
+ ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order":
+ "descending"}``. - `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field. - `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values in
+ their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ). - ``null``
+ indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` and sorting by another channel is not supported for ``row`` and
+ ``column``.
+
+ **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
+ documentation.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "strokeOpacity"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, band=Undefined, bin=Undefined,
+ condition=Undefined, field=Undefined, legend=Undefined, scale=Undefined,
+ sort=Undefined, timeUnit=Undefined, title=Undefined, type=Undefined, **kwds):
+ super(StrokeOpacity, self).__init__(shorthand=shorthand, aggregate=aggregate, band=band,
+ bin=bin, condition=condition, field=field, legend=legend,
+ scale=scale, sort=sort, timeUnit=timeUnit, title=title,
+ type=type, **kwds)
+
+
+class StrokeOpacityDatum(DatumChannelMixin, core.FieldOrDatumDefWithConditionDatumDefnumber):
+ """StrokeOpacityDatum schema wrapper
+
+ Mapping(required=[])
+ A FieldDef with Condition :raw-html:`<ValueDef>` { condition: {value: ...}, field:
+ ..., ... }
+
+ Attributes
+ ----------
+
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ condition : anyOf(:class:`ConditionalValueDefnumberExprRef`,
+ List(:class:`ConditionalValueDefnumberExprRef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ datum : anyOf(:class:`PrimitiveValue`, :class:`DateTime`, :class:`ExprRef`,
+ :class:`RepeatRef`)
+ A constant value in data domain.
+ type : :class:`Type`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "strokeOpacity"
+ def __init__(self, datum, band=Undefined, condition=Undefined, type=Undefined, **kwds):
+ super(StrokeOpacityDatum, self).__init__(datum=datum, band=band, condition=condition, type=type,
+ **kwds)
+
+
+class StrokeOpacityValue(ValueChannelMixin, core.ValueDefWithConditionMarkPropFieldOrDatumDefnumber):
+ """StrokeOpacityValue schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ condition : anyOf(:class:`ConditionalMarkPropFieldOrDatumDef`,
+ :class:`ConditionalValueDefnumberExprRef`, List(:class:`ConditionalValueDefnumberExprRef`))
+ A field definition or one or more value definition(s) with a selection predicate.
+ value : anyOf(float, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "strokeOpacity"
+
+ def __init__(self, value, condition=Undefined, **kwds):
+ super(StrokeOpacityValue, self).__init__(value=value, condition=condition, **kwds)
+
+
+class StrokeWidth(FieldChannelMixin, core.FieldOrDatumDefWithConditionMarkPropFieldDefnumber):
+ """StrokeWidth schema wrapper
+
+ Mapping(required=[shorthand])
+ A FieldDef with Condition :raw-html:`<ValueDef>` { condition: {value: ...}, field:
+ ..., ... }
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ condition : anyOf(:class:`ConditionalValueDefnumberExprRef`,
+ List(:class:`ConditionalValueDefnumberExprRef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ legend : anyOf(:class:`Legend`, None)
+ An object defining properties of the legend. If ``null``, the legend for the
+ encoding channel will be removed.
+
+ **Default value:** If undefined, default `legend properties
+ <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.
+
+ **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
+ documentation.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ sort : :class:`Sort`
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following: - ``"ascending"`` or
+ ``"descending"`` -- for sorting by the values' natural order in JavaScript. - `A
+ string indicating an encoding channel name to sort by
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g., ``"x"``
+ or ``"y"`` ) with an optional minus prefix for descending sort (e.g., ``"-x"`` to
+ sort by x-field, descending). This channel string is short-form of `a
+ sort-by-encoding definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For example,
+ ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order":
+ "descending"}``. - `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field. - `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values in
+ their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ). - ``null``
+ indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` and sorting by another channel is not supported for ``row`` and
+ ``column``.
+
+ **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
+ documentation.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "strokeWidth"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, band=Undefined, bin=Undefined,
+ condition=Undefined, field=Undefined, legend=Undefined, scale=Undefined,
+ sort=Undefined, timeUnit=Undefined, title=Undefined, type=Undefined, **kwds):
+ super(StrokeWidth, self).__init__(shorthand=shorthand, aggregate=aggregate, band=band, bin=bin,
+ condition=condition, field=field, legend=legend, scale=scale,
+ sort=sort, timeUnit=timeUnit, title=title, type=type, **kwds)
+
+
+class StrokeWidthDatum(DatumChannelMixin, core.FieldOrDatumDefWithConditionDatumDefnumber):
+ """StrokeWidthDatum schema wrapper
+
+ Mapping(required=[])
+ A FieldDef with Condition :raw-html:`<ValueDef>` { condition: {value: ...}, field:
+ ..., ... }
+
+ Attributes
+ ----------
+
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ condition : anyOf(:class:`ConditionalValueDefnumberExprRef`,
+ List(:class:`ConditionalValueDefnumberExprRef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ datum : anyOf(:class:`PrimitiveValue`, :class:`DateTime`, :class:`ExprRef`,
+ :class:`RepeatRef`)
+ A constant value in data domain.
+ type : :class:`Type`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "strokeWidth"
+ def __init__(self, datum, band=Undefined, condition=Undefined, type=Undefined, **kwds):
+ super(StrokeWidthDatum, self).__init__(datum=datum, band=band, condition=condition, type=type,
+ **kwds)
+
+
+class StrokeWidthValue(ValueChannelMixin, core.ValueDefWithConditionMarkPropFieldOrDatumDefnumber):
+ """StrokeWidthValue schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ condition : anyOf(:class:`ConditionalMarkPropFieldOrDatumDef`,
+ :class:`ConditionalValueDefnumberExprRef`, List(:class:`ConditionalValueDefnumberExprRef`))
+ A field definition or one or more value definition(s) with a selection predicate.
+ value : anyOf(float, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "strokeWidth"
+
+ def __init__(self, value, condition=Undefined, **kwds):
+ super(StrokeWidthValue, self).__init__(value=value, condition=condition, **kwds)
+
+
+class Text(FieldChannelMixin, core.FieldOrDatumDefWithConditionStringFieldDefText):
+ """Text schema wrapper
+
+ Mapping(required=[shorthand])
+ A FieldDef with Condition :raw-html:`<ValueDef>` { condition: {value: ...}, field:
+ ..., ... }
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : anyOf(boolean, :class:`BinParams`, string, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ condition : anyOf(:class:`ConditionalValueDefTextExprRef`,
+ List(:class:`ConditionalValueDefTextExprRef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ format : anyOf(string, :class:`Dictunknown`)
+ When used with the default ``"number"`` and ``"time"`` format type, the text
+ formatting pattern for labels of guides (axes, legends, headers) and text marks.
+
+
+ * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
+ `number format pattern <https://github.com/d3/d3-format#locale_format>`__. - If
+ the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
+ format pattern <https://github.com/d3/d3-time-format#locale_format>`__.
+
+ See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
+ for more examples.
+
+ When used with a `custom formatType
+ <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this
+ value will be passed as ``format`` alongside ``datum.value`` to the registered
+ function.
+
+ **Default value:** Derived from `numberFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
+ format and from `timeFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
+ format.
+ formatType : string
+ The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom
+ format type
+ <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.
+
+ **Default value:** - ``"time"`` for temporal fields and ordinal and nominal fields
+ with ``timeUnit``. - ``"number"`` for quantitative fields as well as ordinal and
+ nominal fields without ``timeUnit``.
+ labelExpr : string
+ `Vega expression <https://vega.github.io/vega/docs/expressions/>`__ for customizing
+ labels text.
+
+ **Note:** The label text and value can be assessed via the ``label`` and ``value``
+ properties of the axis's backing ``datum`` object.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "text"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, band=Undefined, bin=Undefined,
+ condition=Undefined, field=Undefined, format=Undefined, formatType=Undefined,
+ labelExpr=Undefined, timeUnit=Undefined, title=Undefined, type=Undefined, **kwds):
+ super(Text, self).__init__(shorthand=shorthand, aggregate=aggregate, band=band, bin=bin,
+ condition=condition, field=field, format=format,
+ formatType=formatType, labelExpr=labelExpr, timeUnit=timeUnit,
+ title=title, type=type, **kwds)
+
+
+class TextDatum(DatumChannelMixin, core.FieldOrDatumDefWithConditionStringDatumDefText):
+ """TextDatum schema wrapper
+
+ Mapping(required=[])
+ A FieldDef with Condition :raw-html:`<ValueDef>` { condition: {value: ...}, field:
+ ..., ... }
+
+ Attributes
+ ----------
+
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ condition : anyOf(:class:`ConditionalValueDefTextExprRef`,
+ List(:class:`ConditionalValueDefTextExprRef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ datum : anyOf(:class:`PrimitiveValue`, :class:`DateTime`, :class:`ExprRef`,
+ :class:`RepeatRef`)
+ A constant value in data domain.
+ format : anyOf(string, :class:`Dictunknown`)
+ When used with the default ``"number"`` and ``"time"`` format type, the text
+ formatting pattern for labels of guides (axes, legends, headers) and text marks.
+
+
+ * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
+ `number format pattern <https://github.com/d3/d3-format#locale_format>`__. - If
+ the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
+ format pattern <https://github.com/d3/d3-time-format#locale_format>`__.
+
+ See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
+ for more examples.
+
+ When used with a `custom formatType
+ <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this
+ value will be passed as ``format`` alongside ``datum.value`` to the registered
+ function.
+
+ **Default value:** Derived from `numberFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
+ format and from `timeFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
+ format.
+ formatType : string
+ The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom
+ format type
+ <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.
+
+ **Default value:** - ``"time"`` for temporal fields and ordinal and nominal fields
+ with ``timeUnit``. - ``"number"`` for quantitative fields as well as ordinal and
+ nominal fields without ``timeUnit``.
+ labelExpr : string
+ `Vega expression <https://vega.github.io/vega/docs/expressions/>`__ for customizing
+ labels text.
+
+ **Note:** The label text and value can be assessed via the ``label`` and ``value``
+ properties of the axis's backing ``datum`` object.
+ type : :class:`Type`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "text"
+ def __init__(self, datum, band=Undefined, condition=Undefined, format=Undefined,
+ formatType=Undefined, labelExpr=Undefined, type=Undefined, **kwds):
+ super(TextDatum, self).__init__(datum=datum, band=band, condition=condition, format=format,
+ formatType=formatType, labelExpr=labelExpr, type=type, **kwds)
+
+
+class TextValue(ValueChannelMixin, core.ValueDefWithConditionStringFieldDefText):
+ """TextValue schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ condition : anyOf(:class:`ConditionalStringFieldDef`,
+ :class:`ConditionalValueDefTextExprRef`, List(:class:`ConditionalValueDefTextExprRef`))
+ A field definition or one or more value definition(s) with a selection predicate.
+ value : anyOf(:class:`Text`, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "text"
+
+ def __init__(self, value, condition=Undefined, **kwds):
+ super(TextValue, self).__init__(value=value, condition=condition, **kwds)
+
+
+class Theta(FieldChannelMixin, core.PositionFieldDefBase):
+ """Theta schema wrapper
+
+ Mapping(required=[shorthand])
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : anyOf(boolean, :class:`BinParams`, string, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ sort : :class:`Sort`
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following: - ``"ascending"`` or
+ ``"descending"`` -- for sorting by the values' natural order in JavaScript. - `A
+ string indicating an encoding channel name to sort by
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g., ``"x"``
+ or ``"y"`` ) with an optional minus prefix for descending sort (e.g., ``"-x"`` to
+ sort by x-field, descending). This channel string is short-form of `a
+ sort-by-encoding definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For example,
+ ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order":
+ "descending"}``. - `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field. - `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values in
+ their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ). - ``null``
+ indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` and sorting by another channel is not supported for ``row`` and
+ ``column``.
+
+ **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
+ documentation.
+ stack : anyOf(:class:`StackOffset`, None, boolean)
+ Type of stacking offset if the field should be stacked. ``stack`` is only applicable
+ for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For
+ example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar
+ chart.
+
+ ``stack`` can be one of the following values: - ``"zero"`` or `true`: stacking with
+ baseline offset at zero value of the scale (for creating typical stacked
+ [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and `area
+ <https://vega.github.io/vega-lite/docs/stack.html#area>`__ chart). - ``"normalize"``
+ - stacking with normalized domain (for creating `normalized stacked bar and area
+ charts <https://vega.github.io/vega-lite/docs/stack.html#normalized>`__.
+ :raw-html:`<br/>` - ``"center"`` - stacking with center baseline (for `streamgraph
+ <https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__ ). - ``null`` or
+ ``false`` - No-stacking. This will produce layered `bar
+ <https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area
+ chart.
+
+ **Default value:** ``zero`` for plots with all of the following conditions are true:
+ (1) the mark is ``bar``, ``area``, or ``arc`` ; (2) the stacked measure channel (x
+ or y) has a linear scale; (3) At least one of non-position channels mapped to an
+ unaggregated field that is different from x and y. Otherwise, ``null`` by default.
+
+ **See also:** `stack <https://vega.github.io/vega-lite/docs/stack.html>`__
+ documentation.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "theta"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, band=Undefined, bin=Undefined,
+ field=Undefined, scale=Undefined, sort=Undefined, stack=Undefined, timeUnit=Undefined,
+ title=Undefined, type=Undefined, **kwds):
+ super(Theta, self).__init__(shorthand=shorthand, aggregate=aggregate, band=band, bin=bin,
+ field=field, scale=scale, sort=sort, stack=stack, timeUnit=timeUnit,
+ title=title, type=type, **kwds)
+
+
+class ThetaDatum(DatumChannelMixin, core.PositionDatumDefBase):
+ """ThetaDatum schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ datum : anyOf(:class:`PrimitiveValue`, :class:`DateTime`, :class:`ExprRef`,
+ :class:`RepeatRef`)
+ A constant value in data domain.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ stack : anyOf(:class:`StackOffset`, None, boolean)
+ Type of stacking offset if the field should be stacked. ``stack`` is only applicable
+ for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For
+ example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar
+ chart.
+
+ ``stack`` can be one of the following values: - ``"zero"`` or `true`: stacking with
+ baseline offset at zero value of the scale (for creating typical stacked
+ [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and `area
+ <https://vega.github.io/vega-lite/docs/stack.html#area>`__ chart). - ``"normalize"``
+ - stacking with normalized domain (for creating `normalized stacked bar and area
+ charts <https://vega.github.io/vega-lite/docs/stack.html#normalized>`__.
+ :raw-html:`<br/>` - ``"center"`` - stacking with center baseline (for `streamgraph
+ <https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__ ). - ``null`` or
+ ``false`` - No-stacking. This will produce layered `bar
+ <https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area
+ chart.
+
+ **Default value:** ``zero`` for plots with all of the following conditions are true:
+ (1) the mark is ``bar``, ``area``, or ``arc`` ; (2) the stacked measure channel (x
+ or y) has a linear scale; (3) At least one of non-position channels mapped to an
+ unaggregated field that is different from x and y. Otherwise, ``null`` by default.
+
+ **See also:** `stack <https://vega.github.io/vega-lite/docs/stack.html>`__
+ documentation.
+ type : :class:`Type`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "theta"
+ def __init__(self, datum, band=Undefined, scale=Undefined, stack=Undefined, type=Undefined, **kwds):
+ super(ThetaDatum, self).__init__(datum=datum, band=band, scale=scale, stack=stack, type=type,
+ **kwds)
+
+
+class ThetaValue(ValueChannelMixin, core.PositionValueDef):
+ """ThetaValue schema wrapper
+
+ Mapping(required=[value])
+ Definition object for a constant value (primitive value or gradient definition) of an
+ encoding channel.
+
+ Attributes
+ ----------
+
+ value : anyOf(float, string, string, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "theta"
+
+ def __init__(self, value, **kwds):
+ super(ThetaValue, self).__init__(value=value, **kwds)
+
+
+class Theta2(FieldChannelMixin, core.SecondaryFieldDef):
+ """Theta2 schema wrapper
+
+ Mapping(required=[shorthand])
+ A field definition of a secondary channel that shares a scale with another primary channel.
+ For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``.
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : None
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "theta2"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, band=Undefined, bin=Undefined,
+ field=Undefined, timeUnit=Undefined, title=Undefined, **kwds):
+ super(Theta2, self).__init__(shorthand=shorthand, aggregate=aggregate, band=band, bin=bin,
+ field=field, timeUnit=timeUnit, title=title, **kwds)
+
+
+class Theta2Datum(DatumChannelMixin, core.DatumDef):
+ """Theta2Datum schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ datum : anyOf(:class:`PrimitiveValue`, :class:`DateTime`, :class:`ExprRef`,
+ :class:`RepeatRef`)
+ A constant value in data domain.
+ type : :class:`Type`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "theta2"
+ def __init__(self, datum, band=Undefined, type=Undefined, **kwds):
+ super(Theta2Datum, self).__init__(datum=datum, band=band, type=type, **kwds)
+
+
+class Theta2Value(ValueChannelMixin, core.PositionValueDef):
+ """Theta2Value schema wrapper
+
+ Mapping(required=[value])
+ Definition object for a constant value (primitive value or gradient definition) of an
+ encoding channel.
+
+ Attributes
+ ----------
+
+ value : anyOf(float, string, string, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "theta2"
+
+ def __init__(self, value, **kwds):
+ super(Theta2Value, self).__init__(value=value, **kwds)
+
+
+class Tooltip(FieldChannelMixin, core.StringFieldDefWithCondition):
+ """Tooltip schema wrapper
+
+ Mapping(required=[shorthand])
+ A FieldDef with Condition :raw-html:`<ValueDef>` { condition: {value: ...}, field:
+ ..., ... }
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : anyOf(boolean, :class:`BinParams`, string, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ condition : anyOf(:class:`ConditionalValueDefstringExprRef`,
+ List(:class:`ConditionalValueDefstringExprRef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ format : anyOf(string, :class:`Dictunknown`)
+ When used with the default ``"number"`` and ``"time"`` format type, the text
+ formatting pattern for labels of guides (axes, legends, headers) and text marks.
+
+
+ * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
+ `number format pattern <https://github.com/d3/d3-format#locale_format>`__. - If
+ the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
+ format pattern <https://github.com/d3/d3-time-format#locale_format>`__.
+
+ See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
+ for more examples.
+
+ When used with a `custom formatType
+ <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this
+ value will be passed as ``format`` alongside ``datum.value`` to the registered
+ function.
+
+ **Default value:** Derived from `numberFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
+ format and from `timeFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
+ format.
+ formatType : string
+ The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom
+ format type
+ <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.
+
+ **Default value:** - ``"time"`` for temporal fields and ordinal and nominal fields
+ with ``timeUnit``. - ``"number"`` for quantitative fields as well as ordinal and
+ nominal fields without ``timeUnit``.
+ labelExpr : string
+ `Vega expression <https://vega.github.io/vega/docs/expressions/>`__ for customizing
+ labels text.
+
+ **Note:** The label text and value can be assessed via the ``label`` and ``value``
+ properties of the axis's backing ``datum`` object.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "tooltip"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, band=Undefined, bin=Undefined,
+ condition=Undefined, field=Undefined, format=Undefined, formatType=Undefined,
+ labelExpr=Undefined, timeUnit=Undefined, title=Undefined, type=Undefined, **kwds):
+ super(Tooltip, self).__init__(shorthand=shorthand, aggregate=aggregate, band=band, bin=bin,
+ condition=condition, field=field, format=format,
+ formatType=formatType, labelExpr=labelExpr, timeUnit=timeUnit,
+ title=title, type=type, **kwds)
+
+
+class TooltipValue(ValueChannelMixin, core.StringValueDefWithCondition):
+ """TooltipValue schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ condition : anyOf(:class:`ConditionalMarkPropFieldOrDatumDef`,
+ :class:`ConditionalValueDefstringnullExprRef`,
+ List(:class:`ConditionalValueDefstringnullExprRef`))
+ A field definition or one or more value definition(s) with a selection predicate.
+ value : anyOf(string, None, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "tooltip"
+
+ def __init__(self, value, condition=Undefined, **kwds):
+ super(TooltipValue, self).__init__(value=value, condition=condition, **kwds)
+
+
+class Url(FieldChannelMixin, core.StringFieldDefWithCondition):
+ """Url schema wrapper
+
+ Mapping(required=[shorthand])
+ A FieldDef with Condition :raw-html:`<ValueDef>` { condition: {value: ...}, field:
+ ..., ... }
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : anyOf(boolean, :class:`BinParams`, string, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ condition : anyOf(:class:`ConditionalValueDefstringExprRef`,
+ List(:class:`ConditionalValueDefstringExprRef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ format : anyOf(string, :class:`Dictunknown`)
+ When used with the default ``"number"`` and ``"time"`` format type, the text
+ formatting pattern for labels of guides (axes, legends, headers) and text marks.
+
+
+ * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
+ `number format pattern <https://github.com/d3/d3-format#locale_format>`__. - If
+ the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
+ format pattern <https://github.com/d3/d3-time-format#locale_format>`__.
+
+ See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
+ for more examples.
+
+ When used with a `custom formatType
+ <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this
+ value will be passed as ``format`` alongside ``datum.value`` to the registered
+ function.
+
+ **Default value:** Derived from `numberFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
+ format and from `timeFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
+ format.
+ formatType : string
+ The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom
+ format type
+ <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.
+
+ **Default value:** - ``"time"`` for temporal fields and ordinal and nominal fields
+ with ``timeUnit``. - ``"number"`` for quantitative fields as well as ordinal and
+ nominal fields without ``timeUnit``.
+ labelExpr : string
+ `Vega expression <https://vega.github.io/vega/docs/expressions/>`__ for customizing
+ labels text.
+
+ **Note:** The label text and value can be assessed via the ``label`` and ``value``
+ properties of the axis's backing ``datum`` object.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "url"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, band=Undefined, bin=Undefined,
+ condition=Undefined, field=Undefined, format=Undefined, formatType=Undefined,
+ labelExpr=Undefined, timeUnit=Undefined, title=Undefined, type=Undefined, **kwds):
+ super(Url, self).__init__(shorthand=shorthand, aggregate=aggregate, band=band, bin=bin,
+ condition=condition, field=field, format=format,
+ formatType=formatType, labelExpr=labelExpr, timeUnit=timeUnit,
+ title=title, type=type, **kwds)
+
+
+class UrlValue(ValueChannelMixin, core.StringValueDefWithCondition):
+ """UrlValue schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ condition : anyOf(:class:`ConditionalMarkPropFieldOrDatumDef`,
+ :class:`ConditionalValueDefstringnullExprRef`,
+ List(:class:`ConditionalValueDefstringnullExprRef`))
+ A field definition or one or more value definition(s) with a selection predicate.
+ value : anyOf(string, None, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "url"
+
+ def __init__(self, value, condition=Undefined, **kwds):
+ super(UrlValue, self).__init__(value=value, condition=condition, **kwds)
+
+
+class X(FieldChannelMixin, core.PositionFieldDef):
+ """X schema wrapper
+
+ Mapping(required=[shorthand])
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ axis : anyOf(:class:`Axis`, None)
+ An object defining properties of axis's gridlines, ticks and labels. If ``null``,
+ the axis for the encoding channel will be removed.
+
+ **Default value:** If undefined, default `axis properties
+ <https://vega.github.io/vega-lite/docs/axis.html>`__ are applied.
+
+ **See also:** `axis <https://vega.github.io/vega-lite/docs/axis.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : anyOf(boolean, :class:`BinParams`, string, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ impute : anyOf(:class:`ImputeParams`, None)
+ An object defining the properties of the Impute Operation to be applied. The field
+ value of the other positional channel is taken as ``key`` of the ``Impute``
+ Operation. The field of the ``color`` channel if specified is used as ``groupby`` of
+ the ``Impute`` Operation.
+
+ **See also:** `impute <https://vega.github.io/vega-lite/docs/impute.html>`__
+ documentation.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ sort : :class:`Sort`
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following: - ``"ascending"`` or
+ ``"descending"`` -- for sorting by the values' natural order in JavaScript. - `A
+ string indicating an encoding channel name to sort by
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g., ``"x"``
+ or ``"y"`` ) with an optional minus prefix for descending sort (e.g., ``"-x"`` to
+ sort by x-field, descending). This channel string is short-form of `a
+ sort-by-encoding definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For example,
+ ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order":
+ "descending"}``. - `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field. - `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values in
+ their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ). - ``null``
+ indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` and sorting by another channel is not supported for ``row`` and
+ ``column``.
+
+ **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
+ documentation.
+ stack : anyOf(:class:`StackOffset`, None, boolean)
+ Type of stacking offset if the field should be stacked. ``stack`` is only applicable
+ for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For
+ example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar
+ chart.
+
+ ``stack`` can be one of the following values: - ``"zero"`` or `true`: stacking with
+ baseline offset at zero value of the scale (for creating typical stacked
+ [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and `area
+ <https://vega.github.io/vega-lite/docs/stack.html#area>`__ chart). - ``"normalize"``
+ - stacking with normalized domain (for creating `normalized stacked bar and area
+ charts <https://vega.github.io/vega-lite/docs/stack.html#normalized>`__.
+ :raw-html:`<br/>` - ``"center"`` - stacking with center baseline (for `streamgraph
+ <https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__ ). - ``null`` or
+ ``false`` - No-stacking. This will produce layered `bar
+ <https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area
+ chart.
+
+ **Default value:** ``zero`` for plots with all of the following conditions are true:
+ (1) the mark is ``bar``, ``area``, or ``arc`` ; (2) the stacked measure channel (x
+ or y) has a linear scale; (3) At least one of non-position channels mapped to an
+ unaggregated field that is different from x and y. Otherwise, ``null`` by default.
+
+ **See also:** `stack <https://vega.github.io/vega-lite/docs/stack.html>`__
+ documentation.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "x"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, axis=Undefined, band=Undefined,
+ bin=Undefined, field=Undefined, impute=Undefined, scale=Undefined, sort=Undefined,
+ stack=Undefined, timeUnit=Undefined, title=Undefined, type=Undefined, **kwds):
+ super(X, self).__init__(shorthand=shorthand, aggregate=aggregate, axis=axis, band=band, bin=bin,
+ field=field, impute=impute, scale=scale, sort=sort, stack=stack,
+ timeUnit=timeUnit, title=title, type=type, **kwds)
+
+
+class XDatum(DatumChannelMixin, core.PositionDatumDef):
+ """XDatum schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ axis : anyOf(:class:`Axis`, None)
+ An object defining properties of axis's gridlines, ticks and labels. If ``null``,
+ the axis for the encoding channel will be removed.
+
+ **Default value:** If undefined, default `axis properties
+ <https://vega.github.io/vega-lite/docs/axis.html>`__ are applied.
+
+ **See also:** `axis <https://vega.github.io/vega-lite/docs/axis.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ datum : anyOf(:class:`PrimitiveValue`, :class:`DateTime`, :class:`ExprRef`,
+ :class:`RepeatRef`)
+ A constant value in data domain.
+ impute : anyOf(:class:`ImputeParams`, None)
+ An object defining the properties of the Impute Operation to be applied. The field
+ value of the other positional channel is taken as ``key`` of the ``Impute``
+ Operation. The field of the ``color`` channel if specified is used as ``groupby`` of
+ the ``Impute`` Operation.
+
+ **See also:** `impute <https://vega.github.io/vega-lite/docs/impute.html>`__
+ documentation.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ stack : anyOf(:class:`StackOffset`, None, boolean)
+ Type of stacking offset if the field should be stacked. ``stack`` is only applicable
+ for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For
+ example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar
+ chart.
+
+ ``stack`` can be one of the following values: - ``"zero"`` or `true`: stacking with
+ baseline offset at zero value of the scale (for creating typical stacked
+ [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and `area
+ <https://vega.github.io/vega-lite/docs/stack.html#area>`__ chart). - ``"normalize"``
+ - stacking with normalized domain (for creating `normalized stacked bar and area
+ charts <https://vega.github.io/vega-lite/docs/stack.html#normalized>`__.
+ :raw-html:`<br/>` - ``"center"`` - stacking with center baseline (for `streamgraph
+ <https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__ ). - ``null`` or
+ ``false`` - No-stacking. This will produce layered `bar
+ <https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area
+ chart.
+
+ **Default value:** ``zero`` for plots with all of the following conditions are true:
+ (1) the mark is ``bar``, ``area``, or ``arc`` ; (2) the stacked measure channel (x
+ or y) has a linear scale; (3) At least one of non-position channels mapped to an
+ unaggregated field that is different from x and y. Otherwise, ``null`` by default.
+
+ **See also:** `stack <https://vega.github.io/vega-lite/docs/stack.html>`__
+ documentation.
+ type : :class:`Type`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "x"
+ def __init__(self, datum, axis=Undefined, band=Undefined, impute=Undefined, scale=Undefined,
+ stack=Undefined, type=Undefined, **kwds):
+ super(XDatum, self).__init__(datum=datum, axis=axis, band=band, impute=impute, scale=scale,
+ stack=stack, type=type, **kwds)
+
+
+class XValue(ValueChannelMixin, core.PositionValueDef):
+ """XValue schema wrapper
+
+ Mapping(required=[value])
+ Definition object for a constant value (primitive value or gradient definition) of an
+ encoding channel.
+
+ Attributes
+ ----------
+
+ value : anyOf(float, string, string, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "x"
+
+ def __init__(self, value, **kwds):
+ super(XValue, self).__init__(value=value, **kwds)
+
+
+class X2(FieldChannelMixin, core.SecondaryFieldDef):
+ """X2 schema wrapper
+
+ Mapping(required=[shorthand])
+ A field definition of a secondary channel that shares a scale with another primary channel.
+ For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``.
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : None
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "x2"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, band=Undefined, bin=Undefined,
+ field=Undefined, timeUnit=Undefined, title=Undefined, **kwds):
+ super(X2, self).__init__(shorthand=shorthand, aggregate=aggregate, band=band, bin=bin,
+ field=field, timeUnit=timeUnit, title=title, **kwds)
+
+
+class X2Datum(DatumChannelMixin, core.DatumDef):
+ """X2Datum schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ datum : anyOf(:class:`PrimitiveValue`, :class:`DateTime`, :class:`ExprRef`,
+ :class:`RepeatRef`)
+ A constant value in data domain.
+ type : :class:`Type`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "x2"
+ def __init__(self, datum, band=Undefined, type=Undefined, **kwds):
+ super(X2Datum, self).__init__(datum=datum, band=band, type=type, **kwds)
+
+
+class X2Value(ValueChannelMixin, core.PositionValueDef):
+ """X2Value schema wrapper
+
+ Mapping(required=[value])
+ Definition object for a constant value (primitive value or gradient definition) of an
+ encoding channel.
+
+ Attributes
+ ----------
+
+ value : anyOf(float, string, string, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "x2"
+
+ def __init__(self, value, **kwds):
+ super(X2Value, self).__init__(value=value, **kwds)
+
+
+class XError(FieldChannelMixin, core.SecondaryFieldDef):
+ """XError schema wrapper
+
+ Mapping(required=[shorthand])
+ A field definition of a secondary channel that shares a scale with another primary channel.
+ For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``.
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : None
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "xError"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, band=Undefined, bin=Undefined,
+ field=Undefined, timeUnit=Undefined, title=Undefined, **kwds):
+ super(XError, self).__init__(shorthand=shorthand, aggregate=aggregate, band=band, bin=bin,
+ field=field, timeUnit=timeUnit, title=title, **kwds)
+
+
+class XErrorValue(ValueChannelMixin, core.ValueDefnumber):
+ """XErrorValue schema wrapper
+
+ Mapping(required=[value])
+ Definition object for a constant value (primitive value or gradient definition) of an
+ encoding channel.
+
+ Attributes
+ ----------
+
+ value : float
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "xError"
+
+ def __init__(self, value, **kwds):
+ super(XErrorValue, self).__init__(value=value, **kwds)
+
+
+class XError2(FieldChannelMixin, core.SecondaryFieldDef):
+ """XError2 schema wrapper
+
+ Mapping(required=[shorthand])
+ A field definition of a secondary channel that shares a scale with another primary channel.
+ For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``.
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : None
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "xError2"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, band=Undefined, bin=Undefined,
+ field=Undefined, timeUnit=Undefined, title=Undefined, **kwds):
+ super(XError2, self).__init__(shorthand=shorthand, aggregate=aggregate, band=band, bin=bin,
+ field=field, timeUnit=timeUnit, title=title, **kwds)
+
+
+class XError2Value(ValueChannelMixin, core.ValueDefnumber):
+ """XError2Value schema wrapper
+
+ Mapping(required=[value])
+ Definition object for a constant value (primitive value or gradient definition) of an
+ encoding channel.
+
+ Attributes
+ ----------
+
+ value : float
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "xError2"
+
+ def __init__(self, value, **kwds):
+ super(XError2Value, self).__init__(value=value, **kwds)
+
+
+class Y(FieldChannelMixin, core.PositionFieldDef):
+ """Y schema wrapper
+
+ Mapping(required=[shorthand])
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ axis : anyOf(:class:`Axis`, None)
+ An object defining properties of axis's gridlines, ticks and labels. If ``null``,
+ the axis for the encoding channel will be removed.
+
+ **Default value:** If undefined, default `axis properties
+ <https://vega.github.io/vega-lite/docs/axis.html>`__ are applied.
+
+ **See also:** `axis <https://vega.github.io/vega-lite/docs/axis.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : anyOf(boolean, :class:`BinParams`, string, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ impute : anyOf(:class:`ImputeParams`, None)
+ An object defining the properties of the Impute Operation to be applied. The field
+ value of the other positional channel is taken as ``key`` of the ``Impute``
+ Operation. The field of the ``color`` channel if specified is used as ``groupby`` of
+ the ``Impute`` Operation.
+
+ **See also:** `impute <https://vega.github.io/vega-lite/docs/impute.html>`__
+ documentation.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ sort : :class:`Sort`
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following: - ``"ascending"`` or
+ ``"descending"`` -- for sorting by the values' natural order in JavaScript. - `A
+ string indicating an encoding channel name to sort by
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g., ``"x"``
+ or ``"y"`` ) with an optional minus prefix for descending sort (e.g., ``"-x"`` to
+ sort by x-field, descending). This channel string is short-form of `a
+ sort-by-encoding definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For example,
+ ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order":
+ "descending"}``. - `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field. - `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values in
+ their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ). - ``null``
+ indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` and sorting by another channel is not supported for ``row`` and
+ ``column``.
+
+ **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
+ documentation.
+ stack : anyOf(:class:`StackOffset`, None, boolean)
+ Type of stacking offset if the field should be stacked. ``stack`` is only applicable
+ for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For
+ example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar
+ chart.
+
+ ``stack`` can be one of the following values: - ``"zero"`` or `true`: stacking with
+ baseline offset at zero value of the scale (for creating typical stacked
+ [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and `area
+ <https://vega.github.io/vega-lite/docs/stack.html#area>`__ chart). - ``"normalize"``
+ - stacking with normalized domain (for creating `normalized stacked bar and area
+ charts <https://vega.github.io/vega-lite/docs/stack.html#normalized>`__.
+ :raw-html:`<br/>` - ``"center"`` - stacking with center baseline (for `streamgraph
+ <https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__ ). - ``null`` or
+ ``false`` - No-stacking. This will produce layered `bar
+ <https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area
+ chart.
+
+ **Default value:** ``zero`` for plots with all of the following conditions are true:
+ (1) the mark is ``bar``, ``area``, or ``arc`` ; (2) the stacked measure channel (x
+ or y) has a linear scale; (3) At least one of non-position channels mapped to an
+ unaggregated field that is different from x and y. Otherwise, ``null`` by default.
+
+ **See also:** `stack <https://vega.github.io/vega-lite/docs/stack.html>`__
+ documentation.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "y"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, axis=Undefined, band=Undefined,
+ bin=Undefined, field=Undefined, impute=Undefined, scale=Undefined, sort=Undefined,
+ stack=Undefined, timeUnit=Undefined, title=Undefined, type=Undefined, **kwds):
+ super(Y, self).__init__(shorthand=shorthand, aggregate=aggregate, axis=axis, band=band, bin=bin,
+ field=field, impute=impute, scale=scale, sort=sort, stack=stack,
+ timeUnit=timeUnit, title=title, type=type, **kwds)
+
+
+class YDatum(DatumChannelMixin, core.PositionDatumDef):
+ """YDatum schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ axis : anyOf(:class:`Axis`, None)
+ An object defining properties of axis's gridlines, ticks and labels. If ``null``,
+ the axis for the encoding channel will be removed.
+
+ **Default value:** If undefined, default `axis properties
+ <https://vega.github.io/vega-lite/docs/axis.html>`__ are applied.
+
+ **See also:** `axis <https://vega.github.io/vega-lite/docs/axis.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ datum : anyOf(:class:`PrimitiveValue`, :class:`DateTime`, :class:`ExprRef`,
+ :class:`RepeatRef`)
+ A constant value in data domain.
+ impute : anyOf(:class:`ImputeParams`, None)
+ An object defining the properties of the Impute Operation to be applied. The field
+ value of the other positional channel is taken as ``key`` of the ``Impute``
+ Operation. The field of the ``color`` channel if specified is used as ``groupby`` of
+ the ``Impute`` Operation.
+
+ **See also:** `impute <https://vega.github.io/vega-lite/docs/impute.html>`__
+ documentation.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ stack : anyOf(:class:`StackOffset`, None, boolean)
+ Type of stacking offset if the field should be stacked. ``stack`` is only applicable
+ for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For
+ example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar
+ chart.
+
+ ``stack`` can be one of the following values: - ``"zero"`` or `true`: stacking with
+ baseline offset at zero value of the scale (for creating typical stacked
+ [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and `area
+ <https://vega.github.io/vega-lite/docs/stack.html#area>`__ chart). - ``"normalize"``
+ - stacking with normalized domain (for creating `normalized stacked bar and area
+ charts <https://vega.github.io/vega-lite/docs/stack.html#normalized>`__.
+ :raw-html:`<br/>` - ``"center"`` - stacking with center baseline (for `streamgraph
+ <https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__ ). - ``null`` or
+ ``false`` - No-stacking. This will produce layered `bar
+ <https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area
+ chart.
+
+ **Default value:** ``zero`` for plots with all of the following conditions are true:
+ (1) the mark is ``bar``, ``area``, or ``arc`` ; (2) the stacked measure channel (x
+ or y) has a linear scale; (3) At least one of non-position channels mapped to an
+ unaggregated field that is different from x and y. Otherwise, ``null`` by default.
+
+ **See also:** `stack <https://vega.github.io/vega-lite/docs/stack.html>`__
+ documentation.
+ type : :class:`Type`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "y"
+ def __init__(self, datum, axis=Undefined, band=Undefined, impute=Undefined, scale=Undefined,
+ stack=Undefined, type=Undefined, **kwds):
+ super(YDatum, self).__init__(datum=datum, axis=axis, band=band, impute=impute, scale=scale,
+ stack=stack, type=type, **kwds)
+
+
+class YValue(ValueChannelMixin, core.PositionValueDef):
+ """YValue schema wrapper
+
+ Mapping(required=[value])
+ Definition object for a constant value (primitive value or gradient definition) of an
+ encoding channel.
+
+ Attributes
+ ----------
+
+ value : anyOf(float, string, string, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "y"
+
+ def __init__(self, value, **kwds):
+ super(YValue, self).__init__(value=value, **kwds)
+
+
+class Y2(FieldChannelMixin, core.SecondaryFieldDef):
+ """Y2 schema wrapper
+
+ Mapping(required=[shorthand])
+ A field definition of a secondary channel that shares a scale with another primary channel.
+ For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``.
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : None
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "y2"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, band=Undefined, bin=Undefined,
+ field=Undefined, timeUnit=Undefined, title=Undefined, **kwds):
+ super(Y2, self).__init__(shorthand=shorthand, aggregate=aggregate, band=band, bin=bin,
+ field=field, timeUnit=timeUnit, title=title, **kwds)
+
+
+class Y2Datum(DatumChannelMixin, core.DatumDef):
+ """Y2Datum schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ datum : anyOf(:class:`PrimitiveValue`, :class:`DateTime`, :class:`ExprRef`,
+ :class:`RepeatRef`)
+ A constant value in data domain.
+ type : :class:`Type`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "y2"
+ def __init__(self, datum, band=Undefined, type=Undefined, **kwds):
+ super(Y2Datum, self).__init__(datum=datum, band=band, type=type, **kwds)
+
+
+class Y2Value(ValueChannelMixin, core.PositionValueDef):
+ """Y2Value schema wrapper
+
+ Mapping(required=[value])
+ Definition object for a constant value (primitive value or gradient definition) of an
+ encoding channel.
+
+ Attributes
+ ----------
+
+ value : anyOf(float, string, string, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "y2"
+
+ def __init__(self, value, **kwds):
+ super(Y2Value, self).__init__(value=value, **kwds)
+
+
+class YError(FieldChannelMixin, core.SecondaryFieldDef):
+ """YError schema wrapper
+
+ Mapping(required=[shorthand])
+ A field definition of a secondary channel that shares a scale with another primary channel.
+ For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``.
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : None
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "yError"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, band=Undefined, bin=Undefined,
+ field=Undefined, timeUnit=Undefined, title=Undefined, **kwds):
+ super(YError, self).__init__(shorthand=shorthand, aggregate=aggregate, band=band, bin=bin,
+ field=field, timeUnit=timeUnit, title=title, **kwds)
+
+
+class YErrorValue(ValueChannelMixin, core.ValueDefnumber):
+ """YErrorValue schema wrapper
+
+ Mapping(required=[value])
+ Definition object for a constant value (primitive value or gradient definition) of an
+ encoding channel.
+
+ Attributes
+ ----------
+
+ value : float
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "yError"
+
+ def __init__(self, value, **kwds):
+ super(YErrorValue, self).__init__(value=value, **kwds)
+
+
+class YError2(FieldChannelMixin, core.SecondaryFieldDef):
+ """YError2 schema wrapper
+
+ Mapping(required=[shorthand])
+ A field definition of a secondary channel that shares a scale with another primary channel.
+ For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``.
+
+ Attributes
+ ----------
+
+ shorthand : string
+ shorthand for field, aggregate, and type
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : None
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "yError2"
+
+ def __init__(self, shorthand=Undefined, aggregate=Undefined, band=Undefined, bin=Undefined,
+ field=Undefined, timeUnit=Undefined, title=Undefined, **kwds):
+ super(YError2, self).__init__(shorthand=shorthand, aggregate=aggregate, band=band, bin=bin,
+ field=field, timeUnit=timeUnit, title=title, **kwds)
+
+
+class YError2Value(ValueChannelMixin, core.ValueDefnumber):
+ """YError2Value schema wrapper
+
+ Mapping(required=[value])
+ Definition object for a constant value (primitive value or gradient definition) of an
+ encoding channel.
+
+ Attributes
+ ----------
+
+ value : float
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _class_is_valid_at_instantiation = False
+ _encoding_name = "yError2"
+
+ def __init__(self, value, **kwds):
+ super(YError2Value, self).__init__(value=value, **kwds)
diff --git a/venv/lib/python3.9/site-packages/altair/vegalite/v4/schema/core.py b/venv/lib/python3.9/site-packages/altair/vegalite/v4/schema/core.py
new file mode 100644
index 00000000..acb88bed
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vegalite/v4/schema/core.py
@@ -0,0 +1,19905 @@
+# The contents of this file are automatically written by
+# tools/generate_schema_wrapper.py. Do not modify directly.
+
+from altair.utils.schemapi import SchemaBase, Undefined, _subclasses
+
+import pkgutil
+import json
+
+def load_schema():
+ """Load the json schema associated with this module's functions"""
+ return json.loads(pkgutil.get_data(__name__, 'vega-lite-schema.json').decode('utf-8'))
+
+
+class VegaLiteSchema(SchemaBase):
+ _rootschema = load_schema()
+ @classmethod
+ def _default_wrapper_classes(cls):
+ return _subclasses(VegaLiteSchema)
+
+
+class Root(VegaLiteSchema):
+ """Root schema wrapper
+
+ anyOf(:class:`TopLevelUnitSpec`, :class:`TopLevelFacetSpec`, :class:`TopLevelLayerSpec`,
+ :class:`TopLevelRepeatSpec`, :class:`TopLevelNormalizedConcatSpecGenericSpec`,
+ :class:`TopLevelNormalizedVConcatSpecGenericSpec`,
+ :class:`TopLevelNormalizedHConcatSpecGenericSpec`)
+ A Vega-Lite top-level specification. This is the root class for all Vega-Lite
+ specifications. (The json schema is generated from this type.)
+ """
+ _schema = VegaLiteSchema._rootschema
+
+ def __init__(self, *args, **kwds):
+ super(Root, self).__init__(*args, **kwds)
+
+
+class Aggregate(VegaLiteSchema):
+ """Aggregate schema wrapper
+
+ anyOf(:class:`NonArgAggregateOp`, :class:`ArgmaxDef`, :class:`ArgminDef`)
+ """
+ _schema = {'$ref': '#/definitions/Aggregate'}
+
+ def __init__(self, *args, **kwds):
+ super(Aggregate, self).__init__(*args, **kwds)
+
+
+class AggregateOp(VegaLiteSchema):
+ """AggregateOp schema wrapper
+
+ enum('argmax', 'argmin', 'average', 'count', 'distinct', 'max', 'mean', 'median', 'min',
+ 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid',
+ 'values', 'variance', 'variancep')
+ """
+ _schema = {'$ref': '#/definitions/AggregateOp'}
+
+ def __init__(self, *args):
+ super(AggregateOp, self).__init__(*args)
+
+
+class AggregatedFieldDef(VegaLiteSchema):
+ """AggregatedFieldDef schema wrapper
+
+ Mapping(required=[op, as])
+
+ Attributes
+ ----------
+
+ op : :class:`AggregateOp`
+ The aggregation operation to apply to the fields (e.g., ``"sum"``, ``"average"``, or
+ ``"count"`` ). See the `full list of supported aggregation operations
+ <https://vega.github.io/vega-lite/docs/aggregate.html#ops>`__ for more information.
+ field : :class:`FieldName`
+ The data field for which to compute aggregate function. This is required for all
+ aggregation operations except ``"count"``.
+ as : :class:`FieldName`
+ The output field names to use for each aggregated field.
+ """
+ _schema = {'$ref': '#/definitions/AggregatedFieldDef'}
+
+ def __init__(self, op=Undefined, field=Undefined, **kwds):
+ super(AggregatedFieldDef, self).__init__(op=op, field=field, **kwds)
+
+
+class Align(VegaLiteSchema):
+ """Align schema wrapper
+
+ enum('left', 'center', 'right')
+ """
+ _schema = {'$ref': '#/definitions/Align'}
+
+ def __init__(self, *args):
+ super(Align, self).__init__(*args)
+
+
+class AnyMark(VegaLiteSchema):
+ """AnyMark schema wrapper
+
+ anyOf(:class:`CompositeMark`, :class:`CompositeMarkDef`, :class:`Mark`, :class:`MarkDef`)
+ """
+ _schema = {'$ref': '#/definitions/AnyMark'}
+
+ def __init__(self, *args, **kwds):
+ super(AnyMark, self).__init__(*args, **kwds)
+
+
+class AnyMarkConfig(VegaLiteSchema):
+ """AnyMarkConfig schema wrapper
+
+ anyOf(:class:`MarkConfig`, :class:`AreaConfig`, :class:`BarConfig`, :class:`RectConfig`,
+ :class:`LineConfig`, :class:`TickConfig`)
+ """
+ _schema = {'$ref': '#/definitions/AnyMarkConfig'}
+
+ def __init__(self, *args, **kwds):
+ super(AnyMarkConfig, self).__init__(*args, **kwds)
+
+
+class AreaConfig(AnyMarkConfig):
+ """AreaConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ align : anyOf(:class:`Align`, :class:`ExprRef`)
+ The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule).
+ One of ``"left"``, ``"right"``, ``"center"``.
+
+ **Note:** Expression reference is *not* supported for range marks.
+ angle : anyOf(float, :class:`ExprRef`)
+
+ aria : anyOf(boolean, :class:`ExprRef`)
+
+ ariaRole : anyOf(string, :class:`ExprRef`)
+
+ ariaRoleDescription : anyOf(string, :class:`ExprRef`)
+
+ aspect : anyOf(boolean, :class:`ExprRef`)
+
+ baseline : anyOf(:class:`TextBaseline`, :class:`ExprRef`)
+ For text marks, the vertical text baseline. One of ``"alphabetic"`` (default),
+ ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, ``"line-bottom"``, or an
+ expression reference that provides one of the valid values. The ``"line-top"`` and
+ ``"line-bottom"`` values operate similarly to ``"top"`` and ``"bottom"``, but are
+ calculated relative to the ``lineHeight`` rather than ``fontSize`` alone.
+
+ For range marks, the vertical alignment of the marks. One of ``"top"``,
+ ``"middle"``, ``"bottom"``.
+
+ **Note:** Expression reference is *not* supported for range marks.
+ blend : anyOf(:class:`Blend`, :class:`ExprRef`)
+
+ color : anyOf(:class:`Color`, :class:`Gradient`, :class:`ExprRef`)
+ Default color.
+
+ **Default value:** :raw-html:`<span style="color: #4682b4;">&#9632;</span>`
+ ``"#4682b4"``
+
+ **Note:** - This property cannot be used in a `style config
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. - The ``fill``
+ and ``stroke`` properties have higher precedence than ``color`` and will override
+ ``color``.
+ cornerRadius : anyOf(float, :class:`ExprRef`)
+
+ cornerRadiusBottomLeft : anyOf(float, :class:`ExprRef`)
+
+ cornerRadiusBottomRight : anyOf(float, :class:`ExprRef`)
+
+ cornerRadiusTopLeft : anyOf(float, :class:`ExprRef`)
+
+ cornerRadiusTopRight : anyOf(float, :class:`ExprRef`)
+
+ cursor : anyOf(:class:`Cursor`, :class:`ExprRef`)
+
+ description : anyOf(string, :class:`ExprRef`)
+
+ dir : anyOf(:class:`TextDirection`, :class:`ExprRef`)
+
+ dx : anyOf(float, :class:`ExprRef`)
+
+ dy : anyOf(float, :class:`ExprRef`)
+
+ ellipsis : anyOf(string, :class:`ExprRef`)
+
+ endAngle : anyOf(float, :class:`ExprRef`)
+
+ fill : anyOf(:class:`Color`, :class:`Gradient`, None, :class:`ExprRef`)
+ Default fill color. This property has higher precedence than ``config.color``. Set
+ to ``null`` to remove fill.
+
+ **Default value:** (None)
+ fillOpacity : anyOf(float, :class:`ExprRef`)
+
+ filled : boolean
+ Whether the mark's color should be used as fill color instead of stroke color.
+
+ **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well
+ as ``geoshape`` marks for `graticule
+ <https://vega.github.io/vega-lite/docs/data.html#graticule>`__ data sources;
+ otherwise, ``true``.
+
+ **Note:** This property cannot be used in a `style config
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
+ font : anyOf(string, :class:`ExprRef`)
+
+ fontSize : anyOf(float, :class:`ExprRef`)
+
+ fontStyle : anyOf(:class:`FontStyle`, :class:`ExprRef`)
+
+ fontWeight : anyOf(:class:`FontWeight`, :class:`ExprRef`)
+
+ height : anyOf(float, :class:`ExprRef`)
+
+ href : anyOf(:class:`URI`, :class:`ExprRef`)
+
+ innerRadius : anyOf(float, :class:`ExprRef`)
+ The inner radius in pixels of arc marks. ``innerRadius`` is an alias for
+ ``radius2``.
+ interpolate : anyOf(:class:`Interpolate`, :class:`ExprRef`)
+
+ invalid : enum('filter', None)
+ Defines how Vega-Lite should handle marks for invalid values ( ``null`` and ``NaN``
+ ). - If set to ``"filter"`` (default), all data items with null values will be
+ skipped (for line, trail, and area marks) or filtered (for other marks). - If
+ ``null``, all data items are included. In this case, invalid values will be
+ interpreted as zeroes.
+ limit : anyOf(float, :class:`ExprRef`)
+
+ line : anyOf(boolean, :class:`OverlayMarkDef`)
+ A flag for overlaying line on top of area marks, or an object defining the
+ properties of the overlayed lines.
+
+
+ If this value is an empty object ( ``{}`` ) or ``true``, lines with default
+ properties will be used.
+
+ If this value is ``false``, no lines would be automatically added to area marks.
+
+ **Default value:** ``false``.
+ lineBreak : anyOf(string, :class:`ExprRef`)
+
+ lineHeight : anyOf(float, :class:`ExprRef`)
+
+ opacity : anyOf(float, :class:`ExprRef`)
+ The overall opacity (value between [0,1]).
+
+ **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,
+ ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.
+ order : anyOf(None, boolean)
+ For line and trail marks, this ``order`` property can be set to ``null`` or
+ ``false`` to make the lines use the original order in the data sources.
+ orient : :class:`Orientation`
+ The orientation of a non-stacked bar, tick, area, and line charts. The value is
+ either horizontal (default) or vertical. - For bar, rule and tick, this determines
+ whether the size of the bar and tick should be applied to x or y dimension. - For
+ area, this property determines the orient property of the Vega output. - For line
+ and trail marks, this property determines the sort order of the points in the line
+ if ``config.sortLineBy`` is not specified. For stacked charts, this is always
+ determined by the orientation of the stack; therefore explicitly specified value
+ will be ignored.
+ outerRadius : anyOf(float, :class:`ExprRef`)
+ The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``.
+ padAngle : anyOf(float, :class:`ExprRef`)
+
+ point : anyOf(boolean, :class:`OverlayMarkDef`, string)
+ A flag for overlaying points on top of line or area marks, or an object defining the
+ properties of the overlayed points.
+
+
+ If this property is ``"transparent"``, transparent points will be used (for
+ enhancing tooltips and selections).
+
+ If this property is an empty object ( ``{}`` ) or ``true``, filled points with
+ default properties will be used.
+
+ If this property is ``false``, no points would be automatically added to line or
+ area marks.
+
+ **Default value:** ``false``.
+ radius : anyOf(float, :class:`ExprRef`)
+ For arc mark, the primary (outer) radius in pixels.
+
+ For text marks, polar coordinate radial offset, in pixels, of the text from the
+ origin determined by the ``x`` and ``y`` properties.
+ radius2 : anyOf(float, :class:`ExprRef`)
+ The secondary (inner) radius in pixels of arc marks.
+ shape : anyOf(anyOf(:class:`SymbolShape`, string), :class:`ExprRef`)
+
+ size : anyOf(float, :class:`ExprRef`)
+ Default size for marks. - For ``point`` / ``circle`` / ``square``, this represents
+ the pixel area of the marks. Note that this value sets the area of the symbol; the
+ side lengths will increase with the square root of this value. - For ``bar``, this
+ represents the band size of the bar, in pixels. - For ``text``, this represents the
+ font size, in pixels.
+
+ **Default value:** - ``30`` for point, circle, square marks; width/height's ``step``
+ - ``2`` for bar marks with discrete dimensions; - ``5`` for bar marks with
+ continuous dimensions; - ``11`` for text marks.
+ smooth : anyOf(boolean, :class:`ExprRef`)
+
+ startAngle : anyOf(float, :class:`ExprRef`)
+
+ stroke : anyOf(:class:`Color`, :class:`Gradient`, None, :class:`ExprRef`)
+ Default stroke color. This property has higher precedence than ``config.color``. Set
+ to ``null`` to remove stroke.
+
+ **Default value:** (None)
+ strokeCap : anyOf(:class:`StrokeCap`, :class:`ExprRef`)
+
+ strokeDash : anyOf(List(float), :class:`ExprRef`)
+
+ strokeDashOffset : anyOf(float, :class:`ExprRef`)
+
+ strokeJoin : anyOf(:class:`StrokeJoin`, :class:`ExprRef`)
+
+ strokeMiterLimit : anyOf(float, :class:`ExprRef`)
+
+ strokeOffset : anyOf(float, :class:`ExprRef`)
+
+ strokeOpacity : anyOf(float, :class:`ExprRef`)
+
+ strokeWidth : anyOf(float, :class:`ExprRef`)
+
+ tension : anyOf(float, :class:`ExprRef`)
+
+ text : anyOf(:class:`Text`, :class:`ExprRef`)
+
+ theta : anyOf(float, :class:`ExprRef`)
+ For arc marks, the arc length in radians if theta2 is not specified, otherwise the
+ start arc angle. (A value of 0 indicates up or “north”, increasing values proceed
+ clockwise.)
+
+ For text marks, polar coordinate angle in radians.
+ theta2 : anyOf(float, :class:`ExprRef`)
+ The end angle of arc marks in radians. A value of 0 indicates up or “north”,
+ increasing values proceed clockwise.
+ timeUnitBand : float
+ Default relative band size for a time unit. If set to ``1``, the bandwidth of the
+ marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the
+ marks will be half of the time unit band step.
+ timeUnitBandPosition : float
+ Default relative band position for a time unit. If set to ``0``, the marks will be
+ positioned at the beginning of the time unit band step. If set to ``0.5``, the marks
+ will be positioned in the middle of the time unit band step.
+ tooltip : anyOf(float, string, boolean, :class:`TooltipContent`, :class:`ExprRef`, None)
+ The tooltip text string to show upon mouse hover or an object defining which fields
+ should the tooltip be derived from.
+
+
+ * If ``tooltip`` is ``true`` or ``{"content": "encoding"}``, then all fields from
+ ``encoding`` will be used. - If ``tooltip`` is ``{"content": "data"}``, then all
+ fields that appear in the highlighted data point will be used. - If set to
+ ``null`` or ``false``, then no tooltip will be used.
+
+ See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__
+ documentation for a detailed discussion about tooltip in Vega-Lite.
+
+ **Default value:** ``null``
+ url : anyOf(:class:`URI`, :class:`ExprRef`)
+
+ width : anyOf(float, :class:`ExprRef`)
+
+ x : anyOf(float, string, :class:`ExprRef`)
+ X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without
+ specified ``x2`` or ``width``.
+
+ The ``value`` of this channel can be a number or a string ``"width"`` for the width
+ of the plot.
+ x2 : anyOf(float, string, :class:`ExprRef`)
+ X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
+
+ The ``value`` of this channel can be a number or a string ``"width"`` for the width
+ of the plot.
+ y : anyOf(float, string, :class:`ExprRef`)
+ Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without
+ specified ``y2`` or ``height``.
+
+ The ``value`` of this channel can be a number or a string ``"height"`` for the
+ height of the plot.
+ y2 : anyOf(float, string, :class:`ExprRef`)
+ Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
+
+ The ``value`` of this channel can be a number or a string ``"height"`` for the
+ height of the plot.
+ """
+ _schema = {'$ref': '#/definitions/AreaConfig'}
+
+ def __init__(self, align=Undefined, angle=Undefined, aria=Undefined, ariaRole=Undefined,
+ ariaRoleDescription=Undefined, aspect=Undefined, baseline=Undefined, blend=Undefined,
+ color=Undefined, cornerRadius=Undefined, cornerRadiusBottomLeft=Undefined,
+ cornerRadiusBottomRight=Undefined, cornerRadiusTopLeft=Undefined,
+ cornerRadiusTopRight=Undefined, cursor=Undefined, description=Undefined, dir=Undefined,
+ dx=Undefined, dy=Undefined, ellipsis=Undefined, endAngle=Undefined, fill=Undefined,
+ fillOpacity=Undefined, filled=Undefined, font=Undefined, fontSize=Undefined,
+ fontStyle=Undefined, fontWeight=Undefined, height=Undefined, href=Undefined,
+ innerRadius=Undefined, interpolate=Undefined, invalid=Undefined, limit=Undefined,
+ line=Undefined, lineBreak=Undefined, lineHeight=Undefined, opacity=Undefined,
+ order=Undefined, orient=Undefined, outerRadius=Undefined, padAngle=Undefined,
+ point=Undefined, radius=Undefined, radius2=Undefined, shape=Undefined, size=Undefined,
+ smooth=Undefined, startAngle=Undefined, stroke=Undefined, strokeCap=Undefined,
+ strokeDash=Undefined, strokeDashOffset=Undefined, strokeJoin=Undefined,
+ strokeMiterLimit=Undefined, strokeOffset=Undefined, strokeOpacity=Undefined,
+ strokeWidth=Undefined, tension=Undefined, text=Undefined, theta=Undefined,
+ theta2=Undefined, timeUnitBand=Undefined, timeUnitBandPosition=Undefined,
+ tooltip=Undefined, url=Undefined, width=Undefined, x=Undefined, x2=Undefined,
+ y=Undefined, y2=Undefined, **kwds):
+ super(AreaConfig, self).__init__(align=align, angle=angle, aria=aria, ariaRole=ariaRole,
+ ariaRoleDescription=ariaRoleDescription, aspect=aspect,
+ baseline=baseline, blend=blend, color=color,
+ cornerRadius=cornerRadius,
+ cornerRadiusBottomLeft=cornerRadiusBottomLeft,
+ cornerRadiusBottomRight=cornerRadiusBottomRight,
+ cornerRadiusTopLeft=cornerRadiusTopLeft,
+ cornerRadiusTopRight=cornerRadiusTopRight, cursor=cursor,
+ description=description, dir=dir, dx=dx, dy=dy,
+ ellipsis=ellipsis, endAngle=endAngle, fill=fill,
+ fillOpacity=fillOpacity, filled=filled, font=font,
+ fontSize=fontSize, fontStyle=fontStyle, fontWeight=fontWeight,
+ height=height, href=href, innerRadius=innerRadius,
+ interpolate=interpolate, invalid=invalid, limit=limit,
+ line=line, lineBreak=lineBreak, lineHeight=lineHeight,
+ opacity=opacity, order=order, orient=orient,
+ outerRadius=outerRadius, padAngle=padAngle, point=point,
+ radius=radius, radius2=radius2, shape=shape, size=size,
+ smooth=smooth, startAngle=startAngle, stroke=stroke,
+ strokeCap=strokeCap, strokeDash=strokeDash,
+ strokeDashOffset=strokeDashOffset, strokeJoin=strokeJoin,
+ strokeMiterLimit=strokeMiterLimit, strokeOffset=strokeOffset,
+ strokeOpacity=strokeOpacity, strokeWidth=strokeWidth,
+ tension=tension, text=text, theta=theta, theta2=theta2,
+ timeUnitBand=timeUnitBand,
+ timeUnitBandPosition=timeUnitBandPosition, tooltip=tooltip,
+ url=url, width=width, x=x, x2=x2, y=y, y2=y2, **kwds)
+
+
+class ArgmaxDef(Aggregate):
+ """ArgmaxDef schema wrapper
+
+ Mapping(required=[argmax])
+
+ Attributes
+ ----------
+
+ argmax : string
+
+ """
+ _schema = {'$ref': '#/definitions/ArgmaxDef'}
+
+ def __init__(self, argmax=Undefined, **kwds):
+ super(ArgmaxDef, self).__init__(argmax=argmax, **kwds)
+
+
+class ArgminDef(Aggregate):
+ """ArgminDef schema wrapper
+
+ Mapping(required=[argmin])
+
+ Attributes
+ ----------
+
+ argmin : string
+
+ """
+ _schema = {'$ref': '#/definitions/ArgminDef'}
+
+ def __init__(self, argmin=Undefined, **kwds):
+ super(ArgminDef, self).__init__(argmin=argmin, **kwds)
+
+
+class AutoSizeParams(VegaLiteSchema):
+ """AutoSizeParams schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ contains : enum('content', 'padding')
+ Determines how size calculation should be performed, one of ``"content"`` or
+ ``"padding"``. The default setting ( ``"content"`` ) interprets the width and height
+ settings as the data rectangle (plotting) dimensions, to which padding is then
+ added. In contrast, the ``"padding"`` setting includes the padding within the view
+ size calculations, such that the width and height settings indicate the **total**
+ intended size of the view.
+
+ **Default value** : ``"content"``
+ resize : boolean
+ A boolean flag indicating if autosize layout should be re-calculated on every view
+ update.
+
+ **Default value** : ``false``
+ type : :class:`AutosizeType`
+ The sizing format type. One of ``"pad"``, ``"fit"``, ``"fit-x"``, ``"fit-y"``, or
+ ``"none"``. See the `autosize type
+ <https://vega.github.io/vega-lite/docs/size.html#autosize>`__ documentation for
+ descriptions of each.
+
+ **Default value** : ``"pad"``
+ """
+ _schema = {'$ref': '#/definitions/AutoSizeParams'}
+
+ def __init__(self, contains=Undefined, resize=Undefined, type=Undefined, **kwds):
+ super(AutoSizeParams, self).__init__(contains=contains, resize=resize, type=type, **kwds)
+
+
+class AutosizeType(VegaLiteSchema):
+ """AutosizeType schema wrapper
+
+ enum('pad', 'none', 'fit', 'fit-x', 'fit-y')
+ """
+ _schema = {'$ref': '#/definitions/AutosizeType'}
+
+ def __init__(self, *args):
+ super(AutosizeType, self).__init__(*args)
+
+
+class Axis(VegaLiteSchema):
+ """Axis schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ aria : anyOf(boolean, :class:`ExprRef`)
+
+ bandPosition : anyOf(float, :class:`ExprRef`)
+
+ description : anyOf(string, :class:`ExprRef`)
+
+ domain : anyOf(boolean, :class:`ExprRef`)
+
+ domainCap : anyOf(:class:`StrokeCap`, :class:`ExprRef`)
+
+ domainColor : anyOf(anyOf(None, :class:`Color`), :class:`ExprRef`)
+
+ domainDash : anyOf(List(float), :class:`ExprRef`)
+
+ domainDashOffset : anyOf(float, :class:`ExprRef`)
+
+ domainOpacity : anyOf(float, :class:`ExprRef`)
+
+ domainWidth : anyOf(float, :class:`ExprRef`)
+
+ format : anyOf(string, :class:`Dictunknown`)
+ When used with the default ``"number"`` and ``"time"`` format type, the text
+ formatting pattern for labels of guides (axes, legends, headers) and text marks.
+
+
+ * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
+ `number format pattern <https://github.com/d3/d3-format#locale_format>`__. - If
+ the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
+ format pattern <https://github.com/d3/d3-time-format#locale_format>`__.
+
+ See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
+ for more examples.
+
+ When used with a `custom formatType
+ <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this
+ value will be passed as ``format`` alongside ``datum.value`` to the registered
+ function.
+
+ **Default value:** Derived from `numberFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
+ format and from `timeFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
+ format.
+ formatType : string
+ The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom
+ format type
+ <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.
+
+ **Default value:** - ``"time"`` for temporal fields and ordinal and nominal fields
+ with ``timeUnit``. - ``"number"`` for quantitative fields as well as ordinal and
+ nominal fields without ``timeUnit``.
+ grid : boolean
+ A boolean flag indicating if grid lines should be included as part of the axis
+
+ **Default value:** ``true`` for `continuous scales
+ <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__ that are not
+ binned; otherwise, ``false``.
+ gridCap : anyOf(:class:`StrokeCap`, :class:`ExprRef`)
+
+ gridColor : anyOf(anyOf(None, :class:`Color`), :class:`ExprRef`,
+ :class:`ConditionalAxisColor`)
+
+ gridDash : anyOf(List(float), :class:`ExprRef`, :class:`ConditionalAxisNumberArray`)
+
+ gridDashOffset : anyOf(float, :class:`ExprRef`, :class:`ConditionalAxisNumber`)
+
+ gridOpacity : anyOf(float, :class:`ExprRef`, :class:`ConditionalAxisNumber`)
+
+ gridWidth : anyOf(float, :class:`ExprRef`, :class:`ConditionalAxisNumber`)
+
+ labelAlign : anyOf(:class:`Align`, :class:`ExprRef`, :class:`ConditionalAxisLabelAlign`)
+
+ labelAngle : anyOf(float, :class:`ExprRef`)
+
+ labelBaseline : anyOf(:class:`TextBaseline`, :class:`ExprRef`,
+ :class:`ConditionalAxisLabelBaseline`)
+
+ labelBound : anyOf(anyOf(float, boolean), :class:`ExprRef`)
+
+ labelColor : anyOf(anyOf(None, :class:`Color`), :class:`ExprRef`,
+ :class:`ConditionalAxisColor`)
+
+ labelExpr : string
+ `Vega expression <https://vega.github.io/vega/docs/expressions/>`__ for customizing
+ labels.
+
+ **Note:** The label text and value can be assessed via the ``label`` and ``value``
+ properties of the axis's backing ``datum`` object.
+ labelFlush : anyOf(boolean, float)
+ Indicates if the first and last axis labels should be aligned flush with the scale
+ range. Flush alignment for a horizontal axis will left-align the first label and
+ right-align the last label. For vertical axes, bottom and top text baselines are
+ applied instead. If this property is a number, it also indicates the number of
+ pixels by which to offset the first and last labels; for example, a value of 2 will
+ flush-align the first and last labels and also push them 2 pixels outward from the
+ center of the axis. The additional adjustment can sometimes help the labels better
+ visually group with corresponding axis ticks.
+
+ **Default value:** ``true`` for axis of a continuous x-scale. Otherwise, ``false``.
+ labelFlushOffset : anyOf(float, :class:`ExprRef`)
+
+ labelFont : anyOf(string, :class:`ExprRef`, :class:`ConditionalAxisString`)
+
+ labelFontSize : anyOf(float, :class:`ExprRef`, :class:`ConditionalAxisNumber`)
+
+ labelFontStyle : anyOf(:class:`FontStyle`, :class:`ExprRef`,
+ :class:`ConditionalAxisLabelFontStyle`)
+
+ labelFontWeight : anyOf(:class:`FontWeight`, :class:`ExprRef`,
+ :class:`ConditionalAxisLabelFontWeight`)
+
+ labelLimit : anyOf(float, :class:`ExprRef`)
+
+ labelLineHeight : anyOf(float, :class:`ExprRef`)
+
+ labelOffset : anyOf(float, :class:`ExprRef`, :class:`ConditionalAxisNumber`)
+
+ labelOpacity : anyOf(float, :class:`ExprRef`, :class:`ConditionalAxisNumber`)
+
+ labelOverlap : anyOf(:class:`LabelOverlap`, :class:`ExprRef`)
+ The strategy to use for resolving overlap of axis labels. If ``false`` (the
+ default), no overlap reduction is attempted. If set to ``true`` or ``"parity"``, a
+ strategy of removing every other label is used (this works well for standard linear
+ axes). If set to ``"greedy"``, a linear scan of the labels is performed, removing
+ any labels that overlaps with the last visible label (this often works better for
+ log-scaled axes).
+
+ **Default value:** ``true`` for non-nominal fields with non-log scales; ``"greedy"``
+ for log scales; otherwise ``false``.
+ labelPadding : anyOf(float, :class:`ExprRef`, :class:`ConditionalAxisNumber`)
+
+ labelSeparation : anyOf(float, :class:`ExprRef`)
+
+ labels : anyOf(boolean, :class:`ExprRef`)
+
+ maxExtent : anyOf(float, :class:`ExprRef`)
+
+ minExtent : anyOf(float, :class:`ExprRef`)
+
+ offset : float
+ The offset, in pixels, by which to displace the axis from the edge of the enclosing
+ group or data rectangle.
+
+ **Default value:** derived from the `axis config
+ <https://vega.github.io/vega-lite/docs/config.html#facet-scale-config>`__ 's
+ ``offset`` ( ``0`` by default)
+ orient : anyOf(:class:`AxisOrient`, :class:`ExprRef`)
+ The orientation of the axis. One of ``"top"``, ``"bottom"``, ``"left"`` or
+ ``"right"``. The orientation can be used to further specialize the axis type (e.g.,
+ a y-axis oriented towards the right edge of the chart).
+
+ **Default value:** ``"bottom"`` for x-axes and ``"left"`` for y-axes.
+ position : anyOf(float, :class:`ExprRef`)
+ The anchor position of the axis in pixels. For x-axes with top or bottom
+ orientation, this sets the axis group x coordinate. For y-axes with left or right
+ orientation, this sets the axis group y coordinate.
+
+ **Default value** : ``0``
+ style : anyOf(string, List(string))
+ A string or array of strings indicating the name of custom styles to apply to the
+ axis. A style is a named collection of axis property defined within the `style
+ configuration <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. If
+ style is an array, later styles will override earlier styles.
+
+ **Default value:** (none) **Note:** Any specified style will augment the default
+ style. For example, an x-axis mark with ``"style": "foo"`` will use ``config.axisX``
+ and ``config.style.foo`` (the specified style ``"foo"`` has higher precedence).
+ tickBand : anyOf(enum('center', 'extent'), :class:`ExprRef`)
+
+ tickCap : anyOf(:class:`StrokeCap`, :class:`ExprRef`)
+
+ tickColor : anyOf(anyOf(None, :class:`Color`), :class:`ExprRef`,
+ :class:`ConditionalAxisColor`)
+
+ tickCount : anyOf(float, :class:`TimeInterval`, :class:`TimeIntervalStep`, :class:`ExprRef`)
+ A desired number of ticks, for axes visualizing quantitative scales. The resulting
+ number may be different so that values are "nice" (multiples of 2, 5, 10) and lie
+ within the underlying scale's range.
+
+ For scales of type ``"time"`` or ``"utc"``, the tick count can instead be a time
+ interval specifier. Legal string values are ``"millisecond"``, ``"second"``,
+ ``"minute"``, ``"hour"``, ``"day"``, ``"week"``, ``"month"``, and ``"year"``.
+ Alternatively, an object-valued interval specifier of the form ``{"interval":
+ "month", "step": 3}`` includes a desired number of interval steps. Here, ticks are
+ generated for each quarter (Jan, Apr, Jul, Oct) boundary.
+
+ **Default value** : Determine using a formula ``ceil(width/40)`` for x and
+ ``ceil(height/40)`` for y.
+ tickDash : anyOf(List(float), :class:`ExprRef`, :class:`ConditionalAxisNumberArray`)
+
+ tickDashOffset : anyOf(float, :class:`ExprRef`, :class:`ConditionalAxisNumber`)
+
+ tickExtra : anyOf(boolean, :class:`ExprRef`)
+
+ tickMinStep : anyOf(float, :class:`ExprRef`)
+ The minimum desired step between axis ticks, in terms of scale domain values. For
+ example, a value of ``1`` indicates that ticks should not be less than 1 unit apart.
+ If ``tickMinStep`` is specified, the ``tickCount`` value will be adjusted, if
+ necessary, to enforce the minimum step value.
+ tickOffset : anyOf(float, :class:`ExprRef`)
+
+ tickOpacity : anyOf(float, :class:`ExprRef`, :class:`ConditionalAxisNumber`)
+
+ tickRound : anyOf(boolean, :class:`ExprRef`)
+
+ tickSize : anyOf(float, :class:`ExprRef`, :class:`ConditionalAxisNumber`)
+
+ tickWidth : anyOf(float, :class:`ExprRef`, :class:`ConditionalAxisNumber`)
+
+ ticks : anyOf(boolean, :class:`ExprRef`)
+
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ titleAlign : anyOf(:class:`Align`, :class:`ExprRef`)
+
+ titleAnchor : anyOf(:class:`TitleAnchor`, :class:`ExprRef`)
+
+ titleAngle : anyOf(float, :class:`ExprRef`)
+
+ titleBaseline : anyOf(:class:`TextBaseline`, :class:`ExprRef`)
+
+ titleColor : anyOf(anyOf(None, :class:`Color`), :class:`ExprRef`)
+
+ titleFont : anyOf(string, :class:`ExprRef`)
+
+ titleFontSize : anyOf(float, :class:`ExprRef`)
+
+ titleFontStyle : anyOf(:class:`FontStyle`, :class:`ExprRef`)
+
+ titleFontWeight : anyOf(:class:`FontWeight`, :class:`ExprRef`)
+
+ titleLimit : anyOf(float, :class:`ExprRef`)
+
+ titleLineHeight : anyOf(float, :class:`ExprRef`)
+
+ titleOpacity : anyOf(float, :class:`ExprRef`)
+
+ titlePadding : anyOf(float, :class:`ExprRef`)
+
+ titleX : anyOf(float, :class:`ExprRef`)
+
+ titleY : anyOf(float, :class:`ExprRef`)
+
+ translate : anyOf(float, :class:`ExprRef`)
+
+ values : anyOf(List(float), List(string), List(boolean), List(:class:`DateTime`),
+ :class:`ExprRef`)
+ Explicitly set the visible axis tick values.
+ zindex : float
+ A non-negative integer indicating the z-index of the axis. If zindex is 0, axes
+ should be drawn behind all chart elements. To put them in front, set ``zindex`` to
+ ``1`` or more.
+
+ **Default value:** ``0`` (behind the marks).
+ """
+ _schema = {'$ref': '#/definitions/Axis'}
+
+ def __init__(self, aria=Undefined, bandPosition=Undefined, description=Undefined, domain=Undefined,
+ domainCap=Undefined, domainColor=Undefined, domainDash=Undefined,
+ domainDashOffset=Undefined, domainOpacity=Undefined, domainWidth=Undefined,
+ format=Undefined, formatType=Undefined, grid=Undefined, gridCap=Undefined,
+ gridColor=Undefined, gridDash=Undefined, gridDashOffset=Undefined,
+ gridOpacity=Undefined, gridWidth=Undefined, labelAlign=Undefined, labelAngle=Undefined,
+ labelBaseline=Undefined, labelBound=Undefined, labelColor=Undefined,
+ labelExpr=Undefined, labelFlush=Undefined, labelFlushOffset=Undefined,
+ labelFont=Undefined, labelFontSize=Undefined, labelFontStyle=Undefined,
+ labelFontWeight=Undefined, labelLimit=Undefined, labelLineHeight=Undefined,
+ labelOffset=Undefined, labelOpacity=Undefined, labelOverlap=Undefined,
+ labelPadding=Undefined, labelSeparation=Undefined, labels=Undefined,
+ maxExtent=Undefined, minExtent=Undefined, offset=Undefined, orient=Undefined,
+ position=Undefined, style=Undefined, tickBand=Undefined, tickCap=Undefined,
+ tickColor=Undefined, tickCount=Undefined, tickDash=Undefined, tickDashOffset=Undefined,
+ tickExtra=Undefined, tickMinStep=Undefined, tickOffset=Undefined,
+ tickOpacity=Undefined, tickRound=Undefined, tickSize=Undefined, tickWidth=Undefined,
+ ticks=Undefined, title=Undefined, titleAlign=Undefined, titleAnchor=Undefined,
+ titleAngle=Undefined, titleBaseline=Undefined, titleColor=Undefined,
+ titleFont=Undefined, titleFontSize=Undefined, titleFontStyle=Undefined,
+ titleFontWeight=Undefined, titleLimit=Undefined, titleLineHeight=Undefined,
+ titleOpacity=Undefined, titlePadding=Undefined, titleX=Undefined, titleY=Undefined,
+ translate=Undefined, values=Undefined, zindex=Undefined, **kwds):
+ super(Axis, self).__init__(aria=aria, bandPosition=bandPosition, description=description,
+ domain=domain, domainCap=domainCap, domainColor=domainColor,
+ domainDash=domainDash, domainDashOffset=domainDashOffset,
+ domainOpacity=domainOpacity, domainWidth=domainWidth, format=format,
+ formatType=formatType, grid=grid, gridCap=gridCap,
+ gridColor=gridColor, gridDash=gridDash,
+ gridDashOffset=gridDashOffset, gridOpacity=gridOpacity,
+ gridWidth=gridWidth, labelAlign=labelAlign, labelAngle=labelAngle,
+ labelBaseline=labelBaseline, labelBound=labelBound,
+ labelColor=labelColor, labelExpr=labelExpr, labelFlush=labelFlush,
+ labelFlushOffset=labelFlushOffset, labelFont=labelFont,
+ labelFontSize=labelFontSize, labelFontStyle=labelFontStyle,
+ labelFontWeight=labelFontWeight, labelLimit=labelLimit,
+ labelLineHeight=labelLineHeight, labelOffset=labelOffset,
+ labelOpacity=labelOpacity, labelOverlap=labelOverlap,
+ labelPadding=labelPadding, labelSeparation=labelSeparation,
+ labels=labels, maxExtent=maxExtent, minExtent=minExtent,
+ offset=offset, orient=orient, position=position, style=style,
+ tickBand=tickBand, tickCap=tickCap, tickColor=tickColor,
+ tickCount=tickCount, tickDash=tickDash,
+ tickDashOffset=tickDashOffset, tickExtra=tickExtra,
+ tickMinStep=tickMinStep, tickOffset=tickOffset,
+ tickOpacity=tickOpacity, tickRound=tickRound, tickSize=tickSize,
+ tickWidth=tickWidth, ticks=ticks, title=title, titleAlign=titleAlign,
+ titleAnchor=titleAnchor, titleAngle=titleAngle,
+ titleBaseline=titleBaseline, titleColor=titleColor,
+ titleFont=titleFont, titleFontSize=titleFontSize,
+ titleFontStyle=titleFontStyle, titleFontWeight=titleFontWeight,
+ titleLimit=titleLimit, titleLineHeight=titleLineHeight,
+ titleOpacity=titleOpacity, titlePadding=titlePadding, titleX=titleX,
+ titleY=titleY, translate=translate, values=values, zindex=zindex,
+ **kwds)
+
+
+class AxisConfig(VegaLiteSchema):
+ """AxisConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ aria : anyOf(boolean, :class:`ExprRef`)
+
+ bandPosition : anyOf(float, :class:`ExprRef`)
+
+ description : anyOf(string, :class:`ExprRef`)
+
+ disable : boolean
+ Disable axis by default.
+ domain : anyOf(boolean, :class:`ExprRef`)
+
+ domainCap : anyOf(:class:`StrokeCap`, :class:`ExprRef`)
+
+ domainColor : anyOf(anyOf(None, :class:`Color`), :class:`ExprRef`)
+
+ domainDash : anyOf(List(float), :class:`ExprRef`)
+
+ domainDashOffset : anyOf(float, :class:`ExprRef`)
+
+ domainOpacity : anyOf(float, :class:`ExprRef`)
+
+ domainWidth : anyOf(float, :class:`ExprRef`)
+
+ format : anyOf(string, :class:`Dictunknown`)
+ When used with the default ``"number"`` and ``"time"`` format type, the text
+ formatting pattern for labels of guides (axes, legends, headers) and text marks.
+
+
+ * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
+ `number format pattern <https://github.com/d3/d3-format#locale_format>`__. - If
+ the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
+ format pattern <https://github.com/d3/d3-time-format#locale_format>`__.
+
+ See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
+ for more examples.
+
+ When used with a `custom formatType
+ <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this
+ value will be passed as ``format`` alongside ``datum.value`` to the registered
+ function.
+
+ **Default value:** Derived from `numberFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
+ format and from `timeFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
+ format.
+ formatType : string
+ The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom
+ format type
+ <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.
+
+ **Default value:** - ``"time"`` for temporal fields and ordinal and nominal fields
+ with ``timeUnit``. - ``"number"`` for quantitative fields as well as ordinal and
+ nominal fields without ``timeUnit``.
+ grid : boolean
+ A boolean flag indicating if grid lines should be included as part of the axis
+
+ **Default value:** ``true`` for `continuous scales
+ <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__ that are not
+ binned; otherwise, ``false``.
+ gridCap : anyOf(:class:`StrokeCap`, :class:`ExprRef`)
+
+ gridColor : anyOf(anyOf(None, :class:`Color`), :class:`ExprRef`,
+ :class:`ConditionalAxisColor`)
+
+ gridDash : anyOf(List(float), :class:`ExprRef`, :class:`ConditionalAxisNumberArray`)
+
+ gridDashOffset : anyOf(float, :class:`ExprRef`, :class:`ConditionalAxisNumber`)
+
+ gridOpacity : anyOf(float, :class:`ExprRef`, :class:`ConditionalAxisNumber`)
+
+ gridWidth : anyOf(float, :class:`ExprRef`, :class:`ConditionalAxisNumber`)
+
+ labelAlign : anyOf(:class:`Align`, :class:`ExprRef`, :class:`ConditionalAxisLabelAlign`)
+
+ labelAngle : anyOf(float, :class:`ExprRef`)
+
+ labelBaseline : anyOf(:class:`TextBaseline`, :class:`ExprRef`,
+ :class:`ConditionalAxisLabelBaseline`)
+
+ labelBound : anyOf(anyOf(float, boolean), :class:`ExprRef`)
+
+ labelColor : anyOf(anyOf(None, :class:`Color`), :class:`ExprRef`,
+ :class:`ConditionalAxisColor`)
+
+ labelExpr : string
+ `Vega expression <https://vega.github.io/vega/docs/expressions/>`__ for customizing
+ labels text.
+
+ **Note:** The label text and value can be assessed via the ``label`` and ``value``
+ properties of the axis's backing ``datum`` object.
+ labelFlush : anyOf(boolean, float)
+ Indicates if the first and last axis labels should be aligned flush with the scale
+ range. Flush alignment for a horizontal axis will left-align the first label and
+ right-align the last label. For vertical axes, bottom and top text baselines are
+ applied instead. If this property is a number, it also indicates the number of
+ pixels by which to offset the first and last labels; for example, a value of 2 will
+ flush-align the first and last labels and also push them 2 pixels outward from the
+ center of the axis. The additional adjustment can sometimes help the labels better
+ visually group with corresponding axis ticks.
+
+ **Default value:** ``true`` for axis of a continuous x-scale. Otherwise, ``false``.
+ labelFlushOffset : anyOf(float, :class:`ExprRef`)
+
+ labelFont : anyOf(string, :class:`ExprRef`, :class:`ConditionalAxisString`)
+
+ labelFontSize : anyOf(float, :class:`ExprRef`, :class:`ConditionalAxisNumber`)
+
+ labelFontStyle : anyOf(:class:`FontStyle`, :class:`ExprRef`,
+ :class:`ConditionalAxisLabelFontStyle`)
+
+ labelFontWeight : anyOf(:class:`FontWeight`, :class:`ExprRef`,
+ :class:`ConditionalAxisLabelFontWeight`)
+
+ labelLimit : anyOf(float, :class:`ExprRef`)
+
+ labelLineHeight : anyOf(float, :class:`ExprRef`)
+
+ labelOffset : anyOf(float, :class:`ExprRef`, :class:`ConditionalAxisNumber`)
+
+ labelOpacity : anyOf(float, :class:`ExprRef`, :class:`ConditionalAxisNumber`)
+
+ labelOverlap : anyOf(:class:`LabelOverlap`, :class:`ExprRef`)
+ The strategy to use for resolving overlap of axis labels. If ``false`` (the
+ default), no overlap reduction is attempted. If set to ``true`` or ``"parity"``, a
+ strategy of removing every other label is used (this works well for standard linear
+ axes). If set to ``"greedy"``, a linear scan of the labels is performed, removing
+ any labels that overlaps with the last visible label (this often works better for
+ log-scaled axes).
+
+ **Default value:** ``true`` for non-nominal fields with non-log scales; ``"greedy"``
+ for log scales; otherwise ``false``.
+ labelPadding : anyOf(float, :class:`ExprRef`, :class:`ConditionalAxisNumber`)
+
+ labelSeparation : anyOf(float, :class:`ExprRef`)
+
+ labels : anyOf(boolean, :class:`ExprRef`)
+
+ maxExtent : anyOf(float, :class:`ExprRef`)
+
+ minExtent : anyOf(float, :class:`ExprRef`)
+
+ offset : float
+ The offset, in pixels, by which to displace the axis from the edge of the enclosing
+ group or data rectangle.
+
+ **Default value:** derived from the `axis config
+ <https://vega.github.io/vega-lite/docs/config.html#facet-scale-config>`__ 's
+ ``offset`` ( ``0`` by default)
+ orient : anyOf(:class:`AxisOrient`, :class:`ExprRef`)
+ The orientation of the axis. One of ``"top"``, ``"bottom"``, ``"left"`` or
+ ``"right"``. The orientation can be used to further specialize the axis type (e.g.,
+ a y-axis oriented towards the right edge of the chart).
+
+ **Default value:** ``"bottom"`` for x-axes and ``"left"`` for y-axes.
+ position : anyOf(float, :class:`ExprRef`)
+ The anchor position of the axis in pixels. For x-axes with top or bottom
+ orientation, this sets the axis group x coordinate. For y-axes with left or right
+ orientation, this sets the axis group y coordinate.
+
+ **Default value** : ``0``
+ style : anyOf(string, List(string))
+ A string or array of strings indicating the name of custom styles to apply to the
+ axis. A style is a named collection of axis property defined within the `style
+ configuration <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. If
+ style is an array, later styles will override earlier styles.
+
+ **Default value:** (none) **Note:** Any specified style will augment the default
+ style. For example, an x-axis mark with ``"style": "foo"`` will use ``config.axisX``
+ and ``config.style.foo`` (the specified style ``"foo"`` has higher precedence).
+ tickBand : anyOf(enum('center', 'extent'), :class:`ExprRef`)
+
+ tickCap : anyOf(:class:`StrokeCap`, :class:`ExprRef`)
+
+ tickColor : anyOf(anyOf(None, :class:`Color`), :class:`ExprRef`,
+ :class:`ConditionalAxisColor`)
+
+ tickCount : anyOf(float, :class:`TimeInterval`, :class:`TimeIntervalStep`, :class:`ExprRef`)
+ A desired number of ticks, for axes visualizing quantitative scales. The resulting
+ number may be different so that values are "nice" (multiples of 2, 5, 10) and lie
+ within the underlying scale's range.
+
+ For scales of type ``"time"`` or ``"utc"``, the tick count can instead be a time
+ interval specifier. Legal string values are ``"millisecond"``, ``"second"``,
+ ``"minute"``, ``"hour"``, ``"day"``, ``"week"``, ``"month"``, and ``"year"``.
+ Alternatively, an object-valued interval specifier of the form ``{"interval":
+ "month", "step": 3}`` includes a desired number of interval steps. Here, ticks are
+ generated for each quarter (Jan, Apr, Jul, Oct) boundary.
+
+ **Default value** : Determine using a formula ``ceil(width/40)`` for x and
+ ``ceil(height/40)`` for y.
+ tickDash : anyOf(List(float), :class:`ExprRef`, :class:`ConditionalAxisNumberArray`)
+
+ tickDashOffset : anyOf(float, :class:`ExprRef`, :class:`ConditionalAxisNumber`)
+
+ tickExtra : anyOf(boolean, :class:`ExprRef`)
+
+ tickMinStep : anyOf(float, :class:`ExprRef`)
+ The minimum desired step between axis ticks, in terms of scale domain values. For
+ example, a value of ``1`` indicates that ticks should not be less than 1 unit apart.
+ If ``tickMinStep`` is specified, the ``tickCount`` value will be adjusted, if
+ necessary, to enforce the minimum step value.
+ tickOffset : anyOf(float, :class:`ExprRef`)
+
+ tickOpacity : anyOf(float, :class:`ExprRef`, :class:`ConditionalAxisNumber`)
+
+ tickRound : anyOf(boolean, :class:`ExprRef`)
+
+ tickSize : anyOf(float, :class:`ExprRef`, :class:`ConditionalAxisNumber`)
+
+ tickWidth : anyOf(float, :class:`ExprRef`, :class:`ConditionalAxisNumber`)
+
+ ticks : anyOf(boolean, :class:`ExprRef`)
+
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ titleAlign : anyOf(:class:`Align`, :class:`ExprRef`)
+
+ titleAnchor : anyOf(:class:`TitleAnchor`, :class:`ExprRef`)
+
+ titleAngle : anyOf(float, :class:`ExprRef`)
+
+ titleBaseline : anyOf(:class:`TextBaseline`, :class:`ExprRef`)
+
+ titleColor : anyOf(anyOf(None, :class:`Color`), :class:`ExprRef`)
+
+ titleFont : anyOf(string, :class:`ExprRef`)
+
+ titleFontSize : anyOf(float, :class:`ExprRef`)
+
+ titleFontStyle : anyOf(:class:`FontStyle`, :class:`ExprRef`)
+
+ titleFontWeight : anyOf(:class:`FontWeight`, :class:`ExprRef`)
+
+ titleLimit : anyOf(float, :class:`ExprRef`)
+
+ titleLineHeight : anyOf(float, :class:`ExprRef`)
+
+ titleOpacity : anyOf(float, :class:`ExprRef`)
+
+ titlePadding : anyOf(float, :class:`ExprRef`)
+
+ titleX : anyOf(float, :class:`ExprRef`)
+
+ titleY : anyOf(float, :class:`ExprRef`)
+
+ translate : anyOf(float, :class:`ExprRef`)
+
+ values : anyOf(List(float), List(string), List(boolean), List(:class:`DateTime`),
+ :class:`ExprRef`)
+ Explicitly set the visible axis tick values.
+ zindex : float
+ A non-negative integer indicating the z-index of the axis. If zindex is 0, axes
+ should be drawn behind all chart elements. To put them in front, set ``zindex`` to
+ ``1`` or more.
+
+ **Default value:** ``0`` (behind the marks).
+ """
+ _schema = {'$ref': '#/definitions/AxisConfig'}
+
+ def __init__(self, aria=Undefined, bandPosition=Undefined, description=Undefined, disable=Undefined,
+ domain=Undefined, domainCap=Undefined, domainColor=Undefined, domainDash=Undefined,
+ domainDashOffset=Undefined, domainOpacity=Undefined, domainWidth=Undefined,
+ format=Undefined, formatType=Undefined, grid=Undefined, gridCap=Undefined,
+ gridColor=Undefined, gridDash=Undefined, gridDashOffset=Undefined,
+ gridOpacity=Undefined, gridWidth=Undefined, labelAlign=Undefined, labelAngle=Undefined,
+ labelBaseline=Undefined, labelBound=Undefined, labelColor=Undefined,
+ labelExpr=Undefined, labelFlush=Undefined, labelFlushOffset=Undefined,
+ labelFont=Undefined, labelFontSize=Undefined, labelFontStyle=Undefined,
+ labelFontWeight=Undefined, labelLimit=Undefined, labelLineHeight=Undefined,
+ labelOffset=Undefined, labelOpacity=Undefined, labelOverlap=Undefined,
+ labelPadding=Undefined, labelSeparation=Undefined, labels=Undefined,
+ maxExtent=Undefined, minExtent=Undefined, offset=Undefined, orient=Undefined,
+ position=Undefined, style=Undefined, tickBand=Undefined, tickCap=Undefined,
+ tickColor=Undefined, tickCount=Undefined, tickDash=Undefined, tickDashOffset=Undefined,
+ tickExtra=Undefined, tickMinStep=Undefined, tickOffset=Undefined,
+ tickOpacity=Undefined, tickRound=Undefined, tickSize=Undefined, tickWidth=Undefined,
+ ticks=Undefined, title=Undefined, titleAlign=Undefined, titleAnchor=Undefined,
+ titleAngle=Undefined, titleBaseline=Undefined, titleColor=Undefined,
+ titleFont=Undefined, titleFontSize=Undefined, titleFontStyle=Undefined,
+ titleFontWeight=Undefined, titleLimit=Undefined, titleLineHeight=Undefined,
+ titleOpacity=Undefined, titlePadding=Undefined, titleX=Undefined, titleY=Undefined,
+ translate=Undefined, values=Undefined, zindex=Undefined, **kwds):
+ super(AxisConfig, self).__init__(aria=aria, bandPosition=bandPosition, description=description,
+ disable=disable, domain=domain, domainCap=domainCap,
+ domainColor=domainColor, domainDash=domainDash,
+ domainDashOffset=domainDashOffset, domainOpacity=domainOpacity,
+ domainWidth=domainWidth, format=format, formatType=formatType,
+ grid=grid, gridCap=gridCap, gridColor=gridColor,
+ gridDash=gridDash, gridDashOffset=gridDashOffset,
+ gridOpacity=gridOpacity, gridWidth=gridWidth,
+ labelAlign=labelAlign, labelAngle=labelAngle,
+ labelBaseline=labelBaseline, labelBound=labelBound,
+ labelColor=labelColor, labelExpr=labelExpr,
+ labelFlush=labelFlush, labelFlushOffset=labelFlushOffset,
+ labelFont=labelFont, labelFontSize=labelFontSize,
+ labelFontStyle=labelFontStyle, labelFontWeight=labelFontWeight,
+ labelLimit=labelLimit, labelLineHeight=labelLineHeight,
+ labelOffset=labelOffset, labelOpacity=labelOpacity,
+ labelOverlap=labelOverlap, labelPadding=labelPadding,
+ labelSeparation=labelSeparation, labels=labels,
+ maxExtent=maxExtent, minExtent=minExtent, offset=offset,
+ orient=orient, position=position, style=style,
+ tickBand=tickBand, tickCap=tickCap, tickColor=tickColor,
+ tickCount=tickCount, tickDash=tickDash,
+ tickDashOffset=tickDashOffset, tickExtra=tickExtra,
+ tickMinStep=tickMinStep, tickOffset=tickOffset,
+ tickOpacity=tickOpacity, tickRound=tickRound,
+ tickSize=tickSize, tickWidth=tickWidth, ticks=ticks,
+ title=title, titleAlign=titleAlign, titleAnchor=titleAnchor,
+ titleAngle=titleAngle, titleBaseline=titleBaseline,
+ titleColor=titleColor, titleFont=titleFont,
+ titleFontSize=titleFontSize, titleFontStyle=titleFontStyle,
+ titleFontWeight=titleFontWeight, titleLimit=titleLimit,
+ titleLineHeight=titleLineHeight, titleOpacity=titleOpacity,
+ titlePadding=titlePadding, titleX=titleX, titleY=titleY,
+ translate=translate, values=values, zindex=zindex, **kwds)
+
+
+class AxisOrient(VegaLiteSchema):
+ """AxisOrient schema wrapper
+
+ enum('top', 'bottom', 'left', 'right')
+ """
+ _schema = {'$ref': '#/definitions/AxisOrient'}
+
+ def __init__(self, *args):
+ super(AxisOrient, self).__init__(*args)
+
+
+class AxisResolveMap(VegaLiteSchema):
+ """AxisResolveMap schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ x : :class:`ResolveMode`
+
+ y : :class:`ResolveMode`
+
+ """
+ _schema = {'$ref': '#/definitions/AxisResolveMap'}
+
+ def __init__(self, x=Undefined, y=Undefined, **kwds):
+ super(AxisResolveMap, self).__init__(x=x, y=y, **kwds)
+
+
+class BarConfig(AnyMarkConfig):
+ """BarConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ align : anyOf(:class:`Align`, :class:`ExprRef`)
+ The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule).
+ One of ``"left"``, ``"right"``, ``"center"``.
+
+ **Note:** Expression reference is *not* supported for range marks.
+ angle : anyOf(float, :class:`ExprRef`)
+
+ aria : anyOf(boolean, :class:`ExprRef`)
+
+ ariaRole : anyOf(string, :class:`ExprRef`)
+
+ ariaRoleDescription : anyOf(string, :class:`ExprRef`)
+
+ aspect : anyOf(boolean, :class:`ExprRef`)
+
+ baseline : anyOf(:class:`TextBaseline`, :class:`ExprRef`)
+ For text marks, the vertical text baseline. One of ``"alphabetic"`` (default),
+ ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, ``"line-bottom"``, or an
+ expression reference that provides one of the valid values. The ``"line-top"`` and
+ ``"line-bottom"`` values operate similarly to ``"top"`` and ``"bottom"``, but are
+ calculated relative to the ``lineHeight`` rather than ``fontSize`` alone.
+
+ For range marks, the vertical alignment of the marks. One of ``"top"``,
+ ``"middle"``, ``"bottom"``.
+
+ **Note:** Expression reference is *not* supported for range marks.
+ binSpacing : float
+ Offset between bars for binned field. The ideal value for this is either 0
+ (preferred by statisticians) or 1 (Vega-Lite default, D3 example style).
+
+ **Default value:** ``1``
+ blend : anyOf(:class:`Blend`, :class:`ExprRef`)
+
+ color : anyOf(:class:`Color`, :class:`Gradient`, :class:`ExprRef`)
+ Default color.
+
+ **Default value:** :raw-html:`<span style="color: #4682b4;">&#9632;</span>`
+ ``"#4682b4"``
+
+ **Note:** - This property cannot be used in a `style config
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. - The ``fill``
+ and ``stroke`` properties have higher precedence than ``color`` and will override
+ ``color``.
+ continuousBandSize : float
+ The default size of the bars on continuous scales.
+
+ **Default value:** ``5``
+ cornerRadius : anyOf(float, :class:`ExprRef`)
+
+ cornerRadiusBottomLeft : anyOf(float, :class:`ExprRef`)
+
+ cornerRadiusBottomRight : anyOf(float, :class:`ExprRef`)
+
+ cornerRadiusEnd : anyOf(float, :class:`ExprRef`)
+ * For vertical bars, top-left and top-right corner radius. - For horizontal bars,
+ top-right and bottom-right corner radius.
+ cornerRadiusTopLeft : anyOf(float, :class:`ExprRef`)
+
+ cornerRadiusTopRight : anyOf(float, :class:`ExprRef`)
+
+ cursor : anyOf(:class:`Cursor`, :class:`ExprRef`)
+
+ description : anyOf(string, :class:`ExprRef`)
+
+ dir : anyOf(:class:`TextDirection`, :class:`ExprRef`)
+
+ discreteBandSize : float
+ The default size of the bars with discrete dimensions. If unspecified, the default
+ size is ``step-2``, which provides 2 pixel offset between bars.
+ dx : anyOf(float, :class:`ExprRef`)
+
+ dy : anyOf(float, :class:`ExprRef`)
+
+ ellipsis : anyOf(string, :class:`ExprRef`)
+
+ endAngle : anyOf(float, :class:`ExprRef`)
+
+ fill : anyOf(:class:`Color`, :class:`Gradient`, None, :class:`ExprRef`)
+ Default fill color. This property has higher precedence than ``config.color``. Set
+ to ``null`` to remove fill.
+
+ **Default value:** (None)
+ fillOpacity : anyOf(float, :class:`ExprRef`)
+
+ filled : boolean
+ Whether the mark's color should be used as fill color instead of stroke color.
+
+ **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well
+ as ``geoshape`` marks for `graticule
+ <https://vega.github.io/vega-lite/docs/data.html#graticule>`__ data sources;
+ otherwise, ``true``.
+
+ **Note:** This property cannot be used in a `style config
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
+ font : anyOf(string, :class:`ExprRef`)
+
+ fontSize : anyOf(float, :class:`ExprRef`)
+
+ fontStyle : anyOf(:class:`FontStyle`, :class:`ExprRef`)
+
+ fontWeight : anyOf(:class:`FontWeight`, :class:`ExprRef`)
+
+ height : anyOf(float, :class:`ExprRef`)
+
+ href : anyOf(:class:`URI`, :class:`ExprRef`)
+
+ innerRadius : anyOf(float, :class:`ExprRef`)
+ The inner radius in pixels of arc marks. ``innerRadius`` is an alias for
+ ``radius2``.
+ interpolate : anyOf(:class:`Interpolate`, :class:`ExprRef`)
+
+ invalid : enum('filter', None)
+ Defines how Vega-Lite should handle marks for invalid values ( ``null`` and ``NaN``
+ ). - If set to ``"filter"`` (default), all data items with null values will be
+ skipped (for line, trail, and area marks) or filtered (for other marks). - If
+ ``null``, all data items are included. In this case, invalid values will be
+ interpreted as zeroes.
+ limit : anyOf(float, :class:`ExprRef`)
+
+ lineBreak : anyOf(string, :class:`ExprRef`)
+
+ lineHeight : anyOf(float, :class:`ExprRef`)
+
+ opacity : anyOf(float, :class:`ExprRef`)
+ The overall opacity (value between [0,1]).
+
+ **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,
+ ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.
+ order : anyOf(None, boolean)
+ For line and trail marks, this ``order`` property can be set to ``null`` or
+ ``false`` to make the lines use the original order in the data sources.
+ orient : :class:`Orientation`
+ The orientation of a non-stacked bar, tick, area, and line charts. The value is
+ either horizontal (default) or vertical. - For bar, rule and tick, this determines
+ whether the size of the bar and tick should be applied to x or y dimension. - For
+ area, this property determines the orient property of the Vega output. - For line
+ and trail marks, this property determines the sort order of the points in the line
+ if ``config.sortLineBy`` is not specified. For stacked charts, this is always
+ determined by the orientation of the stack; therefore explicitly specified value
+ will be ignored.
+ outerRadius : anyOf(float, :class:`ExprRef`)
+ The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``.
+ padAngle : anyOf(float, :class:`ExprRef`)
+
+ radius : anyOf(float, :class:`ExprRef`)
+ For arc mark, the primary (outer) radius in pixels.
+
+ For text marks, polar coordinate radial offset, in pixels, of the text from the
+ origin determined by the ``x`` and ``y`` properties.
+ radius2 : anyOf(float, :class:`ExprRef`)
+ The secondary (inner) radius in pixels of arc marks.
+ shape : anyOf(anyOf(:class:`SymbolShape`, string), :class:`ExprRef`)
+
+ size : anyOf(float, :class:`ExprRef`)
+ Default size for marks. - For ``point`` / ``circle`` / ``square``, this represents
+ the pixel area of the marks. Note that this value sets the area of the symbol; the
+ side lengths will increase with the square root of this value. - For ``bar``, this
+ represents the band size of the bar, in pixels. - For ``text``, this represents the
+ font size, in pixels.
+
+ **Default value:** - ``30`` for point, circle, square marks; width/height's ``step``
+ - ``2`` for bar marks with discrete dimensions; - ``5`` for bar marks with
+ continuous dimensions; - ``11`` for text marks.
+ smooth : anyOf(boolean, :class:`ExprRef`)
+
+ startAngle : anyOf(float, :class:`ExprRef`)
+
+ stroke : anyOf(:class:`Color`, :class:`Gradient`, None, :class:`ExprRef`)
+ Default stroke color. This property has higher precedence than ``config.color``. Set
+ to ``null`` to remove stroke.
+
+ **Default value:** (None)
+ strokeCap : anyOf(:class:`StrokeCap`, :class:`ExprRef`)
+
+ strokeDash : anyOf(List(float), :class:`ExprRef`)
+
+ strokeDashOffset : anyOf(float, :class:`ExprRef`)
+
+ strokeJoin : anyOf(:class:`StrokeJoin`, :class:`ExprRef`)
+
+ strokeMiterLimit : anyOf(float, :class:`ExprRef`)
+
+ strokeOffset : anyOf(float, :class:`ExprRef`)
+
+ strokeOpacity : anyOf(float, :class:`ExprRef`)
+
+ strokeWidth : anyOf(float, :class:`ExprRef`)
+
+ tension : anyOf(float, :class:`ExprRef`)
+
+ text : anyOf(:class:`Text`, :class:`ExprRef`)
+
+ theta : anyOf(float, :class:`ExprRef`)
+ For arc marks, the arc length in radians if theta2 is not specified, otherwise the
+ start arc angle. (A value of 0 indicates up or “north”, increasing values proceed
+ clockwise.)
+
+ For text marks, polar coordinate angle in radians.
+ theta2 : anyOf(float, :class:`ExprRef`)
+ The end angle of arc marks in radians. A value of 0 indicates up or “north”,
+ increasing values proceed clockwise.
+ timeUnitBand : float
+ Default relative band size for a time unit. If set to ``1``, the bandwidth of the
+ marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the
+ marks will be half of the time unit band step.
+ timeUnitBandPosition : float
+ Default relative band position for a time unit. If set to ``0``, the marks will be
+ positioned at the beginning of the time unit band step. If set to ``0.5``, the marks
+ will be positioned in the middle of the time unit band step.
+ tooltip : anyOf(float, string, boolean, :class:`TooltipContent`, :class:`ExprRef`, None)
+ The tooltip text string to show upon mouse hover or an object defining which fields
+ should the tooltip be derived from.
+
+
+ * If ``tooltip`` is ``true`` or ``{"content": "encoding"}``, then all fields from
+ ``encoding`` will be used. - If ``tooltip`` is ``{"content": "data"}``, then all
+ fields that appear in the highlighted data point will be used. - If set to
+ ``null`` or ``false``, then no tooltip will be used.
+
+ See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__
+ documentation for a detailed discussion about tooltip in Vega-Lite.
+
+ **Default value:** ``null``
+ url : anyOf(:class:`URI`, :class:`ExprRef`)
+
+ width : anyOf(float, :class:`ExprRef`)
+
+ x : anyOf(float, string, :class:`ExprRef`)
+ X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without
+ specified ``x2`` or ``width``.
+
+ The ``value`` of this channel can be a number or a string ``"width"`` for the width
+ of the plot.
+ x2 : anyOf(float, string, :class:`ExprRef`)
+ X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
+
+ The ``value`` of this channel can be a number or a string ``"width"`` for the width
+ of the plot.
+ y : anyOf(float, string, :class:`ExprRef`)
+ Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without
+ specified ``y2`` or ``height``.
+
+ The ``value`` of this channel can be a number or a string ``"height"`` for the
+ height of the plot.
+ y2 : anyOf(float, string, :class:`ExprRef`)
+ Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
+
+ The ``value`` of this channel can be a number or a string ``"height"`` for the
+ height of the plot.
+ """
+ _schema = {'$ref': '#/definitions/BarConfig'}
+
+ def __init__(self, align=Undefined, angle=Undefined, aria=Undefined, ariaRole=Undefined,
+ ariaRoleDescription=Undefined, aspect=Undefined, baseline=Undefined,
+ binSpacing=Undefined, blend=Undefined, color=Undefined, continuousBandSize=Undefined,
+ cornerRadius=Undefined, cornerRadiusBottomLeft=Undefined,
+ cornerRadiusBottomRight=Undefined, cornerRadiusEnd=Undefined,
+ cornerRadiusTopLeft=Undefined, cornerRadiusTopRight=Undefined, cursor=Undefined,
+ description=Undefined, dir=Undefined, discreteBandSize=Undefined, dx=Undefined,
+ dy=Undefined, ellipsis=Undefined, endAngle=Undefined, fill=Undefined,
+ fillOpacity=Undefined, filled=Undefined, font=Undefined, fontSize=Undefined,
+ fontStyle=Undefined, fontWeight=Undefined, height=Undefined, href=Undefined,
+ innerRadius=Undefined, interpolate=Undefined, invalid=Undefined, limit=Undefined,
+ lineBreak=Undefined, lineHeight=Undefined, opacity=Undefined, order=Undefined,
+ orient=Undefined, outerRadius=Undefined, padAngle=Undefined, radius=Undefined,
+ radius2=Undefined, shape=Undefined, size=Undefined, smooth=Undefined,
+ startAngle=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined,
+ strokeDashOffset=Undefined, strokeJoin=Undefined, strokeMiterLimit=Undefined,
+ strokeOffset=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined,
+ tension=Undefined, text=Undefined, theta=Undefined, theta2=Undefined,
+ timeUnitBand=Undefined, timeUnitBandPosition=Undefined, tooltip=Undefined,
+ url=Undefined, width=Undefined, x=Undefined, x2=Undefined, y=Undefined, y2=Undefined,
+ **kwds):
+ super(BarConfig, self).__init__(align=align, angle=angle, aria=aria, ariaRole=ariaRole,
+ ariaRoleDescription=ariaRoleDescription, aspect=aspect,
+ baseline=baseline, binSpacing=binSpacing, blend=blend,
+ color=color, continuousBandSize=continuousBandSize,
+ cornerRadius=cornerRadius,
+ cornerRadiusBottomLeft=cornerRadiusBottomLeft,
+ cornerRadiusBottomRight=cornerRadiusBottomRight,
+ cornerRadiusEnd=cornerRadiusEnd,
+ cornerRadiusTopLeft=cornerRadiusTopLeft,
+ cornerRadiusTopRight=cornerRadiusTopRight, cursor=cursor,
+ description=description, dir=dir,
+ discreteBandSize=discreteBandSize, dx=dx, dy=dy,
+ ellipsis=ellipsis, endAngle=endAngle, fill=fill,
+ fillOpacity=fillOpacity, filled=filled, font=font,
+ fontSize=fontSize, fontStyle=fontStyle, fontWeight=fontWeight,
+ height=height, href=href, innerRadius=innerRadius,
+ interpolate=interpolate, invalid=invalid, limit=limit,
+ lineBreak=lineBreak, lineHeight=lineHeight, opacity=opacity,
+ order=order, orient=orient, outerRadius=outerRadius,
+ padAngle=padAngle, radius=radius, radius2=radius2, shape=shape,
+ size=size, smooth=smooth, startAngle=startAngle, stroke=stroke,
+ strokeCap=strokeCap, strokeDash=strokeDash,
+ strokeDashOffset=strokeDashOffset, strokeJoin=strokeJoin,
+ strokeMiterLimit=strokeMiterLimit, strokeOffset=strokeOffset,
+ strokeOpacity=strokeOpacity, strokeWidth=strokeWidth,
+ tension=tension, text=text, theta=theta, theta2=theta2,
+ timeUnitBand=timeUnitBand,
+ timeUnitBandPosition=timeUnitBandPosition, tooltip=tooltip,
+ url=url, width=width, x=x, x2=x2, y=y, y2=y2, **kwds)
+
+
+class BaseTitleNoValueRefs(VegaLiteSchema):
+ """BaseTitleNoValueRefs schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ align : :class:`Align`
+ Horizontal text alignment for title text. One of ``"left"``, ``"center"``, or
+ ``"right"``.
+ anchor : anyOf(:class:`TitleAnchor`, :class:`ExprRef`)
+
+ angle : anyOf(float, :class:`ExprRef`)
+
+ aria : anyOf(boolean, :class:`ExprRef`)
+
+ baseline : :class:`TextBaseline`
+ Vertical text baseline for title and subtitle text. One of ``"alphabetic"``
+ (default), ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, or
+ ``"line-bottom"``. The ``"line-top"`` and ``"line-bottom"`` values operate similarly
+ to ``"top"`` and ``"bottom"``, but are calculated relative to the *lineHeight*
+ rather than *fontSize* alone.
+ color : anyOf(anyOf(None, :class:`Color`), :class:`ExprRef`)
+
+ dx : anyOf(float, :class:`ExprRef`)
+
+ dy : anyOf(float, :class:`ExprRef`)
+
+ font : anyOf(string, :class:`ExprRef`)
+
+ fontSize : anyOf(float, :class:`ExprRef`)
+
+ fontStyle : anyOf(:class:`FontStyle`, :class:`ExprRef`)
+
+ fontWeight : anyOf(:class:`FontWeight`, :class:`ExprRef`)
+
+ frame : anyOf(anyOf(:class:`TitleFrame`, string), :class:`ExprRef`)
+
+ limit : anyOf(float, :class:`ExprRef`)
+
+ lineHeight : anyOf(float, :class:`ExprRef`)
+
+ offset : anyOf(float, :class:`ExprRef`)
+
+ orient : anyOf(:class:`TitleOrient`, :class:`ExprRef`)
+
+ subtitleColor : anyOf(anyOf(None, :class:`Color`), :class:`ExprRef`)
+
+ subtitleFont : anyOf(string, :class:`ExprRef`)
+
+ subtitleFontSize : anyOf(float, :class:`ExprRef`)
+
+ subtitleFontStyle : anyOf(:class:`FontStyle`, :class:`ExprRef`)
+
+ subtitleFontWeight : anyOf(:class:`FontWeight`, :class:`ExprRef`)
+
+ subtitleLineHeight : anyOf(float, :class:`ExprRef`)
+
+ subtitlePadding : anyOf(float, :class:`ExprRef`)
+
+ zindex : anyOf(float, :class:`ExprRef`)
+
+ """
+ _schema = {'$ref': '#/definitions/BaseTitleNoValueRefs'}
+
+ def __init__(self, align=Undefined, anchor=Undefined, angle=Undefined, aria=Undefined,
+ baseline=Undefined, color=Undefined, dx=Undefined, dy=Undefined, font=Undefined,
+ fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined, frame=Undefined,
+ limit=Undefined, lineHeight=Undefined, offset=Undefined, orient=Undefined,
+ subtitleColor=Undefined, subtitleFont=Undefined, subtitleFontSize=Undefined,
+ subtitleFontStyle=Undefined, subtitleFontWeight=Undefined,
+ subtitleLineHeight=Undefined, subtitlePadding=Undefined, zindex=Undefined, **kwds):
+ super(BaseTitleNoValueRefs, self).__init__(align=align, anchor=anchor, angle=angle, aria=aria,
+ baseline=baseline, color=color, dx=dx, dy=dy,
+ font=font, fontSize=fontSize, fontStyle=fontStyle,
+ fontWeight=fontWeight, frame=frame, limit=limit,
+ lineHeight=lineHeight, offset=offset, orient=orient,
+ subtitleColor=subtitleColor,
+ subtitleFont=subtitleFont,
+ subtitleFontSize=subtitleFontSize,
+ subtitleFontStyle=subtitleFontStyle,
+ subtitleFontWeight=subtitleFontWeight,
+ subtitleLineHeight=subtitleLineHeight,
+ subtitlePadding=subtitlePadding, zindex=zindex,
+ **kwds)
+
+
+class BinExtent(VegaLiteSchema):
+ """BinExtent schema wrapper
+
+ anyOf(List([float, float]), :class:`SelectionExtent`)
+ """
+ _schema = {'$ref': '#/definitions/BinExtent'}
+
+ def __init__(self, *args, **kwds):
+ super(BinExtent, self).__init__(*args, **kwds)
+
+
+class BinParams(VegaLiteSchema):
+ """BinParams schema wrapper
+
+ Mapping(required=[])
+ Binning properties or boolean flag for determining whether to bin data or not.
+
+ Attributes
+ ----------
+
+ anchor : float
+ A value in the binned domain at which to anchor the bins, shifting the bin
+ boundaries if necessary to ensure that a boundary aligns with the anchor value.
+
+ **Default value:** the minimum bin extent value
+ base : float
+ The number base to use for automatic bin determination (default is base 10).
+
+ **Default value:** ``10``
+ binned : boolean
+ When set to ``true``, Vega-Lite treats the input data as already binned.
+ divide : List([float, float])
+ Scale factors indicating allowable subdivisions. The default value is [5, 2], which
+ indicates that for base 10 numbers (the default base), the method may consider
+ dividing bin sizes by 5 and/or 2. For example, for an initial step size of 10, the
+ method can check if bin sizes of 2 (= 10/5), 5 (= 10/2), or 1 (= 10/(5*2)) might
+ also satisfy the given constraints.
+
+ **Default value:** ``[5, 2]``
+ extent : :class:`BinExtent`
+ A two-element ( ``[min, max]`` ) array indicating the range of desired bin values.
+ maxbins : float
+ Maximum number of bins.
+
+ **Default value:** ``6`` for ``row``, ``column`` and ``shape`` channels; ``10`` for
+ other channels
+ minstep : float
+ A minimum allowable step size (particularly useful for integer values).
+ nice : boolean
+ If true, attempts to make the bin boundaries use human-friendly boundaries, such as
+ multiples of ten.
+
+ **Default value:** ``true``
+ step : float
+ An exact step size to use between bins.
+
+ **Note:** If provided, options such as maxbins will be ignored.
+ steps : List(float)
+ An array of allowable step sizes to choose from.
+ """
+ _schema = {'$ref': '#/definitions/BinParams'}
+
+ def __init__(self, anchor=Undefined, base=Undefined, binned=Undefined, divide=Undefined,
+ extent=Undefined, maxbins=Undefined, minstep=Undefined, nice=Undefined, step=Undefined,
+ steps=Undefined, **kwds):
+ super(BinParams, self).__init__(anchor=anchor, base=base, binned=binned, divide=divide,
+ extent=extent, maxbins=maxbins, minstep=minstep, nice=nice,
+ step=step, steps=steps, **kwds)
+
+
+class Binding(VegaLiteSchema):
+ """Binding schema wrapper
+
+ anyOf(:class:`BindCheckbox`, :class:`BindRadioSelect`, :class:`BindRange`,
+ :class:`InputBinding`)
+ """
+ _schema = {'$ref': '#/definitions/Binding'}
+
+ def __init__(self, *args, **kwds):
+ super(Binding, self).__init__(*args, **kwds)
+
+
+class BindCheckbox(Binding):
+ """BindCheckbox schema wrapper
+
+ Mapping(required=[input])
+
+ Attributes
+ ----------
+
+ input : string
+
+ debounce : float
+
+ element : :class:`Element`
+
+ name : string
+
+ type : string
+
+ """
+ _schema = {'$ref': '#/definitions/BindCheckbox'}
+
+ def __init__(self, input=Undefined, debounce=Undefined, element=Undefined, name=Undefined,
+ type=Undefined, **kwds):
+ super(BindCheckbox, self).__init__(input=input, debounce=debounce, element=element, name=name,
+ type=type, **kwds)
+
+
+class BindRadioSelect(Binding):
+ """BindRadioSelect schema wrapper
+
+ Mapping(required=[input, options])
+
+ Attributes
+ ----------
+
+ input : enum('radio', 'select')
+
+ options : List(Any)
+
+ debounce : float
+
+ element : :class:`Element`
+
+ labels : List(string)
+
+ name : string
+
+ type : string
+
+ """
+ _schema = {'$ref': '#/definitions/BindRadioSelect'}
+
+ def __init__(self, input=Undefined, options=Undefined, debounce=Undefined, element=Undefined,
+ labels=Undefined, name=Undefined, type=Undefined, **kwds):
+ super(BindRadioSelect, self).__init__(input=input, options=options, debounce=debounce,
+ element=element, labels=labels, name=name, type=type,
+ **kwds)
+
+
+class BindRange(Binding):
+ """BindRange schema wrapper
+
+ Mapping(required=[input])
+
+ Attributes
+ ----------
+
+ input : string
+
+ debounce : float
+
+ element : :class:`Element`
+
+ max : float
+
+ min : float
+
+ name : string
+
+ step : float
+
+ type : string
+
+ """
+ _schema = {'$ref': '#/definitions/BindRange'}
+
+ def __init__(self, input=Undefined, debounce=Undefined, element=Undefined, max=Undefined,
+ min=Undefined, name=Undefined, step=Undefined, type=Undefined, **kwds):
+ super(BindRange, self).__init__(input=input, debounce=debounce, element=element, max=max,
+ min=min, name=name, step=step, type=type, **kwds)
+
+
+class Blend(VegaLiteSchema):
+ """Blend schema wrapper
+
+ enum(None, 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge',
+ 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation',
+ 'color', 'luminosity')
+ """
+ _schema = {'$ref': '#/definitions/Blend'}
+
+ def __init__(self, *args):
+ super(Blend, self).__init__(*args)
+
+
+class BoxPlotConfig(VegaLiteSchema):
+ """BoxPlotConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ box : anyOf(boolean, :class:`MarkConfigExprOrSignalRef`)
+
+ extent : anyOf(string, float)
+ The extent of the whiskers. Available options include: - ``"min-max"`` : min and max
+ are the lower and upper whiskers respectively. - A number representing multiple of
+ the interquartile range. This number will be multiplied by the IQR to determine
+ whisker boundary, which spans from the smallest data to the largest data within the
+ range *[Q1 - k * IQR, Q3 + k * IQR]* where *Q1* and *Q3* are the first and third
+ quartiles while *IQR* is the interquartile range ( *Q3-Q1* ).
+
+ **Default value:** ``1.5``.
+ median : anyOf(boolean, :class:`MarkConfigExprOrSignalRef`)
+
+ outliers : anyOf(boolean, :class:`MarkConfigExprOrSignalRef`)
+
+ rule : anyOf(boolean, :class:`MarkConfigExprOrSignalRef`)
+
+ size : float
+ Size of the box and median tick of a box plot
+ ticks : anyOf(boolean, :class:`MarkConfigExprOrSignalRef`)
+
+ """
+ _schema = {'$ref': '#/definitions/BoxPlotConfig'}
+
+ def __init__(self, box=Undefined, extent=Undefined, median=Undefined, outliers=Undefined,
+ rule=Undefined, size=Undefined, ticks=Undefined, **kwds):
+ super(BoxPlotConfig, self).__init__(box=box, extent=extent, median=median, outliers=outliers,
+ rule=rule, size=size, ticks=ticks, **kwds)
+
+
+class BrushConfig(VegaLiteSchema):
+ """BrushConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ cursor : :class:`Cursor`
+ The mouse cursor used over the interval mark. Any valid `CSS cursor type
+ <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.
+ fill : :class:`Color`
+ The fill color of the interval mark.
+
+ **Default value:** ``"#333333"``
+ fillOpacity : float
+ The fill opacity of the interval mark (a value between ``0`` and ``1`` ).
+
+ **Default value:** ``0.125``
+ stroke : :class:`Color`
+ The stroke color of the interval mark.
+
+ **Default value:** ``"#ffffff"``
+ strokeDash : List(float)
+ An array of alternating stroke and space lengths, for creating dashed or dotted
+ lines.
+ strokeDashOffset : float
+ The offset (in pixels) with which to begin drawing the stroke dash array.
+ strokeOpacity : float
+ The stroke opacity of the interval mark (a value between ``0`` and ``1`` ).
+ strokeWidth : float
+ The stroke width of the interval mark.
+ """
+ _schema = {'$ref': '#/definitions/BrushConfig'}
+
+ def __init__(self, cursor=Undefined, fill=Undefined, fillOpacity=Undefined, stroke=Undefined,
+ strokeDash=Undefined, strokeDashOffset=Undefined, strokeOpacity=Undefined,
+ strokeWidth=Undefined, **kwds):
+ super(BrushConfig, self).__init__(cursor=cursor, fill=fill, fillOpacity=fillOpacity,
+ stroke=stroke, strokeDash=strokeDash,
+ strokeDashOffset=strokeDashOffset,
+ strokeOpacity=strokeOpacity, strokeWidth=strokeWidth, **kwds)
+
+
+class Color(VegaLiteSchema):
+ """Color schema wrapper
+
+ anyOf(:class:`ColorName`, :class:`HexColor`, string)
+ """
+ _schema = {'$ref': '#/definitions/Color'}
+
+ def __init__(self, *args, **kwds):
+ super(Color, self).__init__(*args, **kwds)
+
+
+class ColorDef(VegaLiteSchema):
+ """ColorDef schema wrapper
+
+ anyOf(:class:`FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull`,
+ :class:`FieldOrDatumDefWithConditionDatumDefGradientstringnull`,
+ :class:`ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull`)
+ """
+ _schema = {'$ref': '#/definitions/ColorDef'}
+
+ def __init__(self, *args, **kwds):
+ super(ColorDef, self).__init__(*args, **kwds)
+
+
+class ColorName(Color):
+ """ColorName schema wrapper
+
+ enum('black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green',
+ 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue',
+ 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet',
+ 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue',
+ 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray',
+ 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange',
+ 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray',
+ 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray',
+ 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro',
+ 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink',
+ 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen',
+ 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray',
+ 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue',
+ 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen',
+ 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple',
+ 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise',
+ 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite',
+ 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen',
+ 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum',
+ 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen',
+ 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow',
+ 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat',
+ 'whitesmoke', 'yellowgreen', 'rebeccapurple')
+ """
+ _schema = {'$ref': '#/definitions/ColorName'}
+
+ def __init__(self, *args):
+ super(ColorName, self).__init__(*args)
+
+
+class ColorScheme(VegaLiteSchema):
+ """ColorScheme schema wrapper
+
+ anyOf(:class:`Categorical`, :class:`SequentialSingleHue`, :class:`SequentialMultiHue`,
+ :class:`Diverging`, :class:`Cyclical`)
+ """
+ _schema = {'$ref': '#/definitions/ColorScheme'}
+
+ def __init__(self, *args, **kwds):
+ super(ColorScheme, self).__init__(*args, **kwds)
+
+
+class Categorical(ColorScheme):
+ """Categorical schema wrapper
+
+ enum('accent', 'category10', 'category20', 'category20b', 'category20c', 'dark2', 'paired',
+ 'pastel1', 'pastel2', 'set1', 'set2', 'set3', 'tableau10', 'tableau20')
+ """
+ _schema = {'$ref': '#/definitions/Categorical'}
+
+ def __init__(self, *args):
+ super(Categorical, self).__init__(*args)
+
+
+class CompositeMark(AnyMark):
+ """CompositeMark schema wrapper
+
+ anyOf(:class:`BoxPlot`, :class:`ErrorBar`, :class:`ErrorBand`)
+ """
+ _schema = {'$ref': '#/definitions/CompositeMark'}
+
+ def __init__(self, *args, **kwds):
+ super(CompositeMark, self).__init__(*args, **kwds)
+
+
+class BoxPlot(CompositeMark):
+ """BoxPlot schema wrapper
+
+ string
+ """
+ _schema = {'$ref': '#/definitions/BoxPlot'}
+
+ def __init__(self, *args):
+ super(BoxPlot, self).__init__(*args)
+
+
+class CompositeMarkDef(AnyMark):
+ """CompositeMarkDef schema wrapper
+
+ anyOf(:class:`BoxPlotDef`, :class:`ErrorBarDef`, :class:`ErrorBandDef`)
+ """
+ _schema = {'$ref': '#/definitions/CompositeMarkDef'}
+
+ def __init__(self, *args, **kwds):
+ super(CompositeMarkDef, self).__init__(*args, **kwds)
+
+
+class BoxPlotDef(CompositeMarkDef):
+ """BoxPlotDef schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : :class:`BoxPlot`
+ The mark type. This could a primitive mark type (one of ``"bar"``, ``"circle"``,
+ ``"square"``, ``"tick"``, ``"line"``, ``"area"``, ``"point"``, ``"geoshape"``,
+ ``"rule"``, and ``"text"`` ) or a composite mark type ( ``"boxplot"``,
+ ``"errorband"``, ``"errorbar"`` ).
+ box : anyOf(boolean, :class:`MarkConfigExprOrSignalRef`)
+
+ clip : boolean
+ Whether a composite mark be clipped to the enclosing group’s width and height.
+ color : anyOf(:class:`Color`, :class:`Gradient`, :class:`ExprRef`)
+ Default color.
+
+ **Default value:** :raw-html:`<span style="color: #4682b4;">&#9632;</span>`
+ ``"#4682b4"``
+
+ **Note:** - This property cannot be used in a `style config
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. - The ``fill``
+ and ``stroke`` properties have higher precedence than ``color`` and will override
+ ``color``.
+ extent : anyOf(string, float)
+ The extent of the whiskers. Available options include: - ``"min-max"`` : min and max
+ are the lower and upper whiskers respectively. - A number representing multiple of
+ the interquartile range. This number will be multiplied by the IQR to determine
+ whisker boundary, which spans from the smallest data to the largest data within the
+ range *[Q1 - k * IQR, Q3 + k * IQR]* where *Q1* and *Q3* are the first and third
+ quartiles while *IQR* is the interquartile range ( *Q3-Q1* ).
+
+ **Default value:** ``1.5``.
+ median : anyOf(boolean, :class:`MarkConfigExprOrSignalRef`)
+
+ opacity : float
+ The opacity (value between [0,1]) of the mark.
+ orient : :class:`Orientation`
+ Orientation of the box plot. This is normally automatically determined based on
+ types of fields on x and y channels. However, an explicit ``orient`` be specified
+ when the orientation is ambiguous.
+
+ **Default value:** ``"vertical"``.
+ outliers : anyOf(boolean, :class:`MarkConfigExprOrSignalRef`)
+
+ rule : anyOf(boolean, :class:`MarkConfigExprOrSignalRef`)
+
+ size : float
+ Size of the box and median tick of a box plot
+ ticks : anyOf(boolean, :class:`MarkConfigExprOrSignalRef`)
+
+ """
+ _schema = {'$ref': '#/definitions/BoxPlotDef'}
+
+ def __init__(self, type=Undefined, box=Undefined, clip=Undefined, color=Undefined, extent=Undefined,
+ median=Undefined, opacity=Undefined, orient=Undefined, outliers=Undefined,
+ rule=Undefined, size=Undefined, ticks=Undefined, **kwds):
+ super(BoxPlotDef, self).__init__(type=type, box=box, clip=clip, color=color, extent=extent,
+ median=median, opacity=opacity, orient=orient,
+ outliers=outliers, rule=rule, size=size, ticks=ticks, **kwds)
+
+
+class CompositionConfig(VegaLiteSchema):
+ """CompositionConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ columns : float
+ The number of columns to include in the view composition layout.
+
+ **Default value** : ``undefined`` -- An infinite number of columns (a single row)
+ will be assumed. This is equivalent to ``hconcat`` (for ``concat`` ) and to using
+ the ``column`` channel (for ``facet`` and ``repeat`` ).
+
+ **Note** :
+
+ 1) This property is only for: - the general (wrappable) ``concat`` operator (not
+ ``hconcat`` / ``vconcat`` ) - the ``facet`` and ``repeat`` operator with one
+ field/repetition definition (without row/column nesting)
+
+ 2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat`` )
+ and to using the ``row`` channel (for ``facet`` and ``repeat`` ).
+ spacing : float
+ The default spacing in pixels between composed sub-views.
+
+ **Default value** : ``20``
+ """
+ _schema = {'$ref': '#/definitions/CompositionConfig'}
+
+ def __init__(self, columns=Undefined, spacing=Undefined, **kwds):
+ super(CompositionConfig, self).__init__(columns=columns, spacing=spacing, **kwds)
+
+
+class ConditionalAxisColor(VegaLiteSchema):
+ """ConditionalAxisColor schema wrapper
+
+ anyOf(Mapping(required=[condition, value]), Mapping(required=[condition, expr]))
+ """
+ _schema = {'$ref': '#/definitions/ConditionalAxisColor'}
+
+ def __init__(self, *args, **kwds):
+ super(ConditionalAxisColor, self).__init__(*args, **kwds)
+
+
+class ConditionalAxisLabelAlign(VegaLiteSchema):
+ """ConditionalAxisLabelAlign schema wrapper
+
+ anyOf(Mapping(required=[condition, value]), Mapping(required=[condition, expr]))
+ """
+ _schema = {'$ref': '#/definitions/ConditionalAxisLabelAlign'}
+
+ def __init__(self, *args, **kwds):
+ super(ConditionalAxisLabelAlign, self).__init__(*args, **kwds)
+
+
+class ConditionalAxisLabelBaseline(VegaLiteSchema):
+ """ConditionalAxisLabelBaseline schema wrapper
+
+ anyOf(Mapping(required=[condition, value]), Mapping(required=[condition, expr]))
+ """
+ _schema = {'$ref': '#/definitions/ConditionalAxisLabelBaseline'}
+
+ def __init__(self, *args, **kwds):
+ super(ConditionalAxisLabelBaseline, self).__init__(*args, **kwds)
+
+
+class ConditionalAxisLabelFontStyle(VegaLiteSchema):
+ """ConditionalAxisLabelFontStyle schema wrapper
+
+ anyOf(Mapping(required=[condition, value]), Mapping(required=[condition, expr]))
+ """
+ _schema = {'$ref': '#/definitions/ConditionalAxisLabelFontStyle'}
+
+ def __init__(self, *args, **kwds):
+ super(ConditionalAxisLabelFontStyle, self).__init__(*args, **kwds)
+
+
+class ConditionalAxisLabelFontWeight(VegaLiteSchema):
+ """ConditionalAxisLabelFontWeight schema wrapper
+
+ anyOf(Mapping(required=[condition, value]), Mapping(required=[condition, expr]))
+ """
+ _schema = {'$ref': '#/definitions/ConditionalAxisLabelFontWeight'}
+
+ def __init__(self, *args, **kwds):
+ super(ConditionalAxisLabelFontWeight, self).__init__(*args, **kwds)
+
+
+class ConditionalAxisNumber(VegaLiteSchema):
+ """ConditionalAxisNumber schema wrapper
+
+ anyOf(Mapping(required=[condition, value]), Mapping(required=[condition, expr]))
+ """
+ _schema = {'$ref': '#/definitions/ConditionalAxisNumber'}
+
+ def __init__(self, *args, **kwds):
+ super(ConditionalAxisNumber, self).__init__(*args, **kwds)
+
+
+class ConditionalAxisNumberArray(VegaLiteSchema):
+ """ConditionalAxisNumberArray schema wrapper
+
+ anyOf(Mapping(required=[condition, value]), Mapping(required=[condition, expr]))
+ """
+ _schema = {'$ref': '#/definitions/ConditionalAxisNumberArray'}
+
+ def __init__(self, *args, **kwds):
+ super(ConditionalAxisNumberArray, self).__init__(*args, **kwds)
+
+
+class ConditionalAxisPropertyAlignnull(VegaLiteSchema):
+ """ConditionalAxisPropertyAlignnull schema wrapper
+
+ anyOf(Mapping(required=[condition, value]), Mapping(required=[condition, expr]))
+ """
+ _schema = {'$ref': '#/definitions/ConditionalAxisProperty<(Align|null)>'}
+
+ def __init__(self, *args, **kwds):
+ super(ConditionalAxisPropertyAlignnull, self).__init__(*args, **kwds)
+
+
+class ConditionalAxisPropertyColornull(VegaLiteSchema):
+ """ConditionalAxisPropertyColornull schema wrapper
+
+ anyOf(Mapping(required=[condition, value]), Mapping(required=[condition, expr]))
+ """
+ _schema = {'$ref': '#/definitions/ConditionalAxisProperty<(Color|null)>'}
+
+ def __init__(self, *args, **kwds):
+ super(ConditionalAxisPropertyColornull, self).__init__(*args, **kwds)
+
+
+class ConditionalAxisPropertyFontStylenull(VegaLiteSchema):
+ """ConditionalAxisPropertyFontStylenull schema wrapper
+
+ anyOf(Mapping(required=[condition, value]), Mapping(required=[condition, expr]))
+ """
+ _schema = {'$ref': '#/definitions/ConditionalAxisProperty<(FontStyle|null)>'}
+
+ def __init__(self, *args, **kwds):
+ super(ConditionalAxisPropertyFontStylenull, self).__init__(*args, **kwds)
+
+
+class ConditionalAxisPropertyFontWeightnull(VegaLiteSchema):
+ """ConditionalAxisPropertyFontWeightnull schema wrapper
+
+ anyOf(Mapping(required=[condition, value]), Mapping(required=[condition, expr]))
+ """
+ _schema = {'$ref': '#/definitions/ConditionalAxisProperty<(FontWeight|null)>'}
+
+ def __init__(self, *args, **kwds):
+ super(ConditionalAxisPropertyFontWeightnull, self).__init__(*args, **kwds)
+
+
+class ConditionalAxisPropertyTextBaselinenull(VegaLiteSchema):
+ """ConditionalAxisPropertyTextBaselinenull schema wrapper
+
+ anyOf(Mapping(required=[condition, value]), Mapping(required=[condition, expr]))
+ """
+ _schema = {'$ref': '#/definitions/ConditionalAxisProperty<(TextBaseline|null)>'}
+
+ def __init__(self, *args, **kwds):
+ super(ConditionalAxisPropertyTextBaselinenull, self).__init__(*args, **kwds)
+
+
+class ConditionalAxisPropertynumberArraynull(VegaLiteSchema):
+ """ConditionalAxisPropertynumberArraynull schema wrapper
+
+ anyOf(Mapping(required=[condition, value]), Mapping(required=[condition, expr]))
+ """
+ _schema = {'$ref': '#/definitions/ConditionalAxisProperty<(number[]|null)>'}
+
+ def __init__(self, *args, **kwds):
+ super(ConditionalAxisPropertynumberArraynull, self).__init__(*args, **kwds)
+
+
+class ConditionalAxisPropertynumbernull(VegaLiteSchema):
+ """ConditionalAxisPropertynumbernull schema wrapper
+
+ anyOf(Mapping(required=[condition, value]), Mapping(required=[condition, expr]))
+ """
+ _schema = {'$ref': '#/definitions/ConditionalAxisProperty<(number|null)>'}
+
+ def __init__(self, *args, **kwds):
+ super(ConditionalAxisPropertynumbernull, self).__init__(*args, **kwds)
+
+
+class ConditionalAxisPropertystringnull(VegaLiteSchema):
+ """ConditionalAxisPropertystringnull schema wrapper
+
+ anyOf(Mapping(required=[condition, value]), Mapping(required=[condition, expr]))
+ """
+ _schema = {'$ref': '#/definitions/ConditionalAxisProperty<(string|null)>'}
+
+ def __init__(self, *args, **kwds):
+ super(ConditionalAxisPropertystringnull, self).__init__(*args, **kwds)
+
+
+class ConditionalAxisString(VegaLiteSchema):
+ """ConditionalAxisString schema wrapper
+
+ anyOf(Mapping(required=[condition, value]), Mapping(required=[condition, expr]))
+ """
+ _schema = {'$ref': '#/definitions/ConditionalAxisString'}
+
+ def __init__(self, *args, **kwds):
+ super(ConditionalAxisString, self).__init__(*args, **kwds)
+
+
+class ConditionalMarkPropFieldOrDatumDef(VegaLiteSchema):
+ """ConditionalMarkPropFieldOrDatumDef schema wrapper
+
+ anyOf(:class:`ConditionalPredicateMarkPropFieldOrDatumDef`,
+ :class:`ConditionalSelectionMarkPropFieldOrDatumDef`)
+ """
+ _schema = {'$ref': '#/definitions/ConditionalMarkPropFieldOrDatumDef'}
+
+ def __init__(self, *args, **kwds):
+ super(ConditionalMarkPropFieldOrDatumDef, self).__init__(*args, **kwds)
+
+
+class ConditionalMarkPropFieldOrDatumDefTypeForShape(VegaLiteSchema):
+ """ConditionalMarkPropFieldOrDatumDefTypeForShape schema wrapper
+
+ anyOf(:class:`ConditionalPredicateMarkPropFieldOrDatumDefTypeForShape`,
+ :class:`ConditionalSelectionMarkPropFieldOrDatumDefTypeForShape`)
+ """
+ _schema = {'$ref': '#/definitions/ConditionalMarkPropFieldOrDatumDef<TypeForShape>'}
+
+ def __init__(self, *args, **kwds):
+ super(ConditionalMarkPropFieldOrDatumDefTypeForShape, self).__init__(*args, **kwds)
+
+
+class ConditionalPredicateMarkPropFieldOrDatumDef(ConditionalMarkPropFieldOrDatumDef):
+ """ConditionalPredicateMarkPropFieldOrDatumDef schema wrapper
+
+ anyOf(Mapping(required=[test]), Mapping(required=[test]))
+ """
+ _schema = {'$ref': '#/definitions/ConditionalPredicate<MarkPropFieldOrDatumDef>'}
+
+ def __init__(self, *args, **kwds):
+ super(ConditionalPredicateMarkPropFieldOrDatumDef, self).__init__(*args, **kwds)
+
+
+class ConditionalPredicateMarkPropFieldOrDatumDefTypeForShape(ConditionalMarkPropFieldOrDatumDefTypeForShape):
+ """ConditionalPredicateMarkPropFieldOrDatumDefTypeForShape schema wrapper
+
+ anyOf(Mapping(required=[test]), Mapping(required=[test]))
+ """
+ _schema = {'$ref': '#/definitions/ConditionalPredicate<MarkPropFieldOrDatumDef<TypeForShape>>'}
+
+ def __init__(self, *args, **kwds):
+ super(ConditionalPredicateMarkPropFieldOrDatumDefTypeForShape, self).__init__(*args, **kwds)
+
+
+class ConditionalPredicateValueDefAlignnullExprRef(VegaLiteSchema):
+ """ConditionalPredicateValueDefAlignnullExprRef schema wrapper
+
+ anyOf(Mapping(required=[test, value]), Mapping(required=[expr, test]))
+ """
+ _schema = {'$ref': '#/definitions/ConditionalPredicate<(ValueDef<(Align|null)>|ExprRef)>'}
+
+ def __init__(self, *args, **kwds):
+ super(ConditionalPredicateValueDefAlignnullExprRef, self).__init__(*args, **kwds)
+
+
+class ConditionalPredicateValueDefColornullExprRef(VegaLiteSchema):
+ """ConditionalPredicateValueDefColornullExprRef schema wrapper
+
+ anyOf(Mapping(required=[test, value]), Mapping(required=[expr, test]))
+ """
+ _schema = {'$ref': '#/definitions/ConditionalPredicate<(ValueDef<(Color|null)>|ExprRef)>'}
+
+ def __init__(self, *args, **kwds):
+ super(ConditionalPredicateValueDefColornullExprRef, self).__init__(*args, **kwds)
+
+
+class ConditionalPredicateValueDefFontStylenullExprRef(VegaLiteSchema):
+ """ConditionalPredicateValueDefFontStylenullExprRef schema wrapper
+
+ anyOf(Mapping(required=[test, value]), Mapping(required=[expr, test]))
+ """
+ _schema = {'$ref': '#/definitions/ConditionalPredicate<(ValueDef<(FontStyle|null)>|ExprRef)>'}
+
+ def __init__(self, *args, **kwds):
+ super(ConditionalPredicateValueDefFontStylenullExprRef, self).__init__(*args, **kwds)
+
+
+class ConditionalPredicateValueDefFontWeightnullExprRef(VegaLiteSchema):
+ """ConditionalPredicateValueDefFontWeightnullExprRef schema wrapper
+
+ anyOf(Mapping(required=[test, value]), Mapping(required=[expr, test]))
+ """
+ _schema = {'$ref': '#/definitions/ConditionalPredicate<(ValueDef<(FontWeight|null)>|ExprRef)>'}
+
+ def __init__(self, *args, **kwds):
+ super(ConditionalPredicateValueDefFontWeightnullExprRef, self).__init__(*args, **kwds)
+
+
+class ConditionalPredicateValueDefTextBaselinenullExprRef(VegaLiteSchema):
+ """ConditionalPredicateValueDefTextBaselinenullExprRef schema wrapper
+
+ anyOf(Mapping(required=[test, value]), Mapping(required=[expr, test]))
+ """
+ _schema = {'$ref': '#/definitions/ConditionalPredicate<(ValueDef<(TextBaseline|null)>|ExprRef)>'}
+
+ def __init__(self, *args, **kwds):
+ super(ConditionalPredicateValueDefTextBaselinenullExprRef, self).__init__(*args, **kwds)
+
+
+class ConditionalPredicateValueDefnumberArraynullExprRef(VegaLiteSchema):
+ """ConditionalPredicateValueDefnumberArraynullExprRef schema wrapper
+
+ anyOf(Mapping(required=[test, value]), Mapping(required=[expr, test]))
+ """
+ _schema = {'$ref': '#/definitions/ConditionalPredicate<(ValueDef<(number[]|null)>|ExprRef)>'}
+
+ def __init__(self, *args, **kwds):
+ super(ConditionalPredicateValueDefnumberArraynullExprRef, self).__init__(*args, **kwds)
+
+
+class ConditionalPredicateValueDefnumbernullExprRef(VegaLiteSchema):
+ """ConditionalPredicateValueDefnumbernullExprRef schema wrapper
+
+ anyOf(Mapping(required=[test, value]), Mapping(required=[expr, test]))
+ """
+ _schema = {'$ref': '#/definitions/ConditionalPredicate<(ValueDef<(number|null)>|ExprRef)>'}
+
+ def __init__(self, *args, **kwds):
+ super(ConditionalPredicateValueDefnumbernullExprRef, self).__init__(*args, **kwds)
+
+
+class ConditionalSelectionMarkPropFieldOrDatumDef(ConditionalMarkPropFieldOrDatumDef):
+ """ConditionalSelectionMarkPropFieldOrDatumDef schema wrapper
+
+ anyOf(Mapping(required=[selection]), Mapping(required=[selection]))
+ """
+ _schema = {'$ref': '#/definitions/ConditionalSelection<MarkPropFieldOrDatumDef>'}
+
+ def __init__(self, *args, **kwds):
+ super(ConditionalSelectionMarkPropFieldOrDatumDef, self).__init__(*args, **kwds)
+
+
+class ConditionalSelectionMarkPropFieldOrDatumDefTypeForShape(ConditionalMarkPropFieldOrDatumDefTypeForShape):
+ """ConditionalSelectionMarkPropFieldOrDatumDefTypeForShape schema wrapper
+
+ anyOf(Mapping(required=[selection]), Mapping(required=[selection]))
+ """
+ _schema = {'$ref': '#/definitions/ConditionalSelection<MarkPropFieldOrDatumDef<TypeForShape>>'}
+
+ def __init__(self, *args, **kwds):
+ super(ConditionalSelectionMarkPropFieldOrDatumDefTypeForShape, self).__init__(*args, **kwds)
+
+
+class ConditionalStringFieldDef(VegaLiteSchema):
+ """ConditionalStringFieldDef schema wrapper
+
+ anyOf(:class:`ConditionalPredicateStringFieldDef`,
+ :class:`ConditionalSelectionStringFieldDef`)
+ """
+ _schema = {'$ref': '#/definitions/ConditionalStringFieldDef'}
+
+ def __init__(self, *args, **kwds):
+ super(ConditionalStringFieldDef, self).__init__(*args, **kwds)
+
+
+class ConditionalPredicateStringFieldDef(ConditionalStringFieldDef):
+ """ConditionalPredicateStringFieldDef schema wrapper
+
+ Mapping(required=[test])
+
+ Attributes
+ ----------
+
+ test : :class:`PredicateComposition`
+ Predicate for triggering the condition
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : anyOf(boolean, :class:`BinParams`, string, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ format : anyOf(string, :class:`Dictunknown`)
+ When used with the default ``"number"`` and ``"time"`` format type, the text
+ formatting pattern for labels of guides (axes, legends, headers) and text marks.
+
+
+ * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
+ `number format pattern <https://github.com/d3/d3-format#locale_format>`__. - If
+ the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
+ format pattern <https://github.com/d3/d3-time-format#locale_format>`__.
+
+ See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
+ for more examples.
+
+ When used with a `custom formatType
+ <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this
+ value will be passed as ``format`` alongside ``datum.value`` to the registered
+ function.
+
+ **Default value:** Derived from `numberFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
+ format and from `timeFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
+ format.
+ formatType : string
+ The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom
+ format type
+ <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.
+
+ **Default value:** - ``"time"`` for temporal fields and ordinal and nominal fields
+ with ``timeUnit``. - ``"number"`` for quantitative fields as well as ordinal and
+ nominal fields without ``timeUnit``.
+ labelExpr : string
+ `Vega expression <https://vega.github.io/vega/docs/expressions/>`__ for customizing
+ labels text.
+
+ **Note:** The label text and value can be assessed via the ``label`` and ``value``
+ properties of the axis's backing ``datum`` object.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _schema = {'$ref': '#/definitions/ConditionalPredicate<StringFieldDef>'}
+
+ def __init__(self, test=Undefined, aggregate=Undefined, band=Undefined, bin=Undefined,
+ field=Undefined, format=Undefined, formatType=Undefined, labelExpr=Undefined,
+ timeUnit=Undefined, title=Undefined, type=Undefined, **kwds):
+ super(ConditionalPredicateStringFieldDef, self).__init__(test=test, aggregate=aggregate,
+ band=band, bin=bin, field=field,
+ format=format, formatType=formatType,
+ labelExpr=labelExpr, timeUnit=timeUnit,
+ title=title, type=type, **kwds)
+
+
+class ConditionalSelectionStringFieldDef(ConditionalStringFieldDef):
+ """ConditionalSelectionStringFieldDef schema wrapper
+
+ Mapping(required=[selection])
+
+ Attributes
+ ----------
+
+ selection : :class:`SelectionComposition`
+ A `selection name <https://vega.github.io/vega-lite/docs/selection.html>`__, or a
+ series of `composed selections
+ <https://vega.github.io/vega-lite/docs/selection.html#compose>`__.
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : anyOf(boolean, :class:`BinParams`, string, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ format : anyOf(string, :class:`Dictunknown`)
+ When used with the default ``"number"`` and ``"time"`` format type, the text
+ formatting pattern for labels of guides (axes, legends, headers) and text marks.
+
+
+ * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
+ `number format pattern <https://github.com/d3/d3-format#locale_format>`__. - If
+ the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
+ format pattern <https://github.com/d3/d3-time-format#locale_format>`__.
+
+ See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
+ for more examples.
+
+ When used with a `custom formatType
+ <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this
+ value will be passed as ``format`` alongside ``datum.value`` to the registered
+ function.
+
+ **Default value:** Derived from `numberFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
+ format and from `timeFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
+ format.
+ formatType : string
+ The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom
+ format type
+ <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.
+
+ **Default value:** - ``"time"`` for temporal fields and ordinal and nominal fields
+ with ``timeUnit``. - ``"number"`` for quantitative fields as well as ordinal and
+ nominal fields without ``timeUnit``.
+ labelExpr : string
+ `Vega expression <https://vega.github.io/vega/docs/expressions/>`__ for customizing
+ labels text.
+
+ **Note:** The label text and value can be assessed via the ``label`` and ``value``
+ properties of the axis's backing ``datum`` object.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _schema = {'$ref': '#/definitions/ConditionalSelection<StringFieldDef>'}
+
+ def __init__(self, selection=Undefined, aggregate=Undefined, band=Undefined, bin=Undefined,
+ field=Undefined, format=Undefined, formatType=Undefined, labelExpr=Undefined,
+ timeUnit=Undefined, title=Undefined, type=Undefined, **kwds):
+ super(ConditionalSelectionStringFieldDef, self).__init__(selection=selection,
+ aggregate=aggregate, band=band,
+ bin=bin, field=field, format=format,
+ formatType=formatType,
+ labelExpr=labelExpr, timeUnit=timeUnit,
+ title=title, type=type, **kwds)
+
+
+class ConditionalValueDefGradientstringnullExprRef(VegaLiteSchema):
+ """ConditionalValueDefGradientstringnullExprRef schema wrapper
+
+ anyOf(:class:`ConditionalPredicateValueDefGradientstringnullExprRef`,
+ :class:`ConditionalSelectionValueDefGradientstringnullExprRef`)
+ """
+ _schema = {'$ref': '#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>'}
+
+ def __init__(self, *args, **kwds):
+ super(ConditionalValueDefGradientstringnullExprRef, self).__init__(*args, **kwds)
+
+
+class ConditionalPredicateValueDefGradientstringnullExprRef(ConditionalValueDefGradientstringnullExprRef):
+ """ConditionalPredicateValueDefGradientstringnullExprRef schema wrapper
+
+ Mapping(required=[test, value])
+
+ Attributes
+ ----------
+
+ test : :class:`PredicateComposition`
+ Predicate for triggering the condition
+ value : anyOf(:class:`Gradient`, string, None, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _schema = {'$ref': '#/definitions/ConditionalPredicate<ValueDef<(Gradient|string|null|ExprRef)>>'}
+
+ def __init__(self, test=Undefined, value=Undefined, **kwds):
+ super(ConditionalPredicateValueDefGradientstringnullExprRef, self).__init__(test=test,
+ value=value, **kwds)
+
+
+class ConditionalSelectionValueDefGradientstringnullExprRef(ConditionalValueDefGradientstringnullExprRef):
+ """ConditionalSelectionValueDefGradientstringnullExprRef schema wrapper
+
+ Mapping(required=[selection, value])
+
+ Attributes
+ ----------
+
+ selection : :class:`SelectionComposition`
+ A `selection name <https://vega.github.io/vega-lite/docs/selection.html>`__, or a
+ series of `composed selections
+ <https://vega.github.io/vega-lite/docs/selection.html#compose>`__.
+ value : anyOf(:class:`Gradient`, string, None, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _schema = {'$ref': '#/definitions/ConditionalSelection<ValueDef<(Gradient|string|null|ExprRef)>>'}
+
+ def __init__(self, selection=Undefined, value=Undefined, **kwds):
+ super(ConditionalSelectionValueDefGradientstringnullExprRef, self).__init__(selection=selection,
+ value=value, **kwds)
+
+
+class ConditionalValueDefTextExprRef(VegaLiteSchema):
+ """ConditionalValueDefTextExprRef schema wrapper
+
+ anyOf(:class:`ConditionalPredicateValueDefTextExprRef`,
+ :class:`ConditionalSelectionValueDefTextExprRef`)
+ """
+ _schema = {'$ref': '#/definitions/ConditionalValueDef<(Text|ExprRef)>'}
+
+ def __init__(self, *args, **kwds):
+ super(ConditionalValueDefTextExprRef, self).__init__(*args, **kwds)
+
+
+class ConditionalPredicateValueDefTextExprRef(ConditionalValueDefTextExprRef):
+ """ConditionalPredicateValueDefTextExprRef schema wrapper
+
+ Mapping(required=[test, value])
+
+ Attributes
+ ----------
+
+ test : :class:`PredicateComposition`
+ Predicate for triggering the condition
+ value : anyOf(:class:`Text`, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _schema = {'$ref': '#/definitions/ConditionalPredicate<ValueDef<(Text|ExprRef)>>'}
+
+ def __init__(self, test=Undefined, value=Undefined, **kwds):
+ super(ConditionalPredicateValueDefTextExprRef, self).__init__(test=test, value=value, **kwds)
+
+
+class ConditionalSelectionValueDefTextExprRef(ConditionalValueDefTextExprRef):
+ """ConditionalSelectionValueDefTextExprRef schema wrapper
+
+ Mapping(required=[selection, value])
+
+ Attributes
+ ----------
+
+ selection : :class:`SelectionComposition`
+ A `selection name <https://vega.github.io/vega-lite/docs/selection.html>`__, or a
+ series of `composed selections
+ <https://vega.github.io/vega-lite/docs/selection.html#compose>`__.
+ value : anyOf(:class:`Text`, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _schema = {'$ref': '#/definitions/ConditionalSelection<ValueDef<(Text|ExprRef)>>'}
+
+ def __init__(self, selection=Undefined, value=Undefined, **kwds):
+ super(ConditionalSelectionValueDefTextExprRef, self).__init__(selection=selection, value=value,
+ **kwds)
+
+
+class ConditionalValueDefnumber(VegaLiteSchema):
+ """ConditionalValueDefnumber schema wrapper
+
+ anyOf(:class:`ConditionalPredicateValueDefnumber`,
+ :class:`ConditionalSelectionValueDefnumber`)
+ """
+ _schema = {'$ref': '#/definitions/ConditionalValueDef<number>'}
+
+ def __init__(self, *args, **kwds):
+ super(ConditionalValueDefnumber, self).__init__(*args, **kwds)
+
+
+class ConditionalPredicateValueDefnumber(ConditionalValueDefnumber):
+ """ConditionalPredicateValueDefnumber schema wrapper
+
+ Mapping(required=[test, value])
+
+ Attributes
+ ----------
+
+ test : :class:`PredicateComposition`
+ Predicate for triggering the condition
+ value : float
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _schema = {'$ref': '#/definitions/ConditionalPredicate<ValueDef<number>>'}
+
+ def __init__(self, test=Undefined, value=Undefined, **kwds):
+ super(ConditionalPredicateValueDefnumber, self).__init__(test=test, value=value, **kwds)
+
+
+class ConditionalSelectionValueDefnumber(ConditionalValueDefnumber):
+ """ConditionalSelectionValueDefnumber schema wrapper
+
+ Mapping(required=[selection, value])
+
+ Attributes
+ ----------
+
+ selection : :class:`SelectionComposition`
+ A `selection name <https://vega.github.io/vega-lite/docs/selection.html>`__, or a
+ series of `composed selections
+ <https://vega.github.io/vega-lite/docs/selection.html#compose>`__.
+ value : float
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _schema = {'$ref': '#/definitions/ConditionalSelection<ValueDef<number>>'}
+
+ def __init__(self, selection=Undefined, value=Undefined, **kwds):
+ super(ConditionalSelectionValueDefnumber, self).__init__(selection=selection, value=value,
+ **kwds)
+
+
+class ConditionalValueDefnumberArrayExprRef(VegaLiteSchema):
+ """ConditionalValueDefnumberArrayExprRef schema wrapper
+
+ anyOf(:class:`ConditionalPredicateValueDefnumberArrayExprRef`,
+ :class:`ConditionalSelectionValueDefnumberArrayExprRef`)
+ """
+ _schema = {'$ref': '#/definitions/ConditionalValueDef<(number[]|ExprRef)>'}
+
+ def __init__(self, *args, **kwds):
+ super(ConditionalValueDefnumberArrayExprRef, self).__init__(*args, **kwds)
+
+
+class ConditionalPredicateValueDefnumberArrayExprRef(ConditionalValueDefnumberArrayExprRef):
+ """ConditionalPredicateValueDefnumberArrayExprRef schema wrapper
+
+ Mapping(required=[test, value])
+
+ Attributes
+ ----------
+
+ test : :class:`PredicateComposition`
+ Predicate for triggering the condition
+ value : anyOf(List(float), :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _schema = {'$ref': '#/definitions/ConditionalPredicate<ValueDef<(number[]|ExprRef)>>'}
+
+ def __init__(self, test=Undefined, value=Undefined, **kwds):
+ super(ConditionalPredicateValueDefnumberArrayExprRef, self).__init__(test=test, value=value,
+ **kwds)
+
+
+class ConditionalSelectionValueDefnumberArrayExprRef(ConditionalValueDefnumberArrayExprRef):
+ """ConditionalSelectionValueDefnumberArrayExprRef schema wrapper
+
+ Mapping(required=[selection, value])
+
+ Attributes
+ ----------
+
+ selection : :class:`SelectionComposition`
+ A `selection name <https://vega.github.io/vega-lite/docs/selection.html>`__, or a
+ series of `composed selections
+ <https://vega.github.io/vega-lite/docs/selection.html#compose>`__.
+ value : anyOf(List(float), :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _schema = {'$ref': '#/definitions/ConditionalSelection<ValueDef<(number[]|ExprRef)>>'}
+
+ def __init__(self, selection=Undefined, value=Undefined, **kwds):
+ super(ConditionalSelectionValueDefnumberArrayExprRef, self).__init__(selection=selection,
+ value=value, **kwds)
+
+
+class ConditionalValueDefnumberExprRef(VegaLiteSchema):
+ """ConditionalValueDefnumberExprRef schema wrapper
+
+ anyOf(:class:`ConditionalPredicateValueDefnumberExprRef`,
+ :class:`ConditionalSelectionValueDefnumberExprRef`)
+ """
+ _schema = {'$ref': '#/definitions/ConditionalValueDef<(number|ExprRef)>'}
+
+ def __init__(self, *args, **kwds):
+ super(ConditionalValueDefnumberExprRef, self).__init__(*args, **kwds)
+
+
+class ConditionalPredicateValueDefnumberExprRef(ConditionalValueDefnumberExprRef):
+ """ConditionalPredicateValueDefnumberExprRef schema wrapper
+
+ Mapping(required=[test, value])
+
+ Attributes
+ ----------
+
+ test : :class:`PredicateComposition`
+ Predicate for triggering the condition
+ value : anyOf(float, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _schema = {'$ref': '#/definitions/ConditionalPredicate<ValueDef<(number|ExprRef)>>'}
+
+ def __init__(self, test=Undefined, value=Undefined, **kwds):
+ super(ConditionalPredicateValueDefnumberExprRef, self).__init__(test=test, value=value, **kwds)
+
+
+class ConditionalSelectionValueDefnumberExprRef(ConditionalValueDefnumberExprRef):
+ """ConditionalSelectionValueDefnumberExprRef schema wrapper
+
+ Mapping(required=[selection, value])
+
+ Attributes
+ ----------
+
+ selection : :class:`SelectionComposition`
+ A `selection name <https://vega.github.io/vega-lite/docs/selection.html>`__, or a
+ series of `composed selections
+ <https://vega.github.io/vega-lite/docs/selection.html#compose>`__.
+ value : anyOf(float, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _schema = {'$ref': '#/definitions/ConditionalSelection<ValueDef<(number|ExprRef)>>'}
+
+ def __init__(self, selection=Undefined, value=Undefined, **kwds):
+ super(ConditionalSelectionValueDefnumberExprRef, self).__init__(selection=selection,
+ value=value, **kwds)
+
+
+class ConditionalValueDefstringExprRef(VegaLiteSchema):
+ """ConditionalValueDefstringExprRef schema wrapper
+
+ anyOf(:class:`ConditionalPredicateValueDefstringExprRef`,
+ :class:`ConditionalSelectionValueDefstringExprRef`)
+ """
+ _schema = {'$ref': '#/definitions/ConditionalValueDef<(string|ExprRef)>'}
+
+ def __init__(self, *args, **kwds):
+ super(ConditionalValueDefstringExprRef, self).__init__(*args, **kwds)
+
+
+class ConditionalPredicateValueDefstringExprRef(ConditionalValueDefstringExprRef):
+ """ConditionalPredicateValueDefstringExprRef schema wrapper
+
+ Mapping(required=[test, value])
+
+ Attributes
+ ----------
+
+ test : :class:`PredicateComposition`
+ Predicate for triggering the condition
+ value : anyOf(string, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _schema = {'$ref': '#/definitions/ConditionalPredicate<ValueDef<(string|ExprRef)>>'}
+
+ def __init__(self, test=Undefined, value=Undefined, **kwds):
+ super(ConditionalPredicateValueDefstringExprRef, self).__init__(test=test, value=value, **kwds)
+
+
+class ConditionalSelectionValueDefstringExprRef(ConditionalValueDefstringExprRef):
+ """ConditionalSelectionValueDefstringExprRef schema wrapper
+
+ Mapping(required=[selection, value])
+
+ Attributes
+ ----------
+
+ selection : :class:`SelectionComposition`
+ A `selection name <https://vega.github.io/vega-lite/docs/selection.html>`__, or a
+ series of `composed selections
+ <https://vega.github.io/vega-lite/docs/selection.html#compose>`__.
+ value : anyOf(string, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _schema = {'$ref': '#/definitions/ConditionalSelection<ValueDef<(string|ExprRef)>>'}
+
+ def __init__(self, selection=Undefined, value=Undefined, **kwds):
+ super(ConditionalSelectionValueDefstringExprRef, self).__init__(selection=selection,
+ value=value, **kwds)
+
+
+class ConditionalValueDefstringnullExprRef(VegaLiteSchema):
+ """ConditionalValueDefstringnullExprRef schema wrapper
+
+ anyOf(:class:`ConditionalPredicateValueDefstringnullExprRef`,
+ :class:`ConditionalSelectionValueDefstringnullExprRef`)
+ """
+ _schema = {'$ref': '#/definitions/ConditionalValueDef<(string|null|ExprRef)>'}
+
+ def __init__(self, *args, **kwds):
+ super(ConditionalValueDefstringnullExprRef, self).__init__(*args, **kwds)
+
+
+class ConditionalPredicateValueDefstringnullExprRef(ConditionalValueDefstringnullExprRef):
+ """ConditionalPredicateValueDefstringnullExprRef schema wrapper
+
+ Mapping(required=[test, value])
+
+ Attributes
+ ----------
+
+ test : :class:`PredicateComposition`
+ Predicate for triggering the condition
+ value : anyOf(string, None, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _schema = {'$ref': '#/definitions/ConditionalPredicate<ValueDef<(string|null|ExprRef)>>'}
+
+ def __init__(self, test=Undefined, value=Undefined, **kwds):
+ super(ConditionalPredicateValueDefstringnullExprRef, self).__init__(test=test, value=value,
+ **kwds)
+
+
+class ConditionalSelectionValueDefstringnullExprRef(ConditionalValueDefstringnullExprRef):
+ """ConditionalSelectionValueDefstringnullExprRef schema wrapper
+
+ Mapping(required=[selection, value])
+
+ Attributes
+ ----------
+
+ selection : :class:`SelectionComposition`
+ A `selection name <https://vega.github.io/vega-lite/docs/selection.html>`__, or a
+ series of `composed selections
+ <https://vega.github.io/vega-lite/docs/selection.html#compose>`__.
+ value : anyOf(string, None, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _schema = {'$ref': '#/definitions/ConditionalSelection<ValueDef<(string|null|ExprRef)>>'}
+
+ def __init__(self, selection=Undefined, value=Undefined, **kwds):
+ super(ConditionalSelectionValueDefstringnullExprRef, self).__init__(selection=selection,
+ value=value, **kwds)
+
+
+class Config(VegaLiteSchema):
+ """Config schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ arc : :class:`RectConfig`
+ Arc-specific Config
+ area : :class:`AreaConfig`
+ Area-Specific Config
+ aria : boolean
+ A boolean flag indicating if ARIA default attributes should be included for marks
+ and guides (SVG output only). If false, the ``"aria-hidden"`` attribute will be set
+ for all guides, removing them from the ARIA accessibility tree and Vega-Lite will
+ not generate default descriptions for marks.
+
+ **Default value:** ``true``.
+ autosize : anyOf(:class:`AutosizeType`, :class:`AutoSizeParams`)
+ How the visualization size should be determined. If a string, should be one of
+ ``"pad"``, ``"fit"`` or ``"none"``. Object values can additionally specify
+ parameters for content sizing and automatic resizing.
+
+ **Default value** : ``pad``
+ axis : :class:`AxisConfig`
+ Axis configuration, which determines default properties for all ``x`` and ``y``
+ `axes <https://vega.github.io/vega-lite/docs/axis.html>`__. For a full list of axis
+ configuration options, please see the `corresponding section of the axis
+ documentation <https://vega.github.io/vega-lite/docs/axis.html#config>`__.
+ axisBand : :class:`AxisConfig`
+ Config for axes with "band" scales.
+ axisBottom : :class:`AxisConfig`
+ Config for x-axis along the bottom edge of the chart.
+ axisDiscrete : :class:`AxisConfig`
+ Config for axes with "point" or "band" scales.
+ axisLeft : :class:`AxisConfig`
+ Config for y-axis along the left edge of the chart.
+ axisPoint : :class:`AxisConfig`
+ Config for axes with "point" scales.
+ axisQuantitative : :class:`AxisConfig`
+ Config for quantitative axes.
+ axisRight : :class:`AxisConfig`
+ Config for y-axis along the right edge of the chart.
+ axisTemporal : :class:`AxisConfig`
+ Config for temporal axes.
+ axisTop : :class:`AxisConfig`
+ Config for x-axis along the top edge of the chart.
+ axisX : :class:`AxisConfig`
+ X-axis specific config.
+ axisXBand : :class:`AxisConfig`
+ Config for x-axes with "band" scales.
+ axisXDiscrete : :class:`AxisConfig`
+ Config for x-axes with "point" or "band" scales.
+ axisXPoint : :class:`AxisConfig`
+ Config for x-axes with "point" scales.
+ axisXQuantitative : :class:`AxisConfig`
+ Config for x-quantitative axes.
+ axisXTemporal : :class:`AxisConfig`
+ Config for x-temporal axes.
+ axisY : :class:`AxisConfig`
+ Y-axis specific config.
+ axisYBand : :class:`AxisConfig`
+ Config for y-axes with "band" scales.
+ axisYDiscrete : :class:`AxisConfig`
+ Config for y-axes with "point" or "band" scales.
+ axisYPoint : :class:`AxisConfig`
+ Config for y-axes with "point" scales.
+ axisYQuantitative : :class:`AxisConfig`
+ Config for y-quantitative axes.
+ axisYTemporal : :class:`AxisConfig`
+ Config for y-temporal axes.
+ background : anyOf(:class:`Color`, :class:`ExprRef`)
+ CSS color property to use as the background of the entire view.
+
+ **Default value:** ``"white"``
+ bar : :class:`BarConfig`
+ Bar-Specific Config
+ boxplot : :class:`BoxPlotConfig`
+ Box Config
+ circle : :class:`MarkConfig`
+ Circle-Specific Config
+ concat : :class:`CompositionConfig`
+ Default configuration for all concatenation and repeat view composition operators (
+ ``concat``, ``hconcat``, ``vconcat``, and ``repeat`` )
+ countTitle : string
+ Default axis and legend title for count fields.
+
+ **Default value:** ``'Count of Records``.
+ customFormatTypes : boolean
+ Allow the ``formatType`` property for text marks and guides to accept a custom
+ formatter function `registered as a Vega expression
+ <https://vega.github.io/vega-lite/usage/compile.html#format-type>`__.
+ errorband : :class:`ErrorBandConfig`
+ ErrorBand Config
+ errorbar : :class:`ErrorBarConfig`
+ ErrorBar Config
+ facet : :class:`CompositionConfig`
+ Default configuration for the ``facet`` view composition operator
+ fieldTitle : enum('verbal', 'functional', 'plain')
+ Defines how Vega-Lite generates title for fields. There are three possible styles: -
+ ``"verbal"`` (Default) - displays function in a verbal style (e.g., "Sum of field",
+ "Year-month of date", "field (binned)"). - ``"function"`` - displays function using
+ parentheses and capitalized texts (e.g., "SUM(field)", "YEARMONTH(date)",
+ "BIN(field)"). - ``"plain"`` - displays only the field name without functions (e.g.,
+ "field", "date", "field").
+ font : string
+ Default font for all text marks, titles, and labels.
+ geoshape : :class:`MarkConfig`
+ Geoshape-Specific Config
+ header : :class:`HeaderConfig`
+ Header configuration, which determines default properties for all `headers
+ <https://vega.github.io/vega-lite/docs/header.html>`__.
+
+ For a full list of header configuration options, please see the `corresponding
+ section of in the header documentation
+ <https://vega.github.io/vega-lite/docs/header.html#config>`__.
+ headerColumn : :class:`HeaderConfig`
+ Header configuration, which determines default properties for column `headers
+ <https://vega.github.io/vega-lite/docs/header.html>`__.
+
+ For a full list of header configuration options, please see the `corresponding
+ section of in the header documentation
+ <https://vega.github.io/vega-lite/docs/header.html#config>`__.
+ headerFacet : :class:`HeaderConfig`
+ Header configuration, which determines default properties for non-row/column facet
+ `headers <https://vega.github.io/vega-lite/docs/header.html>`__.
+
+ For a full list of header configuration options, please see the `corresponding
+ section of in the header documentation
+ <https://vega.github.io/vega-lite/docs/header.html#config>`__.
+ headerRow : :class:`HeaderConfig`
+ Header configuration, which determines default properties for row `headers
+ <https://vega.github.io/vega-lite/docs/header.html>`__.
+
+ For a full list of header configuration options, please see the `corresponding
+ section of in the header documentation
+ <https://vega.github.io/vega-lite/docs/header.html#config>`__.
+ image : :class:`RectConfig`
+ Image-specific Config
+ legend : :class:`LegendConfig`
+ Legend configuration, which determines default properties for all `legends
+ <https://vega.github.io/vega-lite/docs/legend.html>`__. For a full list of legend
+ configuration options, please see the `corresponding section of in the legend
+ documentation <https://vega.github.io/vega-lite/docs/legend.html#config>`__.
+ line : :class:`LineConfig`
+ Line-Specific Config
+ lineBreak : anyOf(string, :class:`ExprRef`)
+ A delimiter, such as a newline character, upon which to break text strings into
+ multiple lines. This property provides a global default for text marks, which is
+ overridden by mark or style config settings, and by the lineBreak mark encoding
+ channel. If signal-valued, either string or regular expression (regexp) values are
+ valid.
+ mark : :class:`MarkConfig`
+ Mark Config
+ numberFormat : string
+ D3 Number format for guide labels and text marks. For example ``"s"`` for SI units.
+ Use `D3's number format pattern <https://github.com/d3/d3-format#locale_format>`__.
+ padding : anyOf(:class:`Padding`, :class:`ExprRef`)
+ The default visualization padding, in pixels, from the edge of the visualization
+ canvas to the data rectangle. If a number, specifies padding for all sides. If an
+ object, the value should have the format ``{"left": 5, "top": 5, "right": 5,
+ "bottom": 5}`` to specify padding for each side of the visualization.
+
+ **Default value** : ``5``
+ params : List(:class:`Parameter`)
+ Dynamic variables that parameterize a visualization.
+ point : :class:`MarkConfig`
+ Point-Specific Config
+ projection : :class:`ProjectionConfig`
+ Projection configuration, which determines default properties for all `projections
+ <https://vega.github.io/vega-lite/docs/projection.html>`__. For a full list of
+ projection configuration options, please see the `corresponding section of the
+ projection documentation
+ <https://vega.github.io/vega-lite/docs/projection.html#config>`__.
+ range : :class:`RangeConfig`
+ An object hash that defines default range arrays or schemes for using with scales.
+ For a full list of scale range configuration options, please see the `corresponding
+ section of the scale documentation
+ <https://vega.github.io/vega-lite/docs/scale.html#config>`__.
+ rect : :class:`RectConfig`
+ Rect-Specific Config
+ rule : :class:`MarkConfig`
+ Rule-Specific Config
+ scale : :class:`ScaleConfig`
+ Scale configuration determines default properties for all `scales
+ <https://vega.github.io/vega-lite/docs/scale.html>`__. For a full list of scale
+ configuration options, please see the `corresponding section of the scale
+ documentation <https://vega.github.io/vega-lite/docs/scale.html#config>`__.
+ selection : :class:`SelectionConfig`
+ An object hash for defining default properties for each type of selections.
+ square : :class:`MarkConfig`
+ Square-Specific Config
+ style : :class:`StyleConfigIndex`
+ An object hash that defines key-value mappings to determine default properties for
+ marks with a given `style
+ <https://vega.github.io/vega-lite/docs/mark.html#mark-def>`__. The keys represent
+ styles names; the values have to be valid `mark configuration objects
+ <https://vega.github.io/vega-lite/docs/mark.html#config>`__.
+ text : :class:`MarkConfig`
+ Text-Specific Config
+ tick : :class:`TickConfig`
+ Tick-Specific Config
+ timeFormat : string
+ Default time format for raw time values (without time units) in text marks, legend
+ labels and header labels.
+
+ **Default value:** ``"%b %d, %Y"`` **Note:** Axes automatically determine the format
+ for each label automatically so this config does not affect axes.
+ title : :class:`TitleConfig`
+ Title configuration, which determines default properties for all `titles
+ <https://vega.github.io/vega-lite/docs/title.html>`__. For a full list of title
+ configuration options, please see the `corresponding section of the title
+ documentation <https://vega.github.io/vega-lite/docs/title.html#config>`__.
+ trail : :class:`LineConfig`
+ Trail-Specific Config
+ view : :class:`ViewConfig`
+ Default properties for `single view plots
+ <https://vega.github.io/vega-lite/docs/spec.html#single>`__.
+ """
+ _schema = {'$ref': '#/definitions/Config'}
+
+ def __init__(self, arc=Undefined, area=Undefined, aria=Undefined, autosize=Undefined,
+ axis=Undefined, axisBand=Undefined, axisBottom=Undefined, axisDiscrete=Undefined,
+ axisLeft=Undefined, axisPoint=Undefined, axisQuantitative=Undefined,
+ axisRight=Undefined, axisTemporal=Undefined, axisTop=Undefined, axisX=Undefined,
+ axisXBand=Undefined, axisXDiscrete=Undefined, axisXPoint=Undefined,
+ axisXQuantitative=Undefined, axisXTemporal=Undefined, axisY=Undefined,
+ axisYBand=Undefined, axisYDiscrete=Undefined, axisYPoint=Undefined,
+ axisYQuantitative=Undefined, axisYTemporal=Undefined, background=Undefined,
+ bar=Undefined, boxplot=Undefined, circle=Undefined, concat=Undefined,
+ countTitle=Undefined, customFormatTypes=Undefined, errorband=Undefined,
+ errorbar=Undefined, facet=Undefined, fieldTitle=Undefined, font=Undefined,
+ geoshape=Undefined, header=Undefined, headerColumn=Undefined, headerFacet=Undefined,
+ headerRow=Undefined, image=Undefined, legend=Undefined, line=Undefined,
+ lineBreak=Undefined, mark=Undefined, numberFormat=Undefined, padding=Undefined,
+ params=Undefined, point=Undefined, projection=Undefined, range=Undefined,
+ rect=Undefined, rule=Undefined, scale=Undefined, selection=Undefined, square=Undefined,
+ style=Undefined, text=Undefined, tick=Undefined, timeFormat=Undefined, title=Undefined,
+ trail=Undefined, view=Undefined, **kwds):
+ super(Config, self).__init__(arc=arc, area=area, aria=aria, autosize=autosize, axis=axis,
+ axisBand=axisBand, axisBottom=axisBottom,
+ axisDiscrete=axisDiscrete, axisLeft=axisLeft, axisPoint=axisPoint,
+ axisQuantitative=axisQuantitative, axisRight=axisRight,
+ axisTemporal=axisTemporal, axisTop=axisTop, axisX=axisX,
+ axisXBand=axisXBand, axisXDiscrete=axisXDiscrete,
+ axisXPoint=axisXPoint, axisXQuantitative=axisXQuantitative,
+ axisXTemporal=axisXTemporal, axisY=axisY, axisYBand=axisYBand,
+ axisYDiscrete=axisYDiscrete, axisYPoint=axisYPoint,
+ axisYQuantitative=axisYQuantitative, axisYTemporal=axisYTemporal,
+ background=background, bar=bar, boxplot=boxplot, circle=circle,
+ concat=concat, countTitle=countTitle,
+ customFormatTypes=customFormatTypes, errorband=errorband,
+ errorbar=errorbar, facet=facet, fieldTitle=fieldTitle, font=font,
+ geoshape=geoshape, header=header, headerColumn=headerColumn,
+ headerFacet=headerFacet, headerRow=headerRow, image=image,
+ legend=legend, line=line, lineBreak=lineBreak, mark=mark,
+ numberFormat=numberFormat, padding=padding, params=params,
+ point=point, projection=projection, range=range, rect=rect,
+ rule=rule, scale=scale, selection=selection, square=square,
+ style=style, text=text, tick=tick, timeFormat=timeFormat,
+ title=title, trail=trail, view=view, **kwds)
+
+
+class Cursor(VegaLiteSchema):
+ """Cursor schema wrapper
+
+ enum('auto', 'default', 'none', 'context-menu', 'help', 'pointer', 'progress', 'wait',
+ 'cell', 'crosshair', 'text', 'vertical-text', 'alias', 'copy', 'move', 'no-drop',
+ 'not-allowed', 'e-resize', 'n-resize', 'ne-resize', 'nw-resize', 's-resize', 'se-resize',
+ 'sw-resize', 'w-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize',
+ 'col-resize', 'row-resize', 'all-scroll', 'zoom-in', 'zoom-out', 'grab', 'grabbing')
+ """
+ _schema = {'$ref': '#/definitions/Cursor'}
+
+ def __init__(self, *args):
+ super(Cursor, self).__init__(*args)
+
+
+class Cyclical(ColorScheme):
+ """Cyclical schema wrapper
+
+ enum('rainbow', 'sinebow')
+ """
+ _schema = {'$ref': '#/definitions/Cyclical'}
+
+ def __init__(self, *args):
+ super(Cyclical, self).__init__(*args)
+
+
+class Data(VegaLiteSchema):
+ """Data schema wrapper
+
+ anyOf(:class:`DataSource`, :class:`Generator`)
+ """
+ _schema = {'$ref': '#/definitions/Data'}
+
+ def __init__(self, *args, **kwds):
+ super(Data, self).__init__(*args, **kwds)
+
+
+class DataFormat(VegaLiteSchema):
+ """DataFormat schema wrapper
+
+ anyOf(:class:`CsvDataFormat`, :class:`DsvDataFormat`, :class:`JsonDataFormat`,
+ :class:`TopoDataFormat`)
+ """
+ _schema = {'$ref': '#/definitions/DataFormat'}
+
+ def __init__(self, *args, **kwds):
+ super(DataFormat, self).__init__(*args, **kwds)
+
+
+class CsvDataFormat(DataFormat):
+ """CsvDataFormat schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ parse : anyOf(:class:`Parse`, None)
+ If set to ``null``, disable type inference based on the spec and only use type
+ inference based on the data. Alternatively, a parsing directive object can be
+ provided for explicit data types. Each property of the object corresponds to a field
+ name, and the value to the desired data type (one of ``"number"``, ``"boolean"``,
+ ``"date"``, or null (do not parse the field)). For example, ``"parse":
+ {"modified_on": "date"}`` parses the ``modified_on`` field in each input record a
+ Date value.
+
+ For ``"date"``, we parse data based using Javascript's `Date.parse()
+ <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse>`__.
+ For Specific date formats can be provided (e.g., ``{foo: "date:'%m%d%Y'"}`` ), using
+ the `d3-time-format syntax <https://github.com/d3/d3-time-format#locale_format>`__.
+ UTC date format parsing is supported similarly (e.g., ``{foo: "utc:'%m%d%Y'"}`` ).
+ See more about `UTC time
+ <https://vega.github.io/vega-lite/docs/timeunit.html#utc>`__
+ type : enum('csv', 'tsv')
+ Type of input data: ``"json"``, ``"csv"``, ``"tsv"``, ``"dsv"``.
+
+ **Default value:** The default format type is determined by the extension of the
+ file URL. If no extension is detected, ``"json"`` will be used by default.
+ """
+ _schema = {'$ref': '#/definitions/CsvDataFormat'}
+
+ def __init__(self, parse=Undefined, type=Undefined, **kwds):
+ super(CsvDataFormat, self).__init__(parse=parse, type=type, **kwds)
+
+
+class DataSource(Data):
+ """DataSource schema wrapper
+
+ anyOf(:class:`UrlData`, :class:`InlineData`, :class:`NamedData`)
+ """
+ _schema = {'$ref': '#/definitions/DataSource'}
+
+ def __init__(self, *args, **kwds):
+ super(DataSource, self).__init__(*args, **kwds)
+
+
+class Datasets(VegaLiteSchema):
+ """Datasets schema wrapper
+
+ Mapping(required=[])
+ """
+ _schema = {'$ref': '#/definitions/Datasets'}
+
+ def __init__(self, **kwds):
+ super(Datasets, self).__init__(**kwds)
+
+
+class Day(VegaLiteSchema):
+ """Day schema wrapper
+
+ float
+ """
+ _schema = {'$ref': '#/definitions/Day'}
+
+ def __init__(self, *args):
+ super(Day, self).__init__(*args)
+
+
+class DictInlineDataset(VegaLiteSchema):
+ """DictInlineDataset schema wrapper
+
+ Mapping(required=[])
+ """
+ _schema = {'$ref': '#/definitions/Dict<InlineDataset>'}
+
+ def __init__(self, **kwds):
+ super(DictInlineDataset, self).__init__(**kwds)
+
+
+class DictSelectionInit(VegaLiteSchema):
+ """DictSelectionInit schema wrapper
+
+ Mapping(required=[])
+ """
+ _schema = {'$ref': '#/definitions/Dict<SelectionInit>'}
+
+ def __init__(self, **kwds):
+ super(DictSelectionInit, self).__init__(**kwds)
+
+
+class DictSelectionInitInterval(VegaLiteSchema):
+ """DictSelectionInitInterval schema wrapper
+
+ Mapping(required=[])
+ """
+ _schema = {'$ref': '#/definitions/Dict<SelectionInitInterval>'}
+
+ def __init__(self, **kwds):
+ super(DictSelectionInitInterval, self).__init__(**kwds)
+
+
+class Dictunknown(VegaLiteSchema):
+ """Dictunknown schema wrapper
+
+ Mapping(required=[])
+ """
+ _schema = {'$ref': '#/definitions/Dict<unknown>'}
+
+ def __init__(self, **kwds):
+ super(Dictunknown, self).__init__(**kwds)
+
+
+class Diverging(ColorScheme):
+ """Diverging schema wrapper
+
+ enum('blueorange', 'blueorange-3', 'blueorange-4', 'blueorange-5', 'blueorange-6',
+ 'blueorange-7', 'blueorange-8', 'blueorange-9', 'blueorange-10', 'blueorange-11',
+ 'brownbluegreen', 'brownbluegreen-3', 'brownbluegreen-4', 'brownbluegreen-5',
+ 'brownbluegreen-6', 'brownbluegreen-7', 'brownbluegreen-8', 'brownbluegreen-9',
+ 'brownbluegreen-10', 'brownbluegreen-11', 'purplegreen', 'purplegreen-3', 'purplegreen-4',
+ 'purplegreen-5', 'purplegreen-6', 'purplegreen-7', 'purplegreen-8', 'purplegreen-9',
+ 'purplegreen-10', 'purplegreen-11', 'pinkyellowgreen', 'pinkyellowgreen-3',
+ 'pinkyellowgreen-4', 'pinkyellowgreen-5', 'pinkyellowgreen-6', 'pinkyellowgreen-7',
+ 'pinkyellowgreen-8', 'pinkyellowgreen-9', 'pinkyellowgreen-10', 'pinkyellowgreen-11',
+ 'purpleorange', 'purpleorange-3', 'purpleorange-4', 'purpleorange-5', 'purpleorange-6',
+ 'purpleorange-7', 'purpleorange-8', 'purpleorange-9', 'purpleorange-10', 'purpleorange-11',
+ 'redblue', 'redblue-3', 'redblue-4', 'redblue-5', 'redblue-6', 'redblue-7', 'redblue-8',
+ 'redblue-9', 'redblue-10', 'redblue-11', 'redgrey', 'redgrey-3', 'redgrey-4', 'redgrey-5',
+ 'redgrey-6', 'redgrey-7', 'redgrey-8', 'redgrey-9', 'redgrey-10', 'redgrey-11',
+ 'redyellowblue', 'redyellowblue-3', 'redyellowblue-4', 'redyellowblue-5', 'redyellowblue-6',
+ 'redyellowblue-7', 'redyellowblue-8', 'redyellowblue-9', 'redyellowblue-10',
+ 'redyellowblue-11', 'redyellowgreen', 'redyellowgreen-3', 'redyellowgreen-4',
+ 'redyellowgreen-5', 'redyellowgreen-6', 'redyellowgreen-7', 'redyellowgreen-8',
+ 'redyellowgreen-9', 'redyellowgreen-10', 'redyellowgreen-11', 'spectral', 'spectral-3',
+ 'spectral-4', 'spectral-5', 'spectral-6', 'spectral-7', 'spectral-8', 'spectral-9',
+ 'spectral-10', 'spectral-11')
+ """
+ _schema = {'$ref': '#/definitions/Diverging'}
+
+ def __init__(self, *args):
+ super(Diverging, self).__init__(*args)
+
+
+class DomainUnionWith(VegaLiteSchema):
+ """DomainUnionWith schema wrapper
+
+ Mapping(required=[unionWith])
+
+ Attributes
+ ----------
+
+ unionWith : anyOf(List(float), List(string), List(boolean), List(:class:`DateTime`))
+ Customized domain values to be union with the field's values.
+
+ 1) ``domain`` for *quantitative* fields can take one of the following forms:
+
+
+ * a two-element array with minimum and maximum values. - an array with more than two
+ entries, for `Piecewise quantitative scales
+ <https://vega.github.io/vega-lite/docs/scale.html#piecewise>`__. (Alternatively,
+ the ``domainMid`` property can be set for a diverging scale.) - a string value
+ ``"unaggregated"``, if the input field is aggregated, to indicate that the domain
+ should include the raw data values prior to the aggregation.
+
+ 2) ``domain`` for *temporal* fields can be a two-element array minimum and maximum
+ values, in the form of either timestamps or the `DateTime definition objects
+ <https://vega.github.io/vega-lite/docs/types.html#datetime>`__.
+
+ 3) ``domain`` for *ordinal* and *nominal* fields can be an array that lists valid
+ input values.
+ """
+ _schema = {'$ref': '#/definitions/DomainUnionWith'}
+
+ def __init__(self, unionWith=Undefined, **kwds):
+ super(DomainUnionWith, self).__init__(unionWith=unionWith, **kwds)
+
+
+class DsvDataFormat(DataFormat):
+ """DsvDataFormat schema wrapper
+
+ Mapping(required=[delimiter])
+
+ Attributes
+ ----------
+
+ delimiter : string
+ The delimiter between records. The delimiter must be a single character (i.e., a
+ single 16-bit code unit); so, ASCII delimiters are fine, but emoji delimiters are
+ not.
+ parse : anyOf(:class:`Parse`, None)
+ If set to ``null``, disable type inference based on the spec and only use type
+ inference based on the data. Alternatively, a parsing directive object can be
+ provided for explicit data types. Each property of the object corresponds to a field
+ name, and the value to the desired data type (one of ``"number"``, ``"boolean"``,
+ ``"date"``, or null (do not parse the field)). For example, ``"parse":
+ {"modified_on": "date"}`` parses the ``modified_on`` field in each input record a
+ Date value.
+
+ For ``"date"``, we parse data based using Javascript's `Date.parse()
+ <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse>`__.
+ For Specific date formats can be provided (e.g., ``{foo: "date:'%m%d%Y'"}`` ), using
+ the `d3-time-format syntax <https://github.com/d3/d3-time-format#locale_format>`__.
+ UTC date format parsing is supported similarly (e.g., ``{foo: "utc:'%m%d%Y'"}`` ).
+ See more about `UTC time
+ <https://vega.github.io/vega-lite/docs/timeunit.html#utc>`__
+ type : string
+ Type of input data: ``"json"``, ``"csv"``, ``"tsv"``, ``"dsv"``.
+
+ **Default value:** The default format type is determined by the extension of the
+ file URL. If no extension is detected, ``"json"`` will be used by default.
+ """
+ _schema = {'$ref': '#/definitions/DsvDataFormat'}
+
+ def __init__(self, delimiter=Undefined, parse=Undefined, type=Undefined, **kwds):
+ super(DsvDataFormat, self).__init__(delimiter=delimiter, parse=parse, type=type, **kwds)
+
+
+class Element(VegaLiteSchema):
+ """Element schema wrapper
+
+ string
+ """
+ _schema = {'$ref': '#/definitions/Element'}
+
+ def __init__(self, *args):
+ super(Element, self).__init__(*args)
+
+
+class Encoding(VegaLiteSchema):
+ """Encoding schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ angle : :class:`NumericMarkPropDef`
+ Rotation angle of point and text marks.
+ color : :class:`ColorDef`
+ Color of the marks – either fill or stroke color based on the ``filled`` property
+ of mark definition. By default, ``color`` represents fill color for ``"area"``,
+ ``"bar"``, ``"tick"``, ``"text"``, ``"trail"``, ``"circle"``, and ``"square"`` /
+ stroke color for ``"line"`` and ``"point"``.
+
+ **Default value:** If undefined, the default color depends on `mark config
+ <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__ 's ``color``
+ property.
+
+ *Note:* 1) For fine-grained control over both fill and stroke colors of the marks,
+ please use the ``fill`` and ``stroke`` channels. The ``fill`` or ``stroke``
+ encodings have higher precedence than ``color``, thus may override the ``color``
+ encoding if conflicting encodings are specified. 2) See the scale documentation for
+ more information about customizing `color scheme
+ <https://vega.github.io/vega-lite/docs/scale.html#scheme>`__.
+ description : anyOf(:class:`StringFieldDefWithCondition`,
+ :class:`StringValueDefWithCondition`)
+ A text description of this mark for ARIA accessibility (SVG output only). For SVG
+ output the ``"aria-label"`` attribute will be set to this description.
+ detail : anyOf(:class:`FieldDefWithoutScale`, List(:class:`FieldDefWithoutScale`))
+ Additional levels of detail for grouping data in aggregate views and in line, trail,
+ and area marks without mapping data to a specific visual channel.
+ fill : :class:`ColorDef`
+ Fill color of the marks. **Default value:** If undefined, the default color depends
+ on `mark config <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__
+ 's ``color`` property.
+
+ *Note:* The ``fill`` encoding has higher precedence than ``color``, thus may
+ override the ``color`` encoding if conflicting encodings are specified.
+ fillOpacity : :class:`NumericMarkPropDef`
+ Fill opacity of the marks.
+
+ **Default value:** If undefined, the default opacity depends on `mark config
+ <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__ 's
+ ``fillOpacity`` property.
+ href : anyOf(:class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition`)
+ A URL to load upon mouse click.
+ key : :class:`FieldDefWithoutScale`
+ A data field to use as a unique key for data binding. When a visualization’s data is
+ updated, the key value will be used to match data elements to existing mark
+ instances. Use a key channel to enable object constancy for transitions over dynamic
+ data.
+ latitude : :class:`LatLongDef`
+ Latitude position of geographically projected marks.
+ latitude2 : :class:`Position2Def`
+ Latitude-2 position for geographically projected ranged ``"area"``, ``"bar"``,
+ ``"rect"``, and ``"rule"``.
+ longitude : :class:`LatLongDef`
+ Longitude position of geographically projected marks.
+ longitude2 : :class:`Position2Def`
+ Longitude-2 position for geographically projected ranged ``"area"``, ``"bar"``,
+ ``"rect"``, and ``"rule"``.
+ opacity : :class:`NumericMarkPropDef`
+ Opacity of the marks.
+
+ **Default value:** If undefined, the default opacity depends on `mark config
+ <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__ 's ``opacity``
+ property.
+ order : anyOf(:class:`OrderFieldDef`, List(:class:`OrderFieldDef`), :class:`OrderValueDef`)
+ Order of the marks. - For stacked marks, this ``order`` channel encodes `stack order
+ <https://vega.github.io/vega-lite/docs/stack.html#order>`__. - For line and trail
+ marks, this ``order`` channel encodes order of data points in the lines. This can be
+ useful for creating `a connected scatterplot
+ <https://vega.github.io/vega-lite/examples/connected_scatterplot.html>`__. Setting
+ ``order`` to ``{"value": null}`` makes the line marks use the original order in the
+ data sources. - Otherwise, this ``order`` channel encodes layer order of the marks.
+
+ **Note** : In aggregate plots, ``order`` field should be ``aggregate`` d to avoid
+ creating additional aggregation grouping.
+ radius : :class:`PolarDef`
+ The outer radius in pixels of arc marks.
+ radius2 : :class:`Position2Def`
+ The inner radius in pixels of arc marks.
+ shape : :class:`ShapeDef`
+ Shape of the mark.
+
+
+ #.
+ For ``point`` marks the supported values include: - plotting shapes:
+ ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``, ``"triangle-up"``,
+ ``"triangle-down"``, ``"triangle-right"``, or ``"triangle-left"``. - the line
+ symbol ``"stroke"`` - centered directional shapes ``"arrow"``, ``"wedge"``, or
+ ``"triangle"`` - a custom `SVG path string
+ <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct
+ sizing, custom shape paths should be defined within a square bounding box with
+ coordinates ranging from -1 to 1 along both the x and y dimensions.)
+
+ #.
+ For ``geoshape`` marks it should be a field definition of the geojson data
+
+ **Default value:** If undefined, the default shape depends on `mark config
+ <https://vega.github.io/vega-lite/docs/config.html#point-config>`__ 's ``shape``
+ property. ( ``"circle"`` if unset.)
+ size : :class:`NumericMarkPropDef`
+ Size of the mark. - For ``"point"``, ``"square"`` and ``"circle"``, – the symbol
+ size, or pixel area of the mark. - For ``"bar"`` and ``"tick"`` – the bar and tick's
+ size. - For ``"text"`` – the text's font size. - Size is unsupported for ``"line"``,
+ ``"area"``, and ``"rect"``. (Use ``"trail"`` instead of line with varying size)
+ stroke : :class:`ColorDef`
+ Stroke color of the marks. **Default value:** If undefined, the default color
+ depends on `mark config
+ <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__ 's ``color``
+ property.
+
+ *Note:* The ``stroke`` encoding has higher precedence than ``color``, thus may
+ override the ``color`` encoding if conflicting encodings are specified.
+ strokeDash : :class:`NumericArrayMarkPropDef`
+ Stroke dash of the marks.
+
+ **Default value:** ``[1,0]`` (No dash).
+ strokeOpacity : :class:`NumericMarkPropDef`
+ Stroke opacity of the marks.
+
+ **Default value:** If undefined, the default opacity depends on `mark config
+ <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__ 's
+ ``strokeOpacity`` property.
+ strokeWidth : :class:`NumericMarkPropDef`
+ Stroke width of the marks.
+
+ **Default value:** If undefined, the default stroke width depends on `mark config
+ <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__ 's
+ ``strokeWidth`` property.
+ text : :class:`TextDef`
+ Text of the ``text`` mark.
+ theta : :class:`PolarDef`
+ For arc marks, the arc length in radians if theta2 is not specified, otherwise the
+ start arc angle. (A value of 0 indicates up or “north”, increasing values proceed
+ clockwise.)
+
+ For text marks, polar coordinate angle in radians.
+ theta2 : :class:`Position2Def`
+ The end angle of arc marks in radians. A value of 0 indicates up or “north”,
+ increasing values proceed clockwise.
+ tooltip : anyOf(:class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition`,
+ List(:class:`StringFieldDef`), None)
+ The tooltip text to show upon mouse hover. Specifying ``tooltip`` encoding overrides
+ `the tooltip property in the mark definition
+ <https://vega.github.io/vega-lite/docs/mark.html#mark-def>`__.
+
+ See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__
+ documentation for a detailed discussion about tooltip in Vega-Lite.
+ url : anyOf(:class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition`)
+ The URL of an image mark.
+ x : :class:`PositionDef`
+ X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without
+ specified ``x2`` or ``width``.
+
+ The ``value`` of this channel can be a number or a string ``"width"`` for the width
+ of the plot.
+ x2 : :class:`Position2Def`
+ X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
+
+ The ``value`` of this channel can be a number or a string ``"width"`` for the width
+ of the plot.
+ xError : anyOf(:class:`SecondaryFieldDef`, :class:`ValueDefnumber`)
+ Error value of x coordinates for error specified ``"errorbar"`` and ``"errorband"``.
+ xError2 : anyOf(:class:`SecondaryFieldDef`, :class:`ValueDefnumber`)
+ Secondary error value of x coordinates for error specified ``"errorbar"`` and
+ ``"errorband"``.
+ y : :class:`PositionDef`
+ Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without
+ specified ``y2`` or ``height``.
+
+ The ``value`` of this channel can be a number or a string ``"height"`` for the
+ height of the plot.
+ y2 : :class:`Position2Def`
+ Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
+
+ The ``value`` of this channel can be a number or a string ``"height"`` for the
+ height of the plot.
+ yError : anyOf(:class:`SecondaryFieldDef`, :class:`ValueDefnumber`)
+ Error value of y coordinates for error specified ``"errorbar"`` and ``"errorband"``.
+ yError2 : anyOf(:class:`SecondaryFieldDef`, :class:`ValueDefnumber`)
+ Secondary error value of y coordinates for error specified ``"errorbar"`` and
+ ``"errorband"``.
+ """
+ _schema = {'$ref': '#/definitions/Encoding'}
+
+ def __init__(self, angle=Undefined, color=Undefined, description=Undefined, detail=Undefined,
+ fill=Undefined, fillOpacity=Undefined, href=Undefined, key=Undefined,
+ latitude=Undefined, latitude2=Undefined, longitude=Undefined, longitude2=Undefined,
+ opacity=Undefined, order=Undefined, radius=Undefined, radius2=Undefined,
+ shape=Undefined, size=Undefined, stroke=Undefined, strokeDash=Undefined,
+ strokeOpacity=Undefined, strokeWidth=Undefined, text=Undefined, theta=Undefined,
+ theta2=Undefined, tooltip=Undefined, url=Undefined, x=Undefined, x2=Undefined,
+ xError=Undefined, xError2=Undefined, y=Undefined, y2=Undefined, yError=Undefined,
+ yError2=Undefined, **kwds):
+ super(Encoding, self).__init__(angle=angle, color=color, description=description, detail=detail,
+ fill=fill, fillOpacity=fillOpacity, href=href, key=key,
+ latitude=latitude, latitude2=latitude2, longitude=longitude,
+ longitude2=longitude2, opacity=opacity, order=order,
+ radius=radius, radius2=radius2, shape=shape, size=size,
+ stroke=stroke, strokeDash=strokeDash,
+ strokeOpacity=strokeOpacity, strokeWidth=strokeWidth, text=text,
+ theta=theta, theta2=theta2, tooltip=tooltip, url=url, x=x, x2=x2,
+ xError=xError, xError2=xError2, y=y, y2=y2, yError=yError,
+ yError2=yError2, **kwds)
+
+
+class EncodingSortFieldFieldName(VegaLiteSchema):
+ """EncodingSortFieldFieldName schema wrapper
+
+ Mapping(required=[])
+ A sort definition for sorting a discrete scale in an encoding field definition.
+
+ Attributes
+ ----------
+
+ field : :class:`FieldName`
+ The data `field <https://vega.github.io/vega-lite/docs/field.html>`__ to sort by.
+
+ **Default value:** If unspecified, defaults to the field specified in the outer data
+ reference.
+ op : :class:`NonArgAggregateOp`
+ An `aggregate operation
+ <https://vega.github.io/vega-lite/docs/aggregate.html#ops>`__ to perform on the
+ field prior to sorting (e.g., ``"count"``, ``"mean"`` and ``"median"`` ). An
+ aggregation is required when there are multiple values of the sort field for each
+ encoded data field. The input data objects will be aggregated, grouped by the
+ encoded data field.
+
+ For a full list of operations, please see the documentation for `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html#ops>`__.
+
+ **Default value:** ``"sum"`` for stacked plots. Otherwise, ``"min"``.
+ order : anyOf(:class:`SortOrder`, None)
+ The sort order. One of ``"ascending"`` (default), ``"descending"``, or ``null`` (no
+ not sort).
+ """
+ _schema = {'$ref': '#/definitions/EncodingSortField<FieldName>'}
+
+ def __init__(self, field=Undefined, op=Undefined, order=Undefined, **kwds):
+ super(EncodingSortFieldFieldName, self).__init__(field=field, op=op, order=order, **kwds)
+
+
+class ErrorBand(CompositeMark):
+ """ErrorBand schema wrapper
+
+ string
+ """
+ _schema = {'$ref': '#/definitions/ErrorBand'}
+
+ def __init__(self, *args):
+ super(ErrorBand, self).__init__(*args)
+
+
+class ErrorBandConfig(VegaLiteSchema):
+ """ErrorBandConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ band : anyOf(boolean, :class:`MarkConfigExprOrSignalRef`)
+
+ borders : anyOf(boolean, :class:`MarkConfigExprOrSignalRef`)
+
+ extent : :class:`ErrorBarExtent`
+ The extent of the band. Available options include: - `"ci"`: Extend the band to the
+ confidence interval of the mean. - `"stderr"`: The size of band are set to the value
+ of standard error, extending from the mean. - `"stdev"`: The size of band are set to
+ the value of standard deviation, extending from the mean. - `"iqr"`: Extend the band
+ to the q1 and q3.
+
+ **Default value:** ``"stderr"``.
+ interpolate : :class:`Interpolate`
+ The line interpolation method for the error band. One of the following: -
+ `"linear"`: piecewise linear segments, as in a polyline. - `"linear-closed"`: close
+ the linear segments to form a polygon. - `"step"`: a piecewise constant function (a
+ step function) consisting of alternating horizontal and vertical lines. The y-value
+ changes at the midpoint of each pair of adjacent x-values. - `"step-before"`: a
+ piecewise constant function (a step function) consisting of alternating horizontal
+ and vertical lines. The y-value changes before the x-value. - `"step-after"`: a
+ piecewise constant function (a step function) consisting of alternating horizontal
+ and vertical lines. The y-value changes after the x-value. - `"basis"`: a B-spline,
+ with control point duplication on the ends. - `"basis-open"`: an open B-spline; may
+ not intersect the start or end. - `"basis-closed"`: a closed B-spline, as in a loop.
+ - `"cardinal"`: a Cardinal spline, with control point duplication on the ends. -
+ `"cardinal-open"`: an open Cardinal spline; may not intersect the start or end, but
+ will intersect other control points. - `"cardinal-closed"`: a closed Cardinal
+ spline, as in a loop. - `"bundle"`: equivalent to basis, except the tension
+ parameter is used to straighten the spline. - ``"monotone"`` : cubic interpolation
+ that preserves monotonicity in y.
+ tension : float
+ The tension parameter for the interpolation type of the error band.
+ """
+ _schema = {'$ref': '#/definitions/ErrorBandConfig'}
+
+ def __init__(self, band=Undefined, borders=Undefined, extent=Undefined, interpolate=Undefined,
+ tension=Undefined, **kwds):
+ super(ErrorBandConfig, self).__init__(band=band, borders=borders, extent=extent,
+ interpolate=interpolate, tension=tension, **kwds)
+
+
+class ErrorBandDef(CompositeMarkDef):
+ """ErrorBandDef schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : :class:`ErrorBand`
+ The mark type. This could a primitive mark type (one of ``"bar"``, ``"circle"``,
+ ``"square"``, ``"tick"``, ``"line"``, ``"area"``, ``"point"``, ``"geoshape"``,
+ ``"rule"``, and ``"text"`` ) or a composite mark type ( ``"boxplot"``,
+ ``"errorband"``, ``"errorbar"`` ).
+ band : anyOf(boolean, :class:`MarkConfigExprOrSignalRef`)
+
+ borders : anyOf(boolean, :class:`MarkConfigExprOrSignalRef`)
+
+ clip : boolean
+ Whether a composite mark be clipped to the enclosing group’s width and height.
+ color : anyOf(:class:`Color`, :class:`Gradient`, :class:`ExprRef`)
+ Default color.
+
+ **Default value:** :raw-html:`<span style="color: #4682b4;">&#9632;</span>`
+ ``"#4682b4"``
+
+ **Note:** - This property cannot be used in a `style config
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. - The ``fill``
+ and ``stroke`` properties have higher precedence than ``color`` and will override
+ ``color``.
+ extent : :class:`ErrorBarExtent`
+ The extent of the band. Available options include: - `"ci"`: Extend the band to the
+ confidence interval of the mean. - `"stderr"`: The size of band are set to the value
+ of standard error, extending from the mean. - `"stdev"`: The size of band are set to
+ the value of standard deviation, extending from the mean. - `"iqr"`: Extend the band
+ to the q1 and q3.
+
+ **Default value:** ``"stderr"``.
+ interpolate : :class:`Interpolate`
+ The line interpolation method for the error band. One of the following: -
+ `"linear"`: piecewise linear segments, as in a polyline. - `"linear-closed"`: close
+ the linear segments to form a polygon. - `"step"`: a piecewise constant function (a
+ step function) consisting of alternating horizontal and vertical lines. The y-value
+ changes at the midpoint of each pair of adjacent x-values. - `"step-before"`: a
+ piecewise constant function (a step function) consisting of alternating horizontal
+ and vertical lines. The y-value changes before the x-value. - `"step-after"`: a
+ piecewise constant function (a step function) consisting of alternating horizontal
+ and vertical lines. The y-value changes after the x-value. - `"basis"`: a B-spline,
+ with control point duplication on the ends. - `"basis-open"`: an open B-spline; may
+ not intersect the start or end. - `"basis-closed"`: a closed B-spline, as in a loop.
+ - `"cardinal"`: a Cardinal spline, with control point duplication on the ends. -
+ `"cardinal-open"`: an open Cardinal spline; may not intersect the start or end, but
+ will intersect other control points. - `"cardinal-closed"`: a closed Cardinal
+ spline, as in a loop. - `"bundle"`: equivalent to basis, except the tension
+ parameter is used to straighten the spline. - ``"monotone"`` : cubic interpolation
+ that preserves monotonicity in y.
+ opacity : float
+ The opacity (value between [0,1]) of the mark.
+ orient : :class:`Orientation`
+ Orientation of the error band. This is normally automatically determined, but can be
+ specified when the orientation is ambiguous and cannot be automatically determined.
+ tension : float
+ The tension parameter for the interpolation type of the error band.
+ """
+ _schema = {'$ref': '#/definitions/ErrorBandDef'}
+
+ def __init__(self, type=Undefined, band=Undefined, borders=Undefined, clip=Undefined,
+ color=Undefined, extent=Undefined, interpolate=Undefined, opacity=Undefined,
+ orient=Undefined, tension=Undefined, **kwds):
+ super(ErrorBandDef, self).__init__(type=type, band=band, borders=borders, clip=clip,
+ color=color, extent=extent, interpolate=interpolate,
+ opacity=opacity, orient=orient, tension=tension, **kwds)
+
+
+class ErrorBar(CompositeMark):
+ """ErrorBar schema wrapper
+
+ string
+ """
+ _schema = {'$ref': '#/definitions/ErrorBar'}
+
+ def __init__(self, *args):
+ super(ErrorBar, self).__init__(*args)
+
+
+class ErrorBarConfig(VegaLiteSchema):
+ """ErrorBarConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ extent : :class:`ErrorBarExtent`
+ The extent of the rule. Available options include: - `"ci"`: Extend the rule to the
+ confidence interval of the mean. - `"stderr"`: The size of rule are set to the value
+ of standard error, extending from the mean. - `"stdev"`: The size of rule are set to
+ the value of standard deviation, extending from the mean. - `"iqr"`: Extend the rule
+ to the q1 and q3.
+
+ **Default value:** ``"stderr"``.
+ rule : anyOf(boolean, :class:`MarkConfigExprOrSignalRef`)
+
+ size : float
+ Size of the ticks of an error bar
+ thickness : float
+ Thickness of the ticks and the bar of an error bar
+ ticks : anyOf(boolean, :class:`MarkConfigExprOrSignalRef`)
+
+ """
+ _schema = {'$ref': '#/definitions/ErrorBarConfig'}
+
+ def __init__(self, extent=Undefined, rule=Undefined, size=Undefined, thickness=Undefined,
+ ticks=Undefined, **kwds):
+ super(ErrorBarConfig, self).__init__(extent=extent, rule=rule, size=size, thickness=thickness,
+ ticks=ticks, **kwds)
+
+
+class ErrorBarDef(CompositeMarkDef):
+ """ErrorBarDef schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : :class:`ErrorBar`
+ The mark type. This could a primitive mark type (one of ``"bar"``, ``"circle"``,
+ ``"square"``, ``"tick"``, ``"line"``, ``"area"``, ``"point"``, ``"geoshape"``,
+ ``"rule"``, and ``"text"`` ) or a composite mark type ( ``"boxplot"``,
+ ``"errorband"``, ``"errorbar"`` ).
+ clip : boolean
+ Whether a composite mark be clipped to the enclosing group’s width and height.
+ color : anyOf(:class:`Color`, :class:`Gradient`, :class:`ExprRef`)
+ Default color.
+
+ **Default value:** :raw-html:`<span style="color: #4682b4;">&#9632;</span>`
+ ``"#4682b4"``
+
+ **Note:** - This property cannot be used in a `style config
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. - The ``fill``
+ and ``stroke`` properties have higher precedence than ``color`` and will override
+ ``color``.
+ extent : :class:`ErrorBarExtent`
+ The extent of the rule. Available options include: - `"ci"`: Extend the rule to the
+ confidence interval of the mean. - `"stderr"`: The size of rule are set to the value
+ of standard error, extending from the mean. - `"stdev"`: The size of rule are set to
+ the value of standard deviation, extending from the mean. - `"iqr"`: Extend the rule
+ to the q1 and q3.
+
+ **Default value:** ``"stderr"``.
+ opacity : float
+ The opacity (value between [0,1]) of the mark.
+ orient : :class:`Orientation`
+ Orientation of the error bar. This is normally automatically determined, but can be
+ specified when the orientation is ambiguous and cannot be automatically determined.
+ rule : anyOf(boolean, :class:`MarkConfigExprOrSignalRef`)
+
+ size : float
+ Size of the ticks of an error bar
+ thickness : float
+ Thickness of the ticks and the bar of an error bar
+ ticks : anyOf(boolean, :class:`MarkConfigExprOrSignalRef`)
+
+ """
+ _schema = {'$ref': '#/definitions/ErrorBarDef'}
+
+ def __init__(self, type=Undefined, clip=Undefined, color=Undefined, extent=Undefined,
+ opacity=Undefined, orient=Undefined, rule=Undefined, size=Undefined,
+ thickness=Undefined, ticks=Undefined, **kwds):
+ super(ErrorBarDef, self).__init__(type=type, clip=clip, color=color, extent=extent,
+ opacity=opacity, orient=orient, rule=rule, size=size,
+ thickness=thickness, ticks=ticks, **kwds)
+
+
+class ErrorBarExtent(VegaLiteSchema):
+ """ErrorBarExtent schema wrapper
+
+ enum('ci', 'iqr', 'stderr', 'stdev')
+ """
+ _schema = {'$ref': '#/definitions/ErrorBarExtent'}
+
+ def __init__(self, *args):
+ super(ErrorBarExtent, self).__init__(*args)
+
+
+class Expr(VegaLiteSchema):
+ """Expr schema wrapper
+
+ string
+ """
+ _schema = {'$ref': '#/definitions/Expr'}
+
+ def __init__(self, *args):
+ super(Expr, self).__init__(*args)
+
+
+class ExprOrSignalRef(VegaLiteSchema):
+ """ExprOrSignalRef schema wrapper
+
+ Mapping(required=[expr])
+
+ Attributes
+ ----------
+
+ expr : string
+ Vega expression (which can refer to Vega-Lite parameters).
+ """
+ _schema = {'$ref': '#/definitions/ExprOrSignalRef'}
+
+ def __init__(self, expr=Undefined, **kwds):
+ super(ExprOrSignalRef, self).__init__(expr=expr, **kwds)
+
+
+class ExprRef(VegaLiteSchema):
+ """ExprRef schema wrapper
+
+ Mapping(required=[expr])
+
+ Attributes
+ ----------
+
+ expr : string
+ Vega expression (which can refer to Vega-Lite parameters).
+ """
+ _schema = {'$ref': '#/definitions/ExprRef'}
+
+ def __init__(self, expr=Undefined, **kwds):
+ super(ExprRef, self).__init__(expr=expr, **kwds)
+
+
+class FacetEncodingFieldDef(VegaLiteSchema):
+ """FacetEncodingFieldDef schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ align : anyOf(:class:`LayoutAlign`, :class:`RowColLayoutAlign`)
+ The alignment to apply to grid rows and columns. The supported string values are
+ ``"all"``, ``"each"``, and ``"none"``.
+
+
+ * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply
+ placed one after the other. - For ``"each"``, subviews will be aligned into a
+ clean grid structure, but each row or column may be of variable size. - For
+ ``"all"``, subviews will be aligned and each row or column will be sized
+ identically based on the maximum observed size. String values for this property
+ will be applied to both grid rows and columns.
+
+ Alternatively, an object value of the form ``{"row": string, "column": string}`` can
+ be used to supply different alignments for rows and columns.
+
+ **Default value:** ``"all"``.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ bounds : enum('full', 'flush')
+ The bounds calculation method to use for determining the extent of a sub-plot. One
+ of ``full`` (the default) or ``flush``.
+
+
+ * If set to ``full``, the entire calculated bounds (including axes, title, and
+ legend) will be used. - If set to ``flush``, only the specified width and height
+ values for the sub-view will be used. The ``flush`` setting can be useful when
+ attempting to place sub-plots without axes or legends into a uniform grid
+ structure.
+
+ **Default value:** ``"full"``
+ center : anyOf(boolean, :class:`RowColboolean`)
+ Boolean flag indicating if subviews should be centered relative to their respective
+ rows or columns.
+
+ An object value of the form ``{"row": boolean, "column": boolean}`` can be used to
+ supply different centering values for rows and columns.
+
+ **Default value:** ``false``
+ columns : float
+ The number of columns to include in the view composition layout.
+
+ **Default value** : ``undefined`` -- An infinite number of columns (a single row)
+ will be assumed. This is equivalent to ``hconcat`` (for ``concat`` ) and to using
+ the ``column`` channel (for ``facet`` and ``repeat`` ).
+
+ **Note** :
+
+ 1) This property is only for: - the general (wrappable) ``concat`` operator (not
+ ``hconcat`` / ``vconcat`` ) - the ``facet`` and ``repeat`` operator with one
+ field/repetition definition (without row/column nesting)
+
+ 2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat`` )
+ and to using the ``row`` channel (for ``facet`` and ``repeat`` ).
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ header : :class:`Header`
+ An object defining properties of a facet's header.
+ sort : anyOf(:class:`SortArray`, :class:`SortOrder`, :class:`EncodingSortField`, None)
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following: - ``"ascending"`` or
+ ``"descending"`` -- for sorting by the values' natural order in JavaScript. - `A
+ sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field. - `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values in
+ their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ). - ``null``
+ indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` is not supported for ``row`` and ``column``.
+ spacing : anyOf(float, :class:`RowColnumber`)
+ The spacing in pixels between sub-views of the composition operator. An object of
+ the form ``{"row": number, "column": number}`` can be used to set different spacing
+ values for rows and columns.
+
+ **Default value** : Depends on ``"spacing"`` property of `the view composition
+ configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__ (
+ ``20`` by default)
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _schema = {'$ref': '#/definitions/FacetEncodingFieldDef'}
+
+ def __init__(self, aggregate=Undefined, align=Undefined, band=Undefined, bin=Undefined,
+ bounds=Undefined, center=Undefined, columns=Undefined, field=Undefined,
+ header=Undefined, sort=Undefined, spacing=Undefined, timeUnit=Undefined,
+ title=Undefined, type=Undefined, **kwds):
+ super(FacetEncodingFieldDef, self).__init__(aggregate=aggregate, align=align, band=band,
+ bin=bin, bounds=bounds, center=center,
+ columns=columns, field=field, header=header,
+ sort=sort, spacing=spacing, timeUnit=timeUnit,
+ title=title, type=type, **kwds)
+
+
+class FacetFieldDef(VegaLiteSchema):
+ """FacetFieldDef schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ header : :class:`Header`
+ An object defining properties of a facet's header.
+ sort : anyOf(:class:`SortArray`, :class:`SortOrder`, :class:`EncodingSortField`, None)
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following: - ``"ascending"`` or
+ ``"descending"`` -- for sorting by the values' natural order in JavaScript. - `A
+ sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field. - `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values in
+ their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ). - ``null``
+ indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` is not supported for ``row`` and ``column``.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _schema = {'$ref': '#/definitions/FacetFieldDef'}
+
+ def __init__(self, aggregate=Undefined, band=Undefined, bin=Undefined, field=Undefined,
+ header=Undefined, sort=Undefined, timeUnit=Undefined, title=Undefined, type=Undefined,
+ **kwds):
+ super(FacetFieldDef, self).__init__(aggregate=aggregate, band=band, bin=bin, field=field,
+ header=header, sort=sort, timeUnit=timeUnit, title=title,
+ type=type, **kwds)
+
+
+class FacetFieldDefFieldName(VegaLiteSchema):
+ """FacetFieldDefFieldName schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`FieldName`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ header : :class:`Header`
+ An object defining properties of a facet's header.
+ sort : anyOf(:class:`SortArray`, :class:`SortOrder`, :class:`EncodingSortFieldFieldName`,
+ None)
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following: - ``"ascending"`` or
+ ``"descending"`` -- for sorting by the values' natural order in JavaScript. - `A
+ sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field. - `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values in
+ their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ). - ``null``
+ indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` is not supported for ``row`` and ``column``.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _schema = {'$ref': '#/definitions/FacetFieldDef<FieldName>'}
+
+ def __init__(self, aggregate=Undefined, band=Undefined, bin=Undefined, field=Undefined,
+ header=Undefined, sort=Undefined, timeUnit=Undefined, title=Undefined, type=Undefined,
+ **kwds):
+ super(FacetFieldDefFieldName, self).__init__(aggregate=aggregate, band=band, bin=bin,
+ field=field, header=header, sort=sort,
+ timeUnit=timeUnit, title=title, type=type, **kwds)
+
+
+class FacetMapping(VegaLiteSchema):
+ """FacetMapping schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ column : :class:`FacetFieldDef`
+ A field definition for the horizontal facet of trellis plots.
+ row : :class:`FacetFieldDef`
+ A field definition for the vertical facet of trellis plots.
+ """
+ _schema = {'$ref': '#/definitions/FacetMapping'}
+
+ def __init__(self, column=Undefined, row=Undefined, **kwds):
+ super(FacetMapping, self).__init__(column=column, row=row, **kwds)
+
+
+class FacetMappingFieldName(VegaLiteSchema):
+ """FacetMappingFieldName schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ column : :class:`FacetFieldDefFieldName`
+ A field definition for the horizontal facet of trellis plots.
+ row : :class:`FacetFieldDefFieldName`
+ A field definition for the vertical facet of trellis plots.
+ """
+ _schema = {'$ref': '#/definitions/FacetMapping<FieldName>'}
+
+ def __init__(self, column=Undefined, row=Undefined, **kwds):
+ super(FacetMappingFieldName, self).__init__(column=column, row=row, **kwds)
+
+
+class FacetedEncoding(VegaLiteSchema):
+ """FacetedEncoding schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ angle : :class:`NumericMarkPropDef`
+ Rotation angle of point and text marks.
+ color : :class:`ColorDef`
+ Color of the marks – either fill or stroke color based on the ``filled`` property
+ of mark definition. By default, ``color`` represents fill color for ``"area"``,
+ ``"bar"``, ``"tick"``, ``"text"``, ``"trail"``, ``"circle"``, and ``"square"`` /
+ stroke color for ``"line"`` and ``"point"``.
+
+ **Default value:** If undefined, the default color depends on `mark config
+ <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__ 's ``color``
+ property.
+
+ *Note:* 1) For fine-grained control over both fill and stroke colors of the marks,
+ please use the ``fill`` and ``stroke`` channels. The ``fill`` or ``stroke``
+ encodings have higher precedence than ``color``, thus may override the ``color``
+ encoding if conflicting encodings are specified. 2) See the scale documentation for
+ more information about customizing `color scheme
+ <https://vega.github.io/vega-lite/docs/scale.html#scheme>`__.
+ column : :class:`RowColumnEncodingFieldDef`
+ A field definition for the horizontal facet of trellis plots.
+ description : anyOf(:class:`StringFieldDefWithCondition`,
+ :class:`StringValueDefWithCondition`)
+ A text description of this mark for ARIA accessibility (SVG output only). For SVG
+ output the ``"aria-label"`` attribute will be set to this description.
+ detail : anyOf(:class:`FieldDefWithoutScale`, List(:class:`FieldDefWithoutScale`))
+ Additional levels of detail for grouping data in aggregate views and in line, trail,
+ and area marks without mapping data to a specific visual channel.
+ facet : :class:`FacetEncodingFieldDef`
+ A field definition for the (flexible) facet of trellis plots.
+
+ If either ``row`` or ``column`` is specified, this channel will be ignored.
+ fill : :class:`ColorDef`
+ Fill color of the marks. **Default value:** If undefined, the default color depends
+ on `mark config <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__
+ 's ``color`` property.
+
+ *Note:* The ``fill`` encoding has higher precedence than ``color``, thus may
+ override the ``color`` encoding if conflicting encodings are specified.
+ fillOpacity : :class:`NumericMarkPropDef`
+ Fill opacity of the marks.
+
+ **Default value:** If undefined, the default opacity depends on `mark config
+ <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__ 's
+ ``fillOpacity`` property.
+ href : anyOf(:class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition`)
+ A URL to load upon mouse click.
+ key : :class:`FieldDefWithoutScale`
+ A data field to use as a unique key for data binding. When a visualization’s data is
+ updated, the key value will be used to match data elements to existing mark
+ instances. Use a key channel to enable object constancy for transitions over dynamic
+ data.
+ latitude : :class:`LatLongDef`
+ Latitude position of geographically projected marks.
+ latitude2 : :class:`Position2Def`
+ Latitude-2 position for geographically projected ranged ``"area"``, ``"bar"``,
+ ``"rect"``, and ``"rule"``.
+ longitude : :class:`LatLongDef`
+ Longitude position of geographically projected marks.
+ longitude2 : :class:`Position2Def`
+ Longitude-2 position for geographically projected ranged ``"area"``, ``"bar"``,
+ ``"rect"``, and ``"rule"``.
+ opacity : :class:`NumericMarkPropDef`
+ Opacity of the marks.
+
+ **Default value:** If undefined, the default opacity depends on `mark config
+ <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__ 's ``opacity``
+ property.
+ order : anyOf(:class:`OrderFieldDef`, List(:class:`OrderFieldDef`), :class:`OrderValueDef`)
+ Order of the marks. - For stacked marks, this ``order`` channel encodes `stack order
+ <https://vega.github.io/vega-lite/docs/stack.html#order>`__. - For line and trail
+ marks, this ``order`` channel encodes order of data points in the lines. This can be
+ useful for creating `a connected scatterplot
+ <https://vega.github.io/vega-lite/examples/connected_scatterplot.html>`__. Setting
+ ``order`` to ``{"value": null}`` makes the line marks use the original order in the
+ data sources. - Otherwise, this ``order`` channel encodes layer order of the marks.
+
+ **Note** : In aggregate plots, ``order`` field should be ``aggregate`` d to avoid
+ creating additional aggregation grouping.
+ radius : :class:`PolarDef`
+ The outer radius in pixels of arc marks.
+ radius2 : :class:`Position2Def`
+ The inner radius in pixels of arc marks.
+ row : :class:`RowColumnEncodingFieldDef`
+ A field definition for the vertical facet of trellis plots.
+ shape : :class:`ShapeDef`
+ Shape of the mark.
+
+
+ #.
+ For ``point`` marks the supported values include: - plotting shapes:
+ ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``, ``"triangle-up"``,
+ ``"triangle-down"``, ``"triangle-right"``, or ``"triangle-left"``. - the line
+ symbol ``"stroke"`` - centered directional shapes ``"arrow"``, ``"wedge"``, or
+ ``"triangle"`` - a custom `SVG path string
+ <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct
+ sizing, custom shape paths should be defined within a square bounding box with
+ coordinates ranging from -1 to 1 along both the x and y dimensions.)
+
+ #.
+ For ``geoshape`` marks it should be a field definition of the geojson data
+
+ **Default value:** If undefined, the default shape depends on `mark config
+ <https://vega.github.io/vega-lite/docs/config.html#point-config>`__ 's ``shape``
+ property. ( ``"circle"`` if unset.)
+ size : :class:`NumericMarkPropDef`
+ Size of the mark. - For ``"point"``, ``"square"`` and ``"circle"``, – the symbol
+ size, or pixel area of the mark. - For ``"bar"`` and ``"tick"`` – the bar and tick's
+ size. - For ``"text"`` – the text's font size. - Size is unsupported for ``"line"``,
+ ``"area"``, and ``"rect"``. (Use ``"trail"`` instead of line with varying size)
+ stroke : :class:`ColorDef`
+ Stroke color of the marks. **Default value:** If undefined, the default color
+ depends on `mark config
+ <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__ 's ``color``
+ property.
+
+ *Note:* The ``stroke`` encoding has higher precedence than ``color``, thus may
+ override the ``color`` encoding if conflicting encodings are specified.
+ strokeDash : :class:`NumericArrayMarkPropDef`
+ Stroke dash of the marks.
+
+ **Default value:** ``[1,0]`` (No dash).
+ strokeOpacity : :class:`NumericMarkPropDef`
+ Stroke opacity of the marks.
+
+ **Default value:** If undefined, the default opacity depends on `mark config
+ <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__ 's
+ ``strokeOpacity`` property.
+ strokeWidth : :class:`NumericMarkPropDef`
+ Stroke width of the marks.
+
+ **Default value:** If undefined, the default stroke width depends on `mark config
+ <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__ 's
+ ``strokeWidth`` property.
+ text : :class:`TextDef`
+ Text of the ``text`` mark.
+ theta : :class:`PolarDef`
+ For arc marks, the arc length in radians if theta2 is not specified, otherwise the
+ start arc angle. (A value of 0 indicates up or “north”, increasing values proceed
+ clockwise.)
+
+ For text marks, polar coordinate angle in radians.
+ theta2 : :class:`Position2Def`
+ The end angle of arc marks in radians. A value of 0 indicates up or “north”,
+ increasing values proceed clockwise.
+ tooltip : anyOf(:class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition`,
+ List(:class:`StringFieldDef`), None)
+ The tooltip text to show upon mouse hover. Specifying ``tooltip`` encoding overrides
+ `the tooltip property in the mark definition
+ <https://vega.github.io/vega-lite/docs/mark.html#mark-def>`__.
+
+ See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__
+ documentation for a detailed discussion about tooltip in Vega-Lite.
+ url : anyOf(:class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition`)
+ The URL of an image mark.
+ x : :class:`PositionDef`
+ X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without
+ specified ``x2`` or ``width``.
+
+ The ``value`` of this channel can be a number or a string ``"width"`` for the width
+ of the plot.
+ x2 : :class:`Position2Def`
+ X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
+
+ The ``value`` of this channel can be a number or a string ``"width"`` for the width
+ of the plot.
+ xError : anyOf(:class:`SecondaryFieldDef`, :class:`ValueDefnumber`)
+ Error value of x coordinates for error specified ``"errorbar"`` and ``"errorband"``.
+ xError2 : anyOf(:class:`SecondaryFieldDef`, :class:`ValueDefnumber`)
+ Secondary error value of x coordinates for error specified ``"errorbar"`` and
+ ``"errorband"``.
+ y : :class:`PositionDef`
+ Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without
+ specified ``y2`` or ``height``.
+
+ The ``value`` of this channel can be a number or a string ``"height"`` for the
+ height of the plot.
+ y2 : :class:`Position2Def`
+ Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
+
+ The ``value`` of this channel can be a number or a string ``"height"`` for the
+ height of the plot.
+ yError : anyOf(:class:`SecondaryFieldDef`, :class:`ValueDefnumber`)
+ Error value of y coordinates for error specified ``"errorbar"`` and ``"errorband"``.
+ yError2 : anyOf(:class:`SecondaryFieldDef`, :class:`ValueDefnumber`)
+ Secondary error value of y coordinates for error specified ``"errorbar"`` and
+ ``"errorband"``.
+ """
+ _schema = {'$ref': '#/definitions/FacetedEncoding'}
+
+ def __init__(self, angle=Undefined, color=Undefined, column=Undefined, description=Undefined,
+ detail=Undefined, facet=Undefined, fill=Undefined, fillOpacity=Undefined,
+ href=Undefined, key=Undefined, latitude=Undefined, latitude2=Undefined,
+ longitude=Undefined, longitude2=Undefined, opacity=Undefined, order=Undefined,
+ radius=Undefined, radius2=Undefined, row=Undefined, shape=Undefined, size=Undefined,
+ stroke=Undefined, strokeDash=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined,
+ text=Undefined, theta=Undefined, theta2=Undefined, tooltip=Undefined, url=Undefined,
+ x=Undefined, x2=Undefined, xError=Undefined, xError2=Undefined, y=Undefined,
+ y2=Undefined, yError=Undefined, yError2=Undefined, **kwds):
+ super(FacetedEncoding, self).__init__(angle=angle, color=color, column=column,
+ description=description, detail=detail, facet=facet,
+ fill=fill, fillOpacity=fillOpacity, href=href, key=key,
+ latitude=latitude, latitude2=latitude2,
+ longitude=longitude, longitude2=longitude2,
+ opacity=opacity, order=order, radius=radius,
+ radius2=radius2, row=row, shape=shape, size=size,
+ stroke=stroke, strokeDash=strokeDash,
+ strokeOpacity=strokeOpacity, strokeWidth=strokeWidth,
+ text=text, theta=theta, theta2=theta2, tooltip=tooltip,
+ url=url, x=x, x2=x2, xError=xError, xError2=xError2, y=y,
+ y2=y2, yError=yError, yError2=yError2, **kwds)
+
+
+class Field(VegaLiteSchema):
+ """Field schema wrapper
+
+ anyOf(:class:`FieldName`, :class:`RepeatRef`)
+ """
+ _schema = {'$ref': '#/definitions/Field'}
+
+ def __init__(self, *args, **kwds):
+ super(Field, self).__init__(*args, **kwds)
+
+
+class FieldDefWithoutScale(VegaLiteSchema):
+ """FieldDefWithoutScale schema wrapper
+
+ Mapping(required=[])
+ Definition object for a data field, its type and transformation of an encoding channel.
+
+ Attributes
+ ----------
+
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : anyOf(boolean, :class:`BinParams`, string, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _schema = {'$ref': '#/definitions/FieldDefWithoutScale'}
+
+ def __init__(self, aggregate=Undefined, band=Undefined, bin=Undefined, field=Undefined,
+ timeUnit=Undefined, title=Undefined, type=Undefined, **kwds):
+ super(FieldDefWithoutScale, self).__init__(aggregate=aggregate, band=band, bin=bin, field=field,
+ timeUnit=timeUnit, title=title, type=type, **kwds)
+
+
+class FieldName(Field):
+ """FieldName schema wrapper
+
+ string
+ """
+ _schema = {'$ref': '#/definitions/FieldName'}
+
+ def __init__(self, *args):
+ super(FieldName, self).__init__(*args)
+
+
+class FieldOrDatumDefWithConditionStringFieldDefstring(VegaLiteSchema):
+ """FieldOrDatumDefWithConditionStringFieldDefstring schema wrapper
+
+ Mapping(required=[])
+ A FieldDef with Condition :raw-html:`<ValueDef>` { condition: {value: ...}, field:
+ ..., ... }
+
+ Attributes
+ ----------
+
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : anyOf(boolean, :class:`BinParams`, string, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ condition : anyOf(:class:`ConditionalValueDefstringExprRef`,
+ List(:class:`ConditionalValueDefstringExprRef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ format : anyOf(string, :class:`Dictunknown`)
+ When used with the default ``"number"`` and ``"time"`` format type, the text
+ formatting pattern for labels of guides (axes, legends, headers) and text marks.
+
+
+ * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
+ `number format pattern <https://github.com/d3/d3-format#locale_format>`__. - If
+ the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
+ format pattern <https://github.com/d3/d3-time-format#locale_format>`__.
+
+ See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
+ for more examples.
+
+ When used with a `custom formatType
+ <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this
+ value will be passed as ``format`` alongside ``datum.value`` to the registered
+ function.
+
+ **Default value:** Derived from `numberFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
+ format and from `timeFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
+ format.
+ formatType : string
+ The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom
+ format type
+ <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.
+
+ **Default value:** - ``"time"`` for temporal fields and ordinal and nominal fields
+ with ``timeUnit``. - ``"number"`` for quantitative fields as well as ordinal and
+ nominal fields without ``timeUnit``.
+ labelExpr : string
+ `Vega expression <https://vega.github.io/vega/docs/expressions/>`__ for customizing
+ labels text.
+
+ **Note:** The label text and value can be assessed via the ``label`` and ``value``
+ properties of the axis's backing ``datum`` object.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _schema = {'$ref': '#/definitions/FieldOrDatumDefWithCondition<StringFieldDef,string>'}
+
+ def __init__(self, aggregate=Undefined, band=Undefined, bin=Undefined, condition=Undefined,
+ field=Undefined, format=Undefined, formatType=Undefined, labelExpr=Undefined,
+ timeUnit=Undefined, title=Undefined, type=Undefined, **kwds):
+ super(FieldOrDatumDefWithConditionStringFieldDefstring, self).__init__(aggregate=aggregate,
+ band=band, bin=bin,
+ condition=condition,
+ field=field,
+ format=format,
+ formatType=formatType,
+ labelExpr=labelExpr,
+ timeUnit=timeUnit,
+ title=title, type=type,
+ **kwds)
+
+
+class Fit(VegaLiteSchema):
+ """Fit schema wrapper
+
+ anyOf(:class:`GeoJsonFeature`, :class:`GeoJsonFeatureCollection`,
+ List(:class:`GeoJsonFeature`))
+ """
+ _schema = {'$ref': '#/definitions/Fit'}
+
+ def __init__(self, *args, **kwds):
+ super(Fit, self).__init__(*args, **kwds)
+
+
+class FontStyle(VegaLiteSchema):
+ """FontStyle schema wrapper
+
+ string
+ """
+ _schema = {'$ref': '#/definitions/FontStyle'}
+
+ def __init__(self, *args):
+ super(FontStyle, self).__init__(*args)
+
+
+class FontWeight(VegaLiteSchema):
+ """FontWeight schema wrapper
+
+ enum('normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900)
+ """
+ _schema = {'$ref': '#/definitions/FontWeight'}
+
+ def __init__(self, *args):
+ super(FontWeight, self).__init__(*args)
+
+
+class Generator(Data):
+ """Generator schema wrapper
+
+ anyOf(:class:`SequenceGenerator`, :class:`SphereGenerator`, :class:`GraticuleGenerator`)
+ """
+ _schema = {'$ref': '#/definitions/Generator'}
+
+ def __init__(self, *args, **kwds):
+ super(Generator, self).__init__(*args, **kwds)
+
+
+class GeoJsonFeature(Fit):
+ """GeoJsonFeature schema wrapper
+
+ Any
+ """
+ _schema = {'$ref': '#/definitions/GeoJsonFeature'}
+
+ def __init__(self, *args, **kwds):
+ super(GeoJsonFeature, self).__init__(*args, **kwds)
+
+
+class GeoJsonFeatureCollection(Fit):
+ """GeoJsonFeatureCollection schema wrapper
+
+ Any
+ """
+ _schema = {'$ref': '#/definitions/GeoJsonFeatureCollection'}
+
+ def __init__(self, *args, **kwds):
+ super(GeoJsonFeatureCollection, self).__init__(*args, **kwds)
+
+
+class Gradient(VegaLiteSchema):
+ """Gradient schema wrapper
+
+ anyOf(:class:`LinearGradient`, :class:`RadialGradient`)
+ """
+ _schema = {'$ref': '#/definitions/Gradient'}
+
+ def __init__(self, *args, **kwds):
+ super(Gradient, self).__init__(*args, **kwds)
+
+
+class GradientStop(VegaLiteSchema):
+ """GradientStop schema wrapper
+
+ Mapping(required=[offset, color])
+
+ Attributes
+ ----------
+
+ color : :class:`Color`
+ The color value at this point in the gradient.
+ offset : float
+ The offset fraction for the color stop, indicating its position within the gradient.
+ """
+ _schema = {'$ref': '#/definitions/GradientStop'}
+
+ def __init__(self, color=Undefined, offset=Undefined, **kwds):
+ super(GradientStop, self).__init__(color=color, offset=offset, **kwds)
+
+
+class GraticuleGenerator(Generator):
+ """GraticuleGenerator schema wrapper
+
+ Mapping(required=[graticule])
+
+ Attributes
+ ----------
+
+ graticule : anyOf(boolean, :class:`GraticuleParams`)
+ Generate graticule GeoJSON data for geographic reference lines.
+ name : string
+ Provide a placeholder name and bind data at runtime.
+ """
+ _schema = {'$ref': '#/definitions/GraticuleGenerator'}
+
+ def __init__(self, graticule=Undefined, name=Undefined, **kwds):
+ super(GraticuleGenerator, self).__init__(graticule=graticule, name=name, **kwds)
+
+
+class GraticuleParams(VegaLiteSchema):
+ """GraticuleParams schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ extent : :class:`Vector2Vector2number`
+ Sets both the major and minor extents to the same values.
+ extentMajor : :class:`Vector2Vector2number`
+ The major extent of the graticule as a two-element array of coordinates.
+ extentMinor : :class:`Vector2Vector2number`
+ The minor extent of the graticule as a two-element array of coordinates.
+ precision : float
+ The precision of the graticule in degrees.
+
+ **Default value:** ``2.5``
+ step : :class:`Vector2number`
+ Sets both the major and minor step angles to the same values.
+ stepMajor : :class:`Vector2number`
+ The major step angles of the graticule.
+
+ **Default value:** ``[90, 360]``
+ stepMinor : :class:`Vector2number`
+ The minor step angles of the graticule.
+
+ **Default value:** ``[10, 10]``
+ """
+ _schema = {'$ref': '#/definitions/GraticuleParams'}
+
+ def __init__(self, extent=Undefined, extentMajor=Undefined, extentMinor=Undefined,
+ precision=Undefined, step=Undefined, stepMajor=Undefined, stepMinor=Undefined, **kwds):
+ super(GraticuleParams, self).__init__(extent=extent, extentMajor=extentMajor,
+ extentMinor=extentMinor, precision=precision, step=step,
+ stepMajor=stepMajor, stepMinor=stepMinor, **kwds)
+
+
+class Header(VegaLiteSchema):
+ """Header schema wrapper
+
+ Mapping(required=[])
+ Headers of row / column channels for faceted plots.
+
+ Attributes
+ ----------
+
+ format : anyOf(string, :class:`Dictunknown`)
+ When used with the default ``"number"`` and ``"time"`` format type, the text
+ formatting pattern for labels of guides (axes, legends, headers) and text marks.
+
+
+ * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
+ `number format pattern <https://github.com/d3/d3-format#locale_format>`__. - If
+ the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
+ format pattern <https://github.com/d3/d3-time-format#locale_format>`__.
+
+ See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
+ for more examples.
+
+ When used with a `custom formatType
+ <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this
+ value will be passed as ``format`` alongside ``datum.value`` to the registered
+ function.
+
+ **Default value:** Derived from `numberFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
+ format and from `timeFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
+ format.
+ formatType : string
+ The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom
+ format type
+ <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.
+
+ **Default value:** - ``"time"`` for temporal fields and ordinal and nominal fields
+ with ``timeUnit``. - ``"number"`` for quantitative fields as well as ordinal and
+ nominal fields without ``timeUnit``.
+ labelAlign : anyOf(:class:`Align`, :class:`ExprRef`)
+ Horizontal text alignment of header labels. One of ``"left"``, ``"center"``, or
+ ``"right"``.
+ labelAnchor : :class:`TitleAnchor`
+ The anchor position for placing the labels. One of ``"start"``, ``"middle"``, or
+ ``"end"``. For example, with a label orientation of top these anchor positions map
+ to a left-, center-, or right-aligned label.
+ labelAngle : float
+ The rotation angle of the header labels.
+
+ **Default value:** ``0`` for column header, ``-90`` for row header.
+ labelBaseline : anyOf(:class:`TextBaseline`, :class:`ExprRef`)
+ The vertical text baseline for the header labels. One of ``"alphabetic"`` (default),
+ ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, or ``"line-bottom"``. The
+ ``"line-top"`` and ``"line-bottom"`` values operate similarly to ``"top"`` and
+ ``"bottom"``, but are calculated relative to the ``titleLineHeight`` rather than
+ ``titleFontSize`` alone.
+ labelColor : anyOf(:class:`Color`, :class:`ExprRef`)
+ The color of the header label, can be in hex color code or regular color name.
+ labelExpr : string
+ `Vega expression <https://vega.github.io/vega/docs/expressions/>`__ for customizing
+ labels.
+
+ **Note:** The label text and value can be assessed via the ``label`` and ``value``
+ properties of the header's backing ``datum`` object.
+ labelFont : anyOf(string, :class:`ExprRef`)
+ The font of the header label.
+ labelFontSize : anyOf(float, :class:`ExprRef`)
+ The font size of the header label, in pixels.
+ labelFontStyle : anyOf(:class:`FontStyle`, :class:`ExprRef`)
+ The font style of the header label.
+ labelFontWeight : anyOf(:class:`FontWeight`, :class:`ExprRef`)
+ The font weight of the header label.
+ labelLimit : anyOf(float, :class:`ExprRef`)
+ The maximum length of the header label in pixels. The text value will be
+ automatically truncated if the rendered size exceeds the limit.
+
+ **Default value:** ``0``, indicating no limit
+ labelLineHeight : anyOf(float, :class:`ExprRef`)
+ Line height in pixels for multi-line header labels or title text with ``"line-top"``
+ or ``"line-bottom"`` baseline.
+ labelOrient : :class:`Orient`
+ The orientation of the header label. One of ``"top"``, ``"bottom"``, ``"left"`` or
+ ``"right"``.
+ labelPadding : anyOf(float, :class:`ExprRef`)
+ The padding, in pixel, between facet header's label and the plot.
+
+ **Default value:** ``10``
+ labels : boolean
+ A boolean flag indicating if labels should be included as part of the header.
+
+ **Default value:** ``true``.
+ orient : :class:`Orient`
+ Shortcut for setting both labelOrient and titleOrient.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ titleAlign : anyOf(:class:`Align`, :class:`ExprRef`)
+ Horizontal text alignment (to the anchor) of header titles.
+ titleAnchor : :class:`TitleAnchor`
+ The anchor position for placing the title. One of ``"start"``, ``"middle"``, or
+ ``"end"``. For example, with an orientation of top these anchor positions map to a
+ left-, center-, or right-aligned title.
+ titleAngle : float
+ The rotation angle of the header title.
+
+ **Default value:** ``0``.
+ titleBaseline : anyOf(:class:`TextBaseline`, :class:`ExprRef`)
+ The vertical text baseline for the header title. One of ``"alphabetic"`` (default),
+ ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, or ``"line-bottom"``. The
+ ``"line-top"`` and ``"line-bottom"`` values operate similarly to ``"top"`` and
+ ``"bottom"``, but are calculated relative to the ``titleLineHeight`` rather than
+ ``titleFontSize`` alone.
+
+ **Default value:** ``"middle"``
+ titleColor : anyOf(:class:`Color`, :class:`ExprRef`)
+ Color of the header title, can be in hex color code or regular color name.
+ titleFont : anyOf(string, :class:`ExprRef`)
+ Font of the header title. (e.g., ``"Helvetica Neue"`` ).
+ titleFontSize : anyOf(float, :class:`ExprRef`)
+ Font size of the header title.
+ titleFontStyle : anyOf(:class:`FontStyle`, :class:`ExprRef`)
+ The font style of the header title.
+ titleFontWeight : anyOf(:class:`FontWeight`, :class:`ExprRef`)
+ Font weight of the header title. This can be either a string (e.g ``"bold"``,
+ ``"normal"`` ) or a number ( ``100``, ``200``, ``300``, ..., ``900`` where
+ ``"normal"`` = ``400`` and ``"bold"`` = ``700`` ).
+ titleLimit : anyOf(float, :class:`ExprRef`)
+ The maximum length of the header title in pixels. The text value will be
+ automatically truncated if the rendered size exceeds the limit.
+
+ **Default value:** ``0``, indicating no limit
+ titleLineHeight : anyOf(float, :class:`ExprRef`)
+ Line height in pixels for multi-line header title text or title text with
+ ``"line-top"`` or ``"line-bottom"`` baseline.
+ titleOrient : :class:`Orient`
+ The orientation of the header title. One of ``"top"``, ``"bottom"``, ``"left"`` or
+ ``"right"``.
+ titlePadding : anyOf(float, :class:`ExprRef`)
+ The padding, in pixel, between facet header's title and the label.
+
+ **Default value:** ``10``
+ """
+ _schema = {'$ref': '#/definitions/Header'}
+
+ def __init__(self, format=Undefined, formatType=Undefined, labelAlign=Undefined,
+ labelAnchor=Undefined, labelAngle=Undefined, labelBaseline=Undefined,
+ labelColor=Undefined, labelExpr=Undefined, labelFont=Undefined,
+ labelFontSize=Undefined, labelFontStyle=Undefined, labelFontWeight=Undefined,
+ labelLimit=Undefined, labelLineHeight=Undefined, labelOrient=Undefined,
+ labelPadding=Undefined, labels=Undefined, orient=Undefined, title=Undefined,
+ titleAlign=Undefined, titleAnchor=Undefined, titleAngle=Undefined,
+ titleBaseline=Undefined, titleColor=Undefined, titleFont=Undefined,
+ titleFontSize=Undefined, titleFontStyle=Undefined, titleFontWeight=Undefined,
+ titleLimit=Undefined, titleLineHeight=Undefined, titleOrient=Undefined,
+ titlePadding=Undefined, **kwds):
+ super(Header, self).__init__(format=format, formatType=formatType, labelAlign=labelAlign,
+ labelAnchor=labelAnchor, labelAngle=labelAngle,
+ labelBaseline=labelBaseline, labelColor=labelColor,
+ labelExpr=labelExpr, labelFont=labelFont,
+ labelFontSize=labelFontSize, labelFontStyle=labelFontStyle,
+ labelFontWeight=labelFontWeight, labelLimit=labelLimit,
+ labelLineHeight=labelLineHeight, labelOrient=labelOrient,
+ labelPadding=labelPadding, labels=labels, orient=orient,
+ title=title, titleAlign=titleAlign, titleAnchor=titleAnchor,
+ titleAngle=titleAngle, titleBaseline=titleBaseline,
+ titleColor=titleColor, titleFont=titleFont,
+ titleFontSize=titleFontSize, titleFontStyle=titleFontStyle,
+ titleFontWeight=titleFontWeight, titleLimit=titleLimit,
+ titleLineHeight=titleLineHeight, titleOrient=titleOrient,
+ titlePadding=titlePadding, **kwds)
+
+
+class HeaderConfig(VegaLiteSchema):
+ """HeaderConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ format : anyOf(string, :class:`Dictunknown`)
+ When used with the default ``"number"`` and ``"time"`` format type, the text
+ formatting pattern for labels of guides (axes, legends, headers) and text marks.
+
+
+ * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
+ `number format pattern <https://github.com/d3/d3-format#locale_format>`__. - If
+ the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
+ format pattern <https://github.com/d3/d3-time-format#locale_format>`__.
+
+ See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
+ for more examples.
+
+ When used with a `custom formatType
+ <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this
+ value will be passed as ``format`` alongside ``datum.value`` to the registered
+ function.
+
+ **Default value:** Derived from `numberFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
+ format and from `timeFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
+ format.
+ formatType : string
+ The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom
+ format type
+ <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.
+
+ **Default value:** - ``"time"`` for temporal fields and ordinal and nominal fields
+ with ``timeUnit``. - ``"number"`` for quantitative fields as well as ordinal and
+ nominal fields without ``timeUnit``.
+ labelAlign : anyOf(:class:`Align`, :class:`ExprRef`)
+ Horizontal text alignment of header labels. One of ``"left"``, ``"center"``, or
+ ``"right"``.
+ labelAnchor : :class:`TitleAnchor`
+ The anchor position for placing the labels. One of ``"start"``, ``"middle"``, or
+ ``"end"``. For example, with a label orientation of top these anchor positions map
+ to a left-, center-, or right-aligned label.
+ labelAngle : float
+ The rotation angle of the header labels.
+
+ **Default value:** ``0`` for column header, ``-90`` for row header.
+ labelBaseline : anyOf(:class:`TextBaseline`, :class:`ExprRef`)
+ The vertical text baseline for the header labels. One of ``"alphabetic"`` (default),
+ ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, or ``"line-bottom"``. The
+ ``"line-top"`` and ``"line-bottom"`` values operate similarly to ``"top"`` and
+ ``"bottom"``, but are calculated relative to the ``titleLineHeight`` rather than
+ ``titleFontSize`` alone.
+ labelColor : anyOf(:class:`Color`, :class:`ExprRef`)
+ The color of the header label, can be in hex color code or regular color name.
+ labelExpr : string
+ `Vega expression <https://vega.github.io/vega/docs/expressions/>`__ for customizing
+ labels.
+
+ **Note:** The label text and value can be assessed via the ``label`` and ``value``
+ properties of the header's backing ``datum`` object.
+ labelFont : anyOf(string, :class:`ExprRef`)
+ The font of the header label.
+ labelFontSize : anyOf(float, :class:`ExprRef`)
+ The font size of the header label, in pixels.
+ labelFontStyle : anyOf(:class:`FontStyle`, :class:`ExprRef`)
+ The font style of the header label.
+ labelFontWeight : anyOf(:class:`FontWeight`, :class:`ExprRef`)
+ The font weight of the header label.
+ labelLimit : anyOf(float, :class:`ExprRef`)
+ The maximum length of the header label in pixels. The text value will be
+ automatically truncated if the rendered size exceeds the limit.
+
+ **Default value:** ``0``, indicating no limit
+ labelLineHeight : anyOf(float, :class:`ExprRef`)
+ Line height in pixels for multi-line header labels or title text with ``"line-top"``
+ or ``"line-bottom"`` baseline.
+ labelOrient : :class:`Orient`
+ The orientation of the header label. One of ``"top"``, ``"bottom"``, ``"left"`` or
+ ``"right"``.
+ labelPadding : anyOf(float, :class:`ExprRef`)
+ The padding, in pixel, between facet header's label and the plot.
+
+ **Default value:** ``10``
+ labels : boolean
+ A boolean flag indicating if labels should be included as part of the header.
+
+ **Default value:** ``true``.
+ orient : :class:`Orient`
+ Shortcut for setting both labelOrient and titleOrient.
+ title : None
+ Set to null to disable title for the axis, legend, or header.
+ titleAlign : anyOf(:class:`Align`, :class:`ExprRef`)
+ Horizontal text alignment (to the anchor) of header titles.
+ titleAnchor : :class:`TitleAnchor`
+ The anchor position for placing the title. One of ``"start"``, ``"middle"``, or
+ ``"end"``. For example, with an orientation of top these anchor positions map to a
+ left-, center-, or right-aligned title.
+ titleAngle : float
+ The rotation angle of the header title.
+
+ **Default value:** ``0``.
+ titleBaseline : anyOf(:class:`TextBaseline`, :class:`ExprRef`)
+ The vertical text baseline for the header title. One of ``"alphabetic"`` (default),
+ ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, or ``"line-bottom"``. The
+ ``"line-top"`` and ``"line-bottom"`` values operate similarly to ``"top"`` and
+ ``"bottom"``, but are calculated relative to the ``titleLineHeight`` rather than
+ ``titleFontSize`` alone.
+
+ **Default value:** ``"middle"``
+ titleColor : anyOf(:class:`Color`, :class:`ExprRef`)
+ Color of the header title, can be in hex color code or regular color name.
+ titleFont : anyOf(string, :class:`ExprRef`)
+ Font of the header title. (e.g., ``"Helvetica Neue"`` ).
+ titleFontSize : anyOf(float, :class:`ExprRef`)
+ Font size of the header title.
+ titleFontStyle : anyOf(:class:`FontStyle`, :class:`ExprRef`)
+ The font style of the header title.
+ titleFontWeight : anyOf(:class:`FontWeight`, :class:`ExprRef`)
+ Font weight of the header title. This can be either a string (e.g ``"bold"``,
+ ``"normal"`` ) or a number ( ``100``, ``200``, ``300``, ..., ``900`` where
+ ``"normal"`` = ``400`` and ``"bold"`` = ``700`` ).
+ titleLimit : anyOf(float, :class:`ExprRef`)
+ The maximum length of the header title in pixels. The text value will be
+ automatically truncated if the rendered size exceeds the limit.
+
+ **Default value:** ``0``, indicating no limit
+ titleLineHeight : anyOf(float, :class:`ExprRef`)
+ Line height in pixels for multi-line header title text or title text with
+ ``"line-top"`` or ``"line-bottom"`` baseline.
+ titleOrient : :class:`Orient`
+ The orientation of the header title. One of ``"top"``, ``"bottom"``, ``"left"`` or
+ ``"right"``.
+ titlePadding : anyOf(float, :class:`ExprRef`)
+ The padding, in pixel, between facet header's title and the label.
+
+ **Default value:** ``10``
+ """
+ _schema = {'$ref': '#/definitions/HeaderConfig'}
+
+ def __init__(self, format=Undefined, formatType=Undefined, labelAlign=Undefined,
+ labelAnchor=Undefined, labelAngle=Undefined, labelBaseline=Undefined,
+ labelColor=Undefined, labelExpr=Undefined, labelFont=Undefined,
+ labelFontSize=Undefined, labelFontStyle=Undefined, labelFontWeight=Undefined,
+ labelLimit=Undefined, labelLineHeight=Undefined, labelOrient=Undefined,
+ labelPadding=Undefined, labels=Undefined, orient=Undefined, title=Undefined,
+ titleAlign=Undefined, titleAnchor=Undefined, titleAngle=Undefined,
+ titleBaseline=Undefined, titleColor=Undefined, titleFont=Undefined,
+ titleFontSize=Undefined, titleFontStyle=Undefined, titleFontWeight=Undefined,
+ titleLimit=Undefined, titleLineHeight=Undefined, titleOrient=Undefined,
+ titlePadding=Undefined, **kwds):
+ super(HeaderConfig, self).__init__(format=format, formatType=formatType, labelAlign=labelAlign,
+ labelAnchor=labelAnchor, labelAngle=labelAngle,
+ labelBaseline=labelBaseline, labelColor=labelColor,
+ labelExpr=labelExpr, labelFont=labelFont,
+ labelFontSize=labelFontSize, labelFontStyle=labelFontStyle,
+ labelFontWeight=labelFontWeight, labelLimit=labelLimit,
+ labelLineHeight=labelLineHeight, labelOrient=labelOrient,
+ labelPadding=labelPadding, labels=labels, orient=orient,
+ title=title, titleAlign=titleAlign, titleAnchor=titleAnchor,
+ titleAngle=titleAngle, titleBaseline=titleBaseline,
+ titleColor=titleColor, titleFont=titleFont,
+ titleFontSize=titleFontSize, titleFontStyle=titleFontStyle,
+ titleFontWeight=titleFontWeight, titleLimit=titleLimit,
+ titleLineHeight=titleLineHeight, titleOrient=titleOrient,
+ titlePadding=titlePadding, **kwds)
+
+
+class HexColor(Color):
+ """HexColor schema wrapper
+
+ string
+ """
+ _schema = {'$ref': '#/definitions/HexColor'}
+
+ def __init__(self, *args):
+ super(HexColor, self).__init__(*args)
+
+
+class ImputeMethod(VegaLiteSchema):
+ """ImputeMethod schema wrapper
+
+ enum('value', 'median', 'max', 'min', 'mean')
+ """
+ _schema = {'$ref': '#/definitions/ImputeMethod'}
+
+ def __init__(self, *args):
+ super(ImputeMethod, self).__init__(*args)
+
+
+class ImputeParams(VegaLiteSchema):
+ """ImputeParams schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ frame : List([anyOf(None, float), anyOf(None, float)])
+ A frame specification as a two-element array used to control the window over which
+ the specified method is applied. The array entries should either be a number
+ indicating the offset from the current data object, or null to indicate unbounded
+ rows preceding or following the current data object. For example, the value ``[-5,
+ 5]`` indicates that the window should include five objects preceding and five
+ objects following the current object.
+
+ **Default value:** : ``[null, null]`` indicating that the window includes all
+ objects.
+ keyvals : anyOf(List(Any), :class:`ImputeSequence`)
+ Defines the key values that should be considered for imputation. An array of key
+ values or an object defining a `number sequence
+ <https://vega.github.io/vega-lite/docs/impute.html#sequence-def>`__.
+
+ If provided, this will be used in addition to the key values observed within the
+ input data. If not provided, the values will be derived from all unique values of
+ the ``key`` field. For ``impute`` in ``encoding``, the key field is the x-field if
+ the y-field is imputed, or vice versa.
+
+ If there is no impute grouping, this property *must* be specified.
+ method : :class:`ImputeMethod`
+ The imputation method to use for the field value of imputed data objects. One of
+ ``"value"``, ``"mean"``, ``"median"``, ``"max"`` or ``"min"``.
+
+ **Default value:** ``"value"``
+ value : Any
+ The field value to use when the imputation ``method`` is ``"value"``.
+ """
+ _schema = {'$ref': '#/definitions/ImputeParams'}
+
+ def __init__(self, frame=Undefined, keyvals=Undefined, method=Undefined, value=Undefined, **kwds):
+ super(ImputeParams, self).__init__(frame=frame, keyvals=keyvals, method=method, value=value,
+ **kwds)
+
+
+class ImputeSequence(VegaLiteSchema):
+ """ImputeSequence schema wrapper
+
+ Mapping(required=[stop])
+
+ Attributes
+ ----------
+
+ stop : float
+ The ending value(exclusive) of the sequence.
+ start : float
+ The starting value of the sequence. **Default value:** ``0``
+ step : float
+ The step value between sequence entries. **Default value:** ``1`` or ``-1`` if
+ ``stop < start``
+ """
+ _schema = {'$ref': '#/definitions/ImputeSequence'}
+
+ def __init__(self, stop=Undefined, start=Undefined, step=Undefined, **kwds):
+ super(ImputeSequence, self).__init__(stop=stop, start=start, step=step, **kwds)
+
+
+class InlineData(DataSource):
+ """InlineData schema wrapper
+
+ Mapping(required=[values])
+
+ Attributes
+ ----------
+
+ values : :class:`InlineDataset`
+ The full data set, included inline. This can be an array of objects or primitive
+ values, an object, or a string. Arrays of primitive values are ingested as objects
+ with a ``data`` property. Strings are parsed according to the specified format type.
+ format : :class:`DataFormat`
+ An object that specifies the format for parsing the data.
+ name : string
+ Provide a placeholder name and bind data at runtime.
+ """
+ _schema = {'$ref': '#/definitions/InlineData'}
+
+ def __init__(self, values=Undefined, format=Undefined, name=Undefined, **kwds):
+ super(InlineData, self).__init__(values=values, format=format, name=name, **kwds)
+
+
+class InlineDataset(VegaLiteSchema):
+ """InlineDataset schema wrapper
+
+ anyOf(List(float), List(string), List(boolean), List(Mapping(required=[])), string,
+ Mapping(required=[]))
+ """
+ _schema = {'$ref': '#/definitions/InlineDataset'}
+
+ def __init__(self, *args, **kwds):
+ super(InlineDataset, self).__init__(*args, **kwds)
+
+
+class InputBinding(Binding):
+ """InputBinding schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ autocomplete : string
+
+ debounce : float
+
+ element : :class:`Element`
+
+ input : string
+
+ name : string
+
+ placeholder : string
+
+ type : string
+
+ """
+ _schema = {'$ref': '#/definitions/InputBinding'}
+
+ def __init__(self, autocomplete=Undefined, debounce=Undefined, element=Undefined, input=Undefined,
+ name=Undefined, placeholder=Undefined, type=Undefined, **kwds):
+ super(InputBinding, self).__init__(autocomplete=autocomplete, debounce=debounce,
+ element=element, input=input, name=name,
+ placeholder=placeholder, type=type, **kwds)
+
+
+class Interpolate(VegaLiteSchema):
+ """Interpolate schema wrapper
+
+ enum('basis', 'basis-open', 'basis-closed', 'bundle', 'cardinal', 'cardinal-open',
+ 'cardinal-closed', 'catmull-rom', 'linear', 'linear-closed', 'monotone', 'natural', 'step',
+ 'step-before', 'step-after')
+ """
+ _schema = {'$ref': '#/definitions/Interpolate'}
+
+ def __init__(self, *args):
+ super(Interpolate, self).__init__(*args)
+
+
+class IntervalSelectionConfig(VegaLiteSchema):
+ """IntervalSelectionConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ bind : string
+ Establishes a two-way binding between the interval selection and the scales used
+ within the same view. This allows a user to interactively pan and zoom the view.
+
+ **See also:** `bind <https://vega.github.io/vega-lite/docs/bind.html>`__
+ documentation.
+ clear : anyOf(:class:`Stream`, string, boolean)
+ Clears the selection, emptying it of all values. Can be a `Event Stream
+ <https://vega.github.io/vega/docs/event-streams/>`__ or ``false`` to disable.
+
+ **Default value:** ``dblclick``.
+
+ **See also:** `clear <https://vega.github.io/vega-lite/docs/clear.html>`__
+ documentation.
+ empty : enum('all', 'none')
+ By default, ``all`` data values are considered to lie within an empty selection.
+ When set to ``none``, empty selections contain no data values.
+ encodings : List(:class:`SingleDefUnitChannel`)
+ An array of encoding channels. The corresponding data field values must match for a
+ data tuple to fall within the selection.
+
+ **See also:** `encodings <https://vega.github.io/vega-lite/docs/project.html>`__
+ documentation.
+ fields : List(:class:`FieldName`)
+ An array of field names whose values must match for a data tuple to fall within the
+ selection.
+
+ **See also:** `fields <https://vega.github.io/vega-lite/docs/project.html>`__
+ documentation.
+ init : :class:`SelectionInitIntervalMapping`
+ Initialize the selection with a mapping between `projected channels or field names
+ <https://vega.github.io/vega-lite/docs/project.html>`__ and arrays of initial
+ values.
+
+ **See also:** `init <https://vega.github.io/vega-lite/docs/init.html>`__
+ documentation.
+ mark : :class:`BrushConfig`
+ An interval selection also adds a rectangle mark to depict the extents of the
+ interval. The ``mark`` property can be used to customize the appearance of the mark.
+
+ **See also:** `mark <https://vega.github.io/vega-lite/docs/selection-mark.html>`__
+ documentation.
+ on : anyOf(:class:`Stream`, string)
+ A `Vega event stream <https://vega.github.io/vega/docs/event-streams/>`__ (object or
+ selector) that triggers the selection. For interval selections, the event stream
+ must specify a `start and end
+ <https://vega.github.io/vega/docs/event-streams/#between-filters>`__.
+ resolve : :class:`SelectionResolution`
+ With layered and multi-view displays, a strategy that determines how selections'
+ data queries are resolved when applied in a filter transform, conditional encoding
+ rule, or scale domain.
+
+ **See also:** `resolve
+ <https://vega.github.io/vega-lite/docs/selection-resolve.html>`__ documentation.
+ translate : anyOf(string, boolean)
+ When truthy, allows a user to interactively move an interval selection
+ back-and-forth. Can be ``true``, ``false`` (to disable panning), or a `Vega event
+ stream definition <https://vega.github.io/vega/docs/event-streams/>`__ which must
+ include a start and end event to trigger continuous panning.
+
+ **Default value:** ``true``, which corresponds to ``[mousedown, window:mouseup] >
+ window:mousemove!`` which corresponds to clicks and dragging within an interval
+ selection to reposition it.
+
+ **See also:** `translate <https://vega.github.io/vega-lite/docs/translate.html>`__
+ documentation.
+ zoom : anyOf(string, boolean)
+ When truthy, allows a user to interactively resize an interval selection. Can be
+ ``true``, ``false`` (to disable zooming), or a `Vega event stream definition
+ <https://vega.github.io/vega/docs/event-streams/>`__. Currently, only ``wheel``
+ events are supported.
+
+ **Default value:** ``true``, which corresponds to ``wheel!``.
+
+ **See also:** `zoom <https://vega.github.io/vega-lite/docs/zoom.html>`__
+ documentation.
+ """
+ _schema = {'$ref': '#/definitions/IntervalSelectionConfig'}
+
+ def __init__(self, bind=Undefined, clear=Undefined, empty=Undefined, encodings=Undefined,
+ fields=Undefined, init=Undefined, mark=Undefined, on=Undefined, resolve=Undefined,
+ translate=Undefined, zoom=Undefined, **kwds):
+ super(IntervalSelectionConfig, self).__init__(bind=bind, clear=clear, empty=empty,
+ encodings=encodings, fields=fields, init=init,
+ mark=mark, on=on, resolve=resolve,
+ translate=translate, zoom=zoom, **kwds)
+
+
+class JoinAggregateFieldDef(VegaLiteSchema):
+ """JoinAggregateFieldDef schema wrapper
+
+ Mapping(required=[op, as])
+
+ Attributes
+ ----------
+
+ op : :class:`AggregateOp`
+ The aggregation operation to apply (e.g., ``"sum"``, ``"average"`` or ``"count"`` ).
+ See the list of all supported operations `here
+ <https://vega.github.io/vega-lite/docs/aggregate.html#ops>`__.
+ field : :class:`FieldName`
+ The data field for which to compute the aggregate function. This can be omitted for
+ functions that do not operate over a field such as ``"count"``.
+ as : :class:`FieldName`
+ The output name for the join aggregate operation.
+ """
+ _schema = {'$ref': '#/definitions/JoinAggregateFieldDef'}
+
+ def __init__(self, op=Undefined, field=Undefined, **kwds):
+ super(JoinAggregateFieldDef, self).__init__(op=op, field=field, **kwds)
+
+
+class JsonDataFormat(DataFormat):
+ """JsonDataFormat schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ parse : anyOf(:class:`Parse`, None)
+ If set to ``null``, disable type inference based on the spec and only use type
+ inference based on the data. Alternatively, a parsing directive object can be
+ provided for explicit data types. Each property of the object corresponds to a field
+ name, and the value to the desired data type (one of ``"number"``, ``"boolean"``,
+ ``"date"``, or null (do not parse the field)). For example, ``"parse":
+ {"modified_on": "date"}`` parses the ``modified_on`` field in each input record a
+ Date value.
+
+ For ``"date"``, we parse data based using Javascript's `Date.parse()
+ <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse>`__.
+ For Specific date formats can be provided (e.g., ``{foo: "date:'%m%d%Y'"}`` ), using
+ the `d3-time-format syntax <https://github.com/d3/d3-time-format#locale_format>`__.
+ UTC date format parsing is supported similarly (e.g., ``{foo: "utc:'%m%d%Y'"}`` ).
+ See more about `UTC time
+ <https://vega.github.io/vega-lite/docs/timeunit.html#utc>`__
+ property : string
+ The JSON property containing the desired data. This parameter can be used when the
+ loaded JSON file may have surrounding structure or meta-data. For example
+ ``"property": "values.features"`` is equivalent to retrieving
+ ``json.values.features`` from the loaded JSON object.
+ type : string
+ Type of input data: ``"json"``, ``"csv"``, ``"tsv"``, ``"dsv"``.
+
+ **Default value:** The default format type is determined by the extension of the
+ file URL. If no extension is detected, ``"json"`` will be used by default.
+ """
+ _schema = {'$ref': '#/definitions/JsonDataFormat'}
+
+ def __init__(self, parse=Undefined, property=Undefined, type=Undefined, **kwds):
+ super(JsonDataFormat, self).__init__(parse=parse, property=property, type=type, **kwds)
+
+
+class LabelOverlap(VegaLiteSchema):
+ """LabelOverlap schema wrapper
+
+ anyOf(boolean, string, string)
+ """
+ _schema = {'$ref': '#/definitions/LabelOverlap'}
+
+ def __init__(self, *args, **kwds):
+ super(LabelOverlap, self).__init__(*args, **kwds)
+
+
+class LatLongDef(VegaLiteSchema):
+ """LatLongDef schema wrapper
+
+ anyOf(:class:`LatLongFieldDef`, :class:`DatumDef`, :class:`NumericValueDef`)
+ """
+ _schema = {'$ref': '#/definitions/LatLongDef'}
+
+ def __init__(self, *args, **kwds):
+ super(LatLongDef, self).__init__(*args, **kwds)
+
+
+class LatLongFieldDef(LatLongDef):
+ """LatLongFieldDef schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : None
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : string
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _schema = {'$ref': '#/definitions/LatLongFieldDef'}
+
+ def __init__(self, aggregate=Undefined, band=Undefined, bin=Undefined, field=Undefined,
+ timeUnit=Undefined, title=Undefined, type=Undefined, **kwds):
+ super(LatLongFieldDef, self).__init__(aggregate=aggregate, band=band, bin=bin, field=field,
+ timeUnit=timeUnit, title=title, type=type, **kwds)
+
+
+class LayerRepeatMapping(VegaLiteSchema):
+ """LayerRepeatMapping schema wrapper
+
+ Mapping(required=[layer])
+
+ Attributes
+ ----------
+
+ layer : List(string)
+ An array of fields to be repeated as layers.
+ column : List(string)
+ An array of fields to be repeated horizontally.
+ row : List(string)
+ An array of fields to be repeated vertically.
+ """
+ _schema = {'$ref': '#/definitions/LayerRepeatMapping'}
+
+ def __init__(self, layer=Undefined, column=Undefined, row=Undefined, **kwds):
+ super(LayerRepeatMapping, self).__init__(layer=layer, column=column, row=row, **kwds)
+
+
+class LayoutAlign(VegaLiteSchema):
+ """LayoutAlign schema wrapper
+
+ enum('all', 'each', 'none')
+ """
+ _schema = {'$ref': '#/definitions/LayoutAlign'}
+
+ def __init__(self, *args):
+ super(LayoutAlign, self).__init__(*args)
+
+
+class Legend(VegaLiteSchema):
+ """Legend schema wrapper
+
+ Mapping(required=[])
+ Properties of a legend or boolean flag for determining whether to show it.
+
+ Attributes
+ ----------
+
+ aria : anyOf(boolean, :class:`ExprRef`)
+
+ clipHeight : anyOf(float, :class:`ExprRef`)
+
+ columnPadding : anyOf(float, :class:`ExprRef`)
+
+ columns : anyOf(float, :class:`ExprRef`)
+
+ cornerRadius : anyOf(float, :class:`ExprRef`)
+
+ description : anyOf(string, :class:`ExprRef`)
+
+ direction : :class:`Orientation`
+ The direction of the legend, one of ``"vertical"`` or ``"horizontal"``.
+
+ **Default value:** - For top-/bottom- ``orient`` ed legends, ``"horizontal"`` - For
+ left-/right- ``orient`` ed legends, ``"vertical"`` - For top/bottom-left/right-
+ ``orient`` ed legends, ``"horizontal"`` for gradient legends and ``"vertical"`` for
+ symbol legends.
+ fillColor : anyOf(anyOf(None, :class:`Color`), :class:`ExprRef`)
+
+ format : anyOf(string, :class:`Dictunknown`)
+ When used with the default ``"number"`` and ``"time"`` format type, the text
+ formatting pattern for labels of guides (axes, legends, headers) and text marks.
+
+
+ * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
+ `number format pattern <https://github.com/d3/d3-format#locale_format>`__. - If
+ the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
+ format pattern <https://github.com/d3/d3-time-format#locale_format>`__.
+
+ See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
+ for more examples.
+
+ When used with a `custom formatType
+ <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this
+ value will be passed as ``format`` alongside ``datum.value`` to the registered
+ function.
+
+ **Default value:** Derived from `numberFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
+ format and from `timeFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
+ format.
+ formatType : string
+ The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom
+ format type
+ <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.
+
+ **Default value:** - ``"time"`` for temporal fields and ordinal and nominal fields
+ with ``timeUnit``. - ``"number"`` for quantitative fields as well as ordinal and
+ nominal fields without ``timeUnit``.
+ gradientLength : anyOf(float, :class:`ExprRef`)
+
+ gradientOpacity : anyOf(float, :class:`ExprRef`)
+
+ gradientStrokeColor : anyOf(anyOf(None, :class:`Color`), :class:`ExprRef`)
+
+ gradientStrokeWidth : anyOf(float, :class:`ExprRef`)
+
+ gradientThickness : anyOf(float, :class:`ExprRef`)
+
+ gridAlign : anyOf(:class:`LayoutAlign`, :class:`ExprRef`)
+
+ labelAlign : anyOf(:class:`Align`, :class:`ExprRef`)
+
+ labelBaseline : anyOf(:class:`TextBaseline`, :class:`ExprRef`)
+
+ labelColor : anyOf(anyOf(None, :class:`Color`), :class:`ExprRef`)
+
+ labelExpr : string
+ `Vega expression <https://vega.github.io/vega/docs/expressions/>`__ for customizing
+ labels.
+
+ **Note:** The label text and value can be assessed via the ``label`` and ``value``
+ properties of the legend's backing ``datum`` object.
+ labelFont : anyOf(string, :class:`ExprRef`)
+
+ labelFontSize : anyOf(float, :class:`ExprRef`)
+
+ labelFontStyle : anyOf(:class:`FontStyle`, :class:`ExprRef`)
+
+ labelFontWeight : anyOf(:class:`FontWeight`, :class:`ExprRef`)
+
+ labelLimit : anyOf(float, :class:`ExprRef`)
+
+ labelOffset : anyOf(float, :class:`ExprRef`)
+
+ labelOpacity : anyOf(float, :class:`ExprRef`)
+
+ labelOverlap : anyOf(:class:`LabelOverlap`, :class:`ExprRef`)
+
+ labelPadding : anyOf(float, :class:`ExprRef`)
+
+ labelSeparation : anyOf(float, :class:`ExprRef`)
+
+ legendX : anyOf(float, :class:`ExprRef`)
+
+ legendY : anyOf(float, :class:`ExprRef`)
+
+ offset : anyOf(float, :class:`ExprRef`)
+
+ orient : :class:`LegendOrient`
+ The orientation of the legend, which determines how the legend is positioned within
+ the scene. One of ``"left"``, ``"right"``, ``"top"``, ``"bottom"``, ``"top-left"``,
+ ``"top-right"``, ``"bottom-left"``, ``"bottom-right"``, ``"none"``.
+
+ **Default value:** ``"right"``
+ padding : anyOf(float, :class:`ExprRef`)
+
+ rowPadding : anyOf(float, :class:`ExprRef`)
+
+ strokeColor : anyOf(anyOf(None, :class:`Color`), :class:`ExprRef`)
+
+ symbolDash : anyOf(List(float), :class:`ExprRef`)
+
+ symbolDashOffset : anyOf(float, :class:`ExprRef`)
+
+ symbolFillColor : anyOf(anyOf(None, :class:`Color`), :class:`ExprRef`)
+
+ symbolLimit : anyOf(float, :class:`ExprRef`)
+
+ symbolOffset : anyOf(float, :class:`ExprRef`)
+
+ symbolOpacity : anyOf(float, :class:`ExprRef`)
+
+ symbolSize : anyOf(float, :class:`ExprRef`)
+
+ symbolStrokeColor : anyOf(anyOf(None, :class:`Color`), :class:`ExprRef`)
+
+ symbolStrokeWidth : anyOf(float, :class:`ExprRef`)
+
+ symbolType : anyOf(:class:`SymbolShape`, :class:`ExprRef`)
+
+ tickCount : anyOf(:class:`TickCount`, :class:`ExprRef`)
+
+ tickMinStep : anyOf(float, :class:`ExprRef`)
+ The minimum desired step between legend ticks, in terms of scale domain values. For
+ example, a value of ``1`` indicates that ticks should not be less than 1 unit apart.
+ If ``tickMinStep`` is specified, the ``tickCount`` value will be adjusted, if
+ necessary, to enforce the minimum step value.
+
+ **Default value** : ``undefined``
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ titleAlign : anyOf(:class:`Align`, :class:`ExprRef`)
+
+ titleAnchor : anyOf(:class:`TitleAnchor`, :class:`ExprRef`)
+
+ titleBaseline : anyOf(:class:`TextBaseline`, :class:`ExprRef`)
+
+ titleColor : anyOf(anyOf(None, :class:`Color`), :class:`ExprRef`)
+
+ titleFont : anyOf(string, :class:`ExprRef`)
+
+ titleFontSize : anyOf(float, :class:`ExprRef`)
+
+ titleFontStyle : anyOf(:class:`FontStyle`, :class:`ExprRef`)
+
+ titleFontWeight : anyOf(:class:`FontWeight`, :class:`ExprRef`)
+
+ titleLimit : anyOf(float, :class:`ExprRef`)
+
+ titleLineHeight : anyOf(float, :class:`ExprRef`)
+
+ titleOpacity : anyOf(float, :class:`ExprRef`)
+
+ titleOrient : anyOf(:class:`Orient`, :class:`ExprRef`)
+
+ titlePadding : anyOf(float, :class:`ExprRef`)
+
+ type : enum('symbol', 'gradient')
+ The type of the legend. Use ``"symbol"`` to create a discrete legend and
+ ``"gradient"`` for a continuous color gradient.
+
+ **Default value:** ``"gradient"`` for non-binned quantitative fields and temporal
+ fields; ``"symbol"`` otherwise.
+ values : anyOf(List(float), List(string), List(boolean), List(:class:`DateTime`),
+ :class:`ExprRef`)
+ Explicitly set the visible legend values.
+ zindex : float
+ A non-negative integer indicating the z-index of the legend. If zindex is 0, legend
+ should be drawn behind all chart elements. To put them in front, use zindex = 1.
+ """
+ _schema = {'$ref': '#/definitions/Legend'}
+
+ def __init__(self, aria=Undefined, clipHeight=Undefined, columnPadding=Undefined, columns=Undefined,
+ cornerRadius=Undefined, description=Undefined, direction=Undefined,
+ fillColor=Undefined, format=Undefined, formatType=Undefined, gradientLength=Undefined,
+ gradientOpacity=Undefined, gradientStrokeColor=Undefined,
+ gradientStrokeWidth=Undefined, gradientThickness=Undefined, gridAlign=Undefined,
+ labelAlign=Undefined, labelBaseline=Undefined, labelColor=Undefined,
+ labelExpr=Undefined, labelFont=Undefined, labelFontSize=Undefined,
+ labelFontStyle=Undefined, labelFontWeight=Undefined, labelLimit=Undefined,
+ labelOffset=Undefined, labelOpacity=Undefined, labelOverlap=Undefined,
+ labelPadding=Undefined, labelSeparation=Undefined, legendX=Undefined,
+ legendY=Undefined, offset=Undefined, orient=Undefined, padding=Undefined,
+ rowPadding=Undefined, strokeColor=Undefined, symbolDash=Undefined,
+ symbolDashOffset=Undefined, symbolFillColor=Undefined, symbolLimit=Undefined,
+ symbolOffset=Undefined, symbolOpacity=Undefined, symbolSize=Undefined,
+ symbolStrokeColor=Undefined, symbolStrokeWidth=Undefined, symbolType=Undefined,
+ tickCount=Undefined, tickMinStep=Undefined, title=Undefined, titleAlign=Undefined,
+ titleAnchor=Undefined, titleBaseline=Undefined, titleColor=Undefined,
+ titleFont=Undefined, titleFontSize=Undefined, titleFontStyle=Undefined,
+ titleFontWeight=Undefined, titleLimit=Undefined, titleLineHeight=Undefined,
+ titleOpacity=Undefined, titleOrient=Undefined, titlePadding=Undefined, type=Undefined,
+ values=Undefined, zindex=Undefined, **kwds):
+ super(Legend, self).__init__(aria=aria, clipHeight=clipHeight, columnPadding=columnPadding,
+ columns=columns, cornerRadius=cornerRadius,
+ description=description, direction=direction, fillColor=fillColor,
+ format=format, formatType=formatType,
+ gradientLength=gradientLength, gradientOpacity=gradientOpacity,
+ gradientStrokeColor=gradientStrokeColor,
+ gradientStrokeWidth=gradientStrokeWidth,
+ gradientThickness=gradientThickness, gridAlign=gridAlign,
+ labelAlign=labelAlign, labelBaseline=labelBaseline,
+ labelColor=labelColor, labelExpr=labelExpr, labelFont=labelFont,
+ labelFontSize=labelFontSize, labelFontStyle=labelFontStyle,
+ labelFontWeight=labelFontWeight, labelLimit=labelLimit,
+ labelOffset=labelOffset, labelOpacity=labelOpacity,
+ labelOverlap=labelOverlap, labelPadding=labelPadding,
+ labelSeparation=labelSeparation, legendX=legendX, legendY=legendY,
+ offset=offset, orient=orient, padding=padding,
+ rowPadding=rowPadding, strokeColor=strokeColor,
+ symbolDash=symbolDash, symbolDashOffset=symbolDashOffset,
+ symbolFillColor=symbolFillColor, symbolLimit=symbolLimit,
+ symbolOffset=symbolOffset, symbolOpacity=symbolOpacity,
+ symbolSize=symbolSize, symbolStrokeColor=symbolStrokeColor,
+ symbolStrokeWidth=symbolStrokeWidth, symbolType=symbolType,
+ tickCount=tickCount, tickMinStep=tickMinStep, title=title,
+ titleAlign=titleAlign, titleAnchor=titleAnchor,
+ titleBaseline=titleBaseline, titleColor=titleColor,
+ titleFont=titleFont, titleFontSize=titleFontSize,
+ titleFontStyle=titleFontStyle, titleFontWeight=titleFontWeight,
+ titleLimit=titleLimit, titleLineHeight=titleLineHeight,
+ titleOpacity=titleOpacity, titleOrient=titleOrient,
+ titlePadding=titlePadding, type=type, values=values, zindex=zindex,
+ **kwds)
+
+
+class LegendBinding(VegaLiteSchema):
+ """LegendBinding schema wrapper
+
+ anyOf(string, :class:`LegendStreamBinding`)
+ """
+ _schema = {'$ref': '#/definitions/LegendBinding'}
+
+ def __init__(self, *args, **kwds):
+ super(LegendBinding, self).__init__(*args, **kwds)
+
+
+class LegendConfig(VegaLiteSchema):
+ """LegendConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ aria : anyOf(boolean, :class:`ExprRef`)
+
+ clipHeight : anyOf(float, :class:`ExprRef`)
+
+ columnPadding : anyOf(float, :class:`ExprRef`)
+
+ columns : anyOf(float, :class:`ExprRef`)
+
+ cornerRadius : anyOf(float, :class:`ExprRef`)
+
+ description : anyOf(string, :class:`ExprRef`)
+
+ direction : :class:`Orientation`
+ The direction of the legend, one of ``"vertical"`` or ``"horizontal"``.
+
+ **Default value:** - For top-/bottom- ``orient`` ed legends, ``"horizontal"`` - For
+ left-/right- ``orient`` ed legends, ``"vertical"`` - For top/bottom-left/right-
+ ``orient`` ed legends, ``"horizontal"`` for gradient legends and ``"vertical"`` for
+ symbol legends.
+ disable : boolean
+ Disable legend by default
+ fillColor : anyOf(anyOf(None, :class:`Color`), :class:`ExprRef`)
+
+ gradientDirection : anyOf(:class:`Orientation`, :class:`ExprRef`)
+
+ gradientHorizontalMaxLength : float
+ Max legend length for a horizontal gradient when ``config.legend.gradientLength`` is
+ undefined.
+
+ **Default value:** ``200``
+ gradientHorizontalMinLength : float
+ Min legend length for a horizontal gradient when ``config.legend.gradientLength`` is
+ undefined.
+
+ **Default value:** ``100``
+ gradientLabelLimit : anyOf(float, :class:`ExprRef`)
+
+ gradientLabelOffset : anyOf(float, :class:`ExprRef`)
+
+ gradientLength : anyOf(float, :class:`ExprRef`)
+
+ gradientOpacity : anyOf(float, :class:`ExprRef`)
+
+ gradientStrokeColor : anyOf(anyOf(None, :class:`Color`), :class:`ExprRef`)
+
+ gradientStrokeWidth : anyOf(float, :class:`ExprRef`)
+
+ gradientThickness : anyOf(float, :class:`ExprRef`)
+
+ gradientVerticalMaxLength : float
+ Max legend length for a vertical gradient when ``config.legend.gradientLength`` is
+ undefined.
+
+ **Default value:** ``200``
+ gradientVerticalMinLength : float
+ Min legend length for a vertical gradient when ``config.legend.gradientLength`` is
+ undefined.
+
+ **Default value:** ``100``
+ gridAlign : anyOf(:class:`LayoutAlign`, :class:`ExprRef`)
+
+ labelAlign : anyOf(:class:`Align`, :class:`ExprRef`)
+
+ labelBaseline : anyOf(:class:`TextBaseline`, :class:`ExprRef`)
+
+ labelColor : anyOf(anyOf(None, :class:`Color`), :class:`ExprRef`)
+
+ labelFont : anyOf(string, :class:`ExprRef`)
+
+ labelFontSize : anyOf(float, :class:`ExprRef`)
+
+ labelFontStyle : anyOf(:class:`FontStyle`, :class:`ExprRef`)
+
+ labelFontWeight : anyOf(:class:`FontWeight`, :class:`ExprRef`)
+
+ labelLimit : anyOf(float, :class:`ExprRef`)
+
+ labelOffset : anyOf(float, :class:`ExprRef`)
+
+ labelOpacity : anyOf(float, :class:`ExprRef`)
+
+ labelOverlap : anyOf(:class:`LabelOverlap`, :class:`ExprRef`)
+ The strategy to use for resolving overlap of labels in gradient legends. If
+ ``false``, no overlap reduction is attempted. If set to ``true`` or ``"parity"``, a
+ strategy of removing every other label is used. If set to ``"greedy"``, a linear
+ scan of the labels is performed, removing any label that overlaps with the last
+ visible label (this often works better for log-scaled axes).
+
+ **Default value:** ``"greedy"`` for ``log scales otherwise`` true`.
+ labelPadding : anyOf(float, :class:`ExprRef`)
+
+ labelSeparation : anyOf(float, :class:`ExprRef`)
+
+ layout : :class:`ExprRef`
+
+ legendX : anyOf(float, :class:`ExprRef`)
+
+ legendY : anyOf(float, :class:`ExprRef`)
+
+ offset : anyOf(float, :class:`ExprRef`)
+
+ orient : :class:`LegendOrient`
+ The orientation of the legend, which determines how the legend is positioned within
+ the scene. One of ``"left"``, ``"right"``, ``"top"``, ``"bottom"``, ``"top-left"``,
+ ``"top-right"``, ``"bottom-left"``, ``"bottom-right"``, ``"none"``.
+
+ **Default value:** ``"right"``
+ padding : anyOf(float, :class:`ExprRef`)
+
+ rowPadding : anyOf(float, :class:`ExprRef`)
+
+ strokeColor : anyOf(anyOf(None, :class:`Color`), :class:`ExprRef`)
+
+ strokeDash : anyOf(List(float), :class:`ExprRef`)
+
+ strokeWidth : anyOf(float, :class:`ExprRef`)
+
+ symbolBaseFillColor : anyOf(anyOf(None, :class:`Color`), :class:`ExprRef`)
+
+ symbolBaseStrokeColor : anyOf(anyOf(None, :class:`Color`), :class:`ExprRef`)
+
+ symbolDash : anyOf(List(float), :class:`ExprRef`)
+
+ symbolDashOffset : anyOf(float, :class:`ExprRef`)
+
+ symbolDirection : anyOf(:class:`Orientation`, :class:`ExprRef`)
+
+ symbolFillColor : anyOf(anyOf(None, :class:`Color`), :class:`ExprRef`)
+
+ symbolLimit : anyOf(float, :class:`ExprRef`)
+
+ symbolOffset : anyOf(float, :class:`ExprRef`)
+
+ symbolOpacity : anyOf(float, :class:`ExprRef`)
+
+ symbolSize : anyOf(float, :class:`ExprRef`)
+
+ symbolStrokeColor : anyOf(anyOf(None, :class:`Color`), :class:`ExprRef`)
+
+ symbolStrokeWidth : anyOf(float, :class:`ExprRef`)
+
+ symbolType : anyOf(:class:`SymbolShape`, :class:`ExprRef`)
+
+ tickCount : anyOf(:class:`TickCount`, :class:`ExprRef`)
+
+ title : None
+ Set to null to disable title for the axis, legend, or header.
+ titleAlign : anyOf(:class:`Align`, :class:`ExprRef`)
+
+ titleAnchor : anyOf(:class:`TitleAnchor`, :class:`ExprRef`)
+
+ titleBaseline : anyOf(:class:`TextBaseline`, :class:`ExprRef`)
+
+ titleColor : anyOf(anyOf(None, :class:`Color`), :class:`ExprRef`)
+
+ titleFont : anyOf(string, :class:`ExprRef`)
+
+ titleFontSize : anyOf(float, :class:`ExprRef`)
+
+ titleFontStyle : anyOf(:class:`FontStyle`, :class:`ExprRef`)
+
+ titleFontWeight : anyOf(:class:`FontWeight`, :class:`ExprRef`)
+
+ titleLimit : anyOf(float, :class:`ExprRef`)
+
+ titleLineHeight : anyOf(float, :class:`ExprRef`)
+
+ titleOpacity : anyOf(float, :class:`ExprRef`)
+
+ titleOrient : anyOf(:class:`Orient`, :class:`ExprRef`)
+
+ titlePadding : anyOf(float, :class:`ExprRef`)
+
+ unselectedOpacity : float
+ The opacity of unselected legend entries.
+
+ **Default value:** 0.35.
+ zindex : anyOf(float, :class:`ExprRef`)
+
+ """
+ _schema = {'$ref': '#/definitions/LegendConfig'}
+
+ def __init__(self, aria=Undefined, clipHeight=Undefined, columnPadding=Undefined, columns=Undefined,
+ cornerRadius=Undefined, description=Undefined, direction=Undefined, disable=Undefined,
+ fillColor=Undefined, gradientDirection=Undefined,
+ gradientHorizontalMaxLength=Undefined, gradientHorizontalMinLength=Undefined,
+ gradientLabelLimit=Undefined, gradientLabelOffset=Undefined, gradientLength=Undefined,
+ gradientOpacity=Undefined, gradientStrokeColor=Undefined,
+ gradientStrokeWidth=Undefined, gradientThickness=Undefined,
+ gradientVerticalMaxLength=Undefined, gradientVerticalMinLength=Undefined,
+ gridAlign=Undefined, labelAlign=Undefined, labelBaseline=Undefined,
+ labelColor=Undefined, labelFont=Undefined, labelFontSize=Undefined,
+ labelFontStyle=Undefined, labelFontWeight=Undefined, labelLimit=Undefined,
+ labelOffset=Undefined, labelOpacity=Undefined, labelOverlap=Undefined,
+ labelPadding=Undefined, labelSeparation=Undefined, layout=Undefined, legendX=Undefined,
+ legendY=Undefined, offset=Undefined, orient=Undefined, padding=Undefined,
+ rowPadding=Undefined, strokeColor=Undefined, strokeDash=Undefined,
+ strokeWidth=Undefined, symbolBaseFillColor=Undefined, symbolBaseStrokeColor=Undefined,
+ symbolDash=Undefined, symbolDashOffset=Undefined, symbolDirection=Undefined,
+ symbolFillColor=Undefined, symbolLimit=Undefined, symbolOffset=Undefined,
+ symbolOpacity=Undefined, symbolSize=Undefined, symbolStrokeColor=Undefined,
+ symbolStrokeWidth=Undefined, symbolType=Undefined, tickCount=Undefined,
+ title=Undefined, titleAlign=Undefined, titleAnchor=Undefined, titleBaseline=Undefined,
+ titleColor=Undefined, titleFont=Undefined, titleFontSize=Undefined,
+ titleFontStyle=Undefined, titleFontWeight=Undefined, titleLimit=Undefined,
+ titleLineHeight=Undefined, titleOpacity=Undefined, titleOrient=Undefined,
+ titlePadding=Undefined, unselectedOpacity=Undefined, zindex=Undefined, **kwds):
+ super(LegendConfig, self).__init__(aria=aria, clipHeight=clipHeight,
+ columnPadding=columnPadding, columns=columns,
+ cornerRadius=cornerRadius, description=description,
+ direction=direction, disable=disable, fillColor=fillColor,
+ gradientDirection=gradientDirection,
+ gradientHorizontalMaxLength=gradientHorizontalMaxLength,
+ gradientHorizontalMinLength=gradientHorizontalMinLength,
+ gradientLabelLimit=gradientLabelLimit,
+ gradientLabelOffset=gradientLabelOffset,
+ gradientLength=gradientLength,
+ gradientOpacity=gradientOpacity,
+ gradientStrokeColor=gradientStrokeColor,
+ gradientStrokeWidth=gradientStrokeWidth,
+ gradientThickness=gradientThickness,
+ gradientVerticalMaxLength=gradientVerticalMaxLength,
+ gradientVerticalMinLength=gradientVerticalMinLength,
+ gridAlign=gridAlign, labelAlign=labelAlign,
+ labelBaseline=labelBaseline, labelColor=labelColor,
+ labelFont=labelFont, labelFontSize=labelFontSize,
+ labelFontStyle=labelFontStyle,
+ labelFontWeight=labelFontWeight, labelLimit=labelLimit,
+ labelOffset=labelOffset, labelOpacity=labelOpacity,
+ labelOverlap=labelOverlap, labelPadding=labelPadding,
+ labelSeparation=labelSeparation, layout=layout,
+ legendX=legendX, legendY=legendY, offset=offset,
+ orient=orient, padding=padding, rowPadding=rowPadding,
+ strokeColor=strokeColor, strokeDash=strokeDash,
+ strokeWidth=strokeWidth,
+ symbolBaseFillColor=symbolBaseFillColor,
+ symbolBaseStrokeColor=symbolBaseStrokeColor,
+ symbolDash=symbolDash, symbolDashOffset=symbolDashOffset,
+ symbolDirection=symbolDirection,
+ symbolFillColor=symbolFillColor, symbolLimit=symbolLimit,
+ symbolOffset=symbolOffset, symbolOpacity=symbolOpacity,
+ symbolSize=symbolSize, symbolStrokeColor=symbolStrokeColor,
+ symbolStrokeWidth=symbolStrokeWidth, symbolType=symbolType,
+ tickCount=tickCount, title=title, titleAlign=titleAlign,
+ titleAnchor=titleAnchor, titleBaseline=titleBaseline,
+ titleColor=titleColor, titleFont=titleFont,
+ titleFontSize=titleFontSize, titleFontStyle=titleFontStyle,
+ titleFontWeight=titleFontWeight, titleLimit=titleLimit,
+ titleLineHeight=titleLineHeight, titleOpacity=titleOpacity,
+ titleOrient=titleOrient, titlePadding=titlePadding,
+ unselectedOpacity=unselectedOpacity, zindex=zindex, **kwds)
+
+
+class LegendOrient(VegaLiteSchema):
+ """LegendOrient schema wrapper
+
+ enum('none', 'left', 'right', 'top', 'bottom', 'top-left', 'top-right', 'bottom-left',
+ 'bottom-right')
+ """
+ _schema = {'$ref': '#/definitions/LegendOrient'}
+
+ def __init__(self, *args):
+ super(LegendOrient, self).__init__(*args)
+
+
+class LegendResolveMap(VegaLiteSchema):
+ """LegendResolveMap schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ angle : :class:`ResolveMode`
+
+ color : :class:`ResolveMode`
+
+ fill : :class:`ResolveMode`
+
+ fillOpacity : :class:`ResolveMode`
+
+ opacity : :class:`ResolveMode`
+
+ shape : :class:`ResolveMode`
+
+ size : :class:`ResolveMode`
+
+ stroke : :class:`ResolveMode`
+
+ strokeDash : :class:`ResolveMode`
+
+ strokeOpacity : :class:`ResolveMode`
+
+ strokeWidth : :class:`ResolveMode`
+
+ """
+ _schema = {'$ref': '#/definitions/LegendResolveMap'}
+
+ def __init__(self, angle=Undefined, color=Undefined, fill=Undefined, fillOpacity=Undefined,
+ opacity=Undefined, shape=Undefined, size=Undefined, stroke=Undefined,
+ strokeDash=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, **kwds):
+ super(LegendResolveMap, self).__init__(angle=angle, color=color, fill=fill,
+ fillOpacity=fillOpacity, opacity=opacity, shape=shape,
+ size=size, stroke=stroke, strokeDash=strokeDash,
+ strokeOpacity=strokeOpacity, strokeWidth=strokeWidth,
+ **kwds)
+
+
+class LegendStreamBinding(LegendBinding):
+ """LegendStreamBinding schema wrapper
+
+ Mapping(required=[legend])
+
+ Attributes
+ ----------
+
+ legend : anyOf(string, :class:`Stream`)
+
+ """
+ _schema = {'$ref': '#/definitions/LegendStreamBinding'}
+
+ def __init__(self, legend=Undefined, **kwds):
+ super(LegendStreamBinding, self).__init__(legend=legend, **kwds)
+
+
+class LineConfig(AnyMarkConfig):
+ """LineConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ align : anyOf(:class:`Align`, :class:`ExprRef`)
+ The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule).
+ One of ``"left"``, ``"right"``, ``"center"``.
+
+ **Note:** Expression reference is *not* supported for range marks.
+ angle : anyOf(float, :class:`ExprRef`)
+
+ aria : anyOf(boolean, :class:`ExprRef`)
+
+ ariaRole : anyOf(string, :class:`ExprRef`)
+
+ ariaRoleDescription : anyOf(string, :class:`ExprRef`)
+
+ aspect : anyOf(boolean, :class:`ExprRef`)
+
+ baseline : anyOf(:class:`TextBaseline`, :class:`ExprRef`)
+ For text marks, the vertical text baseline. One of ``"alphabetic"`` (default),
+ ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, ``"line-bottom"``, or an
+ expression reference that provides one of the valid values. The ``"line-top"`` and
+ ``"line-bottom"`` values operate similarly to ``"top"`` and ``"bottom"``, but are
+ calculated relative to the ``lineHeight`` rather than ``fontSize`` alone.
+
+ For range marks, the vertical alignment of the marks. One of ``"top"``,
+ ``"middle"``, ``"bottom"``.
+
+ **Note:** Expression reference is *not* supported for range marks.
+ blend : anyOf(:class:`Blend`, :class:`ExprRef`)
+
+ color : anyOf(:class:`Color`, :class:`Gradient`, :class:`ExprRef`)
+ Default color.
+
+ **Default value:** :raw-html:`<span style="color: #4682b4;">&#9632;</span>`
+ ``"#4682b4"``
+
+ **Note:** - This property cannot be used in a `style config
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. - The ``fill``
+ and ``stroke`` properties have higher precedence than ``color`` and will override
+ ``color``.
+ cornerRadius : anyOf(float, :class:`ExprRef`)
+
+ cornerRadiusBottomLeft : anyOf(float, :class:`ExprRef`)
+
+ cornerRadiusBottomRight : anyOf(float, :class:`ExprRef`)
+
+ cornerRadiusTopLeft : anyOf(float, :class:`ExprRef`)
+
+ cornerRadiusTopRight : anyOf(float, :class:`ExprRef`)
+
+ cursor : anyOf(:class:`Cursor`, :class:`ExprRef`)
+
+ description : anyOf(string, :class:`ExprRef`)
+
+ dir : anyOf(:class:`TextDirection`, :class:`ExprRef`)
+
+ dx : anyOf(float, :class:`ExprRef`)
+
+ dy : anyOf(float, :class:`ExprRef`)
+
+ ellipsis : anyOf(string, :class:`ExprRef`)
+
+ endAngle : anyOf(float, :class:`ExprRef`)
+
+ fill : anyOf(:class:`Color`, :class:`Gradient`, None, :class:`ExprRef`)
+ Default fill color. This property has higher precedence than ``config.color``. Set
+ to ``null`` to remove fill.
+
+ **Default value:** (None)
+ fillOpacity : anyOf(float, :class:`ExprRef`)
+
+ filled : boolean
+ Whether the mark's color should be used as fill color instead of stroke color.
+
+ **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well
+ as ``geoshape`` marks for `graticule
+ <https://vega.github.io/vega-lite/docs/data.html#graticule>`__ data sources;
+ otherwise, ``true``.
+
+ **Note:** This property cannot be used in a `style config
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
+ font : anyOf(string, :class:`ExprRef`)
+
+ fontSize : anyOf(float, :class:`ExprRef`)
+
+ fontStyle : anyOf(:class:`FontStyle`, :class:`ExprRef`)
+
+ fontWeight : anyOf(:class:`FontWeight`, :class:`ExprRef`)
+
+ height : anyOf(float, :class:`ExprRef`)
+
+ href : anyOf(:class:`URI`, :class:`ExprRef`)
+
+ innerRadius : anyOf(float, :class:`ExprRef`)
+ The inner radius in pixels of arc marks. ``innerRadius`` is an alias for
+ ``radius2``.
+ interpolate : anyOf(:class:`Interpolate`, :class:`ExprRef`)
+
+ invalid : enum('filter', None)
+ Defines how Vega-Lite should handle marks for invalid values ( ``null`` and ``NaN``
+ ). - If set to ``"filter"`` (default), all data items with null values will be
+ skipped (for line, trail, and area marks) or filtered (for other marks). - If
+ ``null``, all data items are included. In this case, invalid values will be
+ interpreted as zeroes.
+ limit : anyOf(float, :class:`ExprRef`)
+
+ lineBreak : anyOf(string, :class:`ExprRef`)
+
+ lineHeight : anyOf(float, :class:`ExprRef`)
+
+ opacity : anyOf(float, :class:`ExprRef`)
+ The overall opacity (value between [0,1]).
+
+ **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,
+ ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.
+ order : anyOf(None, boolean)
+ For line and trail marks, this ``order`` property can be set to ``null`` or
+ ``false`` to make the lines use the original order in the data sources.
+ orient : :class:`Orientation`
+ The orientation of a non-stacked bar, tick, area, and line charts. The value is
+ either horizontal (default) or vertical. - For bar, rule and tick, this determines
+ whether the size of the bar and tick should be applied to x or y dimension. - For
+ area, this property determines the orient property of the Vega output. - For line
+ and trail marks, this property determines the sort order of the points in the line
+ if ``config.sortLineBy`` is not specified. For stacked charts, this is always
+ determined by the orientation of the stack; therefore explicitly specified value
+ will be ignored.
+ outerRadius : anyOf(float, :class:`ExprRef`)
+ The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``.
+ padAngle : anyOf(float, :class:`ExprRef`)
+
+ point : anyOf(boolean, :class:`OverlayMarkDef`, string)
+ A flag for overlaying points on top of line or area marks, or an object defining the
+ properties of the overlayed points.
+
+
+ If this property is ``"transparent"``, transparent points will be used (for
+ enhancing tooltips and selections).
+
+ If this property is an empty object ( ``{}`` ) or ``true``, filled points with
+ default properties will be used.
+
+ If this property is ``false``, no points would be automatically added to line or
+ area marks.
+
+ **Default value:** ``false``.
+ radius : anyOf(float, :class:`ExprRef`)
+ For arc mark, the primary (outer) radius in pixels.
+
+ For text marks, polar coordinate radial offset, in pixels, of the text from the
+ origin determined by the ``x`` and ``y`` properties.
+ radius2 : anyOf(float, :class:`ExprRef`)
+ The secondary (inner) radius in pixels of arc marks.
+ shape : anyOf(anyOf(:class:`SymbolShape`, string), :class:`ExprRef`)
+
+ size : anyOf(float, :class:`ExprRef`)
+ Default size for marks. - For ``point`` / ``circle`` / ``square``, this represents
+ the pixel area of the marks. Note that this value sets the area of the symbol; the
+ side lengths will increase with the square root of this value. - For ``bar``, this
+ represents the band size of the bar, in pixels. - For ``text``, this represents the
+ font size, in pixels.
+
+ **Default value:** - ``30`` for point, circle, square marks; width/height's ``step``
+ - ``2`` for bar marks with discrete dimensions; - ``5`` for bar marks with
+ continuous dimensions; - ``11`` for text marks.
+ smooth : anyOf(boolean, :class:`ExprRef`)
+
+ startAngle : anyOf(float, :class:`ExprRef`)
+
+ stroke : anyOf(:class:`Color`, :class:`Gradient`, None, :class:`ExprRef`)
+ Default stroke color. This property has higher precedence than ``config.color``. Set
+ to ``null`` to remove stroke.
+
+ **Default value:** (None)
+ strokeCap : anyOf(:class:`StrokeCap`, :class:`ExprRef`)
+
+ strokeDash : anyOf(List(float), :class:`ExprRef`)
+
+ strokeDashOffset : anyOf(float, :class:`ExprRef`)
+
+ strokeJoin : anyOf(:class:`StrokeJoin`, :class:`ExprRef`)
+
+ strokeMiterLimit : anyOf(float, :class:`ExprRef`)
+
+ strokeOffset : anyOf(float, :class:`ExprRef`)
+
+ strokeOpacity : anyOf(float, :class:`ExprRef`)
+
+ strokeWidth : anyOf(float, :class:`ExprRef`)
+
+ tension : anyOf(float, :class:`ExprRef`)
+
+ text : anyOf(:class:`Text`, :class:`ExprRef`)
+
+ theta : anyOf(float, :class:`ExprRef`)
+ For arc marks, the arc length in radians if theta2 is not specified, otherwise the
+ start arc angle. (A value of 0 indicates up or “north”, increasing values proceed
+ clockwise.)
+
+ For text marks, polar coordinate angle in radians.
+ theta2 : anyOf(float, :class:`ExprRef`)
+ The end angle of arc marks in radians. A value of 0 indicates up or “north”,
+ increasing values proceed clockwise.
+ timeUnitBand : float
+ Default relative band size for a time unit. If set to ``1``, the bandwidth of the
+ marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the
+ marks will be half of the time unit band step.
+ timeUnitBandPosition : float
+ Default relative band position for a time unit. If set to ``0``, the marks will be
+ positioned at the beginning of the time unit band step. If set to ``0.5``, the marks
+ will be positioned in the middle of the time unit band step.
+ tooltip : anyOf(float, string, boolean, :class:`TooltipContent`, :class:`ExprRef`, None)
+ The tooltip text string to show upon mouse hover or an object defining which fields
+ should the tooltip be derived from.
+
+
+ * If ``tooltip`` is ``true`` or ``{"content": "encoding"}``, then all fields from
+ ``encoding`` will be used. - If ``tooltip`` is ``{"content": "data"}``, then all
+ fields that appear in the highlighted data point will be used. - If set to
+ ``null`` or ``false``, then no tooltip will be used.
+
+ See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__
+ documentation for a detailed discussion about tooltip in Vega-Lite.
+
+ **Default value:** ``null``
+ url : anyOf(:class:`URI`, :class:`ExprRef`)
+
+ width : anyOf(float, :class:`ExprRef`)
+
+ x : anyOf(float, string, :class:`ExprRef`)
+ X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without
+ specified ``x2`` or ``width``.
+
+ The ``value`` of this channel can be a number or a string ``"width"`` for the width
+ of the plot.
+ x2 : anyOf(float, string, :class:`ExprRef`)
+ X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
+
+ The ``value`` of this channel can be a number or a string ``"width"`` for the width
+ of the plot.
+ y : anyOf(float, string, :class:`ExprRef`)
+ Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without
+ specified ``y2`` or ``height``.
+
+ The ``value`` of this channel can be a number or a string ``"height"`` for the
+ height of the plot.
+ y2 : anyOf(float, string, :class:`ExprRef`)
+ Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
+
+ The ``value`` of this channel can be a number or a string ``"height"`` for the
+ height of the plot.
+ """
+ _schema = {'$ref': '#/definitions/LineConfig'}
+
+ def __init__(self, align=Undefined, angle=Undefined, aria=Undefined, ariaRole=Undefined,
+ ariaRoleDescription=Undefined, aspect=Undefined, baseline=Undefined, blend=Undefined,
+ color=Undefined, cornerRadius=Undefined, cornerRadiusBottomLeft=Undefined,
+ cornerRadiusBottomRight=Undefined, cornerRadiusTopLeft=Undefined,
+ cornerRadiusTopRight=Undefined, cursor=Undefined, description=Undefined, dir=Undefined,
+ dx=Undefined, dy=Undefined, ellipsis=Undefined, endAngle=Undefined, fill=Undefined,
+ fillOpacity=Undefined, filled=Undefined, font=Undefined, fontSize=Undefined,
+ fontStyle=Undefined, fontWeight=Undefined, height=Undefined, href=Undefined,
+ innerRadius=Undefined, interpolate=Undefined, invalid=Undefined, limit=Undefined,
+ lineBreak=Undefined, lineHeight=Undefined, opacity=Undefined, order=Undefined,
+ orient=Undefined, outerRadius=Undefined, padAngle=Undefined, point=Undefined,
+ radius=Undefined, radius2=Undefined, shape=Undefined, size=Undefined, smooth=Undefined,
+ startAngle=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined,
+ strokeDashOffset=Undefined, strokeJoin=Undefined, strokeMiterLimit=Undefined,
+ strokeOffset=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined,
+ tension=Undefined, text=Undefined, theta=Undefined, theta2=Undefined,
+ timeUnitBand=Undefined, timeUnitBandPosition=Undefined, tooltip=Undefined,
+ url=Undefined, width=Undefined, x=Undefined, x2=Undefined, y=Undefined, y2=Undefined,
+ **kwds):
+ super(LineConfig, self).__init__(align=align, angle=angle, aria=aria, ariaRole=ariaRole,
+ ariaRoleDescription=ariaRoleDescription, aspect=aspect,
+ baseline=baseline, blend=blend, color=color,
+ cornerRadius=cornerRadius,
+ cornerRadiusBottomLeft=cornerRadiusBottomLeft,
+ cornerRadiusBottomRight=cornerRadiusBottomRight,
+ cornerRadiusTopLeft=cornerRadiusTopLeft,
+ cornerRadiusTopRight=cornerRadiusTopRight, cursor=cursor,
+ description=description, dir=dir, dx=dx, dy=dy,
+ ellipsis=ellipsis, endAngle=endAngle, fill=fill,
+ fillOpacity=fillOpacity, filled=filled, font=font,
+ fontSize=fontSize, fontStyle=fontStyle, fontWeight=fontWeight,
+ height=height, href=href, innerRadius=innerRadius,
+ interpolate=interpolate, invalid=invalid, limit=limit,
+ lineBreak=lineBreak, lineHeight=lineHeight, opacity=opacity,
+ order=order, orient=orient, outerRadius=outerRadius,
+ padAngle=padAngle, point=point, radius=radius, radius2=radius2,
+ shape=shape, size=size, smooth=smooth, startAngle=startAngle,
+ stroke=stroke, strokeCap=strokeCap, strokeDash=strokeDash,
+ strokeDashOffset=strokeDashOffset, strokeJoin=strokeJoin,
+ strokeMiterLimit=strokeMiterLimit, strokeOffset=strokeOffset,
+ strokeOpacity=strokeOpacity, strokeWidth=strokeWidth,
+ tension=tension, text=text, theta=theta, theta2=theta2,
+ timeUnitBand=timeUnitBand,
+ timeUnitBandPosition=timeUnitBandPosition, tooltip=tooltip,
+ url=url, width=width, x=x, x2=x2, y=y, y2=y2, **kwds)
+
+
+class LinearGradient(Gradient):
+ """LinearGradient schema wrapper
+
+ Mapping(required=[gradient, stops])
+
+ Attributes
+ ----------
+
+ gradient : string
+ The type of gradient. Use ``"linear"`` for a linear gradient.
+ stops : List(:class:`GradientStop`)
+ An array of gradient stops defining the gradient color sequence.
+ id : string
+
+ x1 : float
+ The starting x-coordinate, in normalized [0, 1] coordinates, of the linear gradient.
+
+ **Default value:** ``0``
+ x2 : float
+ The ending x-coordinate, in normalized [0, 1] coordinates, of the linear gradient.
+
+ **Default value:** ``1``
+ y1 : float
+ The starting y-coordinate, in normalized [0, 1] coordinates, of the linear gradient.
+
+ **Default value:** ``0``
+ y2 : float
+ The ending y-coordinate, in normalized [0, 1] coordinates, of the linear gradient.
+
+ **Default value:** ``0``
+ """
+ _schema = {'$ref': '#/definitions/LinearGradient'}
+
+ def __init__(self, gradient=Undefined, stops=Undefined, id=Undefined, x1=Undefined, x2=Undefined,
+ y1=Undefined, y2=Undefined, **kwds):
+ super(LinearGradient, self).__init__(gradient=gradient, stops=stops, id=id, x1=x1, x2=x2, y1=y1,
+ y2=y2, **kwds)
+
+
+class LookupData(VegaLiteSchema):
+ """LookupData schema wrapper
+
+ Mapping(required=[data, key])
+
+ Attributes
+ ----------
+
+ data : :class:`Data`
+ Secondary data source to lookup in.
+ key : :class:`FieldName`
+ Key in data to lookup.
+ fields : List(:class:`FieldName`)
+ Fields in foreign data or selection to lookup. If not specified, the entire object
+ is queried.
+ """
+ _schema = {'$ref': '#/definitions/LookupData'}
+
+ def __init__(self, data=Undefined, key=Undefined, fields=Undefined, **kwds):
+ super(LookupData, self).__init__(data=data, key=key, fields=fields, **kwds)
+
+
+class LookupSelection(VegaLiteSchema):
+ """LookupSelection schema wrapper
+
+ Mapping(required=[key, selection])
+
+ Attributes
+ ----------
+
+ key : :class:`FieldName`
+ Key in data to lookup.
+ selection : string
+ Selection name to look up.
+ fields : List(:class:`FieldName`)
+ Fields in foreign data or selection to lookup. If not specified, the entire object
+ is queried.
+ """
+ _schema = {'$ref': '#/definitions/LookupSelection'}
+
+ def __init__(self, key=Undefined, selection=Undefined, fields=Undefined, **kwds):
+ super(LookupSelection, self).__init__(key=key, selection=selection, fields=fields, **kwds)
+
+
+class Mark(AnyMark):
+ """Mark schema wrapper
+
+ enum('arc', 'area', 'bar', 'image', 'line', 'point', 'rect', 'rule', 'text', 'tick',
+ 'trail', 'circle', 'square', 'geoshape')
+ All types of primitive marks.
+ """
+ _schema = {'$ref': '#/definitions/Mark'}
+
+ def __init__(self, *args):
+ super(Mark, self).__init__(*args)
+
+
+class MarkConfig(AnyMarkConfig):
+ """MarkConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ align : anyOf(:class:`Align`, :class:`ExprRef`)
+ The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule).
+ One of ``"left"``, ``"right"``, ``"center"``.
+
+ **Note:** Expression reference is *not* supported for range marks.
+ angle : anyOf(float, :class:`ExprRef`)
+
+ aria : anyOf(boolean, :class:`ExprRef`)
+
+ ariaRole : anyOf(string, :class:`ExprRef`)
+
+ ariaRoleDescription : anyOf(string, :class:`ExprRef`)
+
+ aspect : anyOf(boolean, :class:`ExprRef`)
+
+ baseline : anyOf(:class:`TextBaseline`, :class:`ExprRef`)
+ For text marks, the vertical text baseline. One of ``"alphabetic"`` (default),
+ ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, ``"line-bottom"``, or an
+ expression reference that provides one of the valid values. The ``"line-top"`` and
+ ``"line-bottom"`` values operate similarly to ``"top"`` and ``"bottom"``, but are
+ calculated relative to the ``lineHeight`` rather than ``fontSize`` alone.
+
+ For range marks, the vertical alignment of the marks. One of ``"top"``,
+ ``"middle"``, ``"bottom"``.
+
+ **Note:** Expression reference is *not* supported for range marks.
+ blend : anyOf(:class:`Blend`, :class:`ExprRef`)
+
+ color : anyOf(:class:`Color`, :class:`Gradient`, :class:`ExprRef`)
+ Default color.
+
+ **Default value:** :raw-html:`<span style="color: #4682b4;">&#9632;</span>`
+ ``"#4682b4"``
+
+ **Note:** - This property cannot be used in a `style config
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. - The ``fill``
+ and ``stroke`` properties have higher precedence than ``color`` and will override
+ ``color``.
+ cornerRadius : anyOf(float, :class:`ExprRef`)
+
+ cornerRadiusBottomLeft : anyOf(float, :class:`ExprRef`)
+
+ cornerRadiusBottomRight : anyOf(float, :class:`ExprRef`)
+
+ cornerRadiusTopLeft : anyOf(float, :class:`ExprRef`)
+
+ cornerRadiusTopRight : anyOf(float, :class:`ExprRef`)
+
+ cursor : anyOf(:class:`Cursor`, :class:`ExprRef`)
+
+ description : anyOf(string, :class:`ExprRef`)
+
+ dir : anyOf(:class:`TextDirection`, :class:`ExprRef`)
+
+ dx : anyOf(float, :class:`ExprRef`)
+
+ dy : anyOf(float, :class:`ExprRef`)
+
+ ellipsis : anyOf(string, :class:`ExprRef`)
+
+ endAngle : anyOf(float, :class:`ExprRef`)
+
+ fill : anyOf(:class:`Color`, :class:`Gradient`, None, :class:`ExprRef`)
+ Default fill color. This property has higher precedence than ``config.color``. Set
+ to ``null`` to remove fill.
+
+ **Default value:** (None)
+ fillOpacity : anyOf(float, :class:`ExprRef`)
+
+ filled : boolean
+ Whether the mark's color should be used as fill color instead of stroke color.
+
+ **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well
+ as ``geoshape`` marks for `graticule
+ <https://vega.github.io/vega-lite/docs/data.html#graticule>`__ data sources;
+ otherwise, ``true``.
+
+ **Note:** This property cannot be used in a `style config
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
+ font : anyOf(string, :class:`ExprRef`)
+
+ fontSize : anyOf(float, :class:`ExprRef`)
+
+ fontStyle : anyOf(:class:`FontStyle`, :class:`ExprRef`)
+
+ fontWeight : anyOf(:class:`FontWeight`, :class:`ExprRef`)
+
+ height : anyOf(float, :class:`ExprRef`)
+
+ href : anyOf(:class:`URI`, :class:`ExprRef`)
+
+ innerRadius : anyOf(float, :class:`ExprRef`)
+ The inner radius in pixels of arc marks. ``innerRadius`` is an alias for
+ ``radius2``.
+ interpolate : anyOf(:class:`Interpolate`, :class:`ExprRef`)
+
+ invalid : enum('filter', None)
+ Defines how Vega-Lite should handle marks for invalid values ( ``null`` and ``NaN``
+ ). - If set to ``"filter"`` (default), all data items with null values will be
+ skipped (for line, trail, and area marks) or filtered (for other marks). - If
+ ``null``, all data items are included. In this case, invalid values will be
+ interpreted as zeroes.
+ limit : anyOf(float, :class:`ExprRef`)
+
+ lineBreak : anyOf(string, :class:`ExprRef`)
+
+ lineHeight : anyOf(float, :class:`ExprRef`)
+
+ opacity : anyOf(float, :class:`ExprRef`)
+ The overall opacity (value between [0,1]).
+
+ **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,
+ ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.
+ order : anyOf(None, boolean)
+ For line and trail marks, this ``order`` property can be set to ``null`` or
+ ``false`` to make the lines use the original order in the data sources.
+ orient : :class:`Orientation`
+ The orientation of a non-stacked bar, tick, area, and line charts. The value is
+ either horizontal (default) or vertical. - For bar, rule and tick, this determines
+ whether the size of the bar and tick should be applied to x or y dimension. - For
+ area, this property determines the orient property of the Vega output. - For line
+ and trail marks, this property determines the sort order of the points in the line
+ if ``config.sortLineBy`` is not specified. For stacked charts, this is always
+ determined by the orientation of the stack; therefore explicitly specified value
+ will be ignored.
+ outerRadius : anyOf(float, :class:`ExprRef`)
+ The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``.
+ padAngle : anyOf(float, :class:`ExprRef`)
+
+ radius : anyOf(float, :class:`ExprRef`)
+ For arc mark, the primary (outer) radius in pixels.
+
+ For text marks, polar coordinate radial offset, in pixels, of the text from the
+ origin determined by the ``x`` and ``y`` properties.
+ radius2 : anyOf(float, :class:`ExprRef`)
+ The secondary (inner) radius in pixels of arc marks.
+ shape : anyOf(anyOf(:class:`SymbolShape`, string), :class:`ExprRef`)
+
+ size : anyOf(float, :class:`ExprRef`)
+ Default size for marks. - For ``point`` / ``circle`` / ``square``, this represents
+ the pixel area of the marks. Note that this value sets the area of the symbol; the
+ side lengths will increase with the square root of this value. - For ``bar``, this
+ represents the band size of the bar, in pixels. - For ``text``, this represents the
+ font size, in pixels.
+
+ **Default value:** - ``30`` for point, circle, square marks; width/height's ``step``
+ - ``2`` for bar marks with discrete dimensions; - ``5`` for bar marks with
+ continuous dimensions; - ``11`` for text marks.
+ smooth : anyOf(boolean, :class:`ExprRef`)
+
+ startAngle : anyOf(float, :class:`ExprRef`)
+
+ stroke : anyOf(:class:`Color`, :class:`Gradient`, None, :class:`ExprRef`)
+ Default stroke color. This property has higher precedence than ``config.color``. Set
+ to ``null`` to remove stroke.
+
+ **Default value:** (None)
+ strokeCap : anyOf(:class:`StrokeCap`, :class:`ExprRef`)
+
+ strokeDash : anyOf(List(float), :class:`ExprRef`)
+
+ strokeDashOffset : anyOf(float, :class:`ExprRef`)
+
+ strokeJoin : anyOf(:class:`StrokeJoin`, :class:`ExprRef`)
+
+ strokeMiterLimit : anyOf(float, :class:`ExprRef`)
+
+ strokeOffset : anyOf(float, :class:`ExprRef`)
+
+ strokeOpacity : anyOf(float, :class:`ExprRef`)
+
+ strokeWidth : anyOf(float, :class:`ExprRef`)
+
+ tension : anyOf(float, :class:`ExprRef`)
+
+ text : anyOf(:class:`Text`, :class:`ExprRef`)
+
+ theta : anyOf(float, :class:`ExprRef`)
+ For arc marks, the arc length in radians if theta2 is not specified, otherwise the
+ start arc angle. (A value of 0 indicates up or “north”, increasing values proceed
+ clockwise.)
+
+ For text marks, polar coordinate angle in radians.
+ theta2 : anyOf(float, :class:`ExprRef`)
+ The end angle of arc marks in radians. A value of 0 indicates up or “north”,
+ increasing values proceed clockwise.
+ timeUnitBand : float
+ Default relative band size for a time unit. If set to ``1``, the bandwidth of the
+ marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the
+ marks will be half of the time unit band step.
+ timeUnitBandPosition : float
+ Default relative band position for a time unit. If set to ``0``, the marks will be
+ positioned at the beginning of the time unit band step. If set to ``0.5``, the marks
+ will be positioned in the middle of the time unit band step.
+ tooltip : anyOf(float, string, boolean, :class:`TooltipContent`, :class:`ExprRef`, None)
+ The tooltip text string to show upon mouse hover or an object defining which fields
+ should the tooltip be derived from.
+
+
+ * If ``tooltip`` is ``true`` or ``{"content": "encoding"}``, then all fields from
+ ``encoding`` will be used. - If ``tooltip`` is ``{"content": "data"}``, then all
+ fields that appear in the highlighted data point will be used. - If set to
+ ``null`` or ``false``, then no tooltip will be used.
+
+ See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__
+ documentation for a detailed discussion about tooltip in Vega-Lite.
+
+ **Default value:** ``null``
+ url : anyOf(:class:`URI`, :class:`ExprRef`)
+
+ width : anyOf(float, :class:`ExprRef`)
+
+ x : anyOf(float, string, :class:`ExprRef`)
+ X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without
+ specified ``x2`` or ``width``.
+
+ The ``value`` of this channel can be a number or a string ``"width"`` for the width
+ of the plot.
+ x2 : anyOf(float, string, :class:`ExprRef`)
+ X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
+
+ The ``value`` of this channel can be a number or a string ``"width"`` for the width
+ of the plot.
+ y : anyOf(float, string, :class:`ExprRef`)
+ Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without
+ specified ``y2`` or ``height``.
+
+ The ``value`` of this channel can be a number or a string ``"height"`` for the
+ height of the plot.
+ y2 : anyOf(float, string, :class:`ExprRef`)
+ Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
+
+ The ``value`` of this channel can be a number or a string ``"height"`` for the
+ height of the plot.
+ """
+ _schema = {'$ref': '#/definitions/MarkConfig'}
+
+ def __init__(self, align=Undefined, angle=Undefined, aria=Undefined, ariaRole=Undefined,
+ ariaRoleDescription=Undefined, aspect=Undefined, baseline=Undefined, blend=Undefined,
+ color=Undefined, cornerRadius=Undefined, cornerRadiusBottomLeft=Undefined,
+ cornerRadiusBottomRight=Undefined, cornerRadiusTopLeft=Undefined,
+ cornerRadiusTopRight=Undefined, cursor=Undefined, description=Undefined, dir=Undefined,
+ dx=Undefined, dy=Undefined, ellipsis=Undefined, endAngle=Undefined, fill=Undefined,
+ fillOpacity=Undefined, filled=Undefined, font=Undefined, fontSize=Undefined,
+ fontStyle=Undefined, fontWeight=Undefined, height=Undefined, href=Undefined,
+ innerRadius=Undefined, interpolate=Undefined, invalid=Undefined, limit=Undefined,
+ lineBreak=Undefined, lineHeight=Undefined, opacity=Undefined, order=Undefined,
+ orient=Undefined, outerRadius=Undefined, padAngle=Undefined, radius=Undefined,
+ radius2=Undefined, shape=Undefined, size=Undefined, smooth=Undefined,
+ startAngle=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined,
+ strokeDashOffset=Undefined, strokeJoin=Undefined, strokeMiterLimit=Undefined,
+ strokeOffset=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined,
+ tension=Undefined, text=Undefined, theta=Undefined, theta2=Undefined,
+ timeUnitBand=Undefined, timeUnitBandPosition=Undefined, tooltip=Undefined,
+ url=Undefined, width=Undefined, x=Undefined, x2=Undefined, y=Undefined, y2=Undefined,
+ **kwds):
+ super(MarkConfig, self).__init__(align=align, angle=angle, aria=aria, ariaRole=ariaRole,
+ ariaRoleDescription=ariaRoleDescription, aspect=aspect,
+ baseline=baseline, blend=blend, color=color,
+ cornerRadius=cornerRadius,
+ cornerRadiusBottomLeft=cornerRadiusBottomLeft,
+ cornerRadiusBottomRight=cornerRadiusBottomRight,
+ cornerRadiusTopLeft=cornerRadiusTopLeft,
+ cornerRadiusTopRight=cornerRadiusTopRight, cursor=cursor,
+ description=description, dir=dir, dx=dx, dy=dy,
+ ellipsis=ellipsis, endAngle=endAngle, fill=fill,
+ fillOpacity=fillOpacity, filled=filled, font=font,
+ fontSize=fontSize, fontStyle=fontStyle, fontWeight=fontWeight,
+ height=height, href=href, innerRadius=innerRadius,
+ interpolate=interpolate, invalid=invalid, limit=limit,
+ lineBreak=lineBreak, lineHeight=lineHeight, opacity=opacity,
+ order=order, orient=orient, outerRadius=outerRadius,
+ padAngle=padAngle, radius=radius, radius2=radius2, shape=shape,
+ size=size, smooth=smooth, startAngle=startAngle, stroke=stroke,
+ strokeCap=strokeCap, strokeDash=strokeDash,
+ strokeDashOffset=strokeDashOffset, strokeJoin=strokeJoin,
+ strokeMiterLimit=strokeMiterLimit, strokeOffset=strokeOffset,
+ strokeOpacity=strokeOpacity, strokeWidth=strokeWidth,
+ tension=tension, text=text, theta=theta, theta2=theta2,
+ timeUnitBand=timeUnitBand,
+ timeUnitBandPosition=timeUnitBandPosition, tooltip=tooltip,
+ url=url, width=width, x=x, x2=x2, y=y, y2=y2, **kwds)
+
+
+class MarkConfigExprOrSignalRef(VegaLiteSchema):
+ """MarkConfigExprOrSignalRef schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ align : anyOf(:class:`Align`, :class:`ExprOrSignalRef`)
+ The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule).
+ One of ``"left"``, ``"right"``, ``"center"``.
+
+ **Note:** Expression reference is *not* supported for range marks.
+ angle : anyOf(float, :class:`ExprOrSignalRef`)
+
+ aria : anyOf(boolean, :class:`ExprOrSignalRef`)
+
+ ariaRole : anyOf(string, :class:`ExprOrSignalRef`)
+
+ ariaRoleDescription : anyOf(string, :class:`ExprOrSignalRef`)
+
+ aspect : anyOf(boolean, :class:`ExprOrSignalRef`)
+
+ baseline : anyOf(:class:`TextBaseline`, :class:`ExprOrSignalRef`)
+ For text marks, the vertical text baseline. One of ``"alphabetic"`` (default),
+ ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, ``"line-bottom"``, or an
+ expression reference that provides one of the valid values. The ``"line-top"`` and
+ ``"line-bottom"`` values operate similarly to ``"top"`` and ``"bottom"``, but are
+ calculated relative to the ``lineHeight`` rather than ``fontSize`` alone.
+
+ For range marks, the vertical alignment of the marks. One of ``"top"``,
+ ``"middle"``, ``"bottom"``.
+
+ **Note:** Expression reference is *not* supported for range marks.
+ blend : anyOf(:class:`Blend`, :class:`ExprOrSignalRef`)
+
+ color : anyOf(:class:`Color`, :class:`Gradient`, :class:`ExprOrSignalRef`)
+ Default color.
+
+ **Default value:** :raw-html:`<span style="color: #4682b4;">&#9632;</span>`
+ ``"#4682b4"``
+
+ **Note:** - This property cannot be used in a `style config
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. - The ``fill``
+ and ``stroke`` properties have higher precedence than ``color`` and will override
+ ``color``.
+ cornerRadius : anyOf(float, :class:`ExprOrSignalRef`)
+
+ cornerRadiusBottomLeft : anyOf(float, :class:`ExprOrSignalRef`)
+
+ cornerRadiusBottomRight : anyOf(float, :class:`ExprOrSignalRef`)
+
+ cornerRadiusTopLeft : anyOf(float, :class:`ExprOrSignalRef`)
+
+ cornerRadiusTopRight : anyOf(float, :class:`ExprOrSignalRef`)
+
+ cursor : anyOf(:class:`Cursor`, :class:`ExprOrSignalRef`)
+
+ description : anyOf(string, :class:`ExprOrSignalRef`)
+
+ dir : anyOf(:class:`TextDirection`, :class:`ExprOrSignalRef`)
+
+ dx : anyOf(float, :class:`ExprOrSignalRef`)
+
+ dy : anyOf(float, :class:`ExprOrSignalRef`)
+
+ ellipsis : anyOf(string, :class:`ExprOrSignalRef`)
+
+ endAngle : anyOf(float, :class:`ExprOrSignalRef`)
+
+ fill : anyOf(:class:`Color`, :class:`Gradient`, None, :class:`ExprOrSignalRef`)
+ Default fill color. This property has higher precedence than ``config.color``. Set
+ to ``null`` to remove fill.
+
+ **Default value:** (None)
+ fillOpacity : anyOf(float, :class:`ExprOrSignalRef`)
+
+ filled : boolean
+ Whether the mark's color should be used as fill color instead of stroke color.
+
+ **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well
+ as ``geoshape`` marks for `graticule
+ <https://vega.github.io/vega-lite/docs/data.html#graticule>`__ data sources;
+ otherwise, ``true``.
+
+ **Note:** This property cannot be used in a `style config
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
+ font : anyOf(string, :class:`ExprOrSignalRef`)
+
+ fontSize : anyOf(float, :class:`ExprOrSignalRef`)
+
+ fontStyle : anyOf(:class:`FontStyle`, :class:`ExprOrSignalRef`)
+
+ fontWeight : anyOf(:class:`FontWeight`, :class:`ExprOrSignalRef`)
+
+ height : anyOf(float, :class:`ExprOrSignalRef`)
+
+ href : anyOf(:class:`URI`, :class:`ExprOrSignalRef`)
+
+ innerRadius : anyOf(float, :class:`ExprOrSignalRef`)
+ The inner radius in pixels of arc marks. ``innerRadius`` is an alias for
+ ``radius2``.
+ interpolate : anyOf(:class:`Interpolate`, :class:`ExprOrSignalRef`)
+
+ invalid : enum('filter', None)
+ Defines how Vega-Lite should handle marks for invalid values ( ``null`` and ``NaN``
+ ). - If set to ``"filter"`` (default), all data items with null values will be
+ skipped (for line, trail, and area marks) or filtered (for other marks). - If
+ ``null``, all data items are included. In this case, invalid values will be
+ interpreted as zeroes.
+ limit : anyOf(float, :class:`ExprOrSignalRef`)
+
+ lineBreak : anyOf(string, :class:`ExprOrSignalRef`)
+
+ lineHeight : anyOf(float, :class:`ExprOrSignalRef`)
+
+ opacity : anyOf(float, :class:`ExprOrSignalRef`)
+ The overall opacity (value between [0,1]).
+
+ **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,
+ ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.
+ order : anyOf(None, boolean)
+ For line and trail marks, this ``order`` property can be set to ``null`` or
+ ``false`` to make the lines use the original order in the data sources.
+ orient : :class:`Orientation`
+ The orientation of a non-stacked bar, tick, area, and line charts. The value is
+ either horizontal (default) or vertical. - For bar, rule and tick, this determines
+ whether the size of the bar and tick should be applied to x or y dimension. - For
+ area, this property determines the orient property of the Vega output. - For line
+ and trail marks, this property determines the sort order of the points in the line
+ if ``config.sortLineBy`` is not specified. For stacked charts, this is always
+ determined by the orientation of the stack; therefore explicitly specified value
+ will be ignored.
+ outerRadius : anyOf(float, :class:`ExprOrSignalRef`)
+ The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``.
+ padAngle : anyOf(float, :class:`ExprOrSignalRef`)
+
+ radius : anyOf(float, :class:`ExprOrSignalRef`)
+ For arc mark, the primary (outer) radius in pixels.
+
+ For text marks, polar coordinate radial offset, in pixels, of the text from the
+ origin determined by the ``x`` and ``y`` properties.
+ radius2 : anyOf(float, :class:`ExprOrSignalRef`)
+ The secondary (inner) radius in pixels of arc marks.
+ shape : anyOf(anyOf(:class:`SymbolShape`, string), :class:`ExprOrSignalRef`)
+
+ size : anyOf(float, :class:`ExprOrSignalRef`)
+ Default size for marks. - For ``point`` / ``circle`` / ``square``, this represents
+ the pixel area of the marks. Note that this value sets the area of the symbol; the
+ side lengths will increase with the square root of this value. - For ``bar``, this
+ represents the band size of the bar, in pixels. - For ``text``, this represents the
+ font size, in pixels.
+
+ **Default value:** - ``30`` for point, circle, square marks; width/height's ``step``
+ - ``2`` for bar marks with discrete dimensions; - ``5`` for bar marks with
+ continuous dimensions; - ``11`` for text marks.
+ smooth : anyOf(boolean, :class:`ExprOrSignalRef`)
+
+ startAngle : anyOf(float, :class:`ExprOrSignalRef`)
+
+ stroke : anyOf(:class:`Color`, :class:`Gradient`, None, :class:`ExprOrSignalRef`)
+ Default stroke color. This property has higher precedence than ``config.color``. Set
+ to ``null`` to remove stroke.
+
+ **Default value:** (None)
+ strokeCap : anyOf(:class:`StrokeCap`, :class:`ExprOrSignalRef`)
+
+ strokeDash : anyOf(List(float), :class:`ExprOrSignalRef`)
+
+ strokeDashOffset : anyOf(float, :class:`ExprOrSignalRef`)
+
+ strokeJoin : anyOf(:class:`StrokeJoin`, :class:`ExprOrSignalRef`)
+
+ strokeMiterLimit : anyOf(float, :class:`ExprOrSignalRef`)
+
+ strokeOffset : anyOf(float, :class:`ExprOrSignalRef`)
+
+ strokeOpacity : anyOf(float, :class:`ExprOrSignalRef`)
+
+ strokeWidth : anyOf(float, :class:`ExprOrSignalRef`)
+
+ tension : anyOf(float, :class:`ExprOrSignalRef`)
+
+ text : anyOf(:class:`Text`, :class:`ExprOrSignalRef`)
+
+ theta : anyOf(float, :class:`ExprOrSignalRef`)
+ For arc marks, the arc length in radians if theta2 is not specified, otherwise the
+ start arc angle. (A value of 0 indicates up or “north”, increasing values proceed
+ clockwise.)
+
+ For text marks, polar coordinate angle in radians.
+ theta2 : anyOf(float, :class:`ExprOrSignalRef`)
+ The end angle of arc marks in radians. A value of 0 indicates up or “north”,
+ increasing values proceed clockwise.
+ timeUnitBand : float
+ Default relative band size for a time unit. If set to ``1``, the bandwidth of the
+ marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the
+ marks will be half of the time unit band step.
+ timeUnitBandPosition : float
+ Default relative band position for a time unit. If set to ``0``, the marks will be
+ positioned at the beginning of the time unit band step. If set to ``0.5``, the marks
+ will be positioned in the middle of the time unit band step.
+ tooltip : anyOf(float, string, boolean, :class:`TooltipContent`, :class:`ExprOrSignalRef`,
+ None)
+ The tooltip text string to show upon mouse hover or an object defining which fields
+ should the tooltip be derived from.
+
+
+ * If ``tooltip`` is ``true`` or ``{"content": "encoding"}``, then all fields from
+ ``encoding`` will be used. - If ``tooltip`` is ``{"content": "data"}``, then all
+ fields that appear in the highlighted data point will be used. - If set to
+ ``null`` or ``false``, then no tooltip will be used.
+
+ See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__
+ documentation for a detailed discussion about tooltip in Vega-Lite.
+
+ **Default value:** ``null``
+ url : anyOf(:class:`URI`, :class:`ExprOrSignalRef`)
+
+ width : anyOf(float, :class:`ExprOrSignalRef`)
+
+ x : anyOf(float, string, :class:`ExprOrSignalRef`)
+ X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without
+ specified ``x2`` or ``width``.
+
+ The ``value`` of this channel can be a number or a string ``"width"`` for the width
+ of the plot.
+ x2 : anyOf(float, string, :class:`ExprOrSignalRef`)
+ X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
+
+ The ``value`` of this channel can be a number or a string ``"width"`` for the width
+ of the plot.
+ y : anyOf(float, string, :class:`ExprOrSignalRef`)
+ Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without
+ specified ``y2`` or ``height``.
+
+ The ``value`` of this channel can be a number or a string ``"height"`` for the
+ height of the plot.
+ y2 : anyOf(float, string, :class:`ExprOrSignalRef`)
+ Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
+
+ The ``value`` of this channel can be a number or a string ``"height"`` for the
+ height of the plot.
+ """
+ _schema = {'$ref': '#/definitions/MarkConfig<ExprOrSignalRef>'}
+
+ def __init__(self, align=Undefined, angle=Undefined, aria=Undefined, ariaRole=Undefined,
+ ariaRoleDescription=Undefined, aspect=Undefined, baseline=Undefined, blend=Undefined,
+ color=Undefined, cornerRadius=Undefined, cornerRadiusBottomLeft=Undefined,
+ cornerRadiusBottomRight=Undefined, cornerRadiusTopLeft=Undefined,
+ cornerRadiusTopRight=Undefined, cursor=Undefined, description=Undefined, dir=Undefined,
+ dx=Undefined, dy=Undefined, ellipsis=Undefined, endAngle=Undefined, fill=Undefined,
+ fillOpacity=Undefined, filled=Undefined, font=Undefined, fontSize=Undefined,
+ fontStyle=Undefined, fontWeight=Undefined, height=Undefined, href=Undefined,
+ innerRadius=Undefined, interpolate=Undefined, invalid=Undefined, limit=Undefined,
+ lineBreak=Undefined, lineHeight=Undefined, opacity=Undefined, order=Undefined,
+ orient=Undefined, outerRadius=Undefined, padAngle=Undefined, radius=Undefined,
+ radius2=Undefined, shape=Undefined, size=Undefined, smooth=Undefined,
+ startAngle=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined,
+ strokeDashOffset=Undefined, strokeJoin=Undefined, strokeMiterLimit=Undefined,
+ strokeOffset=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined,
+ tension=Undefined, text=Undefined, theta=Undefined, theta2=Undefined,
+ timeUnitBand=Undefined, timeUnitBandPosition=Undefined, tooltip=Undefined,
+ url=Undefined, width=Undefined, x=Undefined, x2=Undefined, y=Undefined, y2=Undefined,
+ **kwds):
+ super(MarkConfigExprOrSignalRef, self).__init__(align=align, angle=angle, aria=aria,
+ ariaRole=ariaRole,
+ ariaRoleDescription=ariaRoleDescription,
+ aspect=aspect, baseline=baseline, blend=blend,
+ color=color, cornerRadius=cornerRadius,
+ cornerRadiusBottomLeft=cornerRadiusBottomLeft,
+ cornerRadiusBottomRight=cornerRadiusBottomRight,
+ cornerRadiusTopLeft=cornerRadiusTopLeft,
+ cornerRadiusTopRight=cornerRadiusTopRight,
+ cursor=cursor, description=description, dir=dir,
+ dx=dx, dy=dy, ellipsis=ellipsis,
+ endAngle=endAngle, fill=fill,
+ fillOpacity=fillOpacity, filled=filled,
+ font=font, fontSize=fontSize,
+ fontStyle=fontStyle, fontWeight=fontWeight,
+ height=height, href=href,
+ innerRadius=innerRadius,
+ interpolate=interpolate, invalid=invalid,
+ limit=limit, lineBreak=lineBreak,
+ lineHeight=lineHeight, opacity=opacity,
+ order=order, orient=orient,
+ outerRadius=outerRadius, padAngle=padAngle,
+ radius=radius, radius2=radius2, shape=shape,
+ size=size, smooth=smooth, startAngle=startAngle,
+ stroke=stroke, strokeCap=strokeCap,
+ strokeDash=strokeDash,
+ strokeDashOffset=strokeDashOffset,
+ strokeJoin=strokeJoin,
+ strokeMiterLimit=strokeMiterLimit,
+ strokeOffset=strokeOffset,
+ strokeOpacity=strokeOpacity,
+ strokeWidth=strokeWidth, tension=tension,
+ text=text, theta=theta, theta2=theta2,
+ timeUnitBand=timeUnitBand,
+ timeUnitBandPosition=timeUnitBandPosition,
+ tooltip=tooltip, url=url, width=width, x=x,
+ x2=x2, y=y, y2=y2, **kwds)
+
+
+class MarkDef(AnyMark):
+ """MarkDef schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : :class:`Mark`
+ The mark type. This could a primitive mark type (one of ``"bar"``, ``"circle"``,
+ ``"square"``, ``"tick"``, ``"line"``, ``"area"``, ``"point"``, ``"geoshape"``,
+ ``"rule"``, and ``"text"`` ) or a composite mark type ( ``"boxplot"``,
+ ``"errorband"``, ``"errorbar"`` ).
+ align : anyOf(:class:`Align`, :class:`ExprRef`)
+ The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule).
+ One of ``"left"``, ``"right"``, ``"center"``.
+
+ **Note:** Expression reference is *not* supported for range marks.
+ angle : anyOf(float, :class:`ExprRef`)
+
+ aria : anyOf(boolean, :class:`ExprRef`)
+
+ ariaRole : anyOf(string, :class:`ExprRef`)
+
+ ariaRoleDescription : anyOf(string, :class:`ExprRef`)
+
+ aspect : anyOf(boolean, :class:`ExprRef`)
+
+ bandSize : float
+ The width of the ticks.
+
+ **Default value:** 3/4 of step (width step for horizontal ticks and height step for
+ vertical ticks).
+ baseline : anyOf(:class:`TextBaseline`, :class:`ExprRef`)
+ For text marks, the vertical text baseline. One of ``"alphabetic"`` (default),
+ ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, ``"line-bottom"``, or an
+ expression reference that provides one of the valid values. The ``"line-top"`` and
+ ``"line-bottom"`` values operate similarly to ``"top"`` and ``"bottom"``, but are
+ calculated relative to the ``lineHeight`` rather than ``fontSize`` alone.
+
+ For range marks, the vertical alignment of the marks. One of ``"top"``,
+ ``"middle"``, ``"bottom"``.
+
+ **Note:** Expression reference is *not* supported for range marks.
+ binSpacing : float
+ Offset between bars for binned field. The ideal value for this is either 0
+ (preferred by statisticians) or 1 (Vega-Lite default, D3 example style).
+
+ **Default value:** ``1``
+ blend : anyOf(:class:`Blend`, :class:`ExprRef`)
+
+ clip : boolean
+ Whether a mark be clipped to the enclosing group’s width and height.
+ color : anyOf(:class:`Color`, :class:`Gradient`, :class:`ExprRef`)
+ Default color.
+
+ **Default value:** :raw-html:`<span style="color: #4682b4;">&#9632;</span>`
+ ``"#4682b4"``
+
+ **Note:** - This property cannot be used in a `style config
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. - The ``fill``
+ and ``stroke`` properties have higher precedence than ``color`` and will override
+ ``color``.
+ continuousBandSize : float
+ The default size of the bars on continuous scales.
+
+ **Default value:** ``5``
+ cornerRadius : anyOf(float, :class:`ExprRef`)
+
+ cornerRadiusBottomLeft : anyOf(float, :class:`ExprRef`)
+
+ cornerRadiusBottomRight : anyOf(float, :class:`ExprRef`)
+
+ cornerRadiusEnd : anyOf(float, :class:`ExprRef`)
+ * For vertical bars, top-left and top-right corner radius. - For horizontal bars,
+ top-right and bottom-right corner radius.
+ cornerRadiusTopLeft : anyOf(float, :class:`ExprRef`)
+
+ cornerRadiusTopRight : anyOf(float, :class:`ExprRef`)
+
+ cursor : anyOf(:class:`Cursor`, :class:`ExprRef`)
+
+ description : anyOf(string, :class:`ExprRef`)
+
+ dir : anyOf(:class:`TextDirection`, :class:`ExprRef`)
+
+ discreteBandSize : float
+ The default size of the bars with discrete dimensions. If unspecified, the default
+ size is ``step-2``, which provides 2 pixel offset between bars.
+ dx : anyOf(float, :class:`ExprRef`)
+
+ dy : anyOf(float, :class:`ExprRef`)
+
+ ellipsis : anyOf(string, :class:`ExprRef`)
+
+ fill : anyOf(:class:`Color`, :class:`Gradient`, None, :class:`ExprRef`)
+ Default fill color. This property has higher precedence than ``config.color``. Set
+ to ``null`` to remove fill.
+
+ **Default value:** (None)
+ fillOpacity : anyOf(float, :class:`ExprRef`)
+
+ filled : boolean
+ Whether the mark's color should be used as fill color instead of stroke color.
+
+ **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well
+ as ``geoshape`` marks for `graticule
+ <https://vega.github.io/vega-lite/docs/data.html#graticule>`__ data sources;
+ otherwise, ``true``.
+
+ **Note:** This property cannot be used in a `style config
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
+ font : anyOf(string, :class:`ExprRef`)
+
+ fontSize : anyOf(float, :class:`ExprRef`)
+
+ fontStyle : anyOf(:class:`FontStyle`, :class:`ExprRef`)
+
+ fontWeight : anyOf(:class:`FontWeight`, :class:`ExprRef`)
+
+ height : anyOf(float, :class:`ExprRef`)
+
+ href : anyOf(:class:`URI`, :class:`ExprRef`)
+
+ innerRadius : anyOf(float, :class:`ExprRef`)
+ The inner radius in pixels of arc marks. ``innerRadius`` is an alias for
+ ``radius2``.
+ interpolate : anyOf(:class:`Interpolate`, :class:`ExprRef`)
+
+ invalid : enum('filter', None)
+ Defines how Vega-Lite should handle marks for invalid values ( ``null`` and ``NaN``
+ ). - If set to ``"filter"`` (default), all data items with null values will be
+ skipped (for line, trail, and area marks) or filtered (for other marks). - If
+ ``null``, all data items are included. In this case, invalid values will be
+ interpreted as zeroes.
+ limit : anyOf(float, :class:`ExprRef`)
+
+ line : anyOf(boolean, :class:`OverlayMarkDef`)
+ A flag for overlaying line on top of area marks, or an object defining the
+ properties of the overlayed lines.
+
+
+ If this value is an empty object ( ``{}`` ) or ``true``, lines with default
+ properties will be used.
+
+ If this value is ``false``, no lines would be automatically added to area marks.
+
+ **Default value:** ``false``.
+ lineBreak : anyOf(string, :class:`ExprRef`)
+
+ lineHeight : anyOf(float, :class:`ExprRef`)
+
+ opacity : anyOf(float, :class:`ExprRef`)
+ The overall opacity (value between [0,1]).
+
+ **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,
+ ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.
+ order : anyOf(None, boolean)
+ For line and trail marks, this ``order`` property can be set to ``null`` or
+ ``false`` to make the lines use the original order in the data sources.
+ orient : :class:`Orientation`
+ The orientation of a non-stacked bar, tick, area, and line charts. The value is
+ either horizontal (default) or vertical. - For bar, rule and tick, this determines
+ whether the size of the bar and tick should be applied to x or y dimension. - For
+ area, this property determines the orient property of the Vega output. - For line
+ and trail marks, this property determines the sort order of the points in the line
+ if ``config.sortLineBy`` is not specified. For stacked charts, this is always
+ determined by the orientation of the stack; therefore explicitly specified value
+ will be ignored.
+ outerRadius : anyOf(float, :class:`ExprRef`)
+ The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``.
+ padAngle : anyOf(float, :class:`ExprRef`)
+
+ point : anyOf(boolean, :class:`OverlayMarkDef`, string)
+ A flag for overlaying points on top of line or area marks, or an object defining the
+ properties of the overlayed points.
+
+
+ If this property is ``"transparent"``, transparent points will be used (for
+ enhancing tooltips and selections).
+
+ If this property is an empty object ( ``{}`` ) or ``true``, filled points with
+ default properties will be used.
+
+ If this property is ``false``, no points would be automatically added to line or
+ area marks.
+
+ **Default value:** ``false``.
+ radius : anyOf(float, :class:`ExprRef`)
+ For arc mark, the primary (outer) radius in pixels.
+
+ For text marks, polar coordinate radial offset, in pixels, of the text from the
+ origin determined by the ``x`` and ``y`` properties.
+ radius2 : anyOf(float, :class:`ExprRef`)
+ The secondary (inner) radius in pixels of arc marks.
+ radius2Offset : anyOf(float, :class:`ExprRef`)
+ Offset for radius2.
+ radiusOffset : anyOf(float, :class:`ExprRef`)
+ Offset for radius.
+ shape : anyOf(anyOf(:class:`SymbolShape`, string), :class:`ExprRef`)
+
+ size : anyOf(float, :class:`ExprRef`)
+ Default size for marks. - For ``point`` / ``circle`` / ``square``, this represents
+ the pixel area of the marks. Note that this value sets the area of the symbol; the
+ side lengths will increase with the square root of this value. - For ``bar``, this
+ represents the band size of the bar, in pixels. - For ``text``, this represents the
+ font size, in pixels.
+
+ **Default value:** - ``30`` for point, circle, square marks; width/height's ``step``
+ - ``2`` for bar marks with discrete dimensions; - ``5`` for bar marks with
+ continuous dimensions; - ``11`` for text marks.
+ smooth : anyOf(boolean, :class:`ExprRef`)
+
+ stroke : anyOf(:class:`Color`, :class:`Gradient`, None, :class:`ExprRef`)
+ Default stroke color. This property has higher precedence than ``config.color``. Set
+ to ``null`` to remove stroke.
+
+ **Default value:** (None)
+ strokeCap : anyOf(:class:`StrokeCap`, :class:`ExprRef`)
+
+ strokeDash : anyOf(List(float), :class:`ExprRef`)
+
+ strokeDashOffset : anyOf(float, :class:`ExprRef`)
+
+ strokeJoin : anyOf(:class:`StrokeJoin`, :class:`ExprRef`)
+
+ strokeMiterLimit : anyOf(float, :class:`ExprRef`)
+
+ strokeOffset : anyOf(float, :class:`ExprRef`)
+
+ strokeOpacity : anyOf(float, :class:`ExprRef`)
+
+ strokeWidth : anyOf(float, :class:`ExprRef`)
+
+ style : anyOf(string, List(string))
+ A string or array of strings indicating the name of custom styles to apply to the
+ mark. A style is a named collection of mark property defaults defined within the
+ `style configuration
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. If style is an
+ array, later styles will override earlier styles. Any `mark properties
+ <https://vega.github.io/vega-lite/docs/encoding.html#mark-prop>`__ explicitly
+ defined within the ``encoding`` will override a style default.
+
+ **Default value:** The mark's name. For example, a bar mark will have style
+ ``"bar"`` by default. **Note:** Any specified style will augment the default style.
+ For example, a bar mark with ``"style": "foo"`` will receive from
+ ``config.style.bar`` and ``config.style.foo`` (the specified style ``"foo"`` has
+ higher precedence).
+ tension : anyOf(float, :class:`ExprRef`)
+
+ text : anyOf(:class:`Text`, :class:`ExprRef`)
+
+ theta : anyOf(float, :class:`ExprRef`)
+ For arc marks, the arc length in radians if theta2 is not specified, otherwise the
+ start arc angle. (A value of 0 indicates up or “north”, increasing values proceed
+ clockwise.)
+
+ For text marks, polar coordinate angle in radians.
+ theta2 : anyOf(float, :class:`ExprRef`)
+ The end angle of arc marks in radians. A value of 0 indicates up or “north”,
+ increasing values proceed clockwise.
+ theta2Offset : anyOf(float, :class:`ExprRef`)
+ Offset for theta2.
+ thetaOffset : anyOf(float, :class:`ExprRef`)
+ Offset for theta.
+ thickness : float
+ Thickness of the tick mark.
+
+ **Default value:** ``1``
+ timeUnitBand : float
+ Default relative band size for a time unit. If set to ``1``, the bandwidth of the
+ marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the
+ marks will be half of the time unit band step.
+ timeUnitBandPosition : float
+ Default relative band position for a time unit. If set to ``0``, the marks will be
+ positioned at the beginning of the time unit band step. If set to ``0.5``, the marks
+ will be positioned in the middle of the time unit band step.
+ tooltip : anyOf(float, string, boolean, :class:`TooltipContent`, :class:`ExprRef`, None)
+ The tooltip text string to show upon mouse hover or an object defining which fields
+ should the tooltip be derived from.
+
+
+ * If ``tooltip`` is ``true`` or ``{"content": "encoding"}``, then all fields from
+ ``encoding`` will be used. - If ``tooltip`` is ``{"content": "data"}``, then all
+ fields that appear in the highlighted data point will be used. - If set to
+ ``null`` or ``false``, then no tooltip will be used.
+
+ See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__
+ documentation for a detailed discussion about tooltip in Vega-Lite.
+
+ **Default value:** ``null``
+ url : anyOf(:class:`URI`, :class:`ExprRef`)
+
+ width : anyOf(float, :class:`ExprRef`)
+
+ x : anyOf(float, string, :class:`ExprRef`)
+ X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without
+ specified ``x2`` or ``width``.
+
+ The ``value`` of this channel can be a number or a string ``"width"`` for the width
+ of the plot.
+ x2 : anyOf(float, string, :class:`ExprRef`)
+ X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
+
+ The ``value`` of this channel can be a number or a string ``"width"`` for the width
+ of the plot.
+ x2Offset : anyOf(float, :class:`ExprRef`)
+ Offset for x2-position.
+ xOffset : anyOf(float, :class:`ExprRef`)
+ Offset for x-position.
+ y : anyOf(float, string, :class:`ExprRef`)
+ Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without
+ specified ``y2`` or ``height``.
+
+ The ``value`` of this channel can be a number or a string ``"height"`` for the
+ height of the plot.
+ y2 : anyOf(float, string, :class:`ExprRef`)
+ Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
+
+ The ``value`` of this channel can be a number or a string ``"height"`` for the
+ height of the plot.
+ y2Offset : anyOf(float, :class:`ExprRef`)
+ Offset for y2-position.
+ yOffset : anyOf(float, :class:`ExprRef`)
+ Offset for y-position.
+ """
+ _schema = {'$ref': '#/definitions/MarkDef'}
+
+ def __init__(self, type=Undefined, align=Undefined, angle=Undefined, aria=Undefined,
+ ariaRole=Undefined, ariaRoleDescription=Undefined, aspect=Undefined,
+ bandSize=Undefined, baseline=Undefined, binSpacing=Undefined, blend=Undefined,
+ clip=Undefined, color=Undefined, continuousBandSize=Undefined, cornerRadius=Undefined,
+ cornerRadiusBottomLeft=Undefined, cornerRadiusBottomRight=Undefined,
+ cornerRadiusEnd=Undefined, cornerRadiusTopLeft=Undefined,
+ cornerRadiusTopRight=Undefined, cursor=Undefined, description=Undefined, dir=Undefined,
+ discreteBandSize=Undefined, dx=Undefined, dy=Undefined, ellipsis=Undefined,
+ fill=Undefined, fillOpacity=Undefined, filled=Undefined, font=Undefined,
+ fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined, height=Undefined,
+ href=Undefined, innerRadius=Undefined, interpolate=Undefined, invalid=Undefined,
+ limit=Undefined, line=Undefined, lineBreak=Undefined, lineHeight=Undefined,
+ opacity=Undefined, order=Undefined, orient=Undefined, outerRadius=Undefined,
+ padAngle=Undefined, point=Undefined, radius=Undefined, radius2=Undefined,
+ radius2Offset=Undefined, radiusOffset=Undefined, shape=Undefined, size=Undefined,
+ smooth=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined,
+ strokeDashOffset=Undefined, strokeJoin=Undefined, strokeMiterLimit=Undefined,
+ strokeOffset=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined,
+ style=Undefined, tension=Undefined, text=Undefined, theta=Undefined, theta2=Undefined,
+ theta2Offset=Undefined, thetaOffset=Undefined, thickness=Undefined,
+ timeUnitBand=Undefined, timeUnitBandPosition=Undefined, tooltip=Undefined,
+ url=Undefined, width=Undefined, x=Undefined, x2=Undefined, x2Offset=Undefined,
+ xOffset=Undefined, y=Undefined, y2=Undefined, y2Offset=Undefined, yOffset=Undefined,
+ **kwds):
+ super(MarkDef, self).__init__(type=type, align=align, angle=angle, aria=aria, ariaRole=ariaRole,
+ ariaRoleDescription=ariaRoleDescription, aspect=aspect,
+ bandSize=bandSize, baseline=baseline, binSpacing=binSpacing,
+ blend=blend, clip=clip, color=color,
+ continuousBandSize=continuousBandSize, cornerRadius=cornerRadius,
+ cornerRadiusBottomLeft=cornerRadiusBottomLeft,
+ cornerRadiusBottomRight=cornerRadiusBottomRight,
+ cornerRadiusEnd=cornerRadiusEnd,
+ cornerRadiusTopLeft=cornerRadiusTopLeft,
+ cornerRadiusTopRight=cornerRadiusTopRight, cursor=cursor,
+ description=description, dir=dir,
+ discreteBandSize=discreteBandSize, dx=dx, dy=dy,
+ ellipsis=ellipsis, fill=fill, fillOpacity=fillOpacity,
+ filled=filled, font=font, fontSize=fontSize, fontStyle=fontStyle,
+ fontWeight=fontWeight, height=height, href=href,
+ innerRadius=innerRadius, interpolate=interpolate, invalid=invalid,
+ limit=limit, line=line, lineBreak=lineBreak,
+ lineHeight=lineHeight, opacity=opacity, order=order,
+ orient=orient, outerRadius=outerRadius, padAngle=padAngle,
+ point=point, radius=radius, radius2=radius2,
+ radius2Offset=radius2Offset, radiusOffset=radiusOffset,
+ shape=shape, size=size, smooth=smooth, stroke=stroke,
+ strokeCap=strokeCap, strokeDash=strokeDash,
+ strokeDashOffset=strokeDashOffset, strokeJoin=strokeJoin,
+ strokeMiterLimit=strokeMiterLimit, strokeOffset=strokeOffset,
+ strokeOpacity=strokeOpacity, strokeWidth=strokeWidth, style=style,
+ tension=tension, text=text, theta=theta, theta2=theta2,
+ theta2Offset=theta2Offset, thetaOffset=thetaOffset,
+ thickness=thickness, timeUnitBand=timeUnitBand,
+ timeUnitBandPosition=timeUnitBandPosition, tooltip=tooltip,
+ url=url, width=width, x=x, x2=x2, x2Offset=x2Offset,
+ xOffset=xOffset, y=y, y2=y2, y2Offset=y2Offset, yOffset=yOffset,
+ **kwds)
+
+
+class MarkPropDefGradientstringnull(VegaLiteSchema):
+ """MarkPropDefGradientstringnull schema wrapper
+
+ anyOf(:class:`FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull`,
+ :class:`FieldOrDatumDefWithConditionDatumDefGradientstringnull`,
+ :class:`ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull`)
+ """
+ _schema = {'$ref': '#/definitions/MarkPropDef<(Gradient|string|null)>'}
+
+ def __init__(self, *args, **kwds):
+ super(MarkPropDefGradientstringnull, self).__init__(*args, **kwds)
+
+
+class FieldOrDatumDefWithConditionDatumDefGradientstringnull(ColorDef, MarkPropDefGradientstringnull):
+ """FieldOrDatumDefWithConditionDatumDefGradientstringnull schema wrapper
+
+ Mapping(required=[])
+ A FieldDef with Condition :raw-html:`<ValueDef>` { condition: {value: ...}, field:
+ ..., ... }
+
+ Attributes
+ ----------
+
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ condition : anyOf(:class:`ConditionalValueDefGradientstringnullExprRef`,
+ List(:class:`ConditionalValueDefGradientstringnullExprRef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ datum : anyOf(:class:`PrimitiveValue`, :class:`DateTime`, :class:`ExprRef`,
+ :class:`RepeatRef`)
+ A constant value in data domain.
+ type : :class:`Type`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _schema = {'$ref': '#/definitions/FieldOrDatumDefWithCondition<DatumDef,(Gradient|string|null)>'}
+
+ def __init__(self, band=Undefined, condition=Undefined, datum=Undefined, type=Undefined, **kwds):
+ super(FieldOrDatumDefWithConditionDatumDefGradientstringnull, self).__init__(band=band,
+ condition=condition,
+ datum=datum,
+ type=type, **kwds)
+
+
+class FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull(ColorDef, MarkPropDefGradientstringnull):
+ """FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull schema wrapper
+
+ Mapping(required=[])
+ A FieldDef with Condition :raw-html:`<ValueDef>` { condition: {value: ...}, field:
+ ..., ... }
+
+ Attributes
+ ----------
+
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ condition : anyOf(:class:`ConditionalValueDefGradientstringnullExprRef`,
+ List(:class:`ConditionalValueDefGradientstringnullExprRef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ legend : anyOf(:class:`Legend`, None)
+ An object defining properties of the legend. If ``null``, the legend for the
+ encoding channel will be removed.
+
+ **Default value:** If undefined, default `legend properties
+ <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.
+
+ **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
+ documentation.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ sort : :class:`Sort`
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following: - ``"ascending"`` or
+ ``"descending"`` -- for sorting by the values' natural order in JavaScript. - `A
+ string indicating an encoding channel name to sort by
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g., ``"x"``
+ or ``"y"`` ) with an optional minus prefix for descending sort (e.g., ``"-x"`` to
+ sort by x-field, descending). This channel string is short-form of `a
+ sort-by-encoding definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For example,
+ ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order":
+ "descending"}``. - `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field. - `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values in
+ their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ). - ``null``
+ indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` and sorting by another channel is not supported for ``row`` and
+ ``column``.
+
+ **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
+ documentation.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _schema = {'$ref': '#/definitions/FieldOrDatumDefWithCondition<MarkPropFieldDef,(Gradient|string|null)>'}
+
+ def __init__(self, aggregate=Undefined, band=Undefined, bin=Undefined, condition=Undefined,
+ field=Undefined, legend=Undefined, scale=Undefined, sort=Undefined, timeUnit=Undefined,
+ title=Undefined, type=Undefined, **kwds):
+ super(FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull, self).__init__(aggregate=aggregate,
+ band=band,
+ bin=bin,
+ condition=condition,
+ field=field,
+ legend=legend,
+ scale=scale,
+ sort=sort,
+ timeUnit=timeUnit,
+ title=title,
+ type=type,
+ **kwds)
+
+
+class MarkPropDefnumber(VegaLiteSchema):
+ """MarkPropDefnumber schema wrapper
+
+ anyOf(:class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumber`,
+ :class:`FieldOrDatumDefWithConditionDatumDefnumber`,
+ :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumber`)
+ """
+ _schema = {'$ref': '#/definitions/MarkPropDef<number>'}
+
+ def __init__(self, *args, **kwds):
+ super(MarkPropDefnumber, self).__init__(*args, **kwds)
+
+
+class MarkPropDefnumberArray(VegaLiteSchema):
+ """MarkPropDefnumberArray schema wrapper
+
+ anyOf(:class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumberArray`,
+ :class:`FieldOrDatumDefWithConditionDatumDefnumberArray`,
+ :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumberArray`)
+ """
+ _schema = {'$ref': '#/definitions/MarkPropDef<number[]>'}
+
+ def __init__(self, *args, **kwds):
+ super(MarkPropDefnumberArray, self).__init__(*args, **kwds)
+
+
+class MarkPropDefstringnullTypeForShape(VegaLiteSchema):
+ """MarkPropDefstringnullTypeForShape schema wrapper
+
+ anyOf(:class:`FieldOrDatumDefWithConditionMarkPropFieldDefTypeForShapestringnull`,
+ :class:`FieldOrDatumDefWithConditionDatumDefstringnull`,
+ :class:`ValueDefWithConditionMarkPropFieldOrDatumDefTypeForShapestringnull`)
+ """
+ _schema = {'$ref': '#/definitions/MarkPropDef<(string|null),TypeForShape>'}
+
+ def __init__(self, *args, **kwds):
+ super(MarkPropDefstringnullTypeForShape, self).__init__(*args, **kwds)
+
+
+class MarkType(VegaLiteSchema):
+ """MarkType schema wrapper
+
+ enum('arc', 'area', 'image', 'group', 'line', 'path', 'rect', 'rule', 'shape', 'symbol',
+ 'text', 'trail')
+ """
+ _schema = {'$ref': '#/definitions/MarkType'}
+
+ def __init__(self, *args):
+ super(MarkType, self).__init__(*args)
+
+
+class Month(VegaLiteSchema):
+ """Month schema wrapper
+
+ float
+ """
+ _schema = {'$ref': '#/definitions/Month'}
+
+ def __init__(self, *args):
+ super(Month, self).__init__(*args)
+
+
+class MultiSelectionConfig(VegaLiteSchema):
+ """MultiSelectionConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ bind : :class:`LegendBinding`
+ When set, a selection is populated by interacting with the corresponding legend.
+ Direct manipulation interaction is disabled by default; to re-enable it, set the
+ selection's `on
+ <https://vega.github.io/vega-lite/docs/selection.html#common-selection-properties>`__
+ property.
+
+ Legend bindings are restricted to selections that only specify a single field or
+ encoding.
+ clear : anyOf(:class:`Stream`, string, boolean)
+ Clears the selection, emptying it of all values. Can be a `Event Stream
+ <https://vega.github.io/vega/docs/event-streams/>`__ or ``false`` to disable.
+
+ **Default value:** ``dblclick``.
+
+ **See also:** `clear <https://vega.github.io/vega-lite/docs/clear.html>`__
+ documentation.
+ empty : enum('all', 'none')
+ By default, ``all`` data values are considered to lie within an empty selection.
+ When set to ``none``, empty selections contain no data values.
+ encodings : List(:class:`SingleDefUnitChannel`)
+ An array of encoding channels. The corresponding data field values must match for a
+ data tuple to fall within the selection.
+
+ **See also:** `encodings <https://vega.github.io/vega-lite/docs/project.html>`__
+ documentation.
+ fields : List(:class:`FieldName`)
+ An array of field names whose values must match for a data tuple to fall within the
+ selection.
+
+ **See also:** `fields <https://vega.github.io/vega-lite/docs/project.html>`__
+ documentation.
+ init : List(:class:`SelectionInitMapping`)
+ Initialize the selection with a mapping between `projected channels or field names
+ <https://vega.github.io/vega-lite/docs/project.html>`__ and an initial value (or
+ array of values).
+
+ **See also:** `init <https://vega.github.io/vega-lite/docs/init.html>`__
+ documentation.
+ nearest : boolean
+ When true, an invisible voronoi diagram is computed to accelerate discrete
+ selection. The data value *nearest* the mouse cursor is added to the selection.
+
+ **See also:** `nearest <https://vega.github.io/vega-lite/docs/nearest.html>`__
+ documentation.
+ on : anyOf(:class:`Stream`, string)
+ A `Vega event stream <https://vega.github.io/vega/docs/event-streams/>`__ (object or
+ selector) that triggers the selection. For interval selections, the event stream
+ must specify a `start and end
+ <https://vega.github.io/vega/docs/event-streams/#between-filters>`__.
+ resolve : :class:`SelectionResolution`
+ With layered and multi-view displays, a strategy that determines how selections'
+ data queries are resolved when applied in a filter transform, conditional encoding
+ rule, or scale domain.
+
+ **See also:** `resolve
+ <https://vega.github.io/vega-lite/docs/selection-resolve.html>`__ documentation.
+ toggle : anyOf(string, boolean)
+ Controls whether data values should be toggled or only ever inserted into multi
+ selections. Can be ``true``, ``false`` (for insertion only), or a `Vega expression
+ <https://vega.github.io/vega/docs/expressions/>`__.
+
+ **Default value:** ``true``, which corresponds to ``event.shiftKey`` (i.e., data
+ values are toggled when a user interacts with the shift-key pressed).
+
+ Setting the value to the Vega expression ``"true"`` will toggle data values without
+ the user pressing the shift-key.
+
+ **See also:** `toggle <https://vega.github.io/vega-lite/docs/toggle.html>`__
+ documentation.
+ """
+ _schema = {'$ref': '#/definitions/MultiSelectionConfig'}
+
+ def __init__(self, bind=Undefined, clear=Undefined, empty=Undefined, encodings=Undefined,
+ fields=Undefined, init=Undefined, nearest=Undefined, on=Undefined, resolve=Undefined,
+ toggle=Undefined, **kwds):
+ super(MultiSelectionConfig, self).__init__(bind=bind, clear=clear, empty=empty,
+ encodings=encodings, fields=fields, init=init,
+ nearest=nearest, on=on, resolve=resolve,
+ toggle=toggle, **kwds)
+
+
+class NamedData(DataSource):
+ """NamedData schema wrapper
+
+ Mapping(required=[name])
+
+ Attributes
+ ----------
+
+ name : string
+ Provide a placeholder name and bind data at runtime.
+ format : :class:`DataFormat`
+ An object that specifies the format for parsing the data.
+ """
+ _schema = {'$ref': '#/definitions/NamedData'}
+
+ def __init__(self, name=Undefined, format=Undefined, **kwds):
+ super(NamedData, self).__init__(name=name, format=format, **kwds)
+
+
+class NonArgAggregateOp(Aggregate):
+ """NonArgAggregateOp schema wrapper
+
+ enum('average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product',
+ 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance',
+ 'variancep')
+ """
+ _schema = {'$ref': '#/definitions/NonArgAggregateOp'}
+
+ def __init__(self, *args):
+ super(NonArgAggregateOp, self).__init__(*args)
+
+
+class NormalizedSpec(VegaLiteSchema):
+ """NormalizedSpec schema wrapper
+
+ anyOf(:class:`FacetedUnitSpec`, :class:`LayerSpec`, :class:`RepeatSpec`,
+ :class:`NormalizedFacetSpec`, :class:`NormalizedConcatSpecGenericSpec`,
+ :class:`NormalizedVConcatSpecGenericSpec`, :class:`NormalizedHConcatSpecGenericSpec`)
+ Any specification in Vega-Lite.
+ """
+ _schema = {'$ref': '#/definitions/NormalizedSpec'}
+
+ def __init__(self, *args, **kwds):
+ super(NormalizedSpec, self).__init__(*args, **kwds)
+
+
+class NormalizedConcatSpecGenericSpec(NormalizedSpec):
+ """NormalizedConcatSpecGenericSpec schema wrapper
+
+ Mapping(required=[concat])
+ Base interface for a generalized concatenation specification.
+
+ Attributes
+ ----------
+
+ concat : List(:class:`NormalizedSpec`)
+ A list of views to be concatenated.
+ align : anyOf(:class:`LayoutAlign`, :class:`RowColLayoutAlign`)
+ The alignment to apply to grid rows and columns. The supported string values are
+ ``"all"``, ``"each"``, and ``"none"``.
+
+
+ * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply
+ placed one after the other. - For ``"each"``, subviews will be aligned into a
+ clean grid structure, but each row or column may be of variable size. - For
+ ``"all"``, subviews will be aligned and each row or column will be sized
+ identically based on the maximum observed size. String values for this property
+ will be applied to both grid rows and columns.
+
+ Alternatively, an object value of the form ``{"row": string, "column": string}`` can
+ be used to supply different alignments for rows and columns.
+
+ **Default value:** ``"all"``.
+ bounds : enum('full', 'flush')
+ The bounds calculation method to use for determining the extent of a sub-plot. One
+ of ``full`` (the default) or ``flush``.
+
+
+ * If set to ``full``, the entire calculated bounds (including axes, title, and
+ legend) will be used. - If set to ``flush``, only the specified width and height
+ values for the sub-view will be used. The ``flush`` setting can be useful when
+ attempting to place sub-plots without axes or legends into a uniform grid
+ structure.
+
+ **Default value:** ``"full"``
+ center : anyOf(boolean, :class:`RowColboolean`)
+ Boolean flag indicating if subviews should be centered relative to their respective
+ rows or columns.
+
+ An object value of the form ``{"row": boolean, "column": boolean}`` can be used to
+ supply different centering values for rows and columns.
+
+ **Default value:** ``false``
+ columns : float
+ The number of columns to include in the view composition layout.
+
+ **Default value** : ``undefined`` -- An infinite number of columns (a single row)
+ will be assumed. This is equivalent to ``hconcat`` (for ``concat`` ) and to using
+ the ``column`` channel (for ``facet`` and ``repeat`` ).
+
+ **Note** :
+
+ 1) This property is only for: - the general (wrappable) ``concat`` operator (not
+ ``hconcat`` / ``vconcat`` ) - the ``facet`` and ``repeat`` operator with one
+ field/repetition definition (without row/column nesting)
+
+ 2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat`` )
+ and to using the ``row`` channel (for ``facet`` and ``repeat`` ).
+ data : anyOf(:class:`Data`, None)
+ An object describing the data source. Set to ``null`` to ignore the parent's data
+ source. If no data is set, it is derived from the parent.
+ description : string
+ Description of this mark for commenting purpose.
+ name : string
+ Name of the visualization for later reference.
+ resolve : :class:`Resolve`
+ Scale, axis, and legend resolutions for view composition specifications.
+ spacing : anyOf(float, :class:`RowColnumber`)
+ The spacing in pixels between sub-views of the composition operator. An object of
+ the form ``{"row": number, "column": number}`` can be used to set different spacing
+ values for rows and columns.
+
+ **Default value** : Depends on ``"spacing"`` property of `the view composition
+ configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__ (
+ ``20`` by default)
+ title : anyOf(:class:`Text`, :class:`TitleParams`)
+ Title for the plot.
+ transform : List(:class:`Transform`)
+ An array of data transformations such as filter and new field calculation.
+ """
+ _schema = {'$ref': '#/definitions/NormalizedConcatSpec<GenericSpec>'}
+
+ def __init__(self, concat=Undefined, align=Undefined, bounds=Undefined, center=Undefined,
+ columns=Undefined, data=Undefined, description=Undefined, name=Undefined,
+ resolve=Undefined, spacing=Undefined, title=Undefined, transform=Undefined, **kwds):
+ super(NormalizedConcatSpecGenericSpec, self).__init__(concat=concat, align=align, bounds=bounds,
+ center=center, columns=columns, data=data,
+ description=description, name=name,
+ resolve=resolve, spacing=spacing,
+ title=title, transform=transform, **kwds)
+
+
+class NormalizedFacetSpec(NormalizedSpec):
+ """NormalizedFacetSpec schema wrapper
+
+ Mapping(required=[facet, spec])
+ Base interface for a facet specification.
+
+ Attributes
+ ----------
+
+ facet : anyOf(:class:`FacetFieldDef`, :class:`FacetMapping`)
+ Definition for how to facet the data. One of: 1) `a field definition for faceting
+ the plot by one field
+ <https://vega.github.io/vega-lite/docs/facet.html#field-def>`__ 2) `An object that
+ maps row and column channels to their field definitions
+ <https://vega.github.io/vega-lite/docs/facet.html#mapping>`__
+ spec : anyOf(:class:`LayerSpec`, :class:`FacetedUnitSpec`)
+ A specification of the view that gets faceted.
+ align : anyOf(:class:`LayoutAlign`, :class:`RowColLayoutAlign`)
+ The alignment to apply to grid rows and columns. The supported string values are
+ ``"all"``, ``"each"``, and ``"none"``.
+
+
+ * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply
+ placed one after the other. - For ``"each"``, subviews will be aligned into a
+ clean grid structure, but each row or column may be of variable size. - For
+ ``"all"``, subviews will be aligned and each row or column will be sized
+ identically based on the maximum observed size. String values for this property
+ will be applied to both grid rows and columns.
+
+ Alternatively, an object value of the form ``{"row": string, "column": string}`` can
+ be used to supply different alignments for rows and columns.
+
+ **Default value:** ``"all"``.
+ bounds : enum('full', 'flush')
+ The bounds calculation method to use for determining the extent of a sub-plot. One
+ of ``full`` (the default) or ``flush``.
+
+
+ * If set to ``full``, the entire calculated bounds (including axes, title, and
+ legend) will be used. - If set to ``flush``, only the specified width and height
+ values for the sub-view will be used. The ``flush`` setting can be useful when
+ attempting to place sub-plots without axes or legends into a uniform grid
+ structure.
+
+ **Default value:** ``"full"``
+ center : anyOf(boolean, :class:`RowColboolean`)
+ Boolean flag indicating if subviews should be centered relative to their respective
+ rows or columns.
+
+ An object value of the form ``{"row": boolean, "column": boolean}`` can be used to
+ supply different centering values for rows and columns.
+
+ **Default value:** ``false``
+ columns : float
+ The number of columns to include in the view composition layout.
+
+ **Default value** : ``undefined`` -- An infinite number of columns (a single row)
+ will be assumed. This is equivalent to ``hconcat`` (for ``concat`` ) and to using
+ the ``column`` channel (for ``facet`` and ``repeat`` ).
+
+ **Note** :
+
+ 1) This property is only for: - the general (wrappable) ``concat`` operator (not
+ ``hconcat`` / ``vconcat`` ) - the ``facet`` and ``repeat`` operator with one
+ field/repetition definition (without row/column nesting)
+
+ 2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat`` )
+ and to using the ``row`` channel (for ``facet`` and ``repeat`` ).
+ data : anyOf(:class:`Data`, None)
+ An object describing the data source. Set to ``null`` to ignore the parent's data
+ source. If no data is set, it is derived from the parent.
+ description : string
+ Description of this mark for commenting purpose.
+ name : string
+ Name of the visualization for later reference.
+ resolve : :class:`Resolve`
+ Scale, axis, and legend resolutions for view composition specifications.
+ spacing : anyOf(float, :class:`RowColnumber`)
+ The spacing in pixels between sub-views of the composition operator. An object of
+ the form ``{"row": number, "column": number}`` can be used to set different spacing
+ values for rows and columns.
+
+ **Default value** : Depends on ``"spacing"`` property of `the view composition
+ configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__ (
+ ``20`` by default)
+ title : anyOf(:class:`Text`, :class:`TitleParams`)
+ Title for the plot.
+ transform : List(:class:`Transform`)
+ An array of data transformations such as filter and new field calculation.
+ """
+ _schema = {'$ref': '#/definitions/NormalizedFacetSpec'}
+
+ def __init__(self, facet=Undefined, spec=Undefined, align=Undefined, bounds=Undefined,
+ center=Undefined, columns=Undefined, data=Undefined, description=Undefined,
+ name=Undefined, resolve=Undefined, spacing=Undefined, title=Undefined,
+ transform=Undefined, **kwds):
+ super(NormalizedFacetSpec, self).__init__(facet=facet, spec=spec, align=align, bounds=bounds,
+ center=center, columns=columns, data=data,
+ description=description, name=name, resolve=resolve,
+ spacing=spacing, title=title, transform=transform,
+ **kwds)
+
+
+class NormalizedHConcatSpecGenericSpec(NormalizedSpec):
+ """NormalizedHConcatSpecGenericSpec schema wrapper
+
+ Mapping(required=[hconcat])
+ Base interface for a horizontal concatenation specification.
+
+ Attributes
+ ----------
+
+ hconcat : List(:class:`NormalizedSpec`)
+ A list of views to be concatenated and put into a row.
+ bounds : enum('full', 'flush')
+ The bounds calculation method to use for determining the extent of a sub-plot. One
+ of ``full`` (the default) or ``flush``.
+
+
+ * If set to ``full``, the entire calculated bounds (including axes, title, and
+ legend) will be used. - If set to ``flush``, only the specified width and height
+ values for the sub-view will be used. The ``flush`` setting can be useful when
+ attempting to place sub-plots without axes or legends into a uniform grid
+ structure.
+
+ **Default value:** ``"full"``
+ center : boolean
+ Boolean flag indicating if subviews should be centered relative to their respective
+ rows or columns.
+
+ **Default value:** ``false``
+ data : anyOf(:class:`Data`, None)
+ An object describing the data source. Set to ``null`` to ignore the parent's data
+ source. If no data is set, it is derived from the parent.
+ description : string
+ Description of this mark for commenting purpose.
+ name : string
+ Name of the visualization for later reference.
+ resolve : :class:`Resolve`
+ Scale, axis, and legend resolutions for view composition specifications.
+ spacing : float
+ The spacing in pixels between sub-views of the concat operator.
+
+ **Default value** : ``10``
+ title : anyOf(:class:`Text`, :class:`TitleParams`)
+ Title for the plot.
+ transform : List(:class:`Transform`)
+ An array of data transformations such as filter and new field calculation.
+ """
+ _schema = {'$ref': '#/definitions/NormalizedHConcatSpec<GenericSpec>'}
+
+ def __init__(self, hconcat=Undefined, bounds=Undefined, center=Undefined, data=Undefined,
+ description=Undefined, name=Undefined, resolve=Undefined, spacing=Undefined,
+ title=Undefined, transform=Undefined, **kwds):
+ super(NormalizedHConcatSpecGenericSpec, self).__init__(hconcat=hconcat, bounds=bounds,
+ center=center, data=data,
+ description=description, name=name,
+ resolve=resolve, spacing=spacing,
+ title=title, transform=transform, **kwds)
+
+
+class NormalizedVConcatSpecGenericSpec(NormalizedSpec):
+ """NormalizedVConcatSpecGenericSpec schema wrapper
+
+ Mapping(required=[vconcat])
+ Base interface for a vertical concatenation specification.
+
+ Attributes
+ ----------
+
+ vconcat : List(:class:`NormalizedSpec`)
+ A list of views to be concatenated and put into a column.
+ bounds : enum('full', 'flush')
+ The bounds calculation method to use for determining the extent of a sub-plot. One
+ of ``full`` (the default) or ``flush``.
+
+
+ * If set to ``full``, the entire calculated bounds (including axes, title, and
+ legend) will be used. - If set to ``flush``, only the specified width and height
+ values for the sub-view will be used. The ``flush`` setting can be useful when
+ attempting to place sub-plots without axes or legends into a uniform grid
+ structure.
+
+ **Default value:** ``"full"``
+ center : boolean
+ Boolean flag indicating if subviews should be centered relative to their respective
+ rows or columns.
+
+ **Default value:** ``false``
+ data : anyOf(:class:`Data`, None)
+ An object describing the data source. Set to ``null`` to ignore the parent's data
+ source. If no data is set, it is derived from the parent.
+ description : string
+ Description of this mark for commenting purpose.
+ name : string
+ Name of the visualization for later reference.
+ resolve : :class:`Resolve`
+ Scale, axis, and legend resolutions for view composition specifications.
+ spacing : float
+ The spacing in pixels between sub-views of the concat operator.
+
+ **Default value** : ``10``
+ title : anyOf(:class:`Text`, :class:`TitleParams`)
+ Title for the plot.
+ transform : List(:class:`Transform`)
+ An array of data transformations such as filter and new field calculation.
+ """
+ _schema = {'$ref': '#/definitions/NormalizedVConcatSpec<GenericSpec>'}
+
+ def __init__(self, vconcat=Undefined, bounds=Undefined, center=Undefined, data=Undefined,
+ description=Undefined, name=Undefined, resolve=Undefined, spacing=Undefined,
+ title=Undefined, transform=Undefined, **kwds):
+ super(NormalizedVConcatSpecGenericSpec, self).__init__(vconcat=vconcat, bounds=bounds,
+ center=center, data=data,
+ description=description, name=name,
+ resolve=resolve, spacing=spacing,
+ title=title, transform=transform, **kwds)
+
+
+class NumericArrayMarkPropDef(VegaLiteSchema):
+ """NumericArrayMarkPropDef schema wrapper
+
+ anyOf(:class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumberArray`,
+ :class:`FieldOrDatumDefWithConditionDatumDefnumberArray`,
+ :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumberArray`)
+ """
+ _schema = {'$ref': '#/definitions/NumericArrayMarkPropDef'}
+
+ def __init__(self, *args, **kwds):
+ super(NumericArrayMarkPropDef, self).__init__(*args, **kwds)
+
+
+class FieldOrDatumDefWithConditionDatumDefnumberArray(MarkPropDefnumberArray, NumericArrayMarkPropDef):
+ """FieldOrDatumDefWithConditionDatumDefnumberArray schema wrapper
+
+ Mapping(required=[])
+ A FieldDef with Condition :raw-html:`<ValueDef>` { condition: {value: ...}, field:
+ ..., ... }
+
+ Attributes
+ ----------
+
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ condition : anyOf(:class:`ConditionalValueDefnumberArrayExprRef`,
+ List(:class:`ConditionalValueDefnumberArrayExprRef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ datum : anyOf(:class:`PrimitiveValue`, :class:`DateTime`, :class:`ExprRef`,
+ :class:`RepeatRef`)
+ A constant value in data domain.
+ type : :class:`Type`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _schema = {'$ref': '#/definitions/FieldOrDatumDefWithCondition<DatumDef,number[]>'}
+
+ def __init__(self, band=Undefined, condition=Undefined, datum=Undefined, type=Undefined, **kwds):
+ super(FieldOrDatumDefWithConditionDatumDefnumberArray, self).__init__(band=band,
+ condition=condition,
+ datum=datum, type=type,
+ **kwds)
+
+
+class FieldOrDatumDefWithConditionMarkPropFieldDefnumberArray(MarkPropDefnumberArray, NumericArrayMarkPropDef):
+ """FieldOrDatumDefWithConditionMarkPropFieldDefnumberArray schema wrapper
+
+ Mapping(required=[])
+ A FieldDef with Condition :raw-html:`<ValueDef>` { condition: {value: ...}, field:
+ ..., ... }
+
+ Attributes
+ ----------
+
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ condition : anyOf(:class:`ConditionalValueDefnumberArrayExprRef`,
+ List(:class:`ConditionalValueDefnumberArrayExprRef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ legend : anyOf(:class:`Legend`, None)
+ An object defining properties of the legend. If ``null``, the legend for the
+ encoding channel will be removed.
+
+ **Default value:** If undefined, default `legend properties
+ <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.
+
+ **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
+ documentation.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ sort : :class:`Sort`
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following: - ``"ascending"`` or
+ ``"descending"`` -- for sorting by the values' natural order in JavaScript. - `A
+ string indicating an encoding channel name to sort by
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g., ``"x"``
+ or ``"y"`` ) with an optional minus prefix for descending sort (e.g., ``"-x"`` to
+ sort by x-field, descending). This channel string is short-form of `a
+ sort-by-encoding definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For example,
+ ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order":
+ "descending"}``. - `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field. - `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values in
+ their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ). - ``null``
+ indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` and sorting by another channel is not supported for ``row`` and
+ ``column``.
+
+ **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
+ documentation.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _schema = {'$ref': '#/definitions/FieldOrDatumDefWithCondition<MarkPropFieldDef,number[]>'}
+
+ def __init__(self, aggregate=Undefined, band=Undefined, bin=Undefined, condition=Undefined,
+ field=Undefined, legend=Undefined, scale=Undefined, sort=Undefined, timeUnit=Undefined,
+ title=Undefined, type=Undefined, **kwds):
+ super(FieldOrDatumDefWithConditionMarkPropFieldDefnumberArray, self).__init__(aggregate=aggregate,
+ band=band,
+ bin=bin,
+ condition=condition,
+ field=field,
+ legend=legend,
+ scale=scale,
+ sort=sort,
+ timeUnit=timeUnit,
+ title=title,
+ type=type, **kwds)
+
+
+class NumericMarkPropDef(VegaLiteSchema):
+ """NumericMarkPropDef schema wrapper
+
+ anyOf(:class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumber`,
+ :class:`FieldOrDatumDefWithConditionDatumDefnumber`,
+ :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumber`)
+ """
+ _schema = {'$ref': '#/definitions/NumericMarkPropDef'}
+
+ def __init__(self, *args, **kwds):
+ super(NumericMarkPropDef, self).__init__(*args, **kwds)
+
+
+class FieldOrDatumDefWithConditionDatumDefnumber(MarkPropDefnumber, NumericMarkPropDef):
+ """FieldOrDatumDefWithConditionDatumDefnumber schema wrapper
+
+ Mapping(required=[])
+ A FieldDef with Condition :raw-html:`<ValueDef>` { condition: {value: ...}, field:
+ ..., ... }
+
+ Attributes
+ ----------
+
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ condition : anyOf(:class:`ConditionalValueDefnumberExprRef`,
+ List(:class:`ConditionalValueDefnumberExprRef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ datum : anyOf(:class:`PrimitiveValue`, :class:`DateTime`, :class:`ExprRef`,
+ :class:`RepeatRef`)
+ A constant value in data domain.
+ type : :class:`Type`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _schema = {'$ref': '#/definitions/FieldOrDatumDefWithCondition<DatumDef,number>'}
+
+ def __init__(self, band=Undefined, condition=Undefined, datum=Undefined, type=Undefined, **kwds):
+ super(FieldOrDatumDefWithConditionDatumDefnumber, self).__init__(band=band, condition=condition,
+ datum=datum, type=type, **kwds)
+
+
+class FieldOrDatumDefWithConditionMarkPropFieldDefnumber(MarkPropDefnumber, NumericMarkPropDef):
+ """FieldOrDatumDefWithConditionMarkPropFieldDefnumber schema wrapper
+
+ Mapping(required=[])
+ A FieldDef with Condition :raw-html:`<ValueDef>` { condition: {value: ...}, field:
+ ..., ... }
+
+ Attributes
+ ----------
+
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ condition : anyOf(:class:`ConditionalValueDefnumberExprRef`,
+ List(:class:`ConditionalValueDefnumberExprRef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ legend : anyOf(:class:`Legend`, None)
+ An object defining properties of the legend. If ``null``, the legend for the
+ encoding channel will be removed.
+
+ **Default value:** If undefined, default `legend properties
+ <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.
+
+ **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
+ documentation.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ sort : :class:`Sort`
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following: - ``"ascending"`` or
+ ``"descending"`` -- for sorting by the values' natural order in JavaScript. - `A
+ string indicating an encoding channel name to sort by
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g., ``"x"``
+ or ``"y"`` ) with an optional minus prefix for descending sort (e.g., ``"-x"`` to
+ sort by x-field, descending). This channel string is short-form of `a
+ sort-by-encoding definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For example,
+ ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order":
+ "descending"}``. - `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field. - `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values in
+ their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ). - ``null``
+ indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` and sorting by another channel is not supported for ``row`` and
+ ``column``.
+
+ **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
+ documentation.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _schema = {'$ref': '#/definitions/FieldOrDatumDefWithCondition<MarkPropFieldDef,number>'}
+
+ def __init__(self, aggregate=Undefined, band=Undefined, bin=Undefined, condition=Undefined,
+ field=Undefined, legend=Undefined, scale=Undefined, sort=Undefined, timeUnit=Undefined,
+ title=Undefined, type=Undefined, **kwds):
+ super(FieldOrDatumDefWithConditionMarkPropFieldDefnumber, self).__init__(aggregate=aggregate,
+ band=band, bin=bin,
+ condition=condition,
+ field=field,
+ legend=legend,
+ scale=scale, sort=sort,
+ timeUnit=timeUnit,
+ title=title, type=type,
+ **kwds)
+
+
+class NumericValueDef(LatLongDef):
+ """NumericValueDef schema wrapper
+
+ Mapping(required=[value])
+ Definition object for a constant value (primitive value or gradient definition) of an
+ encoding channel.
+
+ Attributes
+ ----------
+
+ value : anyOf(float, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _schema = {'$ref': '#/definitions/NumericValueDef'}
+
+ def __init__(self, value=Undefined, **kwds):
+ super(NumericValueDef, self).__init__(value=value, **kwds)
+
+
+class OrderFieldDef(VegaLiteSchema):
+ """OrderFieldDef schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : anyOf(boolean, :class:`BinParams`, string, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ sort : :class:`SortOrder`
+ The sort order. One of ``"ascending"`` (default) or ``"descending"``.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _schema = {'$ref': '#/definitions/OrderFieldDef'}
+
+ def __init__(self, aggregate=Undefined, band=Undefined, bin=Undefined, field=Undefined,
+ sort=Undefined, timeUnit=Undefined, title=Undefined, type=Undefined, **kwds):
+ super(OrderFieldDef, self).__init__(aggregate=aggregate, band=band, bin=bin, field=field,
+ sort=sort, timeUnit=timeUnit, title=title, type=type, **kwds)
+
+
+class OrderValueDef(VegaLiteSchema):
+ """OrderValueDef schema wrapper
+
+ Mapping(required=[value])
+
+ Attributes
+ ----------
+
+ value : anyOf(float, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ condition : anyOf(:class:`ConditionalValueDefnumber`,
+ List(:class:`ConditionalValueDefnumber`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ """
+ _schema = {'$ref': '#/definitions/OrderValueDef'}
+
+ def __init__(self, value=Undefined, condition=Undefined, **kwds):
+ super(OrderValueDef, self).__init__(value=value, condition=condition, **kwds)
+
+
+class Orient(VegaLiteSchema):
+ """Orient schema wrapper
+
+ enum('left', 'right', 'top', 'bottom')
+ """
+ _schema = {'$ref': '#/definitions/Orient'}
+
+ def __init__(self, *args):
+ super(Orient, self).__init__(*args)
+
+
+class Orientation(VegaLiteSchema):
+ """Orientation schema wrapper
+
+ enum('horizontal', 'vertical')
+ """
+ _schema = {'$ref': '#/definitions/Orientation'}
+
+ def __init__(self, *args):
+ super(Orientation, self).__init__(*args)
+
+
+class OverlayMarkDef(VegaLiteSchema):
+ """OverlayMarkDef schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ align : anyOf(:class:`Align`, :class:`ExprRef`)
+ The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule).
+ One of ``"left"``, ``"right"``, ``"center"``.
+
+ **Note:** Expression reference is *not* supported for range marks.
+ angle : anyOf(float, :class:`ExprRef`)
+
+ aria : anyOf(boolean, :class:`ExprRef`)
+
+ ariaRole : anyOf(string, :class:`ExprRef`)
+
+ ariaRoleDescription : anyOf(string, :class:`ExprRef`)
+
+ aspect : anyOf(boolean, :class:`ExprRef`)
+
+ baseline : anyOf(:class:`TextBaseline`, :class:`ExprRef`)
+ For text marks, the vertical text baseline. One of ``"alphabetic"`` (default),
+ ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, ``"line-bottom"``, or an
+ expression reference that provides one of the valid values. The ``"line-top"`` and
+ ``"line-bottom"`` values operate similarly to ``"top"`` and ``"bottom"``, but are
+ calculated relative to the ``lineHeight`` rather than ``fontSize`` alone.
+
+ For range marks, the vertical alignment of the marks. One of ``"top"``,
+ ``"middle"``, ``"bottom"``.
+
+ **Note:** Expression reference is *not* supported for range marks.
+ blend : anyOf(:class:`Blend`, :class:`ExprRef`)
+
+ clip : boolean
+ Whether a mark be clipped to the enclosing group’s width and height.
+ color : anyOf(:class:`Color`, :class:`Gradient`, :class:`ExprRef`)
+ Default color.
+
+ **Default value:** :raw-html:`<span style="color: #4682b4;">&#9632;</span>`
+ ``"#4682b4"``
+
+ **Note:** - This property cannot be used in a `style config
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. - The ``fill``
+ and ``stroke`` properties have higher precedence than ``color`` and will override
+ ``color``.
+ cornerRadius : anyOf(float, :class:`ExprRef`)
+
+ cornerRadiusBottomLeft : anyOf(float, :class:`ExprRef`)
+
+ cornerRadiusBottomRight : anyOf(float, :class:`ExprRef`)
+
+ cornerRadiusTopLeft : anyOf(float, :class:`ExprRef`)
+
+ cornerRadiusTopRight : anyOf(float, :class:`ExprRef`)
+
+ cursor : anyOf(:class:`Cursor`, :class:`ExprRef`)
+
+ description : anyOf(string, :class:`ExprRef`)
+
+ dir : anyOf(:class:`TextDirection`, :class:`ExprRef`)
+
+ dx : anyOf(float, :class:`ExprRef`)
+
+ dy : anyOf(float, :class:`ExprRef`)
+
+ ellipsis : anyOf(string, :class:`ExprRef`)
+
+ endAngle : anyOf(float, :class:`ExprRef`)
+
+ fill : anyOf(:class:`Color`, :class:`Gradient`, None, :class:`ExprRef`)
+ Default fill color. This property has higher precedence than ``config.color``. Set
+ to ``null`` to remove fill.
+
+ **Default value:** (None)
+ fillOpacity : anyOf(float, :class:`ExprRef`)
+
+ filled : boolean
+ Whether the mark's color should be used as fill color instead of stroke color.
+
+ **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well
+ as ``geoshape`` marks for `graticule
+ <https://vega.github.io/vega-lite/docs/data.html#graticule>`__ data sources;
+ otherwise, ``true``.
+
+ **Note:** This property cannot be used in a `style config
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
+ font : anyOf(string, :class:`ExprRef`)
+
+ fontSize : anyOf(float, :class:`ExprRef`)
+
+ fontStyle : anyOf(:class:`FontStyle`, :class:`ExprRef`)
+
+ fontWeight : anyOf(:class:`FontWeight`, :class:`ExprRef`)
+
+ height : anyOf(float, :class:`ExprRef`)
+
+ href : anyOf(:class:`URI`, :class:`ExprRef`)
+
+ innerRadius : anyOf(float, :class:`ExprRef`)
+ The inner radius in pixels of arc marks. ``innerRadius`` is an alias for
+ ``radius2``.
+ interpolate : anyOf(:class:`Interpolate`, :class:`ExprRef`)
+
+ invalid : enum('filter', None)
+ Defines how Vega-Lite should handle marks for invalid values ( ``null`` and ``NaN``
+ ). - If set to ``"filter"`` (default), all data items with null values will be
+ skipped (for line, trail, and area marks) or filtered (for other marks). - If
+ ``null``, all data items are included. In this case, invalid values will be
+ interpreted as zeroes.
+ limit : anyOf(float, :class:`ExprRef`)
+
+ lineBreak : anyOf(string, :class:`ExprRef`)
+
+ lineHeight : anyOf(float, :class:`ExprRef`)
+
+ opacity : anyOf(float, :class:`ExprRef`)
+ The overall opacity (value between [0,1]).
+
+ **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,
+ ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.
+ order : anyOf(None, boolean)
+ For line and trail marks, this ``order`` property can be set to ``null`` or
+ ``false`` to make the lines use the original order in the data sources.
+ orient : :class:`Orientation`
+ The orientation of a non-stacked bar, tick, area, and line charts. The value is
+ either horizontal (default) or vertical. - For bar, rule and tick, this determines
+ whether the size of the bar and tick should be applied to x or y dimension. - For
+ area, this property determines the orient property of the Vega output. - For line
+ and trail marks, this property determines the sort order of the points in the line
+ if ``config.sortLineBy`` is not specified. For stacked charts, this is always
+ determined by the orientation of the stack; therefore explicitly specified value
+ will be ignored.
+ outerRadius : anyOf(float, :class:`ExprRef`)
+ The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``.
+ padAngle : anyOf(float, :class:`ExprRef`)
+
+ radius : anyOf(float, :class:`ExprRef`)
+ For arc mark, the primary (outer) radius in pixels.
+
+ For text marks, polar coordinate radial offset, in pixels, of the text from the
+ origin determined by the ``x`` and ``y`` properties.
+ radius2 : anyOf(float, :class:`ExprRef`)
+ The secondary (inner) radius in pixels of arc marks.
+ radius2Offset : anyOf(float, :class:`ExprRef`)
+ Offset for radius2.
+ radiusOffset : anyOf(float, :class:`ExprRef`)
+ Offset for radius.
+ shape : anyOf(anyOf(:class:`SymbolShape`, string), :class:`ExprRef`)
+
+ size : anyOf(float, :class:`ExprRef`)
+ Default size for marks. - For ``point`` / ``circle`` / ``square``, this represents
+ the pixel area of the marks. Note that this value sets the area of the symbol; the
+ side lengths will increase with the square root of this value. - For ``bar``, this
+ represents the band size of the bar, in pixels. - For ``text``, this represents the
+ font size, in pixels.
+
+ **Default value:** - ``30`` for point, circle, square marks; width/height's ``step``
+ - ``2`` for bar marks with discrete dimensions; - ``5`` for bar marks with
+ continuous dimensions; - ``11`` for text marks.
+ smooth : anyOf(boolean, :class:`ExprRef`)
+
+ startAngle : anyOf(float, :class:`ExprRef`)
+
+ stroke : anyOf(:class:`Color`, :class:`Gradient`, None, :class:`ExprRef`)
+ Default stroke color. This property has higher precedence than ``config.color``. Set
+ to ``null`` to remove stroke.
+
+ **Default value:** (None)
+ strokeCap : anyOf(:class:`StrokeCap`, :class:`ExprRef`)
+
+ strokeDash : anyOf(List(float), :class:`ExprRef`)
+
+ strokeDashOffset : anyOf(float, :class:`ExprRef`)
+
+ strokeJoin : anyOf(:class:`StrokeJoin`, :class:`ExprRef`)
+
+ strokeMiterLimit : anyOf(float, :class:`ExprRef`)
+
+ strokeOffset : anyOf(float, :class:`ExprRef`)
+
+ strokeOpacity : anyOf(float, :class:`ExprRef`)
+
+ strokeWidth : anyOf(float, :class:`ExprRef`)
+
+ style : anyOf(string, List(string))
+ A string or array of strings indicating the name of custom styles to apply to the
+ mark. A style is a named collection of mark property defaults defined within the
+ `style configuration
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. If style is an
+ array, later styles will override earlier styles. Any `mark properties
+ <https://vega.github.io/vega-lite/docs/encoding.html#mark-prop>`__ explicitly
+ defined within the ``encoding`` will override a style default.
+
+ **Default value:** The mark's name. For example, a bar mark will have style
+ ``"bar"`` by default. **Note:** Any specified style will augment the default style.
+ For example, a bar mark with ``"style": "foo"`` will receive from
+ ``config.style.bar`` and ``config.style.foo`` (the specified style ``"foo"`` has
+ higher precedence).
+ tension : anyOf(float, :class:`ExprRef`)
+
+ text : anyOf(:class:`Text`, :class:`ExprRef`)
+
+ theta : anyOf(float, :class:`ExprRef`)
+ For arc marks, the arc length in radians if theta2 is not specified, otherwise the
+ start arc angle. (A value of 0 indicates up or “north”, increasing values proceed
+ clockwise.)
+
+ For text marks, polar coordinate angle in radians.
+ theta2 : anyOf(float, :class:`ExprRef`)
+ The end angle of arc marks in radians. A value of 0 indicates up or “north”,
+ increasing values proceed clockwise.
+ theta2Offset : anyOf(float, :class:`ExprRef`)
+ Offset for theta2.
+ thetaOffset : anyOf(float, :class:`ExprRef`)
+ Offset for theta.
+ timeUnitBand : float
+ Default relative band size for a time unit. If set to ``1``, the bandwidth of the
+ marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the
+ marks will be half of the time unit band step.
+ timeUnitBandPosition : float
+ Default relative band position for a time unit. If set to ``0``, the marks will be
+ positioned at the beginning of the time unit band step. If set to ``0.5``, the marks
+ will be positioned in the middle of the time unit band step.
+ tooltip : anyOf(float, string, boolean, :class:`TooltipContent`, :class:`ExprRef`, None)
+ The tooltip text string to show upon mouse hover or an object defining which fields
+ should the tooltip be derived from.
+
+
+ * If ``tooltip`` is ``true`` or ``{"content": "encoding"}``, then all fields from
+ ``encoding`` will be used. - If ``tooltip`` is ``{"content": "data"}``, then all
+ fields that appear in the highlighted data point will be used. - If set to
+ ``null`` or ``false``, then no tooltip will be used.
+
+ See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__
+ documentation for a detailed discussion about tooltip in Vega-Lite.
+
+ **Default value:** ``null``
+ url : anyOf(:class:`URI`, :class:`ExprRef`)
+
+ width : anyOf(float, :class:`ExprRef`)
+
+ x : anyOf(float, string, :class:`ExprRef`)
+ X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without
+ specified ``x2`` or ``width``.
+
+ The ``value`` of this channel can be a number or a string ``"width"`` for the width
+ of the plot.
+ x2 : anyOf(float, string, :class:`ExprRef`)
+ X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
+
+ The ``value`` of this channel can be a number or a string ``"width"`` for the width
+ of the plot.
+ x2Offset : anyOf(float, :class:`ExprRef`)
+ Offset for x2-position.
+ xOffset : anyOf(float, :class:`ExprRef`)
+ Offset for x-position.
+ y : anyOf(float, string, :class:`ExprRef`)
+ Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without
+ specified ``y2`` or ``height``.
+
+ The ``value`` of this channel can be a number or a string ``"height"`` for the
+ height of the plot.
+ y2 : anyOf(float, string, :class:`ExprRef`)
+ Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
+
+ The ``value`` of this channel can be a number or a string ``"height"`` for the
+ height of the plot.
+ y2Offset : anyOf(float, :class:`ExprRef`)
+ Offset for y2-position.
+ yOffset : anyOf(float, :class:`ExprRef`)
+ Offset for y-position.
+ """
+ _schema = {'$ref': '#/definitions/OverlayMarkDef'}
+
+ def __init__(self, align=Undefined, angle=Undefined, aria=Undefined, ariaRole=Undefined,
+ ariaRoleDescription=Undefined, aspect=Undefined, baseline=Undefined, blend=Undefined,
+ clip=Undefined, color=Undefined, cornerRadius=Undefined,
+ cornerRadiusBottomLeft=Undefined, cornerRadiusBottomRight=Undefined,
+ cornerRadiusTopLeft=Undefined, cornerRadiusTopRight=Undefined, cursor=Undefined,
+ description=Undefined, dir=Undefined, dx=Undefined, dy=Undefined, ellipsis=Undefined,
+ endAngle=Undefined, fill=Undefined, fillOpacity=Undefined, filled=Undefined,
+ font=Undefined, fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined,
+ height=Undefined, href=Undefined, innerRadius=Undefined, interpolate=Undefined,
+ invalid=Undefined, limit=Undefined, lineBreak=Undefined, lineHeight=Undefined,
+ opacity=Undefined, order=Undefined, orient=Undefined, outerRadius=Undefined,
+ padAngle=Undefined, radius=Undefined, radius2=Undefined, radius2Offset=Undefined,
+ radiusOffset=Undefined, shape=Undefined, size=Undefined, smooth=Undefined,
+ startAngle=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined,
+ strokeDashOffset=Undefined, strokeJoin=Undefined, strokeMiterLimit=Undefined,
+ strokeOffset=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined,
+ style=Undefined, tension=Undefined, text=Undefined, theta=Undefined, theta2=Undefined,
+ theta2Offset=Undefined, thetaOffset=Undefined, timeUnitBand=Undefined,
+ timeUnitBandPosition=Undefined, tooltip=Undefined, url=Undefined, width=Undefined,
+ x=Undefined, x2=Undefined, x2Offset=Undefined, xOffset=Undefined, y=Undefined,
+ y2=Undefined, y2Offset=Undefined, yOffset=Undefined, **kwds):
+ super(OverlayMarkDef, self).__init__(align=align, angle=angle, aria=aria, ariaRole=ariaRole,
+ ariaRoleDescription=ariaRoleDescription, aspect=aspect,
+ baseline=baseline, blend=blend, clip=clip, color=color,
+ cornerRadius=cornerRadius,
+ cornerRadiusBottomLeft=cornerRadiusBottomLeft,
+ cornerRadiusBottomRight=cornerRadiusBottomRight,
+ cornerRadiusTopLeft=cornerRadiusTopLeft,
+ cornerRadiusTopRight=cornerRadiusTopRight, cursor=cursor,
+ description=description, dir=dir, dx=dx, dy=dy,
+ ellipsis=ellipsis, endAngle=endAngle, fill=fill,
+ fillOpacity=fillOpacity, filled=filled, font=font,
+ fontSize=fontSize, fontStyle=fontStyle,
+ fontWeight=fontWeight, height=height, href=href,
+ innerRadius=innerRadius, interpolate=interpolate,
+ invalid=invalid, limit=limit, lineBreak=lineBreak,
+ lineHeight=lineHeight, opacity=opacity, order=order,
+ orient=orient, outerRadius=outerRadius, padAngle=padAngle,
+ radius=radius, radius2=radius2,
+ radius2Offset=radius2Offset, radiusOffset=radiusOffset,
+ shape=shape, size=size, smooth=smooth,
+ startAngle=startAngle, stroke=stroke, strokeCap=strokeCap,
+ strokeDash=strokeDash, strokeDashOffset=strokeDashOffset,
+ strokeJoin=strokeJoin, strokeMiterLimit=strokeMiterLimit,
+ strokeOffset=strokeOffset, strokeOpacity=strokeOpacity,
+ strokeWidth=strokeWidth, style=style, tension=tension,
+ text=text, theta=theta, theta2=theta2,
+ theta2Offset=theta2Offset, thetaOffset=thetaOffset,
+ timeUnitBand=timeUnitBand,
+ timeUnitBandPosition=timeUnitBandPosition, tooltip=tooltip,
+ url=url, width=width, x=x, x2=x2, x2Offset=x2Offset,
+ xOffset=xOffset, y=y, y2=y2, y2Offset=y2Offset,
+ yOffset=yOffset, **kwds)
+
+
+class Padding(VegaLiteSchema):
+ """Padding schema wrapper
+
+ anyOf(float, Mapping(required=[]))
+ """
+ _schema = {'$ref': '#/definitions/Padding'}
+
+ def __init__(self, *args, **kwds):
+ super(Padding, self).__init__(*args, **kwds)
+
+
+class Parameter(VegaLiteSchema):
+ """Parameter schema wrapper
+
+ Mapping(required=[name])
+
+ Attributes
+ ----------
+
+ name : string
+ Required. A unique name for the parameter. Parameter names should be valid
+ JavaScript identifiers: they should contain only alphanumeric characters (or “$”, or
+ “_”) and may not start with a digit. Reserved keywords that may not be used as
+ parameter names are "datum", "event", "item", and "parent".
+ bind : :class:`Binding`
+ Binds the parameter to an external input element such as a slider, selection list or
+ radio button group.
+ description : string
+ A text description of the parameter, useful for inline documentation.
+ expr : :class:`Expr`
+ An expression for the value of the parameter. This expression may include other
+ parameters, in which case the parameter will automatically update in response to
+ upstream parameter changes.
+ value : Any
+ The initial value of the parameter.
+
+ **Default value:** ``undefined``
+ """
+ _schema = {'$ref': '#/definitions/Parameter'}
+
+ def __init__(self, name=Undefined, bind=Undefined, description=Undefined, expr=Undefined,
+ value=Undefined, **kwds):
+ super(Parameter, self).__init__(name=name, bind=bind, description=description, expr=expr,
+ value=value, **kwds)
+
+
+class Parse(VegaLiteSchema):
+ """Parse schema wrapper
+
+ Mapping(required=[])
+ """
+ _schema = {'$ref': '#/definitions/Parse'}
+
+ def __init__(self, **kwds):
+ super(Parse, self).__init__(**kwds)
+
+
+class ParseValue(VegaLiteSchema):
+ """ParseValue schema wrapper
+
+ anyOf(None, string, string, string, string, string)
+ """
+ _schema = {'$ref': '#/definitions/ParseValue'}
+
+ def __init__(self, *args, **kwds):
+ super(ParseValue, self).__init__(*args, **kwds)
+
+
+class PolarDef(VegaLiteSchema):
+ """PolarDef schema wrapper
+
+ anyOf(:class:`PositionFieldDefBase`, :class:`PositionDatumDefBase`,
+ :class:`PositionValueDef`)
+ """
+ _schema = {'$ref': '#/definitions/PolarDef'}
+
+ def __init__(self, *args, **kwds):
+ super(PolarDef, self).__init__(*args, **kwds)
+
+
+class Position2Def(VegaLiteSchema):
+ """Position2Def schema wrapper
+
+ anyOf(:class:`SecondaryFieldDef`, :class:`DatumDef`, :class:`PositionValueDef`)
+ """
+ _schema = {'$ref': '#/definitions/Position2Def'}
+
+ def __init__(self, *args, **kwds):
+ super(Position2Def, self).__init__(*args, **kwds)
+
+
+class DatumDef(LatLongDef, Position2Def):
+ """DatumDef schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ datum : anyOf(:class:`PrimitiveValue`, :class:`DateTime`, :class:`ExprRef`,
+ :class:`RepeatRef`)
+ A constant value in data domain.
+ type : :class:`Type`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _schema = {'$ref': '#/definitions/DatumDef'}
+
+ def __init__(self, band=Undefined, datum=Undefined, type=Undefined, **kwds):
+ super(DatumDef, self).__init__(band=band, datum=datum, type=type, **kwds)
+
+
+class PositionDatumDefBase(PolarDef):
+ """PositionDatumDefBase schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ datum : anyOf(:class:`PrimitiveValue`, :class:`DateTime`, :class:`ExprRef`,
+ :class:`RepeatRef`)
+ A constant value in data domain.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ stack : anyOf(:class:`StackOffset`, None, boolean)
+ Type of stacking offset if the field should be stacked. ``stack`` is only applicable
+ for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For
+ example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar
+ chart.
+
+ ``stack`` can be one of the following values: - ``"zero"`` or `true`: stacking with
+ baseline offset at zero value of the scale (for creating typical stacked
+ [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and `area
+ <https://vega.github.io/vega-lite/docs/stack.html#area>`__ chart). - ``"normalize"``
+ - stacking with normalized domain (for creating `normalized stacked bar and area
+ charts <https://vega.github.io/vega-lite/docs/stack.html#normalized>`__.
+ :raw-html:`<br/>` - ``"center"`` - stacking with center baseline (for `streamgraph
+ <https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__ ). - ``null`` or
+ ``false`` - No-stacking. This will produce layered `bar
+ <https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area
+ chart.
+
+ **Default value:** ``zero`` for plots with all of the following conditions are true:
+ (1) the mark is ``bar``, ``area``, or ``arc`` ; (2) the stacked measure channel (x
+ or y) has a linear scale; (3) At least one of non-position channels mapped to an
+ unaggregated field that is different from x and y. Otherwise, ``null`` by default.
+
+ **See also:** `stack <https://vega.github.io/vega-lite/docs/stack.html>`__
+ documentation.
+ type : :class:`Type`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _schema = {'$ref': '#/definitions/PositionDatumDefBase'}
+
+ def __init__(self, band=Undefined, datum=Undefined, scale=Undefined, stack=Undefined,
+ type=Undefined, **kwds):
+ super(PositionDatumDefBase, self).__init__(band=band, datum=datum, scale=scale, stack=stack,
+ type=type, **kwds)
+
+
+class PositionDef(VegaLiteSchema):
+ """PositionDef schema wrapper
+
+ anyOf(:class:`PositionFieldDef`, :class:`PositionDatumDef`, :class:`PositionValueDef`)
+ """
+ _schema = {'$ref': '#/definitions/PositionDef'}
+
+ def __init__(self, *args, **kwds):
+ super(PositionDef, self).__init__(*args, **kwds)
+
+
+class PositionDatumDef(PositionDef):
+ """PositionDatumDef schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ axis : anyOf(:class:`Axis`, None)
+ An object defining properties of axis's gridlines, ticks and labels. If ``null``,
+ the axis for the encoding channel will be removed.
+
+ **Default value:** If undefined, default `axis properties
+ <https://vega.github.io/vega-lite/docs/axis.html>`__ are applied.
+
+ **See also:** `axis <https://vega.github.io/vega-lite/docs/axis.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ datum : anyOf(:class:`PrimitiveValue`, :class:`DateTime`, :class:`ExprRef`,
+ :class:`RepeatRef`)
+ A constant value in data domain.
+ impute : anyOf(:class:`ImputeParams`, None)
+ An object defining the properties of the Impute Operation to be applied. The field
+ value of the other positional channel is taken as ``key`` of the ``Impute``
+ Operation. The field of the ``color`` channel if specified is used as ``groupby`` of
+ the ``Impute`` Operation.
+
+ **See also:** `impute <https://vega.github.io/vega-lite/docs/impute.html>`__
+ documentation.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ stack : anyOf(:class:`StackOffset`, None, boolean)
+ Type of stacking offset if the field should be stacked. ``stack`` is only applicable
+ for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For
+ example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar
+ chart.
+
+ ``stack`` can be one of the following values: - ``"zero"`` or `true`: stacking with
+ baseline offset at zero value of the scale (for creating typical stacked
+ [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and `area
+ <https://vega.github.io/vega-lite/docs/stack.html#area>`__ chart). - ``"normalize"``
+ - stacking with normalized domain (for creating `normalized stacked bar and area
+ charts <https://vega.github.io/vega-lite/docs/stack.html#normalized>`__.
+ :raw-html:`<br/>` - ``"center"`` - stacking with center baseline (for `streamgraph
+ <https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__ ). - ``null`` or
+ ``false`` - No-stacking. This will produce layered `bar
+ <https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area
+ chart.
+
+ **Default value:** ``zero`` for plots with all of the following conditions are true:
+ (1) the mark is ``bar``, ``area``, or ``arc`` ; (2) the stacked measure channel (x
+ or y) has a linear scale; (3) At least one of non-position channels mapped to an
+ unaggregated field that is different from x and y. Otherwise, ``null`` by default.
+
+ **See also:** `stack <https://vega.github.io/vega-lite/docs/stack.html>`__
+ documentation.
+ type : :class:`Type`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _schema = {'$ref': '#/definitions/PositionDatumDef'}
+
+ def __init__(self, axis=Undefined, band=Undefined, datum=Undefined, impute=Undefined,
+ scale=Undefined, stack=Undefined, type=Undefined, **kwds):
+ super(PositionDatumDef, self).__init__(axis=axis, band=band, datum=datum, impute=impute,
+ scale=scale, stack=stack, type=type, **kwds)
+
+
+class PositionFieldDef(PositionDef):
+ """PositionFieldDef schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ axis : anyOf(:class:`Axis`, None)
+ An object defining properties of axis's gridlines, ticks and labels. If ``null``,
+ the axis for the encoding channel will be removed.
+
+ **Default value:** If undefined, default `axis properties
+ <https://vega.github.io/vega-lite/docs/axis.html>`__ are applied.
+
+ **See also:** `axis <https://vega.github.io/vega-lite/docs/axis.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : anyOf(boolean, :class:`BinParams`, string, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ impute : anyOf(:class:`ImputeParams`, None)
+ An object defining the properties of the Impute Operation to be applied. The field
+ value of the other positional channel is taken as ``key`` of the ``Impute``
+ Operation. The field of the ``color`` channel if specified is used as ``groupby`` of
+ the ``Impute`` Operation.
+
+ **See also:** `impute <https://vega.github.io/vega-lite/docs/impute.html>`__
+ documentation.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ sort : :class:`Sort`
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following: - ``"ascending"`` or
+ ``"descending"`` -- for sorting by the values' natural order in JavaScript. - `A
+ string indicating an encoding channel name to sort by
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g., ``"x"``
+ or ``"y"`` ) with an optional minus prefix for descending sort (e.g., ``"-x"`` to
+ sort by x-field, descending). This channel string is short-form of `a
+ sort-by-encoding definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For example,
+ ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order":
+ "descending"}``. - `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field. - `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values in
+ their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ). - ``null``
+ indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` and sorting by another channel is not supported for ``row`` and
+ ``column``.
+
+ **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
+ documentation.
+ stack : anyOf(:class:`StackOffset`, None, boolean)
+ Type of stacking offset if the field should be stacked. ``stack`` is only applicable
+ for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For
+ example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar
+ chart.
+
+ ``stack`` can be one of the following values: - ``"zero"`` or `true`: stacking with
+ baseline offset at zero value of the scale (for creating typical stacked
+ [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and `area
+ <https://vega.github.io/vega-lite/docs/stack.html#area>`__ chart). - ``"normalize"``
+ - stacking with normalized domain (for creating `normalized stacked bar and area
+ charts <https://vega.github.io/vega-lite/docs/stack.html#normalized>`__.
+ :raw-html:`<br/>` - ``"center"`` - stacking with center baseline (for `streamgraph
+ <https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__ ). - ``null`` or
+ ``false`` - No-stacking. This will produce layered `bar
+ <https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area
+ chart.
+
+ **Default value:** ``zero`` for plots with all of the following conditions are true:
+ (1) the mark is ``bar``, ``area``, or ``arc`` ; (2) the stacked measure channel (x
+ or y) has a linear scale; (3) At least one of non-position channels mapped to an
+ unaggregated field that is different from x and y. Otherwise, ``null`` by default.
+
+ **See also:** `stack <https://vega.github.io/vega-lite/docs/stack.html>`__
+ documentation.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _schema = {'$ref': '#/definitions/PositionFieldDef'}
+
+ def __init__(self, aggregate=Undefined, axis=Undefined, band=Undefined, bin=Undefined,
+ field=Undefined, impute=Undefined, scale=Undefined, sort=Undefined, stack=Undefined,
+ timeUnit=Undefined, title=Undefined, type=Undefined, **kwds):
+ super(PositionFieldDef, self).__init__(aggregate=aggregate, axis=axis, band=band, bin=bin,
+ field=field, impute=impute, scale=scale, sort=sort,
+ stack=stack, timeUnit=timeUnit, title=title, type=type,
+ **kwds)
+
+
+class PositionFieldDefBase(PolarDef):
+ """PositionFieldDefBase schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : anyOf(boolean, :class:`BinParams`, string, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ sort : :class:`Sort`
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following: - ``"ascending"`` or
+ ``"descending"`` -- for sorting by the values' natural order in JavaScript. - `A
+ string indicating an encoding channel name to sort by
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g., ``"x"``
+ or ``"y"`` ) with an optional minus prefix for descending sort (e.g., ``"-x"`` to
+ sort by x-field, descending). This channel string is short-form of `a
+ sort-by-encoding definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For example,
+ ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order":
+ "descending"}``. - `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field. - `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values in
+ their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ). - ``null``
+ indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` and sorting by another channel is not supported for ``row`` and
+ ``column``.
+
+ **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
+ documentation.
+ stack : anyOf(:class:`StackOffset`, None, boolean)
+ Type of stacking offset if the field should be stacked. ``stack`` is only applicable
+ for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For
+ example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar
+ chart.
+
+ ``stack`` can be one of the following values: - ``"zero"`` or `true`: stacking with
+ baseline offset at zero value of the scale (for creating typical stacked
+ [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and `area
+ <https://vega.github.io/vega-lite/docs/stack.html#area>`__ chart). - ``"normalize"``
+ - stacking with normalized domain (for creating `normalized stacked bar and area
+ charts <https://vega.github.io/vega-lite/docs/stack.html#normalized>`__.
+ :raw-html:`<br/>` - ``"center"`` - stacking with center baseline (for `streamgraph
+ <https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__ ). - ``null`` or
+ ``false`` - No-stacking. This will produce layered `bar
+ <https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area
+ chart.
+
+ **Default value:** ``zero`` for plots with all of the following conditions are true:
+ (1) the mark is ``bar``, ``area``, or ``arc`` ; (2) the stacked measure channel (x
+ or y) has a linear scale; (3) At least one of non-position channels mapped to an
+ unaggregated field that is different from x and y. Otherwise, ``null`` by default.
+
+ **See also:** `stack <https://vega.github.io/vega-lite/docs/stack.html>`__
+ documentation.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _schema = {'$ref': '#/definitions/PositionFieldDefBase'}
+
+ def __init__(self, aggregate=Undefined, band=Undefined, bin=Undefined, field=Undefined,
+ scale=Undefined, sort=Undefined, stack=Undefined, timeUnit=Undefined, title=Undefined,
+ type=Undefined, **kwds):
+ super(PositionFieldDefBase, self).__init__(aggregate=aggregate, band=band, bin=bin, field=field,
+ scale=scale, sort=sort, stack=stack,
+ timeUnit=timeUnit, title=title, type=type, **kwds)
+
+
+class PositionValueDef(PolarDef, Position2Def, PositionDef):
+ """PositionValueDef schema wrapper
+
+ Mapping(required=[value])
+ Definition object for a constant value (primitive value or gradient definition) of an
+ encoding channel.
+
+ Attributes
+ ----------
+
+ value : anyOf(float, string, string, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _schema = {'$ref': '#/definitions/PositionValueDef'}
+
+ def __init__(self, value=Undefined, **kwds):
+ super(PositionValueDef, self).__init__(value=value, **kwds)
+
+
+class PredicateComposition(VegaLiteSchema):
+ """PredicateComposition schema wrapper
+
+ anyOf(:class:`LogicalNotPredicate`, :class:`LogicalAndPredicate`,
+ :class:`LogicalOrPredicate`, :class:`Predicate`)
+ """
+ _schema = {'$ref': '#/definitions/PredicateComposition'}
+
+ def __init__(self, *args, **kwds):
+ super(PredicateComposition, self).__init__(*args, **kwds)
+
+
+class LogicalAndPredicate(PredicateComposition):
+ """LogicalAndPredicate schema wrapper
+
+ Mapping(required=[and])
+
+ Attributes
+ ----------
+
+ and : List(:class:`PredicateComposition`)
+
+ """
+ _schema = {'$ref': '#/definitions/LogicalAnd<Predicate>'}
+
+ def __init__(self, **kwds):
+ super(LogicalAndPredicate, self).__init__(**kwds)
+
+
+class LogicalNotPredicate(PredicateComposition):
+ """LogicalNotPredicate schema wrapper
+
+ Mapping(required=[not])
+
+ Attributes
+ ----------
+
+ not : :class:`PredicateComposition`
+
+ """
+ _schema = {'$ref': '#/definitions/LogicalNot<Predicate>'}
+
+ def __init__(self, **kwds):
+ super(LogicalNotPredicate, self).__init__(**kwds)
+
+
+class LogicalOrPredicate(PredicateComposition):
+ """LogicalOrPredicate schema wrapper
+
+ Mapping(required=[or])
+
+ Attributes
+ ----------
+
+ or : List(:class:`PredicateComposition`)
+
+ """
+ _schema = {'$ref': '#/definitions/LogicalOr<Predicate>'}
+
+ def __init__(self, **kwds):
+ super(LogicalOrPredicate, self).__init__(**kwds)
+
+
+class Predicate(PredicateComposition):
+ """Predicate schema wrapper
+
+ anyOf(:class:`FieldEqualPredicate`, :class:`FieldRangePredicate`,
+ :class:`FieldOneOfPredicate`, :class:`FieldLTPredicate`, :class:`FieldGTPredicate`,
+ :class:`FieldLTEPredicate`, :class:`FieldGTEPredicate`, :class:`FieldValidPredicate`,
+ :class:`SelectionPredicate`, string)
+ """
+ _schema = {'$ref': '#/definitions/Predicate'}
+
+ def __init__(self, *args, **kwds):
+ super(Predicate, self).__init__(*args, **kwds)
+
+
+class FieldEqualPredicate(Predicate):
+ """FieldEqualPredicate schema wrapper
+
+ Mapping(required=[equal, field])
+
+ Attributes
+ ----------
+
+ equal : anyOf(string, float, boolean, :class:`DateTime`, :class:`ExprRef`)
+ The value that the field should be equal to.
+ field : :class:`FieldName`
+ Field to be tested.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit for the field to be tested.
+ """
+ _schema = {'$ref': '#/definitions/FieldEqualPredicate'}
+
+ def __init__(self, equal=Undefined, field=Undefined, timeUnit=Undefined, **kwds):
+ super(FieldEqualPredicate, self).__init__(equal=equal, field=field, timeUnit=timeUnit, **kwds)
+
+
+class FieldGTEPredicate(Predicate):
+ """FieldGTEPredicate schema wrapper
+
+ Mapping(required=[field, gte])
+
+ Attributes
+ ----------
+
+ field : :class:`FieldName`
+ Field to be tested.
+ gte : anyOf(string, float, :class:`DateTime`, :class:`ExprRef`)
+ The value that the field should be greater than or equals to.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit for the field to be tested.
+ """
+ _schema = {'$ref': '#/definitions/FieldGTEPredicate'}
+
+ def __init__(self, field=Undefined, gte=Undefined, timeUnit=Undefined, **kwds):
+ super(FieldGTEPredicate, self).__init__(field=field, gte=gte, timeUnit=timeUnit, **kwds)
+
+
+class FieldGTPredicate(Predicate):
+ """FieldGTPredicate schema wrapper
+
+ Mapping(required=[field, gt])
+
+ Attributes
+ ----------
+
+ field : :class:`FieldName`
+ Field to be tested.
+ gt : anyOf(string, float, :class:`DateTime`, :class:`ExprRef`)
+ The value that the field should be greater than.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit for the field to be tested.
+ """
+ _schema = {'$ref': '#/definitions/FieldGTPredicate'}
+
+ def __init__(self, field=Undefined, gt=Undefined, timeUnit=Undefined, **kwds):
+ super(FieldGTPredicate, self).__init__(field=field, gt=gt, timeUnit=timeUnit, **kwds)
+
+
+class FieldLTEPredicate(Predicate):
+ """FieldLTEPredicate schema wrapper
+
+ Mapping(required=[field, lte])
+
+ Attributes
+ ----------
+
+ field : :class:`FieldName`
+ Field to be tested.
+ lte : anyOf(string, float, :class:`DateTime`, :class:`ExprRef`)
+ The value that the field should be less than or equals to.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit for the field to be tested.
+ """
+ _schema = {'$ref': '#/definitions/FieldLTEPredicate'}
+
+ def __init__(self, field=Undefined, lte=Undefined, timeUnit=Undefined, **kwds):
+ super(FieldLTEPredicate, self).__init__(field=field, lte=lte, timeUnit=timeUnit, **kwds)
+
+
+class FieldLTPredicate(Predicate):
+ """FieldLTPredicate schema wrapper
+
+ Mapping(required=[field, lt])
+
+ Attributes
+ ----------
+
+ field : :class:`FieldName`
+ Field to be tested.
+ lt : anyOf(string, float, :class:`DateTime`, :class:`ExprRef`)
+ The value that the field should be less than.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit for the field to be tested.
+ """
+ _schema = {'$ref': '#/definitions/FieldLTPredicate'}
+
+ def __init__(self, field=Undefined, lt=Undefined, timeUnit=Undefined, **kwds):
+ super(FieldLTPredicate, self).__init__(field=field, lt=lt, timeUnit=timeUnit, **kwds)
+
+
+class FieldOneOfPredicate(Predicate):
+ """FieldOneOfPredicate schema wrapper
+
+ Mapping(required=[field, oneOf])
+
+ Attributes
+ ----------
+
+ field : :class:`FieldName`
+ Field to be tested.
+ oneOf : anyOf(List(string), List(float), List(boolean), List(:class:`DateTime`))
+ A set of values that the ``field`` 's value should be a member of, for a data item
+ included in the filtered data.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit for the field to be tested.
+ """
+ _schema = {'$ref': '#/definitions/FieldOneOfPredicate'}
+
+ def __init__(self, field=Undefined, oneOf=Undefined, timeUnit=Undefined, **kwds):
+ super(FieldOneOfPredicate, self).__init__(field=field, oneOf=oneOf, timeUnit=timeUnit, **kwds)
+
+
+class FieldRangePredicate(Predicate):
+ """FieldRangePredicate schema wrapper
+
+ Mapping(required=[field, range])
+
+ Attributes
+ ----------
+
+ field : :class:`FieldName`
+ Field to be tested.
+ range : anyOf(List(anyOf(float, :class:`DateTime`, None, :class:`ExprRef`)),
+ :class:`ExprRef`)
+ An array of inclusive minimum and maximum values for a field value of a data item to
+ be included in the filtered data.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit for the field to be tested.
+ """
+ _schema = {'$ref': '#/definitions/FieldRangePredicate'}
+
+ def __init__(self, field=Undefined, range=Undefined, timeUnit=Undefined, **kwds):
+ super(FieldRangePredicate, self).__init__(field=field, range=range, timeUnit=timeUnit, **kwds)
+
+
+class FieldValidPredicate(Predicate):
+ """FieldValidPredicate schema wrapper
+
+ Mapping(required=[field, valid])
+
+ Attributes
+ ----------
+
+ field : :class:`FieldName`
+ Field to be tested.
+ valid : boolean
+ If set to true the field's value has to be valid, meaning both not ``null`` and not
+ `NaN
+ <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN>`__.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit for the field to be tested.
+ """
+ _schema = {'$ref': '#/definitions/FieldValidPredicate'}
+
+ def __init__(self, field=Undefined, valid=Undefined, timeUnit=Undefined, **kwds):
+ super(FieldValidPredicate, self).__init__(field=field, valid=valid, timeUnit=timeUnit, **kwds)
+
+
+class Projection(VegaLiteSchema):
+ """Projection schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ center : :class:`Vector2number`
+ The projection's center, a two-element array of longitude and latitude in degrees.
+
+ **Default value:** ``[0, 0]``
+ clipAngle : float
+ The projection's clipping circle radius to the specified angle in degrees. If
+ ``null``, switches to `antimeridian <http://bl.ocks.org/mbostock/3788999>`__ cutting
+ rather than small-circle clipping.
+ clipExtent : :class:`Vector2Vector2number`
+ The projection's viewport clip extent to the specified bounds in pixels. The extent
+ bounds are specified as an array ``[[x0, y0], [x1, y1]]``, where ``x0`` is the
+ left-side of the viewport, ``y0`` is the top, ``x1`` is the right and ``y1`` is the
+ bottom. If ``null``, no viewport clipping is performed.
+ coefficient : float
+
+ distance : float
+
+ extent : :class:`Vector2Vector2number`
+
+ fit : anyOf(:class:`Fit`, List(:class:`Fit`))
+
+ fraction : float
+
+ lobes : float
+
+ parallel : float
+
+ parallels : List(float)
+ For conic projections, the `two standard parallels
+ <https://en.wikipedia.org/wiki/Map_projection#Conic>`__ that define the map layout.
+ The default depends on the specific conic projection used.
+ pointRadius : float
+ The default radius (in pixels) to use when drawing GeoJSON ``Point`` and
+ ``MultiPoint`` geometries. This parameter sets a constant default value. To modify
+ the point radius in response to data, see the corresponding parameter of the GeoPath
+ and GeoShape transforms.
+
+ **Default value:** ``4.5``
+ precision : float
+ The threshold for the projection's `adaptive resampling
+ <http://bl.ocks.org/mbostock/3795544>`__ to the specified value in pixels. This
+ value corresponds to the `Douglas–Peucker distance
+ <http://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm>`__.
+ If precision is not specified, returns the projection's current resampling precision
+ which defaults to ``√0.5 ≅ 0.70710…``.
+ radius : float
+
+ ratio : float
+
+ reflectX : boolean
+
+ reflectY : boolean
+
+ rotate : anyOf(:class:`Vector2number`, :class:`Vector3number`)
+ The projection's three-axis rotation to the specified angles, which must be a two-
+ or three-element array of numbers [ ``lambda``, ``phi``, ``gamma`` ] specifying the
+ rotation angles in degrees about each spherical axis. (These correspond to yaw,
+ pitch and roll.)
+
+ **Default value:** ``[0, 0, 0]``
+ scale : float
+ The projection’s scale (zoom) factor, overriding automatic fitting. The default
+ scale is projection-specific. The scale factor corresponds linearly to the distance
+ between projected points; however, scale factor values are not equivalent across
+ projections.
+ size : :class:`Vector2number`
+
+ spacing : float
+
+ tilt : float
+
+ translate : :class:`Vector2number`
+ The projection’s translation offset as a two-element array ``[tx, ty]``.
+ type : :class:`ProjectionType`
+ The cartographic projection to use. This value is case-insensitive, for example
+ ``"albers"`` and ``"Albers"`` indicate the same projection type. You can find all
+ valid projection types `in the documentation
+ <https://vega.github.io/vega-lite/docs/projection.html#projection-types>`__.
+
+ **Default value:** ``mercator``
+ """
+ _schema = {'$ref': '#/definitions/Projection'}
+
+ def __init__(self, center=Undefined, clipAngle=Undefined, clipExtent=Undefined,
+ coefficient=Undefined, distance=Undefined, extent=Undefined, fit=Undefined,
+ fraction=Undefined, lobes=Undefined, parallel=Undefined, parallels=Undefined,
+ pointRadius=Undefined, precision=Undefined, radius=Undefined, ratio=Undefined,
+ reflectX=Undefined, reflectY=Undefined, rotate=Undefined, scale=Undefined,
+ size=Undefined, spacing=Undefined, tilt=Undefined, translate=Undefined, type=Undefined,
+ **kwds):
+ super(Projection, self).__init__(center=center, clipAngle=clipAngle, clipExtent=clipExtent,
+ coefficient=coefficient, distance=distance, extent=extent,
+ fit=fit, fraction=fraction, lobes=lobes, parallel=parallel,
+ parallels=parallels, pointRadius=pointRadius,
+ precision=precision, radius=radius, ratio=ratio,
+ reflectX=reflectX, reflectY=reflectY, rotate=rotate,
+ scale=scale, size=size, spacing=spacing, tilt=tilt,
+ translate=translate, type=type, **kwds)
+
+
+class ProjectionConfig(VegaLiteSchema):
+ """ProjectionConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ center : :class:`Vector2number`
+ The projection's center, a two-element array of longitude and latitude in degrees.
+
+ **Default value:** ``[0, 0]``
+ clipAngle : float
+ The projection's clipping circle radius to the specified angle in degrees. If
+ ``null``, switches to `antimeridian <http://bl.ocks.org/mbostock/3788999>`__ cutting
+ rather than small-circle clipping.
+ clipExtent : :class:`Vector2Vector2number`
+ The projection's viewport clip extent to the specified bounds in pixels. The extent
+ bounds are specified as an array ``[[x0, y0], [x1, y1]]``, where ``x0`` is the
+ left-side of the viewport, ``y0`` is the top, ``x1`` is the right and ``y1`` is the
+ bottom. If ``null``, no viewport clipping is performed.
+ coefficient : float
+
+ distance : float
+
+ extent : :class:`Vector2Vector2number`
+
+ fit : anyOf(:class:`Fit`, List(:class:`Fit`))
+
+ fraction : float
+
+ lobes : float
+
+ parallel : float
+
+ parallels : List(float)
+ For conic projections, the `two standard parallels
+ <https://en.wikipedia.org/wiki/Map_projection#Conic>`__ that define the map layout.
+ The default depends on the specific conic projection used.
+ pointRadius : float
+ The default radius (in pixels) to use when drawing GeoJSON ``Point`` and
+ ``MultiPoint`` geometries. This parameter sets a constant default value. To modify
+ the point radius in response to data, see the corresponding parameter of the GeoPath
+ and GeoShape transforms.
+
+ **Default value:** ``4.5``
+ precision : float
+ The threshold for the projection's `adaptive resampling
+ <http://bl.ocks.org/mbostock/3795544>`__ to the specified value in pixels. This
+ value corresponds to the `Douglas–Peucker distance
+ <http://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm>`__.
+ If precision is not specified, returns the projection's current resampling precision
+ which defaults to ``√0.5 ≅ 0.70710…``.
+ radius : float
+
+ ratio : float
+
+ reflectX : boolean
+
+ reflectY : boolean
+
+ rotate : anyOf(:class:`Vector2number`, :class:`Vector3number`)
+ The projection's three-axis rotation to the specified angles, which must be a two-
+ or three-element array of numbers [ ``lambda``, ``phi``, ``gamma`` ] specifying the
+ rotation angles in degrees about each spherical axis. (These correspond to yaw,
+ pitch and roll.)
+
+ **Default value:** ``[0, 0, 0]``
+ scale : float
+ The projection’s scale (zoom) factor, overriding automatic fitting. The default
+ scale is projection-specific. The scale factor corresponds linearly to the distance
+ between projected points; however, scale factor values are not equivalent across
+ projections.
+ size : :class:`Vector2number`
+
+ spacing : float
+
+ tilt : float
+
+ translate : :class:`Vector2number`
+ The projection’s translation offset as a two-element array ``[tx, ty]``.
+ type : :class:`ProjectionType`
+ The cartographic projection to use. This value is case-insensitive, for example
+ ``"albers"`` and ``"Albers"`` indicate the same projection type. You can find all
+ valid projection types `in the documentation
+ <https://vega.github.io/vega-lite/docs/projection.html#projection-types>`__.
+
+ **Default value:** ``mercator``
+ """
+ _schema = {'$ref': '#/definitions/ProjectionConfig'}
+
+ def __init__(self, center=Undefined, clipAngle=Undefined, clipExtent=Undefined,
+ coefficient=Undefined, distance=Undefined, extent=Undefined, fit=Undefined,
+ fraction=Undefined, lobes=Undefined, parallel=Undefined, parallels=Undefined,
+ pointRadius=Undefined, precision=Undefined, radius=Undefined, ratio=Undefined,
+ reflectX=Undefined, reflectY=Undefined, rotate=Undefined, scale=Undefined,
+ size=Undefined, spacing=Undefined, tilt=Undefined, translate=Undefined, type=Undefined,
+ **kwds):
+ super(ProjectionConfig, self).__init__(center=center, clipAngle=clipAngle,
+ clipExtent=clipExtent, coefficient=coefficient,
+ distance=distance, extent=extent, fit=fit,
+ fraction=fraction, lobes=lobes, parallel=parallel,
+ parallels=parallels, pointRadius=pointRadius,
+ precision=precision, radius=radius, ratio=ratio,
+ reflectX=reflectX, reflectY=reflectY, rotate=rotate,
+ scale=scale, size=size, spacing=spacing, tilt=tilt,
+ translate=translate, type=type, **kwds)
+
+
+class ProjectionType(VegaLiteSchema):
+ """ProjectionType schema wrapper
+
+ enum('albers', 'albersUsa', 'azimuthalEqualArea', 'azimuthalEquidistant', 'conicConformal',
+ 'conicEqualArea', 'conicEquidistant', 'equalEarth', 'equirectangular', 'gnomonic',
+ 'identity', 'mercator', 'naturalEarth1', 'orthographic', 'stereographic',
+ 'transverseMercator')
+ """
+ _schema = {'$ref': '#/definitions/ProjectionType'}
+
+ def __init__(self, *args):
+ super(ProjectionType, self).__init__(*args)
+
+
+class RadialGradient(Gradient):
+ """RadialGradient schema wrapper
+
+ Mapping(required=[gradient, stops])
+
+ Attributes
+ ----------
+
+ gradient : string
+ The type of gradient. Use ``"radial"`` for a radial gradient.
+ stops : List(:class:`GradientStop`)
+ An array of gradient stops defining the gradient color sequence.
+ id : string
+
+ r1 : float
+ The radius length, in normalized [0, 1] coordinates, of the inner circle for the
+ gradient.
+
+ **Default value:** ``0``
+ r2 : float
+ The radius length, in normalized [0, 1] coordinates, of the outer circle for the
+ gradient.
+
+ **Default value:** ``0.5``
+ x1 : float
+ The x-coordinate, in normalized [0, 1] coordinates, for the center of the inner
+ circle for the gradient.
+
+ **Default value:** ``0.5``
+ x2 : float
+ The x-coordinate, in normalized [0, 1] coordinates, for the center of the outer
+ circle for the gradient.
+
+ **Default value:** ``0.5``
+ y1 : float
+ The y-coordinate, in normalized [0, 1] coordinates, for the center of the inner
+ circle for the gradient.
+
+ **Default value:** ``0.5``
+ y2 : float
+ The y-coordinate, in normalized [0, 1] coordinates, for the center of the outer
+ circle for the gradient.
+
+ **Default value:** ``0.5``
+ """
+ _schema = {'$ref': '#/definitions/RadialGradient'}
+
+ def __init__(self, gradient=Undefined, stops=Undefined, id=Undefined, r1=Undefined, r2=Undefined,
+ x1=Undefined, x2=Undefined, y1=Undefined, y2=Undefined, **kwds):
+ super(RadialGradient, self).__init__(gradient=gradient, stops=stops, id=id, r1=r1, r2=r2, x1=x1,
+ x2=x2, y1=y1, y2=y2, **kwds)
+
+
+class RangeConfig(VegaLiteSchema):
+ """RangeConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ category : anyOf(:class:`RangeScheme`, List(:class:`Color`))
+ Default `color scheme <https://vega.github.io/vega/docs/schemes/>`__ for categorical
+ data.
+ diverging : anyOf(:class:`RangeScheme`, List(:class:`Color`))
+ Default `color scheme <https://vega.github.io/vega/docs/schemes/>`__ for diverging
+ quantitative ramps.
+ heatmap : anyOf(:class:`RangeScheme`, List(:class:`Color`))
+ Default `color scheme <https://vega.github.io/vega/docs/schemes/>`__ for
+ quantitative heatmaps.
+ ordinal : anyOf(:class:`RangeScheme`, List(:class:`Color`))
+ Default `color scheme <https://vega.github.io/vega/docs/schemes/>`__ for
+ rank-ordered data.
+ ramp : anyOf(:class:`RangeScheme`, List(:class:`Color`))
+ Default `color scheme <https://vega.github.io/vega/docs/schemes/>`__ for sequential
+ quantitative ramps.
+ symbol : List(:class:`SymbolShape`)
+ Array of `symbol <https://vega.github.io/vega/docs/marks/symbol/>`__ names or paths
+ for the default shape palette.
+ """
+ _schema = {'$ref': '#/definitions/RangeConfig'}
+
+ def __init__(self, category=Undefined, diverging=Undefined, heatmap=Undefined, ordinal=Undefined,
+ ramp=Undefined, symbol=Undefined, **kwds):
+ super(RangeConfig, self).__init__(category=category, diverging=diverging, heatmap=heatmap,
+ ordinal=ordinal, ramp=ramp, symbol=symbol, **kwds)
+
+
+class RangeRawArray(VegaLiteSchema):
+ """RangeRawArray schema wrapper
+
+ List(float)
+ """
+ _schema = {'$ref': '#/definitions/RangeRawArray'}
+
+ def __init__(self, *args):
+ super(RangeRawArray, self).__init__(*args)
+
+
+class RangeScheme(VegaLiteSchema):
+ """RangeScheme schema wrapper
+
+ anyOf(:class:`RangeEnum`, :class:`RangeRaw`, Mapping(required=[scheme]))
+ """
+ _schema = {'$ref': '#/definitions/RangeScheme'}
+
+ def __init__(self, *args, **kwds):
+ super(RangeScheme, self).__init__(*args, **kwds)
+
+
+class RangeEnum(RangeScheme):
+ """RangeEnum schema wrapper
+
+ enum('width', 'height', 'symbol', 'category', 'ordinal', 'ramp', 'diverging', 'heatmap')
+ """
+ _schema = {'$ref': '#/definitions/RangeEnum'}
+
+ def __init__(self, *args):
+ super(RangeEnum, self).__init__(*args)
+
+
+class RangeRaw(RangeScheme):
+ """RangeRaw schema wrapper
+
+ List(anyOf(None, boolean, string, float, :class:`RangeRawArray`))
+ """
+ _schema = {'$ref': '#/definitions/RangeRaw'}
+
+ def __init__(self, *args):
+ super(RangeRaw, self).__init__(*args)
+
+
+class RectConfig(AnyMarkConfig):
+ """RectConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ align : anyOf(:class:`Align`, :class:`ExprRef`)
+ The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule).
+ One of ``"left"``, ``"right"``, ``"center"``.
+
+ **Note:** Expression reference is *not* supported for range marks.
+ angle : anyOf(float, :class:`ExprRef`)
+
+ aria : anyOf(boolean, :class:`ExprRef`)
+
+ ariaRole : anyOf(string, :class:`ExprRef`)
+
+ ariaRoleDescription : anyOf(string, :class:`ExprRef`)
+
+ aspect : anyOf(boolean, :class:`ExprRef`)
+
+ baseline : anyOf(:class:`TextBaseline`, :class:`ExprRef`)
+ For text marks, the vertical text baseline. One of ``"alphabetic"`` (default),
+ ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, ``"line-bottom"``, or an
+ expression reference that provides one of the valid values. The ``"line-top"`` and
+ ``"line-bottom"`` values operate similarly to ``"top"`` and ``"bottom"``, but are
+ calculated relative to the ``lineHeight`` rather than ``fontSize`` alone.
+
+ For range marks, the vertical alignment of the marks. One of ``"top"``,
+ ``"middle"``, ``"bottom"``.
+
+ **Note:** Expression reference is *not* supported for range marks.
+ binSpacing : float
+ Offset between bars for binned field. The ideal value for this is either 0
+ (preferred by statisticians) or 1 (Vega-Lite default, D3 example style).
+
+ **Default value:** ``1``
+ blend : anyOf(:class:`Blend`, :class:`ExprRef`)
+
+ color : anyOf(:class:`Color`, :class:`Gradient`, :class:`ExprRef`)
+ Default color.
+
+ **Default value:** :raw-html:`<span style="color: #4682b4;">&#9632;</span>`
+ ``"#4682b4"``
+
+ **Note:** - This property cannot be used in a `style config
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. - The ``fill``
+ and ``stroke`` properties have higher precedence than ``color`` and will override
+ ``color``.
+ continuousBandSize : float
+ The default size of the bars on continuous scales.
+
+ **Default value:** ``5``
+ cornerRadius : anyOf(float, :class:`ExprRef`)
+
+ cornerRadiusBottomLeft : anyOf(float, :class:`ExprRef`)
+
+ cornerRadiusBottomRight : anyOf(float, :class:`ExprRef`)
+
+ cornerRadiusTopLeft : anyOf(float, :class:`ExprRef`)
+
+ cornerRadiusTopRight : anyOf(float, :class:`ExprRef`)
+
+ cursor : anyOf(:class:`Cursor`, :class:`ExprRef`)
+
+ description : anyOf(string, :class:`ExprRef`)
+
+ dir : anyOf(:class:`TextDirection`, :class:`ExprRef`)
+
+ discreteBandSize : float
+ The default size of the bars with discrete dimensions. If unspecified, the default
+ size is ``step-2``, which provides 2 pixel offset between bars.
+ dx : anyOf(float, :class:`ExprRef`)
+
+ dy : anyOf(float, :class:`ExprRef`)
+
+ ellipsis : anyOf(string, :class:`ExprRef`)
+
+ endAngle : anyOf(float, :class:`ExprRef`)
+
+ fill : anyOf(:class:`Color`, :class:`Gradient`, None, :class:`ExprRef`)
+ Default fill color. This property has higher precedence than ``config.color``. Set
+ to ``null`` to remove fill.
+
+ **Default value:** (None)
+ fillOpacity : anyOf(float, :class:`ExprRef`)
+
+ filled : boolean
+ Whether the mark's color should be used as fill color instead of stroke color.
+
+ **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well
+ as ``geoshape`` marks for `graticule
+ <https://vega.github.io/vega-lite/docs/data.html#graticule>`__ data sources;
+ otherwise, ``true``.
+
+ **Note:** This property cannot be used in a `style config
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
+ font : anyOf(string, :class:`ExprRef`)
+
+ fontSize : anyOf(float, :class:`ExprRef`)
+
+ fontStyle : anyOf(:class:`FontStyle`, :class:`ExprRef`)
+
+ fontWeight : anyOf(:class:`FontWeight`, :class:`ExprRef`)
+
+ height : anyOf(float, :class:`ExprRef`)
+
+ href : anyOf(:class:`URI`, :class:`ExprRef`)
+
+ innerRadius : anyOf(float, :class:`ExprRef`)
+ The inner radius in pixels of arc marks. ``innerRadius`` is an alias for
+ ``radius2``.
+ interpolate : anyOf(:class:`Interpolate`, :class:`ExprRef`)
+
+ invalid : enum('filter', None)
+ Defines how Vega-Lite should handle marks for invalid values ( ``null`` and ``NaN``
+ ). - If set to ``"filter"`` (default), all data items with null values will be
+ skipped (for line, trail, and area marks) or filtered (for other marks). - If
+ ``null``, all data items are included. In this case, invalid values will be
+ interpreted as zeroes.
+ limit : anyOf(float, :class:`ExprRef`)
+
+ lineBreak : anyOf(string, :class:`ExprRef`)
+
+ lineHeight : anyOf(float, :class:`ExprRef`)
+
+ opacity : anyOf(float, :class:`ExprRef`)
+ The overall opacity (value between [0,1]).
+
+ **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,
+ ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.
+ order : anyOf(None, boolean)
+ For line and trail marks, this ``order`` property can be set to ``null`` or
+ ``false`` to make the lines use the original order in the data sources.
+ orient : :class:`Orientation`
+ The orientation of a non-stacked bar, tick, area, and line charts. The value is
+ either horizontal (default) or vertical. - For bar, rule and tick, this determines
+ whether the size of the bar and tick should be applied to x or y dimension. - For
+ area, this property determines the orient property of the Vega output. - For line
+ and trail marks, this property determines the sort order of the points in the line
+ if ``config.sortLineBy`` is not specified. For stacked charts, this is always
+ determined by the orientation of the stack; therefore explicitly specified value
+ will be ignored.
+ outerRadius : anyOf(float, :class:`ExprRef`)
+ The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``.
+ padAngle : anyOf(float, :class:`ExprRef`)
+
+ radius : anyOf(float, :class:`ExprRef`)
+ For arc mark, the primary (outer) radius in pixels.
+
+ For text marks, polar coordinate radial offset, in pixels, of the text from the
+ origin determined by the ``x`` and ``y`` properties.
+ radius2 : anyOf(float, :class:`ExprRef`)
+ The secondary (inner) radius in pixels of arc marks.
+ shape : anyOf(anyOf(:class:`SymbolShape`, string), :class:`ExprRef`)
+
+ size : anyOf(float, :class:`ExprRef`)
+ Default size for marks. - For ``point`` / ``circle`` / ``square``, this represents
+ the pixel area of the marks. Note that this value sets the area of the symbol; the
+ side lengths will increase with the square root of this value. - For ``bar``, this
+ represents the band size of the bar, in pixels. - For ``text``, this represents the
+ font size, in pixels.
+
+ **Default value:** - ``30`` for point, circle, square marks; width/height's ``step``
+ - ``2`` for bar marks with discrete dimensions; - ``5`` for bar marks with
+ continuous dimensions; - ``11`` for text marks.
+ smooth : anyOf(boolean, :class:`ExprRef`)
+
+ startAngle : anyOf(float, :class:`ExprRef`)
+
+ stroke : anyOf(:class:`Color`, :class:`Gradient`, None, :class:`ExprRef`)
+ Default stroke color. This property has higher precedence than ``config.color``. Set
+ to ``null`` to remove stroke.
+
+ **Default value:** (None)
+ strokeCap : anyOf(:class:`StrokeCap`, :class:`ExprRef`)
+
+ strokeDash : anyOf(List(float), :class:`ExprRef`)
+
+ strokeDashOffset : anyOf(float, :class:`ExprRef`)
+
+ strokeJoin : anyOf(:class:`StrokeJoin`, :class:`ExprRef`)
+
+ strokeMiterLimit : anyOf(float, :class:`ExprRef`)
+
+ strokeOffset : anyOf(float, :class:`ExprRef`)
+
+ strokeOpacity : anyOf(float, :class:`ExprRef`)
+
+ strokeWidth : anyOf(float, :class:`ExprRef`)
+
+ tension : anyOf(float, :class:`ExprRef`)
+
+ text : anyOf(:class:`Text`, :class:`ExprRef`)
+
+ theta : anyOf(float, :class:`ExprRef`)
+ For arc marks, the arc length in radians if theta2 is not specified, otherwise the
+ start arc angle. (A value of 0 indicates up or “north”, increasing values proceed
+ clockwise.)
+
+ For text marks, polar coordinate angle in radians.
+ theta2 : anyOf(float, :class:`ExprRef`)
+ The end angle of arc marks in radians. A value of 0 indicates up or “north”,
+ increasing values proceed clockwise.
+ timeUnitBand : float
+ Default relative band size for a time unit. If set to ``1``, the bandwidth of the
+ marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the
+ marks will be half of the time unit band step.
+ timeUnitBandPosition : float
+ Default relative band position for a time unit. If set to ``0``, the marks will be
+ positioned at the beginning of the time unit band step. If set to ``0.5``, the marks
+ will be positioned in the middle of the time unit band step.
+ tooltip : anyOf(float, string, boolean, :class:`TooltipContent`, :class:`ExprRef`, None)
+ The tooltip text string to show upon mouse hover or an object defining which fields
+ should the tooltip be derived from.
+
+
+ * If ``tooltip`` is ``true`` or ``{"content": "encoding"}``, then all fields from
+ ``encoding`` will be used. - If ``tooltip`` is ``{"content": "data"}``, then all
+ fields that appear in the highlighted data point will be used. - If set to
+ ``null`` or ``false``, then no tooltip will be used.
+
+ See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__
+ documentation for a detailed discussion about tooltip in Vega-Lite.
+
+ **Default value:** ``null``
+ url : anyOf(:class:`URI`, :class:`ExprRef`)
+
+ width : anyOf(float, :class:`ExprRef`)
+
+ x : anyOf(float, string, :class:`ExprRef`)
+ X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without
+ specified ``x2`` or ``width``.
+
+ The ``value`` of this channel can be a number or a string ``"width"`` for the width
+ of the plot.
+ x2 : anyOf(float, string, :class:`ExprRef`)
+ X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
+
+ The ``value`` of this channel can be a number or a string ``"width"`` for the width
+ of the plot.
+ y : anyOf(float, string, :class:`ExprRef`)
+ Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without
+ specified ``y2`` or ``height``.
+
+ The ``value`` of this channel can be a number or a string ``"height"`` for the
+ height of the plot.
+ y2 : anyOf(float, string, :class:`ExprRef`)
+ Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
+
+ The ``value`` of this channel can be a number or a string ``"height"`` for the
+ height of the plot.
+ """
+ _schema = {'$ref': '#/definitions/RectConfig'}
+
+ def __init__(self, align=Undefined, angle=Undefined, aria=Undefined, ariaRole=Undefined,
+ ariaRoleDescription=Undefined, aspect=Undefined, baseline=Undefined,
+ binSpacing=Undefined, blend=Undefined, color=Undefined, continuousBandSize=Undefined,
+ cornerRadius=Undefined, cornerRadiusBottomLeft=Undefined,
+ cornerRadiusBottomRight=Undefined, cornerRadiusTopLeft=Undefined,
+ cornerRadiusTopRight=Undefined, cursor=Undefined, description=Undefined, dir=Undefined,
+ discreteBandSize=Undefined, dx=Undefined, dy=Undefined, ellipsis=Undefined,
+ endAngle=Undefined, fill=Undefined, fillOpacity=Undefined, filled=Undefined,
+ font=Undefined, fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined,
+ height=Undefined, href=Undefined, innerRadius=Undefined, interpolate=Undefined,
+ invalid=Undefined, limit=Undefined, lineBreak=Undefined, lineHeight=Undefined,
+ opacity=Undefined, order=Undefined, orient=Undefined, outerRadius=Undefined,
+ padAngle=Undefined, radius=Undefined, radius2=Undefined, shape=Undefined,
+ size=Undefined, smooth=Undefined, startAngle=Undefined, stroke=Undefined,
+ strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined,
+ strokeJoin=Undefined, strokeMiterLimit=Undefined, strokeOffset=Undefined,
+ strokeOpacity=Undefined, strokeWidth=Undefined, tension=Undefined, text=Undefined,
+ theta=Undefined, theta2=Undefined, timeUnitBand=Undefined,
+ timeUnitBandPosition=Undefined, tooltip=Undefined, url=Undefined, width=Undefined,
+ x=Undefined, x2=Undefined, y=Undefined, y2=Undefined, **kwds):
+ super(RectConfig, self).__init__(align=align, angle=angle, aria=aria, ariaRole=ariaRole,
+ ariaRoleDescription=ariaRoleDescription, aspect=aspect,
+ baseline=baseline, binSpacing=binSpacing, blend=blend,
+ color=color, continuousBandSize=continuousBandSize,
+ cornerRadius=cornerRadius,
+ cornerRadiusBottomLeft=cornerRadiusBottomLeft,
+ cornerRadiusBottomRight=cornerRadiusBottomRight,
+ cornerRadiusTopLeft=cornerRadiusTopLeft,
+ cornerRadiusTopRight=cornerRadiusTopRight, cursor=cursor,
+ description=description, dir=dir,
+ discreteBandSize=discreteBandSize, dx=dx, dy=dy,
+ ellipsis=ellipsis, endAngle=endAngle, fill=fill,
+ fillOpacity=fillOpacity, filled=filled, font=font,
+ fontSize=fontSize, fontStyle=fontStyle, fontWeight=fontWeight,
+ height=height, href=href, innerRadius=innerRadius,
+ interpolate=interpolate, invalid=invalid, limit=limit,
+ lineBreak=lineBreak, lineHeight=lineHeight, opacity=opacity,
+ order=order, orient=orient, outerRadius=outerRadius,
+ padAngle=padAngle, radius=radius, radius2=radius2, shape=shape,
+ size=size, smooth=smooth, startAngle=startAngle, stroke=stroke,
+ strokeCap=strokeCap, strokeDash=strokeDash,
+ strokeDashOffset=strokeDashOffset, strokeJoin=strokeJoin,
+ strokeMiterLimit=strokeMiterLimit, strokeOffset=strokeOffset,
+ strokeOpacity=strokeOpacity, strokeWidth=strokeWidth,
+ tension=tension, text=text, theta=theta, theta2=theta2,
+ timeUnitBand=timeUnitBand,
+ timeUnitBandPosition=timeUnitBandPosition, tooltip=tooltip,
+ url=url, width=width, x=x, x2=x2, y=y, y2=y2, **kwds)
+
+
+class RepeatMapping(VegaLiteSchema):
+ """RepeatMapping schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ column : List(string)
+ An array of fields to be repeated horizontally.
+ row : List(string)
+ An array of fields to be repeated vertically.
+ """
+ _schema = {'$ref': '#/definitions/RepeatMapping'}
+
+ def __init__(self, column=Undefined, row=Undefined, **kwds):
+ super(RepeatMapping, self).__init__(column=column, row=row, **kwds)
+
+
+class RepeatRef(Field):
+ """RepeatRef schema wrapper
+
+ Mapping(required=[repeat])
+ Reference to a repeated value.
+
+ Attributes
+ ----------
+
+ repeat : enum('row', 'column', 'repeat', 'layer')
+
+ """
+ _schema = {'$ref': '#/definitions/RepeatRef'}
+
+ def __init__(self, repeat=Undefined, **kwds):
+ super(RepeatRef, self).__init__(repeat=repeat, **kwds)
+
+
+class Resolve(VegaLiteSchema):
+ """Resolve schema wrapper
+
+ Mapping(required=[])
+ Defines how scales, axes, and legends from different specs should be combined. Resolve is a
+ mapping from ``scale``, ``axis``, and ``legend`` to a mapping from channels to resolutions.
+ Scales and guides can be resolved to be ``"independent"`` or ``"shared"``.
+
+ Attributes
+ ----------
+
+ axis : :class:`AxisResolveMap`
+
+ legend : :class:`LegendResolveMap`
+
+ scale : :class:`ScaleResolveMap`
+
+ """
+ _schema = {'$ref': '#/definitions/Resolve'}
+
+ def __init__(self, axis=Undefined, legend=Undefined, scale=Undefined, **kwds):
+ super(Resolve, self).__init__(axis=axis, legend=legend, scale=scale, **kwds)
+
+
+class ResolveMode(VegaLiteSchema):
+ """ResolveMode schema wrapper
+
+ enum('independent', 'shared')
+ """
+ _schema = {'$ref': '#/definitions/ResolveMode'}
+
+ def __init__(self, *args):
+ super(ResolveMode, self).__init__(*args)
+
+
+class RowColLayoutAlign(VegaLiteSchema):
+ """RowColLayoutAlign schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ column : :class:`LayoutAlign`
+
+ row : :class:`LayoutAlign`
+
+ """
+ _schema = {'$ref': '#/definitions/RowCol<LayoutAlign>'}
+
+ def __init__(self, column=Undefined, row=Undefined, **kwds):
+ super(RowColLayoutAlign, self).__init__(column=column, row=row, **kwds)
+
+
+class RowColboolean(VegaLiteSchema):
+ """RowColboolean schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ column : boolean
+
+ row : boolean
+
+ """
+ _schema = {'$ref': '#/definitions/RowCol<boolean>'}
+
+ def __init__(self, column=Undefined, row=Undefined, **kwds):
+ super(RowColboolean, self).__init__(column=column, row=row, **kwds)
+
+
+class RowColnumber(VegaLiteSchema):
+ """RowColnumber schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ column : float
+
+ row : float
+
+ """
+ _schema = {'$ref': '#/definitions/RowCol<number>'}
+
+ def __init__(self, column=Undefined, row=Undefined, **kwds):
+ super(RowColnumber, self).__init__(column=column, row=row, **kwds)
+
+
+class RowColumnEncodingFieldDef(VegaLiteSchema):
+ """RowColumnEncodingFieldDef schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ align : :class:`LayoutAlign`
+ The alignment to apply to row/column facet's subplot. The supported string values
+ are ``"all"``, ``"each"``, and ``"none"``.
+
+
+ * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply
+ placed one after the other. - For ``"each"``, subviews will be aligned into a
+ clean grid structure, but each row or column may be of variable size. - For
+ ``"all"``, subviews will be aligned and each row or column will be sized
+ identically based on the maximum observed size. String values for this property
+ will be applied to both grid rows and columns.
+
+ **Default value:** ``"all"``.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ center : boolean
+ Boolean flag indicating if facet's subviews should be centered relative to their
+ respective rows or columns.
+
+ **Default value:** ``false``
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ header : :class:`Header`
+ An object defining properties of a facet's header.
+ sort : anyOf(:class:`SortArray`, :class:`SortOrder`, :class:`EncodingSortField`, None)
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following: - ``"ascending"`` or
+ ``"descending"`` -- for sorting by the values' natural order in JavaScript. - `A
+ sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field. - `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values in
+ their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ). - ``null``
+ indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` is not supported for ``row`` and ``column``.
+ spacing : float
+ The spacing in pixels between facet's sub-views.
+
+ **Default value** : Depends on ``"spacing"`` property of `the view composition
+ configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__ (
+ ``20`` by default)
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _schema = {'$ref': '#/definitions/RowColumnEncodingFieldDef'}
+
+ def __init__(self, aggregate=Undefined, align=Undefined, band=Undefined, bin=Undefined,
+ center=Undefined, field=Undefined, header=Undefined, sort=Undefined, spacing=Undefined,
+ timeUnit=Undefined, title=Undefined, type=Undefined, **kwds):
+ super(RowColumnEncodingFieldDef, self).__init__(aggregate=aggregate, align=align, band=band,
+ bin=bin, center=center, field=field,
+ header=header, sort=sort, spacing=spacing,
+ timeUnit=timeUnit, title=title, type=type,
+ **kwds)
+
+
+class Scale(VegaLiteSchema):
+ """Scale schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ align : anyOf(float, :class:`ExprRef`)
+ The alignment of the steps within the scale range.
+
+ This value must lie in the range ``[0,1]``. A value of ``0.5`` indicates that the
+ steps should be centered within the range. A value of ``0`` or ``1`` may be used to
+ shift the bands to one side, say to position them adjacent to an axis.
+
+ **Default value:** ``0.5``
+ base : anyOf(float, :class:`ExprRef`)
+ The logarithm base of the ``log`` scale (default ``10`` ).
+ bins : :class:`ScaleBins`
+ Bin boundaries can be provided to scales as either an explicit array of bin
+ boundaries or as a bin specification object. The legal values are: - An `array
+ <../types/#Array>`__ literal of bin boundary values. For example, ``[0, 5, 10, 15,
+ 20]``. The array must include both starting and ending boundaries. The previous
+ example uses five values to indicate a total of four bin intervals: [0-5), [5-10),
+ [10-15), [15-20]. Array literals may include signal references as elements. - A `bin
+ specification object <https://vega.github.io/vega-lite/docs/scale.html#bins>`__ that
+ indicates the bin *step* size, and optionally the *start* and *stop* boundaries. -
+ An array of bin boundaries over the scale domain. If provided, axes and legends will
+ use the bin boundaries to inform the choice of tick marks and text labels.
+ clamp : anyOf(boolean, :class:`ExprRef`)
+ If ``true``, values that exceed the data domain are clamped to either the minimum or
+ maximum range value
+
+ **Default value:** derived from the `scale config
+ <https://vega.github.io/vega-lite/docs/config.html#scale-config>`__ 's ``clamp`` (
+ ``true`` by default).
+ constant : anyOf(float, :class:`ExprRef`)
+ A constant determining the slope of the symlog function around zero. Only used for
+ ``symlog`` scales.
+
+ **Default value:** ``1``
+ domain : anyOf(List(anyOf(None, string, float, boolean, :class:`DateTime`,
+ :class:`ExprRef`)), string, :class:`SelectionExtent`, :class:`DomainUnionWith`,
+ :class:`ExprRef`)
+ Customized domain values in the form of constant values or dynamic values driven by
+ a selection.
+
+ 1) Constant ``domain`` for *quantitative* fields can take one of the following
+ forms:
+
+
+ * A two-element array with minimum and maximum values. To create a diverging scale,
+ this two-element array can be combined with the ``domainMid`` property. - An array
+ with more than two entries, for `Piecewise quantitative scales
+ <https://vega.github.io/vega-lite/docs/scale.html#piecewise>`__. - A string value
+ ``"unaggregated"``, if the input field is aggregated, to indicate that the domain
+ should include the raw data values prior to the aggregation.
+
+ 2) Constant ``domain`` for *temporal* fields can be a two-element array with minimum
+ and maximum values, in the form of either timestamps or the `DateTime definition
+ objects <https://vega.github.io/vega-lite/docs/types.html#datetime>`__.
+
+ 3) Constant ``domain`` for *ordinal* and *nominal* fields can be an array that lists
+ valid input values.
+
+ 4) To combine (union) specified constant domain with the field's values, ``domain``
+ can be an object with a ``unionWith`` property that specify constant domain to be
+ combined. For example, ``domain: {unionWith: [0, 100]}`` for a quantitative scale
+ means that the scale domain always includes ``[0, 100]``, but will include other
+ values in the fields beyond ``[0, 100]``.
+
+ 5) Domain can also takes an object defining a field or encoding of a selection that
+ `interactively determines
+ <https://vega.github.io/vega-lite/docs/selection.html#scale-domains>`__ the scale
+ domain.
+ domainMax : anyOf(float, :class:`DateTime`, :class:`ExprRef`)
+ Sets the maximum value in the scale domain, overriding the ``domain`` property. This
+ property is only intended for use with scales having continuous domains.
+ domainMid : anyOf(float, :class:`ExprRef`)
+ Inserts a single mid-point value into a two-element domain. The mid-point value must
+ lie between the domain minimum and maximum values. This property can be useful for
+ setting a midpoint for `diverging color scales
+ <https://vega.github.io/vega-lite/docs/scale.html#piecewise>`__. The domainMid
+ property is only intended for use with scales supporting continuous, piecewise
+ domains.
+ domainMin : anyOf(float, :class:`DateTime`, :class:`ExprRef`)
+ Sets the minimum value in the scale domain, overriding the domain property. This
+ property is only intended for use with scales having continuous domains.
+ exponent : anyOf(float, :class:`ExprRef`)
+ The exponent of the ``pow`` scale.
+ interpolate : anyOf(:class:`ScaleInterpolateEnum`, :class:`ExprRef`,
+ :class:`ScaleInterpolateParams`)
+ The interpolation method for range values. By default, a general interpolator for
+ numbers, dates, strings and colors (in HCL space) is used. For color ranges, this
+ property allows interpolation in alternative color spaces. Legal values include
+ ``rgb``, ``hsl``, ``hsl-long``, ``lab``, ``hcl``, ``hcl-long``, ``cubehelix`` and
+ ``cubehelix-long`` ('-long' variants use longer paths in polar coordinate spaces).
+ If object-valued, this property accepts an object with a string-valued *type*
+ property and an optional numeric *gamma* property applicable to rgb and cubehelix
+ interpolators. For more, see the `d3-interpolate documentation
+ <https://github.com/d3/d3-interpolate>`__.
+
+
+ * **Default value:** ``hcl``
+ nice : anyOf(boolean, float, :class:`TimeInterval`, :class:`TimeIntervalStep`,
+ :class:`ExprRef`)
+ Extending the domain so that it starts and ends on nice round values. This method
+ typically modifies the scale’s domain, and may only extend the bounds to the nearest
+ round value. Nicing is useful if the domain is computed from data and may be
+ irregular. For example, for a domain of *[0.201479…, 0.996679…]*, a nice domain
+ might be *[0.2, 1.0]*.
+
+ For quantitative scales such as linear, ``nice`` can be either a boolean flag or a
+ number. If ``nice`` is a number, it will represent a desired tick count. This allows
+ greater control over the step size used to extend the bounds, guaranteeing that the
+ returned ticks will exactly cover the domain.
+
+ For temporal fields with time and utc scales, the ``nice`` value can be a string
+ indicating the desired time interval. Legal values are ``"millisecond"``,
+ ``"second"``, ``"minute"``, ``"hour"``, ``"day"``, ``"week"``, ``"month"``, and
+ ``"year"``. Alternatively, ``time`` and ``utc`` scales can accept an object-valued
+ interval specifier of the form ``{"interval": "month", "step": 3}``, which includes
+ a desired number of interval steps. Here, the domain would snap to quarter (Jan,
+ Apr, Jul, Oct) boundaries.
+
+ **Default value:** ``true`` for unbinned *quantitative* fields; ``false`` otherwise.
+ padding : anyOf(float, :class:`ExprRef`)
+ For * `continuous <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__ *
+ scales, expands the scale domain to accommodate the specified number of pixels on
+ each of the scale range. The scale range must represent pixels for this parameter to
+ function as intended. Padding adjustment is performed prior to all other
+ adjustments, including the effects of the  ``zero``,  ``nice``,  ``domainMin``, and
+ ``domainMax``  properties.
+
+ For * `band <https://vega.github.io/vega-lite/docs/scale.html#band>`__ * scales,
+ shortcut for setting ``paddingInner`` and ``paddingOuter`` to the same value.
+
+ For * `point <https://vega.github.io/vega-lite/docs/scale.html#point>`__ * scales,
+ alias for ``paddingOuter``.
+
+ **Default value:** For *continuous* scales, derived from the `scale config
+ <https://vega.github.io/vega-lite/docs/scale.html#config>`__ 's
+ ``continuousPadding``. For *band and point* scales, see ``paddingInner`` and
+ ``paddingOuter``. By default, Vega-Lite sets padding such that *width/height =
+ number of unique values * step*.
+ paddingInner : anyOf(float, :class:`ExprRef`)
+ The inner padding (spacing) within each band step of band scales, as a fraction of
+ the step size. This value must lie in the range [0,1].
+
+ For point scale, this property is invalid as point scales do not have internal band
+ widths (only step sizes between bands).
+
+ **Default value:** derived from the `scale config
+ <https://vega.github.io/vega-lite/docs/scale.html#config>`__ 's
+ ``bandPaddingInner``.
+ paddingOuter : anyOf(float, :class:`ExprRef`)
+ The outer padding (spacing) at the ends of the range of band and point scales, as a
+ fraction of the step size. This value must lie in the range [0,1].
+
+ **Default value:** derived from the `scale config
+ <https://vega.github.io/vega-lite/docs/scale.html#config>`__ 's ``bandPaddingOuter``
+ for band scales and ``pointPadding`` for point scales. By default, Vega-Lite sets
+ outer padding such that *width/height = number of unique values * step*.
+ range : anyOf(:class:`RangeEnum`, List(anyOf(float, string, List(float), :class:`ExprRef`)),
+ Mapping(required=[field]))
+ The range of the scale. One of:
+
+
+ A string indicating a `pre-defined named scale range
+ <https://vega.github.io/vega-lite/docs/scale.html#range-config>`__ (e.g., example,
+ ``"symbol"``, or ``"diverging"`` ).
+
+ For `continuous scales
+ <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__, two-element array
+ indicating minimum and maximum values, or an array with more than two entries for
+ specifying a `piecewise scale
+ <https://vega.github.io/vega-lite/docs/scale.html#piecewise>`__.
+
+ For `discrete <https://vega.github.io/vega-lite/docs/scale.html#discrete>`__ and
+ `discretizing <https://vega.github.io/vega-lite/docs/scale.html#discretizing>`__
+ scales, an array of desired output values or an object with a ``field`` property
+ representing the range values. For example, if a field ``color`` contains CSS color
+ names, we can set ``range`` to ``{field: "color"}``.
+
+ **Notes:**
+
+ 1) For color scales you can also specify a color `scheme
+ <https://vega.github.io/vega-lite/docs/scale.html#scheme>`__ instead of ``range``.
+
+ 2) Any directly specified ``range`` for ``x`` and ``y`` channels will be ignored.
+ Range can be customized via the view's corresponding `size
+ <https://vega.github.io/vega-lite/docs/size.html>`__ ( ``width`` and ``height`` ).
+ rangeMax : anyOf(float, string, :class:`ExprRef`)
+ Sets the maximum value in the scale range, overriding the ``range`` property or the
+ default range. This property is only intended for use with scales having continuous
+ ranges.
+ rangeMin : anyOf(float, string, :class:`ExprRef`)
+ Sets the minimum value in the scale range, overriding the ``range`` property or the
+ default range. This property is only intended for use with scales having continuous
+ ranges.
+ reverse : anyOf(boolean, :class:`ExprRef`)
+ If true, reverses the order of the scale range. **Default value:** ``false``.
+ round : anyOf(boolean, :class:`ExprRef`)
+ If ``true``, rounds numeric output values to integers. This can be helpful for
+ snapping to the pixel grid.
+
+ **Default value:** ``false``.
+ scheme : anyOf(string, :class:`SchemeParams`, :class:`ExprRef`)
+ A string indicating a color `scheme
+ <https://vega.github.io/vega-lite/docs/scale.html#scheme>`__ name (e.g.,
+ ``"category10"`` or ``"blues"`` ) or a `scheme parameter object
+ <https://vega.github.io/vega-lite/docs/scale.html#scheme-params>`__.
+
+ Discrete color schemes may be used with `discrete
+ <https://vega.github.io/vega-lite/docs/scale.html#discrete>`__ or `discretizing
+ <https://vega.github.io/vega-lite/docs/scale.html#discretizing>`__ scales.
+ Continuous color schemes are intended for use with color scales.
+
+ For the full list of supported schemes, please refer to the `Vega Scheme
+ <https://vega.github.io/vega/docs/schemes/#reference>`__ reference.
+ type : :class:`ScaleType`
+ The type of scale. Vega-Lite supports the following categories of scale types:
+
+ 1) `Continuous Scales
+ <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__ -- mapping
+ continuous domains to continuous output ranges ( `"linear"
+ <https://vega.github.io/vega-lite/docs/scale.html#linear>`__, `"pow"
+ <https://vega.github.io/vega-lite/docs/scale.html#pow>`__, `"sqrt"
+ <https://vega.github.io/vega-lite/docs/scale.html#sqrt>`__, `"symlog"
+ <https://vega.github.io/vega-lite/docs/scale.html#symlog>`__, `"log"
+ <https://vega.github.io/vega-lite/docs/scale.html#log>`__, `"time"
+ <https://vega.github.io/vega-lite/docs/scale.html#time>`__, `"utc"
+ <https://vega.github.io/vega-lite/docs/scale.html#utc>`__.
+
+ 2) `Discrete Scales <https://vega.github.io/vega-lite/docs/scale.html#discrete>`__
+ -- mapping discrete domains to discrete ( `"ordinal"
+ <https://vega.github.io/vega-lite/docs/scale.html#ordinal>`__ ) or continuous (
+ `"band" <https://vega.github.io/vega-lite/docs/scale.html#band>`__ and `"point"
+ <https://vega.github.io/vega-lite/docs/scale.html#point>`__ ) output ranges.
+
+ 3) `Discretizing Scales
+ <https://vega.github.io/vega-lite/docs/scale.html#discretizing>`__ -- mapping
+ continuous domains to discrete output ranges `"bin-ordinal"
+ <https://vega.github.io/vega-lite/docs/scale.html#bin-ordinal>`__, `"quantile"
+ <https://vega.github.io/vega-lite/docs/scale.html#quantile>`__, `"quantize"
+ <https://vega.github.io/vega-lite/docs/scale.html#quantize>`__ and `"threshold"
+ <https://vega.github.io/vega-lite/docs/scale.html#threshold>`__.
+
+ **Default value:** please see the `scale type table
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
+ zero : anyOf(boolean, :class:`ExprRef`)
+ If ``true``, ensures that a zero baseline value is included in the scale domain.
+
+ **Default value:** ``true`` for x and y channels if the quantitative field is not
+ binned and no custom ``domain`` is provided; ``false`` otherwise.
+
+ **Note:** Log, time, and utc scales do not support ``zero``.
+ """
+ _schema = {'$ref': '#/definitions/Scale'}
+
+ def __init__(self, align=Undefined, base=Undefined, bins=Undefined, clamp=Undefined,
+ constant=Undefined, domain=Undefined, domainMax=Undefined, domainMid=Undefined,
+ domainMin=Undefined, exponent=Undefined, interpolate=Undefined, nice=Undefined,
+ padding=Undefined, paddingInner=Undefined, paddingOuter=Undefined, range=Undefined,
+ rangeMax=Undefined, rangeMin=Undefined, reverse=Undefined, round=Undefined,
+ scheme=Undefined, type=Undefined, zero=Undefined, **kwds):
+ super(Scale, self).__init__(align=align, base=base, bins=bins, clamp=clamp, constant=constant,
+ domain=domain, domainMax=domainMax, domainMid=domainMid,
+ domainMin=domainMin, exponent=exponent, interpolate=interpolate,
+ nice=nice, padding=padding, paddingInner=paddingInner,
+ paddingOuter=paddingOuter, range=range, rangeMax=rangeMax,
+ rangeMin=rangeMin, reverse=reverse, round=round, scheme=scheme,
+ type=type, zero=zero, **kwds)
+
+
+class ScaleBins(VegaLiteSchema):
+ """ScaleBins schema wrapper
+
+ anyOf(List(float), :class:`ScaleBinParams`)
+ """
+ _schema = {'$ref': '#/definitions/ScaleBins'}
+
+ def __init__(self, *args, **kwds):
+ super(ScaleBins, self).__init__(*args, **kwds)
+
+
+class ScaleBinParams(ScaleBins):
+ """ScaleBinParams schema wrapper
+
+ Mapping(required=[step])
+
+ Attributes
+ ----------
+
+ step : float
+ The step size defining the bin interval width.
+ start : float
+ The starting (lowest-valued) bin boundary.
+
+ **Default value:** The lowest value of the scale domain will be used.
+ stop : float
+ The stopping (highest-valued) bin boundary.
+
+ **Default value:** The highest value of the scale domain will be used.
+ """
+ _schema = {'$ref': '#/definitions/ScaleBinParams'}
+
+ def __init__(self, step=Undefined, start=Undefined, stop=Undefined, **kwds):
+ super(ScaleBinParams, self).__init__(step=step, start=start, stop=stop, **kwds)
+
+
+class ScaleConfig(VegaLiteSchema):
+ """ScaleConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ bandPaddingInner : anyOf(float, :class:`ExprRef`)
+ Default inner padding for ``x`` and ``y`` band-ordinal scales.
+
+ **Default value:** - ``barBandPaddingInner`` for bar marks ( ``0.1`` by default) -
+ ``rectBandPaddingInner`` for rect and other marks ( ``0`` by default)
+ bandPaddingOuter : anyOf(float, :class:`ExprRef`)
+ Default outer padding for ``x`` and ``y`` band-ordinal scales.
+
+ **Default value:** ``paddingInner/2`` (which makes *width/height = number of unique
+ values * step* )
+ barBandPaddingInner : anyOf(float, :class:`ExprRef`)
+ Default inner padding for ``x`` and ``y`` band-ordinal scales of ``"bar"`` marks.
+
+ **Default value:** ``0.1``
+ clamp : anyOf(boolean, :class:`ExprRef`)
+ If true, values that exceed the data domain are clamped to either the minimum or
+ maximum range value
+ continuousPadding : anyOf(float, :class:`ExprRef`)
+ Default padding for continuous scales.
+
+ **Default:** ``5`` for continuous x-scale of a vertical bar and continuous y-scale
+ of a horizontal bar.; ``0`` otherwise.
+ maxBandSize : float
+ The default max value for mapping quantitative fields to bar's size/bandSize.
+
+ If undefined (default), we will use the axis's size (width or height) - 1.
+ maxFontSize : float
+ The default max value for mapping quantitative fields to text's size/fontSize.
+
+ **Default value:** ``40``
+ maxOpacity : float
+ Default max opacity for mapping a field to opacity.
+
+ **Default value:** ``0.8``
+ maxSize : float
+ Default max value for point size scale.
+ maxStrokeWidth : float
+ Default max strokeWidth for the scale of strokeWidth for rule and line marks and of
+ size for trail marks.
+
+ **Default value:** ``4``
+ minBandSize : float
+ The default min value for mapping quantitative fields to bar and tick's
+ size/bandSize scale with zero=false.
+
+ **Default value:** ``2``
+ minFontSize : float
+ The default min value for mapping quantitative fields to tick's size/fontSize scale
+ with zero=false
+
+ **Default value:** ``8``
+ minOpacity : float
+ Default minimum opacity for mapping a field to opacity.
+
+ **Default value:** ``0.3``
+ minSize : float
+ Default minimum value for point size scale with zero=false.
+
+ **Default value:** ``9``
+ minStrokeWidth : float
+ Default minimum strokeWidth for the scale of strokeWidth for rule and line marks and
+ of size for trail marks with zero=false.
+
+ **Default value:** ``1``
+ pointPadding : anyOf(float, :class:`ExprRef`)
+ Default outer padding for ``x`` and ``y`` point-ordinal scales.
+
+ **Default value:** ``0.5`` (which makes *width/height = number of unique values *
+ step* )
+ quantileCount : float
+ Default range cardinality for `quantile
+ <https://vega.github.io/vega-lite/docs/scale.html#quantile>`__ scale.
+
+ **Default value:** ``4``
+ quantizeCount : float
+ Default range cardinality for `quantize
+ <https://vega.github.io/vega-lite/docs/scale.html#quantize>`__ scale.
+
+ **Default value:** ``4``
+ rectBandPaddingInner : anyOf(float, :class:`ExprRef`)
+ Default inner padding for ``x`` and ``y`` band-ordinal scales of ``"rect"`` marks.
+
+ **Default value:** ``0``
+ round : anyOf(boolean, :class:`ExprRef`)
+ If true, rounds numeric output values to integers. This can be helpful for snapping
+ to the pixel grid. (Only available for ``x``, ``y``, and ``size`` scales.)
+ useUnaggregatedDomain : boolean
+ Use the source data range before aggregation as scale domain instead of aggregated
+ data for aggregate axis.
+
+ This is equivalent to setting ``domain`` to ``"unaggregate"`` for aggregated
+ *quantitative* fields by default.
+
+ This property only works with aggregate functions that produce values within the raw
+ data domain ( ``"mean"``, ``"average"``, ``"median"``, ``"q1"``, ``"q3"``,
+ ``"min"``, ``"max"`` ). For other aggregations that produce values outside of the
+ raw data domain (e.g. ``"count"``, ``"sum"`` ), this property is ignored.
+
+ **Default value:** ``false``
+ xReverse : anyOf(boolean, :class:`ExprRef`)
+ Reverse x-scale by default (useful for right-to-left charts).
+ """
+ _schema = {'$ref': '#/definitions/ScaleConfig'}
+
+ def __init__(self, bandPaddingInner=Undefined, bandPaddingOuter=Undefined,
+ barBandPaddingInner=Undefined, clamp=Undefined, continuousPadding=Undefined,
+ maxBandSize=Undefined, maxFontSize=Undefined, maxOpacity=Undefined, maxSize=Undefined,
+ maxStrokeWidth=Undefined, minBandSize=Undefined, minFontSize=Undefined,
+ minOpacity=Undefined, minSize=Undefined, minStrokeWidth=Undefined,
+ pointPadding=Undefined, quantileCount=Undefined, quantizeCount=Undefined,
+ rectBandPaddingInner=Undefined, round=Undefined, useUnaggregatedDomain=Undefined,
+ xReverse=Undefined, **kwds):
+ super(ScaleConfig, self).__init__(bandPaddingInner=bandPaddingInner,
+ bandPaddingOuter=bandPaddingOuter,
+ barBandPaddingInner=barBandPaddingInner, clamp=clamp,
+ continuousPadding=continuousPadding, maxBandSize=maxBandSize,
+ maxFontSize=maxFontSize, maxOpacity=maxOpacity,
+ maxSize=maxSize, maxStrokeWidth=maxStrokeWidth,
+ minBandSize=minBandSize, minFontSize=minFontSize,
+ minOpacity=minOpacity, minSize=minSize,
+ minStrokeWidth=minStrokeWidth, pointPadding=pointPadding,
+ quantileCount=quantileCount, quantizeCount=quantizeCount,
+ rectBandPaddingInner=rectBandPaddingInner, round=round,
+ useUnaggregatedDomain=useUnaggregatedDomain,
+ xReverse=xReverse, **kwds)
+
+
+class ScaleInterpolateEnum(VegaLiteSchema):
+ """ScaleInterpolateEnum schema wrapper
+
+ enum('rgb', 'lab', 'hcl', 'hsl', 'hsl-long', 'hcl-long', 'cubehelix', 'cubehelix-long')
+ """
+ _schema = {'$ref': '#/definitions/ScaleInterpolateEnum'}
+
+ def __init__(self, *args):
+ super(ScaleInterpolateEnum, self).__init__(*args)
+
+
+class ScaleInterpolateParams(VegaLiteSchema):
+ """ScaleInterpolateParams schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : enum('rgb', 'cubehelix', 'cubehelix-long')
+
+ gamma : float
+
+ """
+ _schema = {'$ref': '#/definitions/ScaleInterpolateParams'}
+
+ def __init__(self, type=Undefined, gamma=Undefined, **kwds):
+ super(ScaleInterpolateParams, self).__init__(type=type, gamma=gamma, **kwds)
+
+
+class ScaleResolveMap(VegaLiteSchema):
+ """ScaleResolveMap schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ angle : :class:`ResolveMode`
+
+ color : :class:`ResolveMode`
+
+ fill : :class:`ResolveMode`
+
+ fillOpacity : :class:`ResolveMode`
+
+ opacity : :class:`ResolveMode`
+
+ radius : :class:`ResolveMode`
+
+ shape : :class:`ResolveMode`
+
+ size : :class:`ResolveMode`
+
+ stroke : :class:`ResolveMode`
+
+ strokeDash : :class:`ResolveMode`
+
+ strokeOpacity : :class:`ResolveMode`
+
+ strokeWidth : :class:`ResolveMode`
+
+ theta : :class:`ResolveMode`
+
+ x : :class:`ResolveMode`
+
+ y : :class:`ResolveMode`
+
+ """
+ _schema = {'$ref': '#/definitions/ScaleResolveMap'}
+
+ def __init__(self, angle=Undefined, color=Undefined, fill=Undefined, fillOpacity=Undefined,
+ opacity=Undefined, radius=Undefined, shape=Undefined, size=Undefined, stroke=Undefined,
+ strokeDash=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, theta=Undefined,
+ x=Undefined, y=Undefined, **kwds):
+ super(ScaleResolveMap, self).__init__(angle=angle, color=color, fill=fill,
+ fillOpacity=fillOpacity, opacity=opacity, radius=radius,
+ shape=shape, size=size, stroke=stroke,
+ strokeDash=strokeDash, strokeOpacity=strokeOpacity,
+ strokeWidth=strokeWidth, theta=theta, x=x, y=y, **kwds)
+
+
+class ScaleType(VegaLiteSchema):
+ """ScaleType schema wrapper
+
+ enum('linear', 'log', 'pow', 'sqrt', 'symlog', 'identity', 'sequential', 'time', 'utc',
+ 'quantile', 'quantize', 'threshold', 'bin-ordinal', 'ordinal', 'point', 'band')
+ """
+ _schema = {'$ref': '#/definitions/ScaleType'}
+
+ def __init__(self, *args):
+ super(ScaleType, self).__init__(*args)
+
+
+class SchemeParams(VegaLiteSchema):
+ """SchemeParams schema wrapper
+
+ Mapping(required=[name])
+
+ Attributes
+ ----------
+
+ name : string
+ A color scheme name for ordinal scales (e.g., ``"category10"`` or ``"blues"`` ).
+
+ For the full list of supported schemes, please refer to the `Vega Scheme
+ <https://vega.github.io/vega/docs/schemes/#reference>`__ reference.
+ count : float
+ The number of colors to use in the scheme. This can be useful for scale types such
+ as ``"quantize"``, which use the length of the scale range to determine the number
+ of discrete bins for the scale domain.
+ extent : List(float)
+ The extent of the color range to use. For example ``[0.2, 1]`` will rescale the
+ color scheme such that color values in the range *[0, 0.2)* are excluded from the
+ scheme.
+ """
+ _schema = {'$ref': '#/definitions/SchemeParams'}
+
+ def __init__(self, name=Undefined, count=Undefined, extent=Undefined, **kwds):
+ super(SchemeParams, self).__init__(name=name, count=count, extent=extent, **kwds)
+
+
+class SecondaryFieldDef(Position2Def):
+ """SecondaryFieldDef schema wrapper
+
+ Mapping(required=[])
+ A field definition of a secondary channel that shares a scale with another primary channel.
+ For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``.
+
+ Attributes
+ ----------
+
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : None
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ """
+ _schema = {'$ref': '#/definitions/SecondaryFieldDef'}
+
+ def __init__(self, aggregate=Undefined, band=Undefined, bin=Undefined, field=Undefined,
+ timeUnit=Undefined, title=Undefined, **kwds):
+ super(SecondaryFieldDef, self).__init__(aggregate=aggregate, band=band, bin=bin, field=field,
+ timeUnit=timeUnit, title=title, **kwds)
+
+
+class SelectionComposition(VegaLiteSchema):
+ """SelectionComposition schema wrapper
+
+ anyOf(:class:`SelectionNot`, :class:`SelectionAnd`, :class:`SelectionOr`, string)
+ """
+ _schema = {'$ref': '#/definitions/SelectionComposition'}
+
+ def __init__(self, *args, **kwds):
+ super(SelectionComposition, self).__init__(*args, **kwds)
+
+
+class SelectionAnd(SelectionComposition):
+ """SelectionAnd schema wrapper
+
+ Mapping(required=[and])
+
+ Attributes
+ ----------
+
+ and : List(:class:`SelectionComposition`)
+
+ """
+ _schema = {'$ref': '#/definitions/SelectionAnd'}
+
+ def __init__(self, **kwds):
+ super(SelectionAnd, self).__init__(**kwds)
+
+
+class SelectionConfig(VegaLiteSchema):
+ """SelectionConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ interval : :class:`IntervalSelectionConfig`
+ The default definition for an `interval
+ <https://vega.github.io/vega-lite/docs/selection.html#type>`__ selection. All
+ properties and transformations for an interval selection definition (except ``type``
+ ) may be specified here.
+
+ For instance, setting ``interval`` to ``{"translate": false}`` disables the ability
+ to move interval selections by default.
+ multi : :class:`MultiSelectionConfig`
+ The default definition for a `multi
+ <https://vega.github.io/vega-lite/docs/selection.html#type>`__ selection. All
+ properties and transformations for a multi selection definition (except ``type`` )
+ may be specified here.
+
+ For instance, setting ``multi`` to ``{"toggle": "event.altKey"}`` adds additional
+ values to multi selections when clicking with the alt-key pressed by default.
+ single : :class:`SingleSelectionConfig`
+ The default definition for a `single
+ <https://vega.github.io/vega-lite/docs/selection.html#type>`__ selection. All
+ properties and transformations for a single selection definition (except ``type``
+ ) may be specified here.
+
+ For instance, setting ``single`` to ``{"on": "dblclick"}`` populates single
+ selections on double-click by default.
+ """
+ _schema = {'$ref': '#/definitions/SelectionConfig'}
+
+ def __init__(self, interval=Undefined, multi=Undefined, single=Undefined, **kwds):
+ super(SelectionConfig, self).__init__(interval=interval, multi=multi, single=single, **kwds)
+
+
+class SelectionDef(VegaLiteSchema):
+ """SelectionDef schema wrapper
+
+ anyOf(:class:`SingleSelection`, :class:`MultiSelection`, :class:`IntervalSelection`)
+ """
+ _schema = {'$ref': '#/definitions/SelectionDef'}
+
+ def __init__(self, *args, **kwds):
+ super(SelectionDef, self).__init__(*args, **kwds)
+
+
+class IntervalSelection(SelectionDef):
+ """IntervalSelection schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : string
+ Determines the default event processing and data query for the selection. Vega-Lite
+ currently supports three selection types:
+
+
+ * ``"single"`` -- to select a single discrete data value on ``click``. - ``"multi"``
+ -- to select multiple discrete data value; the first value is selected on
+ ``click`` and additional values toggled on shift- ``click``. - ``"interval"`` --
+ to select a continuous range of data values on ``drag``.
+ bind : string
+ Establishes a two-way binding between the interval selection and the scales used
+ within the same view. This allows a user to interactively pan and zoom the view.
+
+ **See also:** `bind <https://vega.github.io/vega-lite/docs/bind.html>`__
+ documentation.
+ clear : anyOf(:class:`Stream`, string, boolean)
+ Clears the selection, emptying it of all values. Can be a `Event Stream
+ <https://vega.github.io/vega/docs/event-streams/>`__ or ``false`` to disable.
+
+ **Default value:** ``dblclick``.
+
+ **See also:** `clear <https://vega.github.io/vega-lite/docs/clear.html>`__
+ documentation.
+ empty : enum('all', 'none')
+ By default, ``all`` data values are considered to lie within an empty selection.
+ When set to ``none``, empty selections contain no data values.
+ encodings : List(:class:`SingleDefUnitChannel`)
+ An array of encoding channels. The corresponding data field values must match for a
+ data tuple to fall within the selection.
+
+ **See also:** `encodings <https://vega.github.io/vega-lite/docs/project.html>`__
+ documentation.
+ fields : List(:class:`FieldName`)
+ An array of field names whose values must match for a data tuple to fall within the
+ selection.
+
+ **See also:** `fields <https://vega.github.io/vega-lite/docs/project.html>`__
+ documentation.
+ init : :class:`SelectionInitIntervalMapping`
+ Initialize the selection with a mapping between `projected channels or field names
+ <https://vega.github.io/vega-lite/docs/project.html>`__ and arrays of initial
+ values.
+
+ **See also:** `init <https://vega.github.io/vega-lite/docs/init.html>`__
+ documentation.
+ mark : :class:`BrushConfig`
+ An interval selection also adds a rectangle mark to depict the extents of the
+ interval. The ``mark`` property can be used to customize the appearance of the mark.
+
+ **See also:** `mark <https://vega.github.io/vega-lite/docs/selection-mark.html>`__
+ documentation.
+ on : anyOf(:class:`Stream`, string)
+ A `Vega event stream <https://vega.github.io/vega/docs/event-streams/>`__ (object or
+ selector) that triggers the selection. For interval selections, the event stream
+ must specify a `start and end
+ <https://vega.github.io/vega/docs/event-streams/#between-filters>`__.
+ resolve : :class:`SelectionResolution`
+ With layered and multi-view displays, a strategy that determines how selections'
+ data queries are resolved when applied in a filter transform, conditional encoding
+ rule, or scale domain.
+
+ **See also:** `resolve
+ <https://vega.github.io/vega-lite/docs/selection-resolve.html>`__ documentation.
+ translate : anyOf(string, boolean)
+ When truthy, allows a user to interactively move an interval selection
+ back-and-forth. Can be ``true``, ``false`` (to disable panning), or a `Vega event
+ stream definition <https://vega.github.io/vega/docs/event-streams/>`__ which must
+ include a start and end event to trigger continuous panning.
+
+ **Default value:** ``true``, which corresponds to ``[mousedown, window:mouseup] >
+ window:mousemove!`` which corresponds to clicks and dragging within an interval
+ selection to reposition it.
+
+ **See also:** `translate <https://vega.github.io/vega-lite/docs/translate.html>`__
+ documentation.
+ zoom : anyOf(string, boolean)
+ When truthy, allows a user to interactively resize an interval selection. Can be
+ ``true``, ``false`` (to disable zooming), or a `Vega event stream definition
+ <https://vega.github.io/vega/docs/event-streams/>`__. Currently, only ``wheel``
+ events are supported.
+
+ **Default value:** ``true``, which corresponds to ``wheel!``.
+
+ **See also:** `zoom <https://vega.github.io/vega-lite/docs/zoom.html>`__
+ documentation.
+ """
+ _schema = {'$ref': '#/definitions/IntervalSelection'}
+
+ def __init__(self, type=Undefined, bind=Undefined, clear=Undefined, empty=Undefined,
+ encodings=Undefined, fields=Undefined, init=Undefined, mark=Undefined, on=Undefined,
+ resolve=Undefined, translate=Undefined, zoom=Undefined, **kwds):
+ super(IntervalSelection, self).__init__(type=type, bind=bind, clear=clear, empty=empty,
+ encodings=encodings, fields=fields, init=init,
+ mark=mark, on=on, resolve=resolve, translate=translate,
+ zoom=zoom, **kwds)
+
+
+class MultiSelection(SelectionDef):
+ """MultiSelection schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : string
+ Determines the default event processing and data query for the selection. Vega-Lite
+ currently supports three selection types:
+
+
+ * ``"single"`` -- to select a single discrete data value on ``click``. - ``"multi"``
+ -- to select multiple discrete data value; the first value is selected on
+ ``click`` and additional values toggled on shift- ``click``. - ``"interval"`` --
+ to select a continuous range of data values on ``drag``.
+ bind : :class:`LegendBinding`
+ When set, a selection is populated by interacting with the corresponding legend.
+ Direct manipulation interaction is disabled by default; to re-enable it, set the
+ selection's `on
+ <https://vega.github.io/vega-lite/docs/selection.html#common-selection-properties>`__
+ property.
+
+ Legend bindings are restricted to selections that only specify a single field or
+ encoding.
+ clear : anyOf(:class:`Stream`, string, boolean)
+ Clears the selection, emptying it of all values. Can be a `Event Stream
+ <https://vega.github.io/vega/docs/event-streams/>`__ or ``false`` to disable.
+
+ **Default value:** ``dblclick``.
+
+ **See also:** `clear <https://vega.github.io/vega-lite/docs/clear.html>`__
+ documentation.
+ empty : enum('all', 'none')
+ By default, ``all`` data values are considered to lie within an empty selection.
+ When set to ``none``, empty selections contain no data values.
+ encodings : List(:class:`SingleDefUnitChannel`)
+ An array of encoding channels. The corresponding data field values must match for a
+ data tuple to fall within the selection.
+
+ **See also:** `encodings <https://vega.github.io/vega-lite/docs/project.html>`__
+ documentation.
+ fields : List(:class:`FieldName`)
+ An array of field names whose values must match for a data tuple to fall within the
+ selection.
+
+ **See also:** `fields <https://vega.github.io/vega-lite/docs/project.html>`__
+ documentation.
+ init : List(:class:`SelectionInitMapping`)
+ Initialize the selection with a mapping between `projected channels or field names
+ <https://vega.github.io/vega-lite/docs/project.html>`__ and an initial value (or
+ array of values).
+
+ **See also:** `init <https://vega.github.io/vega-lite/docs/init.html>`__
+ documentation.
+ nearest : boolean
+ When true, an invisible voronoi diagram is computed to accelerate discrete
+ selection. The data value *nearest* the mouse cursor is added to the selection.
+
+ **See also:** `nearest <https://vega.github.io/vega-lite/docs/nearest.html>`__
+ documentation.
+ on : anyOf(:class:`Stream`, string)
+ A `Vega event stream <https://vega.github.io/vega/docs/event-streams/>`__ (object or
+ selector) that triggers the selection. For interval selections, the event stream
+ must specify a `start and end
+ <https://vega.github.io/vega/docs/event-streams/#between-filters>`__.
+ resolve : :class:`SelectionResolution`
+ With layered and multi-view displays, a strategy that determines how selections'
+ data queries are resolved when applied in a filter transform, conditional encoding
+ rule, or scale domain.
+
+ **See also:** `resolve
+ <https://vega.github.io/vega-lite/docs/selection-resolve.html>`__ documentation.
+ toggle : anyOf(string, boolean)
+ Controls whether data values should be toggled or only ever inserted into multi
+ selections. Can be ``true``, ``false`` (for insertion only), or a `Vega expression
+ <https://vega.github.io/vega/docs/expressions/>`__.
+
+ **Default value:** ``true``, which corresponds to ``event.shiftKey`` (i.e., data
+ values are toggled when a user interacts with the shift-key pressed).
+
+ Setting the value to the Vega expression ``"true"`` will toggle data values without
+ the user pressing the shift-key.
+
+ **See also:** `toggle <https://vega.github.io/vega-lite/docs/toggle.html>`__
+ documentation.
+ """
+ _schema = {'$ref': '#/definitions/MultiSelection'}
+
+ def __init__(self, type=Undefined, bind=Undefined, clear=Undefined, empty=Undefined,
+ encodings=Undefined, fields=Undefined, init=Undefined, nearest=Undefined, on=Undefined,
+ resolve=Undefined, toggle=Undefined, **kwds):
+ super(MultiSelection, self).__init__(type=type, bind=bind, clear=clear, empty=empty,
+ encodings=encodings, fields=fields, init=init,
+ nearest=nearest, on=on, resolve=resolve, toggle=toggle,
+ **kwds)
+
+
+class SelectionExtent(BinExtent):
+ """SelectionExtent schema wrapper
+
+ anyOf(Mapping(required=[selection]), Mapping(required=[selection]))
+ """
+ _schema = {'$ref': '#/definitions/SelectionExtent'}
+
+ def __init__(self, *args, **kwds):
+ super(SelectionExtent, self).__init__(*args, **kwds)
+
+
+class SelectionInit(VegaLiteSchema):
+ """SelectionInit schema wrapper
+
+ anyOf(:class:`PrimitiveValue`, :class:`DateTime`)
+ """
+ _schema = {'$ref': '#/definitions/SelectionInit'}
+
+ def __init__(self, *args, **kwds):
+ super(SelectionInit, self).__init__(*args, **kwds)
+
+
+class DateTime(SelectionInit):
+ """DateTime schema wrapper
+
+ Mapping(required=[])
+ Object for defining datetime in Vega-Lite Filter. If both month and quarter are provided,
+ month has higher precedence. ``day`` cannot be combined with other date. We accept string
+ for month and day names.
+
+ Attributes
+ ----------
+
+ date : float
+ Integer value representing the date (day of the month) from 1-31.
+ day : anyOf(:class:`Day`, string)
+ Value representing the day of a week. This can be one of: (1) integer value -- ``1``
+ represents Monday; (2) case-insensitive day name (e.g., ``"Monday"`` ); (3)
+ case-insensitive, 3-character short day name (e.g., ``"Mon"`` ).
+
+ **Warning:** A DateTime definition object with ``day`` ** should not be combined
+ with ``year``, ``quarter``, ``month``, or ``date``.
+ hours : float
+ Integer value representing the hour of a day from 0-23.
+ milliseconds : float
+ Integer value representing the millisecond segment of time.
+ minutes : float
+ Integer value representing the minute segment of time from 0-59.
+ month : anyOf(:class:`Month`, string)
+ One of: (1) integer value representing the month from ``1`` - ``12``. ``1``
+ represents January; (2) case-insensitive month name (e.g., ``"January"`` ); (3)
+ case-insensitive, 3-character short month name (e.g., ``"Jan"`` ).
+ quarter : float
+ Integer value representing the quarter of the year (from 1-4).
+ seconds : float
+ Integer value representing the second segment (0-59) of a time value
+ utc : boolean
+ A boolean flag indicating if date time is in utc time. If false, the date time is in
+ local time
+ year : float
+ Integer value representing the year.
+ """
+ _schema = {'$ref': '#/definitions/DateTime'}
+
+ def __init__(self, date=Undefined, day=Undefined, hours=Undefined, milliseconds=Undefined,
+ minutes=Undefined, month=Undefined, quarter=Undefined, seconds=Undefined,
+ utc=Undefined, year=Undefined, **kwds):
+ super(DateTime, self).__init__(date=date, day=day, hours=hours, milliseconds=milliseconds,
+ minutes=minutes, month=month, quarter=quarter, seconds=seconds,
+ utc=utc, year=year, **kwds)
+
+
+class PrimitiveValue(SelectionInit):
+ """PrimitiveValue schema wrapper
+
+ anyOf(float, string, boolean, None)
+ """
+ _schema = {'$ref': '#/definitions/PrimitiveValue'}
+
+ def __init__(self, *args):
+ super(PrimitiveValue, self).__init__(*args)
+
+
+class SelectionInitInterval(VegaLiteSchema):
+ """SelectionInitInterval schema wrapper
+
+ anyOf(:class:`Vector2boolean`, :class:`Vector2number`, :class:`Vector2string`,
+ :class:`Vector2DateTime`)
+ """
+ _schema = {'$ref': '#/definitions/SelectionInitInterval'}
+
+ def __init__(self, *args, **kwds):
+ super(SelectionInitInterval, self).__init__(*args, **kwds)
+
+
+class SelectionInitIntervalMapping(VegaLiteSchema):
+ """SelectionInitIntervalMapping schema wrapper
+
+ Mapping(required=[])
+ """
+ _schema = {'$ref': '#/definitions/SelectionInitIntervalMapping'}
+
+ def __init__(self, **kwds):
+ super(SelectionInitIntervalMapping, self).__init__(**kwds)
+
+
+class SelectionInitMapping(VegaLiteSchema):
+ """SelectionInitMapping schema wrapper
+
+ Mapping(required=[])
+ """
+ _schema = {'$ref': '#/definitions/SelectionInitMapping'}
+
+ def __init__(self, **kwds):
+ super(SelectionInitMapping, self).__init__(**kwds)
+
+
+class SelectionNot(SelectionComposition):
+ """SelectionNot schema wrapper
+
+ Mapping(required=[not])
+
+ Attributes
+ ----------
+
+ not : :class:`SelectionComposition`
+
+ """
+ _schema = {'$ref': '#/definitions/SelectionNot'}
+
+ def __init__(self, **kwds):
+ super(SelectionNot, self).__init__(**kwds)
+
+
+class SelectionOr(SelectionComposition):
+ """SelectionOr schema wrapper
+
+ Mapping(required=[or])
+
+ Attributes
+ ----------
+
+ or : List(:class:`SelectionComposition`)
+
+ """
+ _schema = {'$ref': '#/definitions/SelectionOr'}
+
+ def __init__(self, **kwds):
+ super(SelectionOr, self).__init__(**kwds)
+
+
+class SelectionPredicate(Predicate):
+ """SelectionPredicate schema wrapper
+
+ Mapping(required=[selection])
+
+ Attributes
+ ----------
+
+ selection : :class:`SelectionComposition`
+ Filter using a selection name or a logical composition of selection names.
+ """
+ _schema = {'$ref': '#/definitions/SelectionPredicate'}
+
+ def __init__(self, selection=Undefined, **kwds):
+ super(SelectionPredicate, self).__init__(selection=selection, **kwds)
+
+
+class SelectionResolution(VegaLiteSchema):
+ """SelectionResolution schema wrapper
+
+ enum('global', 'union', 'intersect')
+ """
+ _schema = {'$ref': '#/definitions/SelectionResolution'}
+
+ def __init__(self, *args):
+ super(SelectionResolution, self).__init__(*args)
+
+
+class SequenceGenerator(Generator):
+ """SequenceGenerator schema wrapper
+
+ Mapping(required=[sequence])
+
+ Attributes
+ ----------
+
+ sequence : :class:`SequenceParams`
+ Generate a sequence of numbers.
+ name : string
+ Provide a placeholder name and bind data at runtime.
+ """
+ _schema = {'$ref': '#/definitions/SequenceGenerator'}
+
+ def __init__(self, sequence=Undefined, name=Undefined, **kwds):
+ super(SequenceGenerator, self).__init__(sequence=sequence, name=name, **kwds)
+
+
+class SequenceParams(VegaLiteSchema):
+ """SequenceParams schema wrapper
+
+ Mapping(required=[start, stop])
+
+ Attributes
+ ----------
+
+ start : float
+ The starting value of the sequence (inclusive).
+ stop : float
+ The ending value of the sequence (exclusive).
+ step : float
+ The step value between sequence entries.
+
+ **Default value:** ``1``
+ as : :class:`FieldName`
+ The name of the generated sequence field.
+
+ **Default value:** ``"data"``
+ """
+ _schema = {'$ref': '#/definitions/SequenceParams'}
+
+ def __init__(self, start=Undefined, stop=Undefined, step=Undefined, **kwds):
+ super(SequenceParams, self).__init__(start=start, stop=stop, step=step, **kwds)
+
+
+class SequentialMultiHue(ColorScheme):
+ """SequentialMultiHue schema wrapper
+
+ enum('turbo', 'viridis', 'inferno', 'magma', 'plasma', 'cividis', 'bluegreen',
+ 'bluegreen-3', 'bluegreen-4', 'bluegreen-5', 'bluegreen-6', 'bluegreen-7', 'bluegreen-8',
+ 'bluegreen-9', 'bluepurple', 'bluepurple-3', 'bluepurple-4', 'bluepurple-5', 'bluepurple-6',
+ 'bluepurple-7', 'bluepurple-8', 'bluepurple-9', 'goldgreen', 'goldgreen-3', 'goldgreen-4',
+ 'goldgreen-5', 'goldgreen-6', 'goldgreen-7', 'goldgreen-8', 'goldgreen-9', 'goldorange',
+ 'goldorange-3', 'goldorange-4', 'goldorange-5', 'goldorange-6', 'goldorange-7',
+ 'goldorange-8', 'goldorange-9', 'goldred', 'goldred-3', 'goldred-4', 'goldred-5',
+ 'goldred-6', 'goldred-7', 'goldred-8', 'goldred-9', 'greenblue', 'greenblue-3',
+ 'greenblue-4', 'greenblue-5', 'greenblue-6', 'greenblue-7', 'greenblue-8', 'greenblue-9',
+ 'orangered', 'orangered-3', 'orangered-4', 'orangered-5', 'orangered-6', 'orangered-7',
+ 'orangered-8', 'orangered-9', 'purplebluegreen', 'purplebluegreen-3', 'purplebluegreen-4',
+ 'purplebluegreen-5', 'purplebluegreen-6', 'purplebluegreen-7', 'purplebluegreen-8',
+ 'purplebluegreen-9', 'purpleblue', 'purpleblue-3', 'purpleblue-4', 'purpleblue-5',
+ 'purpleblue-6', 'purpleblue-7', 'purpleblue-8', 'purpleblue-9', 'purplered', 'purplered-3',
+ 'purplered-4', 'purplered-5', 'purplered-6', 'purplered-7', 'purplered-8', 'purplered-9',
+ 'redpurple', 'redpurple-3', 'redpurple-4', 'redpurple-5', 'redpurple-6', 'redpurple-7',
+ 'redpurple-8', 'redpurple-9', 'yellowgreenblue', 'yellowgreenblue-3', 'yellowgreenblue-4',
+ 'yellowgreenblue-5', 'yellowgreenblue-6', 'yellowgreenblue-7', 'yellowgreenblue-8',
+ 'yellowgreenblue-9', 'yellowgreen', 'yellowgreen-3', 'yellowgreen-4', 'yellowgreen-5',
+ 'yellowgreen-6', 'yellowgreen-7', 'yellowgreen-8', 'yellowgreen-9', 'yelloworangebrown',
+ 'yelloworangebrown-3', 'yelloworangebrown-4', 'yelloworangebrown-5', 'yelloworangebrown-6',
+ 'yelloworangebrown-7', 'yelloworangebrown-8', 'yelloworangebrown-9', 'yelloworangered',
+ 'yelloworangered-3', 'yelloworangered-4', 'yelloworangered-5', 'yelloworangered-6',
+ 'yelloworangered-7', 'yelloworangered-8', 'yelloworangered-9', 'darkblue', 'darkblue-3',
+ 'darkblue-4', 'darkblue-5', 'darkblue-6', 'darkblue-7', 'darkblue-8', 'darkblue-9',
+ 'darkgold', 'darkgold-3', 'darkgold-4', 'darkgold-5', 'darkgold-6', 'darkgold-7',
+ 'darkgold-8', 'darkgold-9', 'darkgreen', 'darkgreen-3', 'darkgreen-4', 'darkgreen-5',
+ 'darkgreen-6', 'darkgreen-7', 'darkgreen-8', 'darkgreen-9', 'darkmulti', 'darkmulti-3',
+ 'darkmulti-4', 'darkmulti-5', 'darkmulti-6', 'darkmulti-7', 'darkmulti-8', 'darkmulti-9',
+ 'darkred', 'darkred-3', 'darkred-4', 'darkred-5', 'darkred-6', 'darkred-7', 'darkred-8',
+ 'darkred-9', 'lightgreyred', 'lightgreyred-3', 'lightgreyred-4', 'lightgreyred-5',
+ 'lightgreyred-6', 'lightgreyred-7', 'lightgreyred-8', 'lightgreyred-9', 'lightgreyteal',
+ 'lightgreyteal-3', 'lightgreyteal-4', 'lightgreyteal-5', 'lightgreyteal-6',
+ 'lightgreyteal-7', 'lightgreyteal-8', 'lightgreyteal-9', 'lightmulti', 'lightmulti-3',
+ 'lightmulti-4', 'lightmulti-5', 'lightmulti-6', 'lightmulti-7', 'lightmulti-8',
+ 'lightmulti-9', 'lightorange', 'lightorange-3', 'lightorange-4', 'lightorange-5',
+ 'lightorange-6', 'lightorange-7', 'lightorange-8', 'lightorange-9', 'lighttealblue',
+ 'lighttealblue-3', 'lighttealblue-4', 'lighttealblue-5', 'lighttealblue-6',
+ 'lighttealblue-7', 'lighttealblue-8', 'lighttealblue-9')
+ """
+ _schema = {'$ref': '#/definitions/SequentialMultiHue'}
+
+ def __init__(self, *args):
+ super(SequentialMultiHue, self).__init__(*args)
+
+
+class SequentialSingleHue(ColorScheme):
+ """SequentialSingleHue schema wrapper
+
+ enum('blues', 'tealblues', 'teals', 'greens', 'browns', 'greys', 'purples', 'warmgreys',
+ 'reds', 'oranges')
+ """
+ _schema = {'$ref': '#/definitions/SequentialSingleHue'}
+
+ def __init__(self, *args):
+ super(SequentialSingleHue, self).__init__(*args)
+
+
+class ShapeDef(VegaLiteSchema):
+ """ShapeDef schema wrapper
+
+ anyOf(:class:`FieldOrDatumDefWithConditionMarkPropFieldDefTypeForShapestringnull`,
+ :class:`FieldOrDatumDefWithConditionDatumDefstringnull`,
+ :class:`ValueDefWithConditionMarkPropFieldOrDatumDefTypeForShapestringnull`)
+ """
+ _schema = {'$ref': '#/definitions/ShapeDef'}
+
+ def __init__(self, *args, **kwds):
+ super(ShapeDef, self).__init__(*args, **kwds)
+
+
+class FieldOrDatumDefWithConditionDatumDefstringnull(MarkPropDefstringnullTypeForShape, ShapeDef):
+ """FieldOrDatumDefWithConditionDatumDefstringnull schema wrapper
+
+ Mapping(required=[])
+ A FieldDef with Condition :raw-html:`<ValueDef>` { condition: {value: ...}, field:
+ ..., ... }
+
+ Attributes
+ ----------
+
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ condition : anyOf(:class:`ConditionalValueDefstringnullExprRef`,
+ List(:class:`ConditionalValueDefstringnullExprRef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ datum : anyOf(:class:`PrimitiveValue`, :class:`DateTime`, :class:`ExprRef`,
+ :class:`RepeatRef`)
+ A constant value in data domain.
+ type : :class:`Type`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _schema = {'$ref': '#/definitions/FieldOrDatumDefWithCondition<DatumDef,(string|null)>'}
+
+ def __init__(self, band=Undefined, condition=Undefined, datum=Undefined, type=Undefined, **kwds):
+ super(FieldOrDatumDefWithConditionDatumDefstringnull, self).__init__(band=band,
+ condition=condition,
+ datum=datum, type=type,
+ **kwds)
+
+
+class FieldOrDatumDefWithConditionMarkPropFieldDefTypeForShapestringnull(MarkPropDefstringnullTypeForShape, ShapeDef):
+ """FieldOrDatumDefWithConditionMarkPropFieldDefTypeForShapestringnull schema wrapper
+
+ Mapping(required=[])
+ A FieldDef with Condition :raw-html:`<ValueDef>` { condition: {value: ...}, field:
+ ..., ... }
+
+ Attributes
+ ----------
+
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : anyOf(boolean, :class:`BinParams`, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ condition : anyOf(:class:`ConditionalValueDefstringnullExprRef`,
+ List(:class:`ConditionalValueDefstringnullExprRef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ legend : anyOf(:class:`Legend`, None)
+ An object defining properties of the legend. If ``null``, the legend for the
+ encoding channel will be removed.
+
+ **Default value:** If undefined, default `legend properties
+ <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.
+
+ **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
+ documentation.
+ scale : anyOf(:class:`Scale`, None)
+ An object defining properties of the channel's scale, which is the function that
+ transforms values in the data domain (numbers, dates, strings, etc) to visual values
+ (pixels, colors, sizes) of the encoding channels.
+
+ If ``null``, the scale will be `disabled and the data value will be directly encoded
+ <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.
+
+ **Default value:** If undefined, default `scale properties
+ <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.
+
+ **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
+ documentation.
+ sort : :class:`Sort`
+ Sort order for the encoded field.
+
+ For continuous fields (quantitative or temporal), ``sort`` can be either
+ ``"ascending"`` or ``"descending"``.
+
+ For discrete fields, ``sort`` can be one of the following: - ``"ascending"`` or
+ ``"descending"`` -- for sorting by the values' natural order in JavaScript. - `A
+ string indicating an encoding channel name to sort by
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g., ``"x"``
+ or ``"y"`` ) with an optional minus prefix for descending sort (e.g., ``"-x"`` to
+ sort by x-field, descending). This channel string is short-form of `a
+ sort-by-encoding definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For example,
+ ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order":
+ "descending"}``. - `A sort field definition
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
+ another field. - `An array specifying the field values in preferred order
+ <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
+ sort order will obey the values in the array, followed by any unspecified values in
+ their original order. For discrete time field, values in the sort array can be
+ `date-time definition objects <types#datetime>`__. In addition, for time units
+ ``"month"`` and ``"day"``, the values can be the month or day names (case
+ insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"`` ). - ``null``
+ indicating no sort.
+
+ **Default value:** ``"ascending"``
+
+ **Note:** ``null`` and sorting by another channel is not supported for ``row`` and
+ ``column``.
+
+ **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
+ documentation.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`TypeForShape`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _schema = {'$ref': '#/definitions/FieldOrDatumDefWithCondition<MarkPropFieldDef<TypeForShape>,(string|null)>'}
+
+ def __init__(self, aggregate=Undefined, band=Undefined, bin=Undefined, condition=Undefined,
+ field=Undefined, legend=Undefined, scale=Undefined, sort=Undefined, timeUnit=Undefined,
+ title=Undefined, type=Undefined, **kwds):
+ super(FieldOrDatumDefWithConditionMarkPropFieldDefTypeForShapestringnull, self).__init__(aggregate=aggregate,
+ band=band,
+ bin=bin,
+ condition=condition,
+ field=field,
+ legend=legend,
+ scale=scale,
+ sort=sort,
+ timeUnit=timeUnit,
+ title=title,
+ type=type,
+ **kwds)
+
+
+class SharedEncoding(VegaLiteSchema):
+ """SharedEncoding schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ angle : Mapping(required=[])
+
+ color : Mapping(required=[])
+
+ description : Mapping(required=[])
+
+ detail : anyOf(:class:`FieldDefWithoutScale`, List(:class:`FieldDefWithoutScale`))
+ Additional levels of detail for grouping data in aggregate views and in line, trail,
+ and area marks without mapping data to a specific visual channel.
+ fill : Mapping(required=[])
+
+ fillOpacity : Mapping(required=[])
+
+ href : Mapping(required=[])
+
+ key : Mapping(required=[])
+
+ latitude : Mapping(required=[])
+
+ latitude2 : Mapping(required=[])
+
+ longitude : Mapping(required=[])
+
+ longitude2 : Mapping(required=[])
+
+ opacity : Mapping(required=[])
+
+ order : anyOf(:class:`OrderFieldDef`, List(:class:`OrderFieldDef`), :class:`OrderValueDef`)
+ Order of the marks. - For stacked marks, this ``order`` channel encodes `stack order
+ <https://vega.github.io/vega-lite/docs/stack.html#order>`__. - For line and trail
+ marks, this ``order`` channel encodes order of data points in the lines. This can be
+ useful for creating `a connected scatterplot
+ <https://vega.github.io/vega-lite/examples/connected_scatterplot.html>`__. Setting
+ ``order`` to ``{"value": null}`` makes the line marks use the original order in the
+ data sources. - Otherwise, this ``order`` channel encodes layer order of the marks.
+
+ **Note** : In aggregate plots, ``order`` field should be ``aggregate`` d to avoid
+ creating additional aggregation grouping.
+ radius : Mapping(required=[])
+
+ radius2 : Mapping(required=[])
+
+ shape : Mapping(required=[])
+
+ size : Mapping(required=[])
+
+ stroke : Mapping(required=[])
+
+ strokeDash : Mapping(required=[])
+
+ strokeOpacity : Mapping(required=[])
+
+ strokeWidth : Mapping(required=[])
+
+ text : Mapping(required=[])
+
+ theta : Mapping(required=[])
+
+ theta2 : Mapping(required=[])
+
+ tooltip : anyOf(:class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition`,
+ List(:class:`StringFieldDef`), None)
+ The tooltip text to show upon mouse hover. Specifying ``tooltip`` encoding overrides
+ `the tooltip property in the mark definition
+ <https://vega.github.io/vega-lite/docs/mark.html#mark-def>`__.
+
+ See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__
+ documentation for a detailed discussion about tooltip in Vega-Lite.
+ url : Mapping(required=[])
+
+ x : Mapping(required=[])
+
+ x2 : Mapping(required=[])
+
+ xError : Mapping(required=[])
+
+ xError2 : Mapping(required=[])
+
+ y : Mapping(required=[])
+
+ y2 : Mapping(required=[])
+
+ yError : Mapping(required=[])
+
+ yError2 : Mapping(required=[])
+
+ """
+ _schema = {'$ref': '#/definitions/SharedEncoding'}
+
+ def __init__(self, angle=Undefined, color=Undefined, description=Undefined, detail=Undefined,
+ fill=Undefined, fillOpacity=Undefined, href=Undefined, key=Undefined,
+ latitude=Undefined, latitude2=Undefined, longitude=Undefined, longitude2=Undefined,
+ opacity=Undefined, order=Undefined, radius=Undefined, radius2=Undefined,
+ shape=Undefined, size=Undefined, stroke=Undefined, strokeDash=Undefined,
+ strokeOpacity=Undefined, strokeWidth=Undefined, text=Undefined, theta=Undefined,
+ theta2=Undefined, tooltip=Undefined, url=Undefined, x=Undefined, x2=Undefined,
+ xError=Undefined, xError2=Undefined, y=Undefined, y2=Undefined, yError=Undefined,
+ yError2=Undefined, **kwds):
+ super(SharedEncoding, self).__init__(angle=angle, color=color, description=description,
+ detail=detail, fill=fill, fillOpacity=fillOpacity,
+ href=href, key=key, latitude=latitude, latitude2=latitude2,
+ longitude=longitude, longitude2=longitude2,
+ opacity=opacity, order=order, radius=radius,
+ radius2=radius2, shape=shape, size=size, stroke=stroke,
+ strokeDash=strokeDash, strokeOpacity=strokeOpacity,
+ strokeWidth=strokeWidth, text=text, theta=theta,
+ theta2=theta2, tooltip=tooltip, url=url, x=x, x2=x2,
+ xError=xError, xError2=xError2, y=y, y2=y2, yError=yError,
+ yError2=yError2, **kwds)
+
+
+class SingleDefUnitChannel(VegaLiteSchema):
+ """SingleDefUnitChannel schema wrapper
+
+ enum('x', 'y', 'x2', 'y2', 'longitude', 'latitude', 'longitude2', 'latitude2', 'theta',
+ 'theta2', 'radius', 'radius2', 'color', 'fill', 'stroke', 'opacity', 'fillOpacity',
+ 'strokeOpacity', 'strokeWidth', 'strokeDash', 'size', 'angle', 'shape', 'key', 'text',
+ 'href', 'url', 'description')
+ """
+ _schema = {'$ref': '#/definitions/SingleDefUnitChannel'}
+
+ def __init__(self, *args):
+ super(SingleDefUnitChannel, self).__init__(*args)
+
+
+class SingleSelection(SelectionDef):
+ """SingleSelection schema wrapper
+
+ Mapping(required=[type])
+
+ Attributes
+ ----------
+
+ type : string
+ Determines the default event processing and data query for the selection. Vega-Lite
+ currently supports three selection types:
+
+
+ * ``"single"`` -- to select a single discrete data value on ``click``. - ``"multi"``
+ -- to select multiple discrete data value; the first value is selected on
+ ``click`` and additional values toggled on shift- ``click``. - ``"interval"`` --
+ to select a continuous range of data values on ``drag``.
+ bind : anyOf(:class:`Binding`, Mapping(required=[]), :class:`LegendBinding`)
+ When set, a selection is populated by input elements (also known as dynamic query
+ widgets) or by interacting with the corresponding legend. Direct manipulation
+ interaction is disabled by default; to re-enable it, set the selection's `on
+ <https://vega.github.io/vega-lite/docs/selection.html#common-selection-properties>`__
+ property.
+
+ Legend bindings are restricted to selections that only specify a single field or
+ encoding.
+
+ Query widget binding takes the form of Vega's `input element binding definition
+ <https://vega.github.io/vega/docs/signals/#bind>`__ or can be a mapping between
+ projected field/encodings and binding definitions.
+
+ **See also:** `bind <https://vega.github.io/vega-lite/docs/bind.html>`__
+ documentation.
+ clear : anyOf(:class:`Stream`, string, boolean)
+ Clears the selection, emptying it of all values. Can be a `Event Stream
+ <https://vega.github.io/vega/docs/event-streams/>`__ or ``false`` to disable.
+
+ **Default value:** ``dblclick``.
+
+ **See also:** `clear <https://vega.github.io/vega-lite/docs/clear.html>`__
+ documentation.
+ empty : enum('all', 'none')
+ By default, ``all`` data values are considered to lie within an empty selection.
+ When set to ``none``, empty selections contain no data values.
+ encodings : List(:class:`SingleDefUnitChannel`)
+ An array of encoding channels. The corresponding data field values must match for a
+ data tuple to fall within the selection.
+
+ **See also:** `encodings <https://vega.github.io/vega-lite/docs/project.html>`__
+ documentation.
+ fields : List(:class:`FieldName`)
+ An array of field names whose values must match for a data tuple to fall within the
+ selection.
+
+ **See also:** `fields <https://vega.github.io/vega-lite/docs/project.html>`__
+ documentation.
+ init : :class:`SelectionInitMapping`
+ Initialize the selection with a mapping between `projected channels or field names
+ <https://vega.github.io/vega-lite/docs/project.html>`__ and initial values.
+
+ **See also:** `init <https://vega.github.io/vega-lite/docs/init.html>`__
+ documentation.
+ nearest : boolean
+ When true, an invisible voronoi diagram is computed to accelerate discrete
+ selection. The data value *nearest* the mouse cursor is added to the selection.
+
+ **See also:** `nearest <https://vega.github.io/vega-lite/docs/nearest.html>`__
+ documentation.
+ on : anyOf(:class:`Stream`, string)
+ A `Vega event stream <https://vega.github.io/vega/docs/event-streams/>`__ (object or
+ selector) that triggers the selection. For interval selections, the event stream
+ must specify a `start and end
+ <https://vega.github.io/vega/docs/event-streams/#between-filters>`__.
+ resolve : :class:`SelectionResolution`
+ With layered and multi-view displays, a strategy that determines how selections'
+ data queries are resolved when applied in a filter transform, conditional encoding
+ rule, or scale domain.
+
+ **See also:** `resolve
+ <https://vega.github.io/vega-lite/docs/selection-resolve.html>`__ documentation.
+ """
+ _schema = {'$ref': '#/definitions/SingleSelection'}
+
+ def __init__(self, type=Undefined, bind=Undefined, clear=Undefined, empty=Undefined,
+ encodings=Undefined, fields=Undefined, init=Undefined, nearest=Undefined, on=Undefined,
+ resolve=Undefined, **kwds):
+ super(SingleSelection, self).__init__(type=type, bind=bind, clear=clear, empty=empty,
+ encodings=encodings, fields=fields, init=init,
+ nearest=nearest, on=on, resolve=resolve, **kwds)
+
+
+class SingleSelectionConfig(VegaLiteSchema):
+ """SingleSelectionConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ bind : anyOf(:class:`Binding`, Mapping(required=[]), :class:`LegendBinding`)
+ When set, a selection is populated by input elements (also known as dynamic query
+ widgets) or by interacting with the corresponding legend. Direct manipulation
+ interaction is disabled by default; to re-enable it, set the selection's `on
+ <https://vega.github.io/vega-lite/docs/selection.html#common-selection-properties>`__
+ property.
+
+ Legend bindings are restricted to selections that only specify a single field or
+ encoding.
+
+ Query widget binding takes the form of Vega's `input element binding definition
+ <https://vega.github.io/vega/docs/signals/#bind>`__ or can be a mapping between
+ projected field/encodings and binding definitions.
+
+ **See also:** `bind <https://vega.github.io/vega-lite/docs/bind.html>`__
+ documentation.
+ clear : anyOf(:class:`Stream`, string, boolean)
+ Clears the selection, emptying it of all values. Can be a `Event Stream
+ <https://vega.github.io/vega/docs/event-streams/>`__ or ``false`` to disable.
+
+ **Default value:** ``dblclick``.
+
+ **See also:** `clear <https://vega.github.io/vega-lite/docs/clear.html>`__
+ documentation.
+ empty : enum('all', 'none')
+ By default, ``all`` data values are considered to lie within an empty selection.
+ When set to ``none``, empty selections contain no data values.
+ encodings : List(:class:`SingleDefUnitChannel`)
+ An array of encoding channels. The corresponding data field values must match for a
+ data tuple to fall within the selection.
+
+ **See also:** `encodings <https://vega.github.io/vega-lite/docs/project.html>`__
+ documentation.
+ fields : List(:class:`FieldName`)
+ An array of field names whose values must match for a data tuple to fall within the
+ selection.
+
+ **See also:** `fields <https://vega.github.io/vega-lite/docs/project.html>`__
+ documentation.
+ init : :class:`SelectionInitMapping`
+ Initialize the selection with a mapping between `projected channels or field names
+ <https://vega.github.io/vega-lite/docs/project.html>`__ and initial values.
+
+ **See also:** `init <https://vega.github.io/vega-lite/docs/init.html>`__
+ documentation.
+ nearest : boolean
+ When true, an invisible voronoi diagram is computed to accelerate discrete
+ selection. The data value *nearest* the mouse cursor is added to the selection.
+
+ **See also:** `nearest <https://vega.github.io/vega-lite/docs/nearest.html>`__
+ documentation.
+ on : anyOf(:class:`Stream`, string)
+ A `Vega event stream <https://vega.github.io/vega/docs/event-streams/>`__ (object or
+ selector) that triggers the selection. For interval selections, the event stream
+ must specify a `start and end
+ <https://vega.github.io/vega/docs/event-streams/#between-filters>`__.
+ resolve : :class:`SelectionResolution`
+ With layered and multi-view displays, a strategy that determines how selections'
+ data queries are resolved when applied in a filter transform, conditional encoding
+ rule, or scale domain.
+
+ **See also:** `resolve
+ <https://vega.github.io/vega-lite/docs/selection-resolve.html>`__ documentation.
+ """
+ _schema = {'$ref': '#/definitions/SingleSelectionConfig'}
+
+ def __init__(self, bind=Undefined, clear=Undefined, empty=Undefined, encodings=Undefined,
+ fields=Undefined, init=Undefined, nearest=Undefined, on=Undefined, resolve=Undefined,
+ **kwds):
+ super(SingleSelectionConfig, self).__init__(bind=bind, clear=clear, empty=empty,
+ encodings=encodings, fields=fields, init=init,
+ nearest=nearest, on=on, resolve=resolve, **kwds)
+
+
+class Sort(VegaLiteSchema):
+ """Sort schema wrapper
+
+ anyOf(:class:`SortArray`, :class:`AllSortString`, :class:`EncodingSortField`,
+ :class:`SortByEncoding`, None)
+ """
+ _schema = {'$ref': '#/definitions/Sort'}
+
+ def __init__(self, *args, **kwds):
+ super(Sort, self).__init__(*args, **kwds)
+
+
+class AllSortString(Sort):
+ """AllSortString schema wrapper
+
+ anyOf(:class:`SortOrder`, :class:`SortByChannel`, :class:`SortByChannelDesc`)
+ """
+ _schema = {'$ref': '#/definitions/AllSortString'}
+
+ def __init__(self, *args, **kwds):
+ super(AllSortString, self).__init__(*args, **kwds)
+
+
+class EncodingSortField(Sort):
+ """EncodingSortField schema wrapper
+
+ Mapping(required=[])
+ A sort definition for sorting a discrete scale in an encoding field definition.
+
+ Attributes
+ ----------
+
+ field : :class:`Field`
+ The data `field <https://vega.github.io/vega-lite/docs/field.html>`__ to sort by.
+
+ **Default value:** If unspecified, defaults to the field specified in the outer data
+ reference.
+ op : :class:`NonArgAggregateOp`
+ An `aggregate operation
+ <https://vega.github.io/vega-lite/docs/aggregate.html#ops>`__ to perform on the
+ field prior to sorting (e.g., ``"count"``, ``"mean"`` and ``"median"`` ). An
+ aggregation is required when there are multiple values of the sort field for each
+ encoded data field. The input data objects will be aggregated, grouped by the
+ encoded data field.
+
+ For a full list of operations, please see the documentation for `aggregate
+ <https://vega.github.io/vega-lite/docs/aggregate.html#ops>`__.
+
+ **Default value:** ``"sum"`` for stacked plots. Otherwise, ``"min"``.
+ order : anyOf(:class:`SortOrder`, None)
+ The sort order. One of ``"ascending"`` (default), ``"descending"``, or ``null`` (no
+ not sort).
+ """
+ _schema = {'$ref': '#/definitions/EncodingSortField'}
+
+ def __init__(self, field=Undefined, op=Undefined, order=Undefined, **kwds):
+ super(EncodingSortField, self).__init__(field=field, op=op, order=order, **kwds)
+
+
+class SortArray(Sort):
+ """SortArray schema wrapper
+
+ anyOf(List(float), List(string), List(boolean), List(:class:`DateTime`))
+ """
+ _schema = {'$ref': '#/definitions/SortArray'}
+
+ def __init__(self, *args, **kwds):
+ super(SortArray, self).__init__(*args, **kwds)
+
+
+class SortByChannel(AllSortString):
+ """SortByChannel schema wrapper
+
+ enum('x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity',
+ 'strokeOpacity', 'opacity', 'text')
+ """
+ _schema = {'$ref': '#/definitions/SortByChannel'}
+
+ def __init__(self, *args):
+ super(SortByChannel, self).__init__(*args)
+
+
+class SortByChannelDesc(AllSortString):
+ """SortByChannelDesc schema wrapper
+
+ enum('-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape',
+ '-fillOpacity', '-strokeOpacity', '-opacity', '-text')
+ """
+ _schema = {'$ref': '#/definitions/SortByChannelDesc'}
+
+ def __init__(self, *args):
+ super(SortByChannelDesc, self).__init__(*args)
+
+
+class SortByEncoding(Sort):
+ """SortByEncoding schema wrapper
+
+ Mapping(required=[encoding])
+
+ Attributes
+ ----------
+
+ encoding : :class:`SortByChannel`
+ The `encoding channel
+ <https://vega.github.io/vega-lite/docs/encoding.html#channels>`__ to sort by (e.g.,
+ ``"x"``, ``"y"`` )
+ order : anyOf(:class:`SortOrder`, None)
+ The sort order. One of ``"ascending"`` (default), ``"descending"``, or ``null`` (no
+ not sort).
+ """
+ _schema = {'$ref': '#/definitions/SortByEncoding'}
+
+ def __init__(self, encoding=Undefined, order=Undefined, **kwds):
+ super(SortByEncoding, self).__init__(encoding=encoding, order=order, **kwds)
+
+
+class SortField(VegaLiteSchema):
+ """SortField schema wrapper
+
+ Mapping(required=[field])
+ A sort definition for transform
+
+ Attributes
+ ----------
+
+ field : :class:`FieldName`
+ The name of the field to sort.
+ order : anyOf(:class:`SortOrder`, None)
+ Whether to sort the field in ascending or descending order. One of ``"ascending"``
+ (default), ``"descending"``, or ``null`` (no not sort).
+ """
+ _schema = {'$ref': '#/definitions/SortField'}
+
+ def __init__(self, field=Undefined, order=Undefined, **kwds):
+ super(SortField, self).__init__(field=field, order=order, **kwds)
+
+
+class SortOrder(AllSortString):
+ """SortOrder schema wrapper
+
+ enum('ascending', 'descending')
+ """
+ _schema = {'$ref': '#/definitions/SortOrder'}
+
+ def __init__(self, *args):
+ super(SortOrder, self).__init__(*args)
+
+
+class Spec(VegaLiteSchema):
+ """Spec schema wrapper
+
+ anyOf(:class:`FacetedUnitSpec`, :class:`LayerSpec`, :class:`RepeatSpec`, :class:`FacetSpec`,
+ :class:`ConcatSpecGenericSpec`, :class:`VConcatSpecGenericSpec`,
+ :class:`HConcatSpecGenericSpec`)
+ Any specification in Vega-Lite.
+ """
+ _schema = {'$ref': '#/definitions/Spec'}
+
+ def __init__(self, *args, **kwds):
+ super(Spec, self).__init__(*args, **kwds)
+
+
+class ConcatSpecGenericSpec(Spec):
+ """ConcatSpecGenericSpec schema wrapper
+
+ Mapping(required=[concat])
+ Base interface for a generalized concatenation specification.
+
+ Attributes
+ ----------
+
+ concat : List(:class:`Spec`)
+ A list of views to be concatenated.
+ align : anyOf(:class:`LayoutAlign`, :class:`RowColLayoutAlign`)
+ The alignment to apply to grid rows and columns. The supported string values are
+ ``"all"``, ``"each"``, and ``"none"``.
+
+
+ * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply
+ placed one after the other. - For ``"each"``, subviews will be aligned into a
+ clean grid structure, but each row or column may be of variable size. - For
+ ``"all"``, subviews will be aligned and each row or column will be sized
+ identically based on the maximum observed size. String values for this property
+ will be applied to both grid rows and columns.
+
+ Alternatively, an object value of the form ``{"row": string, "column": string}`` can
+ be used to supply different alignments for rows and columns.
+
+ **Default value:** ``"all"``.
+ bounds : enum('full', 'flush')
+ The bounds calculation method to use for determining the extent of a sub-plot. One
+ of ``full`` (the default) or ``flush``.
+
+
+ * If set to ``full``, the entire calculated bounds (including axes, title, and
+ legend) will be used. - If set to ``flush``, only the specified width and height
+ values for the sub-view will be used. The ``flush`` setting can be useful when
+ attempting to place sub-plots without axes or legends into a uniform grid
+ structure.
+
+ **Default value:** ``"full"``
+ center : anyOf(boolean, :class:`RowColboolean`)
+ Boolean flag indicating if subviews should be centered relative to their respective
+ rows or columns.
+
+ An object value of the form ``{"row": boolean, "column": boolean}`` can be used to
+ supply different centering values for rows and columns.
+
+ **Default value:** ``false``
+ columns : float
+ The number of columns to include in the view composition layout.
+
+ **Default value** : ``undefined`` -- An infinite number of columns (a single row)
+ will be assumed. This is equivalent to ``hconcat`` (for ``concat`` ) and to using
+ the ``column`` channel (for ``facet`` and ``repeat`` ).
+
+ **Note** :
+
+ 1) This property is only for: - the general (wrappable) ``concat`` operator (not
+ ``hconcat`` / ``vconcat`` ) - the ``facet`` and ``repeat`` operator with one
+ field/repetition definition (without row/column nesting)
+
+ 2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat`` )
+ and to using the ``row`` channel (for ``facet`` and ``repeat`` ).
+ data : anyOf(:class:`Data`, None)
+ An object describing the data source. Set to ``null`` to ignore the parent's data
+ source. If no data is set, it is derived from the parent.
+ description : string
+ Description of this mark for commenting purpose.
+ name : string
+ Name of the visualization for later reference.
+ resolve : :class:`Resolve`
+ Scale, axis, and legend resolutions for view composition specifications.
+ spacing : anyOf(float, :class:`RowColnumber`)
+ The spacing in pixels between sub-views of the composition operator. An object of
+ the form ``{"row": number, "column": number}`` can be used to set different spacing
+ values for rows and columns.
+
+ **Default value** : Depends on ``"spacing"`` property of `the view composition
+ configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__ (
+ ``20`` by default)
+ title : anyOf(:class:`Text`, :class:`TitleParams`)
+ Title for the plot.
+ transform : List(:class:`Transform`)
+ An array of data transformations such as filter and new field calculation.
+ """
+ _schema = {'$ref': '#/definitions/ConcatSpec<GenericSpec>'}
+
+ def __init__(self, concat=Undefined, align=Undefined, bounds=Undefined, center=Undefined,
+ columns=Undefined, data=Undefined, description=Undefined, name=Undefined,
+ resolve=Undefined, spacing=Undefined, title=Undefined, transform=Undefined, **kwds):
+ super(ConcatSpecGenericSpec, self).__init__(concat=concat, align=align, bounds=bounds,
+ center=center, columns=columns, data=data,
+ description=description, name=name, resolve=resolve,
+ spacing=spacing, title=title, transform=transform,
+ **kwds)
+
+
+class FacetSpec(Spec):
+ """FacetSpec schema wrapper
+
+ Mapping(required=[facet, spec])
+ Base interface for a facet specification.
+
+ Attributes
+ ----------
+
+ facet : anyOf(:class:`FacetFieldDefFieldName`, :class:`FacetMappingFieldName`)
+ Definition for how to facet the data. One of: 1) `a field definition for faceting
+ the plot by one field
+ <https://vega.github.io/vega-lite/docs/facet.html#field-def>`__ 2) `An object that
+ maps row and column channels to their field definitions
+ <https://vega.github.io/vega-lite/docs/facet.html#mapping>`__
+ spec : anyOf(:class:`LayerSpec`, :class:`FacetedUnitSpec`)
+ A specification of the view that gets faceted.
+ align : anyOf(:class:`LayoutAlign`, :class:`RowColLayoutAlign`)
+ The alignment to apply to grid rows and columns. The supported string values are
+ ``"all"``, ``"each"``, and ``"none"``.
+
+
+ * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply
+ placed one after the other. - For ``"each"``, subviews will be aligned into a
+ clean grid structure, but each row or column may be of variable size. - For
+ ``"all"``, subviews will be aligned and each row or column will be sized
+ identically based on the maximum observed size. String values for this property
+ will be applied to both grid rows and columns.
+
+ Alternatively, an object value of the form ``{"row": string, "column": string}`` can
+ be used to supply different alignments for rows and columns.
+
+ **Default value:** ``"all"``.
+ bounds : enum('full', 'flush')
+ The bounds calculation method to use for determining the extent of a sub-plot. One
+ of ``full`` (the default) or ``flush``.
+
+
+ * If set to ``full``, the entire calculated bounds (including axes, title, and
+ legend) will be used. - If set to ``flush``, only the specified width and height
+ values for the sub-view will be used. The ``flush`` setting can be useful when
+ attempting to place sub-plots without axes or legends into a uniform grid
+ structure.
+
+ **Default value:** ``"full"``
+ center : anyOf(boolean, :class:`RowColboolean`)
+ Boolean flag indicating if subviews should be centered relative to their respective
+ rows or columns.
+
+ An object value of the form ``{"row": boolean, "column": boolean}`` can be used to
+ supply different centering values for rows and columns.
+
+ **Default value:** ``false``
+ columns : float
+ The number of columns to include in the view composition layout.
+
+ **Default value** : ``undefined`` -- An infinite number of columns (a single row)
+ will be assumed. This is equivalent to ``hconcat`` (for ``concat`` ) and to using
+ the ``column`` channel (for ``facet`` and ``repeat`` ).
+
+ **Note** :
+
+ 1) This property is only for: - the general (wrappable) ``concat`` operator (not
+ ``hconcat`` / ``vconcat`` ) - the ``facet`` and ``repeat`` operator with one
+ field/repetition definition (without row/column nesting)
+
+ 2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat`` )
+ and to using the ``row`` channel (for ``facet`` and ``repeat`` ).
+ data : anyOf(:class:`Data`, None)
+ An object describing the data source. Set to ``null`` to ignore the parent's data
+ source. If no data is set, it is derived from the parent.
+ description : string
+ Description of this mark for commenting purpose.
+ name : string
+ Name of the visualization for later reference.
+ resolve : :class:`Resolve`
+ Scale, axis, and legend resolutions for view composition specifications.
+ spacing : anyOf(float, :class:`RowColnumber`)
+ The spacing in pixels between sub-views of the composition operator. An object of
+ the form ``{"row": number, "column": number}`` can be used to set different spacing
+ values for rows and columns.
+
+ **Default value** : Depends on ``"spacing"`` property of `the view composition
+ configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__ (
+ ``20`` by default)
+ title : anyOf(:class:`Text`, :class:`TitleParams`)
+ Title for the plot.
+ transform : List(:class:`Transform`)
+ An array of data transformations such as filter and new field calculation.
+ """
+ _schema = {'$ref': '#/definitions/FacetSpec'}
+
+ def __init__(self, facet=Undefined, spec=Undefined, align=Undefined, bounds=Undefined,
+ center=Undefined, columns=Undefined, data=Undefined, description=Undefined,
+ name=Undefined, resolve=Undefined, spacing=Undefined, title=Undefined,
+ transform=Undefined, **kwds):
+ super(FacetSpec, self).__init__(facet=facet, spec=spec, align=align, bounds=bounds,
+ center=center, columns=columns, data=data,
+ description=description, name=name, resolve=resolve,
+ spacing=spacing, title=title, transform=transform, **kwds)
+
+
+class FacetedUnitSpec(NormalizedSpec, Spec):
+ """FacetedUnitSpec schema wrapper
+
+ Mapping(required=[mark])
+ Unit spec that can have a composite mark and row or column channels (shorthand for a facet
+ spec).
+
+ Attributes
+ ----------
+
+ mark : :class:`AnyMark`
+ A string describing the mark type (one of ``"bar"``, ``"circle"``, ``"square"``,
+ ``"tick"``, ``"line"``, ``"area"``, ``"point"``, ``"rule"``, ``"geoshape"``, and
+ ``"text"`` ) or a `mark definition object
+ <https://vega.github.io/vega-lite/docs/mark.html#mark-def>`__.
+ align : anyOf(:class:`LayoutAlign`, :class:`RowColLayoutAlign`)
+ The alignment to apply to grid rows and columns. The supported string values are
+ ``"all"``, ``"each"``, and ``"none"``.
+
+
+ * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply
+ placed one after the other. - For ``"each"``, subviews will be aligned into a
+ clean grid structure, but each row or column may be of variable size. - For
+ ``"all"``, subviews will be aligned and each row or column will be sized
+ identically based on the maximum observed size. String values for this property
+ will be applied to both grid rows and columns.
+
+ Alternatively, an object value of the form ``{"row": string, "column": string}`` can
+ be used to supply different alignments for rows and columns.
+
+ **Default value:** ``"all"``.
+ bounds : enum('full', 'flush')
+ The bounds calculation method to use for determining the extent of a sub-plot. One
+ of ``full`` (the default) or ``flush``.
+
+
+ * If set to ``full``, the entire calculated bounds (including axes, title, and
+ legend) will be used. - If set to ``flush``, only the specified width and height
+ values for the sub-view will be used. The ``flush`` setting can be useful when
+ attempting to place sub-plots without axes or legends into a uniform grid
+ structure.
+
+ **Default value:** ``"full"``
+ center : anyOf(boolean, :class:`RowColboolean`)
+ Boolean flag indicating if subviews should be centered relative to their respective
+ rows or columns.
+
+ An object value of the form ``{"row": boolean, "column": boolean}`` can be used to
+ supply different centering values for rows and columns.
+
+ **Default value:** ``false``
+ data : anyOf(:class:`Data`, None)
+ An object describing the data source. Set to ``null`` to ignore the parent's data
+ source. If no data is set, it is derived from the parent.
+ description : string
+ Description of this mark for commenting purpose.
+ encoding : :class:`FacetedEncoding`
+ A key-value mapping between encoding channels and definition of fields.
+ height : anyOf(float, string, :class:`Step`)
+ The height of a visualization.
+
+
+ * For a plot with a continuous y-field, height should be a number. - For a plot with
+ either a discrete y-field or no y-field, height can be either a number indicating
+ a fixed height or an object in the form of ``{step: number}`` defining the height
+ per discrete step. (No y-field is equivalent to having one discrete step.) - To
+ enable responsive sizing on height, it should be set to ``"container"``.
+
+ **Default value:** Based on ``config.view.continuousHeight`` for a plot with a
+ continuous y-field and ``config.view.discreteHeight`` otherwise.
+
+ **Note:** For plots with `row and column channels
+ <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the
+ height of a single view and the ``"container"`` option cannot be used.
+
+ **See also:** `height <https://vega.github.io/vega-lite/docs/size.html>`__
+ documentation.
+ name : string
+ Name of the visualization for later reference.
+ projection : :class:`Projection`
+ An object defining properties of geographic projection, which will be applied to
+ ``shape`` path for ``"geoshape"`` marks and to ``latitude`` and ``"longitude"``
+ channels for other marks.
+ resolve : :class:`Resolve`
+ Scale, axis, and legend resolutions for view composition specifications.
+ selection : Mapping(required=[])
+ A key-value mapping between selection names and definitions.
+ spacing : anyOf(float, :class:`RowColnumber`)
+ The spacing in pixels between sub-views of the composition operator. An object of
+ the form ``{"row": number, "column": number}`` can be used to set different spacing
+ values for rows and columns.
+
+ **Default value** : Depends on ``"spacing"`` property of `the view composition
+ configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__ (
+ ``20`` by default)
+ title : anyOf(:class:`Text`, :class:`TitleParams`)
+ Title for the plot.
+ transform : List(:class:`Transform`)
+ An array of data transformations such as filter and new field calculation.
+ view : :class:`ViewBackground`
+ An object defining the view background's fill and stroke.
+
+ **Default value:** none (transparent)
+ width : anyOf(float, string, :class:`Step`)
+ The width of a visualization.
+
+
+ * For a plot with a continuous x-field, width should be a number. - For a plot with
+ either a discrete x-field or no x-field, width can be either a number indicating a
+ fixed width or an object in the form of ``{step: number}`` defining the width per
+ discrete step. (No x-field is equivalent to having one discrete step.) - To enable
+ responsive sizing on width, it should be set to ``"container"``.
+
+ **Default value:** Based on ``config.view.continuousWidth`` for a plot with a
+ continuous x-field and ``config.view.discreteWidth`` otherwise.
+
+ **Note:** For plots with `row and column channels
+ <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the
+ width of a single view and the ``"container"`` option cannot be used.
+
+ **See also:** `width <https://vega.github.io/vega-lite/docs/size.html>`__
+ documentation.
+ """
+ _schema = {'$ref': '#/definitions/FacetedUnitSpec'}
+
+ def __init__(self, mark=Undefined, align=Undefined, bounds=Undefined, center=Undefined,
+ data=Undefined, description=Undefined, encoding=Undefined, height=Undefined,
+ name=Undefined, projection=Undefined, resolve=Undefined, selection=Undefined,
+ spacing=Undefined, title=Undefined, transform=Undefined, view=Undefined,
+ width=Undefined, **kwds):
+ super(FacetedUnitSpec, self).__init__(mark=mark, align=align, bounds=bounds, center=center,
+ data=data, description=description, encoding=encoding,
+ height=height, name=name, projection=projection,
+ resolve=resolve, selection=selection, spacing=spacing,
+ title=title, transform=transform, view=view, width=width,
+ **kwds)
+
+
+class HConcatSpecGenericSpec(Spec):
+ """HConcatSpecGenericSpec schema wrapper
+
+ Mapping(required=[hconcat])
+ Base interface for a horizontal concatenation specification.
+
+ Attributes
+ ----------
+
+ hconcat : List(:class:`Spec`)
+ A list of views to be concatenated and put into a row.
+ bounds : enum('full', 'flush')
+ The bounds calculation method to use for determining the extent of a sub-plot. One
+ of ``full`` (the default) or ``flush``.
+
+
+ * If set to ``full``, the entire calculated bounds (including axes, title, and
+ legend) will be used. - If set to ``flush``, only the specified width and height
+ values for the sub-view will be used. The ``flush`` setting can be useful when
+ attempting to place sub-plots without axes or legends into a uniform grid
+ structure.
+
+ **Default value:** ``"full"``
+ center : boolean
+ Boolean flag indicating if subviews should be centered relative to their respective
+ rows or columns.
+
+ **Default value:** ``false``
+ data : anyOf(:class:`Data`, None)
+ An object describing the data source. Set to ``null`` to ignore the parent's data
+ source. If no data is set, it is derived from the parent.
+ description : string
+ Description of this mark for commenting purpose.
+ name : string
+ Name of the visualization for later reference.
+ resolve : :class:`Resolve`
+ Scale, axis, and legend resolutions for view composition specifications.
+ spacing : float
+ The spacing in pixels between sub-views of the concat operator.
+
+ **Default value** : ``10``
+ title : anyOf(:class:`Text`, :class:`TitleParams`)
+ Title for the plot.
+ transform : List(:class:`Transform`)
+ An array of data transformations such as filter and new field calculation.
+ """
+ _schema = {'$ref': '#/definitions/HConcatSpec<GenericSpec>'}
+
+ def __init__(self, hconcat=Undefined, bounds=Undefined, center=Undefined, data=Undefined,
+ description=Undefined, name=Undefined, resolve=Undefined, spacing=Undefined,
+ title=Undefined, transform=Undefined, **kwds):
+ super(HConcatSpecGenericSpec, self).__init__(hconcat=hconcat, bounds=bounds, center=center,
+ data=data, description=description, name=name,
+ resolve=resolve, spacing=spacing, title=title,
+ transform=transform, **kwds)
+
+
+class LayerSpec(NormalizedSpec, Spec):
+ """LayerSpec schema wrapper
+
+ Mapping(required=[layer])
+ A full layered plot specification, which may contains ``encoding`` and ``projection``
+ properties that will be applied to underlying unit (single-view) specifications.
+
+ Attributes
+ ----------
+
+ layer : List(anyOf(:class:`LayerSpec`, :class:`UnitSpec`))
+ Layer or single view specifications to be layered.
+
+ **Note** : Specifications inside ``layer`` cannot use ``row`` and ``column``
+ channels as layering facet specifications is not allowed. Instead, use the `facet
+ operator <https://vega.github.io/vega-lite/docs/facet.html>`__ and place a layer
+ inside a facet.
+ data : anyOf(:class:`Data`, None)
+ An object describing the data source. Set to ``null`` to ignore the parent's data
+ source. If no data is set, it is derived from the parent.
+ description : string
+ Description of this mark for commenting purpose.
+ encoding : :class:`SharedEncoding`
+ A shared key-value mapping between encoding channels and definition of fields in the
+ underlying layers.
+ height : anyOf(float, string, :class:`Step`)
+ The height of a visualization.
+
+
+ * For a plot with a continuous y-field, height should be a number. - For a plot with
+ either a discrete y-field or no y-field, height can be either a number indicating
+ a fixed height or an object in the form of ``{step: number}`` defining the height
+ per discrete step. (No y-field is equivalent to having one discrete step.) - To
+ enable responsive sizing on height, it should be set to ``"container"``.
+
+ **Default value:** Based on ``config.view.continuousHeight`` for a plot with a
+ continuous y-field and ``config.view.discreteHeight`` otherwise.
+
+ **Note:** For plots with `row and column channels
+ <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the
+ height of a single view and the ``"container"`` option cannot be used.
+
+ **See also:** `height <https://vega.github.io/vega-lite/docs/size.html>`__
+ documentation.
+ name : string
+ Name of the visualization for later reference.
+ projection : :class:`Projection`
+ An object defining properties of the geographic projection shared by underlying
+ layers.
+ resolve : :class:`Resolve`
+ Scale, axis, and legend resolutions for view composition specifications.
+ title : anyOf(:class:`Text`, :class:`TitleParams`)
+ Title for the plot.
+ transform : List(:class:`Transform`)
+ An array of data transformations such as filter and new field calculation.
+ view : :class:`ViewBackground`
+ An object defining the view background's fill and stroke.
+
+ **Default value:** none (transparent)
+ width : anyOf(float, string, :class:`Step`)
+ The width of a visualization.
+
+
+ * For a plot with a continuous x-field, width should be a number. - For a plot with
+ either a discrete x-field or no x-field, width can be either a number indicating a
+ fixed width or an object in the form of ``{step: number}`` defining the width per
+ discrete step. (No x-field is equivalent to having one discrete step.) - To enable
+ responsive sizing on width, it should be set to ``"container"``.
+
+ **Default value:** Based on ``config.view.continuousWidth`` for a plot with a
+ continuous x-field and ``config.view.discreteWidth`` otherwise.
+
+ **Note:** For plots with `row and column channels
+ <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the
+ width of a single view and the ``"container"`` option cannot be used.
+
+ **See also:** `width <https://vega.github.io/vega-lite/docs/size.html>`__
+ documentation.
+ """
+ _schema = {'$ref': '#/definitions/LayerSpec'}
+
+ def __init__(self, layer=Undefined, data=Undefined, description=Undefined, encoding=Undefined,
+ height=Undefined, name=Undefined, projection=Undefined, resolve=Undefined,
+ title=Undefined, transform=Undefined, view=Undefined, width=Undefined, **kwds):
+ super(LayerSpec, self).__init__(layer=layer, data=data, description=description,
+ encoding=encoding, height=height, name=name,
+ projection=projection, resolve=resolve, title=title,
+ transform=transform, view=view, width=width, **kwds)
+
+
+class RepeatSpec(NormalizedSpec, Spec):
+ """RepeatSpec schema wrapper
+
+ anyOf(:class:`NonLayerRepeatSpec`, :class:`LayerRepeatSpec`)
+ """
+ _schema = {'$ref': '#/definitions/RepeatSpec'}
+
+ def __init__(self, *args, **kwds):
+ super(RepeatSpec, self).__init__(*args, **kwds)
+
+
+class LayerRepeatSpec(RepeatSpec):
+ """LayerRepeatSpec schema wrapper
+
+ Mapping(required=[repeat, spec])
+
+ Attributes
+ ----------
+
+ repeat : :class:`LayerRepeatMapping`
+ Definition for fields to be repeated. One of: 1) An array of fields to be repeated.
+ If ``"repeat"`` is an array, the field can be referred to as ``{"repeat":
+ "repeat"}``. The repeated views are laid out in a wrapped row. You can set the
+ number of columns to control the wrapping. 2) An object that maps ``"row"`` and/or
+ ``"column"`` to the listed fields to be repeated along the particular orientations.
+ The objects ``{"repeat": "row"}`` and ``{"repeat": "column"}`` can be used to refer
+ to the repeated field respectively.
+ spec : anyOf(:class:`LayerSpec`, :class:`UnitSpec`)
+ A specification of the view that gets repeated.
+ align : anyOf(:class:`LayoutAlign`, :class:`RowColLayoutAlign`)
+ The alignment to apply to grid rows and columns. The supported string values are
+ ``"all"``, ``"each"``, and ``"none"``.
+
+
+ * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply
+ placed one after the other. - For ``"each"``, subviews will be aligned into a
+ clean grid structure, but each row or column may be of variable size. - For
+ ``"all"``, subviews will be aligned and each row or column will be sized
+ identically based on the maximum observed size. String values for this property
+ will be applied to both grid rows and columns.
+
+ Alternatively, an object value of the form ``{"row": string, "column": string}`` can
+ be used to supply different alignments for rows and columns.
+
+ **Default value:** ``"all"``.
+ bounds : enum('full', 'flush')
+ The bounds calculation method to use for determining the extent of a sub-plot. One
+ of ``full`` (the default) or ``flush``.
+
+
+ * If set to ``full``, the entire calculated bounds (including axes, title, and
+ legend) will be used. - If set to ``flush``, only the specified width and height
+ values for the sub-view will be used. The ``flush`` setting can be useful when
+ attempting to place sub-plots without axes or legends into a uniform grid
+ structure.
+
+ **Default value:** ``"full"``
+ center : anyOf(boolean, :class:`RowColboolean`)
+ Boolean flag indicating if subviews should be centered relative to their respective
+ rows or columns.
+
+ An object value of the form ``{"row": boolean, "column": boolean}`` can be used to
+ supply different centering values for rows and columns.
+
+ **Default value:** ``false``
+ columns : float
+ The number of columns to include in the view composition layout.
+
+ **Default value** : ``undefined`` -- An infinite number of columns (a single row)
+ will be assumed. This is equivalent to ``hconcat`` (for ``concat`` ) and to using
+ the ``column`` channel (for ``facet`` and ``repeat`` ).
+
+ **Note** :
+
+ 1) This property is only for: - the general (wrappable) ``concat`` operator (not
+ ``hconcat`` / ``vconcat`` ) - the ``facet`` and ``repeat`` operator with one
+ field/repetition definition (without row/column nesting)
+
+ 2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat`` )
+ and to using the ``row`` channel (for ``facet`` and ``repeat`` ).
+ data : anyOf(:class:`Data`, None)
+ An object describing the data source. Set to ``null`` to ignore the parent's data
+ source. If no data is set, it is derived from the parent.
+ description : string
+ Description of this mark for commenting purpose.
+ name : string
+ Name of the visualization for later reference.
+ resolve : :class:`Resolve`
+ Scale, axis, and legend resolutions for view composition specifications.
+ spacing : anyOf(float, :class:`RowColnumber`)
+ The spacing in pixels between sub-views of the composition operator. An object of
+ the form ``{"row": number, "column": number}`` can be used to set different spacing
+ values for rows and columns.
+
+ **Default value** : Depends on ``"spacing"`` property of `the view composition
+ configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__ (
+ ``20`` by default)
+ title : anyOf(:class:`Text`, :class:`TitleParams`)
+ Title for the plot.
+ transform : List(:class:`Transform`)
+ An array of data transformations such as filter and new field calculation.
+ """
+ _schema = {'$ref': '#/definitions/LayerRepeatSpec'}
+
+ def __init__(self, repeat=Undefined, spec=Undefined, align=Undefined, bounds=Undefined,
+ center=Undefined, columns=Undefined, data=Undefined, description=Undefined,
+ name=Undefined, resolve=Undefined, spacing=Undefined, title=Undefined,
+ transform=Undefined, **kwds):
+ super(LayerRepeatSpec, self).__init__(repeat=repeat, spec=spec, align=align, bounds=bounds,
+ center=center, columns=columns, data=data,
+ description=description, name=name, resolve=resolve,
+ spacing=spacing, title=title, transform=transform, **kwds)
+
+
+class NonLayerRepeatSpec(RepeatSpec):
+ """NonLayerRepeatSpec schema wrapper
+
+ Mapping(required=[repeat, spec])
+ Base interface for a repeat specification.
+
+ Attributes
+ ----------
+
+ repeat : anyOf(List(string), :class:`RepeatMapping`)
+ Definition for fields to be repeated. One of: 1) An array of fields to be repeated.
+ If ``"repeat"`` is an array, the field can be referred to as ``{"repeat":
+ "repeat"}``. The repeated views are laid out in a wrapped row. You can set the
+ number of columns to control the wrapping. 2) An object that maps ``"row"`` and/or
+ ``"column"`` to the listed fields to be repeated along the particular orientations.
+ The objects ``{"repeat": "row"}`` and ``{"repeat": "column"}`` can be used to refer
+ to the repeated field respectively.
+ spec : :class:`Spec`
+ A specification of the view that gets repeated.
+ align : anyOf(:class:`LayoutAlign`, :class:`RowColLayoutAlign`)
+ The alignment to apply to grid rows and columns. The supported string values are
+ ``"all"``, ``"each"``, and ``"none"``.
+
+
+ * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply
+ placed one after the other. - For ``"each"``, subviews will be aligned into a
+ clean grid structure, but each row or column may be of variable size. - For
+ ``"all"``, subviews will be aligned and each row or column will be sized
+ identically based on the maximum observed size. String values for this property
+ will be applied to both grid rows and columns.
+
+ Alternatively, an object value of the form ``{"row": string, "column": string}`` can
+ be used to supply different alignments for rows and columns.
+
+ **Default value:** ``"all"``.
+ bounds : enum('full', 'flush')
+ The bounds calculation method to use for determining the extent of a sub-plot. One
+ of ``full`` (the default) or ``flush``.
+
+
+ * If set to ``full``, the entire calculated bounds (including axes, title, and
+ legend) will be used. - If set to ``flush``, only the specified width and height
+ values for the sub-view will be used. The ``flush`` setting can be useful when
+ attempting to place sub-plots without axes or legends into a uniform grid
+ structure.
+
+ **Default value:** ``"full"``
+ center : anyOf(boolean, :class:`RowColboolean`)
+ Boolean flag indicating if subviews should be centered relative to their respective
+ rows or columns.
+
+ An object value of the form ``{"row": boolean, "column": boolean}`` can be used to
+ supply different centering values for rows and columns.
+
+ **Default value:** ``false``
+ columns : float
+ The number of columns to include in the view composition layout.
+
+ **Default value** : ``undefined`` -- An infinite number of columns (a single row)
+ will be assumed. This is equivalent to ``hconcat`` (for ``concat`` ) and to using
+ the ``column`` channel (for ``facet`` and ``repeat`` ).
+
+ **Note** :
+
+ 1) This property is only for: - the general (wrappable) ``concat`` operator (not
+ ``hconcat`` / ``vconcat`` ) - the ``facet`` and ``repeat`` operator with one
+ field/repetition definition (without row/column nesting)
+
+ 2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat`` )
+ and to using the ``row`` channel (for ``facet`` and ``repeat`` ).
+ data : anyOf(:class:`Data`, None)
+ An object describing the data source. Set to ``null`` to ignore the parent's data
+ source. If no data is set, it is derived from the parent.
+ description : string
+ Description of this mark for commenting purpose.
+ name : string
+ Name of the visualization for later reference.
+ resolve : :class:`Resolve`
+ Scale, axis, and legend resolutions for view composition specifications.
+ spacing : anyOf(float, :class:`RowColnumber`)
+ The spacing in pixels between sub-views of the composition operator. An object of
+ the form ``{"row": number, "column": number}`` can be used to set different spacing
+ values for rows and columns.
+
+ **Default value** : Depends on ``"spacing"`` property of `the view composition
+ configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__ (
+ ``20`` by default)
+ title : anyOf(:class:`Text`, :class:`TitleParams`)
+ Title for the plot.
+ transform : List(:class:`Transform`)
+ An array of data transformations such as filter and new field calculation.
+ """
+ _schema = {'$ref': '#/definitions/NonLayerRepeatSpec'}
+
+ def __init__(self, repeat=Undefined, spec=Undefined, align=Undefined, bounds=Undefined,
+ center=Undefined, columns=Undefined, data=Undefined, description=Undefined,
+ name=Undefined, resolve=Undefined, spacing=Undefined, title=Undefined,
+ transform=Undefined, **kwds):
+ super(NonLayerRepeatSpec, self).__init__(repeat=repeat, spec=spec, align=align, bounds=bounds,
+ center=center, columns=columns, data=data,
+ description=description, name=name, resolve=resolve,
+ spacing=spacing, title=title, transform=transform,
+ **kwds)
+
+
+class SphereGenerator(Generator):
+ """SphereGenerator schema wrapper
+
+ Mapping(required=[sphere])
+
+ Attributes
+ ----------
+
+ sphere : anyOf(boolean, Mapping(required=[]))
+ Generate sphere GeoJSON data for the full globe.
+ name : string
+ Provide a placeholder name and bind data at runtime.
+ """
+ _schema = {'$ref': '#/definitions/SphereGenerator'}
+
+ def __init__(self, sphere=Undefined, name=Undefined, **kwds):
+ super(SphereGenerator, self).__init__(sphere=sphere, name=name, **kwds)
+
+
+class StackOffset(VegaLiteSchema):
+ """StackOffset schema wrapper
+
+ enum('zero', 'center', 'normalize')
+ """
+ _schema = {'$ref': '#/definitions/StackOffset'}
+
+ def __init__(self, *args):
+ super(StackOffset, self).__init__(*args)
+
+
+class StandardType(VegaLiteSchema):
+ """StandardType schema wrapper
+
+ enum('quantitative', 'ordinal', 'temporal', 'nominal')
+ """
+ _schema = {'$ref': '#/definitions/StandardType'}
+
+ def __init__(self, *args):
+ super(StandardType, self).__init__(*args)
+
+
+class Step(VegaLiteSchema):
+ """Step schema wrapper
+
+ Mapping(required=[step])
+
+ Attributes
+ ----------
+
+ step : float
+ The size (width/height) per discrete step.
+ """
+ _schema = {'$ref': '#/definitions/Step'}
+
+ def __init__(self, step=Undefined, **kwds):
+ super(Step, self).__init__(step=step, **kwds)
+
+
+class Stream(VegaLiteSchema):
+ """Stream schema wrapper
+
+ anyOf(:class:`EventStream`, :class:`DerivedStream`, :class:`MergedStream`)
+ """
+ _schema = {'$ref': '#/definitions/Stream'}
+
+ def __init__(self, *args, **kwds):
+ super(Stream, self).__init__(*args, **kwds)
+
+
+class DerivedStream(Stream):
+ """DerivedStream schema wrapper
+
+ Mapping(required=[stream])
+
+ Attributes
+ ----------
+
+ stream : :class:`Stream`
+
+ between : List(:class:`Stream`)
+
+ consume : boolean
+
+ debounce : float
+
+ filter : anyOf(:class:`Expr`, List(:class:`Expr`))
+
+ markname : string
+
+ marktype : :class:`MarkType`
+
+ throttle : float
+
+ """
+ _schema = {'$ref': '#/definitions/DerivedStream'}
+
+ def __init__(self, stream=Undefined, between=Undefined, consume=Undefined, debounce=Undefined,
+ filter=Undefined, markname=Undefined, marktype=Undefined, throttle=Undefined, **kwds):
+ super(DerivedStream, self).__init__(stream=stream, between=between, consume=consume,
+ debounce=debounce, filter=filter, markname=markname,
+ marktype=marktype, throttle=throttle, **kwds)
+
+
+class EventStream(Stream):
+ """EventStream schema wrapper
+
+ anyOf(Mapping(required=[type]), Mapping(required=[source, type]))
+ """
+ _schema = {'$ref': '#/definitions/EventStream'}
+
+ def __init__(self, *args, **kwds):
+ super(EventStream, self).__init__(*args, **kwds)
+
+
+class MergedStream(Stream):
+ """MergedStream schema wrapper
+
+ Mapping(required=[merge])
+
+ Attributes
+ ----------
+
+ merge : List(:class:`Stream`)
+
+ between : List(:class:`Stream`)
+
+ consume : boolean
+
+ debounce : float
+
+ filter : anyOf(:class:`Expr`, List(:class:`Expr`))
+
+ markname : string
+
+ marktype : :class:`MarkType`
+
+ throttle : float
+
+ """
+ _schema = {'$ref': '#/definitions/MergedStream'}
+
+ def __init__(self, merge=Undefined, between=Undefined, consume=Undefined, debounce=Undefined,
+ filter=Undefined, markname=Undefined, marktype=Undefined, throttle=Undefined, **kwds):
+ super(MergedStream, self).__init__(merge=merge, between=between, consume=consume,
+ debounce=debounce, filter=filter, markname=markname,
+ marktype=marktype, throttle=throttle, **kwds)
+
+
+class StringFieldDef(VegaLiteSchema):
+ """StringFieldDef schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : anyOf(boolean, :class:`BinParams`, string, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ format : anyOf(string, :class:`Dictunknown`)
+ When used with the default ``"number"`` and ``"time"`` format type, the text
+ formatting pattern for labels of guides (axes, legends, headers) and text marks.
+
+
+ * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
+ `number format pattern <https://github.com/d3/d3-format#locale_format>`__. - If
+ the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
+ format pattern <https://github.com/d3/d3-time-format#locale_format>`__.
+
+ See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
+ for more examples.
+
+ When used with a `custom formatType
+ <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this
+ value will be passed as ``format`` alongside ``datum.value`` to the registered
+ function.
+
+ **Default value:** Derived from `numberFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
+ format and from `timeFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
+ format.
+ formatType : string
+ The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom
+ format type
+ <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.
+
+ **Default value:** - ``"time"`` for temporal fields and ordinal and nominal fields
+ with ``timeUnit``. - ``"number"`` for quantitative fields as well as ordinal and
+ nominal fields without ``timeUnit``.
+ labelExpr : string
+ `Vega expression <https://vega.github.io/vega/docs/expressions/>`__ for customizing
+ labels text.
+
+ **Note:** The label text and value can be assessed via the ``label`` and ``value``
+ properties of the axis's backing ``datum`` object.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _schema = {'$ref': '#/definitions/StringFieldDef'}
+
+ def __init__(self, aggregate=Undefined, band=Undefined, bin=Undefined, field=Undefined,
+ format=Undefined, formatType=Undefined, labelExpr=Undefined, timeUnit=Undefined,
+ title=Undefined, type=Undefined, **kwds):
+ super(StringFieldDef, self).__init__(aggregate=aggregate, band=band, bin=bin, field=field,
+ format=format, formatType=formatType, labelExpr=labelExpr,
+ timeUnit=timeUnit, title=title, type=type, **kwds)
+
+
+class StringFieldDefWithCondition(VegaLiteSchema):
+ """StringFieldDefWithCondition schema wrapper
+
+ Mapping(required=[])
+ A FieldDef with Condition :raw-html:`<ValueDef>` { condition: {value: ...}, field:
+ ..., ... }
+
+ Attributes
+ ----------
+
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : anyOf(boolean, :class:`BinParams`, string, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ condition : anyOf(:class:`ConditionalValueDefstringExprRef`,
+ List(:class:`ConditionalValueDefstringExprRef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ format : anyOf(string, :class:`Dictunknown`)
+ When used with the default ``"number"`` and ``"time"`` format type, the text
+ formatting pattern for labels of guides (axes, legends, headers) and text marks.
+
+
+ * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
+ `number format pattern <https://github.com/d3/d3-format#locale_format>`__. - If
+ the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
+ format pattern <https://github.com/d3/d3-time-format#locale_format>`__.
+
+ See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
+ for more examples.
+
+ When used with a `custom formatType
+ <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this
+ value will be passed as ``format`` alongside ``datum.value`` to the registered
+ function.
+
+ **Default value:** Derived from `numberFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
+ format and from `timeFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
+ format.
+ formatType : string
+ The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom
+ format type
+ <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.
+
+ **Default value:** - ``"time"`` for temporal fields and ordinal and nominal fields
+ with ``timeUnit``. - ``"number"`` for quantitative fields as well as ordinal and
+ nominal fields without ``timeUnit``.
+ labelExpr : string
+ `Vega expression <https://vega.github.io/vega/docs/expressions/>`__ for customizing
+ labels text.
+
+ **Note:** The label text and value can be assessed via the ``label`` and ``value``
+ properties of the axis's backing ``datum`` object.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _schema = {'$ref': '#/definitions/StringFieldDefWithCondition'}
+
+ def __init__(self, aggregate=Undefined, band=Undefined, bin=Undefined, condition=Undefined,
+ field=Undefined, format=Undefined, formatType=Undefined, labelExpr=Undefined,
+ timeUnit=Undefined, title=Undefined, type=Undefined, **kwds):
+ super(StringFieldDefWithCondition, self).__init__(aggregate=aggregate, band=band, bin=bin,
+ condition=condition, field=field,
+ format=format, formatType=formatType,
+ labelExpr=labelExpr, timeUnit=timeUnit,
+ title=title, type=type, **kwds)
+
+
+class StringValueDefWithCondition(VegaLiteSchema):
+ """StringValueDefWithCondition schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ condition : anyOf(:class:`ConditionalMarkPropFieldOrDatumDef`,
+ :class:`ConditionalValueDefstringnullExprRef`,
+ List(:class:`ConditionalValueDefstringnullExprRef`))
+ A field definition or one or more value definition(s) with a selection predicate.
+ value : anyOf(string, None, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _schema = {'$ref': '#/definitions/StringValueDefWithCondition'}
+
+ def __init__(self, condition=Undefined, value=Undefined, **kwds):
+ super(StringValueDefWithCondition, self).__init__(condition=condition, value=value, **kwds)
+
+
+class StrokeCap(VegaLiteSchema):
+ """StrokeCap schema wrapper
+
+ enum('butt', 'round', 'square')
+ """
+ _schema = {'$ref': '#/definitions/StrokeCap'}
+
+ def __init__(self, *args):
+ super(StrokeCap, self).__init__(*args)
+
+
+class StrokeJoin(VegaLiteSchema):
+ """StrokeJoin schema wrapper
+
+ enum('miter', 'round', 'bevel')
+ """
+ _schema = {'$ref': '#/definitions/StrokeJoin'}
+
+ def __init__(self, *args):
+ super(StrokeJoin, self).__init__(*args)
+
+
+class StyleConfigIndex(VegaLiteSchema):
+ """StyleConfigIndex schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ arc : :class:`RectConfig`
+ Arc-specific Config
+ area : :class:`AreaConfig`
+ Area-Specific Config
+ bar : :class:`BarConfig`
+ Bar-Specific Config
+ circle : :class:`MarkConfig`
+ Circle-Specific Config
+ geoshape : :class:`MarkConfig`
+ Geoshape-Specific Config
+ image : :class:`RectConfig`
+ Image-specific Config
+ line : :class:`LineConfig`
+ Line-Specific Config
+ mark : :class:`MarkConfig`
+ Mark Config
+ point : :class:`MarkConfig`
+ Point-Specific Config
+ rect : :class:`RectConfig`
+ Rect-Specific Config
+ rule : :class:`MarkConfig`
+ Rule-Specific Config
+ square : :class:`MarkConfig`
+ Square-Specific Config
+ text : :class:`MarkConfig`
+ Text-Specific Config
+ tick : :class:`TickConfig`
+ Tick-Specific Config
+ trail : :class:`LineConfig`
+ Trail-Specific Config
+ group-subtitle : :class:`MarkConfig`
+ Default style for chart subtitles
+ group-title : :class:`MarkConfig`
+ Default style for chart titles
+ guide-label : :class:`MarkConfig`
+ Default style for axis, legend, and header labels.
+ guide-title : :class:`MarkConfig`
+ Default style for axis, legend, and header titles.
+ """
+ _schema = {'$ref': '#/definitions/StyleConfigIndex'}
+
+ def __init__(self, arc=Undefined, area=Undefined, bar=Undefined, circle=Undefined,
+ geoshape=Undefined, image=Undefined, line=Undefined, mark=Undefined, point=Undefined,
+ rect=Undefined, rule=Undefined, square=Undefined, text=Undefined, tick=Undefined,
+ trail=Undefined, **kwds):
+ super(StyleConfigIndex, self).__init__(arc=arc, area=area, bar=bar, circle=circle,
+ geoshape=geoshape, image=image, line=line, mark=mark,
+ point=point, rect=rect, rule=rule, square=square,
+ text=text, tick=tick, trail=trail, **kwds)
+
+
+class SymbolShape(VegaLiteSchema):
+ """SymbolShape schema wrapper
+
+ string
+ """
+ _schema = {'$ref': '#/definitions/SymbolShape'}
+
+ def __init__(self, *args):
+ super(SymbolShape, self).__init__(*args)
+
+
+class Text(VegaLiteSchema):
+ """Text schema wrapper
+
+ anyOf(string, List(string))
+ """
+ _schema = {'$ref': '#/definitions/Text'}
+
+ def __init__(self, *args, **kwds):
+ super(Text, self).__init__(*args, **kwds)
+
+
+class TextBaseline(VegaLiteSchema):
+ """TextBaseline schema wrapper
+
+ anyOf(string, :class:`Baseline`, string, string)
+ """
+ _schema = {'$ref': '#/definitions/TextBaseline'}
+
+ def __init__(self, *args, **kwds):
+ super(TextBaseline, self).__init__(*args, **kwds)
+
+
+class Baseline(TextBaseline):
+ """Baseline schema wrapper
+
+ enum('top', 'middle', 'bottom')
+ """
+ _schema = {'$ref': '#/definitions/Baseline'}
+
+ def __init__(self, *args):
+ super(Baseline, self).__init__(*args)
+
+
+class TextDef(VegaLiteSchema):
+ """TextDef schema wrapper
+
+ anyOf(:class:`FieldOrDatumDefWithConditionStringFieldDefText`,
+ :class:`FieldOrDatumDefWithConditionStringDatumDefText`,
+ :class:`ValueDefWithConditionStringFieldDefText`)
+ """
+ _schema = {'$ref': '#/definitions/TextDef'}
+
+ def __init__(self, *args, **kwds):
+ super(TextDef, self).__init__(*args, **kwds)
+
+
+class FieldOrDatumDefWithConditionStringDatumDefText(TextDef):
+ """FieldOrDatumDefWithConditionStringDatumDefText schema wrapper
+
+ Mapping(required=[])
+ A FieldDef with Condition :raw-html:`<ValueDef>` { condition: {value: ...}, field:
+ ..., ... }
+
+ Attributes
+ ----------
+
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ condition : anyOf(:class:`ConditionalValueDefTextExprRef`,
+ List(:class:`ConditionalValueDefTextExprRef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ datum : anyOf(:class:`PrimitiveValue`, :class:`DateTime`, :class:`ExprRef`,
+ :class:`RepeatRef`)
+ A constant value in data domain.
+ format : anyOf(string, :class:`Dictunknown`)
+ When used with the default ``"number"`` and ``"time"`` format type, the text
+ formatting pattern for labels of guides (axes, legends, headers) and text marks.
+
+
+ * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
+ `number format pattern <https://github.com/d3/d3-format#locale_format>`__. - If
+ the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
+ format pattern <https://github.com/d3/d3-time-format#locale_format>`__.
+
+ See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
+ for more examples.
+
+ When used with a `custom formatType
+ <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this
+ value will be passed as ``format`` alongside ``datum.value`` to the registered
+ function.
+
+ **Default value:** Derived from `numberFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
+ format and from `timeFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
+ format.
+ formatType : string
+ The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom
+ format type
+ <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.
+
+ **Default value:** - ``"time"`` for temporal fields and ordinal and nominal fields
+ with ``timeUnit``. - ``"number"`` for quantitative fields as well as ordinal and
+ nominal fields without ``timeUnit``.
+ labelExpr : string
+ `Vega expression <https://vega.github.io/vega/docs/expressions/>`__ for customizing
+ labels text.
+
+ **Note:** The label text and value can be assessed via the ``label`` and ``value``
+ properties of the axis's backing ``datum`` object.
+ type : :class:`Type`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _schema = {'$ref': '#/definitions/FieldOrDatumDefWithCondition<StringDatumDef,Text>'}
+
+ def __init__(self, band=Undefined, condition=Undefined, datum=Undefined, format=Undefined,
+ formatType=Undefined, labelExpr=Undefined, type=Undefined, **kwds):
+ super(FieldOrDatumDefWithConditionStringDatumDefText, self).__init__(band=band,
+ condition=condition,
+ datum=datum, format=format,
+ formatType=formatType,
+ labelExpr=labelExpr,
+ type=type, **kwds)
+
+
+class FieldOrDatumDefWithConditionStringFieldDefText(TextDef):
+ """FieldOrDatumDefWithConditionStringFieldDefText schema wrapper
+
+ Mapping(required=[])
+ A FieldDef with Condition :raw-html:`<ValueDef>` { condition: {value: ...}, field:
+ ..., ... }
+
+ Attributes
+ ----------
+
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : anyOf(boolean, :class:`BinParams`, string, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ condition : anyOf(:class:`ConditionalValueDefTextExprRef`,
+ List(:class:`ConditionalValueDefTextExprRef`))
+ One or more value definition(s) with `a selection or a test predicate
+ <https://vega.github.io/vega-lite/docs/condition.html>`__.
+
+ **Note:** A field definition's ``condition`` property can only contain `conditional
+ value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
+ since Vega-Lite only allows at most one encoded field per encoding channel.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ format : anyOf(string, :class:`Dictunknown`)
+ When used with the default ``"number"`` and ``"time"`` format type, the text
+ formatting pattern for labels of guides (axes, legends, headers) and text marks.
+
+
+ * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
+ `number format pattern <https://github.com/d3/d3-format#locale_format>`__. - If
+ the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
+ format pattern <https://github.com/d3/d3-time-format#locale_format>`__.
+
+ See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
+ for more examples.
+
+ When used with a `custom formatType
+ <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this
+ value will be passed as ``format`` alongside ``datum.value`` to the registered
+ function.
+
+ **Default value:** Derived from `numberFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
+ format and from `timeFormat
+ <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
+ format.
+ formatType : string
+ The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom
+ format type
+ <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.
+
+ **Default value:** - ``"time"`` for temporal fields and ordinal and nominal fields
+ with ``timeUnit``. - ``"number"`` for quantitative fields as well as ordinal and
+ nominal fields without ``timeUnit``.
+ labelExpr : string
+ `Vega expression <https://vega.github.io/vega/docs/expressions/>`__ for customizing
+ labels text.
+
+ **Note:** The label text and value can be assessed via the ``label`` and ``value``
+ properties of the axis's backing ``datum`` object.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _schema = {'$ref': '#/definitions/FieldOrDatumDefWithCondition<StringFieldDef,Text>'}
+
+ def __init__(self, aggregate=Undefined, band=Undefined, bin=Undefined, condition=Undefined,
+ field=Undefined, format=Undefined, formatType=Undefined, labelExpr=Undefined,
+ timeUnit=Undefined, title=Undefined, type=Undefined, **kwds):
+ super(FieldOrDatumDefWithConditionStringFieldDefText, self).__init__(aggregate=aggregate,
+ band=band, bin=bin,
+ condition=condition,
+ field=field, format=format,
+ formatType=formatType,
+ labelExpr=labelExpr,
+ timeUnit=timeUnit,
+ title=title, type=type,
+ **kwds)
+
+
+class TextDirection(VegaLiteSchema):
+ """TextDirection schema wrapper
+
+ enum('ltr', 'rtl')
+ """
+ _schema = {'$ref': '#/definitions/TextDirection'}
+
+ def __init__(self, *args):
+ super(TextDirection, self).__init__(*args)
+
+
+class TickConfig(AnyMarkConfig):
+ """TickConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ align : anyOf(:class:`Align`, :class:`ExprRef`)
+ The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule).
+ One of ``"left"``, ``"right"``, ``"center"``.
+
+ **Note:** Expression reference is *not* supported for range marks.
+ angle : anyOf(float, :class:`ExprRef`)
+
+ aria : anyOf(boolean, :class:`ExprRef`)
+
+ ariaRole : anyOf(string, :class:`ExprRef`)
+
+ ariaRoleDescription : anyOf(string, :class:`ExprRef`)
+
+ aspect : anyOf(boolean, :class:`ExprRef`)
+
+ bandSize : float
+ The width of the ticks.
+
+ **Default value:** 3/4 of step (width step for horizontal ticks and height step for
+ vertical ticks).
+ baseline : anyOf(:class:`TextBaseline`, :class:`ExprRef`)
+ For text marks, the vertical text baseline. One of ``"alphabetic"`` (default),
+ ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, ``"line-bottom"``, or an
+ expression reference that provides one of the valid values. The ``"line-top"`` and
+ ``"line-bottom"`` values operate similarly to ``"top"`` and ``"bottom"``, but are
+ calculated relative to the ``lineHeight`` rather than ``fontSize`` alone.
+
+ For range marks, the vertical alignment of the marks. One of ``"top"``,
+ ``"middle"``, ``"bottom"``.
+
+ **Note:** Expression reference is *not* supported for range marks.
+ blend : anyOf(:class:`Blend`, :class:`ExprRef`)
+
+ color : anyOf(:class:`Color`, :class:`Gradient`, :class:`ExprRef`)
+ Default color.
+
+ **Default value:** :raw-html:`<span style="color: #4682b4;">&#9632;</span>`
+ ``"#4682b4"``
+
+ **Note:** - This property cannot be used in a `style config
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. - The ``fill``
+ and ``stroke`` properties have higher precedence than ``color`` and will override
+ ``color``.
+ cornerRadius : anyOf(float, :class:`ExprRef`)
+
+ cornerRadiusBottomLeft : anyOf(float, :class:`ExprRef`)
+
+ cornerRadiusBottomRight : anyOf(float, :class:`ExprRef`)
+
+ cornerRadiusTopLeft : anyOf(float, :class:`ExprRef`)
+
+ cornerRadiusTopRight : anyOf(float, :class:`ExprRef`)
+
+ cursor : anyOf(:class:`Cursor`, :class:`ExprRef`)
+
+ description : anyOf(string, :class:`ExprRef`)
+
+ dir : anyOf(:class:`TextDirection`, :class:`ExprRef`)
+
+ dx : anyOf(float, :class:`ExprRef`)
+
+ dy : anyOf(float, :class:`ExprRef`)
+
+ ellipsis : anyOf(string, :class:`ExprRef`)
+
+ endAngle : anyOf(float, :class:`ExprRef`)
+
+ fill : anyOf(:class:`Color`, :class:`Gradient`, None, :class:`ExprRef`)
+ Default fill color. This property has higher precedence than ``config.color``. Set
+ to ``null`` to remove fill.
+
+ **Default value:** (None)
+ fillOpacity : anyOf(float, :class:`ExprRef`)
+
+ filled : boolean
+ Whether the mark's color should be used as fill color instead of stroke color.
+
+ **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well
+ as ``geoshape`` marks for `graticule
+ <https://vega.github.io/vega-lite/docs/data.html#graticule>`__ data sources;
+ otherwise, ``true``.
+
+ **Note:** This property cannot be used in a `style config
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
+ font : anyOf(string, :class:`ExprRef`)
+
+ fontSize : anyOf(float, :class:`ExprRef`)
+
+ fontStyle : anyOf(:class:`FontStyle`, :class:`ExprRef`)
+
+ fontWeight : anyOf(:class:`FontWeight`, :class:`ExprRef`)
+
+ height : anyOf(float, :class:`ExprRef`)
+
+ href : anyOf(:class:`URI`, :class:`ExprRef`)
+
+ innerRadius : anyOf(float, :class:`ExprRef`)
+ The inner radius in pixels of arc marks. ``innerRadius`` is an alias for
+ ``radius2``.
+ interpolate : anyOf(:class:`Interpolate`, :class:`ExprRef`)
+
+ invalid : enum('filter', None)
+ Defines how Vega-Lite should handle marks for invalid values ( ``null`` and ``NaN``
+ ). - If set to ``"filter"`` (default), all data items with null values will be
+ skipped (for line, trail, and area marks) or filtered (for other marks). - If
+ ``null``, all data items are included. In this case, invalid values will be
+ interpreted as zeroes.
+ limit : anyOf(float, :class:`ExprRef`)
+
+ lineBreak : anyOf(string, :class:`ExprRef`)
+
+ lineHeight : anyOf(float, :class:`ExprRef`)
+
+ opacity : anyOf(float, :class:`ExprRef`)
+ The overall opacity (value between [0,1]).
+
+ **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,
+ ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.
+ order : anyOf(None, boolean)
+ For line and trail marks, this ``order`` property can be set to ``null`` or
+ ``false`` to make the lines use the original order in the data sources.
+ orient : :class:`Orientation`
+ The orientation of a non-stacked bar, tick, area, and line charts. The value is
+ either horizontal (default) or vertical. - For bar, rule and tick, this determines
+ whether the size of the bar and tick should be applied to x or y dimension. - For
+ area, this property determines the orient property of the Vega output. - For line
+ and trail marks, this property determines the sort order of the points in the line
+ if ``config.sortLineBy`` is not specified. For stacked charts, this is always
+ determined by the orientation of the stack; therefore explicitly specified value
+ will be ignored.
+ outerRadius : anyOf(float, :class:`ExprRef`)
+ The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``.
+ padAngle : anyOf(float, :class:`ExprRef`)
+
+ radius : anyOf(float, :class:`ExprRef`)
+ For arc mark, the primary (outer) radius in pixels.
+
+ For text marks, polar coordinate radial offset, in pixels, of the text from the
+ origin determined by the ``x`` and ``y`` properties.
+ radius2 : anyOf(float, :class:`ExprRef`)
+ The secondary (inner) radius in pixels of arc marks.
+ shape : anyOf(anyOf(:class:`SymbolShape`, string), :class:`ExprRef`)
+
+ size : anyOf(float, :class:`ExprRef`)
+ Default size for marks. - For ``point`` / ``circle`` / ``square``, this represents
+ the pixel area of the marks. Note that this value sets the area of the symbol; the
+ side lengths will increase with the square root of this value. - For ``bar``, this
+ represents the band size of the bar, in pixels. - For ``text``, this represents the
+ font size, in pixels.
+
+ **Default value:** - ``30`` for point, circle, square marks; width/height's ``step``
+ - ``2`` for bar marks with discrete dimensions; - ``5`` for bar marks with
+ continuous dimensions; - ``11`` for text marks.
+ smooth : anyOf(boolean, :class:`ExprRef`)
+
+ startAngle : anyOf(float, :class:`ExprRef`)
+
+ stroke : anyOf(:class:`Color`, :class:`Gradient`, None, :class:`ExprRef`)
+ Default stroke color. This property has higher precedence than ``config.color``. Set
+ to ``null`` to remove stroke.
+
+ **Default value:** (None)
+ strokeCap : anyOf(:class:`StrokeCap`, :class:`ExprRef`)
+
+ strokeDash : anyOf(List(float), :class:`ExprRef`)
+
+ strokeDashOffset : anyOf(float, :class:`ExprRef`)
+
+ strokeJoin : anyOf(:class:`StrokeJoin`, :class:`ExprRef`)
+
+ strokeMiterLimit : anyOf(float, :class:`ExprRef`)
+
+ strokeOffset : anyOf(float, :class:`ExprRef`)
+
+ strokeOpacity : anyOf(float, :class:`ExprRef`)
+
+ strokeWidth : anyOf(float, :class:`ExprRef`)
+
+ tension : anyOf(float, :class:`ExprRef`)
+
+ text : anyOf(:class:`Text`, :class:`ExprRef`)
+
+ theta : anyOf(float, :class:`ExprRef`)
+ For arc marks, the arc length in radians if theta2 is not specified, otherwise the
+ start arc angle. (A value of 0 indicates up or “north”, increasing values proceed
+ clockwise.)
+
+ For text marks, polar coordinate angle in radians.
+ theta2 : anyOf(float, :class:`ExprRef`)
+ The end angle of arc marks in radians. A value of 0 indicates up or “north”,
+ increasing values proceed clockwise.
+ thickness : float
+ Thickness of the tick mark.
+
+ **Default value:** ``1``
+ timeUnitBand : float
+ Default relative band size for a time unit. If set to ``1``, the bandwidth of the
+ marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the
+ marks will be half of the time unit band step.
+ timeUnitBandPosition : float
+ Default relative band position for a time unit. If set to ``0``, the marks will be
+ positioned at the beginning of the time unit band step. If set to ``0.5``, the marks
+ will be positioned in the middle of the time unit band step.
+ tooltip : anyOf(float, string, boolean, :class:`TooltipContent`, :class:`ExprRef`, None)
+ The tooltip text string to show upon mouse hover or an object defining which fields
+ should the tooltip be derived from.
+
+
+ * If ``tooltip`` is ``true`` or ``{"content": "encoding"}``, then all fields from
+ ``encoding`` will be used. - If ``tooltip`` is ``{"content": "data"}``, then all
+ fields that appear in the highlighted data point will be used. - If set to
+ ``null`` or ``false``, then no tooltip will be used.
+
+ See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__
+ documentation for a detailed discussion about tooltip in Vega-Lite.
+
+ **Default value:** ``null``
+ url : anyOf(:class:`URI`, :class:`ExprRef`)
+
+ width : anyOf(float, :class:`ExprRef`)
+
+ x : anyOf(float, string, :class:`ExprRef`)
+ X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without
+ specified ``x2`` or ``width``.
+
+ The ``value`` of this channel can be a number or a string ``"width"`` for the width
+ of the plot.
+ x2 : anyOf(float, string, :class:`ExprRef`)
+ X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
+
+ The ``value`` of this channel can be a number or a string ``"width"`` for the width
+ of the plot.
+ y : anyOf(float, string, :class:`ExprRef`)
+ Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without
+ specified ``y2`` or ``height``.
+
+ The ``value`` of this channel can be a number or a string ``"height"`` for the
+ height of the plot.
+ y2 : anyOf(float, string, :class:`ExprRef`)
+ Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``.
+
+ The ``value`` of this channel can be a number or a string ``"height"`` for the
+ height of the plot.
+ """
+ _schema = {'$ref': '#/definitions/TickConfig'}
+
+ def __init__(self, align=Undefined, angle=Undefined, aria=Undefined, ariaRole=Undefined,
+ ariaRoleDescription=Undefined, aspect=Undefined, bandSize=Undefined,
+ baseline=Undefined, blend=Undefined, color=Undefined, cornerRadius=Undefined,
+ cornerRadiusBottomLeft=Undefined, cornerRadiusBottomRight=Undefined,
+ cornerRadiusTopLeft=Undefined, cornerRadiusTopRight=Undefined, cursor=Undefined,
+ description=Undefined, dir=Undefined, dx=Undefined, dy=Undefined, ellipsis=Undefined,
+ endAngle=Undefined, fill=Undefined, fillOpacity=Undefined, filled=Undefined,
+ font=Undefined, fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined,
+ height=Undefined, href=Undefined, innerRadius=Undefined, interpolate=Undefined,
+ invalid=Undefined, limit=Undefined, lineBreak=Undefined, lineHeight=Undefined,
+ opacity=Undefined, order=Undefined, orient=Undefined, outerRadius=Undefined,
+ padAngle=Undefined, radius=Undefined, radius2=Undefined, shape=Undefined,
+ size=Undefined, smooth=Undefined, startAngle=Undefined, stroke=Undefined,
+ strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined,
+ strokeJoin=Undefined, strokeMiterLimit=Undefined, strokeOffset=Undefined,
+ strokeOpacity=Undefined, strokeWidth=Undefined, tension=Undefined, text=Undefined,
+ theta=Undefined, theta2=Undefined, thickness=Undefined, timeUnitBand=Undefined,
+ timeUnitBandPosition=Undefined, tooltip=Undefined, url=Undefined, width=Undefined,
+ x=Undefined, x2=Undefined, y=Undefined, y2=Undefined, **kwds):
+ super(TickConfig, self).__init__(align=align, angle=angle, aria=aria, ariaRole=ariaRole,
+ ariaRoleDescription=ariaRoleDescription, aspect=aspect,
+ bandSize=bandSize, baseline=baseline, blend=blend, color=color,
+ cornerRadius=cornerRadius,
+ cornerRadiusBottomLeft=cornerRadiusBottomLeft,
+ cornerRadiusBottomRight=cornerRadiusBottomRight,
+ cornerRadiusTopLeft=cornerRadiusTopLeft,
+ cornerRadiusTopRight=cornerRadiusTopRight, cursor=cursor,
+ description=description, dir=dir, dx=dx, dy=dy,
+ ellipsis=ellipsis, endAngle=endAngle, fill=fill,
+ fillOpacity=fillOpacity, filled=filled, font=font,
+ fontSize=fontSize, fontStyle=fontStyle, fontWeight=fontWeight,
+ height=height, href=href, innerRadius=innerRadius,
+ interpolate=interpolate, invalid=invalid, limit=limit,
+ lineBreak=lineBreak, lineHeight=lineHeight, opacity=opacity,
+ order=order, orient=orient, outerRadius=outerRadius,
+ padAngle=padAngle, radius=radius, radius2=radius2, shape=shape,
+ size=size, smooth=smooth, startAngle=startAngle, stroke=stroke,
+ strokeCap=strokeCap, strokeDash=strokeDash,
+ strokeDashOffset=strokeDashOffset, strokeJoin=strokeJoin,
+ strokeMiterLimit=strokeMiterLimit, strokeOffset=strokeOffset,
+ strokeOpacity=strokeOpacity, strokeWidth=strokeWidth,
+ tension=tension, text=text, theta=theta, theta2=theta2,
+ thickness=thickness, timeUnitBand=timeUnitBand,
+ timeUnitBandPosition=timeUnitBandPosition, tooltip=tooltip,
+ url=url, width=width, x=x, x2=x2, y=y, y2=y2, **kwds)
+
+
+class TickCount(VegaLiteSchema):
+ """TickCount schema wrapper
+
+ anyOf(float, :class:`TimeInterval`, :class:`TimeIntervalStep`)
+ """
+ _schema = {'$ref': '#/definitions/TickCount'}
+
+ def __init__(self, *args, **kwds):
+ super(TickCount, self).__init__(*args, **kwds)
+
+
+class TimeInterval(TickCount):
+ """TimeInterval schema wrapper
+
+ enum('millisecond', 'second', 'minute', 'hour', 'day', 'week', 'month', 'year')
+ """
+ _schema = {'$ref': '#/definitions/TimeInterval'}
+
+ def __init__(self, *args):
+ super(TimeInterval, self).__init__(*args)
+
+
+class TimeIntervalStep(TickCount):
+ """TimeIntervalStep schema wrapper
+
+ Mapping(required=[interval, step])
+
+ Attributes
+ ----------
+
+ interval : :class:`TimeInterval`
+
+ step : float
+
+ """
+ _schema = {'$ref': '#/definitions/TimeIntervalStep'}
+
+ def __init__(self, interval=Undefined, step=Undefined, **kwds):
+ super(TimeIntervalStep, self).__init__(interval=interval, step=step, **kwds)
+
+
+class TimeUnit(VegaLiteSchema):
+ """TimeUnit schema wrapper
+
+ anyOf(:class:`SingleTimeUnit`, :class:`MultiTimeUnit`)
+ """
+ _schema = {'$ref': '#/definitions/TimeUnit'}
+
+ def __init__(self, *args, **kwds):
+ super(TimeUnit, self).__init__(*args, **kwds)
+
+
+class MultiTimeUnit(TimeUnit):
+ """MultiTimeUnit schema wrapper
+
+ anyOf(:class:`LocalMultiTimeUnit`, :class:`UtcMultiTimeUnit`)
+ """
+ _schema = {'$ref': '#/definitions/MultiTimeUnit'}
+
+ def __init__(self, *args, **kwds):
+ super(MultiTimeUnit, self).__init__(*args, **kwds)
+
+
+class LocalMultiTimeUnit(MultiTimeUnit):
+ """LocalMultiTimeUnit schema wrapper
+
+ enum('yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours',
+ 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday',
+ 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds',
+ 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes',
+ 'monthdatehoursminutesseconds', 'weekday', 'weeksdayhours', 'weekdayhoursminutes',
+ 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds',
+ 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds')
+ """
+ _schema = {'$ref': '#/definitions/LocalMultiTimeUnit'}
+
+ def __init__(self, *args):
+ super(LocalMultiTimeUnit, self).__init__(*args)
+
+
+class SingleTimeUnit(TimeUnit):
+ """SingleTimeUnit schema wrapper
+
+ anyOf(:class:`LocalSingleTimeUnit`, :class:`UtcSingleTimeUnit`)
+ """
+ _schema = {'$ref': '#/definitions/SingleTimeUnit'}
+
+ def __init__(self, *args, **kwds):
+ super(SingleTimeUnit, self).__init__(*args, **kwds)
+
+
+class LocalSingleTimeUnit(SingleTimeUnit):
+ """LocalSingleTimeUnit schema wrapper
+
+ enum('year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes',
+ 'seconds', 'milliseconds')
+ """
+ _schema = {'$ref': '#/definitions/LocalSingleTimeUnit'}
+
+ def __init__(self, *args):
+ super(LocalSingleTimeUnit, self).__init__(*args)
+
+
+class TimeUnitParams(VegaLiteSchema):
+ """TimeUnitParams schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ maxbins : float
+ If no ``unit`` is specified, maxbins is used to infer time units.
+ step : float
+ The number of steps between bins, in terms of the least significant unit provided.
+ unit : :class:`TimeUnit`
+ Defines how date-time values should be binned.
+ utc : boolean
+ True to use UTC timezone. Equivalent to using a ``utc`` prefixed ``TimeUnit``.
+ """
+ _schema = {'$ref': '#/definitions/TimeUnitParams'}
+
+ def __init__(self, maxbins=Undefined, step=Undefined, unit=Undefined, utc=Undefined, **kwds):
+ super(TimeUnitParams, self).__init__(maxbins=maxbins, step=step, unit=unit, utc=utc, **kwds)
+
+
+class TitleAnchor(VegaLiteSchema):
+ """TitleAnchor schema wrapper
+
+ enum(None, 'start', 'middle', 'end')
+ """
+ _schema = {'$ref': '#/definitions/TitleAnchor'}
+
+ def __init__(self, *args):
+ super(TitleAnchor, self).__init__(*args)
+
+
+class TitleConfig(VegaLiteSchema):
+ """TitleConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ align : :class:`Align`
+ Horizontal text alignment for title text. One of ``"left"``, ``"center"``, or
+ ``"right"``.
+ anchor : anyOf(:class:`TitleAnchor`, :class:`ExprRef`)
+
+ angle : anyOf(float, :class:`ExprRef`)
+
+ aria : anyOf(boolean, :class:`ExprRef`)
+
+ baseline : :class:`TextBaseline`
+ Vertical text baseline for title and subtitle text. One of ``"alphabetic"``
+ (default), ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, or
+ ``"line-bottom"``. The ``"line-top"`` and ``"line-bottom"`` values operate similarly
+ to ``"top"`` and ``"bottom"``, but are calculated relative to the *lineHeight*
+ rather than *fontSize* alone.
+ color : anyOf(anyOf(None, :class:`Color`), :class:`ExprRef`)
+
+ dx : anyOf(float, :class:`ExprRef`)
+
+ dy : anyOf(float, :class:`ExprRef`)
+
+ font : anyOf(string, :class:`ExprRef`)
+
+ fontSize : anyOf(float, :class:`ExprRef`)
+
+ fontStyle : anyOf(:class:`FontStyle`, :class:`ExprRef`)
+
+ fontWeight : anyOf(:class:`FontWeight`, :class:`ExprRef`)
+
+ frame : anyOf(anyOf(:class:`TitleFrame`, string), :class:`ExprRef`)
+
+ limit : anyOf(float, :class:`ExprRef`)
+
+ lineHeight : anyOf(float, :class:`ExprRef`)
+
+ offset : anyOf(float, :class:`ExprRef`)
+
+ orient : anyOf(:class:`TitleOrient`, :class:`ExprRef`)
+
+ subtitleColor : anyOf(anyOf(None, :class:`Color`), :class:`ExprRef`)
+
+ subtitleFont : anyOf(string, :class:`ExprRef`)
+
+ subtitleFontSize : anyOf(float, :class:`ExprRef`)
+
+ subtitleFontStyle : anyOf(:class:`FontStyle`, :class:`ExprRef`)
+
+ subtitleFontWeight : anyOf(:class:`FontWeight`, :class:`ExprRef`)
+
+ subtitleLineHeight : anyOf(float, :class:`ExprRef`)
+
+ subtitlePadding : anyOf(float, :class:`ExprRef`)
+
+ zindex : anyOf(float, :class:`ExprRef`)
+
+ """
+ _schema = {'$ref': '#/definitions/TitleConfig'}
+
+ def __init__(self, align=Undefined, anchor=Undefined, angle=Undefined, aria=Undefined,
+ baseline=Undefined, color=Undefined, dx=Undefined, dy=Undefined, font=Undefined,
+ fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined, frame=Undefined,
+ limit=Undefined, lineHeight=Undefined, offset=Undefined, orient=Undefined,
+ subtitleColor=Undefined, subtitleFont=Undefined, subtitleFontSize=Undefined,
+ subtitleFontStyle=Undefined, subtitleFontWeight=Undefined,
+ subtitleLineHeight=Undefined, subtitlePadding=Undefined, zindex=Undefined, **kwds):
+ super(TitleConfig, self).__init__(align=align, anchor=anchor, angle=angle, aria=aria,
+ baseline=baseline, color=color, dx=dx, dy=dy, font=font,
+ fontSize=fontSize, fontStyle=fontStyle, fontWeight=fontWeight,
+ frame=frame, limit=limit, lineHeight=lineHeight,
+ offset=offset, orient=orient, subtitleColor=subtitleColor,
+ subtitleFont=subtitleFont, subtitleFontSize=subtitleFontSize,
+ subtitleFontStyle=subtitleFontStyle,
+ subtitleFontWeight=subtitleFontWeight,
+ subtitleLineHeight=subtitleLineHeight,
+ subtitlePadding=subtitlePadding, zindex=zindex, **kwds)
+
+
+class TitleFrame(VegaLiteSchema):
+ """TitleFrame schema wrapper
+
+ enum('bounds', 'group')
+ """
+ _schema = {'$ref': '#/definitions/TitleFrame'}
+
+ def __init__(self, *args):
+ super(TitleFrame, self).__init__(*args)
+
+
+class TitleOrient(VegaLiteSchema):
+ """TitleOrient schema wrapper
+
+ enum('none', 'left', 'right', 'top', 'bottom')
+ """
+ _schema = {'$ref': '#/definitions/TitleOrient'}
+
+ def __init__(self, *args):
+ super(TitleOrient, self).__init__(*args)
+
+
+class TitleParams(VegaLiteSchema):
+ """TitleParams schema wrapper
+
+ Mapping(required=[text])
+
+ Attributes
+ ----------
+
+ text : anyOf(:class:`Text`, :class:`ExprRef`)
+ The title text.
+ align : :class:`Align`
+ Horizontal text alignment for title text. One of ``"left"``, ``"center"``, or
+ ``"right"``.
+ anchor : :class:`TitleAnchor`
+ The anchor position for placing the title. One of ``"start"``, ``"middle"``, or
+ ``"end"``. For example, with an orientation of top these anchor positions map to a
+ left-, center-, or right-aligned title.
+
+ **Default value:** ``"middle"`` for `single
+ <https://vega.github.io/vega-lite/docs/spec.html>`__ and `layered
+ <https://vega.github.io/vega-lite/docs/layer.html>`__ views. ``"start"`` for other
+ composite views.
+
+ **Note:** `For now <https://github.com/vega/vega-lite/issues/2875>`__, ``anchor`` is
+ only customizable only for `single
+ <https://vega.github.io/vega-lite/docs/spec.html>`__ and `layered
+ <https://vega.github.io/vega-lite/docs/layer.html>`__ views. For other composite
+ views, ``anchor`` is always ``"start"``.
+ angle : anyOf(float, :class:`ExprRef`)
+
+ aria : anyOf(boolean, :class:`ExprRef`)
+
+ baseline : :class:`TextBaseline`
+ Vertical text baseline for title and subtitle text. One of ``"alphabetic"``
+ (default), ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, or
+ ``"line-bottom"``. The ``"line-top"`` and ``"line-bottom"`` values operate similarly
+ to ``"top"`` and ``"bottom"``, but are calculated relative to the *lineHeight*
+ rather than *fontSize* alone.
+ color : anyOf(anyOf(None, :class:`Color`), :class:`ExprRef`)
+
+ dx : anyOf(float, :class:`ExprRef`)
+
+ dy : anyOf(float, :class:`ExprRef`)
+
+ font : anyOf(string, :class:`ExprRef`)
+
+ fontSize : anyOf(float, :class:`ExprRef`)
+
+ fontStyle : anyOf(:class:`FontStyle`, :class:`ExprRef`)
+
+ fontWeight : anyOf(:class:`FontWeight`, :class:`ExprRef`)
+
+ frame : anyOf(anyOf(:class:`TitleFrame`, string), :class:`ExprRef`)
+
+ limit : anyOf(float, :class:`ExprRef`)
+
+ lineHeight : anyOf(float, :class:`ExprRef`)
+
+ offset : anyOf(float, :class:`ExprRef`)
+
+ orient : anyOf(:class:`TitleOrient`, :class:`ExprRef`)
+
+ style : anyOf(string, List(string))
+ A `mark style property <https://vega.github.io/vega-lite/docs/config.html#style>`__
+ to apply to the title text mark.
+
+ **Default value:** ``"group-title"``.
+ subtitle : :class:`Text`
+ The subtitle Text.
+ subtitleColor : anyOf(anyOf(None, :class:`Color`), :class:`ExprRef`)
+
+ subtitleFont : anyOf(string, :class:`ExprRef`)
+
+ subtitleFontSize : anyOf(float, :class:`ExprRef`)
+
+ subtitleFontStyle : anyOf(:class:`FontStyle`, :class:`ExprRef`)
+
+ subtitleFontWeight : anyOf(:class:`FontWeight`, :class:`ExprRef`)
+
+ subtitleLineHeight : anyOf(float, :class:`ExprRef`)
+
+ subtitlePadding : anyOf(float, :class:`ExprRef`)
+
+ zindex : float
+ The integer z-index indicating the layering of the title group relative to other
+ axis, mark and legend groups.
+
+ **Default value:** ``0``.
+ """
+ _schema = {'$ref': '#/definitions/TitleParams'}
+
+ def __init__(self, text=Undefined, align=Undefined, anchor=Undefined, angle=Undefined,
+ aria=Undefined, baseline=Undefined, color=Undefined, dx=Undefined, dy=Undefined,
+ font=Undefined, fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined,
+ frame=Undefined, limit=Undefined, lineHeight=Undefined, offset=Undefined,
+ orient=Undefined, style=Undefined, subtitle=Undefined, subtitleColor=Undefined,
+ subtitleFont=Undefined, subtitleFontSize=Undefined, subtitleFontStyle=Undefined,
+ subtitleFontWeight=Undefined, subtitleLineHeight=Undefined, subtitlePadding=Undefined,
+ zindex=Undefined, **kwds):
+ super(TitleParams, self).__init__(text=text, align=align, anchor=anchor, angle=angle, aria=aria,
+ baseline=baseline, color=color, dx=dx, dy=dy, font=font,
+ fontSize=fontSize, fontStyle=fontStyle, fontWeight=fontWeight,
+ frame=frame, limit=limit, lineHeight=lineHeight,
+ offset=offset, orient=orient, style=style, subtitle=subtitle,
+ subtitleColor=subtitleColor, subtitleFont=subtitleFont,
+ subtitleFontSize=subtitleFontSize,
+ subtitleFontStyle=subtitleFontStyle,
+ subtitleFontWeight=subtitleFontWeight,
+ subtitleLineHeight=subtitleLineHeight,
+ subtitlePadding=subtitlePadding, zindex=zindex, **kwds)
+
+
+class TooltipContent(VegaLiteSchema):
+ """TooltipContent schema wrapper
+
+ Mapping(required=[content])
+
+ Attributes
+ ----------
+
+ content : enum('encoding', 'data')
+
+ """
+ _schema = {'$ref': '#/definitions/TooltipContent'}
+
+ def __init__(self, content=Undefined, **kwds):
+ super(TooltipContent, self).__init__(content=content, **kwds)
+
+
+class TopLevelSpec(VegaLiteSchema):
+ """TopLevelSpec schema wrapper
+
+ anyOf(:class:`TopLevelUnitSpec`, :class:`TopLevelFacetSpec`, :class:`TopLevelLayerSpec`,
+ :class:`TopLevelRepeatSpec`, :class:`TopLevelNormalizedConcatSpecGenericSpec`,
+ :class:`TopLevelNormalizedVConcatSpecGenericSpec`,
+ :class:`TopLevelNormalizedHConcatSpecGenericSpec`)
+ A Vega-Lite top-level specification. This is the root class for all Vega-Lite
+ specifications. (The json schema is generated from this type.)
+ """
+ _schema = {'$ref': '#/definitions/TopLevelSpec'}
+
+ def __init__(self, *args, **kwds):
+ super(TopLevelSpec, self).__init__(*args, **kwds)
+
+
+class TopLevelFacetSpec(TopLevelSpec):
+ """TopLevelFacetSpec schema wrapper
+
+ Mapping(required=[data, facet, spec])
+
+ Attributes
+ ----------
+
+ data : anyOf(:class:`Data`, None)
+ An object describing the data source. Set to ``null`` to ignore the parent's data
+ source. If no data is set, it is derived from the parent.
+ facet : anyOf(:class:`FacetFieldDef`, :class:`FacetMapping`)
+ Definition for how to facet the data. One of: 1) `a field definition for faceting
+ the plot by one field
+ <https://vega.github.io/vega-lite/docs/facet.html#field-def>`__ 2) `An object that
+ maps row and column channels to their field definitions
+ <https://vega.github.io/vega-lite/docs/facet.html#mapping>`__
+ spec : anyOf(:class:`LayerSpec`, :class:`UnitSpecWithFrame`)
+ A specification of the view that gets faceted.
+ align : anyOf(:class:`LayoutAlign`, :class:`RowColLayoutAlign`)
+ The alignment to apply to grid rows and columns. The supported string values are
+ ``"all"``, ``"each"``, and ``"none"``.
+
+
+ * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply
+ placed one after the other. - For ``"each"``, subviews will be aligned into a
+ clean grid structure, but each row or column may be of variable size. - For
+ ``"all"``, subviews will be aligned and each row or column will be sized
+ identically based on the maximum observed size. String values for this property
+ will be applied to both grid rows and columns.
+
+ Alternatively, an object value of the form ``{"row": string, "column": string}`` can
+ be used to supply different alignments for rows and columns.
+
+ **Default value:** ``"all"``.
+ autosize : anyOf(:class:`AutosizeType`, :class:`AutoSizeParams`)
+ How the visualization size should be determined. If a string, should be one of
+ ``"pad"``, ``"fit"`` or ``"none"``. Object values can additionally specify
+ parameters for content sizing and automatic resizing.
+
+ **Default value** : ``pad``
+ background : anyOf(:class:`Color`, :class:`ExprRef`)
+ CSS color property to use as the background of the entire view.
+
+ **Default value:** ``"white"``
+ bounds : enum('full', 'flush')
+ The bounds calculation method to use for determining the extent of a sub-plot. One
+ of ``full`` (the default) or ``flush``.
+
+
+ * If set to ``full``, the entire calculated bounds (including axes, title, and
+ legend) will be used. - If set to ``flush``, only the specified width and height
+ values for the sub-view will be used. The ``flush`` setting can be useful when
+ attempting to place sub-plots without axes or legends into a uniform grid
+ structure.
+
+ **Default value:** ``"full"``
+ center : anyOf(boolean, :class:`RowColboolean`)
+ Boolean flag indicating if subviews should be centered relative to their respective
+ rows or columns.
+
+ An object value of the form ``{"row": boolean, "column": boolean}`` can be used to
+ supply different centering values for rows and columns.
+
+ **Default value:** ``false``
+ columns : float
+ The number of columns to include in the view composition layout.
+
+ **Default value** : ``undefined`` -- An infinite number of columns (a single row)
+ will be assumed. This is equivalent to ``hconcat`` (for ``concat`` ) and to using
+ the ``column`` channel (for ``facet`` and ``repeat`` ).
+
+ **Note** :
+
+ 1) This property is only for: - the general (wrappable) ``concat`` operator (not
+ ``hconcat`` / ``vconcat`` ) - the ``facet`` and ``repeat`` operator with one
+ field/repetition definition (without row/column nesting)
+
+ 2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat`` )
+ and to using the ``row`` channel (for ``facet`` and ``repeat`` ).
+ config : :class:`Config`
+ Vega-Lite configuration object. This property can only be defined at the top-level
+ of a specification.
+ datasets : :class:`Datasets`
+ A global data store for named datasets. This is a mapping from names to inline
+ datasets. This can be an array of objects or primitive values or a string. Arrays of
+ primitive values are ingested as objects with a ``data`` property.
+ description : string
+ Description of this mark for commenting purpose.
+ name : string
+ Name of the visualization for later reference.
+ padding : anyOf(:class:`Padding`, :class:`ExprRef`)
+ The default visualization padding, in pixels, from the edge of the visualization
+ canvas to the data rectangle. If a number, specifies padding for all sides. If an
+ object, the value should have the format ``{"left": 5, "top": 5, "right": 5,
+ "bottom": 5}`` to specify padding for each side of the visualization.
+
+ **Default value** : ``5``
+ params : List(:class:`Parameter`)
+ Dynamic variables that parameterize a visualization.
+ resolve : :class:`Resolve`
+ Scale, axis, and legend resolutions for view composition specifications.
+ spacing : anyOf(float, :class:`RowColnumber`)
+ The spacing in pixels between sub-views of the composition operator. An object of
+ the form ``{"row": number, "column": number}`` can be used to set different spacing
+ values for rows and columns.
+
+ **Default value** : Depends on ``"spacing"`` property of `the view composition
+ configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__ (
+ ``20`` by default)
+ title : anyOf(:class:`Text`, :class:`TitleParams`)
+ Title for the plot.
+ transform : List(:class:`Transform`)
+ An array of data transformations such as filter and new field calculation.
+ usermeta : :class:`Dictunknown`
+ Optional metadata that will be passed to Vega. This object is completely ignored by
+ Vega and Vega-Lite and can be used for custom metadata.
+ $schema : string
+ URL to `JSON schema <http://json-schema.org/>`__ for a Vega-Lite specification.
+ Unless you have a reason to change this, use
+ ``https://vega.github.io/schema/vega-lite/v4.json``. Setting the ``$schema``
+ property allows automatic validation and autocomplete in editors that support JSON
+ schema.
+ """
+ _schema = {'$ref': '#/definitions/TopLevelFacetSpec'}
+
+ def __init__(self, data=Undefined, facet=Undefined, spec=Undefined, align=Undefined,
+ autosize=Undefined, background=Undefined, bounds=Undefined, center=Undefined,
+ columns=Undefined, config=Undefined, datasets=Undefined, description=Undefined,
+ name=Undefined, padding=Undefined, params=Undefined, resolve=Undefined,
+ spacing=Undefined, title=Undefined, transform=Undefined, usermeta=Undefined, **kwds):
+ super(TopLevelFacetSpec, self).__init__(data=data, facet=facet, spec=spec, align=align,
+ autosize=autosize, background=background, bounds=bounds,
+ center=center, columns=columns, config=config,
+ datasets=datasets, description=description, name=name,
+ padding=padding, params=params, resolve=resolve,
+ spacing=spacing, title=title, transform=transform,
+ usermeta=usermeta, **kwds)
+
+
+class TopLevelLayerSpec(TopLevelSpec):
+ """TopLevelLayerSpec schema wrapper
+
+ Mapping(required=[layer])
+
+ Attributes
+ ----------
+
+ layer : List(anyOf(:class:`LayerSpec`, :class:`UnitSpec`))
+ Layer or single view specifications to be layered.
+
+ **Note** : Specifications inside ``layer`` cannot use ``row`` and ``column``
+ channels as layering facet specifications is not allowed. Instead, use the `facet
+ operator <https://vega.github.io/vega-lite/docs/facet.html>`__ and place a layer
+ inside a facet.
+ autosize : anyOf(:class:`AutosizeType`, :class:`AutoSizeParams`)
+ How the visualization size should be determined. If a string, should be one of
+ ``"pad"``, ``"fit"`` or ``"none"``. Object values can additionally specify
+ parameters for content sizing and automatic resizing.
+
+ **Default value** : ``pad``
+ background : anyOf(:class:`Color`, :class:`ExprRef`)
+ CSS color property to use as the background of the entire view.
+
+ **Default value:** ``"white"``
+ config : :class:`Config`
+ Vega-Lite configuration object. This property can only be defined at the top-level
+ of a specification.
+ data : anyOf(:class:`Data`, None)
+ An object describing the data source. Set to ``null`` to ignore the parent's data
+ source. If no data is set, it is derived from the parent.
+ datasets : :class:`Datasets`
+ A global data store for named datasets. This is a mapping from names to inline
+ datasets. This can be an array of objects or primitive values or a string. Arrays of
+ primitive values are ingested as objects with a ``data`` property.
+ description : string
+ Description of this mark for commenting purpose.
+ encoding : :class:`SharedEncoding`
+ A shared key-value mapping between encoding channels and definition of fields in the
+ underlying layers.
+ height : anyOf(float, string, :class:`Step`)
+ The height of a visualization.
+
+
+ * For a plot with a continuous y-field, height should be a number. - For a plot with
+ either a discrete y-field or no y-field, height can be either a number indicating
+ a fixed height or an object in the form of ``{step: number}`` defining the height
+ per discrete step. (No y-field is equivalent to having one discrete step.) - To
+ enable responsive sizing on height, it should be set to ``"container"``.
+
+ **Default value:** Based on ``config.view.continuousHeight`` for a plot with a
+ continuous y-field and ``config.view.discreteHeight`` otherwise.
+
+ **Note:** For plots with `row and column channels
+ <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the
+ height of a single view and the ``"container"`` option cannot be used.
+
+ **See also:** `height <https://vega.github.io/vega-lite/docs/size.html>`__
+ documentation.
+ name : string
+ Name of the visualization for later reference.
+ padding : anyOf(:class:`Padding`, :class:`ExprRef`)
+ The default visualization padding, in pixels, from the edge of the visualization
+ canvas to the data rectangle. If a number, specifies padding for all sides. If an
+ object, the value should have the format ``{"left": 5, "top": 5, "right": 5,
+ "bottom": 5}`` to specify padding for each side of the visualization.
+
+ **Default value** : ``5``
+ params : List(:class:`Parameter`)
+ Dynamic variables that parameterize a visualization.
+ projection : :class:`Projection`
+ An object defining properties of the geographic projection shared by underlying
+ layers.
+ resolve : :class:`Resolve`
+ Scale, axis, and legend resolutions for view composition specifications.
+ title : anyOf(:class:`Text`, :class:`TitleParams`)
+ Title for the plot.
+ transform : List(:class:`Transform`)
+ An array of data transformations such as filter and new field calculation.
+ usermeta : :class:`Dictunknown`
+ Optional metadata that will be passed to Vega. This object is completely ignored by
+ Vega and Vega-Lite and can be used for custom metadata.
+ view : :class:`ViewBackground`
+ An object defining the view background's fill and stroke.
+
+ **Default value:** none (transparent)
+ width : anyOf(float, string, :class:`Step`)
+ The width of a visualization.
+
+
+ * For a plot with a continuous x-field, width should be a number. - For a plot with
+ either a discrete x-field or no x-field, width can be either a number indicating a
+ fixed width or an object in the form of ``{step: number}`` defining the width per
+ discrete step. (No x-field is equivalent to having one discrete step.) - To enable
+ responsive sizing on width, it should be set to ``"container"``.
+
+ **Default value:** Based on ``config.view.continuousWidth`` for a plot with a
+ continuous x-field and ``config.view.discreteWidth`` otherwise.
+
+ **Note:** For plots with `row and column channels
+ <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the
+ width of a single view and the ``"container"`` option cannot be used.
+
+ **See also:** `width <https://vega.github.io/vega-lite/docs/size.html>`__
+ documentation.
+ $schema : string
+ URL to `JSON schema <http://json-schema.org/>`__ for a Vega-Lite specification.
+ Unless you have a reason to change this, use
+ ``https://vega.github.io/schema/vega-lite/v4.json``. Setting the ``$schema``
+ property allows automatic validation and autocomplete in editors that support JSON
+ schema.
+ """
+ _schema = {'$ref': '#/definitions/TopLevelLayerSpec'}
+
+ def __init__(self, layer=Undefined, autosize=Undefined, background=Undefined, config=Undefined,
+ data=Undefined, datasets=Undefined, description=Undefined, encoding=Undefined,
+ height=Undefined, name=Undefined, padding=Undefined, params=Undefined,
+ projection=Undefined, resolve=Undefined, title=Undefined, transform=Undefined,
+ usermeta=Undefined, view=Undefined, width=Undefined, **kwds):
+ super(TopLevelLayerSpec, self).__init__(layer=layer, autosize=autosize, background=background,
+ config=config, data=data, datasets=datasets,
+ description=description, encoding=encoding,
+ height=height, name=name, padding=padding,
+ params=params, projection=projection, resolve=resolve,
+ title=title, transform=transform, usermeta=usermeta,
+ view=view, width=width, **kwds)
+
+
+class TopLevelNormalizedConcatSpecGenericSpec(TopLevelSpec):
+ """TopLevelNormalizedConcatSpecGenericSpec schema wrapper
+
+ Mapping(required=[concat])
+
+ Attributes
+ ----------
+
+ concat : List(:class:`NormalizedSpec`)
+ A list of views to be concatenated.
+ align : anyOf(:class:`LayoutAlign`, :class:`RowColLayoutAlign`)
+ The alignment to apply to grid rows and columns. The supported string values are
+ ``"all"``, ``"each"``, and ``"none"``.
+
+
+ * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply
+ placed one after the other. - For ``"each"``, subviews will be aligned into a
+ clean grid structure, but each row or column may be of variable size. - For
+ ``"all"``, subviews will be aligned and each row or column will be sized
+ identically based on the maximum observed size. String values for this property
+ will be applied to both grid rows and columns.
+
+ Alternatively, an object value of the form ``{"row": string, "column": string}`` can
+ be used to supply different alignments for rows and columns.
+
+ **Default value:** ``"all"``.
+ autosize : anyOf(:class:`AutosizeType`, :class:`AutoSizeParams`)
+ How the visualization size should be determined. If a string, should be one of
+ ``"pad"``, ``"fit"`` or ``"none"``. Object values can additionally specify
+ parameters for content sizing and automatic resizing.
+
+ **Default value** : ``pad``
+ background : anyOf(:class:`Color`, :class:`ExprRef`)
+ CSS color property to use as the background of the entire view.
+
+ **Default value:** ``"white"``
+ bounds : enum('full', 'flush')
+ The bounds calculation method to use for determining the extent of a sub-plot. One
+ of ``full`` (the default) or ``flush``.
+
+
+ * If set to ``full``, the entire calculated bounds (including axes, title, and
+ legend) will be used. - If set to ``flush``, only the specified width and height
+ values for the sub-view will be used. The ``flush`` setting can be useful when
+ attempting to place sub-plots without axes or legends into a uniform grid
+ structure.
+
+ **Default value:** ``"full"``
+ center : anyOf(boolean, :class:`RowColboolean`)
+ Boolean flag indicating if subviews should be centered relative to their respective
+ rows or columns.
+
+ An object value of the form ``{"row": boolean, "column": boolean}`` can be used to
+ supply different centering values for rows and columns.
+
+ **Default value:** ``false``
+ columns : float
+ The number of columns to include in the view composition layout.
+
+ **Default value** : ``undefined`` -- An infinite number of columns (a single row)
+ will be assumed. This is equivalent to ``hconcat`` (for ``concat`` ) and to using
+ the ``column`` channel (for ``facet`` and ``repeat`` ).
+
+ **Note** :
+
+ 1) This property is only for: - the general (wrappable) ``concat`` operator (not
+ ``hconcat`` / ``vconcat`` ) - the ``facet`` and ``repeat`` operator with one
+ field/repetition definition (without row/column nesting)
+
+ 2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat`` )
+ and to using the ``row`` channel (for ``facet`` and ``repeat`` ).
+ config : :class:`Config`
+ Vega-Lite configuration object. This property can only be defined at the top-level
+ of a specification.
+ data : anyOf(:class:`Data`, None)
+ An object describing the data source. Set to ``null`` to ignore the parent's data
+ source. If no data is set, it is derived from the parent.
+ datasets : :class:`Datasets`
+ A global data store for named datasets. This is a mapping from names to inline
+ datasets. This can be an array of objects or primitive values or a string. Arrays of
+ primitive values are ingested as objects with a ``data`` property.
+ description : string
+ Description of this mark for commenting purpose.
+ name : string
+ Name of the visualization for later reference.
+ padding : anyOf(:class:`Padding`, :class:`ExprRef`)
+ The default visualization padding, in pixels, from the edge of the visualization
+ canvas to the data rectangle. If a number, specifies padding for all sides. If an
+ object, the value should have the format ``{"left": 5, "top": 5, "right": 5,
+ "bottom": 5}`` to specify padding for each side of the visualization.
+
+ **Default value** : ``5``
+ params : List(:class:`Parameter`)
+ Dynamic variables that parameterize a visualization.
+ resolve : :class:`Resolve`
+ Scale, axis, and legend resolutions for view composition specifications.
+ spacing : anyOf(float, :class:`RowColnumber`)
+ The spacing in pixels between sub-views of the composition operator. An object of
+ the form ``{"row": number, "column": number}`` can be used to set different spacing
+ values for rows and columns.
+
+ **Default value** : Depends on ``"spacing"`` property of `the view composition
+ configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__ (
+ ``20`` by default)
+ title : anyOf(:class:`Text`, :class:`TitleParams`)
+ Title for the plot.
+ transform : List(:class:`Transform`)
+ An array of data transformations such as filter and new field calculation.
+ usermeta : :class:`Dictunknown`
+ Optional metadata that will be passed to Vega. This object is completely ignored by
+ Vega and Vega-Lite and can be used for custom metadata.
+ $schema : string
+ URL to `JSON schema <http://json-schema.org/>`__ for a Vega-Lite specification.
+ Unless you have a reason to change this, use
+ ``https://vega.github.io/schema/vega-lite/v4.json``. Setting the ``$schema``
+ property allows automatic validation and autocomplete in editors that support JSON
+ schema.
+ """
+ _schema = {'$ref': '#/definitions/TopLevelNormalizedConcatSpec<GenericSpec>'}
+
+ def __init__(self, concat=Undefined, align=Undefined, autosize=Undefined, background=Undefined,
+ bounds=Undefined, center=Undefined, columns=Undefined, config=Undefined,
+ data=Undefined, datasets=Undefined, description=Undefined, name=Undefined,
+ padding=Undefined, params=Undefined, resolve=Undefined, spacing=Undefined,
+ title=Undefined, transform=Undefined, usermeta=Undefined, **kwds):
+ super(TopLevelNormalizedConcatSpecGenericSpec, self).__init__(concat=concat, align=align,
+ autosize=autosize,
+ background=background,
+ bounds=bounds, center=center,
+ columns=columns, config=config,
+ data=data, datasets=datasets,
+ description=description,
+ name=name, padding=padding,
+ params=params, resolve=resolve,
+ spacing=spacing, title=title,
+ transform=transform,
+ usermeta=usermeta, **kwds)
+
+
+class TopLevelNormalizedHConcatSpecGenericSpec(TopLevelSpec):
+ """TopLevelNormalizedHConcatSpecGenericSpec schema wrapper
+
+ Mapping(required=[hconcat])
+
+ Attributes
+ ----------
+
+ hconcat : List(:class:`NormalizedSpec`)
+ A list of views to be concatenated and put into a row.
+ autosize : anyOf(:class:`AutosizeType`, :class:`AutoSizeParams`)
+ How the visualization size should be determined. If a string, should be one of
+ ``"pad"``, ``"fit"`` or ``"none"``. Object values can additionally specify
+ parameters for content sizing and automatic resizing.
+
+ **Default value** : ``pad``
+ background : anyOf(:class:`Color`, :class:`ExprRef`)
+ CSS color property to use as the background of the entire view.
+
+ **Default value:** ``"white"``
+ bounds : enum('full', 'flush')
+ The bounds calculation method to use for determining the extent of a sub-plot. One
+ of ``full`` (the default) or ``flush``.
+
+
+ * If set to ``full``, the entire calculated bounds (including axes, title, and
+ legend) will be used. - If set to ``flush``, only the specified width and height
+ values for the sub-view will be used. The ``flush`` setting can be useful when
+ attempting to place sub-plots without axes or legends into a uniform grid
+ structure.
+
+ **Default value:** ``"full"``
+ center : boolean
+ Boolean flag indicating if subviews should be centered relative to their respective
+ rows or columns.
+
+ **Default value:** ``false``
+ config : :class:`Config`
+ Vega-Lite configuration object. This property can only be defined at the top-level
+ of a specification.
+ data : anyOf(:class:`Data`, None)
+ An object describing the data source. Set to ``null`` to ignore the parent's data
+ source. If no data is set, it is derived from the parent.
+ datasets : :class:`Datasets`
+ A global data store for named datasets. This is a mapping from names to inline
+ datasets. This can be an array of objects or primitive values or a string. Arrays of
+ primitive values are ingested as objects with a ``data`` property.
+ description : string
+ Description of this mark for commenting purpose.
+ name : string
+ Name of the visualization for later reference.
+ padding : anyOf(:class:`Padding`, :class:`ExprRef`)
+ The default visualization padding, in pixels, from the edge of the visualization
+ canvas to the data rectangle. If a number, specifies padding for all sides. If an
+ object, the value should have the format ``{"left": 5, "top": 5, "right": 5,
+ "bottom": 5}`` to specify padding for each side of the visualization.
+
+ **Default value** : ``5``
+ params : List(:class:`Parameter`)
+ Dynamic variables that parameterize a visualization.
+ resolve : :class:`Resolve`
+ Scale, axis, and legend resolutions for view composition specifications.
+ spacing : float
+ The spacing in pixels between sub-views of the concat operator.
+
+ **Default value** : ``10``
+ title : anyOf(:class:`Text`, :class:`TitleParams`)
+ Title for the plot.
+ transform : List(:class:`Transform`)
+ An array of data transformations such as filter and new field calculation.
+ usermeta : :class:`Dictunknown`
+ Optional metadata that will be passed to Vega. This object is completely ignored by
+ Vega and Vega-Lite and can be used for custom metadata.
+ $schema : string
+ URL to `JSON schema <http://json-schema.org/>`__ for a Vega-Lite specification.
+ Unless you have a reason to change this, use
+ ``https://vega.github.io/schema/vega-lite/v4.json``. Setting the ``$schema``
+ property allows automatic validation and autocomplete in editors that support JSON
+ schema.
+ """
+ _schema = {'$ref': '#/definitions/TopLevelNormalizedHConcatSpec<GenericSpec>'}
+
+ def __init__(self, hconcat=Undefined, autosize=Undefined, background=Undefined, bounds=Undefined,
+ center=Undefined, config=Undefined, data=Undefined, datasets=Undefined,
+ description=Undefined, name=Undefined, padding=Undefined, params=Undefined,
+ resolve=Undefined, spacing=Undefined, title=Undefined, transform=Undefined,
+ usermeta=Undefined, **kwds):
+ super(TopLevelNormalizedHConcatSpecGenericSpec, self).__init__(hconcat=hconcat,
+ autosize=autosize,
+ background=background,
+ bounds=bounds, center=center,
+ config=config, data=data,
+ datasets=datasets,
+ description=description,
+ name=name, padding=padding,
+ params=params, resolve=resolve,
+ spacing=spacing, title=title,
+ transform=transform,
+ usermeta=usermeta, **kwds)
+
+
+class TopLevelNormalizedVConcatSpecGenericSpec(TopLevelSpec):
+ """TopLevelNormalizedVConcatSpecGenericSpec schema wrapper
+
+ Mapping(required=[vconcat])
+
+ Attributes
+ ----------
+
+ vconcat : List(:class:`NormalizedSpec`)
+ A list of views to be concatenated and put into a column.
+ autosize : anyOf(:class:`AutosizeType`, :class:`AutoSizeParams`)
+ How the visualization size should be determined. If a string, should be one of
+ ``"pad"``, ``"fit"`` or ``"none"``. Object values can additionally specify
+ parameters for content sizing and automatic resizing.
+
+ **Default value** : ``pad``
+ background : anyOf(:class:`Color`, :class:`ExprRef`)
+ CSS color property to use as the background of the entire view.
+
+ **Default value:** ``"white"``
+ bounds : enum('full', 'flush')
+ The bounds calculation method to use for determining the extent of a sub-plot. One
+ of ``full`` (the default) or ``flush``.
+
+
+ * If set to ``full``, the entire calculated bounds (including axes, title, and
+ legend) will be used. - If set to ``flush``, only the specified width and height
+ values for the sub-view will be used. The ``flush`` setting can be useful when
+ attempting to place sub-plots without axes or legends into a uniform grid
+ structure.
+
+ **Default value:** ``"full"``
+ center : boolean
+ Boolean flag indicating if subviews should be centered relative to their respective
+ rows or columns.
+
+ **Default value:** ``false``
+ config : :class:`Config`
+ Vega-Lite configuration object. This property can only be defined at the top-level
+ of a specification.
+ data : anyOf(:class:`Data`, None)
+ An object describing the data source. Set to ``null`` to ignore the parent's data
+ source. If no data is set, it is derived from the parent.
+ datasets : :class:`Datasets`
+ A global data store for named datasets. This is a mapping from names to inline
+ datasets. This can be an array of objects or primitive values or a string. Arrays of
+ primitive values are ingested as objects with a ``data`` property.
+ description : string
+ Description of this mark for commenting purpose.
+ name : string
+ Name of the visualization for later reference.
+ padding : anyOf(:class:`Padding`, :class:`ExprRef`)
+ The default visualization padding, in pixels, from the edge of the visualization
+ canvas to the data rectangle. If a number, specifies padding for all sides. If an
+ object, the value should have the format ``{"left": 5, "top": 5, "right": 5,
+ "bottom": 5}`` to specify padding for each side of the visualization.
+
+ **Default value** : ``5``
+ params : List(:class:`Parameter`)
+ Dynamic variables that parameterize a visualization.
+ resolve : :class:`Resolve`
+ Scale, axis, and legend resolutions for view composition specifications.
+ spacing : float
+ The spacing in pixels between sub-views of the concat operator.
+
+ **Default value** : ``10``
+ title : anyOf(:class:`Text`, :class:`TitleParams`)
+ Title for the plot.
+ transform : List(:class:`Transform`)
+ An array of data transformations such as filter and new field calculation.
+ usermeta : :class:`Dictunknown`
+ Optional metadata that will be passed to Vega. This object is completely ignored by
+ Vega and Vega-Lite and can be used for custom metadata.
+ $schema : string
+ URL to `JSON schema <http://json-schema.org/>`__ for a Vega-Lite specification.
+ Unless you have a reason to change this, use
+ ``https://vega.github.io/schema/vega-lite/v4.json``. Setting the ``$schema``
+ property allows automatic validation and autocomplete in editors that support JSON
+ schema.
+ """
+ _schema = {'$ref': '#/definitions/TopLevelNormalizedVConcatSpec<GenericSpec>'}
+
+ def __init__(self, vconcat=Undefined, autosize=Undefined, background=Undefined, bounds=Undefined,
+ center=Undefined, config=Undefined, data=Undefined, datasets=Undefined,
+ description=Undefined, name=Undefined, padding=Undefined, params=Undefined,
+ resolve=Undefined, spacing=Undefined, title=Undefined, transform=Undefined,
+ usermeta=Undefined, **kwds):
+ super(TopLevelNormalizedVConcatSpecGenericSpec, self).__init__(vconcat=vconcat,
+ autosize=autosize,
+ background=background,
+ bounds=bounds, center=center,
+ config=config, data=data,
+ datasets=datasets,
+ description=description,
+ name=name, padding=padding,
+ params=params, resolve=resolve,
+ spacing=spacing, title=title,
+ transform=transform,
+ usermeta=usermeta, **kwds)
+
+
+class TopLevelRepeatSpec(TopLevelSpec):
+ """TopLevelRepeatSpec schema wrapper
+
+ anyOf(Mapping(required=[repeat, spec]), Mapping(required=[repeat, spec]))
+ """
+ _schema = {'$ref': '#/definitions/TopLevelRepeatSpec'}
+
+ def __init__(self, *args, **kwds):
+ super(TopLevelRepeatSpec, self).__init__(*args, **kwds)
+
+
+class TopLevelUnitSpec(TopLevelSpec):
+ """TopLevelUnitSpec schema wrapper
+
+ Mapping(required=[data, mark])
+
+ Attributes
+ ----------
+
+ data : anyOf(:class:`Data`, None)
+ An object describing the data source. Set to ``null`` to ignore the parent's data
+ source. If no data is set, it is derived from the parent.
+ mark : :class:`AnyMark`
+ A string describing the mark type (one of ``"bar"``, ``"circle"``, ``"square"``,
+ ``"tick"``, ``"line"``, ``"area"``, ``"point"``, ``"rule"``, ``"geoshape"``, and
+ ``"text"`` ) or a `mark definition object
+ <https://vega.github.io/vega-lite/docs/mark.html#mark-def>`__.
+ align : anyOf(:class:`LayoutAlign`, :class:`RowColLayoutAlign`)
+ The alignment to apply to grid rows and columns. The supported string values are
+ ``"all"``, ``"each"``, and ``"none"``.
+
+
+ * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply
+ placed one after the other. - For ``"each"``, subviews will be aligned into a
+ clean grid structure, but each row or column may be of variable size. - For
+ ``"all"``, subviews will be aligned and each row or column will be sized
+ identically based on the maximum observed size. String values for this property
+ will be applied to both grid rows and columns.
+
+ Alternatively, an object value of the form ``{"row": string, "column": string}`` can
+ be used to supply different alignments for rows and columns.
+
+ **Default value:** ``"all"``.
+ autosize : anyOf(:class:`AutosizeType`, :class:`AutoSizeParams`)
+ How the visualization size should be determined. If a string, should be one of
+ ``"pad"``, ``"fit"`` or ``"none"``. Object values can additionally specify
+ parameters for content sizing and automatic resizing.
+
+ **Default value** : ``pad``
+ background : anyOf(:class:`Color`, :class:`ExprRef`)
+ CSS color property to use as the background of the entire view.
+
+ **Default value:** ``"white"``
+ bounds : enum('full', 'flush')
+ The bounds calculation method to use for determining the extent of a sub-plot. One
+ of ``full`` (the default) or ``flush``.
+
+
+ * If set to ``full``, the entire calculated bounds (including axes, title, and
+ legend) will be used. - If set to ``flush``, only the specified width and height
+ values for the sub-view will be used. The ``flush`` setting can be useful when
+ attempting to place sub-plots without axes or legends into a uniform grid
+ structure.
+
+ **Default value:** ``"full"``
+ center : anyOf(boolean, :class:`RowColboolean`)
+ Boolean flag indicating if subviews should be centered relative to their respective
+ rows or columns.
+
+ An object value of the form ``{"row": boolean, "column": boolean}`` can be used to
+ supply different centering values for rows and columns.
+
+ **Default value:** ``false``
+ config : :class:`Config`
+ Vega-Lite configuration object. This property can only be defined at the top-level
+ of a specification.
+ datasets : :class:`Datasets`
+ A global data store for named datasets. This is a mapping from names to inline
+ datasets. This can be an array of objects or primitive values or a string. Arrays of
+ primitive values are ingested as objects with a ``data`` property.
+ description : string
+ Description of this mark for commenting purpose.
+ encoding : :class:`FacetedEncoding`
+ A key-value mapping between encoding channels and definition of fields.
+ height : anyOf(float, string, :class:`Step`)
+ The height of a visualization.
+
+
+ * For a plot with a continuous y-field, height should be a number. - For a plot with
+ either a discrete y-field or no y-field, height can be either a number indicating
+ a fixed height or an object in the form of ``{step: number}`` defining the height
+ per discrete step. (No y-field is equivalent to having one discrete step.) - To
+ enable responsive sizing on height, it should be set to ``"container"``.
+
+ **Default value:** Based on ``config.view.continuousHeight`` for a plot with a
+ continuous y-field and ``config.view.discreteHeight`` otherwise.
+
+ **Note:** For plots with `row and column channels
+ <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the
+ height of a single view and the ``"container"`` option cannot be used.
+
+ **See also:** `height <https://vega.github.io/vega-lite/docs/size.html>`__
+ documentation.
+ name : string
+ Name of the visualization for later reference.
+ padding : anyOf(:class:`Padding`, :class:`ExprRef`)
+ The default visualization padding, in pixels, from the edge of the visualization
+ canvas to the data rectangle. If a number, specifies padding for all sides. If an
+ object, the value should have the format ``{"left": 5, "top": 5, "right": 5,
+ "bottom": 5}`` to specify padding for each side of the visualization.
+
+ **Default value** : ``5``
+ params : List(:class:`Parameter`)
+ Dynamic variables that parameterize a visualization.
+ projection : :class:`Projection`
+ An object defining properties of geographic projection, which will be applied to
+ ``shape`` path for ``"geoshape"`` marks and to ``latitude`` and ``"longitude"``
+ channels for other marks.
+ resolve : :class:`Resolve`
+ Scale, axis, and legend resolutions for view composition specifications.
+ selection : Mapping(required=[])
+ A key-value mapping between selection names and definitions.
+ spacing : anyOf(float, :class:`RowColnumber`)
+ The spacing in pixels between sub-views of the composition operator. An object of
+ the form ``{"row": number, "column": number}`` can be used to set different spacing
+ values for rows and columns.
+
+ **Default value** : Depends on ``"spacing"`` property of `the view composition
+ configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__ (
+ ``20`` by default)
+ title : anyOf(:class:`Text`, :class:`TitleParams`)
+ Title for the plot.
+ transform : List(:class:`Transform`)
+ An array of data transformations such as filter and new field calculation.
+ usermeta : :class:`Dictunknown`
+ Optional metadata that will be passed to Vega. This object is completely ignored by
+ Vega and Vega-Lite and can be used for custom metadata.
+ view : :class:`ViewBackground`
+ An object defining the view background's fill and stroke.
+
+ **Default value:** none (transparent)
+ width : anyOf(float, string, :class:`Step`)
+ The width of a visualization.
+
+
+ * For a plot with a continuous x-field, width should be a number. - For a plot with
+ either a discrete x-field or no x-field, width can be either a number indicating a
+ fixed width or an object in the form of ``{step: number}`` defining the width per
+ discrete step. (No x-field is equivalent to having one discrete step.) - To enable
+ responsive sizing on width, it should be set to ``"container"``.
+
+ **Default value:** Based on ``config.view.continuousWidth`` for a plot with a
+ continuous x-field and ``config.view.discreteWidth`` otherwise.
+
+ **Note:** For plots with `row and column channels
+ <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the
+ width of a single view and the ``"container"`` option cannot be used.
+
+ **See also:** `width <https://vega.github.io/vega-lite/docs/size.html>`__
+ documentation.
+ $schema : string
+ URL to `JSON schema <http://json-schema.org/>`__ for a Vega-Lite specification.
+ Unless you have a reason to change this, use
+ ``https://vega.github.io/schema/vega-lite/v4.json``. Setting the ``$schema``
+ property allows automatic validation and autocomplete in editors that support JSON
+ schema.
+ """
+ _schema = {'$ref': '#/definitions/TopLevelUnitSpec'}
+
+ def __init__(self, data=Undefined, mark=Undefined, align=Undefined, autosize=Undefined,
+ background=Undefined, bounds=Undefined, center=Undefined, config=Undefined,
+ datasets=Undefined, description=Undefined, encoding=Undefined, height=Undefined,
+ name=Undefined, padding=Undefined, params=Undefined, projection=Undefined,
+ resolve=Undefined, selection=Undefined, spacing=Undefined, title=Undefined,
+ transform=Undefined, usermeta=Undefined, view=Undefined, width=Undefined, **kwds):
+ super(TopLevelUnitSpec, self).__init__(data=data, mark=mark, align=align, autosize=autosize,
+ background=background, bounds=bounds, center=center,
+ config=config, datasets=datasets,
+ description=description, encoding=encoding,
+ height=height, name=name, padding=padding, params=params,
+ projection=projection, resolve=resolve,
+ selection=selection, spacing=spacing, title=title,
+ transform=transform, usermeta=usermeta, view=view,
+ width=width, **kwds)
+
+
+class TopoDataFormat(DataFormat):
+ """TopoDataFormat schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ feature : string
+ The name of the TopoJSON object set to convert to a GeoJSON feature collection. For
+ example, in a map of the world, there may be an object set named ``"countries"``.
+ Using the feature property, we can extract this set and generate a GeoJSON feature
+ object for each country.
+ mesh : string
+ The name of the TopoJSON object set to convert to mesh. Similar to the ``feature``
+ option, ``mesh`` extracts a named TopoJSON object set. Unlike the ``feature``
+ option, the corresponding geo data is returned as a single, unified mesh instance,
+ not as individual GeoJSON features. Extracting a mesh is useful for more efficiently
+ drawing borders or other geographic elements that you do not need to associate with
+ specific regions such as individual countries, states or counties.
+ parse : anyOf(:class:`Parse`, None)
+ If set to ``null``, disable type inference based on the spec and only use type
+ inference based on the data. Alternatively, a parsing directive object can be
+ provided for explicit data types. Each property of the object corresponds to a field
+ name, and the value to the desired data type (one of ``"number"``, ``"boolean"``,
+ ``"date"``, or null (do not parse the field)). For example, ``"parse":
+ {"modified_on": "date"}`` parses the ``modified_on`` field in each input record a
+ Date value.
+
+ For ``"date"``, we parse data based using Javascript's `Date.parse()
+ <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse>`__.
+ For Specific date formats can be provided (e.g., ``{foo: "date:'%m%d%Y'"}`` ), using
+ the `d3-time-format syntax <https://github.com/d3/d3-time-format#locale_format>`__.
+ UTC date format parsing is supported similarly (e.g., ``{foo: "utc:'%m%d%Y'"}`` ).
+ See more about `UTC time
+ <https://vega.github.io/vega-lite/docs/timeunit.html#utc>`__
+ type : string
+ Type of input data: ``"json"``, ``"csv"``, ``"tsv"``, ``"dsv"``.
+
+ **Default value:** The default format type is determined by the extension of the
+ file URL. If no extension is detected, ``"json"`` will be used by default.
+ """
+ _schema = {'$ref': '#/definitions/TopoDataFormat'}
+
+ def __init__(self, feature=Undefined, mesh=Undefined, parse=Undefined, type=Undefined, **kwds):
+ super(TopoDataFormat, self).__init__(feature=feature, mesh=mesh, parse=parse, type=type, **kwds)
+
+
+class Transform(VegaLiteSchema):
+ """Transform schema wrapper
+
+ anyOf(:class:`AggregateTransform`, :class:`BinTransform`, :class:`CalculateTransform`,
+ :class:`DensityTransform`, :class:`FilterTransform`, :class:`FlattenTransform`,
+ :class:`FoldTransform`, :class:`ImputeTransform`, :class:`JoinAggregateTransform`,
+ :class:`LoessTransform`, :class:`LookupTransform`, :class:`QuantileTransform`,
+ :class:`RegressionTransform`, :class:`TimeUnitTransform`, :class:`SampleTransform`,
+ :class:`StackTransform`, :class:`WindowTransform`, :class:`PivotTransform`)
+ """
+ _schema = {'$ref': '#/definitions/Transform'}
+
+ def __init__(self, *args, **kwds):
+ super(Transform, self).__init__(*args, **kwds)
+
+
+class AggregateTransform(Transform):
+ """AggregateTransform schema wrapper
+
+ Mapping(required=[aggregate])
+
+ Attributes
+ ----------
+
+ aggregate : List(:class:`AggregatedFieldDef`)
+ Array of objects that define fields to aggregate.
+ groupby : List(:class:`FieldName`)
+ The data fields to group by. If not specified, a single group containing all data
+ objects will be used.
+ """
+ _schema = {'$ref': '#/definitions/AggregateTransform'}
+
+ def __init__(self, aggregate=Undefined, groupby=Undefined, **kwds):
+ super(AggregateTransform, self).__init__(aggregate=aggregate, groupby=groupby, **kwds)
+
+
+class BinTransform(Transform):
+ """BinTransform schema wrapper
+
+ Mapping(required=[bin, field, as])
+
+ Attributes
+ ----------
+
+ bin : anyOf(boolean, :class:`BinParams`)
+ An object indicating bin properties, or simply ``true`` for using default bin
+ parameters.
+ field : :class:`FieldName`
+ The data field to bin.
+ as : anyOf(:class:`FieldName`, List(:class:`FieldName`))
+ The output fields at which to write the start and end bin values. This can be either
+ a string or an array of strings with two elements denoting the name for the fields
+ for bin start and bin end respectively. If a single string (e.g., ``"val"`` ) is
+ provided, the end field will be ``"val_end"``.
+ """
+ _schema = {'$ref': '#/definitions/BinTransform'}
+
+ def __init__(self, bin=Undefined, field=Undefined, **kwds):
+ super(BinTransform, self).__init__(bin=bin, field=field, **kwds)
+
+
+class CalculateTransform(Transform):
+ """CalculateTransform schema wrapper
+
+ Mapping(required=[calculate, as])
+
+ Attributes
+ ----------
+
+ calculate : string
+ A `expression <https://vega.github.io/vega-lite/docs/types.html#expression>`__
+ string. Use the variable ``datum`` to refer to the current data object.
+ as : :class:`FieldName`
+ The field for storing the computed formula value.
+ """
+ _schema = {'$ref': '#/definitions/CalculateTransform'}
+
+ def __init__(self, calculate=Undefined, **kwds):
+ super(CalculateTransform, self).__init__(calculate=calculate, **kwds)
+
+
+class DensityTransform(Transform):
+ """DensityTransform schema wrapper
+
+ Mapping(required=[density])
+
+ Attributes
+ ----------
+
+ density : :class:`FieldName`
+ The data field for which to perform density estimation.
+ bandwidth : float
+ The bandwidth (standard deviation) of the Gaussian kernel. If unspecified or set to
+ zero, the bandwidth value is automatically estimated from the input data using
+ Scott’s rule.
+ counts : boolean
+ A boolean flag indicating if the output values should be probability estimates
+ (false) or smoothed counts (true).
+
+ **Default value:** ``false``
+ cumulative : boolean
+ A boolean flag indicating whether to produce density estimates (false) or cumulative
+ density estimates (true).
+
+ **Default value:** ``false``
+ extent : List([float, float])
+ A [min, max] domain from which to sample the distribution. If unspecified, the
+ extent will be determined by the observed minimum and maximum values of the density
+ value field.
+ groupby : List(:class:`FieldName`)
+ The data fields to group by. If not specified, a single group containing all data
+ objects will be used.
+ maxsteps : float
+ The maximum number of samples to take along the extent domain for plotting the
+ density.
+
+ **Default value:** ``200``
+ minsteps : float
+ The minimum number of samples to take along the extent domain for plotting the
+ density.
+
+ **Default value:** ``25``
+ steps : float
+ The exact number of samples to take along the extent domain for plotting the
+ density. If specified, overrides both minsteps and maxsteps to set an exact number
+ of uniform samples. Potentially useful in conjunction with a fixed extent to ensure
+ consistent sample points for stacked densities.
+ as : List([:class:`FieldName`, :class:`FieldName`])
+ The output fields for the sample value and corresponding density estimate.
+
+ **Default value:** ``["value", "density"]``
+ """
+ _schema = {'$ref': '#/definitions/DensityTransform'}
+
+ def __init__(self, density=Undefined, bandwidth=Undefined, counts=Undefined, cumulative=Undefined,
+ extent=Undefined, groupby=Undefined, maxsteps=Undefined, minsteps=Undefined,
+ steps=Undefined, **kwds):
+ super(DensityTransform, self).__init__(density=density, bandwidth=bandwidth, counts=counts,
+ cumulative=cumulative, extent=extent, groupby=groupby,
+ maxsteps=maxsteps, minsteps=minsteps, steps=steps, **kwds)
+
+
+class FilterTransform(Transform):
+ """FilterTransform schema wrapper
+
+ Mapping(required=[filter])
+
+ Attributes
+ ----------
+
+ filter : :class:`PredicateComposition`
+ The ``filter`` property must be a predication definition, which can take one of the
+ following forms:
+
+ 1) an `expression <https://vega.github.io/vega-lite/docs/types.html#expression>`__
+ string, where ``datum`` can be used to refer to the current data object. For
+ example, ``{filter: "datum.b2 > 60"}`` would make the output data includes only
+ items that have values in the field ``b2`` over 60.
+
+ 2) one of the `field predicates
+ <https://vega.github.io/vega-lite/docs/predicate.html#field-predicate>`__ : `equal
+ <https://vega.github.io/vega-lite/docs/predicate.html#field-equal-predicate>`__, `lt
+ <https://vega.github.io/vega-lite/docs/predicate.html#lt-predicate>`__, `lte
+ <https://vega.github.io/vega-lite/docs/predicate.html#lte-predicate>`__, `gt
+ <https://vega.github.io/vega-lite/docs/predicate.html#gt-predicate>`__, `gte
+ <https://vega.github.io/vega-lite/docs/predicate.html#gte-predicate>`__, `range
+ <https://vega.github.io/vega-lite/docs/predicate.html#range-predicate>`__, `oneOf
+ <https://vega.github.io/vega-lite/docs/predicate.html#one-of-predicate>`__, or
+ `valid <https://vega.github.io/vega-lite/docs/predicate.html#valid-predicate>`__,
+
+ 3) a `selection predicate
+ <https://vega.github.io/vega-lite/docs/predicate.html#selection-predicate>`__, which
+ define the names of a selection that the data point should belong to (or a logical
+ composition of selections).
+
+ 4) a `logical composition
+ <https://vega.github.io/vega-lite/docs/predicate.html#composition>`__ of (1), (2),
+ or (3).
+ """
+ _schema = {'$ref': '#/definitions/FilterTransform'}
+
+ def __init__(self, filter=Undefined, **kwds):
+ super(FilterTransform, self).__init__(filter=filter, **kwds)
+
+
+class FlattenTransform(Transform):
+ """FlattenTransform schema wrapper
+
+ Mapping(required=[flatten])
+
+ Attributes
+ ----------
+
+ flatten : List(:class:`FieldName`)
+ An array of one or more data fields containing arrays to flatten. If multiple fields
+ are specified, their array values should have a parallel structure, ideally with the
+ same length. If the lengths of parallel arrays do not match, the longest array will
+ be used with ``null`` values added for missing entries.
+ as : List(:class:`FieldName`)
+ The output field names for extracted array values.
+
+ **Default value:** The field name of the corresponding array field
+ """
+ _schema = {'$ref': '#/definitions/FlattenTransform'}
+
+ def __init__(self, flatten=Undefined, **kwds):
+ super(FlattenTransform, self).__init__(flatten=flatten, **kwds)
+
+
+class FoldTransform(Transform):
+ """FoldTransform schema wrapper
+
+ Mapping(required=[fold])
+
+ Attributes
+ ----------
+
+ fold : List(:class:`FieldName`)
+ An array of data fields indicating the properties to fold.
+ as : List([:class:`FieldName`, :class:`FieldName`])
+ The output field names for the key and value properties produced by the fold
+ transform. **Default value:** ``["key", "value"]``
+ """
+ _schema = {'$ref': '#/definitions/FoldTransform'}
+
+ def __init__(self, fold=Undefined, **kwds):
+ super(FoldTransform, self).__init__(fold=fold, **kwds)
+
+
+class ImputeTransform(Transform):
+ """ImputeTransform schema wrapper
+
+ Mapping(required=[impute, key])
+
+ Attributes
+ ----------
+
+ impute : :class:`FieldName`
+ The data field for which the missing values should be imputed.
+ key : :class:`FieldName`
+ A key field that uniquely identifies data objects within a group. Missing key values
+ (those occurring in the data but not in the current group) will be imputed.
+ frame : List([anyOf(None, float), anyOf(None, float)])
+ A frame specification as a two-element array used to control the window over which
+ the specified method is applied. The array entries should either be a number
+ indicating the offset from the current data object, or null to indicate unbounded
+ rows preceding or following the current data object. For example, the value ``[-5,
+ 5]`` indicates that the window should include five objects preceding and five
+ objects following the current object.
+
+ **Default value:** : ``[null, null]`` indicating that the window includes all
+ objects.
+ groupby : List(:class:`FieldName`)
+ An optional array of fields by which to group the values. Imputation will then be
+ performed on a per-group basis.
+ keyvals : anyOf(List(Any), :class:`ImputeSequence`)
+ Defines the key values that should be considered for imputation. An array of key
+ values or an object defining a `number sequence
+ <https://vega.github.io/vega-lite/docs/impute.html#sequence-def>`__.
+
+ If provided, this will be used in addition to the key values observed within the
+ input data. If not provided, the values will be derived from all unique values of
+ the ``key`` field. For ``impute`` in ``encoding``, the key field is the x-field if
+ the y-field is imputed, or vice versa.
+
+ If there is no impute grouping, this property *must* be specified.
+ method : :class:`ImputeMethod`
+ The imputation method to use for the field value of imputed data objects. One of
+ ``"value"``, ``"mean"``, ``"median"``, ``"max"`` or ``"min"``.
+
+ **Default value:** ``"value"``
+ value : Any
+ The field value to use when the imputation ``method`` is ``"value"``.
+ """
+ _schema = {'$ref': '#/definitions/ImputeTransform'}
+
+ def __init__(self, impute=Undefined, key=Undefined, frame=Undefined, groupby=Undefined,
+ keyvals=Undefined, method=Undefined, value=Undefined, **kwds):
+ super(ImputeTransform, self).__init__(impute=impute, key=key, frame=frame, groupby=groupby,
+ keyvals=keyvals, method=method, value=value, **kwds)
+
+
+class JoinAggregateTransform(Transform):
+ """JoinAggregateTransform schema wrapper
+
+ Mapping(required=[joinaggregate])
+
+ Attributes
+ ----------
+
+ joinaggregate : List(:class:`JoinAggregateFieldDef`)
+ The definition of the fields in the join aggregate, and what calculations to use.
+ groupby : List(:class:`FieldName`)
+ The data fields for partitioning the data objects into separate groups. If
+ unspecified, all data points will be in a single group.
+ """
+ _schema = {'$ref': '#/definitions/JoinAggregateTransform'}
+
+ def __init__(self, joinaggregate=Undefined, groupby=Undefined, **kwds):
+ super(JoinAggregateTransform, self).__init__(joinaggregate=joinaggregate, groupby=groupby,
+ **kwds)
+
+
+class LoessTransform(Transform):
+ """LoessTransform schema wrapper
+
+ Mapping(required=[loess, on])
+
+ Attributes
+ ----------
+
+ loess : :class:`FieldName`
+ The data field of the dependent variable to smooth.
+ on : :class:`FieldName`
+ The data field of the independent variable to use a predictor.
+ bandwidth : float
+ A bandwidth parameter in the range ``[0, 1]`` that determines the amount of
+ smoothing.
+
+ **Default value:** ``0.3``
+ groupby : List(:class:`FieldName`)
+ The data fields to group by. If not specified, a single group containing all data
+ objects will be used.
+ as : List([:class:`FieldName`, :class:`FieldName`])
+ The output field names for the smoothed points generated by the loess transform.
+
+ **Default value:** The field names of the input x and y values.
+ """
+ _schema = {'$ref': '#/definitions/LoessTransform'}
+
+ def __init__(self, loess=Undefined, on=Undefined, bandwidth=Undefined, groupby=Undefined, **kwds):
+ super(LoessTransform, self).__init__(loess=loess, on=on, bandwidth=bandwidth, groupby=groupby,
+ **kwds)
+
+
+class LookupTransform(Transform):
+ """LookupTransform schema wrapper
+
+ Mapping(required=[lookup, from])
+
+ Attributes
+ ----------
+
+ lookup : string
+ Key in primary data source.
+ default : string
+ The default value to use if lookup fails.
+
+ **Default value:** ``null``
+ as : anyOf(:class:`FieldName`, List(:class:`FieldName`))
+ The output fields on which to store the looked up data values.
+
+ For data lookups, this property may be left blank if ``from.fields`` has been
+ specified (those field names will be used); if ``from.fields`` has not been
+ specified, ``as`` must be a string.
+
+ For selection lookups, this property is optional: if unspecified, looked up values
+ will be stored under a property named for the selection; and if specified, it must
+ correspond to ``from.fields``.
+ from : anyOf(:class:`LookupData`, :class:`LookupSelection`)
+ Data source or selection for secondary data reference.
+ """
+ _schema = {'$ref': '#/definitions/LookupTransform'}
+
+ def __init__(self, lookup=Undefined, default=Undefined, **kwds):
+ super(LookupTransform, self).__init__(lookup=lookup, default=default, **kwds)
+
+
+class PivotTransform(Transform):
+ """PivotTransform schema wrapper
+
+ Mapping(required=[pivot, value])
+
+ Attributes
+ ----------
+
+ pivot : :class:`FieldName`
+ The data field to pivot on. The unique values of this field become new field names
+ in the output stream.
+ value : :class:`FieldName`
+ The data field to populate pivoted fields. The aggregate values of this field become
+ the values of the new pivoted fields.
+ groupby : List(:class:`FieldName`)
+ The optional data fields to group by. If not specified, a single group containing
+ all data objects will be used.
+ limit : float
+ An optional parameter indicating the maximum number of pivoted fields to generate.
+ The default ( ``0`` ) applies no limit. The pivoted ``pivot`` names are sorted in
+ ascending order prior to enforcing the limit. **Default value:** ``0``
+ op : string
+ The aggregation operation to apply to grouped ``value`` field values. **Default
+ value:** ``sum``
+ """
+ _schema = {'$ref': '#/definitions/PivotTransform'}
+
+ def __init__(self, pivot=Undefined, value=Undefined, groupby=Undefined, limit=Undefined,
+ op=Undefined, **kwds):
+ super(PivotTransform, self).__init__(pivot=pivot, value=value, groupby=groupby, limit=limit,
+ op=op, **kwds)
+
+
+class QuantileTransform(Transform):
+ """QuantileTransform schema wrapper
+
+ Mapping(required=[quantile])
+
+ Attributes
+ ----------
+
+ quantile : :class:`FieldName`
+ The data field for which to perform quantile estimation.
+ groupby : List(:class:`FieldName`)
+ The data fields to group by. If not specified, a single group containing all data
+ objects will be used.
+ probs : List(float)
+ An array of probabilities in the range (0, 1) for which to compute quantile values.
+ If not specified, the *step* parameter will be used.
+ step : float
+ A probability step size (default 0.01) for sampling quantile values. All values from
+ one-half the step size up to 1 (exclusive) will be sampled. This parameter is only
+ used if the *probs* parameter is not provided.
+ as : List([:class:`FieldName`, :class:`FieldName`])
+ The output field names for the probability and quantile values.
+
+ **Default value:** ``["prob", "value"]``
+ """
+ _schema = {'$ref': '#/definitions/QuantileTransform'}
+
+ def __init__(self, quantile=Undefined, groupby=Undefined, probs=Undefined, step=Undefined, **kwds):
+ super(QuantileTransform, self).__init__(quantile=quantile, groupby=groupby, probs=probs,
+ step=step, **kwds)
+
+
+class RegressionTransform(Transform):
+ """RegressionTransform schema wrapper
+
+ Mapping(required=[regression, on])
+
+ Attributes
+ ----------
+
+ on : :class:`FieldName`
+ The data field of the independent variable to use a predictor.
+ regression : :class:`FieldName`
+ The data field of the dependent variable to predict.
+ extent : List([float, float])
+ A [min, max] domain over the independent (x) field for the starting and ending
+ points of the generated trend line.
+ groupby : List(:class:`FieldName`)
+ The data fields to group by. If not specified, a single group containing all data
+ objects will be used.
+ method : enum('linear', 'log', 'exp', 'pow', 'quad', 'poly')
+ The functional form of the regression model. One of ``"linear"``, ``"log"``,
+ ``"exp"``, ``"pow"``, ``"quad"``, or ``"poly"``.
+
+ **Default value:** ``"linear"``
+ order : float
+ The polynomial order (number of coefficients) for the 'poly' method.
+
+ **Default value:** ``3``
+ params : boolean
+ A boolean flag indicating if the transform should return the regression model
+ parameters (one object per group), rather than trend line points. The resulting
+ objects include a ``coef`` array of fitted coefficient values (starting with the
+ intercept term and then including terms of increasing order) and an ``rSquared``
+ value (indicating the total variance explained by the model).
+
+ **Default value:** ``false``
+ as : List([:class:`FieldName`, :class:`FieldName`])
+ The output field names for the smoothed points generated by the regression
+ transform.
+
+ **Default value:** The field names of the input x and y values.
+ """
+ _schema = {'$ref': '#/definitions/RegressionTransform'}
+
+ def __init__(self, on=Undefined, regression=Undefined, extent=Undefined, groupby=Undefined,
+ method=Undefined, order=Undefined, params=Undefined, **kwds):
+ super(RegressionTransform, self).__init__(on=on, regression=regression, extent=extent,
+ groupby=groupby, method=method, order=order,
+ params=params, **kwds)
+
+
+class SampleTransform(Transform):
+ """SampleTransform schema wrapper
+
+ Mapping(required=[sample])
+
+ Attributes
+ ----------
+
+ sample : float
+ The maximum number of data objects to include in the sample.
+
+ **Default value:** ``1000``
+ """
+ _schema = {'$ref': '#/definitions/SampleTransform'}
+
+ def __init__(self, sample=Undefined, **kwds):
+ super(SampleTransform, self).__init__(sample=sample, **kwds)
+
+
+class StackTransform(Transform):
+ """StackTransform schema wrapper
+
+ Mapping(required=[stack, groupby, as])
+
+ Attributes
+ ----------
+
+ groupby : List(:class:`FieldName`)
+ The data fields to group by.
+ stack : :class:`FieldName`
+ The field which is stacked.
+ offset : enum('zero', 'center', 'normalize')
+ Mode for stacking marks. One of ``"zero"`` (default), ``"center"``, or
+ ``"normalize"``. The ``"zero"`` offset will stack starting at ``0``. The
+ ``"center"`` offset will center the stacks. The ``"normalize"`` offset will compute
+ percentage values for each stack point, with output values in the range ``[0,1]``.
+
+ **Default value:** ``"zero"``
+ sort : List(:class:`SortField`)
+ Field that determines the order of leaves in the stacked charts.
+ as : anyOf(:class:`FieldName`, List([:class:`FieldName`, :class:`FieldName`]))
+ Output field names. This can be either a string or an array of strings with two
+ elements denoting the name for the fields for stack start and stack end
+ respectively. If a single string(e.g., ``"val"`` ) is provided, the end field will
+ be ``"val_end"``.
+ """
+ _schema = {'$ref': '#/definitions/StackTransform'}
+
+ def __init__(self, groupby=Undefined, stack=Undefined, offset=Undefined, sort=Undefined, **kwds):
+ super(StackTransform, self).__init__(groupby=groupby, stack=stack, offset=offset, sort=sort,
+ **kwds)
+
+
+class TimeUnitTransform(Transform):
+ """TimeUnitTransform schema wrapper
+
+ Mapping(required=[timeUnit, field, as])
+
+ Attributes
+ ----------
+
+ field : :class:`FieldName`
+ The data field to apply time unit.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ The timeUnit.
+ as : :class:`FieldName`
+ The output field to write the timeUnit value.
+ """
+ _schema = {'$ref': '#/definitions/TimeUnitTransform'}
+
+ def __init__(self, field=Undefined, timeUnit=Undefined, **kwds):
+ super(TimeUnitTransform, self).__init__(field=field, timeUnit=timeUnit, **kwds)
+
+
+class Type(VegaLiteSchema):
+ """Type schema wrapper
+
+ enum('quantitative', 'ordinal', 'temporal', 'nominal', 'geojson')
+ Data type based on level of measurement
+ """
+ _schema = {'$ref': '#/definitions/Type'}
+
+ def __init__(self, *args):
+ super(Type, self).__init__(*args)
+
+
+class TypeForShape(VegaLiteSchema):
+ """TypeForShape schema wrapper
+
+ enum('nominal', 'ordinal', 'geojson')
+ """
+ _schema = {'$ref': '#/definitions/TypeForShape'}
+
+ def __init__(self, *args):
+ super(TypeForShape, self).__init__(*args)
+
+
+class TypedFieldDef(VegaLiteSchema):
+ """TypedFieldDef schema wrapper
+
+ Mapping(required=[])
+ Definition object for a data field, its type and transformation of an encoding channel.
+
+ Attributes
+ ----------
+
+ aggregate : :class:`Aggregate`
+ Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
+ ``"min"``, ``"max"``, ``"count"`` ).
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
+ documentation.
+ band : float
+ For rect-based marks ( ``rect``, ``bar``, and ``image`` ), mark size relative to
+ bandwidth of `band scales
+ <https://vega.github.io/vega-lite/docs/scale.html#band>`__, bins or time units. If
+ set to ``1``, the mark size is set to the bandwidth, the bin interval, or the time
+ unit interval. If set to ``0.5``, the mark size is half of the bandwidth or the time
+ unit interval.
+
+ For other marks, relative position on a band of a stacked, binned, time unit or band
+ scale. If set to ``0``, the marks will be positioned at the beginning of the band.
+ If set to ``0.5``, the marks will be positioned in the middle of the band.
+ bin : anyOf(boolean, :class:`BinParams`, string, None)
+ A flag for binning a ``quantitative`` field, `an object defining binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html#params>`__, or indicating that the
+ data for ``x`` or ``y`` channel are binned before they are imported into Vega-Lite (
+ ``"binned"`` ).
+
+
+ If ``true``, default `binning parameters
+ <https://vega.github.io/vega-lite/docs/bin.html>`__ will be applied.
+
+ If ``"binned"``, this indicates that the data for the ``x`` (or ``y`` ) channel are
+ already binned. You can map the bin-start field to ``x`` (or ``y`` ) and the bin-end
+ field to ``x2`` (or ``y2`` ). The scale and axis will be formatted similar to
+ binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also
+ set the axis's `tickMinStep
+ <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.
+
+ **Default value:** ``false``
+
+ **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
+ documentation.
+ field : :class:`Field`
+ **Required.** A string defining the name of the field from which to pull a data
+ value or an object defining iterated values from the `repeat
+ <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.
+
+ **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
+ documentation.
+
+ **Notes:** 1) Dots ( ``.`` ) and brackets ( ``[`` and ``]`` ) can be used to access
+ nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"`` ). If
+ field names contain dots or brackets but are not nested, you can use ``\\`` to
+ escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"`` ). See more details
+ about escaping in the `field documentation
+ <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
+ if ``aggregate`` is ``count``.
+ timeUnit : anyOf(:class:`TimeUnit`, :class:`TimeUnitParams`)
+ Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours`` ) for a temporal
+ field. or `a temporal field that gets casted as ordinal
+ <https://vega.github.io/vega-lite/docs/type.html#cast>`__.
+
+ **Default value:** ``undefined`` (None)
+
+ **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
+ documentation.
+ title : anyOf(:class:`Text`, None)
+ A title for the field. If ``null``, the title will be removed.
+
+ **Default value:** derived from the field's name and transformation function (
+ ``aggregate``, ``bin`` and ``timeUnit`` ). If the field has an aggregate function,
+ the function is displayed as part of the title (e.g., ``"Sum of Profit"`` ). If the
+ field is binned or has a time unit applied, the applied function is shown in
+ parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ).
+ Otherwise, the title is simply the field name.
+
+ **Notes** :
+
+ 1) You can customize the default field title format by providing the `fieldTitle
+ <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
+ the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
+ function via the compile function's options
+ <https://vega.github.io/vega-lite/docs/compile.html#field-title>`__.
+
+ 2) If both field definition's ``title`` and axis, header, or legend ``title`` are
+ defined, axis/header/legend title will be used.
+ type : :class:`StandardType`
+ The type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
+ ``"nominal"`` ) for the encoded field or constant value ( ``datum`` ). It can also
+ be a ``"geojson"`` type for encoding `'geoshape'
+ <https://vega.github.io/vega-lite/docs/geoshape.html>`__.
+
+ Vega-Lite automatically infers data types in many cases as discussed below. However,
+ type is required for a field if: (1) the field is not nominal and the field encoding
+ has no specified ``aggregate`` (except ``argmin`` and ``argmax`` ), ``bin``, scale
+ type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
+ scale for a field with ``bin`` or ``timeUnit``.
+
+ **Default value:**
+
+ 1) For a data ``field``, ``"nominal"`` is the default data type unless the field
+ encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
+ ``timeUnit`` that satisfies the following criteria: - ``"quantitative"`` is the
+ default type if (1) the encoded field contains ``bin`` or ``aggregate`` except
+ ``"argmin"`` and ``"argmax"``, (2) the encoding channel is ``latitude`` or
+ ``longitude`` channel or (3) if the specified scale type is `a quantitative scale
+ <https://vega.github.io/vega-lite/docs/scale.html#type>`__. - ``"temporal"`` is the
+ default type if (1) the encoded field contains ``timeUnit`` or (2) the specified
+ scale type is a time or utc scale - ``ordinal""`` is the default type if (1) the
+ encoded field contains a `custom sort order
+ <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
+ (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
+ channel is ``order``.
+
+ 2) For a constant value in data domain ( ``datum`` ): - ``"quantitative"`` if the
+ datum is a number - ``"nominal"`` if the datum is a string - ``"temporal"`` if the
+ datum is `a date time object
+ <https://vega.github.io/vega-lite/docs/datetime.html>`__
+
+ **Note:** - Data ``type`` describes the semantics of the data rather than the
+ primitive data types (number, string, etc.). The same primitive data type can have
+ different types of measurement. For example, numeric data can represent
+ quantitative, ordinal, or nominal data. - Data values for a temporal field can be
+ either a date-time string (e.g., ``"2015-03-07 12:32:17"``, ``"17:01"``,
+ ``"2015-03-16"``. ``"2015"`` ) or a timestamp number (e.g., ``1552199579097`` ). -
+ When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
+ ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) or
+ `"ordinal" (for using an ordinal bin scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type``
+ property can be either ``"temporal"`` (default, for using a temporal scale) or
+ `"ordinal" (for using an ordinal scale)
+ <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__. - When using with
+ `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type``
+ property refers to the post-aggregation data type. For example, we can calculate
+ count ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate":
+ "distinct", "field": "cat"}``. The ``"type"`` of the aggregate output is
+ ``"quantitative"``. - Secondary channels (e.g., ``x2``, ``y2``, ``xError``,
+ ``yError`` ) do not have ``type`` as they must have exactly the same type as their
+ primary channels (e.g., ``x``, ``y`` ).
+
+ **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
+ documentation.
+ """
+ _schema = {'$ref': '#/definitions/TypedFieldDef'}
+
+ def __init__(self, aggregate=Undefined, band=Undefined, bin=Undefined, field=Undefined,
+ timeUnit=Undefined, title=Undefined, type=Undefined, **kwds):
+ super(TypedFieldDef, self).__init__(aggregate=aggregate, band=band, bin=bin, field=field,
+ timeUnit=timeUnit, title=title, type=type, **kwds)
+
+
+class URI(VegaLiteSchema):
+ """URI schema wrapper
+
+ string
+ """
+ _schema = {'$ref': '#/definitions/URI'}
+
+ def __init__(self, *args):
+ super(URI, self).__init__(*args)
+
+
+class UnitSpec(VegaLiteSchema):
+ """UnitSpec schema wrapper
+
+ Mapping(required=[mark])
+ A unit specification, which can contain either `primitive marks or composite marks
+ <https://vega.github.io/vega-lite/docs/mark.html#types>`__.
+
+ Attributes
+ ----------
+
+ mark : :class:`AnyMark`
+ A string describing the mark type (one of ``"bar"``, ``"circle"``, ``"square"``,
+ ``"tick"``, ``"line"``, ``"area"``, ``"point"``, ``"rule"``, ``"geoshape"``, and
+ ``"text"`` ) or a `mark definition object
+ <https://vega.github.io/vega-lite/docs/mark.html#mark-def>`__.
+ data : anyOf(:class:`Data`, None)
+ An object describing the data source. Set to ``null`` to ignore the parent's data
+ source. If no data is set, it is derived from the parent.
+ description : string
+ Description of this mark for commenting purpose.
+ encoding : :class:`Encoding`
+ A key-value mapping between encoding channels and definition of fields.
+ height : anyOf(float, string, :class:`Step`)
+ **Deprecated:** Please avoid using width in a unit spec that's a part of a layer
+ spec.
+ name : string
+ Name of the visualization for later reference.
+ projection : :class:`Projection`
+ An object defining properties of geographic projection, which will be applied to
+ ``shape`` path for ``"geoshape"`` marks and to ``latitude`` and ``"longitude"``
+ channels for other marks.
+ selection : Mapping(required=[])
+ A key-value mapping between selection names and definitions.
+ title : anyOf(:class:`Text`, :class:`TitleParams`)
+ Title for the plot.
+ transform : List(:class:`Transform`)
+ An array of data transformations such as filter and new field calculation.
+ view : :class:`ViewBackground`
+ **Deprecated:** Please avoid using width in a unit spec that's a part of a layer
+ spec.
+ width : anyOf(float, string, :class:`Step`)
+ **Deprecated:** Please avoid using width in a unit spec that's a part of a layer
+ spec.
+ """
+ _schema = {'$ref': '#/definitions/UnitSpec'}
+
+ def __init__(self, mark=Undefined, data=Undefined, description=Undefined, encoding=Undefined,
+ height=Undefined, name=Undefined, projection=Undefined, selection=Undefined,
+ title=Undefined, transform=Undefined, view=Undefined, width=Undefined, **kwds):
+ super(UnitSpec, self).__init__(mark=mark, data=data, description=description, encoding=encoding,
+ height=height, name=name, projection=projection,
+ selection=selection, title=title, transform=transform, view=view,
+ width=width, **kwds)
+
+
+class UnitSpecWithFrame(VegaLiteSchema):
+ """UnitSpecWithFrame schema wrapper
+
+ Mapping(required=[mark])
+
+ Attributes
+ ----------
+
+ mark : :class:`AnyMark`
+ A string describing the mark type (one of ``"bar"``, ``"circle"``, ``"square"``,
+ ``"tick"``, ``"line"``, ``"area"``, ``"point"``, ``"rule"``, ``"geoshape"``, and
+ ``"text"`` ) or a `mark definition object
+ <https://vega.github.io/vega-lite/docs/mark.html#mark-def>`__.
+ data : anyOf(:class:`Data`, None)
+ An object describing the data source. Set to ``null`` to ignore the parent's data
+ source. If no data is set, it is derived from the parent.
+ description : string
+ Description of this mark for commenting purpose.
+ encoding : :class:`Encoding`
+ A key-value mapping between encoding channels and definition of fields.
+ height : anyOf(float, string, :class:`Step`)
+ The height of a visualization.
+
+
+ * For a plot with a continuous y-field, height should be a number. - For a plot with
+ either a discrete y-field or no y-field, height can be either a number indicating
+ a fixed height or an object in the form of ``{step: number}`` defining the height
+ per discrete step. (No y-field is equivalent to having one discrete step.) - To
+ enable responsive sizing on height, it should be set to ``"container"``.
+
+ **Default value:** Based on ``config.view.continuousHeight`` for a plot with a
+ continuous y-field and ``config.view.discreteHeight`` otherwise.
+
+ **Note:** For plots with `row and column channels
+ <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the
+ height of a single view and the ``"container"`` option cannot be used.
+
+ **See also:** `height <https://vega.github.io/vega-lite/docs/size.html>`__
+ documentation.
+ name : string
+ Name of the visualization for later reference.
+ projection : :class:`Projection`
+ An object defining properties of geographic projection, which will be applied to
+ ``shape`` path for ``"geoshape"`` marks and to ``latitude`` and ``"longitude"``
+ channels for other marks.
+ selection : Mapping(required=[])
+ A key-value mapping between selection names and definitions.
+ title : anyOf(:class:`Text`, :class:`TitleParams`)
+ Title for the plot.
+ transform : List(:class:`Transform`)
+ An array of data transformations such as filter and new field calculation.
+ view : :class:`ViewBackground`
+ An object defining the view background's fill and stroke.
+
+ **Default value:** none (transparent)
+ width : anyOf(float, string, :class:`Step`)
+ The width of a visualization.
+
+
+ * For a plot with a continuous x-field, width should be a number. - For a plot with
+ either a discrete x-field or no x-field, width can be either a number indicating a
+ fixed width or an object in the form of ``{step: number}`` defining the width per
+ discrete step. (No x-field is equivalent to having one discrete step.) - To enable
+ responsive sizing on width, it should be set to ``"container"``.
+
+ **Default value:** Based on ``config.view.continuousWidth`` for a plot with a
+ continuous x-field and ``config.view.discreteWidth`` otherwise.
+
+ **Note:** For plots with `row and column channels
+ <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the
+ width of a single view and the ``"container"`` option cannot be used.
+
+ **See also:** `width <https://vega.github.io/vega-lite/docs/size.html>`__
+ documentation.
+ """
+ _schema = {'$ref': '#/definitions/UnitSpecWithFrame'}
+
+ def __init__(self, mark=Undefined, data=Undefined, description=Undefined, encoding=Undefined,
+ height=Undefined, name=Undefined, projection=Undefined, selection=Undefined,
+ title=Undefined, transform=Undefined, view=Undefined, width=Undefined, **kwds):
+ super(UnitSpecWithFrame, self).__init__(mark=mark, data=data, description=description,
+ encoding=encoding, height=height, name=name,
+ projection=projection, selection=selection, title=title,
+ transform=transform, view=view, width=width, **kwds)
+
+
+class UrlData(DataSource):
+ """UrlData schema wrapper
+
+ Mapping(required=[url])
+
+ Attributes
+ ----------
+
+ url : string
+ An URL from which to load the data set. Use the ``format.type`` property to ensure
+ the loaded data is correctly parsed.
+ format : :class:`DataFormat`
+ An object that specifies the format for parsing the data.
+ name : string
+ Provide a placeholder name and bind data at runtime.
+ """
+ _schema = {'$ref': '#/definitions/UrlData'}
+
+ def __init__(self, url=Undefined, format=Undefined, name=Undefined, **kwds):
+ super(UrlData, self).__init__(url=url, format=format, name=name, **kwds)
+
+
+class UtcMultiTimeUnit(MultiTimeUnit):
+ """UtcMultiTimeUnit schema wrapper
+
+ enum('utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate',
+ 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes',
+ 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday',
+ 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds',
+ 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours',
+ 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday',
+ 'utcweeksdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds',
+ 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes',
+ 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds')
+ """
+ _schema = {'$ref': '#/definitions/UtcMultiTimeUnit'}
+
+ def __init__(self, *args):
+ super(UtcMultiTimeUnit, self).__init__(*args)
+
+
+class UtcSingleTimeUnit(SingleTimeUnit):
+ """UtcSingleTimeUnit schema wrapper
+
+ enum('utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate',
+ 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds')
+ """
+ _schema = {'$ref': '#/definitions/UtcSingleTimeUnit'}
+
+ def __init__(self, *args):
+ super(UtcSingleTimeUnit, self).__init__(*args)
+
+
+class VConcatSpecGenericSpec(Spec):
+ """VConcatSpecGenericSpec schema wrapper
+
+ Mapping(required=[vconcat])
+ Base interface for a vertical concatenation specification.
+
+ Attributes
+ ----------
+
+ vconcat : List(:class:`Spec`)
+ A list of views to be concatenated and put into a column.
+ bounds : enum('full', 'flush')
+ The bounds calculation method to use for determining the extent of a sub-plot. One
+ of ``full`` (the default) or ``flush``.
+
+
+ * If set to ``full``, the entire calculated bounds (including axes, title, and
+ legend) will be used. - If set to ``flush``, only the specified width and height
+ values for the sub-view will be used. The ``flush`` setting can be useful when
+ attempting to place sub-plots without axes or legends into a uniform grid
+ structure.
+
+ **Default value:** ``"full"``
+ center : boolean
+ Boolean flag indicating if subviews should be centered relative to their respective
+ rows or columns.
+
+ **Default value:** ``false``
+ data : anyOf(:class:`Data`, None)
+ An object describing the data source. Set to ``null`` to ignore the parent's data
+ source. If no data is set, it is derived from the parent.
+ description : string
+ Description of this mark for commenting purpose.
+ name : string
+ Name of the visualization for later reference.
+ resolve : :class:`Resolve`
+ Scale, axis, and legend resolutions for view composition specifications.
+ spacing : float
+ The spacing in pixels between sub-views of the concat operator.
+
+ **Default value** : ``10``
+ title : anyOf(:class:`Text`, :class:`TitleParams`)
+ Title for the plot.
+ transform : List(:class:`Transform`)
+ An array of data transformations such as filter and new field calculation.
+ """
+ _schema = {'$ref': '#/definitions/VConcatSpec<GenericSpec>'}
+
+ def __init__(self, vconcat=Undefined, bounds=Undefined, center=Undefined, data=Undefined,
+ description=Undefined, name=Undefined, resolve=Undefined, spacing=Undefined,
+ title=Undefined, transform=Undefined, **kwds):
+ super(VConcatSpecGenericSpec, self).__init__(vconcat=vconcat, bounds=bounds, center=center,
+ data=data, description=description, name=name,
+ resolve=resolve, spacing=spacing, title=title,
+ transform=transform, **kwds)
+
+
+class ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull(ColorDef, MarkPropDefGradientstringnull):
+ """ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ condition : anyOf(:class:`ConditionalMarkPropFieldOrDatumDef`,
+ :class:`ConditionalValueDefGradientstringnullExprRef`,
+ List(:class:`ConditionalValueDefGradientstringnullExprRef`))
+ A field definition or one or more value definition(s) with a selection predicate.
+ value : anyOf(:class:`Gradient`, string, None, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _schema = {'$ref': '#/definitions/ValueDefWithCondition<MarkPropFieldOrDatumDef,(Gradient|string|null)>'}
+
+ def __init__(self, condition=Undefined, value=Undefined, **kwds):
+ super(ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull, self).__init__(condition=condition,
+ value=value,
+ **kwds)
+
+
+class ValueDefWithConditionMarkPropFieldOrDatumDefTypeForShapestringnull(MarkPropDefstringnullTypeForShape, ShapeDef):
+ """ValueDefWithConditionMarkPropFieldOrDatumDefTypeForShapestringnull schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ condition : anyOf(:class:`ConditionalMarkPropFieldOrDatumDefTypeForShape`,
+ :class:`ConditionalValueDefstringnullExprRef`,
+ List(:class:`ConditionalValueDefstringnullExprRef`))
+ A field definition or one or more value definition(s) with a selection predicate.
+ value : anyOf(string, None, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _schema = {'$ref': '#/definitions/ValueDefWithCondition<MarkPropFieldOrDatumDef<TypeForShape>,(string|null)>'}
+
+ def __init__(self, condition=Undefined, value=Undefined, **kwds):
+ super(ValueDefWithConditionMarkPropFieldOrDatumDefTypeForShapestringnull, self).__init__(condition=condition,
+ value=value,
+ **kwds)
+
+
+class ValueDefWithConditionMarkPropFieldOrDatumDefnumber(MarkPropDefnumber, NumericMarkPropDef):
+ """ValueDefWithConditionMarkPropFieldOrDatumDefnumber schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ condition : anyOf(:class:`ConditionalMarkPropFieldOrDatumDef`,
+ :class:`ConditionalValueDefnumberExprRef`, List(:class:`ConditionalValueDefnumberExprRef`))
+ A field definition or one or more value definition(s) with a selection predicate.
+ value : anyOf(float, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _schema = {'$ref': '#/definitions/ValueDefWithCondition<MarkPropFieldOrDatumDef,number>'}
+
+ def __init__(self, condition=Undefined, value=Undefined, **kwds):
+ super(ValueDefWithConditionMarkPropFieldOrDatumDefnumber, self).__init__(condition=condition,
+ value=value, **kwds)
+
+
+class ValueDefWithConditionMarkPropFieldOrDatumDefnumberArray(MarkPropDefnumberArray, NumericArrayMarkPropDef):
+ """ValueDefWithConditionMarkPropFieldOrDatumDefnumberArray schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ condition : anyOf(:class:`ConditionalMarkPropFieldOrDatumDef`,
+ :class:`ConditionalValueDefnumberArrayExprRef`,
+ List(:class:`ConditionalValueDefnumberArrayExprRef`))
+ A field definition or one or more value definition(s) with a selection predicate.
+ value : anyOf(List(float), :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _schema = {'$ref': '#/definitions/ValueDefWithCondition<MarkPropFieldOrDatumDef,number[]>'}
+
+ def __init__(self, condition=Undefined, value=Undefined, **kwds):
+ super(ValueDefWithConditionMarkPropFieldOrDatumDefnumberArray, self).__init__(condition=condition,
+ value=value,
+ **kwds)
+
+
+class ValueDefWithConditionMarkPropFieldOrDatumDefstringnull(VegaLiteSchema):
+ """ValueDefWithConditionMarkPropFieldOrDatumDefstringnull schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ condition : anyOf(:class:`ConditionalMarkPropFieldOrDatumDef`,
+ :class:`ConditionalValueDefstringnullExprRef`,
+ List(:class:`ConditionalValueDefstringnullExprRef`))
+ A field definition or one or more value definition(s) with a selection predicate.
+ value : anyOf(string, None, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _schema = {'$ref': '#/definitions/ValueDefWithCondition<MarkPropFieldOrDatumDef,(string|null)>'}
+
+ def __init__(self, condition=Undefined, value=Undefined, **kwds):
+ super(ValueDefWithConditionMarkPropFieldOrDatumDefstringnull, self).__init__(condition=condition,
+ value=value, **kwds)
+
+
+class ValueDefWithConditionStringFieldDefText(TextDef):
+ """ValueDefWithConditionStringFieldDefText schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ condition : anyOf(:class:`ConditionalStringFieldDef`,
+ :class:`ConditionalValueDefTextExprRef`, List(:class:`ConditionalValueDefTextExprRef`))
+ A field definition or one or more value definition(s) with a selection predicate.
+ value : anyOf(:class:`Text`, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _schema = {'$ref': '#/definitions/ValueDefWithCondition<StringFieldDef,Text>'}
+
+ def __init__(self, condition=Undefined, value=Undefined, **kwds):
+ super(ValueDefWithConditionStringFieldDefText, self).__init__(condition=condition, value=value,
+ **kwds)
+
+
+class ValueDefnumber(VegaLiteSchema):
+ """ValueDefnumber schema wrapper
+
+ Mapping(required=[value])
+ Definition object for a constant value (primitive value or gradient definition) of an
+ encoding channel.
+
+ Attributes
+ ----------
+
+ value : float
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _schema = {'$ref': '#/definitions/ValueDef<number>'}
+
+ def __init__(self, value=Undefined, **kwds):
+ super(ValueDefnumber, self).__init__(value=value, **kwds)
+
+
+class ValueDefnumberExprRef(VegaLiteSchema):
+ """ValueDefnumberExprRef schema wrapper
+
+ Mapping(required=[value])
+ Definition object for a constant value (primitive value or gradient definition) of an
+ encoding channel.
+
+ Attributes
+ ----------
+
+ value : anyOf(float, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _schema = {'$ref': '#/definitions/ValueDef<(number|ExprRef)>'}
+
+ def __init__(self, value=Undefined, **kwds):
+ super(ValueDefnumberExprRef, self).__init__(value=value, **kwds)
+
+
+class ValueDefnumberwidthheightExprRef(VegaLiteSchema):
+ """ValueDefnumberwidthheightExprRef schema wrapper
+
+ Mapping(required=[value])
+ Definition object for a constant value (primitive value or gradient definition) of an
+ encoding channel.
+
+ Attributes
+ ----------
+
+ value : anyOf(float, string, string, :class:`ExprRef`)
+ A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
+ definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
+ values between ``0`` to ``1`` for opacity).
+ """
+ _schema = {'$ref': '#/definitions/ValueDef<(number|"width"|"height"|ExprRef)>'}
+
+ def __init__(self, value=Undefined, **kwds):
+ super(ValueDefnumberwidthheightExprRef, self).__init__(value=value, **kwds)
+
+
+class Vector2DateTime(SelectionInitInterval):
+ """Vector2DateTime schema wrapper
+
+ List([:class:`DateTime`, :class:`DateTime`])
+ """
+ _schema = {'$ref': '#/definitions/Vector2<DateTime>'}
+
+ def __init__(self, *args):
+ super(Vector2DateTime, self).__init__(*args)
+
+
+class Vector2Vector2number(VegaLiteSchema):
+ """Vector2Vector2number schema wrapper
+
+ List([:class:`Vector2number`, :class:`Vector2number`])
+ """
+ _schema = {'$ref': '#/definitions/Vector2<Vector2<number>>'}
+
+ def __init__(self, *args):
+ super(Vector2Vector2number, self).__init__(*args)
+
+
+class Vector2boolean(SelectionInitInterval):
+ """Vector2boolean schema wrapper
+
+ List([boolean, boolean])
+ """
+ _schema = {'$ref': '#/definitions/Vector2<boolean>'}
+
+ def __init__(self, *args):
+ super(Vector2boolean, self).__init__(*args)
+
+
+class Vector2number(SelectionInitInterval):
+ """Vector2number schema wrapper
+
+ List([float, float])
+ """
+ _schema = {'$ref': '#/definitions/Vector2<number>'}
+
+ def __init__(self, *args):
+ super(Vector2number, self).__init__(*args)
+
+
+class Vector2string(SelectionInitInterval):
+ """Vector2string schema wrapper
+
+ List([string, string])
+ """
+ _schema = {'$ref': '#/definitions/Vector2<string>'}
+
+ def __init__(self, *args):
+ super(Vector2string, self).__init__(*args)
+
+
+class Vector3number(VegaLiteSchema):
+ """Vector3number schema wrapper
+
+ List([float, float, float])
+ """
+ _schema = {'$ref': '#/definitions/Vector3<number>'}
+
+ def __init__(self, *args):
+ super(Vector3number, self).__init__(*args)
+
+
+class ViewBackground(VegaLiteSchema):
+ """ViewBackground schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ cornerRadius : anyOf(float, :class:`ExprRef`)
+
+ cursor : :class:`Cursor`
+ The mouse cursor used over the view. Any valid `CSS cursor type
+ <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.
+ fill : anyOf(:class:`Color`, None, :class:`ExprRef`)
+ The fill color.
+
+ **Default value:** ``undefined``
+ fillOpacity : anyOf(float, :class:`ExprRef`)
+
+ opacity : anyOf(float, :class:`ExprRef`)
+ The overall opacity (value between [0,1]).
+
+ **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,
+ ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.
+ stroke : anyOf(:class:`Color`, None, :class:`ExprRef`)
+ The stroke color.
+
+ **Default value:** ``"#ddd"``
+ strokeCap : anyOf(:class:`StrokeCap`, :class:`ExprRef`)
+
+ strokeDash : anyOf(List(float), :class:`ExprRef`)
+
+ strokeDashOffset : anyOf(float, :class:`ExprRef`)
+
+ strokeJoin : anyOf(:class:`StrokeJoin`, :class:`ExprRef`)
+
+ strokeMiterLimit : anyOf(float, :class:`ExprRef`)
+
+ strokeOpacity : anyOf(float, :class:`ExprRef`)
+
+ strokeWidth : anyOf(float, :class:`ExprRef`)
+
+ style : anyOf(string, List(string))
+ A string or array of strings indicating the name of custom styles to apply to the
+ view background. A style is a named collection of mark property defaults defined
+ within the `style configuration
+ <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. If style is an
+ array, later styles will override earlier styles.
+
+ **Default value:** ``"cell"`` **Note:** Any specified view background properties
+ will augment the default style.
+ """
+ _schema = {'$ref': '#/definitions/ViewBackground'}
+
+ def __init__(self, cornerRadius=Undefined, cursor=Undefined, fill=Undefined, fillOpacity=Undefined,
+ opacity=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined,
+ strokeDashOffset=Undefined, strokeJoin=Undefined, strokeMiterLimit=Undefined,
+ strokeOpacity=Undefined, strokeWidth=Undefined, style=Undefined, **kwds):
+ super(ViewBackground, self).__init__(cornerRadius=cornerRadius, cursor=cursor, fill=fill,
+ fillOpacity=fillOpacity, opacity=opacity, stroke=stroke,
+ strokeCap=strokeCap, strokeDash=strokeDash,
+ strokeDashOffset=strokeDashOffset, strokeJoin=strokeJoin,
+ strokeMiterLimit=strokeMiterLimit,
+ strokeOpacity=strokeOpacity, strokeWidth=strokeWidth,
+ style=style, **kwds)
+
+
+class ViewConfig(VegaLiteSchema):
+ """ViewConfig schema wrapper
+
+ Mapping(required=[])
+
+ Attributes
+ ----------
+
+ clip : boolean
+ Whether the view should be clipped.
+ continuousHeight : float
+ The default height when the plot has a continuous y-field for x or latitude, or has
+ arc marks.
+
+ **Default value:** ``200``
+ continuousWidth : float
+ The default width when the plot has a continuous field for x or longitude, or has
+ arc marks.
+
+ **Default value:** ``200``
+ cornerRadius : anyOf(float, :class:`ExprRef`)
+
+ cursor : :class:`Cursor`
+ The mouse cursor used over the view. Any valid `CSS cursor type
+ <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.
+ discreteHeight : anyOf(float, Mapping(required=[step]))
+ The default height when the plot has non arc marks and either a discrete y-field or
+ no y-field. The height can be either a number indicating a fixed height or an object
+ in the form of ``{step: number}`` defining the height per discrete step.
+
+ **Default value:** a step size based on ``config.view.step``.
+ discreteWidth : anyOf(float, Mapping(required=[step]))
+ The default width when the plot has non-arc marks and either a discrete x-field or
+ no x-field. The width can be either a number indicating a fixed width or an object
+ in the form of ``{step: number}`` defining the width per discrete step.
+
+ **Default value:** a step size based on ``config.view.step``.
+ fill : anyOf(:class:`Color`, None, :class:`ExprRef`)
+ The fill color.
+
+ **Default value:** ``undefined``
+ fillOpacity : anyOf(float, :class:`ExprRef`)
+
+ height : float
+ Default height
+
+ **Deprecated:** Since Vega-Lite 4.0. Please use continuousHeight and discreteHeight
+ instead.
+ opacity : anyOf(float, :class:`ExprRef`)
+ The overall opacity (value between [0,1]).
+
+ **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,
+ ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.
+ step : float
+ Default step size for x-/y- discrete fields.
+ stroke : anyOf(:class:`Color`, None, :class:`ExprRef`)
+ The stroke color.
+
+ **Default value:** ``"#ddd"``
+ strokeCap : anyOf(:class:`StrokeCap`, :class:`ExprRef`)
+
+ strokeDash : anyOf(List(float), :class:`ExprRef`)
+
+ strokeDashOffset : anyOf(float, :class:`ExprRef`)
+
+ strokeJoin : anyOf(:class:`StrokeJoin`, :class:`ExprRef`)
+
+ strokeMiterLimit : anyOf(float, :class:`ExprRef`)
+
+ strokeOpacity : anyOf(float, :class:`ExprRef`)
+
+ strokeWidth : anyOf(float, :class:`ExprRef`)
+
+ width : float
+ Default width
+
+ **Deprecated:** Since Vega-Lite 4.0. Please use continuousWidth and discreteWidth
+ instead.
+ """
+ _schema = {'$ref': '#/definitions/ViewConfig'}
+
+ def __init__(self, clip=Undefined, continuousHeight=Undefined, continuousWidth=Undefined,
+ cornerRadius=Undefined, cursor=Undefined, discreteHeight=Undefined,
+ discreteWidth=Undefined, fill=Undefined, fillOpacity=Undefined, height=Undefined,
+ opacity=Undefined, step=Undefined, stroke=Undefined, strokeCap=Undefined,
+ strokeDash=Undefined, strokeDashOffset=Undefined, strokeJoin=Undefined,
+ strokeMiterLimit=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined,
+ width=Undefined, **kwds):
+ super(ViewConfig, self).__init__(clip=clip, continuousHeight=continuousHeight,
+ continuousWidth=continuousWidth, cornerRadius=cornerRadius,
+ cursor=cursor, discreteHeight=discreteHeight,
+ discreteWidth=discreteWidth, fill=fill,
+ fillOpacity=fillOpacity, height=height, opacity=opacity,
+ step=step, stroke=stroke, strokeCap=strokeCap,
+ strokeDash=strokeDash, strokeDashOffset=strokeDashOffset,
+ strokeJoin=strokeJoin, strokeMiterLimit=strokeMiterLimit,
+ strokeOpacity=strokeOpacity, strokeWidth=strokeWidth,
+ width=width, **kwds)
+
+
+class WindowEventType(VegaLiteSchema):
+ """WindowEventType schema wrapper
+
+ anyOf(:class:`EventType`, string)
+ """
+ _schema = {'$ref': '#/definitions/WindowEventType'}
+
+ def __init__(self, *args, **kwds):
+ super(WindowEventType, self).__init__(*args, **kwds)
+
+
+class EventType(WindowEventType):
+ """EventType schema wrapper
+
+ enum('click', 'dblclick', 'dragenter', 'dragleave', 'dragover', 'keydown', 'keypress',
+ 'keyup', 'mousedown', 'mousemove', 'mouseout', 'mouseover', 'mouseup', 'mousewheel',
+ 'timer', 'touchend', 'touchmove', 'touchstart', 'wheel')
+ """
+ _schema = {'$ref': '#/definitions/EventType'}
+
+ def __init__(self, *args):
+ super(EventType, self).__init__(*args)
+
+
+class WindowFieldDef(VegaLiteSchema):
+ """WindowFieldDef schema wrapper
+
+ Mapping(required=[op, as])
+
+ Attributes
+ ----------
+
+ op : anyOf(:class:`AggregateOp`, :class:`WindowOnlyOp`)
+ The window or aggregation operation to apply within a window (e.g., ``"rank"``,
+ ``"lead"``, ``"sum"``, ``"average"`` or ``"count"`` ). See the list of all supported
+ operations `here <https://vega.github.io/vega-lite/docs/window.html#ops>`__.
+ field : :class:`FieldName`
+ The data field for which to compute the aggregate or window function. This can be
+ omitted for window functions that do not operate over a field such as ``"count"``,
+ ``"rank"``, ``"dense_rank"``.
+ param : float
+ Parameter values for the window functions. Parameter values can be omitted for
+ operations that do not accept a parameter.
+
+ See the list of all supported operations and their parameters `here
+ <https://vega.github.io/vega-lite/docs/transforms/window.html>`__.
+ as : :class:`FieldName`
+ The output name for the window operation.
+ """
+ _schema = {'$ref': '#/definitions/WindowFieldDef'}
+
+ def __init__(self, op=Undefined, field=Undefined, param=Undefined, **kwds):
+ super(WindowFieldDef, self).__init__(op=op, field=field, param=param, **kwds)
+
+
+class WindowOnlyOp(VegaLiteSchema):
+ """WindowOnlyOp schema wrapper
+
+ enum('row_number', 'rank', 'dense_rank', 'percent_rank', 'cume_dist', 'ntile', 'lag',
+ 'lead', 'first_value', 'last_value', 'nth_value')
+ """
+ _schema = {'$ref': '#/definitions/WindowOnlyOp'}
+
+ def __init__(self, *args):
+ super(WindowOnlyOp, self).__init__(*args)
+
+
+class WindowTransform(Transform):
+ """WindowTransform schema wrapper
+
+ Mapping(required=[window])
+
+ Attributes
+ ----------
+
+ window : List(:class:`WindowFieldDef`)
+ The definition of the fields in the window, and what calculations to use.
+ frame : List(anyOf(None, float))
+ A frame specification as a two-element array indicating how the sliding window
+ should proceed. The array entries should either be a number indicating the offset
+ from the current data object, or null to indicate unbounded rows preceding or
+ following the current data object. The default value is ``[null, 0]``, indicating
+ that the sliding window includes the current object and all preceding objects. The
+ value ``[-5, 5]`` indicates that the window should include five objects preceding
+ and five objects following the current object. Finally, ``[null, null]`` indicates
+ that the window frame should always include all data objects. If you this frame and
+ want to assign the same value to add objects, you can use the simpler `join
+ aggregate transform <https://vega.github.io/vega-lite/docs/joinaggregate.html>`__.
+ The only operators affected are the aggregation operations and the ``first_value``,
+ ``last_value``, and ``nth_value`` window operations. The other window operations are
+ not affected by this.
+
+ **Default value:** : ``[null, 0]`` (includes the current object and all preceding
+ objects)
+ groupby : List(:class:`FieldName`)
+ The data fields for partitioning the data objects into separate windows. If
+ unspecified, all data points will be in a single window.
+ ignorePeers : boolean
+ Indicates if the sliding window frame should ignore peer values (data that are
+ considered identical by the sort criteria). The default is false, causing the window
+ frame to expand to include all peer values. If set to true, the window frame will be
+ defined by offset values only. This setting only affects those operations that
+ depend on the window frame, namely aggregation operations and the first_value,
+ last_value, and nth_value window operations.
+
+ **Default value:** ``false``
+ sort : List(:class:`SortField`)
+ A sort field definition for sorting data objects within a window. If two data
+ objects are considered equal by the comparator, they are considered "peer" values of
+ equal rank. If sort is not specified, the order is undefined: data objects are
+ processed in the order they are observed and none are considered peers (the
+ ignorePeers parameter is ignored and treated as if set to ``true`` ).
+ """
+ _schema = {'$ref': '#/definitions/WindowTransform'}
+
+ def __init__(self, window=Undefined, frame=Undefined, groupby=Undefined, ignorePeers=Undefined,
+ sort=Undefined, **kwds):
+ super(WindowTransform, self).__init__(window=window, frame=frame, groupby=groupby,
+ ignorePeers=ignorePeers, sort=sort, **kwds)
+
diff --git a/venv/lib/python3.9/site-packages/altair/vegalite/v4/schema/mixins.py b/venv/lib/python3.9/site-packages/altair/vegalite/v4/schema/mixins.py
new file mode 100644
index 00000000..bb1860f2
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vegalite/v4/schema/mixins.py
@@ -0,0 +1,1318 @@
+# The contents of this file are automatically written by
+# tools/generate_schema_wrapper.py. Do not modify directly.
+from . import core
+from altair.utils import use_signature
+from altair.utils.schemapi import Undefined
+
+
+class MarkMethodMixin(object):
+ """A mixin class that defines mark methods"""
+
+ def mark_arc(self, align=Undefined, angle=Undefined, aria=Undefined, ariaRole=Undefined,
+ ariaRoleDescription=Undefined, aspect=Undefined, bandSize=Undefined,
+ baseline=Undefined, binSpacing=Undefined, blend=Undefined, clip=Undefined,
+ color=Undefined, continuousBandSize=Undefined, cornerRadius=Undefined,
+ cornerRadiusBottomLeft=Undefined, cornerRadiusBottomRight=Undefined,
+ cornerRadiusEnd=Undefined, cornerRadiusTopLeft=Undefined,
+ cornerRadiusTopRight=Undefined, cursor=Undefined, description=Undefined, dir=Undefined,
+ discreteBandSize=Undefined, dx=Undefined, dy=Undefined, ellipsis=Undefined,
+ fill=Undefined, fillOpacity=Undefined, filled=Undefined, font=Undefined,
+ fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined, height=Undefined,
+ href=Undefined, innerRadius=Undefined, interpolate=Undefined, invalid=Undefined,
+ limit=Undefined, line=Undefined, lineBreak=Undefined, lineHeight=Undefined,
+ opacity=Undefined, order=Undefined, orient=Undefined, outerRadius=Undefined,
+ padAngle=Undefined, point=Undefined, radius=Undefined, radius2=Undefined,
+ radius2Offset=Undefined, radiusOffset=Undefined, shape=Undefined, size=Undefined,
+ smooth=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined,
+ strokeDashOffset=Undefined, strokeJoin=Undefined, strokeMiterLimit=Undefined,
+ strokeOffset=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined,
+ style=Undefined, tension=Undefined, text=Undefined, theta=Undefined, theta2=Undefined,
+ theta2Offset=Undefined, thetaOffset=Undefined, thickness=Undefined,
+ timeUnitBand=Undefined, timeUnitBandPosition=Undefined, tooltip=Undefined,
+ url=Undefined, width=Undefined, x=Undefined, x2=Undefined, x2Offset=Undefined,
+ xOffset=Undefined, y=Undefined, y2=Undefined, y2Offset=Undefined, yOffset=Undefined,
+ **kwds):
+ """Set the chart's mark to 'arc'
+
+ For information on additional arguments, see :class:`MarkDef`
+ """
+ kwds = dict(align=align, angle=angle, aria=aria, ariaRole=ariaRole,
+ ariaRoleDescription=ariaRoleDescription, aspect=aspect, bandSize=bandSize,
+ baseline=baseline, binSpacing=binSpacing, blend=blend, clip=clip, color=color,
+ continuousBandSize=continuousBandSize, cornerRadius=cornerRadius,
+ cornerRadiusBottomLeft=cornerRadiusBottomLeft,
+ cornerRadiusBottomRight=cornerRadiusBottomRight, cornerRadiusEnd=cornerRadiusEnd,
+ cornerRadiusTopLeft=cornerRadiusTopLeft, cornerRadiusTopRight=cornerRadiusTopRight,
+ cursor=cursor, description=description, dir=dir, discreteBandSize=discreteBandSize,
+ dx=dx, dy=dy, ellipsis=ellipsis, fill=fill, fillOpacity=fillOpacity, filled=filled,
+ font=font, fontSize=fontSize, fontStyle=fontStyle, fontWeight=fontWeight,
+ height=height, href=href, innerRadius=innerRadius, interpolate=interpolate,
+ invalid=invalid, limit=limit, line=line, lineBreak=lineBreak, lineHeight=lineHeight,
+ opacity=opacity, order=order, orient=orient, outerRadius=outerRadius,
+ padAngle=padAngle, point=point, radius=radius, radius2=radius2,
+ radius2Offset=radius2Offset, radiusOffset=radiusOffset, shape=shape, size=size,
+ smooth=smooth, stroke=stroke, strokeCap=strokeCap, strokeDash=strokeDash,
+ strokeDashOffset=strokeDashOffset, strokeJoin=strokeJoin,
+ strokeMiterLimit=strokeMiterLimit, strokeOffset=strokeOffset,
+ strokeOpacity=strokeOpacity, strokeWidth=strokeWidth, style=style, tension=tension,
+ text=text, theta=theta, theta2=theta2, theta2Offset=theta2Offset,
+ thetaOffset=thetaOffset, thickness=thickness, timeUnitBand=timeUnitBand,
+ timeUnitBandPosition=timeUnitBandPosition, tooltip=tooltip, url=url, width=width,
+ x=x, x2=x2, x2Offset=x2Offset, xOffset=xOffset, y=y, y2=y2, y2Offset=y2Offset,
+ yOffset=yOffset, **kwds)
+ copy = self.copy(deep=False)
+ if any(val is not Undefined for val in kwds.values()):
+ copy.mark = core.MarkDef(type="arc", **kwds)
+ else:
+ copy.mark = "arc"
+ return copy
+
+ def mark_area(self, align=Undefined, angle=Undefined, aria=Undefined, ariaRole=Undefined,
+ ariaRoleDescription=Undefined, aspect=Undefined, bandSize=Undefined,
+ baseline=Undefined, binSpacing=Undefined, blend=Undefined, clip=Undefined,
+ color=Undefined, continuousBandSize=Undefined, cornerRadius=Undefined,
+ cornerRadiusBottomLeft=Undefined, cornerRadiusBottomRight=Undefined,
+ cornerRadiusEnd=Undefined, cornerRadiusTopLeft=Undefined,
+ cornerRadiusTopRight=Undefined, cursor=Undefined, description=Undefined,
+ dir=Undefined, discreteBandSize=Undefined, dx=Undefined, dy=Undefined,
+ ellipsis=Undefined, fill=Undefined, fillOpacity=Undefined, filled=Undefined,
+ font=Undefined, fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined,
+ height=Undefined, href=Undefined, innerRadius=Undefined, interpolate=Undefined,
+ invalid=Undefined, limit=Undefined, line=Undefined, lineBreak=Undefined,
+ lineHeight=Undefined, opacity=Undefined, order=Undefined, orient=Undefined,
+ outerRadius=Undefined, padAngle=Undefined, point=Undefined, radius=Undefined,
+ radius2=Undefined, radius2Offset=Undefined, radiusOffset=Undefined, shape=Undefined,
+ size=Undefined, smooth=Undefined, stroke=Undefined, strokeCap=Undefined,
+ strokeDash=Undefined, strokeDashOffset=Undefined, strokeJoin=Undefined,
+ strokeMiterLimit=Undefined, strokeOffset=Undefined, strokeOpacity=Undefined,
+ strokeWidth=Undefined, style=Undefined, tension=Undefined, text=Undefined,
+ theta=Undefined, theta2=Undefined, theta2Offset=Undefined, thetaOffset=Undefined,
+ thickness=Undefined, timeUnitBand=Undefined, timeUnitBandPosition=Undefined,
+ tooltip=Undefined, url=Undefined, width=Undefined, x=Undefined, x2=Undefined,
+ x2Offset=Undefined, xOffset=Undefined, y=Undefined, y2=Undefined, y2Offset=Undefined,
+ yOffset=Undefined, **kwds):
+ """Set the chart's mark to 'area'
+
+ For information on additional arguments, see :class:`MarkDef`
+ """
+ kwds = dict(align=align, angle=angle, aria=aria, ariaRole=ariaRole,
+ ariaRoleDescription=ariaRoleDescription, aspect=aspect, bandSize=bandSize,
+ baseline=baseline, binSpacing=binSpacing, blend=blend, clip=clip, color=color,
+ continuousBandSize=continuousBandSize, cornerRadius=cornerRadius,
+ cornerRadiusBottomLeft=cornerRadiusBottomLeft,
+ cornerRadiusBottomRight=cornerRadiusBottomRight, cornerRadiusEnd=cornerRadiusEnd,
+ cornerRadiusTopLeft=cornerRadiusTopLeft, cornerRadiusTopRight=cornerRadiusTopRight,
+ cursor=cursor, description=description, dir=dir, discreteBandSize=discreteBandSize,
+ dx=dx, dy=dy, ellipsis=ellipsis, fill=fill, fillOpacity=fillOpacity, filled=filled,
+ font=font, fontSize=fontSize, fontStyle=fontStyle, fontWeight=fontWeight,
+ height=height, href=href, innerRadius=innerRadius, interpolate=interpolate,
+ invalid=invalid, limit=limit, line=line, lineBreak=lineBreak, lineHeight=lineHeight,
+ opacity=opacity, order=order, orient=orient, outerRadius=outerRadius,
+ padAngle=padAngle, point=point, radius=radius, radius2=radius2,
+ radius2Offset=radius2Offset, radiusOffset=radiusOffset, shape=shape, size=size,
+ smooth=smooth, stroke=stroke, strokeCap=strokeCap, strokeDash=strokeDash,
+ strokeDashOffset=strokeDashOffset, strokeJoin=strokeJoin,
+ strokeMiterLimit=strokeMiterLimit, strokeOffset=strokeOffset,
+ strokeOpacity=strokeOpacity, strokeWidth=strokeWidth, style=style, tension=tension,
+ text=text, theta=theta, theta2=theta2, theta2Offset=theta2Offset,
+ thetaOffset=thetaOffset, thickness=thickness, timeUnitBand=timeUnitBand,
+ timeUnitBandPosition=timeUnitBandPosition, tooltip=tooltip, url=url, width=width,
+ x=x, x2=x2, x2Offset=x2Offset, xOffset=xOffset, y=y, y2=y2, y2Offset=y2Offset,
+ yOffset=yOffset, **kwds)
+ copy = self.copy(deep=False)
+ if any(val is not Undefined for val in kwds.values()):
+ copy.mark = core.MarkDef(type="area", **kwds)
+ else:
+ copy.mark = "area"
+ return copy
+
+ def mark_bar(self, align=Undefined, angle=Undefined, aria=Undefined, ariaRole=Undefined,
+ ariaRoleDescription=Undefined, aspect=Undefined, bandSize=Undefined,
+ baseline=Undefined, binSpacing=Undefined, blend=Undefined, clip=Undefined,
+ color=Undefined, continuousBandSize=Undefined, cornerRadius=Undefined,
+ cornerRadiusBottomLeft=Undefined, cornerRadiusBottomRight=Undefined,
+ cornerRadiusEnd=Undefined, cornerRadiusTopLeft=Undefined,
+ cornerRadiusTopRight=Undefined, cursor=Undefined, description=Undefined, dir=Undefined,
+ discreteBandSize=Undefined, dx=Undefined, dy=Undefined, ellipsis=Undefined,
+ fill=Undefined, fillOpacity=Undefined, filled=Undefined, font=Undefined,
+ fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined, height=Undefined,
+ href=Undefined, innerRadius=Undefined, interpolate=Undefined, invalid=Undefined,
+ limit=Undefined, line=Undefined, lineBreak=Undefined, lineHeight=Undefined,
+ opacity=Undefined, order=Undefined, orient=Undefined, outerRadius=Undefined,
+ padAngle=Undefined, point=Undefined, radius=Undefined, radius2=Undefined,
+ radius2Offset=Undefined, radiusOffset=Undefined, shape=Undefined, size=Undefined,
+ smooth=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined,
+ strokeDashOffset=Undefined, strokeJoin=Undefined, strokeMiterLimit=Undefined,
+ strokeOffset=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined,
+ style=Undefined, tension=Undefined, text=Undefined, theta=Undefined, theta2=Undefined,
+ theta2Offset=Undefined, thetaOffset=Undefined, thickness=Undefined,
+ timeUnitBand=Undefined, timeUnitBandPosition=Undefined, tooltip=Undefined,
+ url=Undefined, width=Undefined, x=Undefined, x2=Undefined, x2Offset=Undefined,
+ xOffset=Undefined, y=Undefined, y2=Undefined, y2Offset=Undefined, yOffset=Undefined,
+ **kwds):
+ """Set the chart's mark to 'bar'
+
+ For information on additional arguments, see :class:`MarkDef`
+ """
+ kwds = dict(align=align, angle=angle, aria=aria, ariaRole=ariaRole,
+ ariaRoleDescription=ariaRoleDescription, aspect=aspect, bandSize=bandSize,
+ baseline=baseline, binSpacing=binSpacing, blend=blend, clip=clip, color=color,
+ continuousBandSize=continuousBandSize, cornerRadius=cornerRadius,
+ cornerRadiusBottomLeft=cornerRadiusBottomLeft,
+ cornerRadiusBottomRight=cornerRadiusBottomRight, cornerRadiusEnd=cornerRadiusEnd,
+ cornerRadiusTopLeft=cornerRadiusTopLeft, cornerRadiusTopRight=cornerRadiusTopRight,
+ cursor=cursor, description=description, dir=dir, discreteBandSize=discreteBandSize,
+ dx=dx, dy=dy, ellipsis=ellipsis, fill=fill, fillOpacity=fillOpacity, filled=filled,
+ font=font, fontSize=fontSize, fontStyle=fontStyle, fontWeight=fontWeight,
+ height=height, href=href, innerRadius=innerRadius, interpolate=interpolate,
+ invalid=invalid, limit=limit, line=line, lineBreak=lineBreak, lineHeight=lineHeight,
+ opacity=opacity, order=order, orient=orient, outerRadius=outerRadius,
+ padAngle=padAngle, point=point, radius=radius, radius2=radius2,
+ radius2Offset=radius2Offset, radiusOffset=radiusOffset, shape=shape, size=size,
+ smooth=smooth, stroke=stroke, strokeCap=strokeCap, strokeDash=strokeDash,
+ strokeDashOffset=strokeDashOffset, strokeJoin=strokeJoin,
+ strokeMiterLimit=strokeMiterLimit, strokeOffset=strokeOffset,
+ strokeOpacity=strokeOpacity, strokeWidth=strokeWidth, style=style, tension=tension,
+ text=text, theta=theta, theta2=theta2, theta2Offset=theta2Offset,
+ thetaOffset=thetaOffset, thickness=thickness, timeUnitBand=timeUnitBand,
+ timeUnitBandPosition=timeUnitBandPosition, tooltip=tooltip, url=url, width=width,
+ x=x, x2=x2, x2Offset=x2Offset, xOffset=xOffset, y=y, y2=y2, y2Offset=y2Offset,
+ yOffset=yOffset, **kwds)
+ copy = self.copy(deep=False)
+ if any(val is not Undefined for val in kwds.values()):
+ copy.mark = core.MarkDef(type="bar", **kwds)
+ else:
+ copy.mark = "bar"
+ return copy
+
+ def mark_image(self, align=Undefined, angle=Undefined, aria=Undefined, ariaRole=Undefined,
+ ariaRoleDescription=Undefined, aspect=Undefined, bandSize=Undefined,
+ baseline=Undefined, binSpacing=Undefined, blend=Undefined, clip=Undefined,
+ color=Undefined, continuousBandSize=Undefined, cornerRadius=Undefined,
+ cornerRadiusBottomLeft=Undefined, cornerRadiusBottomRight=Undefined,
+ cornerRadiusEnd=Undefined, cornerRadiusTopLeft=Undefined,
+ cornerRadiusTopRight=Undefined, cursor=Undefined, description=Undefined,
+ dir=Undefined, discreteBandSize=Undefined, dx=Undefined, dy=Undefined,
+ ellipsis=Undefined, fill=Undefined, fillOpacity=Undefined, filled=Undefined,
+ font=Undefined, fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined,
+ height=Undefined, href=Undefined, innerRadius=Undefined, interpolate=Undefined,
+ invalid=Undefined, limit=Undefined, line=Undefined, lineBreak=Undefined,
+ lineHeight=Undefined, opacity=Undefined, order=Undefined, orient=Undefined,
+ outerRadius=Undefined, padAngle=Undefined, point=Undefined, radius=Undefined,
+ radius2=Undefined, radius2Offset=Undefined, radiusOffset=Undefined, shape=Undefined,
+ size=Undefined, smooth=Undefined, stroke=Undefined, strokeCap=Undefined,
+ strokeDash=Undefined, strokeDashOffset=Undefined, strokeJoin=Undefined,
+ strokeMiterLimit=Undefined, strokeOffset=Undefined, strokeOpacity=Undefined,
+ strokeWidth=Undefined, style=Undefined, tension=Undefined, text=Undefined,
+ theta=Undefined, theta2=Undefined, theta2Offset=Undefined, thetaOffset=Undefined,
+ thickness=Undefined, timeUnitBand=Undefined, timeUnitBandPosition=Undefined,
+ tooltip=Undefined, url=Undefined, width=Undefined, x=Undefined, x2=Undefined,
+ x2Offset=Undefined, xOffset=Undefined, y=Undefined, y2=Undefined, y2Offset=Undefined,
+ yOffset=Undefined, **kwds):
+ """Set the chart's mark to 'image'
+
+ For information on additional arguments, see :class:`MarkDef`
+ """
+ kwds = dict(align=align, angle=angle, aria=aria, ariaRole=ariaRole,
+ ariaRoleDescription=ariaRoleDescription, aspect=aspect, bandSize=bandSize,
+ baseline=baseline, binSpacing=binSpacing, blend=blend, clip=clip, color=color,
+ continuousBandSize=continuousBandSize, cornerRadius=cornerRadius,
+ cornerRadiusBottomLeft=cornerRadiusBottomLeft,
+ cornerRadiusBottomRight=cornerRadiusBottomRight, cornerRadiusEnd=cornerRadiusEnd,
+ cornerRadiusTopLeft=cornerRadiusTopLeft, cornerRadiusTopRight=cornerRadiusTopRight,
+ cursor=cursor, description=description, dir=dir, discreteBandSize=discreteBandSize,
+ dx=dx, dy=dy, ellipsis=ellipsis, fill=fill, fillOpacity=fillOpacity, filled=filled,
+ font=font, fontSize=fontSize, fontStyle=fontStyle, fontWeight=fontWeight,
+ height=height, href=href, innerRadius=innerRadius, interpolate=interpolate,
+ invalid=invalid, limit=limit, line=line, lineBreak=lineBreak, lineHeight=lineHeight,
+ opacity=opacity, order=order, orient=orient, outerRadius=outerRadius,
+ padAngle=padAngle, point=point, radius=radius, radius2=radius2,
+ radius2Offset=radius2Offset, radiusOffset=radiusOffset, shape=shape, size=size,
+ smooth=smooth, stroke=stroke, strokeCap=strokeCap, strokeDash=strokeDash,
+ strokeDashOffset=strokeDashOffset, strokeJoin=strokeJoin,
+ strokeMiterLimit=strokeMiterLimit, strokeOffset=strokeOffset,
+ strokeOpacity=strokeOpacity, strokeWidth=strokeWidth, style=style, tension=tension,
+ text=text, theta=theta, theta2=theta2, theta2Offset=theta2Offset,
+ thetaOffset=thetaOffset, thickness=thickness, timeUnitBand=timeUnitBand,
+ timeUnitBandPosition=timeUnitBandPosition, tooltip=tooltip, url=url, width=width,
+ x=x, x2=x2, x2Offset=x2Offset, xOffset=xOffset, y=y, y2=y2, y2Offset=y2Offset,
+ yOffset=yOffset, **kwds)
+ copy = self.copy(deep=False)
+ if any(val is not Undefined for val in kwds.values()):
+ copy.mark = core.MarkDef(type="image", **kwds)
+ else:
+ copy.mark = "image"
+ return copy
+
+ def mark_line(self, align=Undefined, angle=Undefined, aria=Undefined, ariaRole=Undefined,
+ ariaRoleDescription=Undefined, aspect=Undefined, bandSize=Undefined,
+ baseline=Undefined, binSpacing=Undefined, blend=Undefined, clip=Undefined,
+ color=Undefined, continuousBandSize=Undefined, cornerRadius=Undefined,
+ cornerRadiusBottomLeft=Undefined, cornerRadiusBottomRight=Undefined,
+ cornerRadiusEnd=Undefined, cornerRadiusTopLeft=Undefined,
+ cornerRadiusTopRight=Undefined, cursor=Undefined, description=Undefined,
+ dir=Undefined, discreteBandSize=Undefined, dx=Undefined, dy=Undefined,
+ ellipsis=Undefined, fill=Undefined, fillOpacity=Undefined, filled=Undefined,
+ font=Undefined, fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined,
+ height=Undefined, href=Undefined, innerRadius=Undefined, interpolate=Undefined,
+ invalid=Undefined, limit=Undefined, line=Undefined, lineBreak=Undefined,
+ lineHeight=Undefined, opacity=Undefined, order=Undefined, orient=Undefined,
+ outerRadius=Undefined, padAngle=Undefined, point=Undefined, radius=Undefined,
+ radius2=Undefined, radius2Offset=Undefined, radiusOffset=Undefined, shape=Undefined,
+ size=Undefined, smooth=Undefined, stroke=Undefined, strokeCap=Undefined,
+ strokeDash=Undefined, strokeDashOffset=Undefined, strokeJoin=Undefined,
+ strokeMiterLimit=Undefined, strokeOffset=Undefined, strokeOpacity=Undefined,
+ strokeWidth=Undefined, style=Undefined, tension=Undefined, text=Undefined,
+ theta=Undefined, theta2=Undefined, theta2Offset=Undefined, thetaOffset=Undefined,
+ thickness=Undefined, timeUnitBand=Undefined, timeUnitBandPosition=Undefined,
+ tooltip=Undefined, url=Undefined, width=Undefined, x=Undefined, x2=Undefined,
+ x2Offset=Undefined, xOffset=Undefined, y=Undefined, y2=Undefined, y2Offset=Undefined,
+ yOffset=Undefined, **kwds):
+ """Set the chart's mark to 'line'
+
+ For information on additional arguments, see :class:`MarkDef`
+ """
+ kwds = dict(align=align, angle=angle, aria=aria, ariaRole=ariaRole,
+ ariaRoleDescription=ariaRoleDescription, aspect=aspect, bandSize=bandSize,
+ baseline=baseline, binSpacing=binSpacing, blend=blend, clip=clip, color=color,
+ continuousBandSize=continuousBandSize, cornerRadius=cornerRadius,
+ cornerRadiusBottomLeft=cornerRadiusBottomLeft,
+ cornerRadiusBottomRight=cornerRadiusBottomRight, cornerRadiusEnd=cornerRadiusEnd,
+ cornerRadiusTopLeft=cornerRadiusTopLeft, cornerRadiusTopRight=cornerRadiusTopRight,
+ cursor=cursor, description=description, dir=dir, discreteBandSize=discreteBandSize,
+ dx=dx, dy=dy, ellipsis=ellipsis, fill=fill, fillOpacity=fillOpacity, filled=filled,
+ font=font, fontSize=fontSize, fontStyle=fontStyle, fontWeight=fontWeight,
+ height=height, href=href, innerRadius=innerRadius, interpolate=interpolate,
+ invalid=invalid, limit=limit, line=line, lineBreak=lineBreak, lineHeight=lineHeight,
+ opacity=opacity, order=order, orient=orient, outerRadius=outerRadius,
+ padAngle=padAngle, point=point, radius=radius, radius2=radius2,
+ radius2Offset=radius2Offset, radiusOffset=radiusOffset, shape=shape, size=size,
+ smooth=smooth, stroke=stroke, strokeCap=strokeCap, strokeDash=strokeDash,
+ strokeDashOffset=strokeDashOffset, strokeJoin=strokeJoin,
+ strokeMiterLimit=strokeMiterLimit, strokeOffset=strokeOffset,
+ strokeOpacity=strokeOpacity, strokeWidth=strokeWidth, style=style, tension=tension,
+ text=text, theta=theta, theta2=theta2, theta2Offset=theta2Offset,
+ thetaOffset=thetaOffset, thickness=thickness, timeUnitBand=timeUnitBand,
+ timeUnitBandPosition=timeUnitBandPosition, tooltip=tooltip, url=url, width=width,
+ x=x, x2=x2, x2Offset=x2Offset, xOffset=xOffset, y=y, y2=y2, y2Offset=y2Offset,
+ yOffset=yOffset, **kwds)
+ copy = self.copy(deep=False)
+ if any(val is not Undefined for val in kwds.values()):
+ copy.mark = core.MarkDef(type="line", **kwds)
+ else:
+ copy.mark = "line"
+ return copy
+
+ def mark_point(self, align=Undefined, angle=Undefined, aria=Undefined, ariaRole=Undefined,
+ ariaRoleDescription=Undefined, aspect=Undefined, bandSize=Undefined,
+ baseline=Undefined, binSpacing=Undefined, blend=Undefined, clip=Undefined,
+ color=Undefined, continuousBandSize=Undefined, cornerRadius=Undefined,
+ cornerRadiusBottomLeft=Undefined, cornerRadiusBottomRight=Undefined,
+ cornerRadiusEnd=Undefined, cornerRadiusTopLeft=Undefined,
+ cornerRadiusTopRight=Undefined, cursor=Undefined, description=Undefined,
+ dir=Undefined, discreteBandSize=Undefined, dx=Undefined, dy=Undefined,
+ ellipsis=Undefined, fill=Undefined, fillOpacity=Undefined, filled=Undefined,
+ font=Undefined, fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined,
+ height=Undefined, href=Undefined, innerRadius=Undefined, interpolate=Undefined,
+ invalid=Undefined, limit=Undefined, line=Undefined, lineBreak=Undefined,
+ lineHeight=Undefined, opacity=Undefined, order=Undefined, orient=Undefined,
+ outerRadius=Undefined, padAngle=Undefined, point=Undefined, radius=Undefined,
+ radius2=Undefined, radius2Offset=Undefined, radiusOffset=Undefined, shape=Undefined,
+ size=Undefined, smooth=Undefined, stroke=Undefined, strokeCap=Undefined,
+ strokeDash=Undefined, strokeDashOffset=Undefined, strokeJoin=Undefined,
+ strokeMiterLimit=Undefined, strokeOffset=Undefined, strokeOpacity=Undefined,
+ strokeWidth=Undefined, style=Undefined, tension=Undefined, text=Undefined,
+ theta=Undefined, theta2=Undefined, theta2Offset=Undefined, thetaOffset=Undefined,
+ thickness=Undefined, timeUnitBand=Undefined, timeUnitBandPosition=Undefined,
+ tooltip=Undefined, url=Undefined, width=Undefined, x=Undefined, x2=Undefined,
+ x2Offset=Undefined, xOffset=Undefined, y=Undefined, y2=Undefined, y2Offset=Undefined,
+ yOffset=Undefined, **kwds):
+ """Set the chart's mark to 'point'
+
+ For information on additional arguments, see :class:`MarkDef`
+ """
+ kwds = dict(align=align, angle=angle, aria=aria, ariaRole=ariaRole,
+ ariaRoleDescription=ariaRoleDescription, aspect=aspect, bandSize=bandSize,
+ baseline=baseline, binSpacing=binSpacing, blend=blend, clip=clip, color=color,
+ continuousBandSize=continuousBandSize, cornerRadius=cornerRadius,
+ cornerRadiusBottomLeft=cornerRadiusBottomLeft,
+ cornerRadiusBottomRight=cornerRadiusBottomRight, cornerRadiusEnd=cornerRadiusEnd,
+ cornerRadiusTopLeft=cornerRadiusTopLeft, cornerRadiusTopRight=cornerRadiusTopRight,
+ cursor=cursor, description=description, dir=dir, discreteBandSize=discreteBandSize,
+ dx=dx, dy=dy, ellipsis=ellipsis, fill=fill, fillOpacity=fillOpacity, filled=filled,
+ font=font, fontSize=fontSize, fontStyle=fontStyle, fontWeight=fontWeight,
+ height=height, href=href, innerRadius=innerRadius, interpolate=interpolate,
+ invalid=invalid, limit=limit, line=line, lineBreak=lineBreak, lineHeight=lineHeight,
+ opacity=opacity, order=order, orient=orient, outerRadius=outerRadius,
+ padAngle=padAngle, point=point, radius=radius, radius2=radius2,
+ radius2Offset=radius2Offset, radiusOffset=radiusOffset, shape=shape, size=size,
+ smooth=smooth, stroke=stroke, strokeCap=strokeCap, strokeDash=strokeDash,
+ strokeDashOffset=strokeDashOffset, strokeJoin=strokeJoin,
+ strokeMiterLimit=strokeMiterLimit, strokeOffset=strokeOffset,
+ strokeOpacity=strokeOpacity, strokeWidth=strokeWidth, style=style, tension=tension,
+ text=text, theta=theta, theta2=theta2, theta2Offset=theta2Offset,
+ thetaOffset=thetaOffset, thickness=thickness, timeUnitBand=timeUnitBand,
+ timeUnitBandPosition=timeUnitBandPosition, tooltip=tooltip, url=url, width=width,
+ x=x, x2=x2, x2Offset=x2Offset, xOffset=xOffset, y=y, y2=y2, y2Offset=y2Offset,
+ yOffset=yOffset, **kwds)
+ copy = self.copy(deep=False)
+ if any(val is not Undefined for val in kwds.values()):
+ copy.mark = core.MarkDef(type="point", **kwds)
+ else:
+ copy.mark = "point"
+ return copy
+
+ def mark_rect(self, align=Undefined, angle=Undefined, aria=Undefined, ariaRole=Undefined,
+ ariaRoleDescription=Undefined, aspect=Undefined, bandSize=Undefined,
+ baseline=Undefined, binSpacing=Undefined, blend=Undefined, clip=Undefined,
+ color=Undefined, continuousBandSize=Undefined, cornerRadius=Undefined,
+ cornerRadiusBottomLeft=Undefined, cornerRadiusBottomRight=Undefined,
+ cornerRadiusEnd=Undefined, cornerRadiusTopLeft=Undefined,
+ cornerRadiusTopRight=Undefined, cursor=Undefined, description=Undefined,
+ dir=Undefined, discreteBandSize=Undefined, dx=Undefined, dy=Undefined,
+ ellipsis=Undefined, fill=Undefined, fillOpacity=Undefined, filled=Undefined,
+ font=Undefined, fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined,
+ height=Undefined, href=Undefined, innerRadius=Undefined, interpolate=Undefined,
+ invalid=Undefined, limit=Undefined, line=Undefined, lineBreak=Undefined,
+ lineHeight=Undefined, opacity=Undefined, order=Undefined, orient=Undefined,
+ outerRadius=Undefined, padAngle=Undefined, point=Undefined, radius=Undefined,
+ radius2=Undefined, radius2Offset=Undefined, radiusOffset=Undefined, shape=Undefined,
+ size=Undefined, smooth=Undefined, stroke=Undefined, strokeCap=Undefined,
+ strokeDash=Undefined, strokeDashOffset=Undefined, strokeJoin=Undefined,
+ strokeMiterLimit=Undefined, strokeOffset=Undefined, strokeOpacity=Undefined,
+ strokeWidth=Undefined, style=Undefined, tension=Undefined, text=Undefined,
+ theta=Undefined, theta2=Undefined, theta2Offset=Undefined, thetaOffset=Undefined,
+ thickness=Undefined, timeUnitBand=Undefined, timeUnitBandPosition=Undefined,
+ tooltip=Undefined, url=Undefined, width=Undefined, x=Undefined, x2=Undefined,
+ x2Offset=Undefined, xOffset=Undefined, y=Undefined, y2=Undefined, y2Offset=Undefined,
+ yOffset=Undefined, **kwds):
+ """Set the chart's mark to 'rect'
+
+ For information on additional arguments, see :class:`MarkDef`
+ """
+ kwds = dict(align=align, angle=angle, aria=aria, ariaRole=ariaRole,
+ ariaRoleDescription=ariaRoleDescription, aspect=aspect, bandSize=bandSize,
+ baseline=baseline, binSpacing=binSpacing, blend=blend, clip=clip, color=color,
+ continuousBandSize=continuousBandSize, cornerRadius=cornerRadius,
+ cornerRadiusBottomLeft=cornerRadiusBottomLeft,
+ cornerRadiusBottomRight=cornerRadiusBottomRight, cornerRadiusEnd=cornerRadiusEnd,
+ cornerRadiusTopLeft=cornerRadiusTopLeft, cornerRadiusTopRight=cornerRadiusTopRight,
+ cursor=cursor, description=description, dir=dir, discreteBandSize=discreteBandSize,
+ dx=dx, dy=dy, ellipsis=ellipsis, fill=fill, fillOpacity=fillOpacity, filled=filled,
+ font=font, fontSize=fontSize, fontStyle=fontStyle, fontWeight=fontWeight,
+ height=height, href=href, innerRadius=innerRadius, interpolate=interpolate,
+ invalid=invalid, limit=limit, line=line, lineBreak=lineBreak, lineHeight=lineHeight,
+ opacity=opacity, order=order, orient=orient, outerRadius=outerRadius,
+ padAngle=padAngle, point=point, radius=radius, radius2=radius2,
+ radius2Offset=radius2Offset, radiusOffset=radiusOffset, shape=shape, size=size,
+ smooth=smooth, stroke=stroke, strokeCap=strokeCap, strokeDash=strokeDash,
+ strokeDashOffset=strokeDashOffset, strokeJoin=strokeJoin,
+ strokeMiterLimit=strokeMiterLimit, strokeOffset=strokeOffset,
+ strokeOpacity=strokeOpacity, strokeWidth=strokeWidth, style=style, tension=tension,
+ text=text, theta=theta, theta2=theta2, theta2Offset=theta2Offset,
+ thetaOffset=thetaOffset, thickness=thickness, timeUnitBand=timeUnitBand,
+ timeUnitBandPosition=timeUnitBandPosition, tooltip=tooltip, url=url, width=width,
+ x=x, x2=x2, x2Offset=x2Offset, xOffset=xOffset, y=y, y2=y2, y2Offset=y2Offset,
+ yOffset=yOffset, **kwds)
+ copy = self.copy(deep=False)
+ if any(val is not Undefined for val in kwds.values()):
+ copy.mark = core.MarkDef(type="rect", **kwds)
+ else:
+ copy.mark = "rect"
+ return copy
+
+ def mark_rule(self, align=Undefined, angle=Undefined, aria=Undefined, ariaRole=Undefined,
+ ariaRoleDescription=Undefined, aspect=Undefined, bandSize=Undefined,
+ baseline=Undefined, binSpacing=Undefined, blend=Undefined, clip=Undefined,
+ color=Undefined, continuousBandSize=Undefined, cornerRadius=Undefined,
+ cornerRadiusBottomLeft=Undefined, cornerRadiusBottomRight=Undefined,
+ cornerRadiusEnd=Undefined, cornerRadiusTopLeft=Undefined,
+ cornerRadiusTopRight=Undefined, cursor=Undefined, description=Undefined,
+ dir=Undefined, discreteBandSize=Undefined, dx=Undefined, dy=Undefined,
+ ellipsis=Undefined, fill=Undefined, fillOpacity=Undefined, filled=Undefined,
+ font=Undefined, fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined,
+ height=Undefined, href=Undefined, innerRadius=Undefined, interpolate=Undefined,
+ invalid=Undefined, limit=Undefined, line=Undefined, lineBreak=Undefined,
+ lineHeight=Undefined, opacity=Undefined, order=Undefined, orient=Undefined,
+ outerRadius=Undefined, padAngle=Undefined, point=Undefined, radius=Undefined,
+ radius2=Undefined, radius2Offset=Undefined, radiusOffset=Undefined, shape=Undefined,
+ size=Undefined, smooth=Undefined, stroke=Undefined, strokeCap=Undefined,
+ strokeDash=Undefined, strokeDashOffset=Undefined, strokeJoin=Undefined,
+ strokeMiterLimit=Undefined, strokeOffset=Undefined, strokeOpacity=Undefined,
+ strokeWidth=Undefined, style=Undefined, tension=Undefined, text=Undefined,
+ theta=Undefined, theta2=Undefined, theta2Offset=Undefined, thetaOffset=Undefined,
+ thickness=Undefined, timeUnitBand=Undefined, timeUnitBandPosition=Undefined,
+ tooltip=Undefined, url=Undefined, width=Undefined, x=Undefined, x2=Undefined,
+ x2Offset=Undefined, xOffset=Undefined, y=Undefined, y2=Undefined, y2Offset=Undefined,
+ yOffset=Undefined, **kwds):
+ """Set the chart's mark to 'rule'
+
+ For information on additional arguments, see :class:`MarkDef`
+ """
+ kwds = dict(align=align, angle=angle, aria=aria, ariaRole=ariaRole,
+ ariaRoleDescription=ariaRoleDescription, aspect=aspect, bandSize=bandSize,
+ baseline=baseline, binSpacing=binSpacing, blend=blend, clip=clip, color=color,
+ continuousBandSize=continuousBandSize, cornerRadius=cornerRadius,
+ cornerRadiusBottomLeft=cornerRadiusBottomLeft,
+ cornerRadiusBottomRight=cornerRadiusBottomRight, cornerRadiusEnd=cornerRadiusEnd,
+ cornerRadiusTopLeft=cornerRadiusTopLeft, cornerRadiusTopRight=cornerRadiusTopRight,
+ cursor=cursor, description=description, dir=dir, discreteBandSize=discreteBandSize,
+ dx=dx, dy=dy, ellipsis=ellipsis, fill=fill, fillOpacity=fillOpacity, filled=filled,
+ font=font, fontSize=fontSize, fontStyle=fontStyle, fontWeight=fontWeight,
+ height=height, href=href, innerRadius=innerRadius, interpolate=interpolate,
+ invalid=invalid, limit=limit, line=line, lineBreak=lineBreak, lineHeight=lineHeight,
+ opacity=opacity, order=order, orient=orient, outerRadius=outerRadius,
+ padAngle=padAngle, point=point, radius=radius, radius2=radius2,
+ radius2Offset=radius2Offset, radiusOffset=radiusOffset, shape=shape, size=size,
+ smooth=smooth, stroke=stroke, strokeCap=strokeCap, strokeDash=strokeDash,
+ strokeDashOffset=strokeDashOffset, strokeJoin=strokeJoin,
+ strokeMiterLimit=strokeMiterLimit, strokeOffset=strokeOffset,
+ strokeOpacity=strokeOpacity, strokeWidth=strokeWidth, style=style, tension=tension,
+ text=text, theta=theta, theta2=theta2, theta2Offset=theta2Offset,
+ thetaOffset=thetaOffset, thickness=thickness, timeUnitBand=timeUnitBand,
+ timeUnitBandPosition=timeUnitBandPosition, tooltip=tooltip, url=url, width=width,
+ x=x, x2=x2, x2Offset=x2Offset, xOffset=xOffset, y=y, y2=y2, y2Offset=y2Offset,
+ yOffset=yOffset, **kwds)
+ copy = self.copy(deep=False)
+ if any(val is not Undefined for val in kwds.values()):
+ copy.mark = core.MarkDef(type="rule", **kwds)
+ else:
+ copy.mark = "rule"
+ return copy
+
+ def mark_text(self, align=Undefined, angle=Undefined, aria=Undefined, ariaRole=Undefined,
+ ariaRoleDescription=Undefined, aspect=Undefined, bandSize=Undefined,
+ baseline=Undefined, binSpacing=Undefined, blend=Undefined, clip=Undefined,
+ color=Undefined, continuousBandSize=Undefined, cornerRadius=Undefined,
+ cornerRadiusBottomLeft=Undefined, cornerRadiusBottomRight=Undefined,
+ cornerRadiusEnd=Undefined, cornerRadiusTopLeft=Undefined,
+ cornerRadiusTopRight=Undefined, cursor=Undefined, description=Undefined,
+ dir=Undefined, discreteBandSize=Undefined, dx=Undefined, dy=Undefined,
+ ellipsis=Undefined, fill=Undefined, fillOpacity=Undefined, filled=Undefined,
+ font=Undefined, fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined,
+ height=Undefined, href=Undefined, innerRadius=Undefined, interpolate=Undefined,
+ invalid=Undefined, limit=Undefined, line=Undefined, lineBreak=Undefined,
+ lineHeight=Undefined, opacity=Undefined, order=Undefined, orient=Undefined,
+ outerRadius=Undefined, padAngle=Undefined, point=Undefined, radius=Undefined,
+ radius2=Undefined, radius2Offset=Undefined, radiusOffset=Undefined, shape=Undefined,
+ size=Undefined, smooth=Undefined, stroke=Undefined, strokeCap=Undefined,
+ strokeDash=Undefined, strokeDashOffset=Undefined, strokeJoin=Undefined,
+ strokeMiterLimit=Undefined, strokeOffset=Undefined, strokeOpacity=Undefined,
+ strokeWidth=Undefined, style=Undefined, tension=Undefined, text=Undefined,
+ theta=Undefined, theta2=Undefined, theta2Offset=Undefined, thetaOffset=Undefined,
+ thickness=Undefined, timeUnitBand=Undefined, timeUnitBandPosition=Undefined,
+ tooltip=Undefined, url=Undefined, width=Undefined, x=Undefined, x2=Undefined,
+ x2Offset=Undefined, xOffset=Undefined, y=Undefined, y2=Undefined, y2Offset=Undefined,
+ yOffset=Undefined, **kwds):
+ """Set the chart's mark to 'text'
+
+ For information on additional arguments, see :class:`MarkDef`
+ """
+ kwds = dict(align=align, angle=angle, aria=aria, ariaRole=ariaRole,
+ ariaRoleDescription=ariaRoleDescription, aspect=aspect, bandSize=bandSize,
+ baseline=baseline, binSpacing=binSpacing, blend=blend, clip=clip, color=color,
+ continuousBandSize=continuousBandSize, cornerRadius=cornerRadius,
+ cornerRadiusBottomLeft=cornerRadiusBottomLeft,
+ cornerRadiusBottomRight=cornerRadiusBottomRight, cornerRadiusEnd=cornerRadiusEnd,
+ cornerRadiusTopLeft=cornerRadiusTopLeft, cornerRadiusTopRight=cornerRadiusTopRight,
+ cursor=cursor, description=description, dir=dir, discreteBandSize=discreteBandSize,
+ dx=dx, dy=dy, ellipsis=ellipsis, fill=fill, fillOpacity=fillOpacity, filled=filled,
+ font=font, fontSize=fontSize, fontStyle=fontStyle, fontWeight=fontWeight,
+ height=height, href=href, innerRadius=innerRadius, interpolate=interpolate,
+ invalid=invalid, limit=limit, line=line, lineBreak=lineBreak, lineHeight=lineHeight,
+ opacity=opacity, order=order, orient=orient, outerRadius=outerRadius,
+ padAngle=padAngle, point=point, radius=radius, radius2=radius2,
+ radius2Offset=radius2Offset, radiusOffset=radiusOffset, shape=shape, size=size,
+ smooth=smooth, stroke=stroke, strokeCap=strokeCap, strokeDash=strokeDash,
+ strokeDashOffset=strokeDashOffset, strokeJoin=strokeJoin,
+ strokeMiterLimit=strokeMiterLimit, strokeOffset=strokeOffset,
+ strokeOpacity=strokeOpacity, strokeWidth=strokeWidth, style=style, tension=tension,
+ text=text, theta=theta, theta2=theta2, theta2Offset=theta2Offset,
+ thetaOffset=thetaOffset, thickness=thickness, timeUnitBand=timeUnitBand,
+ timeUnitBandPosition=timeUnitBandPosition, tooltip=tooltip, url=url, width=width,
+ x=x, x2=x2, x2Offset=x2Offset, xOffset=xOffset, y=y, y2=y2, y2Offset=y2Offset,
+ yOffset=yOffset, **kwds)
+ copy = self.copy(deep=False)
+ if any(val is not Undefined for val in kwds.values()):
+ copy.mark = core.MarkDef(type="text", **kwds)
+ else:
+ copy.mark = "text"
+ return copy
+
+ def mark_tick(self, align=Undefined, angle=Undefined, aria=Undefined, ariaRole=Undefined,
+ ariaRoleDescription=Undefined, aspect=Undefined, bandSize=Undefined,
+ baseline=Undefined, binSpacing=Undefined, blend=Undefined, clip=Undefined,
+ color=Undefined, continuousBandSize=Undefined, cornerRadius=Undefined,
+ cornerRadiusBottomLeft=Undefined, cornerRadiusBottomRight=Undefined,
+ cornerRadiusEnd=Undefined, cornerRadiusTopLeft=Undefined,
+ cornerRadiusTopRight=Undefined, cursor=Undefined, description=Undefined,
+ dir=Undefined, discreteBandSize=Undefined, dx=Undefined, dy=Undefined,
+ ellipsis=Undefined, fill=Undefined, fillOpacity=Undefined, filled=Undefined,
+ font=Undefined, fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined,
+ height=Undefined, href=Undefined, innerRadius=Undefined, interpolate=Undefined,
+ invalid=Undefined, limit=Undefined, line=Undefined, lineBreak=Undefined,
+ lineHeight=Undefined, opacity=Undefined, order=Undefined, orient=Undefined,
+ outerRadius=Undefined, padAngle=Undefined, point=Undefined, radius=Undefined,
+ radius2=Undefined, radius2Offset=Undefined, radiusOffset=Undefined, shape=Undefined,
+ size=Undefined, smooth=Undefined, stroke=Undefined, strokeCap=Undefined,
+ strokeDash=Undefined, strokeDashOffset=Undefined, strokeJoin=Undefined,
+ strokeMiterLimit=Undefined, strokeOffset=Undefined, strokeOpacity=Undefined,
+ strokeWidth=Undefined, style=Undefined, tension=Undefined, text=Undefined,
+ theta=Undefined, theta2=Undefined, theta2Offset=Undefined, thetaOffset=Undefined,
+ thickness=Undefined, timeUnitBand=Undefined, timeUnitBandPosition=Undefined,
+ tooltip=Undefined, url=Undefined, width=Undefined, x=Undefined, x2=Undefined,
+ x2Offset=Undefined, xOffset=Undefined, y=Undefined, y2=Undefined, y2Offset=Undefined,
+ yOffset=Undefined, **kwds):
+ """Set the chart's mark to 'tick'
+
+ For information on additional arguments, see :class:`MarkDef`
+ """
+ kwds = dict(align=align, angle=angle, aria=aria, ariaRole=ariaRole,
+ ariaRoleDescription=ariaRoleDescription, aspect=aspect, bandSize=bandSize,
+ baseline=baseline, binSpacing=binSpacing, blend=blend, clip=clip, color=color,
+ continuousBandSize=continuousBandSize, cornerRadius=cornerRadius,
+ cornerRadiusBottomLeft=cornerRadiusBottomLeft,
+ cornerRadiusBottomRight=cornerRadiusBottomRight, cornerRadiusEnd=cornerRadiusEnd,
+ cornerRadiusTopLeft=cornerRadiusTopLeft, cornerRadiusTopRight=cornerRadiusTopRight,
+ cursor=cursor, description=description, dir=dir, discreteBandSize=discreteBandSize,
+ dx=dx, dy=dy, ellipsis=ellipsis, fill=fill, fillOpacity=fillOpacity, filled=filled,
+ font=font, fontSize=fontSize, fontStyle=fontStyle, fontWeight=fontWeight,
+ height=height, href=href, innerRadius=innerRadius, interpolate=interpolate,
+ invalid=invalid, limit=limit, line=line, lineBreak=lineBreak, lineHeight=lineHeight,
+ opacity=opacity, order=order, orient=orient, outerRadius=outerRadius,
+ padAngle=padAngle, point=point, radius=radius, radius2=radius2,
+ radius2Offset=radius2Offset, radiusOffset=radiusOffset, shape=shape, size=size,
+ smooth=smooth, stroke=stroke, strokeCap=strokeCap, strokeDash=strokeDash,
+ strokeDashOffset=strokeDashOffset, strokeJoin=strokeJoin,
+ strokeMiterLimit=strokeMiterLimit, strokeOffset=strokeOffset,
+ strokeOpacity=strokeOpacity, strokeWidth=strokeWidth, style=style, tension=tension,
+ text=text, theta=theta, theta2=theta2, theta2Offset=theta2Offset,
+ thetaOffset=thetaOffset, thickness=thickness, timeUnitBand=timeUnitBand,
+ timeUnitBandPosition=timeUnitBandPosition, tooltip=tooltip, url=url, width=width,
+ x=x, x2=x2, x2Offset=x2Offset, xOffset=xOffset, y=y, y2=y2, y2Offset=y2Offset,
+ yOffset=yOffset, **kwds)
+ copy = self.copy(deep=False)
+ if any(val is not Undefined for val in kwds.values()):
+ copy.mark = core.MarkDef(type="tick", **kwds)
+ else:
+ copy.mark = "tick"
+ return copy
+
+ def mark_trail(self, align=Undefined, angle=Undefined, aria=Undefined, ariaRole=Undefined,
+ ariaRoleDescription=Undefined, aspect=Undefined, bandSize=Undefined,
+ baseline=Undefined, binSpacing=Undefined, blend=Undefined, clip=Undefined,
+ color=Undefined, continuousBandSize=Undefined, cornerRadius=Undefined,
+ cornerRadiusBottomLeft=Undefined, cornerRadiusBottomRight=Undefined,
+ cornerRadiusEnd=Undefined, cornerRadiusTopLeft=Undefined,
+ cornerRadiusTopRight=Undefined, cursor=Undefined, description=Undefined,
+ dir=Undefined, discreteBandSize=Undefined, dx=Undefined, dy=Undefined,
+ ellipsis=Undefined, fill=Undefined, fillOpacity=Undefined, filled=Undefined,
+ font=Undefined, fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined,
+ height=Undefined, href=Undefined, innerRadius=Undefined, interpolate=Undefined,
+ invalid=Undefined, limit=Undefined, line=Undefined, lineBreak=Undefined,
+ lineHeight=Undefined, opacity=Undefined, order=Undefined, orient=Undefined,
+ outerRadius=Undefined, padAngle=Undefined, point=Undefined, radius=Undefined,
+ radius2=Undefined, radius2Offset=Undefined, radiusOffset=Undefined, shape=Undefined,
+ size=Undefined, smooth=Undefined, stroke=Undefined, strokeCap=Undefined,
+ strokeDash=Undefined, strokeDashOffset=Undefined, strokeJoin=Undefined,
+ strokeMiterLimit=Undefined, strokeOffset=Undefined, strokeOpacity=Undefined,
+ strokeWidth=Undefined, style=Undefined, tension=Undefined, text=Undefined,
+ theta=Undefined, theta2=Undefined, theta2Offset=Undefined, thetaOffset=Undefined,
+ thickness=Undefined, timeUnitBand=Undefined, timeUnitBandPosition=Undefined,
+ tooltip=Undefined, url=Undefined, width=Undefined, x=Undefined, x2=Undefined,
+ x2Offset=Undefined, xOffset=Undefined, y=Undefined, y2=Undefined, y2Offset=Undefined,
+ yOffset=Undefined, **kwds):
+ """Set the chart's mark to 'trail'
+
+ For information on additional arguments, see :class:`MarkDef`
+ """
+ kwds = dict(align=align, angle=angle, aria=aria, ariaRole=ariaRole,
+ ariaRoleDescription=ariaRoleDescription, aspect=aspect, bandSize=bandSize,
+ baseline=baseline, binSpacing=binSpacing, blend=blend, clip=clip, color=color,
+ continuousBandSize=continuousBandSize, cornerRadius=cornerRadius,
+ cornerRadiusBottomLeft=cornerRadiusBottomLeft,
+ cornerRadiusBottomRight=cornerRadiusBottomRight, cornerRadiusEnd=cornerRadiusEnd,
+ cornerRadiusTopLeft=cornerRadiusTopLeft, cornerRadiusTopRight=cornerRadiusTopRight,
+ cursor=cursor, description=description, dir=dir, discreteBandSize=discreteBandSize,
+ dx=dx, dy=dy, ellipsis=ellipsis, fill=fill, fillOpacity=fillOpacity, filled=filled,
+ font=font, fontSize=fontSize, fontStyle=fontStyle, fontWeight=fontWeight,
+ height=height, href=href, innerRadius=innerRadius, interpolate=interpolate,
+ invalid=invalid, limit=limit, line=line, lineBreak=lineBreak, lineHeight=lineHeight,
+ opacity=opacity, order=order, orient=orient, outerRadius=outerRadius,
+ padAngle=padAngle, point=point, radius=radius, radius2=radius2,
+ radius2Offset=radius2Offset, radiusOffset=radiusOffset, shape=shape, size=size,
+ smooth=smooth, stroke=stroke, strokeCap=strokeCap, strokeDash=strokeDash,
+ strokeDashOffset=strokeDashOffset, strokeJoin=strokeJoin,
+ strokeMiterLimit=strokeMiterLimit, strokeOffset=strokeOffset,
+ strokeOpacity=strokeOpacity, strokeWidth=strokeWidth, style=style, tension=tension,
+ text=text, theta=theta, theta2=theta2, theta2Offset=theta2Offset,
+ thetaOffset=thetaOffset, thickness=thickness, timeUnitBand=timeUnitBand,
+ timeUnitBandPosition=timeUnitBandPosition, tooltip=tooltip, url=url, width=width,
+ x=x, x2=x2, x2Offset=x2Offset, xOffset=xOffset, y=y, y2=y2, y2Offset=y2Offset,
+ yOffset=yOffset, **kwds)
+ copy = self.copy(deep=False)
+ if any(val is not Undefined for val in kwds.values()):
+ copy.mark = core.MarkDef(type="trail", **kwds)
+ else:
+ copy.mark = "trail"
+ return copy
+
+ def mark_circle(self, align=Undefined, angle=Undefined, aria=Undefined, ariaRole=Undefined,
+ ariaRoleDescription=Undefined, aspect=Undefined, bandSize=Undefined,
+ baseline=Undefined, binSpacing=Undefined, blend=Undefined, clip=Undefined,
+ color=Undefined, continuousBandSize=Undefined, cornerRadius=Undefined,
+ cornerRadiusBottomLeft=Undefined, cornerRadiusBottomRight=Undefined,
+ cornerRadiusEnd=Undefined, cornerRadiusTopLeft=Undefined,
+ cornerRadiusTopRight=Undefined, cursor=Undefined, description=Undefined,
+ dir=Undefined, discreteBandSize=Undefined, dx=Undefined, dy=Undefined,
+ ellipsis=Undefined, fill=Undefined, fillOpacity=Undefined, filled=Undefined,
+ font=Undefined, fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined,
+ height=Undefined, href=Undefined, innerRadius=Undefined, interpolate=Undefined,
+ invalid=Undefined, limit=Undefined, line=Undefined, lineBreak=Undefined,
+ lineHeight=Undefined, opacity=Undefined, order=Undefined, orient=Undefined,
+ outerRadius=Undefined, padAngle=Undefined, point=Undefined, radius=Undefined,
+ radius2=Undefined, radius2Offset=Undefined, radiusOffset=Undefined, shape=Undefined,
+ size=Undefined, smooth=Undefined, stroke=Undefined, strokeCap=Undefined,
+ strokeDash=Undefined, strokeDashOffset=Undefined, strokeJoin=Undefined,
+ strokeMiterLimit=Undefined, strokeOffset=Undefined, strokeOpacity=Undefined,
+ strokeWidth=Undefined, style=Undefined, tension=Undefined, text=Undefined,
+ theta=Undefined, theta2=Undefined, theta2Offset=Undefined, thetaOffset=Undefined,
+ thickness=Undefined, timeUnitBand=Undefined, timeUnitBandPosition=Undefined,
+ tooltip=Undefined, url=Undefined, width=Undefined, x=Undefined, x2=Undefined,
+ x2Offset=Undefined, xOffset=Undefined, y=Undefined, y2=Undefined,
+ y2Offset=Undefined, yOffset=Undefined, **kwds):
+ """Set the chart's mark to 'circle'
+
+ For information on additional arguments, see :class:`MarkDef`
+ """
+ kwds = dict(align=align, angle=angle, aria=aria, ariaRole=ariaRole,
+ ariaRoleDescription=ariaRoleDescription, aspect=aspect, bandSize=bandSize,
+ baseline=baseline, binSpacing=binSpacing, blend=blend, clip=clip, color=color,
+ continuousBandSize=continuousBandSize, cornerRadius=cornerRadius,
+ cornerRadiusBottomLeft=cornerRadiusBottomLeft,
+ cornerRadiusBottomRight=cornerRadiusBottomRight, cornerRadiusEnd=cornerRadiusEnd,
+ cornerRadiusTopLeft=cornerRadiusTopLeft, cornerRadiusTopRight=cornerRadiusTopRight,
+ cursor=cursor, description=description, dir=dir, discreteBandSize=discreteBandSize,
+ dx=dx, dy=dy, ellipsis=ellipsis, fill=fill, fillOpacity=fillOpacity, filled=filled,
+ font=font, fontSize=fontSize, fontStyle=fontStyle, fontWeight=fontWeight,
+ height=height, href=href, innerRadius=innerRadius, interpolate=interpolate,
+ invalid=invalid, limit=limit, line=line, lineBreak=lineBreak, lineHeight=lineHeight,
+ opacity=opacity, order=order, orient=orient, outerRadius=outerRadius,
+ padAngle=padAngle, point=point, radius=radius, radius2=radius2,
+ radius2Offset=radius2Offset, radiusOffset=radiusOffset, shape=shape, size=size,
+ smooth=smooth, stroke=stroke, strokeCap=strokeCap, strokeDash=strokeDash,
+ strokeDashOffset=strokeDashOffset, strokeJoin=strokeJoin,
+ strokeMiterLimit=strokeMiterLimit, strokeOffset=strokeOffset,
+ strokeOpacity=strokeOpacity, strokeWidth=strokeWidth, style=style, tension=tension,
+ text=text, theta=theta, theta2=theta2, theta2Offset=theta2Offset,
+ thetaOffset=thetaOffset, thickness=thickness, timeUnitBand=timeUnitBand,
+ timeUnitBandPosition=timeUnitBandPosition, tooltip=tooltip, url=url, width=width,
+ x=x, x2=x2, x2Offset=x2Offset, xOffset=xOffset, y=y, y2=y2, y2Offset=y2Offset,
+ yOffset=yOffset, **kwds)
+ copy = self.copy(deep=False)
+ if any(val is not Undefined for val in kwds.values()):
+ copy.mark = core.MarkDef(type="circle", **kwds)
+ else:
+ copy.mark = "circle"
+ return copy
+
+ def mark_square(self, align=Undefined, angle=Undefined, aria=Undefined, ariaRole=Undefined,
+ ariaRoleDescription=Undefined, aspect=Undefined, bandSize=Undefined,
+ baseline=Undefined, binSpacing=Undefined, blend=Undefined, clip=Undefined,
+ color=Undefined, continuousBandSize=Undefined, cornerRadius=Undefined,
+ cornerRadiusBottomLeft=Undefined, cornerRadiusBottomRight=Undefined,
+ cornerRadiusEnd=Undefined, cornerRadiusTopLeft=Undefined,
+ cornerRadiusTopRight=Undefined, cursor=Undefined, description=Undefined,
+ dir=Undefined, discreteBandSize=Undefined, dx=Undefined, dy=Undefined,
+ ellipsis=Undefined, fill=Undefined, fillOpacity=Undefined, filled=Undefined,
+ font=Undefined, fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined,
+ height=Undefined, href=Undefined, innerRadius=Undefined, interpolate=Undefined,
+ invalid=Undefined, limit=Undefined, line=Undefined, lineBreak=Undefined,
+ lineHeight=Undefined, opacity=Undefined, order=Undefined, orient=Undefined,
+ outerRadius=Undefined, padAngle=Undefined, point=Undefined, radius=Undefined,
+ radius2=Undefined, radius2Offset=Undefined, radiusOffset=Undefined, shape=Undefined,
+ size=Undefined, smooth=Undefined, stroke=Undefined, strokeCap=Undefined,
+ strokeDash=Undefined, strokeDashOffset=Undefined, strokeJoin=Undefined,
+ strokeMiterLimit=Undefined, strokeOffset=Undefined, strokeOpacity=Undefined,
+ strokeWidth=Undefined, style=Undefined, tension=Undefined, text=Undefined,
+ theta=Undefined, theta2=Undefined, theta2Offset=Undefined, thetaOffset=Undefined,
+ thickness=Undefined, timeUnitBand=Undefined, timeUnitBandPosition=Undefined,
+ tooltip=Undefined, url=Undefined, width=Undefined, x=Undefined, x2=Undefined,
+ x2Offset=Undefined, xOffset=Undefined, y=Undefined, y2=Undefined,
+ y2Offset=Undefined, yOffset=Undefined, **kwds):
+ """Set the chart's mark to 'square'
+
+ For information on additional arguments, see :class:`MarkDef`
+ """
+ kwds = dict(align=align, angle=angle, aria=aria, ariaRole=ariaRole,
+ ariaRoleDescription=ariaRoleDescription, aspect=aspect, bandSize=bandSize,
+ baseline=baseline, binSpacing=binSpacing, blend=blend, clip=clip, color=color,
+ continuousBandSize=continuousBandSize, cornerRadius=cornerRadius,
+ cornerRadiusBottomLeft=cornerRadiusBottomLeft,
+ cornerRadiusBottomRight=cornerRadiusBottomRight, cornerRadiusEnd=cornerRadiusEnd,
+ cornerRadiusTopLeft=cornerRadiusTopLeft, cornerRadiusTopRight=cornerRadiusTopRight,
+ cursor=cursor, description=description, dir=dir, discreteBandSize=discreteBandSize,
+ dx=dx, dy=dy, ellipsis=ellipsis, fill=fill, fillOpacity=fillOpacity, filled=filled,
+ font=font, fontSize=fontSize, fontStyle=fontStyle, fontWeight=fontWeight,
+ height=height, href=href, innerRadius=innerRadius, interpolate=interpolate,
+ invalid=invalid, limit=limit, line=line, lineBreak=lineBreak, lineHeight=lineHeight,
+ opacity=opacity, order=order, orient=orient, outerRadius=outerRadius,
+ padAngle=padAngle, point=point, radius=radius, radius2=radius2,
+ radius2Offset=radius2Offset, radiusOffset=radiusOffset, shape=shape, size=size,
+ smooth=smooth, stroke=stroke, strokeCap=strokeCap, strokeDash=strokeDash,
+ strokeDashOffset=strokeDashOffset, strokeJoin=strokeJoin,
+ strokeMiterLimit=strokeMiterLimit, strokeOffset=strokeOffset,
+ strokeOpacity=strokeOpacity, strokeWidth=strokeWidth, style=style, tension=tension,
+ text=text, theta=theta, theta2=theta2, theta2Offset=theta2Offset,
+ thetaOffset=thetaOffset, thickness=thickness, timeUnitBand=timeUnitBand,
+ timeUnitBandPosition=timeUnitBandPosition, tooltip=tooltip, url=url, width=width,
+ x=x, x2=x2, x2Offset=x2Offset, xOffset=xOffset, y=y, y2=y2, y2Offset=y2Offset,
+ yOffset=yOffset, **kwds)
+ copy = self.copy(deep=False)
+ if any(val is not Undefined for val in kwds.values()):
+ copy.mark = core.MarkDef(type="square", **kwds)
+ else:
+ copy.mark = "square"
+ return copy
+
+ def mark_geoshape(self, align=Undefined, angle=Undefined, aria=Undefined, ariaRole=Undefined,
+ ariaRoleDescription=Undefined, aspect=Undefined, bandSize=Undefined,
+ baseline=Undefined, binSpacing=Undefined, blend=Undefined, clip=Undefined,
+ color=Undefined, continuousBandSize=Undefined, cornerRadius=Undefined,
+ cornerRadiusBottomLeft=Undefined, cornerRadiusBottomRight=Undefined,
+ cornerRadiusEnd=Undefined, cornerRadiusTopLeft=Undefined,
+ cornerRadiusTopRight=Undefined, cursor=Undefined, description=Undefined,
+ dir=Undefined, discreteBandSize=Undefined, dx=Undefined, dy=Undefined,
+ ellipsis=Undefined, fill=Undefined, fillOpacity=Undefined, filled=Undefined,
+ font=Undefined, fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined,
+ height=Undefined, href=Undefined, innerRadius=Undefined, interpolate=Undefined,
+ invalid=Undefined, limit=Undefined, line=Undefined, lineBreak=Undefined,
+ lineHeight=Undefined, opacity=Undefined, order=Undefined, orient=Undefined,
+ outerRadius=Undefined, padAngle=Undefined, point=Undefined, radius=Undefined,
+ radius2=Undefined, radius2Offset=Undefined, radiusOffset=Undefined,
+ shape=Undefined, size=Undefined, smooth=Undefined, stroke=Undefined,
+ strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined,
+ strokeJoin=Undefined, strokeMiterLimit=Undefined, strokeOffset=Undefined,
+ strokeOpacity=Undefined, strokeWidth=Undefined, style=Undefined,
+ tension=Undefined, text=Undefined, theta=Undefined, theta2=Undefined,
+ theta2Offset=Undefined, thetaOffset=Undefined, thickness=Undefined,
+ timeUnitBand=Undefined, timeUnitBandPosition=Undefined, tooltip=Undefined,
+ url=Undefined, width=Undefined, x=Undefined, x2=Undefined, x2Offset=Undefined,
+ xOffset=Undefined, y=Undefined, y2=Undefined, y2Offset=Undefined,
+ yOffset=Undefined, **kwds):
+ """Set the chart's mark to 'geoshape'
+
+ For information on additional arguments, see :class:`MarkDef`
+ """
+ kwds = dict(align=align, angle=angle, aria=aria, ariaRole=ariaRole,
+ ariaRoleDescription=ariaRoleDescription, aspect=aspect, bandSize=bandSize,
+ baseline=baseline, binSpacing=binSpacing, blend=blend, clip=clip, color=color,
+ continuousBandSize=continuousBandSize, cornerRadius=cornerRadius,
+ cornerRadiusBottomLeft=cornerRadiusBottomLeft,
+ cornerRadiusBottomRight=cornerRadiusBottomRight, cornerRadiusEnd=cornerRadiusEnd,
+ cornerRadiusTopLeft=cornerRadiusTopLeft, cornerRadiusTopRight=cornerRadiusTopRight,
+ cursor=cursor, description=description, dir=dir, discreteBandSize=discreteBandSize,
+ dx=dx, dy=dy, ellipsis=ellipsis, fill=fill, fillOpacity=fillOpacity, filled=filled,
+ font=font, fontSize=fontSize, fontStyle=fontStyle, fontWeight=fontWeight,
+ height=height, href=href, innerRadius=innerRadius, interpolate=interpolate,
+ invalid=invalid, limit=limit, line=line, lineBreak=lineBreak, lineHeight=lineHeight,
+ opacity=opacity, order=order, orient=orient, outerRadius=outerRadius,
+ padAngle=padAngle, point=point, radius=radius, radius2=radius2,
+ radius2Offset=radius2Offset, radiusOffset=radiusOffset, shape=shape, size=size,
+ smooth=smooth, stroke=stroke, strokeCap=strokeCap, strokeDash=strokeDash,
+ strokeDashOffset=strokeDashOffset, strokeJoin=strokeJoin,
+ strokeMiterLimit=strokeMiterLimit, strokeOffset=strokeOffset,
+ strokeOpacity=strokeOpacity, strokeWidth=strokeWidth, style=style, tension=tension,
+ text=text, theta=theta, theta2=theta2, theta2Offset=theta2Offset,
+ thetaOffset=thetaOffset, thickness=thickness, timeUnitBand=timeUnitBand,
+ timeUnitBandPosition=timeUnitBandPosition, tooltip=tooltip, url=url, width=width,
+ x=x, x2=x2, x2Offset=x2Offset, xOffset=xOffset, y=y, y2=y2, y2Offset=y2Offset,
+ yOffset=yOffset, **kwds)
+ copy = self.copy(deep=False)
+ if any(val is not Undefined for val in kwds.values()):
+ copy.mark = core.MarkDef(type="geoshape", **kwds)
+ else:
+ copy.mark = "geoshape"
+ return copy
+
+ def mark_boxplot(self, box=Undefined, clip=Undefined, color=Undefined, extent=Undefined,
+ median=Undefined, opacity=Undefined, orient=Undefined, outliers=Undefined,
+ rule=Undefined, size=Undefined, ticks=Undefined, **kwds):
+ """Set the chart's mark to 'boxplot'
+
+ For information on additional arguments, see :class:`BoxPlotDef`
+ """
+ kwds = dict(box=box, clip=clip, color=color, extent=extent, median=median, opacity=opacity,
+ orient=orient, outliers=outliers, rule=rule, size=size, ticks=ticks, **kwds)
+ copy = self.copy(deep=False)
+ if any(val is not Undefined for val in kwds.values()):
+ copy.mark = core.BoxPlotDef(type="boxplot", **kwds)
+ else:
+ copy.mark = "boxplot"
+ return copy
+
+ def mark_errorbar(self, clip=Undefined, color=Undefined, extent=Undefined, opacity=Undefined,
+ orient=Undefined, rule=Undefined, size=Undefined, thickness=Undefined,
+ ticks=Undefined, **kwds):
+ """Set the chart's mark to 'errorbar'
+
+ For information on additional arguments, see :class:`ErrorBarDef`
+ """
+ kwds = dict(clip=clip, color=color, extent=extent, opacity=opacity, orient=orient, rule=rule,
+ size=size, thickness=thickness, ticks=ticks, **kwds)
+ copy = self.copy(deep=False)
+ if any(val is not Undefined for val in kwds.values()):
+ copy.mark = core.ErrorBarDef(type="errorbar", **kwds)
+ else:
+ copy.mark = "errorbar"
+ return copy
+
+ def mark_errorband(self, band=Undefined, borders=Undefined, clip=Undefined, color=Undefined,
+ extent=Undefined, interpolate=Undefined, opacity=Undefined, orient=Undefined,
+ tension=Undefined, **kwds):
+ """Set the chart's mark to 'errorband'
+
+ For information on additional arguments, see :class:`ErrorBandDef`
+ """
+ kwds = dict(band=band, borders=borders, clip=clip, color=color, extent=extent,
+ interpolate=interpolate, opacity=opacity, orient=orient, tension=tension, **kwds)
+ copy = self.copy(deep=False)
+ if any(val is not Undefined for val in kwds.values()):
+ copy.mark = core.ErrorBandDef(type="errorband", **kwds)
+ else:
+ copy.mark = "errorband"
+ return copy
+
+
+class ConfigMethodMixin(object):
+ """A mixin class that defines config methods"""
+
+ @use_signature(core.Config)
+ def configure(self, *args, **kwargs):
+ copy = self.copy(deep=False)
+ copy.config = core.Config(*args, **kwargs)
+ return copy
+
+ @use_signature(core.RectConfig)
+ def configure_arc(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["arc"] = core.RectConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.AreaConfig)
+ def configure_area(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["area"] = core.AreaConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.AxisConfig)
+ def configure_axis(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["axis"] = core.AxisConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.AxisConfig)
+ def configure_axisBand(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["axisBand"] = core.AxisConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.AxisConfig)
+ def configure_axisBottom(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["axisBottom"] = core.AxisConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.AxisConfig)
+ def configure_axisDiscrete(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["axisDiscrete"] = core.AxisConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.AxisConfig)
+ def configure_axisLeft(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["axisLeft"] = core.AxisConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.AxisConfig)
+ def configure_axisPoint(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["axisPoint"] = core.AxisConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.AxisConfig)
+ def configure_axisQuantitative(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["axisQuantitative"] = core.AxisConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.AxisConfig)
+ def configure_axisRight(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["axisRight"] = core.AxisConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.AxisConfig)
+ def configure_axisTemporal(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["axisTemporal"] = core.AxisConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.AxisConfig)
+ def configure_axisTop(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["axisTop"] = core.AxisConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.AxisConfig)
+ def configure_axisX(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["axisX"] = core.AxisConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.AxisConfig)
+ def configure_axisXBand(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["axisXBand"] = core.AxisConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.AxisConfig)
+ def configure_axisXDiscrete(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["axisXDiscrete"] = core.AxisConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.AxisConfig)
+ def configure_axisXPoint(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["axisXPoint"] = core.AxisConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.AxisConfig)
+ def configure_axisXQuantitative(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["axisXQuantitative"] = core.AxisConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.AxisConfig)
+ def configure_axisXTemporal(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["axisXTemporal"] = core.AxisConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.AxisConfig)
+ def configure_axisY(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["axisY"] = core.AxisConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.AxisConfig)
+ def configure_axisYBand(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["axisYBand"] = core.AxisConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.AxisConfig)
+ def configure_axisYDiscrete(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["axisYDiscrete"] = core.AxisConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.AxisConfig)
+ def configure_axisYPoint(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["axisYPoint"] = core.AxisConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.AxisConfig)
+ def configure_axisYQuantitative(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["axisYQuantitative"] = core.AxisConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.AxisConfig)
+ def configure_axisYTemporal(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["axisYTemporal"] = core.AxisConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.BarConfig)
+ def configure_bar(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["bar"] = core.BarConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.BoxPlotConfig)
+ def configure_boxplot(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["boxplot"] = core.BoxPlotConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.MarkConfig)
+ def configure_circle(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["circle"] = core.MarkConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.CompositionConfig)
+ def configure_concat(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["concat"] = core.CompositionConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.ErrorBandConfig)
+ def configure_errorband(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["errorband"] = core.ErrorBandConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.ErrorBarConfig)
+ def configure_errorbar(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["errorbar"] = core.ErrorBarConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.CompositionConfig)
+ def configure_facet(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["facet"] = core.CompositionConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.MarkConfig)
+ def configure_geoshape(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["geoshape"] = core.MarkConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.HeaderConfig)
+ def configure_header(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["header"] = core.HeaderConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.HeaderConfig)
+ def configure_headerColumn(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["headerColumn"] = core.HeaderConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.HeaderConfig)
+ def configure_headerFacet(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["headerFacet"] = core.HeaderConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.HeaderConfig)
+ def configure_headerRow(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["headerRow"] = core.HeaderConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.RectConfig)
+ def configure_image(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["image"] = core.RectConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.LegendConfig)
+ def configure_legend(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["legend"] = core.LegendConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.LineConfig)
+ def configure_line(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["line"] = core.LineConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.MarkConfig)
+ def configure_mark(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["mark"] = core.MarkConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.MarkConfig)
+ def configure_point(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["point"] = core.MarkConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.ProjectionConfig)
+ def configure_projection(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["projection"] = core.ProjectionConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.RangeConfig)
+ def configure_range(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["range"] = core.RangeConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.RectConfig)
+ def configure_rect(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["rect"] = core.RectConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.MarkConfig)
+ def configure_rule(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["rule"] = core.MarkConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.ScaleConfig)
+ def configure_scale(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["scale"] = core.ScaleConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.SelectionConfig)
+ def configure_selection(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["selection"] = core.SelectionConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.MarkConfig)
+ def configure_square(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["square"] = core.MarkConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.MarkConfig)
+ def configure_text(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["text"] = core.MarkConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.TickConfig)
+ def configure_tick(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["tick"] = core.TickConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.TitleConfig)
+ def configure_title(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["title"] = core.TitleConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.LineConfig)
+ def configure_trail(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["trail"] = core.LineConfig(*args, **kwargs)
+ return copy
+
+ @use_signature(core.ViewConfig)
+ def configure_view(self, *args, **kwargs):
+ copy = self.copy(deep=['config'])
+ if copy.config is Undefined:
+ copy.config = core.Config()
+ copy.config["view"] = core.ViewConfig(*args, **kwargs)
+ return copy \ No newline at end of file
diff --git a/venv/lib/python3.9/site-packages/altair/vegalite/v4/schema/vega-lite-schema.json b/venv/lib/python3.9/site-packages/altair/vegalite/v4/schema/vega-lite-schema.json
new file mode 100644
index 00000000..dc73fa4a
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vegalite/v4/schema/vega-lite-schema.json
@@ -0,0 +1,32017 @@
+{
+ "$ref": "#/definitions/TopLevelSpec",
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "definitions": {
+ "Aggregate": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/NonArgAggregateOp"
+ },
+ {
+ "$ref": "#/definitions/ArgmaxDef"
+ },
+ {
+ "$ref": "#/definitions/ArgminDef"
+ }
+ ]
+ },
+ "AggregateOp": {
+ "enum": [
+ "argmax",
+ "argmin",
+ "average",
+ "count",
+ "distinct",
+ "max",
+ "mean",
+ "median",
+ "min",
+ "missing",
+ "product",
+ "q1",
+ "q3",
+ "ci0",
+ "ci1",
+ "stderr",
+ "stdev",
+ "stdevp",
+ "sum",
+ "valid",
+ "values",
+ "variance",
+ "variancep"
+ ],
+ "type": "string"
+ },
+ "AggregateTransform": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "description": "Array of objects that define fields to aggregate.",
+ "items": {
+ "$ref": "#/definitions/AggregatedFieldDef"
+ },
+ "type": "array"
+ },
+ "groupby": {
+ "description": "The data fields to group by. If not specified, a single group containing all data objects will be used.",
+ "items": {
+ "$ref": "#/definitions/FieldName"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "aggregate"
+ ],
+ "type": "object"
+ },
+ "AggregatedFieldDef": {
+ "additionalProperties": false,
+ "properties": {
+ "as": {
+ "$ref": "#/definitions/FieldName",
+ "description": "The output field names to use for each aggregated field."
+ },
+ "field": {
+ "$ref": "#/definitions/FieldName",
+ "description": "The data field for which to compute aggregate function. This is required for all aggregation operations except `\"count\"`."
+ },
+ "op": {
+ "$ref": "#/definitions/AggregateOp",
+ "description": "The aggregation operation to apply to the fields (e.g., `\"sum\"`, `\"average\"`, or `\"count\"`). See the [full list of supported aggregation operations](https://vega.github.io/vega-lite/docs/aggregate.html#ops) for more information."
+ }
+ },
+ "required": [
+ "op",
+ "as"
+ ],
+ "type": "object"
+ },
+ "Align": {
+ "enum": [
+ "left",
+ "center",
+ "right"
+ ],
+ "type": "string"
+ },
+ "AllSortString": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SortOrder"
+ },
+ {
+ "$ref": "#/definitions/SortByChannel"
+ },
+ {
+ "$ref": "#/definitions/SortByChannelDesc"
+ }
+ ]
+ },
+ "AnyMark": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/CompositeMark"
+ },
+ {
+ "$ref": "#/definitions/CompositeMarkDef"
+ },
+ {
+ "$ref": "#/definitions/Mark"
+ },
+ {
+ "$ref": "#/definitions/MarkDef"
+ }
+ ]
+ },
+ "AnyMarkConfig": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/MarkConfig<>"
+ },
+ {
+ "$ref": "#/definitions/AreaConfig"
+ },
+ {
+ "$ref": "#/definitions/BarConfig"
+ },
+ {
+ "$ref": "#/definitions/RectConfig"
+ },
+ {
+ "$ref": "#/definitions/LineConfig"
+ },
+ {
+ "$ref": "#/definitions/TickConfig"
+ }
+ ]
+ },
+ "AreaConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "align": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Align"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of `\"left\"`, `\"right\"`, `\"center\"`.\n\n__Note:__ Expression reference is *not* supported for range marks."
+ },
+ "angle": {
+ "anyOf": [
+ {
+ "description": "The rotation angle of the text, in degrees.",
+ "maximum": 360,
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "aria": {
+ "anyOf": [
+ {
+ "description": "A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the \"aria-hidden\" attribute will be set on the output SVG element, removing the mark item from the ARIA accessibility tree.",
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "ariaRole": {
+ "anyOf": [
+ {
+ "description": "Sets the type of user interface element of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the \"role\" attribute. Warning: this property is experimental and may be changed in the future.",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "ariaRoleDescription": {
+ "anyOf": [
+ {
+ "description": "A human-readable, author-localized description for the role of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the \"aria-roledescription\" attribute. Warning: this property is experimental and may be changed in the future.",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "aspect": {
+ "anyOf": [
+ {
+ "description": "Whether to keep aspect ratio of image marks.",
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "baseline": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TextBaseline"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "For text marks, the vertical text baseline. One of `\"alphabetic\"` (default), `\"top\"`, `\"middle\"`, `\"bottom\"`, `\"line-top\"`, `\"line-bottom\"`, or an expression reference that provides one of the valid values. The `\"line-top\"` and `\"line-bottom\"` values operate similarly to `\"top\"` and `\"bottom\"`, but are calculated relative to the `lineHeight` rather than `fontSize` alone.\n\nFor range marks, the vertical alignment of the marks. One of `\"top\"`, `\"middle\"`, `\"bottom\"`.\n\n__Note:__ Expression reference is *not* supported for range marks."
+ },
+ "blend": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Blend",
+ "description": "The color blend mode for drawing an item on its current background. Any valid [CSS mix-blend-mode](https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode) value can be used.\n\n__Default value: `\"source-over\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "color": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/Gradient"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Default color.\n\n__Default value:__ <span style=\"color: #4682b4;\">&#9632;</span> `\"#4682b4\"`\n\n__Note:__ - This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config). - The `fill` and `stroke` properties have higher precedence than `color` and will override `color`."
+ },
+ "cornerRadius": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles or arcs' corners.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "cornerRadiusBottomLeft": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles' bottom left corner.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "cornerRadiusBottomRight": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles' bottom right corner.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "cornerRadiusTopLeft": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles' top right corner.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "cornerRadiusTopRight": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles' top left corner.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "cursor": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Cursor",
+ "description": "The mouse cursor used over the mark. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "description": {
+ "anyOf": [
+ {
+ "description": "A text description of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the [\"aria-label\" attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute).",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "dir": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TextDirection",
+ "description": "The direction of the text. One of `\"ltr\"` (left-to-right) or `\"rtl\"` (right-to-left). This property determines on which side is truncated in response to the limit parameter.\n\n__Default value:__ `\"ltr\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "dx": {
+ "anyOf": [
+ {
+ "description": "The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "dy": {
+ "anyOf": [
+ {
+ "description": "The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "ellipsis": {
+ "anyOf": [
+ {
+ "description": "The ellipsis string for text truncated in response to the limit parameter.\n\n__Default value:__ `\"…\"`",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "endAngle": {
+ "anyOf": [
+ {
+ "description": "The end angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "fill": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/Gradient"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Default fill color. This property has higher precedence than `config.color`. Set to `null` to remove fill.\n\n__Default value:__ (None)"
+ },
+ "fillOpacity": {
+ "anyOf": [
+ {
+ "description": "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "filled": {
+ "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `false` for all `point`, `line`, and `rule` marks as well as `geoshape` marks for [`graticule`](https://vega.github.io/vega-lite/docs/data.html#graticule) data sources; otherwise, `true`.\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).",
+ "type": "boolean"
+ },
+ "font": {
+ "anyOf": [
+ {
+ "description": "The typeface to set the text in (e.g., `\"Helvetica Neue\"`).",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "fontSize": {
+ "anyOf": [
+ {
+ "description": "The font size, in pixels.\n\n__Default value:__ `11`",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "fontStyle": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontStyle",
+ "description": "The font style (e.g., `\"italic\"`)."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "fontWeight": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontWeight",
+ "description": "The font weight. This can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "height": {
+ "anyOf": [
+ {
+ "description": "Height of the marks.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "href": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/URI",
+ "description": "A URL to load upon mouse click. If defined, the mark acts as a hyperlink."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "innerRadius": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`."
+ },
+ "interpolate": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Interpolate",
+ "description": "The line interpolation method to use for line and area marks. One of the following: - `\"linear\"`: piecewise linear segments, as in a polyline. - `\"linear-closed\"`: close the linear segments to form a polygon. - `\"step\"`: alternate between horizontal and vertical segments, as in a step function. - `\"step-before\"`: alternate between vertical and horizontal segments, as in a step function. - `\"step-after\"`: alternate between horizontal and vertical segments, as in a step function. - `\"basis\"`: a B-spline, with control point duplication on the ends. - `\"basis-open\"`: an open B-spline; may not intersect the start or end. - `\"basis-closed\"`: a closed B-spline, as in a loop. - `\"cardinal\"`: a Cardinal spline, with control point duplication on the ends. - `\"cardinal-open\"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points. - `\"cardinal-closed\"`: a closed Cardinal spline, as in a loop. - `\"bundle\"`: equivalent to basis, except the tension parameter is used to straighten the spline. - `\"monotone\"`: cubic interpolation that preserves monotonicity in y."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "invalid": {
+ "description": "Defines how Vega-Lite should handle marks for invalid values (`null` and `NaN`). - If set to `\"filter\"` (default), all data items with null values will be skipped (for line, trail, and area marks) or filtered (for other marks). - If `null`, all data items are included. In this case, invalid values will be interpreted as zeroes.",
+ "enum": [
+ "filter",
+ null
+ ],
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "limit": {
+ "anyOf": [
+ {
+ "description": "The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0` -- indicating no limit",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "line": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/OverlayMarkDef"
+ }
+ ],
+ "description": "A flag for overlaying line on top of area marks, or an object defining the properties of the overlayed lines.\n\n- If this value is an empty object (`{}`) or `true`, lines with default properties will be used.\n\n- If this value is `false`, no lines would be automatically added to area marks.\n\n__Default value:__ `false`."
+ },
+ "lineBreak": {
+ "anyOf": [
+ {
+ "description": "A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property is ignored if the text is array-valued.",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "lineHeight": {
+ "anyOf": [
+ {
+ "description": "The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "opacity": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.",
+ "maximum": 1,
+ "minimum": 0
+ },
+ "order": {
+ "description": "For line and trail marks, this `order` property can be set to `null` or `false` to make the lines use the original order in the data sources.",
+ "type": [
+ "null",
+ "boolean"
+ ]
+ },
+ "orient": {
+ "$ref": "#/definitions/Orientation",
+ "description": "The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical. - For bar, rule and tick, this determines whether the size of the bar and tick should be applied to x or y dimension. - For area, this property determines the orient property of the Vega output. - For line and trail marks, this property determines the sort order of the points in the line if `config.sortLineBy` is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored."
+ },
+ "outerRadius": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`."
+ },
+ "padAngle": {
+ "anyOf": [
+ {
+ "description": "The angular padding applied to sides of the arc, in radians.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "point": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/OverlayMarkDef"
+ },
+ {
+ "const": "transparent",
+ "type": "string"
+ }
+ ],
+ "description": "A flag for overlaying points on top of line or area marks, or an object defining the properties of the overlayed points.\n\n- If this property is `\"transparent\"`, transparent points will be used (for enhancing tooltips and selections).\n\n- If this property is an empty object (`{}`) or `true`, filled points with default properties will be used.\n\n- If this property is `false`, no points would be automatically added to line or area marks.\n\n__Default value:__ `false`."
+ },
+ "radius": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "For arc mark, the primary (outer) radius in pixels.\n\nFor text marks, polar coordinate radial offset, in pixels, of the text from the origin determined by the `x` and `y` properties."
+ },
+ "radius2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The secondary (inner) radius in pixels of arc marks."
+ },
+ "shape": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SymbolShape"
+ },
+ {
+ "type": "string"
+ }
+ ],
+ "description": "Shape of the point marks. Supported values include: - plotting shapes: `\"circle\"`, `\"square\"`, `\"cross\"`, `\"diamond\"`, `\"triangle-up\"`, `\"triangle-down\"`, `\"triangle-right\"`, or `\"triangle-left\"`. - the line symbol `\"stroke\"` - centered directional shapes `\"arrow\"`, `\"wedge\"`, or `\"triangle\"` - a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n__Default value:__ `\"circle\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "size": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Default size for marks. - For `point`/`circle`/`square`, this represents the pixel area of the marks. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value. - For `bar`, this represents the band size of the bar, in pixels. - For `text`, this represents the font size, in pixels.\n\n__Default value:__ - `30` for point, circle, square marks; width/height's `step` - `2` for bar marks with discrete dimensions; - `5` for bar marks with continuous dimensions; - `11` for text marks.",
+ "minimum": 0
+ },
+ "smooth": {
+ "anyOf": [
+ {
+ "description": "A boolean flag (default true) indicating if the image should be smoothed when resized. If false, individual pixels should be scaled directly rather than interpolated with smoothing. For SVG rendering, this option may not work in some browsers due to lack of standardization.",
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "startAngle": {
+ "anyOf": [
+ {
+ "description": "The start angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "stroke": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/Gradient"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Default stroke color. This property has higher precedence than `config.color`. Set to `null` to remove stroke.\n\n__Default value:__ (None)"
+ },
+ "strokeCap": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StrokeCap",
+ "description": "The stroke cap for line ending style. One of `\"butt\"`, `\"round\"`, or `\"square\"`.\n\n__Default value:__ `\"butt\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeDash": {
+ "anyOf": [
+ {
+ "description": "An array of alternating stroke, space lengths for creating dashed or dotted lines.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeDashOffset": {
+ "anyOf": [
+ {
+ "description": "The offset (in pixels) into which to begin drawing with the stroke dash array.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeJoin": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StrokeJoin",
+ "description": "The stroke line join method. One of `\"miter\"`, `\"round\"` or `\"bevel\"`.\n\n__Default value:__ `\"miter\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeMiterLimit": {
+ "anyOf": [
+ {
+ "description": "The miter limit at which to bevel a line join.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeOffset": {
+ "anyOf": [
+ {
+ "description": "The offset in pixels at which to draw the group stroke and fill. If unspecified, the default behavior is to dynamically offset stroked groups such that 1 pixel stroke widths align with the pixel grid.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeOpacity": {
+ "anyOf": [
+ {
+ "description": "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeWidth": {
+ "anyOf": [
+ {
+ "description": "The stroke width, in pixels.",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "tension": {
+ "anyOf": [
+ {
+ "description": "Depending on the interpolation type, sets the tension parameter (for line and area marks).",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "text": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text",
+ "description": "Placeholder text if the `text` channel is not specified"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "theta": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "- For arc marks, the arc length in radians if theta2 is not specified, otherwise the start arc angle. (A value of 0 indicates up or “north”, increasing values proceed clockwise.)\n\n- For text marks, polar coordinate angle in radians.",
+ "maximum": 360,
+ "minimum": 0
+ },
+ "theta2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise."
+ },
+ "timeUnitBand": {
+ "description": "Default relative band size for a time unit. If set to `1`, the bandwidth of the marks will be equal to the time unit band step. If set to `0.5`, bandwidth of the marks will be half of the time unit band step.",
+ "type": "number"
+ },
+ "timeUnitBandPosition": {
+ "description": "Default relative band position for a time unit. If set to `0`, the marks will be positioned at the beginning of the time unit band step. If set to `0.5`, the marks will be positioned in the middle of the time unit band step.",
+ "type": "number"
+ },
+ "tooltip": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/TooltipContent"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.\n\n- If `tooltip` is `true` or `{\"content\": \"encoding\"}`, then all fields from `encoding` will be used. - If `tooltip` is `{\"content\": \"data\"}`, then all fields that appear in the highlighted data point will be used. - If set to `null` or `false`, then no tooltip will be used.\n\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip in Vega-Lite.\n\n__Default value:__ `null`"
+ },
+ "url": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/URI",
+ "description": "The URL of the image file for image marks."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "width": {
+ "anyOf": [
+ {
+ "description": "Width of the marks.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "x": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "width",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "X coordinates of the marks, or width of horizontal `\"bar\"` and `\"area\"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "x2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "width",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "X2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "y": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "height",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Y coordinates of the marks, or height of vertical `\"bar\"` and `\"area\"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ },
+ "y2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "height",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Y2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ }
+ },
+ "type": "object"
+ },
+ "ArgmaxDef": {
+ "additionalProperties": false,
+ "properties": {
+ "argmax": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "argmax"
+ ],
+ "type": "object"
+ },
+ "ArgminDef": {
+ "additionalProperties": false,
+ "properties": {
+ "argmin": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "argmin"
+ ],
+ "type": "object"
+ },
+ "AutoSizeParams": {
+ "additionalProperties": false,
+ "properties": {
+ "contains": {
+ "description": "Determines how size calculation should be performed, one of `\"content\"` or `\"padding\"`. The default setting (`\"content\"`) interprets the width and height settings as the data rectangle (plotting) dimensions, to which padding is then added. In contrast, the `\"padding\"` setting includes the padding within the view size calculations, such that the width and height settings indicate the **total** intended size of the view.\n\n__Default value__: `\"content\"`",
+ "enum": [
+ "content",
+ "padding"
+ ],
+ "type": "string"
+ },
+ "resize": {
+ "description": "A boolean flag indicating if autosize layout should be re-calculated on every view update.\n\n__Default value__: `false`",
+ "type": "boolean"
+ },
+ "type": {
+ "$ref": "#/definitions/AutosizeType",
+ "description": "The sizing format type. One of `\"pad\"`, `\"fit\"`, `\"fit-x\"`, `\"fit-y\"`, or `\"none\"`. See the [autosize type](https://vega.github.io/vega-lite/docs/size.html#autosize) documentation for descriptions of each.\n\n__Default value__: `\"pad\"`"
+ }
+ },
+ "type": "object"
+ },
+ "AutosizeType": {
+ "enum": [
+ "pad",
+ "none",
+ "fit",
+ "fit-x",
+ "fit-y"
+ ],
+ "type": "string"
+ },
+ "Axis": {
+ "additionalProperties": false,
+ "properties": {
+ "aria": {
+ "anyOf": [
+ {
+ "description": "A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the \"aria-hidden\" attribute will be set on the output SVG group, removing the axis from the ARIA accessibility tree.\n\n__Default value:__ `true`",
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "bandPosition": {
+ "anyOf": [
+ {
+ "description": "An interpolation fraction indicating where, for `band` scales, axis ticks should be positioned. A value of `0` places ticks at the left edge of their bands. A value of `0.5` places ticks in the middle of their bands.\n\n __Default value:__ `0.5`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "description": {
+ "anyOf": [
+ {
+ "description": "A text description of this axis for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If the `aria` property is true, for SVG output the [\"aria-label\" attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute) will be set to this description. If the description is unspecified it will be automatically generated.",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "domain": {
+ "anyOf": [
+ {
+ "description": "A boolean flag indicating if the domain (the axis baseline) should be included as part of the axis.\n\n__Default value:__ `true`",
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "domainCap": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StrokeCap",
+ "description": "The stroke cap for the domain line's ending style. One of `\"butt\"`, `\"round\"` or `\"square\"`.\n\n__Default value:__ `\"butt\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "domainColor": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/Color"
+ }
+ ],
+ "description": "Color of axis domain line.\n\n__Default value:__ `\"gray\"`."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "domainDash": {
+ "anyOf": [
+ {
+ "description": "An array of alternating [stroke, space] lengths for dashed domain lines.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "domainDashOffset": {
+ "anyOf": [
+ {
+ "description": "The pixel offset at which to start drawing with the domain dash array.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "domainOpacity": {
+ "anyOf": [
+ {
+ "description": "Opacity of the axis domain line.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "domainWidth": {
+ "anyOf": [
+ {
+ "description": "Stroke width of axis domain line\n\n__Default value:__ `1`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "format": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/Dict<unknown>"
+ }
+ ],
+ "description": "When used with the default `\"number\"` and `\"time\"` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `\"number\"` (e.g., for quantitative fields), this is D3's [number format pattern](https://github.com/d3/d3-format#locale_format). - If the format type is `\"time\"` (e.g., for temporal fields), this is D3's [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\n\n__Default value:__ Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format."
+ },
+ "formatType": {
+ "description": "The format type for labels. One of `\"number\"`, `\"time\"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\n\n__Default value:__ - `\"time\"` for temporal fields and ordinal and nominal fields with `timeUnit`. - `\"number\"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.",
+ "type": "string"
+ },
+ "grid": {
+ "description": "A boolean flag indicating if grid lines should be included as part of the axis\n\n__Default value:__ `true` for [continuous scales](https://vega.github.io/vega-lite/docs/scale.html#continuous) that are not binned; otherwise, `false`.",
+ "type": "boolean"
+ },
+ "gridCap": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StrokeCap",
+ "description": "The stroke cap for grid lines' ending style. One of `\"butt\"`, `\"round\"` or `\"square\"`.\n\n__Default value:__ `\"butt\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "gridColor": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/Color"
+ }
+ ],
+ "description": "Color of gridlines.\n\n__Default value:__ `\"lightGray\"`."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalAxisColor"
+ }
+ ]
+ },
+ "gridDash": {
+ "anyOf": [
+ {
+ "description": "An array of alternating [stroke, space] lengths for dashed grid lines.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalAxisNumberArray"
+ }
+ ]
+ },
+ "gridDashOffset": {
+ "anyOf": [
+ {
+ "description": "The pixel offset at which to start drawing with the grid dash array.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalAxisNumber"
+ }
+ ]
+ },
+ "gridOpacity": {
+ "anyOf": [
+ {
+ "description": "The stroke opacity of grid (value between [0,1])\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalAxisNumber"
+ }
+ ]
+ },
+ "gridWidth": {
+ "anyOf": [
+ {
+ "description": "The grid width, in pixels.\n\n__Default value:__ `1`",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalAxisNumber"
+ }
+ ]
+ },
+ "labelAlign": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Align",
+ "description": "Horizontal text alignment of axis tick labels, overriding the default setting for the current axis orientation."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalAxisLabelAlign"
+ }
+ ]
+ },
+ "labelAngle": {
+ "anyOf": [
+ {
+ "description": "The rotation angle of the axis labels.\n\n__Default value:__ `-90` for nominal and ordinal fields; `0` otherwise.",
+ "maximum": 360,
+ "minimum": -360,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "labelBaseline": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TextBaseline",
+ "description": "Vertical text baseline of axis tick labels, overriding the default setting for the current axis orientation. One of `\"alphabetic\"` (default), `\"top\"`, `\"middle\"`, `\"bottom\"`, `\"line-top\"`, or `\"line-bottom\"`. The `\"line-top\"` and `\"line-bottom\"` values operate similarly to `\"top\"` and `\"bottom\"`, but are calculated relative to the *lineHeight* rather than *fontSize* alone."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalAxisLabelBaseline"
+ }
+ ]
+ },
+ "labelBound": {
+ "anyOf": [
+ {
+ "description": "Indicates if labels should be hidden if they exceed the axis range. If `false` (the default) no bounds overlap analysis is performed. If `true`, labels will be hidden if they exceed the axis range by more than 1 pixel. If this property is a number, it specifies the pixel tolerance: the maximum amount by which a label bounding box may exceed the axis range.\n\n__Default value:__ `false`.",
+ "type": [
+ "number",
+ "boolean"
+ ]
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "labelColor": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/Color"
+ }
+ ],
+ "description": "The color of the tick label, can be in hex color code or regular color name."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalAxisColor"
+ }
+ ]
+ },
+ "labelExpr": {
+ "description": "[Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels.\n\n__Note:__ The label text and value can be assessed via the `label` and `value` properties of the axis's backing `datum` object.",
+ "type": "string"
+ },
+ "labelFlush": {
+ "description": "Indicates if the first and last axis labels should be aligned flush with the scale range. Flush alignment for a horizontal axis will left-align the first label and right-align the last label. For vertical axes, bottom and top text baselines are applied instead. If this property is a number, it also indicates the number of pixels by which to offset the first and last labels; for example, a value of 2 will flush-align the first and last labels and also push them 2 pixels outward from the center of the axis. The additional adjustment can sometimes help the labels better visually group with corresponding axis ticks.\n\n__Default value:__ `true` for axis of a continuous x-scale. Otherwise, `false`.",
+ "type": [
+ "boolean",
+ "number"
+ ]
+ },
+ "labelFlushOffset": {
+ "anyOf": [
+ {
+ "description": "Indicates the number of pixels by which to offset flush-adjusted labels. For example, a value of `2` will push flush-adjusted labels 2 pixels outward from the center of the axis. Offsets can help the labels better visually group with corresponding axis ticks.\n\n__Default value:__ `0`.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "labelFont": {
+ "anyOf": [
+ {
+ "description": "The font of the tick label.",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalAxisString"
+ }
+ ]
+ },
+ "labelFontSize": {
+ "anyOf": [
+ {
+ "description": "The font size of the label, in pixels.",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalAxisNumber"
+ }
+ ]
+ },
+ "labelFontStyle": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontStyle",
+ "description": "Font style of the title."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalAxisLabelFontStyle"
+ }
+ ]
+ },
+ "labelFontWeight": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontWeight",
+ "description": "Font weight of axis tick labels."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalAxisLabelFontWeight"
+ }
+ ]
+ },
+ "labelLimit": {
+ "anyOf": [
+ {
+ "description": "Maximum allowed pixel width of axis tick labels.\n\n__Default value:__ `180`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "labelLineHeight": {
+ "anyOf": [
+ {
+ "description": "Line height in pixels for multi-line label text or label text with `\"line-top\"` or `\"line-bottom\"` baseline.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "labelOffset": {
+ "anyOf": [
+ {
+ "description": "Position offset in pixels to apply to labels, in addition to tickOffset.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalAxisNumber"
+ }
+ ]
+ },
+ "labelOpacity": {
+ "anyOf": [
+ {
+ "description": "The opacity of the labels.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalAxisNumber"
+ }
+ ]
+ },
+ "labelOverlap": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LabelOverlap"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The strategy to use for resolving overlap of axis labels. If `false` (the default), no overlap reduction is attempted. If set to `true` or `\"parity\"`, a strategy of removing every other label is used (this works well for standard linear axes). If set to `\"greedy\"`, a linear scan of the labels is performed, removing any labels that overlaps with the last visible label (this often works better for log-scaled axes).\n\n__Default value:__ `true` for non-nominal fields with non-log scales; `\"greedy\"` for log scales; otherwise `false`."
+ },
+ "labelPadding": {
+ "anyOf": [
+ {
+ "description": "The padding in pixels between labels and ticks.\n\n__Default value:__ `2`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalAxisNumber"
+ }
+ ]
+ },
+ "labelSeparation": {
+ "anyOf": [
+ {
+ "description": "The minimum separation that must be between label bounding boxes for them to be considered non-overlapping (default `0`). This property is ignored if *labelOverlap* resolution is not enabled.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "labels": {
+ "anyOf": [
+ {
+ "description": "A boolean flag indicating if labels should be included as part of the axis.\n\n__Default value:__ `true`.",
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "maxExtent": {
+ "anyOf": [
+ {
+ "description": "The maximum extent in pixels that axis ticks and labels should use. This determines a maximum offset value for axis titles.\n\n__Default value:__ `undefined`.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "minExtent": {
+ "anyOf": [
+ {
+ "description": "The minimum extent in pixels that axis ticks and labels should use. This determines a minimum offset value for axis titles.\n\n__Default value:__ `30` for y-axis; `undefined` for x-axis.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "offset": {
+ "description": "The offset, in pixels, by which to displace the axis from the edge of the enclosing group or data rectangle.\n\n__Default value:__ derived from the [axis config](https://vega.github.io/vega-lite/docs/config.html#facet-scale-config)'s `offset` (`0` by default)",
+ "type": "number"
+ },
+ "orient": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/AxisOrient"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The orientation of the axis. One of `\"top\"`, `\"bottom\"`, `\"left\"` or `\"right\"`. The orientation can be used to further specialize the axis type (e.g., a y-axis oriented towards the right edge of the chart).\n\n__Default value:__ `\"bottom\"` for x-axes and `\"left\"` for y-axes."
+ },
+ "position": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The anchor position of the axis in pixels. For x-axes with top or bottom orientation, this sets the axis group x coordinate. For y-axes with left or right orientation, this sets the axis group y coordinate.\n\n__Default value__: `0`"
+ },
+ "style": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "A string or array of strings indicating the name of custom styles to apply to the axis. A style is a named collection of axis property defined within the [style configuration](https://vega.github.io/vega-lite/docs/mark.html#style-config). If style is an array, later styles will override earlier styles.\n\n__Default value:__ (none) __Note:__ Any specified style will augment the default style. For example, an x-axis mark with `\"style\": \"foo\"` will use `config.axisX` and `config.style.foo` (the specified style `\"foo\"` has higher precedence)."
+ },
+ "tickBand": {
+ "anyOf": [
+ {
+ "description": "For band scales, indicates if ticks and grid lines should be placed at the `\"center\"` of a band (default) or at the band `\"extent\"`s to indicate intervals",
+ "enum": [
+ "center",
+ "extent"
+ ],
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "tickCap": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StrokeCap",
+ "description": "The stroke cap for the tick lines' ending style. One of `\"butt\"`, `\"round\"` or `\"square\"`.\n\n__Default value:__ `\"butt\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "tickColor": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/Color"
+ }
+ ],
+ "description": "The color of the axis's tick.\n\n__Default value:__ `\"gray\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalAxisColor"
+ }
+ ]
+ },
+ "tickCount": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/TimeInterval"
+ },
+ {
+ "$ref": "#/definitions/TimeIntervalStep"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are \"nice\" (multiples of 2, 5, 10) and lie within the underlying scale's range.\n\nFor scales of type `\"time\"` or `\"utc\"`, the tick count can instead be a time interval specifier. Legal string values are `\"millisecond\"`, `\"second\"`, `\"minute\"`, `\"hour\"`, `\"day\"`, `\"week\"`, `\"month\"`, and `\"year\"`. Alternatively, an object-valued interval specifier of the form `{\"interval\": \"month\", \"step\": 3}` includes a desired number of interval steps. Here, ticks are generated for each quarter (Jan, Apr, Jul, Oct) boundary.\n\n__Default value__: Determine using a formula `ceil(width/40)` for x and `ceil(height/40)` for y.",
+ "minimum": 0
+ },
+ "tickDash": {
+ "anyOf": [
+ {
+ "description": "An array of alternating [stroke, space] lengths for dashed tick mark lines.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalAxisNumberArray"
+ }
+ ]
+ },
+ "tickDashOffset": {
+ "anyOf": [
+ {
+ "description": "The pixel offset at which to start drawing with the tick mark dash array.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalAxisNumber"
+ }
+ ]
+ },
+ "tickExtra": {
+ "anyOf": [
+ {
+ "description": "Boolean flag indicating if an extra axis tick should be added for the initial position of the axis. This flag is useful for styling axes for `band` scales such that ticks are placed on band boundaries rather in the middle of a band. Use in conjunction with `\"bandPosition\": 1` and an axis `\"padding\"` value of `0`.",
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "tickMinStep": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The minimum desired step between axis ticks, in terms of scale domain values. For example, a value of `1` indicates that ticks should not be less than 1 unit apart. If `tickMinStep` is specified, the `tickCount` value will be adjusted, if necessary, to enforce the minimum step value."
+ },
+ "tickOffset": {
+ "anyOf": [
+ {
+ "description": "Position offset in pixels to apply to ticks, labels, and gridlines.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "tickOpacity": {
+ "anyOf": [
+ {
+ "description": "Opacity of the ticks.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalAxisNumber"
+ }
+ ]
+ },
+ "tickRound": {
+ "anyOf": [
+ {
+ "description": "Boolean flag indicating if pixel position values should be rounded to the nearest integer.\n\n__Default value:__ `true`",
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "tickSize": {
+ "anyOf": [
+ {
+ "description": "The size in pixels of axis ticks.\n\n__Default value:__ `5`",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalAxisNumber"
+ }
+ ]
+ },
+ "tickWidth": {
+ "anyOf": [
+ {
+ "description": "The width, in pixels, of ticks.\n\n__Default value:__ `1`",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalAxisNumber"
+ }
+ ]
+ },
+ "ticks": {
+ "anyOf": [
+ {
+ "description": "Boolean value that determines whether the axis should include ticks.\n\n__Default value:__ `true`",
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "titleAlign": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Align",
+ "description": "Horizontal text alignment of axis titles."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleAnchor": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TitleAnchor",
+ "description": "Text anchor position for placing axis titles."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleAngle": {
+ "anyOf": [
+ {
+ "description": "Angle in degrees of axis titles.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleBaseline": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TextBaseline",
+ "description": "Vertical text baseline for axis titles. One of `\"alphabetic\"` (default), `\"top\"`, `\"middle\"`, `\"bottom\"`, `\"line-top\"`, or `\"line-bottom\"`. The `\"line-top\"` and `\"line-bottom\"` values operate similarly to `\"top\"` and `\"bottom\"`, but are calculated relative to the *lineHeight* rather than *fontSize* alone."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleColor": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/Color"
+ }
+ ],
+ "description": "Color of the title, can be in hex color code or regular color name."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleFont": {
+ "anyOf": [
+ {
+ "description": "Font of the title. (e.g., `\"Helvetica Neue\"`).",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleFontSize": {
+ "anyOf": [
+ {
+ "description": "Font size of the title.",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleFontStyle": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontStyle",
+ "description": "Font style of the title."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleFontWeight": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontWeight",
+ "description": "Font weight of the title. This can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleLimit": {
+ "anyOf": [
+ {
+ "description": "Maximum allowed pixel width of axis titles.",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleLineHeight": {
+ "anyOf": [
+ {
+ "description": "Line height in pixels for multi-line title text or title text with `\"line-top\"` or `\"line-bottom\"` baseline.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleOpacity": {
+ "anyOf": [
+ {
+ "description": "Opacity of the axis title.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titlePadding": {
+ "anyOf": [
+ {
+ "description": "The padding, in pixels, between title and axis.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleX": {
+ "anyOf": [
+ {
+ "description": "X-coordinate of the axis title relative to the axis group.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleY": {
+ "anyOf": [
+ {
+ "description": "Y-coordinate of the axis title relative to the axis group.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "translate": {
+ "anyOf": [
+ {
+ "description": "Coordinate space translation offset for axis layout. By default, axes are translated by a 0.5 pixel offset for both the x and y coordinates in order to align stroked lines with the pixel grid. However, for vector graphics output these pixel-specific adjustments may be undesirable, in which case translate can be changed (for example, to zero).\n\n__Default value:__ `0.5`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "values": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "items": {
+ "type": "boolean"
+ },
+ "type": "array"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/DateTime"
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Explicitly set the visible axis tick values."
+ },
+ "zindex": {
+ "description": "A non-negative integer indicating the z-index of the axis. If zindex is 0, axes should be drawn behind all chart elements. To put them in front, set `zindex` to `1` or more.\n\n__Default value:__ `0` (behind the marks).",
+ "minimum": 0,
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "AxisConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "aria": {
+ "anyOf": [
+ {
+ "description": "A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the \"aria-hidden\" attribute will be set on the output SVG group, removing the axis from the ARIA accessibility tree.\n\n__Default value:__ `true`",
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "bandPosition": {
+ "anyOf": [
+ {
+ "description": "An interpolation fraction indicating where, for `band` scales, axis ticks should be positioned. A value of `0` places ticks at the left edge of their bands. A value of `0.5` places ticks in the middle of their bands.\n\n __Default value:__ `0.5`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "description": {
+ "anyOf": [
+ {
+ "description": "A text description of this axis for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If the `aria` property is true, for SVG output the [\"aria-label\" attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute) will be set to this description. If the description is unspecified it will be automatically generated.",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "disable": {
+ "description": "Disable axis by default.",
+ "type": "boolean"
+ },
+ "domain": {
+ "anyOf": [
+ {
+ "description": "A boolean flag indicating if the domain (the axis baseline) should be included as part of the axis.\n\n__Default value:__ `true`",
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "domainCap": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StrokeCap",
+ "description": "The stroke cap for the domain line's ending style. One of `\"butt\"`, `\"round\"` or `\"square\"`.\n\n__Default value:__ `\"butt\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "domainColor": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/Color"
+ }
+ ],
+ "description": "Color of axis domain line.\n\n__Default value:__ `\"gray\"`."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "domainDash": {
+ "anyOf": [
+ {
+ "description": "An array of alternating [stroke, space] lengths for dashed domain lines.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "domainDashOffset": {
+ "anyOf": [
+ {
+ "description": "The pixel offset at which to start drawing with the domain dash array.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "domainOpacity": {
+ "anyOf": [
+ {
+ "description": "Opacity of the axis domain line.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "domainWidth": {
+ "anyOf": [
+ {
+ "description": "Stroke width of axis domain line\n\n__Default value:__ `1`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "format": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/Dict<unknown>"
+ }
+ ],
+ "description": "When used with the default `\"number\"` and `\"time\"` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `\"number\"` (e.g., for quantitative fields), this is D3's [number format pattern](https://github.com/d3/d3-format#locale_format). - If the format type is `\"time\"` (e.g., for temporal fields), this is D3's [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\n\n__Default value:__ Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format."
+ },
+ "formatType": {
+ "description": "The format type for labels. One of `\"number\"`, `\"time\"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\n\n__Default value:__ - `\"time\"` for temporal fields and ordinal and nominal fields with `timeUnit`. - `\"number\"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.",
+ "type": "string"
+ },
+ "grid": {
+ "description": "A boolean flag indicating if grid lines should be included as part of the axis\n\n__Default value:__ `true` for [continuous scales](https://vega.github.io/vega-lite/docs/scale.html#continuous) that are not binned; otherwise, `false`.",
+ "type": "boolean"
+ },
+ "gridCap": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StrokeCap",
+ "description": "The stroke cap for grid lines' ending style. One of `\"butt\"`, `\"round\"` or `\"square\"`.\n\n__Default value:__ `\"butt\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "gridColor": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/Color"
+ }
+ ],
+ "description": "Color of gridlines.\n\n__Default value:__ `\"lightGray\"`."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalAxisColor"
+ }
+ ]
+ },
+ "gridDash": {
+ "anyOf": [
+ {
+ "description": "An array of alternating [stroke, space] lengths for dashed grid lines.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalAxisNumberArray"
+ }
+ ]
+ },
+ "gridDashOffset": {
+ "anyOf": [
+ {
+ "description": "The pixel offset at which to start drawing with the grid dash array.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalAxisNumber"
+ }
+ ]
+ },
+ "gridOpacity": {
+ "anyOf": [
+ {
+ "description": "The stroke opacity of grid (value between [0,1])\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalAxisNumber"
+ }
+ ]
+ },
+ "gridWidth": {
+ "anyOf": [
+ {
+ "description": "The grid width, in pixels.\n\n__Default value:__ `1`",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalAxisNumber"
+ }
+ ]
+ },
+ "labelAlign": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Align",
+ "description": "Horizontal text alignment of axis tick labels, overriding the default setting for the current axis orientation."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalAxisLabelAlign"
+ }
+ ]
+ },
+ "labelAngle": {
+ "anyOf": [
+ {
+ "description": "The rotation angle of the axis labels.\n\n__Default value:__ `-90` for nominal and ordinal fields; `0` otherwise.",
+ "maximum": 360,
+ "minimum": -360,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "labelBaseline": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TextBaseline",
+ "description": "Vertical text baseline of axis tick labels, overriding the default setting for the current axis orientation. One of `\"alphabetic\"` (default), `\"top\"`, `\"middle\"`, `\"bottom\"`, `\"line-top\"`, or `\"line-bottom\"`. The `\"line-top\"` and `\"line-bottom\"` values operate similarly to `\"top\"` and `\"bottom\"`, but are calculated relative to the *lineHeight* rather than *fontSize* alone."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalAxisLabelBaseline"
+ }
+ ]
+ },
+ "labelBound": {
+ "anyOf": [
+ {
+ "description": "Indicates if labels should be hidden if they exceed the axis range. If `false` (the default) no bounds overlap analysis is performed. If `true`, labels will be hidden if they exceed the axis range by more than 1 pixel. If this property is a number, it specifies the pixel tolerance: the maximum amount by which a label bounding box may exceed the axis range.\n\n__Default value:__ `false`.",
+ "type": [
+ "number",
+ "boolean"
+ ]
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "labelColor": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/Color"
+ }
+ ],
+ "description": "The color of the tick label, can be in hex color code or regular color name."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalAxisColor"
+ }
+ ]
+ },
+ "labelExpr": {
+ "description": "[Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels text.\n\n__Note:__ The label text and value can be assessed via the `label` and `value` properties of the axis's backing `datum` object.",
+ "type": "string"
+ },
+ "labelFlush": {
+ "description": "Indicates if the first and last axis labels should be aligned flush with the scale range. Flush alignment for a horizontal axis will left-align the first label and right-align the last label. For vertical axes, bottom and top text baselines are applied instead. If this property is a number, it also indicates the number of pixels by which to offset the first and last labels; for example, a value of 2 will flush-align the first and last labels and also push them 2 pixels outward from the center of the axis. The additional adjustment can sometimes help the labels better visually group with corresponding axis ticks.\n\n__Default value:__ `true` for axis of a continuous x-scale. Otherwise, `false`.",
+ "type": [
+ "boolean",
+ "number"
+ ]
+ },
+ "labelFlushOffset": {
+ "anyOf": [
+ {
+ "description": "Indicates the number of pixels by which to offset flush-adjusted labels. For example, a value of `2` will push flush-adjusted labels 2 pixels outward from the center of the axis. Offsets can help the labels better visually group with corresponding axis ticks.\n\n__Default value:__ `0`.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "labelFont": {
+ "anyOf": [
+ {
+ "description": "The font of the tick label.",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalAxisString"
+ }
+ ]
+ },
+ "labelFontSize": {
+ "anyOf": [
+ {
+ "description": "The font size of the label, in pixels.",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalAxisNumber"
+ }
+ ]
+ },
+ "labelFontStyle": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontStyle",
+ "description": "Font style of the title."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalAxisLabelFontStyle"
+ }
+ ]
+ },
+ "labelFontWeight": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontWeight",
+ "description": "Font weight of axis tick labels."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalAxisLabelFontWeight"
+ }
+ ]
+ },
+ "labelLimit": {
+ "anyOf": [
+ {
+ "description": "Maximum allowed pixel width of axis tick labels.\n\n__Default value:__ `180`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "labelLineHeight": {
+ "anyOf": [
+ {
+ "description": "Line height in pixels for multi-line label text or label text with `\"line-top\"` or `\"line-bottom\"` baseline.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "labelOffset": {
+ "anyOf": [
+ {
+ "description": "Position offset in pixels to apply to labels, in addition to tickOffset.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalAxisNumber"
+ }
+ ]
+ },
+ "labelOpacity": {
+ "anyOf": [
+ {
+ "description": "The opacity of the labels.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalAxisNumber"
+ }
+ ]
+ },
+ "labelOverlap": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LabelOverlap"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The strategy to use for resolving overlap of axis labels. If `false` (the default), no overlap reduction is attempted. If set to `true` or `\"parity\"`, a strategy of removing every other label is used (this works well for standard linear axes). If set to `\"greedy\"`, a linear scan of the labels is performed, removing any labels that overlaps with the last visible label (this often works better for log-scaled axes).\n\n__Default value:__ `true` for non-nominal fields with non-log scales; `\"greedy\"` for log scales; otherwise `false`."
+ },
+ "labelPadding": {
+ "anyOf": [
+ {
+ "description": "The padding in pixels between labels and ticks.\n\n__Default value:__ `2`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalAxisNumber"
+ }
+ ]
+ },
+ "labelSeparation": {
+ "anyOf": [
+ {
+ "description": "The minimum separation that must be between label bounding boxes for them to be considered non-overlapping (default `0`). This property is ignored if *labelOverlap* resolution is not enabled.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "labels": {
+ "anyOf": [
+ {
+ "description": "A boolean flag indicating if labels should be included as part of the axis.\n\n__Default value:__ `true`.",
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "maxExtent": {
+ "anyOf": [
+ {
+ "description": "The maximum extent in pixels that axis ticks and labels should use. This determines a maximum offset value for axis titles.\n\n__Default value:__ `undefined`.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "minExtent": {
+ "anyOf": [
+ {
+ "description": "The minimum extent in pixels that axis ticks and labels should use. This determines a minimum offset value for axis titles.\n\n__Default value:__ `30` for y-axis; `undefined` for x-axis.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "offset": {
+ "description": "The offset, in pixels, by which to displace the axis from the edge of the enclosing group or data rectangle.\n\n__Default value:__ derived from the [axis config](https://vega.github.io/vega-lite/docs/config.html#facet-scale-config)'s `offset` (`0` by default)",
+ "type": "number"
+ },
+ "orient": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/AxisOrient"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The orientation of the axis. One of `\"top\"`, `\"bottom\"`, `\"left\"` or `\"right\"`. The orientation can be used to further specialize the axis type (e.g., a y-axis oriented towards the right edge of the chart).\n\n__Default value:__ `\"bottom\"` for x-axes and `\"left\"` for y-axes."
+ },
+ "position": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The anchor position of the axis in pixels. For x-axes with top or bottom orientation, this sets the axis group x coordinate. For y-axes with left or right orientation, this sets the axis group y coordinate.\n\n__Default value__: `0`"
+ },
+ "style": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "A string or array of strings indicating the name of custom styles to apply to the axis. A style is a named collection of axis property defined within the [style configuration](https://vega.github.io/vega-lite/docs/mark.html#style-config). If style is an array, later styles will override earlier styles.\n\n__Default value:__ (none) __Note:__ Any specified style will augment the default style. For example, an x-axis mark with `\"style\": \"foo\"` will use `config.axisX` and `config.style.foo` (the specified style `\"foo\"` has higher precedence)."
+ },
+ "tickBand": {
+ "anyOf": [
+ {
+ "description": "For band scales, indicates if ticks and grid lines should be placed at the `\"center\"` of a band (default) or at the band `\"extent\"`s to indicate intervals",
+ "enum": [
+ "center",
+ "extent"
+ ],
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "tickCap": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StrokeCap",
+ "description": "The stroke cap for the tick lines' ending style. One of `\"butt\"`, `\"round\"` or `\"square\"`.\n\n__Default value:__ `\"butt\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "tickColor": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/Color"
+ }
+ ],
+ "description": "The color of the axis's tick.\n\n__Default value:__ `\"gray\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalAxisColor"
+ }
+ ]
+ },
+ "tickCount": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/TimeInterval"
+ },
+ {
+ "$ref": "#/definitions/TimeIntervalStep"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are \"nice\" (multiples of 2, 5, 10) and lie within the underlying scale's range.\n\nFor scales of type `\"time\"` or `\"utc\"`, the tick count can instead be a time interval specifier. Legal string values are `\"millisecond\"`, `\"second\"`, `\"minute\"`, `\"hour\"`, `\"day\"`, `\"week\"`, `\"month\"`, and `\"year\"`. Alternatively, an object-valued interval specifier of the form `{\"interval\": \"month\", \"step\": 3}` includes a desired number of interval steps. Here, ticks are generated for each quarter (Jan, Apr, Jul, Oct) boundary.\n\n__Default value__: Determine using a formula `ceil(width/40)` for x and `ceil(height/40)` for y.",
+ "minimum": 0
+ },
+ "tickDash": {
+ "anyOf": [
+ {
+ "description": "An array of alternating [stroke, space] lengths for dashed tick mark lines.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalAxisNumberArray"
+ }
+ ]
+ },
+ "tickDashOffset": {
+ "anyOf": [
+ {
+ "description": "The pixel offset at which to start drawing with the tick mark dash array.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalAxisNumber"
+ }
+ ]
+ },
+ "tickExtra": {
+ "anyOf": [
+ {
+ "description": "Boolean flag indicating if an extra axis tick should be added for the initial position of the axis. This flag is useful for styling axes for `band` scales such that ticks are placed on band boundaries rather in the middle of a band. Use in conjunction with `\"bandPosition\": 1` and an axis `\"padding\"` value of `0`.",
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "tickMinStep": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The minimum desired step between axis ticks, in terms of scale domain values. For example, a value of `1` indicates that ticks should not be less than 1 unit apart. If `tickMinStep` is specified, the `tickCount` value will be adjusted, if necessary, to enforce the minimum step value."
+ },
+ "tickOffset": {
+ "anyOf": [
+ {
+ "description": "Position offset in pixels to apply to ticks, labels, and gridlines.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "tickOpacity": {
+ "anyOf": [
+ {
+ "description": "Opacity of the ticks.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalAxisNumber"
+ }
+ ]
+ },
+ "tickRound": {
+ "anyOf": [
+ {
+ "description": "Boolean flag indicating if pixel position values should be rounded to the nearest integer.\n\n__Default value:__ `true`",
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "tickSize": {
+ "anyOf": [
+ {
+ "description": "The size in pixels of axis ticks.\n\n__Default value:__ `5`",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalAxisNumber"
+ }
+ ]
+ },
+ "tickWidth": {
+ "anyOf": [
+ {
+ "description": "The width, in pixels, of ticks.\n\n__Default value:__ `1`",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalAxisNumber"
+ }
+ ]
+ },
+ "ticks": {
+ "anyOf": [
+ {
+ "description": "Boolean value that determines whether the axis should include ticks.\n\n__Default value:__ `true`",
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "titleAlign": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Align",
+ "description": "Horizontal text alignment of axis titles."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleAnchor": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TitleAnchor",
+ "description": "Text anchor position for placing axis titles."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleAngle": {
+ "anyOf": [
+ {
+ "description": "Angle in degrees of axis titles.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleBaseline": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TextBaseline",
+ "description": "Vertical text baseline for axis titles. One of `\"alphabetic\"` (default), `\"top\"`, `\"middle\"`, `\"bottom\"`, `\"line-top\"`, or `\"line-bottom\"`. The `\"line-top\"` and `\"line-bottom\"` values operate similarly to `\"top\"` and `\"bottom\"`, but are calculated relative to the *lineHeight* rather than *fontSize* alone."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleColor": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/Color"
+ }
+ ],
+ "description": "Color of the title, can be in hex color code or regular color name."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleFont": {
+ "anyOf": [
+ {
+ "description": "Font of the title. (e.g., `\"Helvetica Neue\"`).",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleFontSize": {
+ "anyOf": [
+ {
+ "description": "Font size of the title.",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleFontStyle": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontStyle",
+ "description": "Font style of the title."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleFontWeight": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontWeight",
+ "description": "Font weight of the title. This can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleLimit": {
+ "anyOf": [
+ {
+ "description": "Maximum allowed pixel width of axis titles.",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleLineHeight": {
+ "anyOf": [
+ {
+ "description": "Line height in pixels for multi-line title text or title text with `\"line-top\"` or `\"line-bottom\"` baseline.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleOpacity": {
+ "anyOf": [
+ {
+ "description": "Opacity of the axis title.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titlePadding": {
+ "anyOf": [
+ {
+ "description": "The padding, in pixels, between title and axis.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleX": {
+ "anyOf": [
+ {
+ "description": "X-coordinate of the axis title relative to the axis group.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleY": {
+ "anyOf": [
+ {
+ "description": "Y-coordinate of the axis title relative to the axis group.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "translate": {
+ "anyOf": [
+ {
+ "description": "Coordinate space translation offset for axis layout. By default, axes are translated by a 0.5 pixel offset for both the x and y coordinates in order to align stroked lines with the pixel grid. However, for vector graphics output these pixel-specific adjustments may be undesirable, in which case translate can be changed (for example, to zero).\n\n__Default value:__ `0.5`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "values": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "items": {
+ "type": "boolean"
+ },
+ "type": "array"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/DateTime"
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Explicitly set the visible axis tick values."
+ },
+ "zindex": {
+ "description": "A non-negative integer indicating the z-index of the axis. If zindex is 0, axes should be drawn behind all chart elements. To put them in front, set `zindex` to `1` or more.\n\n__Default value:__ `0` (behind the marks).",
+ "minimum": 0,
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "AxisOrient": {
+ "enum": [
+ "top",
+ "bottom",
+ "left",
+ "right"
+ ],
+ "type": "string"
+ },
+ "AxisResolveMap": {
+ "additionalProperties": false,
+ "properties": {
+ "x": {
+ "$ref": "#/definitions/ResolveMode"
+ },
+ "y": {
+ "$ref": "#/definitions/ResolveMode"
+ }
+ },
+ "type": "object"
+ },
+ "BarConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "align": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Align"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of `\"left\"`, `\"right\"`, `\"center\"`.\n\n__Note:__ Expression reference is *not* supported for range marks."
+ },
+ "angle": {
+ "anyOf": [
+ {
+ "description": "The rotation angle of the text, in degrees.",
+ "maximum": 360,
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "aria": {
+ "anyOf": [
+ {
+ "description": "A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the \"aria-hidden\" attribute will be set on the output SVG element, removing the mark item from the ARIA accessibility tree.",
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "ariaRole": {
+ "anyOf": [
+ {
+ "description": "Sets the type of user interface element of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the \"role\" attribute. Warning: this property is experimental and may be changed in the future.",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "ariaRoleDescription": {
+ "anyOf": [
+ {
+ "description": "A human-readable, author-localized description for the role of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the \"aria-roledescription\" attribute. Warning: this property is experimental and may be changed in the future.",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "aspect": {
+ "anyOf": [
+ {
+ "description": "Whether to keep aspect ratio of image marks.",
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "baseline": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TextBaseline"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "For text marks, the vertical text baseline. One of `\"alphabetic\"` (default), `\"top\"`, `\"middle\"`, `\"bottom\"`, `\"line-top\"`, `\"line-bottom\"`, or an expression reference that provides one of the valid values. The `\"line-top\"` and `\"line-bottom\"` values operate similarly to `\"top\"` and `\"bottom\"`, but are calculated relative to the `lineHeight` rather than `fontSize` alone.\n\nFor range marks, the vertical alignment of the marks. One of `\"top\"`, `\"middle\"`, `\"bottom\"`.\n\n__Note:__ Expression reference is *not* supported for range marks."
+ },
+ "binSpacing": {
+ "description": "Offset between bars for binned field. The ideal value for this is either 0 (preferred by statisticians) or 1 (Vega-Lite default, D3 example style).\n\n__Default value:__ `1`",
+ "minimum": 0,
+ "type": "number"
+ },
+ "blend": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Blend",
+ "description": "The color blend mode for drawing an item on its current background. Any valid [CSS mix-blend-mode](https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode) value can be used.\n\n__Default value: `\"source-over\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "color": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/Gradient"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Default color.\n\n__Default value:__ <span style=\"color: #4682b4;\">&#9632;</span> `\"#4682b4\"`\n\n__Note:__ - This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config). - The `fill` and `stroke` properties have higher precedence than `color` and will override `color`."
+ },
+ "continuousBandSize": {
+ "description": "The default size of the bars on continuous scales.\n\n__Default value:__ `5`",
+ "minimum": 0,
+ "type": "number"
+ },
+ "cornerRadius": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles or arcs' corners.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "cornerRadiusBottomLeft": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles' bottom left corner.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "cornerRadiusBottomRight": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles' bottom right corner.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "cornerRadiusEnd": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "- For vertical bars, top-left and top-right corner radius. - For horizontal bars, top-right and bottom-right corner radius."
+ },
+ "cornerRadiusTopLeft": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles' top right corner.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "cornerRadiusTopRight": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles' top left corner.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "cursor": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Cursor",
+ "description": "The mouse cursor used over the mark. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "description": {
+ "anyOf": [
+ {
+ "description": "A text description of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the [\"aria-label\" attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute).",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "dir": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TextDirection",
+ "description": "The direction of the text. One of `\"ltr\"` (left-to-right) or `\"rtl\"` (right-to-left). This property determines on which side is truncated in response to the limit parameter.\n\n__Default value:__ `\"ltr\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "discreteBandSize": {
+ "description": "The default size of the bars with discrete dimensions. If unspecified, the default size is `step-2`, which provides 2 pixel offset between bars.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "dx": {
+ "anyOf": [
+ {
+ "description": "The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "dy": {
+ "anyOf": [
+ {
+ "description": "The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "ellipsis": {
+ "anyOf": [
+ {
+ "description": "The ellipsis string for text truncated in response to the limit parameter.\n\n__Default value:__ `\"…\"`",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "endAngle": {
+ "anyOf": [
+ {
+ "description": "The end angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "fill": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/Gradient"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Default fill color. This property has higher precedence than `config.color`. Set to `null` to remove fill.\n\n__Default value:__ (None)"
+ },
+ "fillOpacity": {
+ "anyOf": [
+ {
+ "description": "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "filled": {
+ "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `false` for all `point`, `line`, and `rule` marks as well as `geoshape` marks for [`graticule`](https://vega.github.io/vega-lite/docs/data.html#graticule) data sources; otherwise, `true`.\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).",
+ "type": "boolean"
+ },
+ "font": {
+ "anyOf": [
+ {
+ "description": "The typeface to set the text in (e.g., `\"Helvetica Neue\"`).",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "fontSize": {
+ "anyOf": [
+ {
+ "description": "The font size, in pixels.\n\n__Default value:__ `11`",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "fontStyle": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontStyle",
+ "description": "The font style (e.g., `\"italic\"`)."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "fontWeight": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontWeight",
+ "description": "The font weight. This can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "height": {
+ "anyOf": [
+ {
+ "description": "Height of the marks.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "href": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/URI",
+ "description": "A URL to load upon mouse click. If defined, the mark acts as a hyperlink."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "innerRadius": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`."
+ },
+ "interpolate": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Interpolate",
+ "description": "The line interpolation method to use for line and area marks. One of the following: - `\"linear\"`: piecewise linear segments, as in a polyline. - `\"linear-closed\"`: close the linear segments to form a polygon. - `\"step\"`: alternate between horizontal and vertical segments, as in a step function. - `\"step-before\"`: alternate between vertical and horizontal segments, as in a step function. - `\"step-after\"`: alternate between horizontal and vertical segments, as in a step function. - `\"basis\"`: a B-spline, with control point duplication on the ends. - `\"basis-open\"`: an open B-spline; may not intersect the start or end. - `\"basis-closed\"`: a closed B-spline, as in a loop. - `\"cardinal\"`: a Cardinal spline, with control point duplication on the ends. - `\"cardinal-open\"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points. - `\"cardinal-closed\"`: a closed Cardinal spline, as in a loop. - `\"bundle\"`: equivalent to basis, except the tension parameter is used to straighten the spline. - `\"monotone\"`: cubic interpolation that preserves monotonicity in y."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "invalid": {
+ "description": "Defines how Vega-Lite should handle marks for invalid values (`null` and `NaN`). - If set to `\"filter\"` (default), all data items with null values will be skipped (for line, trail, and area marks) or filtered (for other marks). - If `null`, all data items are included. In this case, invalid values will be interpreted as zeroes.",
+ "enum": [
+ "filter",
+ null
+ ],
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "limit": {
+ "anyOf": [
+ {
+ "description": "The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0` -- indicating no limit",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "lineBreak": {
+ "anyOf": [
+ {
+ "description": "A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property is ignored if the text is array-valued.",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "lineHeight": {
+ "anyOf": [
+ {
+ "description": "The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "opacity": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.",
+ "maximum": 1,
+ "minimum": 0
+ },
+ "order": {
+ "description": "For line and trail marks, this `order` property can be set to `null` or `false` to make the lines use the original order in the data sources.",
+ "type": [
+ "null",
+ "boolean"
+ ]
+ },
+ "orient": {
+ "$ref": "#/definitions/Orientation",
+ "description": "The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical. - For bar, rule and tick, this determines whether the size of the bar and tick should be applied to x or y dimension. - For area, this property determines the orient property of the Vega output. - For line and trail marks, this property determines the sort order of the points in the line if `config.sortLineBy` is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored."
+ },
+ "outerRadius": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`."
+ },
+ "padAngle": {
+ "anyOf": [
+ {
+ "description": "The angular padding applied to sides of the arc, in radians.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "radius": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "For arc mark, the primary (outer) radius in pixels.\n\nFor text marks, polar coordinate radial offset, in pixels, of the text from the origin determined by the `x` and `y` properties."
+ },
+ "radius2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The secondary (inner) radius in pixels of arc marks."
+ },
+ "shape": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SymbolShape"
+ },
+ {
+ "type": "string"
+ }
+ ],
+ "description": "Shape of the point marks. Supported values include: - plotting shapes: `\"circle\"`, `\"square\"`, `\"cross\"`, `\"diamond\"`, `\"triangle-up\"`, `\"triangle-down\"`, `\"triangle-right\"`, or `\"triangle-left\"`. - the line symbol `\"stroke\"` - centered directional shapes `\"arrow\"`, `\"wedge\"`, or `\"triangle\"` - a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n__Default value:__ `\"circle\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "size": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Default size for marks. - For `point`/`circle`/`square`, this represents the pixel area of the marks. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value. - For `bar`, this represents the band size of the bar, in pixels. - For `text`, this represents the font size, in pixels.\n\n__Default value:__ - `30` for point, circle, square marks; width/height's `step` - `2` for bar marks with discrete dimensions; - `5` for bar marks with continuous dimensions; - `11` for text marks.",
+ "minimum": 0
+ },
+ "smooth": {
+ "anyOf": [
+ {
+ "description": "A boolean flag (default true) indicating if the image should be smoothed when resized. If false, individual pixels should be scaled directly rather than interpolated with smoothing. For SVG rendering, this option may not work in some browsers due to lack of standardization.",
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "startAngle": {
+ "anyOf": [
+ {
+ "description": "The start angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "stroke": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/Gradient"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Default stroke color. This property has higher precedence than `config.color`. Set to `null` to remove stroke.\n\n__Default value:__ (None)"
+ },
+ "strokeCap": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StrokeCap",
+ "description": "The stroke cap for line ending style. One of `\"butt\"`, `\"round\"`, or `\"square\"`.\n\n__Default value:__ `\"butt\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeDash": {
+ "anyOf": [
+ {
+ "description": "An array of alternating stroke, space lengths for creating dashed or dotted lines.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeDashOffset": {
+ "anyOf": [
+ {
+ "description": "The offset (in pixels) into which to begin drawing with the stroke dash array.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeJoin": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StrokeJoin",
+ "description": "The stroke line join method. One of `\"miter\"`, `\"round\"` or `\"bevel\"`.\n\n__Default value:__ `\"miter\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeMiterLimit": {
+ "anyOf": [
+ {
+ "description": "The miter limit at which to bevel a line join.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeOffset": {
+ "anyOf": [
+ {
+ "description": "The offset in pixels at which to draw the group stroke and fill. If unspecified, the default behavior is to dynamically offset stroked groups such that 1 pixel stroke widths align with the pixel grid.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeOpacity": {
+ "anyOf": [
+ {
+ "description": "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeWidth": {
+ "anyOf": [
+ {
+ "description": "The stroke width, in pixels.",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "tension": {
+ "anyOf": [
+ {
+ "description": "Depending on the interpolation type, sets the tension parameter (for line and area marks).",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "text": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text",
+ "description": "Placeholder text if the `text` channel is not specified"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "theta": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "- For arc marks, the arc length in radians if theta2 is not specified, otherwise the start arc angle. (A value of 0 indicates up or “north”, increasing values proceed clockwise.)\n\n- For text marks, polar coordinate angle in radians.",
+ "maximum": 360,
+ "minimum": 0
+ },
+ "theta2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise."
+ },
+ "timeUnitBand": {
+ "description": "Default relative band size for a time unit. If set to `1`, the bandwidth of the marks will be equal to the time unit band step. If set to `0.5`, bandwidth of the marks will be half of the time unit band step.",
+ "type": "number"
+ },
+ "timeUnitBandPosition": {
+ "description": "Default relative band position for a time unit. If set to `0`, the marks will be positioned at the beginning of the time unit band step. If set to `0.5`, the marks will be positioned in the middle of the time unit band step.",
+ "type": "number"
+ },
+ "tooltip": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/TooltipContent"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.\n\n- If `tooltip` is `true` or `{\"content\": \"encoding\"}`, then all fields from `encoding` will be used. - If `tooltip` is `{\"content\": \"data\"}`, then all fields that appear in the highlighted data point will be used. - If set to `null` or `false`, then no tooltip will be used.\n\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip in Vega-Lite.\n\n__Default value:__ `null`"
+ },
+ "url": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/URI",
+ "description": "The URL of the image file for image marks."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "width": {
+ "anyOf": [
+ {
+ "description": "Width of the marks.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "x": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "width",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "X coordinates of the marks, or width of horizontal `\"bar\"` and `\"area\"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "x2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "width",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "X2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "y": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "height",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Y coordinates of the marks, or height of vertical `\"bar\"` and `\"area\"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ },
+ "y2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "height",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Y2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ }
+ },
+ "type": "object"
+ },
+ "BaseTitleNoValueRefs": {
+ "additionalProperties": false,
+ "properties": {
+ "align": {
+ "$ref": "#/definitions/Align",
+ "description": "Horizontal text alignment for title text. One of `\"left\"`, `\"center\"`, or `\"right\"`."
+ },
+ "anchor": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TitleAnchor",
+ "description": "The anchor position for placing the title and subtitle text. One of `\"start\"`, `\"middle\"`, or `\"end\"`. For example, with an orientation of top these anchor positions map to a left-, center-, or right-aligned title."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "angle": {
+ "anyOf": [
+ {
+ "description": "Angle in degrees of title and subtitle text.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "aria": {
+ "anyOf": [
+ {
+ "description": "A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the \"aria-hidden\" attribute will be set on the output SVG group, removing the title from the ARIA accessibility tree.\n\n__Default value:__ `true`",
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "baseline": {
+ "$ref": "#/definitions/TextBaseline",
+ "description": "Vertical text baseline for title and subtitle text. One of `\"alphabetic\"` (default), `\"top\"`, `\"middle\"`, `\"bottom\"`, `\"line-top\"`, or `\"line-bottom\"`. The `\"line-top\"` and `\"line-bottom\"` values operate similarly to `\"top\"` and `\"bottom\"`, but are calculated relative to the *lineHeight* rather than *fontSize* alone."
+ },
+ "color": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/Color"
+ }
+ ],
+ "description": "Text color for title text."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "dx": {
+ "anyOf": [
+ {
+ "description": "Delta offset for title and subtitle text x-coordinate.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "dy": {
+ "anyOf": [
+ {
+ "description": "Delta offset for title and subtitle text y-coordinate.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "font": {
+ "anyOf": [
+ {
+ "description": "Font name for title text.",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "fontSize": {
+ "anyOf": [
+ {
+ "description": "Font size in pixels for title text.",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "fontStyle": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontStyle",
+ "description": "Font style for title text."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "fontWeight": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontWeight",
+ "description": "Font weight for title text. This can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "frame": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TitleFrame"
+ },
+ {
+ "type": "string"
+ }
+ ],
+ "description": "The reference frame for the anchor position, one of `\"bounds\"` (to anchor relative to the full bounding box) or `\"group\"` (to anchor relative to the group width or height)."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "limit": {
+ "anyOf": [
+ {
+ "description": "The maximum allowed length in pixels of title and subtitle text.",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "lineHeight": {
+ "anyOf": [
+ {
+ "description": "Line height in pixels for multi-line title text or title text with `\"line-top\"` or `\"line-bottom\"` baseline.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "offset": {
+ "anyOf": [
+ {
+ "description": "The orthogonal offset in pixels by which to displace the title group from its position along the edge of the chart.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "orient": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TitleOrient",
+ "description": "Default title orientation (`\"top\"`, `\"bottom\"`, `\"left\"`, or `\"right\"`)"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "subtitleColor": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/Color"
+ }
+ ],
+ "description": "Text color for subtitle text."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "subtitleFont": {
+ "anyOf": [
+ {
+ "description": "Font name for subtitle text.",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "subtitleFontSize": {
+ "anyOf": [
+ {
+ "description": "Font size in pixels for subtitle text.",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "subtitleFontStyle": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontStyle",
+ "description": "Font style for subtitle text."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "subtitleFontWeight": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontWeight",
+ "description": "Font weight for subtitle text. This can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "subtitleLineHeight": {
+ "anyOf": [
+ {
+ "description": "Line height in pixels for multi-line subtitle text.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "subtitlePadding": {
+ "anyOf": [
+ {
+ "description": "The padding in pixels between title and subtitle text.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "zindex": {
+ "anyOf": [
+ {
+ "description": "The integer z-index indicating the layering of the title group relative to other axis, mark, and legend groups.\n\n__Default value:__ `0`.",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ }
+ },
+ "type": "object"
+ },
+ "Baseline": {
+ "enum": [
+ "top",
+ "middle",
+ "bottom"
+ ],
+ "type": "string"
+ },
+ "BinExtent": {
+ "anyOf": [
+ {
+ "items": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "number"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2,
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/SelectionExtent"
+ }
+ ]
+ },
+ "BinParams": {
+ "additionalProperties": false,
+ "description": "Binning properties or boolean flag for determining whether to bin data or not.",
+ "properties": {
+ "anchor": {
+ "description": "A value in the binned domain at which to anchor the bins, shifting the bin boundaries if necessary to ensure that a boundary aligns with the anchor value.\n\n__Default value:__ the minimum bin extent value",
+ "type": "number"
+ },
+ "base": {
+ "description": "The number base to use for automatic bin determination (default is base 10).\n\n__Default value:__ `10`",
+ "type": "number"
+ },
+ "binned": {
+ "description": "When set to `true`, Vega-Lite treats the input data as already binned.",
+ "type": "boolean"
+ },
+ "divide": {
+ "description": "Scale factors indicating allowable subdivisions. The default value is [5, 2], which indicates that for base 10 numbers (the default base), the method may consider dividing bin sizes by 5 and/or 2. For example, for an initial step size of 10, the method can check if bin sizes of 2 (= 10/5), 5 (= 10/2), or 1 (= 10/(5*2)) might also satisfy the given constraints.\n\n__Default value:__ `[5, 2]`",
+ "items": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "number"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 1,
+ "type": "array"
+ },
+ "extent": {
+ "$ref": "#/definitions/BinExtent",
+ "description": "A two-element (`[min, max]`) array indicating the range of desired bin values."
+ },
+ "maxbins": {
+ "description": "Maximum number of bins.\n\n__Default value:__ `6` for `row`, `column` and `shape` channels; `10` for other channels",
+ "minimum": 2,
+ "type": "number"
+ },
+ "minstep": {
+ "description": "A minimum allowable step size (particularly useful for integer values).",
+ "type": "number"
+ },
+ "nice": {
+ "description": "If true, attempts to make the bin boundaries use human-friendly boundaries, such as multiples of ten.\n\n__Default value:__ `true`",
+ "type": "boolean"
+ },
+ "step": {
+ "description": "An exact step size to use between bins.\n\n__Note:__ If provided, options such as maxbins will be ignored.",
+ "type": "number"
+ },
+ "steps": {
+ "description": "An array of allowable step sizes to choose from.",
+ "items": {
+ "type": "number"
+ },
+ "minItems": 1,
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "BinTransform": {
+ "additionalProperties": false,
+ "properties": {
+ "as": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FieldName"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/FieldName"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "The output fields at which to write the start and end bin values. This can be either a string or an array of strings with two elements denoting the name for the fields for bin start and bin end respectively. If a single string (e.g., `\"val\"`) is provided, the end field will be `\"val_end\"`."
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "const": true,
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ }
+ ],
+ "description": "An object indicating bin properties, or simply `true` for using default bin parameters."
+ },
+ "field": {
+ "$ref": "#/definitions/FieldName",
+ "description": "The data field to bin."
+ }
+ },
+ "required": [
+ "bin",
+ "field",
+ "as"
+ ],
+ "type": "object"
+ },
+ "BindCheckbox": {
+ "additionalProperties": false,
+ "properties": {
+ "debounce": {
+ "type": "number"
+ },
+ "element": {
+ "$ref": "#/definitions/Element"
+ },
+ "input": {
+ "const": "checkbox",
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "input"
+ ],
+ "type": "object"
+ },
+ "BindRadioSelect": {
+ "additionalProperties": false,
+ "properties": {
+ "debounce": {
+ "type": "number"
+ },
+ "element": {
+ "$ref": "#/definitions/Element"
+ },
+ "input": {
+ "enum": [
+ "radio",
+ "select"
+ ],
+ "type": "string"
+ },
+ "labels": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "name": {
+ "type": "string"
+ },
+ "options": {
+ "items": {
+ },
+ "type": "array"
+ },
+ "type": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "input",
+ "options"
+ ],
+ "type": "object"
+ },
+ "BindRange": {
+ "additionalProperties": false,
+ "properties": {
+ "debounce": {
+ "type": "number"
+ },
+ "element": {
+ "$ref": "#/definitions/Element"
+ },
+ "input": {
+ "const": "range",
+ "type": "string"
+ },
+ "max": {
+ "type": "number"
+ },
+ "min": {
+ "type": "number"
+ },
+ "name": {
+ "type": "string"
+ },
+ "step": {
+ "type": "number"
+ },
+ "type": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "input"
+ ],
+ "type": "object"
+ },
+ "Binding": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/BindCheckbox"
+ },
+ {
+ "$ref": "#/definitions/BindRadioSelect"
+ },
+ {
+ "$ref": "#/definitions/BindRange"
+ },
+ {
+ "$ref": "#/definitions/InputBinding"
+ }
+ ]
+ },
+ "Blend": {
+ "enum": [
+ null,
+ "multiply",
+ "screen",
+ "overlay",
+ "darken",
+ "lighten",
+ "color-dodge",
+ "color-burn",
+ "hard-light",
+ "soft-light",
+ "difference",
+ "exclusion",
+ "hue",
+ "saturation",
+ "color",
+ "luminosity"
+ ],
+ "type": [
+ "null",
+ "string"
+ ]
+ },
+ "BoxPlot": {
+ "const": "boxplot",
+ "type": "string"
+ },
+ "BoxPlotConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "box": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/MarkConfig<ExprOrSignalRef>"
+ }
+ ]
+ },
+ "extent": {
+ "anyOf": [
+ {
+ "const": "min-max",
+ "type": "string"
+ },
+ {
+ "type": "number"
+ }
+ ],
+ "description": "The extent of the whiskers. Available options include: - `\"min-max\"`: min and max are the lower and upper whiskers respectively. - A number representing multiple of the interquartile range. This number will be multiplied by the IQR to determine whisker boundary, which spans from the smallest data to the largest data within the range _[Q1 - k * IQR, Q3 + k * IQR]_ where _Q1_ and _Q3_ are the first and third quartiles while _IQR_ is the interquartile range (_Q3-Q1_).\n\n__Default value:__ `1.5`."
+ },
+ "median": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/MarkConfig<ExprOrSignalRef>"
+ }
+ ]
+ },
+ "outliers": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/MarkConfig<ExprOrSignalRef>"
+ }
+ ]
+ },
+ "rule": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/MarkConfig<ExprOrSignalRef>"
+ }
+ ]
+ },
+ "size": {
+ "description": "Size of the box and median tick of a box plot",
+ "type": "number"
+ },
+ "ticks": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/MarkConfig<ExprOrSignalRef>"
+ }
+ ]
+ }
+ },
+ "type": "object"
+ },
+ "BoxPlotDef": {
+ "additionalProperties": false,
+ "properties": {
+ "box": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/MarkConfig<ExprOrSignalRef>"
+ }
+ ]
+ },
+ "clip": {
+ "description": "Whether a composite mark be clipped to the enclosing group’s width and height.",
+ "type": "boolean"
+ },
+ "color": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/Gradient"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Default color.\n\n__Default value:__ <span style=\"color: #4682b4;\">&#9632;</span> `\"#4682b4\"`\n\n__Note:__ - This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config). - The `fill` and `stroke` properties have higher precedence than `color` and will override `color`."
+ },
+ "extent": {
+ "anyOf": [
+ {
+ "const": "min-max",
+ "type": "string"
+ },
+ {
+ "type": "number"
+ }
+ ],
+ "description": "The extent of the whiskers. Available options include: - `\"min-max\"`: min and max are the lower and upper whiskers respectively. - A number representing multiple of the interquartile range. This number will be multiplied by the IQR to determine whisker boundary, which spans from the smallest data to the largest data within the range _[Q1 - k * IQR, Q3 + k * IQR]_ where _Q1_ and _Q3_ are the first and third quartiles while _IQR_ is the interquartile range (_Q3-Q1_).\n\n__Default value:__ `1.5`."
+ },
+ "median": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/MarkConfig<ExprOrSignalRef>"
+ }
+ ]
+ },
+ "opacity": {
+ "description": "The opacity (value between [0,1]) of the mark.",
+ "type": "number"
+ },
+ "orient": {
+ "$ref": "#/definitions/Orientation",
+ "description": "Orientation of the box plot. This is normally automatically determined based on types of fields on x and y channels. However, an explicit `orient` be specified when the orientation is ambiguous.\n\n__Default value:__ `\"vertical\"`."
+ },
+ "outliers": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/MarkConfig<ExprOrSignalRef>"
+ }
+ ]
+ },
+ "rule": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/MarkConfig<ExprOrSignalRef>"
+ }
+ ]
+ },
+ "size": {
+ "description": "Size of the box and median tick of a box plot",
+ "type": "number"
+ },
+ "ticks": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/MarkConfig<ExprOrSignalRef>"
+ }
+ ]
+ },
+ "type": {
+ "$ref": "#/definitions/BoxPlot",
+ "description": "The mark type. This could a primitive mark type (one of `\"bar\"`, `\"circle\"`, `\"square\"`, `\"tick\"`, `\"line\"`, `\"area\"`, `\"point\"`, `\"geoshape\"`, `\"rule\"`, and `\"text\"`) or a composite mark type (`\"boxplot\"`, `\"errorband\"`, `\"errorbar\"`)."
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "type": "object"
+ },
+ "BrushConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "cursor": {
+ "$ref": "#/definitions/Cursor",
+ "description": "The mouse cursor used over the interval mark. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used."
+ },
+ "fill": {
+ "$ref": "#/definitions/Color",
+ "description": "The fill color of the interval mark.\n\n__Default value:__ `\"#333333\"`"
+ },
+ "fillOpacity": {
+ "description": "The fill opacity of the interval mark (a value between `0` and `1`).\n\n__Default value:__ `0.125`",
+ "type": "number"
+ },
+ "stroke": {
+ "$ref": "#/definitions/Color",
+ "description": "The stroke color of the interval mark.\n\n__Default value:__ `\"#ffffff\"`"
+ },
+ "strokeDash": {
+ "description": "An array of alternating stroke and space lengths, for creating dashed or dotted lines.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "strokeDashOffset": {
+ "description": "The offset (in pixels) with which to begin drawing the stroke dash array.",
+ "type": "number"
+ },
+ "strokeOpacity": {
+ "description": "The stroke opacity of the interval mark (a value between `0` and `1`).",
+ "type": "number"
+ },
+ "strokeWidth": {
+ "description": "The stroke width of the interval mark.",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "CalculateTransform": {
+ "additionalProperties": false,
+ "properties": {
+ "as": {
+ "$ref": "#/definitions/FieldName",
+ "description": "The field for storing the computed formula value."
+ },
+ "calculate": {
+ "description": "A [expression](https://vega.github.io/vega-lite/docs/types.html#expression) string. Use the variable `datum` to refer to the current data object.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "calculate",
+ "as"
+ ],
+ "type": "object"
+ },
+ "Categorical": {
+ "enum": [
+ "accent",
+ "category10",
+ "category20",
+ "category20b",
+ "category20c",
+ "dark2",
+ "paired",
+ "pastel1",
+ "pastel2",
+ "set1",
+ "set2",
+ "set3",
+ "tableau10",
+ "tableau20"
+ ],
+ "type": "string"
+ },
+ "Color": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ColorName"
+ },
+ {
+ "$ref": "#/definitions/HexColor"
+ },
+ {
+ "type": "string"
+ }
+ ]
+ },
+ "ColorDef": {
+ "$ref": "#/definitions/MarkPropDef<(Gradient|string|null)>"
+ },
+ "ColorName": {
+ "enum": [
+ "black",
+ "silver",
+ "gray",
+ "white",
+ "maroon",
+ "red",
+ "purple",
+ "fuchsia",
+ "green",
+ "lime",
+ "olive",
+ "yellow",
+ "navy",
+ "blue",
+ "teal",
+ "aqua",
+ "orange",
+ "aliceblue",
+ "antiquewhite",
+ "aquamarine",
+ "azure",
+ "beige",
+ "bisque",
+ "blanchedalmond",
+ "blueviolet",
+ "brown",
+ "burlywood",
+ "cadetblue",
+ "chartreuse",
+ "chocolate",
+ "coral",
+ "cornflowerblue",
+ "cornsilk",
+ "crimson",
+ "cyan",
+ "darkblue",
+ "darkcyan",
+ "darkgoldenrod",
+ "darkgray",
+ "darkgreen",
+ "darkgrey",
+ "darkkhaki",
+ "darkmagenta",
+ "darkolivegreen",
+ "darkorange",
+ "darkorchid",
+ "darkred",
+ "darksalmon",
+ "darkseagreen",
+ "darkslateblue",
+ "darkslategray",
+ "darkslategrey",
+ "darkturquoise",
+ "darkviolet",
+ "deeppink",
+ "deepskyblue",
+ "dimgray",
+ "dimgrey",
+ "dodgerblue",
+ "firebrick",
+ "floralwhite",
+ "forestgreen",
+ "gainsboro",
+ "ghostwhite",
+ "gold",
+ "goldenrod",
+ "greenyellow",
+ "grey",
+ "honeydew",
+ "hotpink",
+ "indianred",
+ "indigo",
+ "ivory",
+ "khaki",
+ "lavender",
+ "lavenderblush",
+ "lawngreen",
+ "lemonchiffon",
+ "lightblue",
+ "lightcoral",
+ "lightcyan",
+ "lightgoldenrodyellow",
+ "lightgray",
+ "lightgreen",
+ "lightgrey",
+ "lightpink",
+ "lightsalmon",
+ "lightseagreen",
+ "lightskyblue",
+ "lightslategray",
+ "lightslategrey",
+ "lightsteelblue",
+ "lightyellow",
+ "limegreen",
+ "linen",
+ "magenta",
+ "mediumaquamarine",
+ "mediumblue",
+ "mediumorchid",
+ "mediumpurple",
+ "mediumseagreen",
+ "mediumslateblue",
+ "mediumspringgreen",
+ "mediumturquoise",
+ "mediumvioletred",
+ "midnightblue",
+ "mintcream",
+ "mistyrose",
+ "moccasin",
+ "navajowhite",
+ "oldlace",
+ "olivedrab",
+ "orangered",
+ "orchid",
+ "palegoldenrod",
+ "palegreen",
+ "paleturquoise",
+ "palevioletred",
+ "papayawhip",
+ "peachpuff",
+ "peru",
+ "pink",
+ "plum",
+ "powderblue",
+ "rosybrown",
+ "royalblue",
+ "saddlebrown",
+ "salmon",
+ "sandybrown",
+ "seagreen",
+ "seashell",
+ "sienna",
+ "skyblue",
+ "slateblue",
+ "slategray",
+ "slategrey",
+ "snow",
+ "springgreen",
+ "steelblue",
+ "tan",
+ "thistle",
+ "tomato",
+ "turquoise",
+ "violet",
+ "wheat",
+ "whitesmoke",
+ "yellowgreen",
+ "rebeccapurple"
+ ],
+ "type": "string"
+ },
+ "ColorScheme": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Categorical"
+ },
+ {
+ "$ref": "#/definitions/SequentialSingleHue"
+ },
+ {
+ "$ref": "#/definitions/SequentialMultiHue"
+ },
+ {
+ "$ref": "#/definitions/Diverging"
+ },
+ {
+ "$ref": "#/definitions/Cyclical"
+ }
+ ]
+ },
+ "Encoding": {
+ "additionalProperties": false,
+ "properties": {
+ "angle": {
+ "$ref": "#/definitions/NumericMarkPropDef",
+ "description": "Rotation angle of point and text marks."
+ },
+ "color": {
+ "$ref": "#/definitions/ColorDef",
+ "description": "Color of the marks – either fill or stroke color based on the `filled` property of mark definition. By default, `color` represents fill color for `\"area\"`, `\"bar\"`, `\"tick\"`, `\"text\"`, `\"trail\"`, `\"circle\"`, and `\"square\"` / stroke color for `\"line\"` and `\"point\"`.\n\n__Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `color` property.\n\n_Note:_ 1) For fine-grained control over both fill and stroke colors of the marks, please use the `fill` and `stroke` channels. The `fill` or `stroke` encodings have higher precedence than `color`, thus may override the `color` encoding if conflicting encodings are specified. 2) See the scale documentation for more information about customizing [color scheme](https://vega.github.io/vega-lite/docs/scale.html#scheme)."
+ },
+ "description": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StringFieldDefWithCondition"
+ },
+ {
+ "$ref": "#/definitions/StringValueDefWithCondition"
+ }
+ ],
+ "description": "A text description of this mark for ARIA accessibility (SVG output only). For SVG output the `\"aria-label\"` attribute will be set to this description."
+ },
+ "detail": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FieldDefWithoutScale"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/FieldDefWithoutScale"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "Additional levels of detail for grouping data in aggregate views and in line, trail, and area marks without mapping data to a specific visual channel."
+ },
+ "fill": {
+ "$ref": "#/definitions/ColorDef",
+ "description": "Fill color of the marks. __Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `color` property.\n\n_Note:_ The `fill` encoding has higher precedence than `color`, thus may override the `color` encoding if conflicting encodings are specified."
+ },
+ "fillOpacity": {
+ "$ref": "#/definitions/NumericMarkPropDef",
+ "description": "Fill opacity of the marks.\n\n__Default value:__ If undefined, the default opacity depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `fillOpacity` property."
+ },
+ "href": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StringFieldDefWithCondition"
+ },
+ {
+ "$ref": "#/definitions/StringValueDefWithCondition"
+ }
+ ],
+ "description": "A URL to load upon mouse click."
+ },
+ "key": {
+ "$ref": "#/definitions/FieldDefWithoutScale",
+ "description": "A data field to use as a unique key for data binding. When a visualization’s data is updated, the key value will be used to match data elements to existing mark instances. Use a key channel to enable object constancy for transitions over dynamic data."
+ },
+ "latitude": {
+ "$ref": "#/definitions/LatLongDef",
+ "description": "Latitude position of geographically projected marks."
+ },
+ "latitude2": {
+ "$ref": "#/definitions/Position2Def",
+ "description": "Latitude-2 position for geographically projected ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`."
+ },
+ "longitude": {
+ "$ref": "#/definitions/LatLongDef",
+ "description": "Longitude position of geographically projected marks."
+ },
+ "longitude2": {
+ "$ref": "#/definitions/Position2Def",
+ "description": "Longitude-2 position for geographically projected ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`."
+ },
+ "opacity": {
+ "$ref": "#/definitions/NumericMarkPropDef",
+ "description": "Opacity of the marks.\n\n__Default value:__ If undefined, the default opacity depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `opacity` property."
+ },
+ "order": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/OrderFieldDef"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/OrderFieldDef"
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/OrderValueDef"
+ }
+ ],
+ "description": "Order of the marks. - For stacked marks, this `order` channel encodes [stack order](https://vega.github.io/vega-lite/docs/stack.html#order). - For line and trail marks, this `order` channel encodes order of data points in the lines. This can be useful for creating [a connected scatterplot](https://vega.github.io/vega-lite/examples/connected_scatterplot.html). Setting `order` to `{\"value\": null}` makes the line marks use the original order in the data sources. - Otherwise, this `order` channel encodes layer order of the marks.\n\n__Note__: In aggregate plots, `order` field should be `aggregate`d to avoid creating additional aggregation grouping."
+ },
+ "radius": {
+ "$ref": "#/definitions/PolarDef",
+ "description": "The outer radius in pixels of arc marks."
+ },
+ "radius2": {
+ "$ref": "#/definitions/Position2Def",
+ "description": "The inner radius in pixels of arc marks."
+ },
+ "shape": {
+ "$ref": "#/definitions/ShapeDef",
+ "description": "Shape of the mark.\n\n1. For `point` marks the supported values include: - plotting shapes: `\"circle\"`, `\"square\"`, `\"cross\"`, `\"diamond\"`, `\"triangle-up\"`, `\"triangle-down\"`, `\"triangle-right\"`, or `\"triangle-left\"`. - the line symbol `\"stroke\"` - centered directional shapes `\"arrow\"`, `\"wedge\"`, or `\"triangle\"` - a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n2. For `geoshape` marks it should be a field definition of the geojson data\n\n__Default value:__ If undefined, the default shape depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#point-config)'s `shape` property. (`\"circle\"` if unset.)"
+ },
+ "size": {
+ "$ref": "#/definitions/NumericMarkPropDef",
+ "description": "Size of the mark. - For `\"point\"`, `\"square\"` and `\"circle\"`, – the symbol size, or pixel area of the mark. - For `\"bar\"` and `\"tick\"` – the bar and tick's size. - For `\"text\"` – the text's font size. - Size is unsupported for `\"line\"`, `\"area\"`, and `\"rect\"`. (Use `\"trail\"` instead of line with varying size)"
+ },
+ "stroke": {
+ "$ref": "#/definitions/ColorDef",
+ "description": "Stroke color of the marks. __Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `color` property.\n\n_Note:_ The `stroke` encoding has higher precedence than `color`, thus may override the `color` encoding if conflicting encodings are specified."
+ },
+ "strokeDash": {
+ "$ref": "#/definitions/NumericArrayMarkPropDef",
+ "description": "Stroke dash of the marks.\n\n__Default value:__ `[1,0]` (No dash)."
+ },
+ "strokeOpacity": {
+ "$ref": "#/definitions/NumericMarkPropDef",
+ "description": "Stroke opacity of the marks.\n\n__Default value:__ If undefined, the default opacity depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `strokeOpacity` property."
+ },
+ "strokeWidth": {
+ "$ref": "#/definitions/NumericMarkPropDef",
+ "description": "Stroke width of the marks.\n\n__Default value:__ If undefined, the default stroke width depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `strokeWidth` property."
+ },
+ "text": {
+ "$ref": "#/definitions/TextDef",
+ "description": "Text of the `text` mark."
+ },
+ "theta": {
+ "$ref": "#/definitions/PolarDef",
+ "description": "- For arc marks, the arc length in radians if theta2 is not specified, otherwise the start arc angle. (A value of 0 indicates up or “north”, increasing values proceed clockwise.)\n\n- For text marks, polar coordinate angle in radians."
+ },
+ "theta2": {
+ "$ref": "#/definitions/Position2Def",
+ "description": "The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise."
+ },
+ "tooltip": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StringFieldDefWithCondition"
+ },
+ {
+ "$ref": "#/definitions/StringValueDefWithCondition"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/StringFieldDef"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The tooltip text to show upon mouse hover. Specifying `tooltip` encoding overrides [the `tooltip` property in the mark definition](https://vega.github.io/vega-lite/docs/mark.html#mark-def).\n\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip in Vega-Lite."
+ },
+ "url": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StringFieldDefWithCondition"
+ },
+ {
+ "$ref": "#/definitions/StringValueDefWithCondition"
+ }
+ ],
+ "description": "The URL of an image mark."
+ },
+ "x": {
+ "$ref": "#/definitions/PositionDef",
+ "description": "X coordinates of the marks, or width of horizontal `\"bar\"` and `\"area\"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "x2": {
+ "$ref": "#/definitions/Position2Def",
+ "description": "X2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "xError": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SecondaryFieldDef"
+ },
+ {
+ "$ref": "#/definitions/ValueDef<number>"
+ }
+ ],
+ "description": "Error value of x coordinates for error specified `\"errorbar\"` and `\"errorband\"`."
+ },
+ "xError2": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SecondaryFieldDef"
+ },
+ {
+ "$ref": "#/definitions/ValueDef<number>"
+ }
+ ],
+ "description": "Secondary error value of x coordinates for error specified `\"errorbar\"` and `\"errorband\"`."
+ },
+ "y": {
+ "$ref": "#/definitions/PositionDef",
+ "description": "Y coordinates of the marks, or height of vertical `\"bar\"` and `\"area\"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ },
+ "y2": {
+ "$ref": "#/definitions/Position2Def",
+ "description": "Y2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ },
+ "yError": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SecondaryFieldDef"
+ },
+ {
+ "$ref": "#/definitions/ValueDef<number>"
+ }
+ ],
+ "description": "Error value of y coordinates for error specified `\"errorbar\"` and `\"errorband\"`."
+ },
+ "yError2": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SecondaryFieldDef"
+ },
+ {
+ "$ref": "#/definitions/ValueDef<number>"
+ }
+ ],
+ "description": "Secondary error value of y coordinates for error specified `\"errorbar\"` and `\"errorband\"`."
+ }
+ },
+ "type": "object"
+ },
+ "CompositeMark": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/BoxPlot"
+ },
+ {
+ "$ref": "#/definitions/ErrorBar"
+ },
+ {
+ "$ref": "#/definitions/ErrorBand"
+ }
+ ]
+ },
+ "CompositeMarkDef": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/BoxPlotDef"
+ },
+ {
+ "$ref": "#/definitions/ErrorBarDef"
+ },
+ {
+ "$ref": "#/definitions/ErrorBandDef"
+ }
+ ]
+ },
+ "CompositionConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "columns": {
+ "description": "The number of columns to include in the view composition layout.\n\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\n\n__Note__:\n\n1) This property is only for: - the general (wrappable) `concat` operator (not `hconcat`/`vconcat`) - the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\n\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).",
+ "type": "number"
+ },
+ "spacing": {
+ "description": "The default spacing in pixels between composed sub-views.\n\n__Default value__: `20`",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "ConditionalMarkPropFieldOrDatumDef": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalPredicate<MarkPropFieldOrDatumDef>"
+ },
+ {
+ "$ref": "#/definitions/ConditionalSelection<MarkPropFieldOrDatumDef>"
+ }
+ ]
+ },
+ "ConditionalMarkPropFieldOrDatumDef<TypeForShape>": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalPredicate<MarkPropFieldOrDatumDef<TypeForShape>>"
+ },
+ {
+ "$ref": "#/definitions/ConditionalSelection<MarkPropFieldOrDatumDef<TypeForShape>>"
+ }
+ ]
+ },
+ "ConditionalStringFieldDef": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalPredicate<StringFieldDef>"
+ },
+ {
+ "$ref": "#/definitions/ConditionalSelection<StringFieldDef>"
+ }
+ ]
+ },
+ "ConditionalValueDef<(Gradient|string|null|ExprRef)>": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalPredicate<ValueDef<(Gradient|string|null|ExprRef)>>"
+ },
+ {
+ "$ref": "#/definitions/ConditionalSelection<ValueDef<(Gradient|string|null|ExprRef)>>"
+ }
+ ]
+ },
+ "ConditionalValueDef<(Text|ExprRef)>": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalPredicate<ValueDef<(Text|ExprRef)>>"
+ },
+ {
+ "$ref": "#/definitions/ConditionalSelection<ValueDef<(Text|ExprRef)>>"
+ }
+ ]
+ },
+ "ConditionalValueDef<(number[]|ExprRef)>": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalPredicate<ValueDef<(number[]|ExprRef)>>"
+ },
+ {
+ "$ref": "#/definitions/ConditionalSelection<ValueDef<(number[]|ExprRef)>>"
+ }
+ ]
+ },
+ "ConditionalValueDef<(number|ExprRef)>": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalPredicate<ValueDef<(number|ExprRef)>>"
+ },
+ {
+ "$ref": "#/definitions/ConditionalSelection<ValueDef<(number|ExprRef)>>"
+ }
+ ]
+ },
+ "ConditionalValueDef<(string|ExprRef)>": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalPredicate<ValueDef<(string|ExprRef)>>"
+ },
+ {
+ "$ref": "#/definitions/ConditionalSelection<ValueDef<(string|ExprRef)>>"
+ }
+ ]
+ },
+ "ConditionalValueDef<(string|null|ExprRef)>": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalPredicate<ValueDef<(string|null|ExprRef)>>"
+ },
+ {
+ "$ref": "#/definitions/ConditionalSelection<ValueDef<(string|null|ExprRef)>>"
+ }
+ ]
+ },
+ "ConditionalValueDef<number>": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalPredicate<ValueDef<number>>"
+ },
+ {
+ "$ref": "#/definitions/ConditionalSelection<ValueDef<number>>"
+ }
+ ]
+ },
+ "ConditionalAxisColor": {
+ "$ref": "#/definitions/ConditionalAxisProperty<(Color|null)>"
+ },
+ "ConditionalAxisLabelAlign": {
+ "$ref": "#/definitions/ConditionalAxisProperty<(Align|null)>"
+ },
+ "ConditionalAxisLabelBaseline": {
+ "$ref": "#/definitions/ConditionalAxisProperty<(TextBaseline|null)>"
+ },
+ "ConditionalAxisLabelFontStyle": {
+ "$ref": "#/definitions/ConditionalAxisProperty<(FontStyle|null)>"
+ },
+ "ConditionalAxisLabelFontWeight": {
+ "$ref": "#/definitions/ConditionalAxisProperty<(FontWeight|null)>"
+ },
+ "ConditionalAxisNumber": {
+ "$ref": "#/definitions/ConditionalAxisProperty<(number|null)>"
+ },
+ "ConditionalAxisNumberArray": {
+ "$ref": "#/definitions/ConditionalAxisProperty<(number[]|null)>"
+ },
+ "ConditionalAxisProperty<(Align|null)>": {
+ "anyOf": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "condition": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(Align|null)>|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(Align|null)>|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ]
+ },
+ "value": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Align"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "required": [
+ "condition",
+ "value"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "condition": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(Align|null)>|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(Align|null)>|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ]
+ },
+ "expr": {
+ "description": "Vega expression (which can refer to Vega-Lite parameters).",
+ "type": "string"
+ }
+ },
+ "required": [
+ "condition",
+ "expr"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "ConditionalAxisProperty<(Color|null)>": {
+ "anyOf": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "condition": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(Color|null)>|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(Color|null)>|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ]
+ },
+ "value": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "required": [
+ "condition",
+ "value"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "condition": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(Color|null)>|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(Color|null)>|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ]
+ },
+ "expr": {
+ "description": "Vega expression (which can refer to Vega-Lite parameters).",
+ "type": "string"
+ }
+ },
+ "required": [
+ "condition",
+ "expr"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "ConditionalAxisProperty<(FontStyle|null)>": {
+ "anyOf": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "condition": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(FontStyle|null)>|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(FontStyle|null)>|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ]
+ },
+ "value": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontStyle"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "required": [
+ "condition",
+ "value"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "condition": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(FontStyle|null)>|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(FontStyle|null)>|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ]
+ },
+ "expr": {
+ "description": "Vega expression (which can refer to Vega-Lite parameters).",
+ "type": "string"
+ }
+ },
+ "required": [
+ "condition",
+ "expr"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "ConditionalAxisProperty<(FontWeight|null)>": {
+ "anyOf": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "condition": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(FontWeight|null)>|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(FontWeight|null)>|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ]
+ },
+ "value": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontWeight"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "required": [
+ "condition",
+ "value"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "condition": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(FontWeight|null)>|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(FontWeight|null)>|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ]
+ },
+ "expr": {
+ "description": "Vega expression (which can refer to Vega-Lite parameters).",
+ "type": "string"
+ }
+ },
+ "required": [
+ "condition",
+ "expr"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "ConditionalAxisProperty<(TextBaseline|null)>": {
+ "anyOf": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "condition": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(TextBaseline|null)>|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(TextBaseline|null)>|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ]
+ },
+ "value": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TextBaseline"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "required": [
+ "condition",
+ "value"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "condition": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(TextBaseline|null)>|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(TextBaseline|null)>|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ]
+ },
+ "expr": {
+ "description": "Vega expression (which can refer to Vega-Lite parameters).",
+ "type": "string"
+ }
+ },
+ "required": [
+ "condition",
+ "expr"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "ConditionalAxisProperty<(number[]|null)>": {
+ "anyOf": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "condition": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(number[]|null)>|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(number[]|null)>|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ]
+ },
+ "value": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "required": [
+ "condition",
+ "value"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "condition": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(number[]|null)>|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(number[]|null)>|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ]
+ },
+ "expr": {
+ "description": "Vega expression (which can refer to Vega-Lite parameters).",
+ "type": "string"
+ }
+ },
+ "required": [
+ "condition",
+ "expr"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "ConditionalAxisProperty<(number|null)>": {
+ "anyOf": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "condition": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(number|null)>|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(number|null)>|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ]
+ },
+ "value": {
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).",
+ "type": [
+ "number",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "condition",
+ "value"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "condition": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(number|null)>|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(number|null)>|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ]
+ },
+ "expr": {
+ "description": "Vega expression (which can refer to Vega-Lite parameters).",
+ "type": "string"
+ }
+ },
+ "required": [
+ "condition",
+ "expr"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "ConditionalAxisProperty<(string|null)>": {
+ "anyOf": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "condition": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(string|null)>|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(string|null)>|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ]
+ },
+ "value": {
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).",
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "condition",
+ "value"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "condition": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(string|null)>|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(string|null)>|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ]
+ },
+ "expr": {
+ "description": "Vega expression (which can refer to Vega-Lite parameters).",
+ "type": "string"
+ }
+ },
+ "required": [
+ "condition",
+ "expr"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "ConditionalAxisString": {
+ "$ref": "#/definitions/ConditionalAxisProperty<(string|null)>"
+ },
+ "ConditionalPredicate<(ValueDef<(Align|null)>|ExprRef)>": {
+ "anyOf": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "test": {
+ "$ref": "#/definitions/PredicateComposition",
+ "description": "Predicate for triggering the condition"
+ },
+ "value": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Align"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "required": [
+ "test",
+ "value"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "expr": {
+ "description": "Vega expression (which can refer to Vega-Lite parameters).",
+ "type": "string"
+ },
+ "test": {
+ "$ref": "#/definitions/PredicateComposition",
+ "description": "Predicate for triggering the condition"
+ }
+ },
+ "required": [
+ "expr",
+ "test"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "ConditionalPredicate<(ValueDef<(Color|null)>|ExprRef)>": {
+ "anyOf": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "test": {
+ "$ref": "#/definitions/PredicateComposition",
+ "description": "Predicate for triggering the condition"
+ },
+ "value": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "required": [
+ "test",
+ "value"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "expr": {
+ "description": "Vega expression (which can refer to Vega-Lite parameters).",
+ "type": "string"
+ },
+ "test": {
+ "$ref": "#/definitions/PredicateComposition",
+ "description": "Predicate for triggering the condition"
+ }
+ },
+ "required": [
+ "expr",
+ "test"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "ConditionalPredicate<(ValueDef<(FontStyle|null)>|ExprRef)>": {
+ "anyOf": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "test": {
+ "$ref": "#/definitions/PredicateComposition",
+ "description": "Predicate for triggering the condition"
+ },
+ "value": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontStyle"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "required": [
+ "test",
+ "value"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "expr": {
+ "description": "Vega expression (which can refer to Vega-Lite parameters).",
+ "type": "string"
+ },
+ "test": {
+ "$ref": "#/definitions/PredicateComposition",
+ "description": "Predicate for triggering the condition"
+ }
+ },
+ "required": [
+ "expr",
+ "test"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "ConditionalPredicate<(ValueDef<(FontWeight|null)>|ExprRef)>": {
+ "anyOf": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "test": {
+ "$ref": "#/definitions/PredicateComposition",
+ "description": "Predicate for triggering the condition"
+ },
+ "value": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontWeight"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "required": [
+ "test",
+ "value"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "expr": {
+ "description": "Vega expression (which can refer to Vega-Lite parameters).",
+ "type": "string"
+ },
+ "test": {
+ "$ref": "#/definitions/PredicateComposition",
+ "description": "Predicate for triggering the condition"
+ }
+ },
+ "required": [
+ "expr",
+ "test"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "ConditionalPredicate<(ValueDef<(TextBaseline|null)>|ExprRef)>": {
+ "anyOf": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "test": {
+ "$ref": "#/definitions/PredicateComposition",
+ "description": "Predicate for triggering the condition"
+ },
+ "value": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TextBaseline"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "required": [
+ "test",
+ "value"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "expr": {
+ "description": "Vega expression (which can refer to Vega-Lite parameters).",
+ "type": "string"
+ },
+ "test": {
+ "$ref": "#/definitions/PredicateComposition",
+ "description": "Predicate for triggering the condition"
+ }
+ },
+ "required": [
+ "expr",
+ "test"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "ConditionalPredicate<(ValueDef<(number[]|null)>|ExprRef)>": {
+ "anyOf": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "test": {
+ "$ref": "#/definitions/PredicateComposition",
+ "description": "Predicate for triggering the condition"
+ },
+ "value": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "required": [
+ "test",
+ "value"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "expr": {
+ "description": "Vega expression (which can refer to Vega-Lite parameters).",
+ "type": "string"
+ },
+ "test": {
+ "$ref": "#/definitions/PredicateComposition",
+ "description": "Predicate for triggering the condition"
+ }
+ },
+ "required": [
+ "expr",
+ "test"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "ConditionalPredicate<(ValueDef<(number|null)>|ExprRef)>": {
+ "anyOf": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "test": {
+ "$ref": "#/definitions/PredicateComposition",
+ "description": "Predicate for triggering the condition"
+ },
+ "value": {
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).",
+ "type": [
+ "number",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "test",
+ "value"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "expr": {
+ "description": "Vega expression (which can refer to Vega-Lite parameters).",
+ "type": "string"
+ },
+ "test": {
+ "$ref": "#/definitions/PredicateComposition",
+ "description": "Predicate for triggering the condition"
+ }
+ },
+ "required": [
+ "expr",
+ "test"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "ConditionalPredicate<(ValueDef<(string|null)>|ExprRef)>": {
+ "anyOf": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "test": {
+ "$ref": "#/definitions/PredicateComposition",
+ "description": "Predicate for triggering the condition"
+ },
+ "value": {
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).",
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "test",
+ "value"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "expr": {
+ "description": "Vega expression (which can refer to Vega-Lite parameters).",
+ "type": "string"
+ },
+ "test": {
+ "$ref": "#/definitions/PredicateComposition",
+ "description": "Predicate for triggering the condition"
+ }
+ },
+ "required": [
+ "expr",
+ "test"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "ConditionalPredicate<MarkPropFieldOrDatumDef>": {
+ "anyOf": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "legend": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Legend"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
+ },
+ "scale": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Scale"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation."
+ },
+ "sort": {
+ "$ref": "#/definitions/Sort",
+ "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following: - `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`). - `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation."
+ },
+ "test": {
+ "$ref": "#/definitions/PredicateComposition",
+ "description": "Predicate for triggering the condition"
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "$ref": "#/definitions/StandardType",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "required": [
+ "test"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "datum": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/PrimitiveValue"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/RepeatRef"
+ }
+ ],
+ "description": "A constant value in data domain."
+ },
+ "legend": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Legend"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
+ },
+ "scale": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Scale"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation."
+ },
+ "test": {
+ "$ref": "#/definitions/PredicateComposition",
+ "description": "Predicate for triggering the condition"
+ },
+ "type": {
+ "$ref": "#/definitions/Type",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "required": [
+ "test"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "ConditionalPredicate<MarkPropFieldOrDatumDef<TypeForShape>>": {
+ "anyOf": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "legend": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Legend"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
+ },
+ "scale": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Scale"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation."
+ },
+ "sort": {
+ "$ref": "#/definitions/Sort",
+ "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following: - `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`). - `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation."
+ },
+ "test": {
+ "$ref": "#/definitions/PredicateComposition",
+ "description": "Predicate for triggering the condition"
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "$ref": "#/definitions/TypeForShape",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "required": [
+ "test"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "datum": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/PrimitiveValue"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/RepeatRef"
+ }
+ ],
+ "description": "A constant value in data domain."
+ },
+ "legend": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Legend"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
+ },
+ "scale": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Scale"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation."
+ },
+ "test": {
+ "$ref": "#/definitions/PredicateComposition",
+ "description": "Predicate for triggering the condition"
+ },
+ "type": {
+ "$ref": "#/definitions/Type",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "required": [
+ "test"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "ConditionalPredicate<StringFieldDef>": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "const": "binned",
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "format": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/Dict<unknown>"
+ }
+ ],
+ "description": "When used with the default `\"number\"` and `\"time\"` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `\"number\"` (e.g., for quantitative fields), this is D3's [number format pattern](https://github.com/d3/d3-format#locale_format). - If the format type is `\"time\"` (e.g., for temporal fields), this is D3's [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\n\n__Default value:__ Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format."
+ },
+ "formatType": {
+ "description": "The format type for labels. One of `\"number\"`, `\"time\"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\n\n__Default value:__ - `\"time\"` for temporal fields and ordinal and nominal fields with `timeUnit`. - `\"number\"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.",
+ "type": "string"
+ },
+ "labelExpr": {
+ "description": "[Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels text.\n\n__Note:__ The label text and value can be assessed via the `label` and `value` properties of the axis's backing `datum` object.",
+ "type": "string"
+ },
+ "test": {
+ "$ref": "#/definitions/PredicateComposition",
+ "description": "Predicate for triggering the condition"
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "$ref": "#/definitions/StandardType",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "required": [
+ "test"
+ ],
+ "type": "object"
+ },
+ "ConditionalPredicate<ValueDef<(Gradient|string|null|ExprRef)>>": {
+ "additionalProperties": false,
+ "properties": {
+ "test": {
+ "$ref": "#/definitions/PredicateComposition",
+ "description": "Predicate for triggering the condition"
+ },
+ "value": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Gradient"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "required": [
+ "test",
+ "value"
+ ],
+ "type": "object"
+ },
+ "ConditionalPredicate<ValueDef<(Text|ExprRef)>>": {
+ "additionalProperties": false,
+ "properties": {
+ "test": {
+ "$ref": "#/definitions/PredicateComposition",
+ "description": "Predicate for triggering the condition"
+ },
+ "value": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "required": [
+ "test",
+ "value"
+ ],
+ "type": "object"
+ },
+ "ConditionalPredicate<ValueDef<(number[]|ExprRef)>>": {
+ "additionalProperties": false,
+ "properties": {
+ "test": {
+ "$ref": "#/definitions/PredicateComposition",
+ "description": "Predicate for triggering the condition"
+ },
+ "value": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "required": [
+ "test",
+ "value"
+ ],
+ "type": "object"
+ },
+ "ConditionalPredicate<ValueDef<(number|ExprRef)>>": {
+ "additionalProperties": false,
+ "properties": {
+ "test": {
+ "$ref": "#/definitions/PredicateComposition",
+ "description": "Predicate for triggering the condition"
+ },
+ "value": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "required": [
+ "test",
+ "value"
+ ],
+ "type": "object"
+ },
+ "ConditionalPredicate<ValueDef<(string|ExprRef)>>": {
+ "additionalProperties": false,
+ "properties": {
+ "test": {
+ "$ref": "#/definitions/PredicateComposition",
+ "description": "Predicate for triggering the condition"
+ },
+ "value": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "required": [
+ "test",
+ "value"
+ ],
+ "type": "object"
+ },
+ "ConditionalPredicate<ValueDef<(string|null|ExprRef)>>": {
+ "additionalProperties": false,
+ "properties": {
+ "test": {
+ "$ref": "#/definitions/PredicateComposition",
+ "description": "Predicate for triggering the condition"
+ },
+ "value": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "required": [
+ "test",
+ "value"
+ ],
+ "type": "object"
+ },
+ "ConditionalPredicate<ValueDef<number>>": {
+ "additionalProperties": false,
+ "properties": {
+ "test": {
+ "$ref": "#/definitions/PredicateComposition",
+ "description": "Predicate for triggering the condition"
+ },
+ "value": {
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).",
+ "type": "number"
+ }
+ },
+ "required": [
+ "test",
+ "value"
+ ],
+ "type": "object"
+ },
+ "ConditionalSelection<MarkPropFieldOrDatumDef>": {
+ "anyOf": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "legend": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Legend"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
+ },
+ "scale": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Scale"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation."
+ },
+ "selection": {
+ "$ref": "#/definitions/SelectionComposition",
+ "description": "A [selection name](https://vega.github.io/vega-lite/docs/selection.html), or a series of [composed selections](https://vega.github.io/vega-lite/docs/selection.html#compose)."
+ },
+ "sort": {
+ "$ref": "#/definitions/Sort",
+ "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following: - `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`). - `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "$ref": "#/definitions/StandardType",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "required": [
+ "selection"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "datum": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/PrimitiveValue"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/RepeatRef"
+ }
+ ],
+ "description": "A constant value in data domain."
+ },
+ "legend": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Legend"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
+ },
+ "scale": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Scale"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation."
+ },
+ "selection": {
+ "$ref": "#/definitions/SelectionComposition",
+ "description": "A [selection name](https://vega.github.io/vega-lite/docs/selection.html), or a series of [composed selections](https://vega.github.io/vega-lite/docs/selection.html#compose)."
+ },
+ "type": {
+ "$ref": "#/definitions/Type",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "required": [
+ "selection"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "ConditionalSelection<MarkPropFieldOrDatumDef<TypeForShape>>": {
+ "anyOf": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "legend": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Legend"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
+ },
+ "scale": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Scale"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation."
+ },
+ "selection": {
+ "$ref": "#/definitions/SelectionComposition",
+ "description": "A [selection name](https://vega.github.io/vega-lite/docs/selection.html), or a series of [composed selections](https://vega.github.io/vega-lite/docs/selection.html#compose)."
+ },
+ "sort": {
+ "$ref": "#/definitions/Sort",
+ "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following: - `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`). - `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "$ref": "#/definitions/TypeForShape",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "required": [
+ "selection"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "datum": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/PrimitiveValue"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/RepeatRef"
+ }
+ ],
+ "description": "A constant value in data domain."
+ },
+ "legend": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Legend"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
+ },
+ "scale": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Scale"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation."
+ },
+ "selection": {
+ "$ref": "#/definitions/SelectionComposition",
+ "description": "A [selection name](https://vega.github.io/vega-lite/docs/selection.html), or a series of [composed selections](https://vega.github.io/vega-lite/docs/selection.html#compose)."
+ },
+ "type": {
+ "$ref": "#/definitions/Type",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "required": [
+ "selection"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "ConditionalSelection<StringFieldDef>": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "const": "binned",
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "format": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/Dict<unknown>"
+ }
+ ],
+ "description": "When used with the default `\"number\"` and `\"time\"` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `\"number\"` (e.g., for quantitative fields), this is D3's [number format pattern](https://github.com/d3/d3-format#locale_format). - If the format type is `\"time\"` (e.g., for temporal fields), this is D3's [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\n\n__Default value:__ Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format."
+ },
+ "formatType": {
+ "description": "The format type for labels. One of `\"number\"`, `\"time\"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\n\n__Default value:__ - `\"time\"` for temporal fields and ordinal and nominal fields with `timeUnit`. - `\"number\"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.",
+ "type": "string"
+ },
+ "labelExpr": {
+ "description": "[Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels text.\n\n__Note:__ The label text and value can be assessed via the `label` and `value` properties of the axis's backing `datum` object.",
+ "type": "string"
+ },
+ "selection": {
+ "$ref": "#/definitions/SelectionComposition",
+ "description": "A [selection name](https://vega.github.io/vega-lite/docs/selection.html), or a series of [composed selections](https://vega.github.io/vega-lite/docs/selection.html#compose)."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "$ref": "#/definitions/StandardType",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "required": [
+ "selection"
+ ],
+ "type": "object"
+ },
+ "ConditionalSelection<ValueDef<(Gradient|string|null|ExprRef)>>": {
+ "additionalProperties": false,
+ "properties": {
+ "selection": {
+ "$ref": "#/definitions/SelectionComposition",
+ "description": "A [selection name](https://vega.github.io/vega-lite/docs/selection.html), or a series of [composed selections](https://vega.github.io/vega-lite/docs/selection.html#compose)."
+ },
+ "value": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Gradient"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "required": [
+ "selection",
+ "value"
+ ],
+ "type": "object"
+ },
+ "ConditionalSelection<ValueDef<(Text|ExprRef)>>": {
+ "additionalProperties": false,
+ "properties": {
+ "selection": {
+ "$ref": "#/definitions/SelectionComposition",
+ "description": "A [selection name](https://vega.github.io/vega-lite/docs/selection.html), or a series of [composed selections](https://vega.github.io/vega-lite/docs/selection.html#compose)."
+ },
+ "value": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "required": [
+ "selection",
+ "value"
+ ],
+ "type": "object"
+ },
+ "ConditionalSelection<ValueDef<(number[]|ExprRef)>>": {
+ "additionalProperties": false,
+ "properties": {
+ "selection": {
+ "$ref": "#/definitions/SelectionComposition",
+ "description": "A [selection name](https://vega.github.io/vega-lite/docs/selection.html), or a series of [composed selections](https://vega.github.io/vega-lite/docs/selection.html#compose)."
+ },
+ "value": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "required": [
+ "selection",
+ "value"
+ ],
+ "type": "object"
+ },
+ "ConditionalSelection<ValueDef<(number|ExprRef)>>": {
+ "additionalProperties": false,
+ "properties": {
+ "selection": {
+ "$ref": "#/definitions/SelectionComposition",
+ "description": "A [selection name](https://vega.github.io/vega-lite/docs/selection.html), or a series of [composed selections](https://vega.github.io/vega-lite/docs/selection.html#compose)."
+ },
+ "value": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "required": [
+ "selection",
+ "value"
+ ],
+ "type": "object"
+ },
+ "ConditionalSelection<ValueDef<(string|ExprRef)>>": {
+ "additionalProperties": false,
+ "properties": {
+ "selection": {
+ "$ref": "#/definitions/SelectionComposition",
+ "description": "A [selection name](https://vega.github.io/vega-lite/docs/selection.html), or a series of [composed selections](https://vega.github.io/vega-lite/docs/selection.html#compose)."
+ },
+ "value": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "required": [
+ "selection",
+ "value"
+ ],
+ "type": "object"
+ },
+ "ConditionalSelection<ValueDef<(string|null|ExprRef)>>": {
+ "additionalProperties": false,
+ "properties": {
+ "selection": {
+ "$ref": "#/definitions/SelectionComposition",
+ "description": "A [selection name](https://vega.github.io/vega-lite/docs/selection.html), or a series of [composed selections](https://vega.github.io/vega-lite/docs/selection.html#compose)."
+ },
+ "value": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "required": [
+ "selection",
+ "value"
+ ],
+ "type": "object"
+ },
+ "ConditionalSelection<ValueDef<number>>": {
+ "additionalProperties": false,
+ "properties": {
+ "selection": {
+ "$ref": "#/definitions/SelectionComposition",
+ "description": "A [selection name](https://vega.github.io/vega-lite/docs/selection.html), or a series of [composed selections](https://vega.github.io/vega-lite/docs/selection.html#compose)."
+ },
+ "value": {
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).",
+ "type": "number"
+ }
+ },
+ "required": [
+ "selection",
+ "value"
+ ],
+ "type": "object"
+ },
+ "Config": {
+ "additionalProperties": false,
+ "properties": {
+ "arc": {
+ "$ref": "#/definitions/RectConfig",
+ "description": "Arc-specific Config"
+ },
+ "area": {
+ "$ref": "#/definitions/AreaConfig",
+ "description": "Area-Specific Config"
+ },
+ "aria": {
+ "description": "A boolean flag indicating if ARIA default attributes should be included for marks and guides (SVG output only). If false, the `\"aria-hidden\"` attribute will be set for all guides, removing them from the ARIA accessibility tree and Vega-Lite will not generate default descriptions for marks.\n\n__Default value:__ `true`.",
+ "type": "boolean"
+ },
+ "autosize": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/AutosizeType"
+ },
+ {
+ "$ref": "#/definitions/AutoSizeParams"
+ }
+ ],
+ "description": "How the visualization size should be determined. If a string, should be one of `\"pad\"`, `\"fit\"` or `\"none\"`. Object values can additionally specify parameters for content sizing and automatic resizing.\n\n__Default value__: `pad`"
+ },
+ "axis": {
+ "$ref": "#/definitions/AxisConfig",
+ "description": "Axis configuration, which determines default properties for all `x` and `y` [axes](https://vega.github.io/vega-lite/docs/axis.html). For a full list of axis configuration options, please see the [corresponding section of the axis documentation](https://vega.github.io/vega-lite/docs/axis.html#config)."
+ },
+ "axisBand": {
+ "$ref": "#/definitions/AxisConfig",
+ "description": "Config for axes with \"band\" scales."
+ },
+ "axisBottom": {
+ "$ref": "#/definitions/AxisConfig",
+ "description": "Config for x-axis along the bottom edge of the chart."
+ },
+ "axisDiscrete": {
+ "$ref": "#/definitions/AxisConfig",
+ "description": "Config for axes with \"point\" or \"band\" scales."
+ },
+ "axisLeft": {
+ "$ref": "#/definitions/AxisConfig",
+ "description": "Config for y-axis along the left edge of the chart."
+ },
+ "axisPoint": {
+ "$ref": "#/definitions/AxisConfig",
+ "description": "Config for axes with \"point\" scales."
+ },
+ "axisQuantitative": {
+ "$ref": "#/definitions/AxisConfig",
+ "description": "Config for quantitative axes."
+ },
+ "axisRight": {
+ "$ref": "#/definitions/AxisConfig",
+ "description": "Config for y-axis along the right edge of the chart."
+ },
+ "axisTemporal": {
+ "$ref": "#/definitions/AxisConfig",
+ "description": "Config for temporal axes."
+ },
+ "axisTop": {
+ "$ref": "#/definitions/AxisConfig",
+ "description": "Config for x-axis along the top edge of the chart."
+ },
+ "axisX": {
+ "$ref": "#/definitions/AxisConfig",
+ "description": "X-axis specific config."
+ },
+ "axisXBand": {
+ "$ref": "#/definitions/AxisConfig",
+ "description": "Config for x-axes with \"band\" scales."
+ },
+ "axisXDiscrete": {
+ "$ref": "#/definitions/AxisConfig",
+ "description": "Config for x-axes with \"point\" or \"band\" scales."
+ },
+ "axisXPoint": {
+ "$ref": "#/definitions/AxisConfig",
+ "description": "Config for x-axes with \"point\" scales."
+ },
+ "axisXQuantitative": {
+ "$ref": "#/definitions/AxisConfig",
+ "description": "Config for x-quantitative axes."
+ },
+ "axisXTemporal": {
+ "$ref": "#/definitions/AxisConfig",
+ "description": "Config for x-temporal axes."
+ },
+ "axisY": {
+ "$ref": "#/definitions/AxisConfig",
+ "description": "Y-axis specific config."
+ },
+ "axisYBand": {
+ "$ref": "#/definitions/AxisConfig",
+ "description": "Config for y-axes with \"band\" scales."
+ },
+ "axisYDiscrete": {
+ "$ref": "#/definitions/AxisConfig",
+ "description": "Config for y-axes with \"point\" or \"band\" scales."
+ },
+ "axisYPoint": {
+ "$ref": "#/definitions/AxisConfig",
+ "description": "Config for y-axes with \"point\" scales."
+ },
+ "axisYQuantitative": {
+ "$ref": "#/definitions/AxisConfig",
+ "description": "Config for y-quantitative axes."
+ },
+ "axisYTemporal": {
+ "$ref": "#/definitions/AxisConfig",
+ "description": "Config for y-temporal axes."
+ },
+ "background": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "CSS color property to use as the background of the entire view.\n\n__Default value:__ `\"white\"`"
+ },
+ "bar": {
+ "$ref": "#/definitions/BarConfig",
+ "description": "Bar-Specific Config"
+ },
+ "boxplot": {
+ "$ref": "#/definitions/BoxPlotConfig",
+ "description": "Box Config"
+ },
+ "circle": {
+ "$ref": "#/definitions/MarkConfig",
+ "description": "Circle-Specific Config"
+ },
+ "concat": {
+ "$ref": "#/definitions/CompositionConfig",
+ "description": "Default configuration for all concatenation and repeat view composition operators (`concat`, `hconcat`, `vconcat`, and `repeat`)"
+ },
+ "countTitle": {
+ "description": "Default axis and legend title for count fields.\n\n__Default value:__ `'Count of Records`.",
+ "type": "string"
+ },
+ "customFormatTypes": {
+ "description": "Allow the `formatType` property for text marks and guides to accept a custom formatter function [registered as a Vega expression](https://vega.github.io/vega-lite/usage/compile.html#format-type).",
+ "type": "boolean"
+ },
+ "errorband": {
+ "$ref": "#/definitions/ErrorBandConfig",
+ "description": "ErrorBand Config"
+ },
+ "errorbar": {
+ "$ref": "#/definitions/ErrorBarConfig",
+ "description": "ErrorBar Config"
+ },
+ "facet": {
+ "$ref": "#/definitions/CompositionConfig",
+ "description": "Default configuration for the `facet` view composition operator"
+ },
+ "fieldTitle": {
+ "description": "Defines how Vega-Lite generates title for fields. There are three possible styles: - `\"verbal\"` (Default) - displays function in a verbal style (e.g., \"Sum of field\", \"Year-month of date\", \"field (binned)\"). - `\"function\"` - displays function using parentheses and capitalized texts (e.g., \"SUM(field)\", \"YEARMONTH(date)\", \"BIN(field)\"). - `\"plain\"` - displays only the field name without functions (e.g., \"field\", \"date\", \"field\").",
+ "enum": [
+ "verbal",
+ "functional",
+ "plain"
+ ],
+ "type": "string"
+ },
+ "font": {
+ "description": "Default font for all text marks, titles, and labels.",
+ "type": "string"
+ },
+ "geoshape": {
+ "$ref": "#/definitions/MarkConfig",
+ "description": "Geoshape-Specific Config"
+ },
+ "header": {
+ "$ref": "#/definitions/HeaderConfig",
+ "description": "Header configuration, which determines default properties for all [headers](https://vega.github.io/vega-lite/docs/header.html).\n\nFor a full list of header configuration options, please see the [corresponding section of in the header documentation](https://vega.github.io/vega-lite/docs/header.html#config)."
+ },
+ "headerColumn": {
+ "$ref": "#/definitions/HeaderConfig",
+ "description": "Header configuration, which determines default properties for column [headers](https://vega.github.io/vega-lite/docs/header.html).\n\nFor a full list of header configuration options, please see the [corresponding section of in the header documentation](https://vega.github.io/vega-lite/docs/header.html#config)."
+ },
+ "headerFacet": {
+ "$ref": "#/definitions/HeaderConfig",
+ "description": "Header configuration, which determines default properties for non-row/column facet [headers](https://vega.github.io/vega-lite/docs/header.html).\n\nFor a full list of header configuration options, please see the [corresponding section of in the header documentation](https://vega.github.io/vega-lite/docs/header.html#config)."
+ },
+ "headerRow": {
+ "$ref": "#/definitions/HeaderConfig",
+ "description": "Header configuration, which determines default properties for row [headers](https://vega.github.io/vega-lite/docs/header.html).\n\nFor a full list of header configuration options, please see the [corresponding section of in the header documentation](https://vega.github.io/vega-lite/docs/header.html#config)."
+ },
+ "image": {
+ "$ref": "#/definitions/RectConfig",
+ "description": "Image-specific Config"
+ },
+ "legend": {
+ "$ref": "#/definitions/LegendConfig",
+ "description": "Legend configuration, which determines default properties for all [legends](https://vega.github.io/vega-lite/docs/legend.html). For a full list of legend configuration options, please see the [corresponding section of in the legend documentation](https://vega.github.io/vega-lite/docs/legend.html#config)."
+ },
+ "line": {
+ "$ref": "#/definitions/LineConfig",
+ "description": "Line-Specific Config"
+ },
+ "lineBreak": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property provides a global default for text marks, which is overridden by mark or style config settings, and by the lineBreak mark encoding channel. If signal-valued, either string or regular expression (regexp) values are valid."
+ },
+ "mark": {
+ "$ref": "#/definitions/MarkConfig",
+ "description": "Mark Config"
+ },
+ "numberFormat": {
+ "description": "D3 Number format for guide labels and text marks. For example `\"s\"` for SI units. Use [D3's number format pattern](https://github.com/d3/d3-format#locale_format).",
+ "type": "string"
+ },
+ "padding": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Padding"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides. If an object, the value should have the format `{\"left\": 5, \"top\": 5, \"right\": 5, \"bottom\": 5}` to specify padding for each side of the visualization.\n\n__Default value__: `5`"
+ },
+ "params": {
+ "description": "Dynamic variables that parameterize a visualization.",
+ "items": {
+ "$ref": "#/definitions/Parameter"
+ },
+ "type": "array"
+ },
+ "point": {
+ "$ref": "#/definitions/MarkConfig",
+ "description": "Point-Specific Config"
+ },
+ "projection": {
+ "$ref": "#/definitions/ProjectionConfig",
+ "description": "Projection configuration, which determines default properties for all [projections](https://vega.github.io/vega-lite/docs/projection.html). For a full list of projection configuration options, please see the [corresponding section of the projection documentation](https://vega.github.io/vega-lite/docs/projection.html#config)."
+ },
+ "range": {
+ "$ref": "#/definitions/RangeConfig",
+ "description": "An object hash that defines default range arrays or schemes for using with scales. For a full list of scale range configuration options, please see the [corresponding section of the scale documentation](https://vega.github.io/vega-lite/docs/scale.html#config)."
+ },
+ "rect": {
+ "$ref": "#/definitions/RectConfig",
+ "description": "Rect-Specific Config"
+ },
+ "rule": {
+ "$ref": "#/definitions/MarkConfig",
+ "description": "Rule-Specific Config"
+ },
+ "scale": {
+ "$ref": "#/definitions/ScaleConfig",
+ "description": "Scale configuration determines default properties for all [scales](https://vega.github.io/vega-lite/docs/scale.html). For a full list of scale configuration options, please see the [corresponding section of the scale documentation](https://vega.github.io/vega-lite/docs/scale.html#config)."
+ },
+ "selection": {
+ "$ref": "#/definitions/SelectionConfig",
+ "description": "An object hash for defining default properties for each type of selections."
+ },
+ "square": {
+ "$ref": "#/definitions/MarkConfig",
+ "description": "Square-Specific Config"
+ },
+ "style": {
+ "$ref": "#/definitions/StyleConfigIndex",
+ "description": "An object hash that defines key-value mappings to determine default properties for marks with a given [style](https://vega.github.io/vega-lite/docs/mark.html#mark-def). The keys represent styles names; the values have to be valid [mark configuration objects](https://vega.github.io/vega-lite/docs/mark.html#config)."
+ },
+ "text": {
+ "$ref": "#/definitions/MarkConfig",
+ "description": "Text-Specific Config"
+ },
+ "tick": {
+ "$ref": "#/definitions/TickConfig",
+ "description": "Tick-Specific Config"
+ },
+ "timeFormat": {
+ "description": "Default time format for raw time values (without time units) in text marks, legend labels and header labels.\n\n__Default value:__ `\"%b %d, %Y\"` __Note:__ Axes automatically determine the format for each label automatically so this config does not affect axes.",
+ "type": "string"
+ },
+ "title": {
+ "$ref": "#/definitions/TitleConfig",
+ "description": "Title configuration, which determines default properties for all [titles](https://vega.github.io/vega-lite/docs/title.html). For a full list of title configuration options, please see the [corresponding section of the title documentation](https://vega.github.io/vega-lite/docs/title.html#config)."
+ },
+ "trail": {
+ "$ref": "#/definitions/LineConfig",
+ "description": "Trail-Specific Config"
+ },
+ "view": {
+ "$ref": "#/definitions/ViewConfig",
+ "description": "Default properties for [single view plots](https://vega.github.io/vega-lite/docs/spec.html#single)."
+ }
+ },
+ "type": "object"
+ },
+ "CsvDataFormat": {
+ "additionalProperties": false,
+ "properties": {
+ "parse": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Parse"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "If set to `null`, disable type inference based on the spec and only use type inference based on the data. Alternatively, a parsing directive object can be provided for explicit data types. Each property of the object corresponds to a field name, and the value to the desired data type (one of `\"number\"`, `\"boolean\"`, `\"date\"`, or null (do not parse the field)). For example, `\"parse\": {\"modified_on\": \"date\"}` parses the `modified_on` field in each input record a Date value.\n\nFor `\"date\"`, we parse data based using Javascript's [`Date.parse()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse). For Specific date formats can be provided (e.g., `{foo: \"date:'%m%d%Y'\"}`), using the [d3-time-format syntax](https://github.com/d3/d3-time-format#locale_format). UTC date format parsing is supported similarly (e.g., `{foo: \"utc:'%m%d%Y'\"}`). See more about [UTC time](https://vega.github.io/vega-lite/docs/timeunit.html#utc)"
+ },
+ "type": {
+ "description": "Type of input data: `\"json\"`, `\"csv\"`, `\"tsv\"`, `\"dsv\"`.\n\n__Default value:__ The default format type is determined by the extension of the file URL. If no extension is detected, `\"json\"` will be used by default.",
+ "enum": [
+ "csv",
+ "tsv"
+ ],
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "Cursor": {
+ "enum": [
+ "auto",
+ "default",
+ "none",
+ "context-menu",
+ "help",
+ "pointer",
+ "progress",
+ "wait",
+ "cell",
+ "crosshair",
+ "text",
+ "vertical-text",
+ "alias",
+ "copy",
+ "move",
+ "no-drop",
+ "not-allowed",
+ "e-resize",
+ "n-resize",
+ "ne-resize",
+ "nw-resize",
+ "s-resize",
+ "se-resize",
+ "sw-resize",
+ "w-resize",
+ "ew-resize",
+ "ns-resize",
+ "nesw-resize",
+ "nwse-resize",
+ "col-resize",
+ "row-resize",
+ "all-scroll",
+ "zoom-in",
+ "zoom-out",
+ "grab",
+ "grabbing"
+ ],
+ "type": "string"
+ },
+ "Cyclical": {
+ "enum": [
+ "rainbow",
+ "sinebow"
+ ],
+ "type": "string"
+ },
+ "Data": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/DataSource"
+ },
+ {
+ "$ref": "#/definitions/Generator"
+ }
+ ]
+ },
+ "DataFormat": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/CsvDataFormat"
+ },
+ {
+ "$ref": "#/definitions/DsvDataFormat"
+ },
+ {
+ "$ref": "#/definitions/JsonDataFormat"
+ },
+ {
+ "$ref": "#/definitions/TopoDataFormat"
+ }
+ ]
+ },
+ "DataSource": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/UrlData"
+ },
+ {
+ "$ref": "#/definitions/InlineData"
+ },
+ {
+ "$ref": "#/definitions/NamedData"
+ }
+ ]
+ },
+ "Datasets": {
+ "$ref": "#/definitions/Dict<InlineDataset>"
+ },
+ "DateTime": {
+ "additionalProperties": false,
+ "description": "Object for defining datetime in Vega-Lite Filter. If both month and quarter are provided, month has higher precedence. `day` cannot be combined with other date. We accept string for month and day names.",
+ "properties": {
+ "date": {
+ "description": "Integer value representing the date (day of the month) from 1-31.",
+ "maximum": 31,
+ "minimum": 1,
+ "type": "number"
+ },
+ "day": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Day"
+ },
+ {
+ "type": "string"
+ }
+ ],
+ "description": "Value representing the day of a week. This can be one of: (1) integer value -- `1` represents Monday; (2) case-insensitive day name (e.g., `\"Monday\"`); (3) case-insensitive, 3-character short day name (e.g., `\"Mon\"`).\n\n**Warning:** A DateTime definition object with `day`** should not be combined with `year`, `quarter`, `month`, or `date`."
+ },
+ "hours": {
+ "description": "Integer value representing the hour of a day from 0-23.",
+ "maximum": 24,
+ "minimum": 0,
+ "type": "number"
+ },
+ "milliseconds": {
+ "description": "Integer value representing the millisecond segment of time.",
+ "maximum": 1000,
+ "minimum": 0,
+ "type": "number"
+ },
+ "minutes": {
+ "description": "Integer value representing the minute segment of time from 0-59.",
+ "maximum": 60,
+ "minimum": 0,
+ "type": "number"
+ },
+ "month": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Month"
+ },
+ {
+ "type": "string"
+ }
+ ],
+ "description": "One of: (1) integer value representing the month from `1`-`12`. `1` represents January; (2) case-insensitive month name (e.g., `\"January\"`); (3) case-insensitive, 3-character short month name (e.g., `\"Jan\"`)."
+ },
+ "quarter": {
+ "description": "Integer value representing the quarter of the year (from 1-4).",
+ "maximum": 4,
+ "minimum": 1,
+ "type": "number"
+ },
+ "seconds": {
+ "description": "Integer value representing the second segment (0-59) of a time value",
+ "maximum": 60,
+ "minimum": 0,
+ "type": "number"
+ },
+ "utc": {
+ "description": "A boolean flag indicating if date time is in utc time. If false, the date time is in local time",
+ "type": "boolean"
+ },
+ "year": {
+ "description": "Integer value representing the year.",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "DatumDef": {
+ "additionalProperties": false,
+ "properties": {
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "datum": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/PrimitiveValue"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/RepeatRef"
+ }
+ ],
+ "description": "A constant value in data domain."
+ },
+ "type": {
+ "$ref": "#/definitions/Type",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "type": "object"
+ },
+ "Day": {
+ "maximum": 7,
+ "minimum": 1,
+ "type": "number"
+ },
+ "DensityTransform": {
+ "additionalProperties": false,
+ "properties": {
+ "as": {
+ "description": "The output fields for the sample value and corresponding density estimate.\n\n__Default value:__ `[\"value\", \"density\"]`",
+ "items": [
+ {
+ "$ref": "#/definitions/FieldName"
+ },
+ {
+ "$ref": "#/definitions/FieldName"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2,
+ "type": "array"
+ },
+ "bandwidth": {
+ "description": "The bandwidth (standard deviation) of the Gaussian kernel. If unspecified or set to zero, the bandwidth value is automatically estimated from the input data using Scott’s rule.",
+ "type": "number"
+ },
+ "counts": {
+ "description": "A boolean flag indicating if the output values should be probability estimates (false) or smoothed counts (true).\n\n__Default value:__ `false`",
+ "type": "boolean"
+ },
+ "cumulative": {
+ "description": "A boolean flag indicating whether to produce density estimates (false) or cumulative density estimates (true).\n\n__Default value:__ `false`",
+ "type": "boolean"
+ },
+ "density": {
+ "$ref": "#/definitions/FieldName",
+ "description": "The data field for which to perform density estimation."
+ },
+ "extent": {
+ "description": "A [min, max] domain from which to sample the distribution. If unspecified, the extent will be determined by the observed minimum and maximum values of the density value field.",
+ "items": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "number"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2,
+ "type": "array"
+ },
+ "groupby": {
+ "description": "The data fields to group by. If not specified, a single group containing all data objects will be used.",
+ "items": {
+ "$ref": "#/definitions/FieldName"
+ },
+ "type": "array"
+ },
+ "maxsteps": {
+ "description": "The maximum number of samples to take along the extent domain for plotting the density.\n\n__Default value:__ `200`",
+ "type": "number"
+ },
+ "minsteps": {
+ "description": "The minimum number of samples to take along the extent domain for plotting the density.\n\n__Default value:__ `25`",
+ "type": "number"
+ },
+ "steps": {
+ "description": "The exact number of samples to take along the extent domain for plotting the density. If specified, overrides both minsteps and maxsteps to set an exact number of uniform samples. Potentially useful in conjunction with a fixed extent to ensure consistent sample points for stacked densities.",
+ "type": "number"
+ }
+ },
+ "required": [
+ "density"
+ ],
+ "type": "object"
+ },
+ "DerivedStream": {
+ "additionalProperties": false,
+ "properties": {
+ "between": {
+ "items": {
+ "$ref": "#/definitions/Stream"
+ },
+ "type": "array"
+ },
+ "consume": {
+ "type": "boolean"
+ },
+ "debounce": {
+ "type": "number"
+ },
+ "filter": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Expr"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/Expr"
+ },
+ "type": "array"
+ }
+ ]
+ },
+ "markname": {
+ "type": "string"
+ },
+ "marktype": {
+ "$ref": "#/definitions/MarkType"
+ },
+ "stream": {
+ "$ref": "#/definitions/Stream"
+ },
+ "throttle": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "stream"
+ ],
+ "type": "object"
+ },
+ "Dict<InlineDataset>": {
+ "additionalProperties": {
+ "$ref": "#/definitions/InlineDataset"
+ },
+ "type": "object"
+ },
+ "Dict<SelectionInit>": {
+ "additionalProperties": {
+ "$ref": "#/definitions/SelectionInit"
+ },
+ "type": "object"
+ },
+ "Dict<SelectionInitInterval>": {
+ "additionalProperties": {
+ "$ref": "#/definitions/SelectionInitInterval"
+ },
+ "type": "object"
+ },
+ "Dict<unknown>": {
+ "additionalProperties": {
+ },
+ "type": "object"
+ },
+ "Diverging": {
+ "enum": [
+ "blueorange",
+ "blueorange-3",
+ "blueorange-4",
+ "blueorange-5",
+ "blueorange-6",
+ "blueorange-7",
+ "blueorange-8",
+ "blueorange-9",
+ "blueorange-10",
+ "blueorange-11",
+ "brownbluegreen",
+ "brownbluegreen-3",
+ "brownbluegreen-4",
+ "brownbluegreen-5",
+ "brownbluegreen-6",
+ "brownbluegreen-7",
+ "brownbluegreen-8",
+ "brownbluegreen-9",
+ "brownbluegreen-10",
+ "brownbluegreen-11",
+ "purplegreen",
+ "purplegreen-3",
+ "purplegreen-4",
+ "purplegreen-5",
+ "purplegreen-6",
+ "purplegreen-7",
+ "purplegreen-8",
+ "purplegreen-9",
+ "purplegreen-10",
+ "purplegreen-11",
+ "pinkyellowgreen",
+ "pinkyellowgreen-3",
+ "pinkyellowgreen-4",
+ "pinkyellowgreen-5",
+ "pinkyellowgreen-6",
+ "pinkyellowgreen-7",
+ "pinkyellowgreen-8",
+ "pinkyellowgreen-9",
+ "pinkyellowgreen-10",
+ "pinkyellowgreen-11",
+ "purpleorange",
+ "purpleorange-3",
+ "purpleorange-4",
+ "purpleorange-5",
+ "purpleorange-6",
+ "purpleorange-7",
+ "purpleorange-8",
+ "purpleorange-9",
+ "purpleorange-10",
+ "purpleorange-11",
+ "redblue",
+ "redblue-3",
+ "redblue-4",
+ "redblue-5",
+ "redblue-6",
+ "redblue-7",
+ "redblue-8",
+ "redblue-9",
+ "redblue-10",
+ "redblue-11",
+ "redgrey",
+ "redgrey-3",
+ "redgrey-4",
+ "redgrey-5",
+ "redgrey-6",
+ "redgrey-7",
+ "redgrey-8",
+ "redgrey-9",
+ "redgrey-10",
+ "redgrey-11",
+ "redyellowblue",
+ "redyellowblue-3",
+ "redyellowblue-4",
+ "redyellowblue-5",
+ "redyellowblue-6",
+ "redyellowblue-7",
+ "redyellowblue-8",
+ "redyellowblue-9",
+ "redyellowblue-10",
+ "redyellowblue-11",
+ "redyellowgreen",
+ "redyellowgreen-3",
+ "redyellowgreen-4",
+ "redyellowgreen-5",
+ "redyellowgreen-6",
+ "redyellowgreen-7",
+ "redyellowgreen-8",
+ "redyellowgreen-9",
+ "redyellowgreen-10",
+ "redyellowgreen-11",
+ "spectral",
+ "spectral-3",
+ "spectral-4",
+ "spectral-5",
+ "spectral-6",
+ "spectral-7",
+ "spectral-8",
+ "spectral-9",
+ "spectral-10",
+ "spectral-11"
+ ],
+ "type": "string"
+ },
+ "DomainUnionWith": {
+ "additionalProperties": false,
+ "properties": {
+ "unionWith": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "items": {
+ "type": "boolean"
+ },
+ "type": "array"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/DateTime"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "Customized domain values to be union with the field's values.\n\n1) `domain` for _quantitative_ fields can take one of the following forms:\n\n- a two-element array with minimum and maximum values. - an array with more than two entries, for [Piecewise quantitative scales](https://vega.github.io/vega-lite/docs/scale.html#piecewise). (Alternatively, the `domainMid` property can be set for a diverging scale.) - a string value `\"unaggregated\"`, if the input field is aggregated, to indicate that the domain should include the raw data values prior to the aggregation.\n\n2) `domain` for _temporal_ fields can be a two-element array minimum and maximum values, in the form of either timestamps or the [DateTime definition objects](https://vega.github.io/vega-lite/docs/types.html#datetime).\n\n3) `domain` for _ordinal_ and _nominal_ fields can be an array that lists valid input values."
+ }
+ },
+ "required": [
+ "unionWith"
+ ],
+ "type": "object"
+ },
+ "DsvDataFormat": {
+ "additionalProperties": false,
+ "properties": {
+ "delimiter": {
+ "description": "The delimiter between records. The delimiter must be a single character (i.e., a single 16-bit code unit); so, ASCII delimiters are fine, but emoji delimiters are not.",
+ "maxLength": 1,
+ "minLength": 1,
+ "type": "string"
+ },
+ "parse": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Parse"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "If set to `null`, disable type inference based on the spec and only use type inference based on the data. Alternatively, a parsing directive object can be provided for explicit data types. Each property of the object corresponds to a field name, and the value to the desired data type (one of `\"number\"`, `\"boolean\"`, `\"date\"`, or null (do not parse the field)). For example, `\"parse\": {\"modified_on\": \"date\"}` parses the `modified_on` field in each input record a Date value.\n\nFor `\"date\"`, we parse data based using Javascript's [`Date.parse()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse). For Specific date formats can be provided (e.g., `{foo: \"date:'%m%d%Y'\"}`), using the [d3-time-format syntax](https://github.com/d3/d3-time-format#locale_format). UTC date format parsing is supported similarly (e.g., `{foo: \"utc:'%m%d%Y'\"}`). See more about [UTC time](https://vega.github.io/vega-lite/docs/timeunit.html#utc)"
+ },
+ "type": {
+ "const": "dsv",
+ "description": "Type of input data: `\"json\"`, `\"csv\"`, `\"tsv\"`, `\"dsv\"`.\n\n__Default value:__ The default format type is determined by the extension of the file URL. If no extension is detected, `\"json\"` will be used by default.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "delimiter"
+ ],
+ "type": "object"
+ },
+ "Element": {
+ "type": "string"
+ },
+ "EncodingSortField": {
+ "additionalProperties": false,
+ "description": "A sort definition for sorting a discrete scale in an encoding field definition.",
+ "properties": {
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "The data [field](https://vega.github.io/vega-lite/docs/field.html) to sort by.\n\n__Default value:__ If unspecified, defaults to the field specified in the outer data reference."
+ },
+ "op": {
+ "$ref": "#/definitions/NonArgAggregateOp",
+ "description": "An [aggregate operation](https://vega.github.io/vega-lite/docs/aggregate.html#ops) to perform on the field prior to sorting (e.g., `\"count\"`, `\"mean\"` and `\"median\"`). An aggregation is required when there are multiple values of the sort field for each encoded data field. The input data objects will be aggregated, grouped by the encoded data field.\n\nFor a full list of operations, please see the documentation for [aggregate](https://vega.github.io/vega-lite/docs/aggregate.html#ops).\n\n__Default value:__ `\"sum\"` for stacked plots. Otherwise, `\"min\"`."
+ },
+ "order": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SortOrder"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The sort order. One of `\"ascending\"` (default), `\"descending\"`, or `null` (no not sort)."
+ }
+ },
+ "type": "object"
+ },
+ "EncodingSortField<FieldName>": {
+ "additionalProperties": false,
+ "description": "A sort definition for sorting a discrete scale in an encoding field definition.",
+ "properties": {
+ "field": {
+ "$ref": "#/definitions/FieldName",
+ "description": "The data [field](https://vega.github.io/vega-lite/docs/field.html) to sort by.\n\n__Default value:__ If unspecified, defaults to the field specified in the outer data reference."
+ },
+ "op": {
+ "$ref": "#/definitions/NonArgAggregateOp",
+ "description": "An [aggregate operation](https://vega.github.io/vega-lite/docs/aggregate.html#ops) to perform on the field prior to sorting (e.g., `\"count\"`, `\"mean\"` and `\"median\"`). An aggregation is required when there are multiple values of the sort field for each encoded data field. The input data objects will be aggregated, grouped by the encoded data field.\n\nFor a full list of operations, please see the documentation for [aggregate](https://vega.github.io/vega-lite/docs/aggregate.html#ops).\n\n__Default value:__ `\"sum\"` for stacked plots. Otherwise, `\"min\"`."
+ },
+ "order": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SortOrder"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The sort order. One of `\"ascending\"` (default), `\"descending\"`, or `null` (no not sort)."
+ }
+ },
+ "type": "object"
+ },
+ "ErrorBand": {
+ "const": "errorband",
+ "type": "string"
+ },
+ "ErrorBandConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "band": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/MarkConfig<ExprOrSignalRef>"
+ }
+ ]
+ },
+ "borders": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/MarkConfig<ExprOrSignalRef>"
+ }
+ ]
+ },
+ "extent": {
+ "$ref": "#/definitions/ErrorBarExtent",
+ "description": "The extent of the band. Available options include: - `\"ci\"`: Extend the band to the confidence interval of the mean. - `\"stderr\"`: The size of band are set to the value of standard error, extending from the mean. - `\"stdev\"`: The size of band are set to the value of standard deviation, extending from the mean. - `\"iqr\"`: Extend the band to the q1 and q3.\n\n__Default value:__ `\"stderr\"`."
+ },
+ "interpolate": {
+ "$ref": "#/definitions/Interpolate",
+ "description": "The line interpolation method for the error band. One of the following: - `\"linear\"`: piecewise linear segments, as in a polyline. - `\"linear-closed\"`: close the linear segments to form a polygon. - `\"step\"`: a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. The y-value changes at the midpoint of each pair of adjacent x-values. - `\"step-before\"`: a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. The y-value changes before the x-value. - `\"step-after\"`: a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. The y-value changes after the x-value. - `\"basis\"`: a B-spline, with control point duplication on the ends. - `\"basis-open\"`: an open B-spline; may not intersect the start or end. - `\"basis-closed\"`: a closed B-spline, as in a loop. - `\"cardinal\"`: a Cardinal spline, with control point duplication on the ends. - `\"cardinal-open\"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points. - `\"cardinal-closed\"`: a closed Cardinal spline, as in a loop. - `\"bundle\"`: equivalent to basis, except the tension parameter is used to straighten the spline. - `\"monotone\"`: cubic interpolation that preserves monotonicity in y."
+ },
+ "tension": {
+ "description": "The tension parameter for the interpolation type of the error band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "ErrorBandDef": {
+ "additionalProperties": false,
+ "properties": {
+ "band": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/MarkConfig<ExprOrSignalRef>"
+ }
+ ]
+ },
+ "borders": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/MarkConfig<ExprOrSignalRef>"
+ }
+ ]
+ },
+ "clip": {
+ "description": "Whether a composite mark be clipped to the enclosing group’s width and height.",
+ "type": "boolean"
+ },
+ "color": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/Gradient"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Default color.\n\n__Default value:__ <span style=\"color: #4682b4;\">&#9632;</span> `\"#4682b4\"`\n\n__Note:__ - This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config). - The `fill` and `stroke` properties have higher precedence than `color` and will override `color`."
+ },
+ "extent": {
+ "$ref": "#/definitions/ErrorBarExtent",
+ "description": "The extent of the band. Available options include: - `\"ci\"`: Extend the band to the confidence interval of the mean. - `\"stderr\"`: The size of band are set to the value of standard error, extending from the mean. - `\"stdev\"`: The size of band are set to the value of standard deviation, extending from the mean. - `\"iqr\"`: Extend the band to the q1 and q3.\n\n__Default value:__ `\"stderr\"`."
+ },
+ "interpolate": {
+ "$ref": "#/definitions/Interpolate",
+ "description": "The line interpolation method for the error band. One of the following: - `\"linear\"`: piecewise linear segments, as in a polyline. - `\"linear-closed\"`: close the linear segments to form a polygon. - `\"step\"`: a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. The y-value changes at the midpoint of each pair of adjacent x-values. - `\"step-before\"`: a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. The y-value changes before the x-value. - `\"step-after\"`: a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. The y-value changes after the x-value. - `\"basis\"`: a B-spline, with control point duplication on the ends. - `\"basis-open\"`: an open B-spline; may not intersect the start or end. - `\"basis-closed\"`: a closed B-spline, as in a loop. - `\"cardinal\"`: a Cardinal spline, with control point duplication on the ends. - `\"cardinal-open\"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points. - `\"cardinal-closed\"`: a closed Cardinal spline, as in a loop. - `\"bundle\"`: equivalent to basis, except the tension parameter is used to straighten the spline. - `\"monotone\"`: cubic interpolation that preserves monotonicity in y."
+ },
+ "opacity": {
+ "description": "The opacity (value between [0,1]) of the mark.",
+ "type": "number"
+ },
+ "orient": {
+ "$ref": "#/definitions/Orientation",
+ "description": "Orientation of the error band. This is normally automatically determined, but can be specified when the orientation is ambiguous and cannot be automatically determined."
+ },
+ "tension": {
+ "description": "The tension parameter for the interpolation type of the error band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "type": {
+ "$ref": "#/definitions/ErrorBand",
+ "description": "The mark type. This could a primitive mark type (one of `\"bar\"`, `\"circle\"`, `\"square\"`, `\"tick\"`, `\"line\"`, `\"area\"`, `\"point\"`, `\"geoshape\"`, `\"rule\"`, and `\"text\"`) or a composite mark type (`\"boxplot\"`, `\"errorband\"`, `\"errorbar\"`)."
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "type": "object"
+ },
+ "ErrorBar": {
+ "const": "errorbar",
+ "type": "string"
+ },
+ "ErrorBarConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "extent": {
+ "$ref": "#/definitions/ErrorBarExtent",
+ "description": "The extent of the rule. Available options include: - `\"ci\"`: Extend the rule to the confidence interval of the mean. - `\"stderr\"`: The size of rule are set to the value of standard error, extending from the mean. - `\"stdev\"`: The size of rule are set to the value of standard deviation, extending from the mean. - `\"iqr\"`: Extend the rule to the q1 and q3.\n\n__Default value:__ `\"stderr\"`."
+ },
+ "rule": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/MarkConfig<ExprOrSignalRef>"
+ }
+ ]
+ },
+ "size": {
+ "description": "Size of the ticks of an error bar",
+ "type": "number"
+ },
+ "thickness": {
+ "description": "Thickness of the ticks and the bar of an error bar",
+ "type": "number"
+ },
+ "ticks": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/MarkConfig<ExprOrSignalRef>"
+ }
+ ]
+ }
+ },
+ "type": "object"
+ },
+ "ErrorBarDef": {
+ "additionalProperties": false,
+ "properties": {
+ "clip": {
+ "description": "Whether a composite mark be clipped to the enclosing group’s width and height.",
+ "type": "boolean"
+ },
+ "color": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/Gradient"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Default color.\n\n__Default value:__ <span style=\"color: #4682b4;\">&#9632;</span> `\"#4682b4\"`\n\n__Note:__ - This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config). - The `fill` and `stroke` properties have higher precedence than `color` and will override `color`."
+ },
+ "extent": {
+ "$ref": "#/definitions/ErrorBarExtent",
+ "description": "The extent of the rule. Available options include: - `\"ci\"`: Extend the rule to the confidence interval of the mean. - `\"stderr\"`: The size of rule are set to the value of standard error, extending from the mean. - `\"stdev\"`: The size of rule are set to the value of standard deviation, extending from the mean. - `\"iqr\"`: Extend the rule to the q1 and q3.\n\n__Default value:__ `\"stderr\"`."
+ },
+ "opacity": {
+ "description": "The opacity (value between [0,1]) of the mark.",
+ "type": "number"
+ },
+ "orient": {
+ "$ref": "#/definitions/Orientation",
+ "description": "Orientation of the error bar. This is normally automatically determined, but can be specified when the orientation is ambiguous and cannot be automatically determined."
+ },
+ "rule": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/MarkConfig<ExprOrSignalRef>"
+ }
+ ]
+ },
+ "size": {
+ "description": "Size of the ticks of an error bar",
+ "type": "number"
+ },
+ "thickness": {
+ "description": "Thickness of the ticks and the bar of an error bar",
+ "type": "number"
+ },
+ "ticks": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/MarkConfig<ExprOrSignalRef>"
+ }
+ ]
+ },
+ "type": {
+ "$ref": "#/definitions/ErrorBar",
+ "description": "The mark type. This could a primitive mark type (one of `\"bar\"`, `\"circle\"`, `\"square\"`, `\"tick\"`, `\"line\"`, `\"area\"`, `\"point\"`, `\"geoshape\"`, `\"rule\"`, and `\"text\"`) or a composite mark type (`\"boxplot\"`, `\"errorband\"`, `\"errorbar\"`)."
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "type": "object"
+ },
+ "ErrorBarExtent": {
+ "enum": [
+ "ci",
+ "iqr",
+ "stderr",
+ "stdev"
+ ],
+ "type": "string"
+ },
+ "EventStream": {
+ "anyOf": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "between": {
+ "items": {
+ "$ref": "#/definitions/Stream"
+ },
+ "type": "array"
+ },
+ "consume": {
+ "type": "boolean"
+ },
+ "debounce": {
+ "type": "number"
+ },
+ "filter": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Expr"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/Expr"
+ },
+ "type": "array"
+ }
+ ]
+ },
+ "markname": {
+ "type": "string"
+ },
+ "marktype": {
+ "$ref": "#/definitions/MarkType"
+ },
+ "source": {
+ "enum": [
+ "view",
+ "scope"
+ ],
+ "type": "string"
+ },
+ "throttle": {
+ "type": "number"
+ },
+ "type": {
+ "$ref": "#/definitions/EventType"
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "between": {
+ "items": {
+ "$ref": "#/definitions/Stream"
+ },
+ "type": "array"
+ },
+ "consume": {
+ "type": "boolean"
+ },
+ "debounce": {
+ "type": "number"
+ },
+ "filter": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Expr"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/Expr"
+ },
+ "type": "array"
+ }
+ ]
+ },
+ "markname": {
+ "type": "string"
+ },
+ "marktype": {
+ "$ref": "#/definitions/MarkType"
+ },
+ "source": {
+ "const": "window",
+ "type": "string"
+ },
+ "throttle": {
+ "type": "number"
+ },
+ "type": {
+ "$ref": "#/definitions/WindowEventType"
+ }
+ },
+ "required": [
+ "source",
+ "type"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "EventType": {
+ "enum": [
+ "click",
+ "dblclick",
+ "dragenter",
+ "dragleave",
+ "dragover",
+ "keydown",
+ "keypress",
+ "keyup",
+ "mousedown",
+ "mousemove",
+ "mouseout",
+ "mouseover",
+ "mouseup",
+ "mousewheel",
+ "timer",
+ "touchend",
+ "touchmove",
+ "touchstart",
+ "wheel"
+ ],
+ "type": "string"
+ },
+ "Expr": {
+ "type": "string"
+ },
+ "ExprOrSignalRef": {
+ "$ref": "#/definitions/ExprRef"
+ },
+ "ExprRef": {
+ "additionalProperties": false,
+ "properties": {
+ "expr": {
+ "description": "Vega expression (which can refer to Vega-Lite parameters).",
+ "type": "string"
+ }
+ },
+ "required": [
+ "expr"
+ ],
+ "type": "object"
+ },
+ "FacetEncodingFieldDef": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "align": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LayoutAlign"
+ },
+ {
+ "$ref": "#/definitions/RowCol<LayoutAlign>"
+ }
+ ],
+ "description": "The alignment to apply to grid rows and columns. The supported string values are `\"all\"`, `\"each\"`, and `\"none\"`.\n\n- For `\"none\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other. - For `\"each\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size. - For `\"all\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\nAlternatively, an object value of the form `{\"row\": string, \"column\": string}` can be used to supply different alignments for rows and columns.\n\n__Default value:__ `\"all\"`."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "bounds": {
+ "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used. - If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`",
+ "enum": [
+ "full",
+ "flush"
+ ],
+ "type": "string"
+ },
+ "center": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/RowCol<boolean>"
+ }
+ ],
+ "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\nAn object value of the form `{\"row\": boolean, \"column\": boolean}` can be used to supply different centering values for rows and columns.\n\n__Default value:__ `false`"
+ },
+ "columns": {
+ "description": "The number of columns to include in the view composition layout.\n\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\n\n__Note__:\n\n1) This property is only for: - the general (wrappable) `concat` operator (not `hconcat`/`vconcat`) - the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\n\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).",
+ "type": "number"
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "header": {
+ "$ref": "#/definitions/Header",
+ "description": "An object defining properties of a facet's header."
+ },
+ "sort": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SortArray"
+ },
+ {
+ "$ref": "#/definitions/SortOrder"
+ },
+ {
+ "$ref": "#/definitions/EncodingSortField"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following: - `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`). - `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` is not supported for `row` and `column`."
+ },
+ "spacing": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/RowCol<number>"
+ }
+ ],
+ "description": "The spacing in pixels between sub-views of the composition operator. An object of the form `{\"row\": number, \"column\": number}` can be used to set different spacing values for rows and columns.\n\n__Default value__: Depends on `\"spacing\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)"
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "$ref": "#/definitions/StandardType",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "type": "object"
+ },
+ "FacetFieldDef": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "header": {
+ "$ref": "#/definitions/Header",
+ "description": "An object defining properties of a facet's header."
+ },
+ "sort": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SortArray"
+ },
+ {
+ "$ref": "#/definitions/SortOrder"
+ },
+ {
+ "$ref": "#/definitions/EncodingSortField"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following: - `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`). - `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` is not supported for `row` and `column`."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "$ref": "#/definitions/StandardType",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "type": "object"
+ },
+ "FacetFieldDef<FieldName>": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "field": {
+ "$ref": "#/definitions/FieldName",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "header": {
+ "$ref": "#/definitions/Header",
+ "description": "An object defining properties of a facet's header."
+ },
+ "sort": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SortArray"
+ },
+ {
+ "$ref": "#/definitions/SortOrder"
+ },
+ {
+ "$ref": "#/definitions/EncodingSortField<FieldName>"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following: - `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`). - `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` is not supported for `row` and `column`."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "$ref": "#/definitions/StandardType",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "type": "object"
+ },
+ "FacetMapping": {
+ "additionalProperties": false,
+ "properties": {
+ "column": {
+ "$ref": "#/definitions/FacetFieldDef",
+ "description": "A field definition for the horizontal facet of trellis plots."
+ },
+ "row": {
+ "$ref": "#/definitions/FacetFieldDef",
+ "description": "A field definition for the vertical facet of trellis plots."
+ }
+ },
+ "type": "object"
+ },
+ "FacetMapping<FieldName>": {
+ "additionalProperties": false,
+ "properties": {
+ "column": {
+ "$ref": "#/definitions/FacetFieldDef<FieldName>",
+ "description": "A field definition for the horizontal facet of trellis plots."
+ },
+ "row": {
+ "$ref": "#/definitions/FacetFieldDef<FieldName>",
+ "description": "A field definition for the vertical facet of trellis plots."
+ }
+ },
+ "type": "object"
+ },
+ "FacetedEncoding": {
+ "additionalProperties": false,
+ "properties": {
+ "angle": {
+ "$ref": "#/definitions/NumericMarkPropDef",
+ "description": "Rotation angle of point and text marks."
+ },
+ "color": {
+ "$ref": "#/definitions/ColorDef",
+ "description": "Color of the marks – either fill or stroke color based on the `filled` property of mark definition. By default, `color` represents fill color for `\"area\"`, `\"bar\"`, `\"tick\"`, `\"text\"`, `\"trail\"`, `\"circle\"`, and `\"square\"` / stroke color for `\"line\"` and `\"point\"`.\n\n__Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `color` property.\n\n_Note:_ 1) For fine-grained control over both fill and stroke colors of the marks, please use the `fill` and `stroke` channels. The `fill` or `stroke` encodings have higher precedence than `color`, thus may override the `color` encoding if conflicting encodings are specified. 2) See the scale documentation for more information about customizing [color scheme](https://vega.github.io/vega-lite/docs/scale.html#scheme)."
+ },
+ "column": {
+ "$ref": "#/definitions/RowColumnEncodingFieldDef",
+ "description": "A field definition for the horizontal facet of trellis plots."
+ },
+ "description": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StringFieldDefWithCondition"
+ },
+ {
+ "$ref": "#/definitions/StringValueDefWithCondition"
+ }
+ ],
+ "description": "A text description of this mark for ARIA accessibility (SVG output only). For SVG output the `\"aria-label\"` attribute will be set to this description."
+ },
+ "detail": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FieldDefWithoutScale"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/FieldDefWithoutScale"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "Additional levels of detail for grouping data in aggregate views and in line, trail, and area marks without mapping data to a specific visual channel."
+ },
+ "facet": {
+ "$ref": "#/definitions/FacetEncodingFieldDef",
+ "description": "A field definition for the (flexible) facet of trellis plots.\n\nIf either `row` or `column` is specified, this channel will be ignored."
+ },
+ "fill": {
+ "$ref": "#/definitions/ColorDef",
+ "description": "Fill color of the marks. __Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `color` property.\n\n_Note:_ The `fill` encoding has higher precedence than `color`, thus may override the `color` encoding if conflicting encodings are specified."
+ },
+ "fillOpacity": {
+ "$ref": "#/definitions/NumericMarkPropDef",
+ "description": "Fill opacity of the marks.\n\n__Default value:__ If undefined, the default opacity depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `fillOpacity` property."
+ },
+ "href": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StringFieldDefWithCondition"
+ },
+ {
+ "$ref": "#/definitions/StringValueDefWithCondition"
+ }
+ ],
+ "description": "A URL to load upon mouse click."
+ },
+ "key": {
+ "$ref": "#/definitions/FieldDefWithoutScale",
+ "description": "A data field to use as a unique key for data binding. When a visualization’s data is updated, the key value will be used to match data elements to existing mark instances. Use a key channel to enable object constancy for transitions over dynamic data."
+ },
+ "latitude": {
+ "$ref": "#/definitions/LatLongDef",
+ "description": "Latitude position of geographically projected marks."
+ },
+ "latitude2": {
+ "$ref": "#/definitions/Position2Def",
+ "description": "Latitude-2 position for geographically projected ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`."
+ },
+ "longitude": {
+ "$ref": "#/definitions/LatLongDef",
+ "description": "Longitude position of geographically projected marks."
+ },
+ "longitude2": {
+ "$ref": "#/definitions/Position2Def",
+ "description": "Longitude-2 position for geographically projected ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`."
+ },
+ "opacity": {
+ "$ref": "#/definitions/NumericMarkPropDef",
+ "description": "Opacity of the marks.\n\n__Default value:__ If undefined, the default opacity depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `opacity` property."
+ },
+ "order": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/OrderFieldDef"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/OrderFieldDef"
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/OrderValueDef"
+ }
+ ],
+ "description": "Order of the marks. - For stacked marks, this `order` channel encodes [stack order](https://vega.github.io/vega-lite/docs/stack.html#order). - For line and trail marks, this `order` channel encodes order of data points in the lines. This can be useful for creating [a connected scatterplot](https://vega.github.io/vega-lite/examples/connected_scatterplot.html). Setting `order` to `{\"value\": null}` makes the line marks use the original order in the data sources. - Otherwise, this `order` channel encodes layer order of the marks.\n\n__Note__: In aggregate plots, `order` field should be `aggregate`d to avoid creating additional aggregation grouping."
+ },
+ "radius": {
+ "$ref": "#/definitions/PolarDef",
+ "description": "The outer radius in pixels of arc marks."
+ },
+ "radius2": {
+ "$ref": "#/definitions/Position2Def",
+ "description": "The inner radius in pixels of arc marks."
+ },
+ "row": {
+ "$ref": "#/definitions/RowColumnEncodingFieldDef",
+ "description": "A field definition for the vertical facet of trellis plots."
+ },
+ "shape": {
+ "$ref": "#/definitions/ShapeDef",
+ "description": "Shape of the mark.\n\n1. For `point` marks the supported values include: - plotting shapes: `\"circle\"`, `\"square\"`, `\"cross\"`, `\"diamond\"`, `\"triangle-up\"`, `\"triangle-down\"`, `\"triangle-right\"`, or `\"triangle-left\"`. - the line symbol `\"stroke\"` - centered directional shapes `\"arrow\"`, `\"wedge\"`, or `\"triangle\"` - a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n2. For `geoshape` marks it should be a field definition of the geojson data\n\n__Default value:__ If undefined, the default shape depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#point-config)'s `shape` property. (`\"circle\"` if unset.)"
+ },
+ "size": {
+ "$ref": "#/definitions/NumericMarkPropDef",
+ "description": "Size of the mark. - For `\"point\"`, `\"square\"` and `\"circle\"`, – the symbol size, or pixel area of the mark. - For `\"bar\"` and `\"tick\"` – the bar and tick's size. - For `\"text\"` – the text's font size. - Size is unsupported for `\"line\"`, `\"area\"`, and `\"rect\"`. (Use `\"trail\"` instead of line with varying size)"
+ },
+ "stroke": {
+ "$ref": "#/definitions/ColorDef",
+ "description": "Stroke color of the marks. __Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `color` property.\n\n_Note:_ The `stroke` encoding has higher precedence than `color`, thus may override the `color` encoding if conflicting encodings are specified."
+ },
+ "strokeDash": {
+ "$ref": "#/definitions/NumericArrayMarkPropDef",
+ "description": "Stroke dash of the marks.\n\n__Default value:__ `[1,0]` (No dash)."
+ },
+ "strokeOpacity": {
+ "$ref": "#/definitions/NumericMarkPropDef",
+ "description": "Stroke opacity of the marks.\n\n__Default value:__ If undefined, the default opacity depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `strokeOpacity` property."
+ },
+ "strokeWidth": {
+ "$ref": "#/definitions/NumericMarkPropDef",
+ "description": "Stroke width of the marks.\n\n__Default value:__ If undefined, the default stroke width depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `strokeWidth` property."
+ },
+ "text": {
+ "$ref": "#/definitions/TextDef",
+ "description": "Text of the `text` mark."
+ },
+ "theta": {
+ "$ref": "#/definitions/PolarDef",
+ "description": "- For arc marks, the arc length in radians if theta2 is not specified, otherwise the start arc angle. (A value of 0 indicates up or “north”, increasing values proceed clockwise.)\n\n- For text marks, polar coordinate angle in radians."
+ },
+ "theta2": {
+ "$ref": "#/definitions/Position2Def",
+ "description": "The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise."
+ },
+ "tooltip": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StringFieldDefWithCondition"
+ },
+ {
+ "$ref": "#/definitions/StringValueDefWithCondition"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/StringFieldDef"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The tooltip text to show upon mouse hover. Specifying `tooltip` encoding overrides [the `tooltip` property in the mark definition](https://vega.github.io/vega-lite/docs/mark.html#mark-def).\n\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip in Vega-Lite."
+ },
+ "url": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StringFieldDefWithCondition"
+ },
+ {
+ "$ref": "#/definitions/StringValueDefWithCondition"
+ }
+ ],
+ "description": "The URL of an image mark."
+ },
+ "x": {
+ "$ref": "#/definitions/PositionDef",
+ "description": "X coordinates of the marks, or width of horizontal `\"bar\"` and `\"area\"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "x2": {
+ "$ref": "#/definitions/Position2Def",
+ "description": "X2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "xError": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SecondaryFieldDef"
+ },
+ {
+ "$ref": "#/definitions/ValueDef<number>"
+ }
+ ],
+ "description": "Error value of x coordinates for error specified `\"errorbar\"` and `\"errorband\"`."
+ },
+ "xError2": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SecondaryFieldDef"
+ },
+ {
+ "$ref": "#/definitions/ValueDef<number>"
+ }
+ ],
+ "description": "Secondary error value of x coordinates for error specified `\"errorbar\"` and `\"errorband\"`."
+ },
+ "y": {
+ "$ref": "#/definitions/PositionDef",
+ "description": "Y coordinates of the marks, or height of vertical `\"bar\"` and `\"area\"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ },
+ "y2": {
+ "$ref": "#/definitions/Position2Def",
+ "description": "Y2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ },
+ "yError": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SecondaryFieldDef"
+ },
+ {
+ "$ref": "#/definitions/ValueDef<number>"
+ }
+ ],
+ "description": "Error value of y coordinates for error specified `\"errorbar\"` and `\"errorband\"`."
+ },
+ "yError2": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SecondaryFieldDef"
+ },
+ {
+ "$ref": "#/definitions/ValueDef<number>"
+ }
+ ],
+ "description": "Secondary error value of y coordinates for error specified `\"errorbar\"` and `\"errorband\"`."
+ }
+ },
+ "type": "object"
+ },
+ "FacetedUnitSpec": {
+ "additionalProperties": false,
+ "description": "Unit spec that can have a composite mark and row or column channels (shorthand for a facet spec).",
+ "properties": {
+ "align": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LayoutAlign"
+ },
+ {
+ "$ref": "#/definitions/RowCol<LayoutAlign>"
+ }
+ ],
+ "description": "The alignment to apply to grid rows and columns. The supported string values are `\"all\"`, `\"each\"`, and `\"none\"`.\n\n- For `\"none\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other. - For `\"each\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size. - For `\"all\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\nAlternatively, an object value of the form `{\"row\": string, \"column\": string}` can be used to supply different alignments for rows and columns.\n\n__Default value:__ `\"all\"`."
+ },
+ "bounds": {
+ "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used. - If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`",
+ "enum": [
+ "full",
+ "flush"
+ ],
+ "type": "string"
+ },
+ "center": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/RowCol<boolean>"
+ }
+ ],
+ "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\nAn object value of the form `{\"row\": boolean, \"column\": boolean}` can be used to supply different centering values for rows and columns.\n\n__Default value:__ `false`"
+ },
+ "data": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Data"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
+ },
+ "description": {
+ "description": "Description of this mark for commenting purpose.",
+ "type": "string"
+ },
+ "encoding": {
+ "$ref": "#/definitions/FacetedEncoding",
+ "description": "A key-value mapping between encoding channels and definition of fields."
+ },
+ "height": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "container",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/Step"
+ }
+ ],
+ "description": "The height of a visualization.\n\n- For a plot with a continuous y-field, height should be a number. - For a plot with either a discrete y-field or no y-field, height can be either a number indicating a fixed height or an object in the form of `{step: number}` defining the height per discrete step. (No y-field is equivalent to having one discrete step.) - To enable responsive sizing on height, it should be set to `\"container\"`.\n\n__Default value:__ Based on `config.view.continuousHeight` for a plot with a continuous y-field and `config.view.discreteHeight` otherwise.\n\n__Note:__ For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the height of a single view and the `\"container\"` option cannot be used.\n\n__See also:__ [`height`](https://vega.github.io/vega-lite/docs/size.html) documentation."
+ },
+ "mark": {
+ "$ref": "#/definitions/AnyMark",
+ "description": "A string describing the mark type (one of `\"bar\"`, `\"circle\"`, `\"square\"`, `\"tick\"`, `\"line\"`, `\"area\"`, `\"point\"`, `\"rule\"`, `\"geoshape\"`, and `\"text\"`) or a [mark definition object](https://vega.github.io/vega-lite/docs/mark.html#mark-def)."
+ },
+ "name": {
+ "description": "Name of the visualization for later reference.",
+ "type": "string"
+ },
+ "projection": {
+ "$ref": "#/definitions/Projection",
+ "description": "An object defining properties of geographic projection, which will be applied to `shape` path for `\"geoshape\"` marks and to `latitude` and `\"longitude\"` channels for other marks."
+ },
+ "resolve": {
+ "$ref": "#/definitions/Resolve",
+ "description": "Scale, axis, and legend resolutions for view composition specifications."
+ },
+ "selection": {
+ "additionalProperties": {
+ "$ref": "#/definitions/SelectionDef"
+ },
+ "description": "A key-value mapping between selection names and definitions.",
+ "type": "object"
+ },
+ "spacing": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/RowCol<number>"
+ }
+ ],
+ "description": "The spacing in pixels between sub-views of the composition operator. An object of the form `{\"row\": number, \"column\": number}` can be used to set different spacing values for rows and columns.\n\n__Default value__: Depends on `\"spacing\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)"
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "$ref": "#/definitions/TitleParams"
+ }
+ ],
+ "description": "Title for the plot."
+ },
+ "transform": {
+ "description": "An array of data transformations such as filter and new field calculation.",
+ "items": {
+ "$ref": "#/definitions/Transform"
+ },
+ "type": "array"
+ },
+ "view": {
+ "$ref": "#/definitions/ViewBackground",
+ "description": "An object defining the view background's fill and stroke.\n\n__Default value:__ none (transparent)"
+ },
+ "width": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "container",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/Step"
+ }
+ ],
+ "description": "The width of a visualization.\n\n- For a plot with a continuous x-field, width should be a number. - For a plot with either a discrete x-field or no x-field, width can be either a number indicating a fixed width or an object in the form of `{step: number}` defining the width per discrete step. (No x-field is equivalent to having one discrete step.) - To enable responsive sizing on width, it should be set to `\"container\"`.\n\n__Default value:__ Based on `config.view.continuousWidth` for a plot with a continuous x-field and `config.view.discreteWidth` otherwise.\n\n__Note:__ For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the width of a single view and the `\"container\"` option cannot be used.\n\n__See also:__ [`width`](https://vega.github.io/vega-lite/docs/size.html) documentation."
+ }
+ },
+ "required": [
+ "mark"
+ ],
+ "type": "object"
+ },
+ "Field": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FieldName"
+ },
+ {
+ "$ref": "#/definitions/RepeatRef"
+ }
+ ]
+ },
+ "FieldDefWithoutScale": {
+ "$ref": "#/definitions/TypedFieldDef",
+ "description": "Field Def without scale (and without bin: \"binned\" support)."
+ },
+ "FieldEqualPredicate": {
+ "additionalProperties": false,
+ "properties": {
+ "equal": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The value that the field should be equal to."
+ },
+ "field": {
+ "$ref": "#/definitions/FieldName",
+ "description": "Field to be tested."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit for the field to be tested."
+ }
+ },
+ "required": [
+ "equal",
+ "field"
+ ],
+ "type": "object"
+ },
+ "FieldGTEPredicate": {
+ "additionalProperties": false,
+ "properties": {
+ "field": {
+ "$ref": "#/definitions/FieldName",
+ "description": "Field to be tested."
+ },
+ "gte": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The value that the field should be greater than or equals to."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit for the field to be tested."
+ }
+ },
+ "required": [
+ "field",
+ "gte"
+ ],
+ "type": "object"
+ },
+ "FieldGTPredicate": {
+ "additionalProperties": false,
+ "properties": {
+ "field": {
+ "$ref": "#/definitions/FieldName",
+ "description": "Field to be tested."
+ },
+ "gt": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The value that the field should be greater than."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit for the field to be tested."
+ }
+ },
+ "required": [
+ "field",
+ "gt"
+ ],
+ "type": "object"
+ },
+ "FieldLTEPredicate": {
+ "additionalProperties": false,
+ "properties": {
+ "field": {
+ "$ref": "#/definitions/FieldName",
+ "description": "Field to be tested."
+ },
+ "lte": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The value that the field should be less than or equals to."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit for the field to be tested."
+ }
+ },
+ "required": [
+ "field",
+ "lte"
+ ],
+ "type": "object"
+ },
+ "FieldLTPredicate": {
+ "additionalProperties": false,
+ "properties": {
+ "field": {
+ "$ref": "#/definitions/FieldName",
+ "description": "Field to be tested."
+ },
+ "lt": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The value that the field should be less than."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit for the field to be tested."
+ }
+ },
+ "required": [
+ "field",
+ "lt"
+ ],
+ "type": "object"
+ },
+ "FieldName": {
+ "type": "string"
+ },
+ "FieldOneOfPredicate": {
+ "additionalProperties": false,
+ "properties": {
+ "field": {
+ "$ref": "#/definitions/FieldName",
+ "description": "Field to be tested."
+ },
+ "oneOf": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ {
+ "items": {
+ "type": "boolean"
+ },
+ "type": "array"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/DateTime"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "A set of values that the `field`'s value should be a member of, for a data item included in the filtered data."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit for the field to be tested."
+ }
+ },
+ "required": [
+ "field",
+ "oneOf"
+ ],
+ "type": "object"
+ },
+ "FieldOrDatumDefWithCondition<DatumDef,(Gradient|string|null)>": {
+ "additionalProperties": false,
+ "description": "A FieldDef with Condition<ValueDef> { condition: {value: ...}, field: ..., ... }",
+ "properties": {
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "condition": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ "datum": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/PrimitiveValue"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/RepeatRef"
+ }
+ ],
+ "description": "A constant value in data domain."
+ },
+ "type": {
+ "$ref": "#/definitions/Type",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "type": "object"
+ },
+ "FieldOrDatumDefWithCondition<DatumDef,(string|null)>": {
+ "additionalProperties": false,
+ "description": "A FieldDef with Condition<ValueDef> { condition: {value: ...}, field: ..., ... }",
+ "properties": {
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "condition": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(string|null|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(string|null|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ "datum": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/PrimitiveValue"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/RepeatRef"
+ }
+ ],
+ "description": "A constant value in data domain."
+ },
+ "type": {
+ "$ref": "#/definitions/Type",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "type": "object"
+ },
+ "FieldOrDatumDefWithCondition<DatumDef,number>": {
+ "additionalProperties": false,
+ "description": "A FieldDef with Condition<ValueDef> { condition: {value: ...}, field: ..., ... }",
+ "properties": {
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "condition": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ "datum": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/PrimitiveValue"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/RepeatRef"
+ }
+ ],
+ "description": "A constant value in data domain."
+ },
+ "type": {
+ "$ref": "#/definitions/Type",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "type": "object"
+ },
+ "FieldOrDatumDefWithCondition<DatumDef,number[]>": {
+ "additionalProperties": false,
+ "description": "A FieldDef with Condition<ValueDef> { condition: {value: ...}, field: ..., ... }",
+ "properties": {
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "condition": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(number[]|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(number[]|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ "datum": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/PrimitiveValue"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/RepeatRef"
+ }
+ ],
+ "description": "A constant value in data domain."
+ },
+ "type": {
+ "$ref": "#/definitions/Type",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "type": "object"
+ },
+ "FieldOrDatumDefWithCondition<MarkPropFieldDef,(Gradient|string|null)>": {
+ "additionalProperties": false,
+ "description": "A FieldDef with Condition<ValueDef> { condition: {value: ...}, field: ..., ... }",
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "condition": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "legend": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Legend"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
+ },
+ "scale": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Scale"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation."
+ },
+ "sort": {
+ "$ref": "#/definitions/Sort",
+ "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following: - `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`). - `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "$ref": "#/definitions/StandardType",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "type": "object"
+ },
+ "FieldOrDatumDefWithCondition<MarkPropFieldDef,number>": {
+ "additionalProperties": false,
+ "description": "A FieldDef with Condition<ValueDef> { condition: {value: ...}, field: ..., ... }",
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "condition": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "legend": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Legend"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
+ },
+ "scale": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Scale"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation."
+ },
+ "sort": {
+ "$ref": "#/definitions/Sort",
+ "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following: - `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`). - `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "$ref": "#/definitions/StandardType",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "type": "object"
+ },
+ "FieldOrDatumDefWithCondition<MarkPropFieldDef,number[]>": {
+ "additionalProperties": false,
+ "description": "A FieldDef with Condition<ValueDef> { condition: {value: ...}, field: ..., ... }",
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "condition": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(number[]|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(number[]|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "legend": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Legend"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
+ },
+ "scale": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Scale"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation."
+ },
+ "sort": {
+ "$ref": "#/definitions/Sort",
+ "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following: - `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`). - `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "$ref": "#/definitions/StandardType",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "type": "object"
+ },
+ "FieldOrDatumDefWithCondition<MarkPropFieldDef<TypeForShape>,(string|null)>": {
+ "additionalProperties": false,
+ "description": "A FieldDef with Condition<ValueDef> { condition: {value: ...}, field: ..., ... }",
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "condition": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(string|null|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(string|null|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "legend": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Legend"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
+ },
+ "scale": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Scale"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation."
+ },
+ "sort": {
+ "$ref": "#/definitions/Sort",
+ "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following: - `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`). - `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "$ref": "#/definitions/TypeForShape",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "type": "object"
+ },
+ "FieldOrDatumDefWithCondition<StringDatumDef,Text>": {
+ "additionalProperties": false,
+ "description": "A FieldDef with Condition<ValueDef> { condition: {value: ...}, field: ..., ... }",
+ "properties": {
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "condition": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(Text|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(Text|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ "datum": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/PrimitiveValue"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/RepeatRef"
+ }
+ ],
+ "description": "A constant value in data domain."
+ },
+ "format": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/Dict<unknown>"
+ }
+ ],
+ "description": "When used with the default `\"number\"` and `\"time\"` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `\"number\"` (e.g., for quantitative fields), this is D3's [number format pattern](https://github.com/d3/d3-format#locale_format). - If the format type is `\"time\"` (e.g., for temporal fields), this is D3's [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\n\n__Default value:__ Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format."
+ },
+ "formatType": {
+ "description": "The format type for labels. One of `\"number\"`, `\"time\"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\n\n__Default value:__ - `\"time\"` for temporal fields and ordinal and nominal fields with `timeUnit`. - `\"number\"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.",
+ "type": "string"
+ },
+ "labelExpr": {
+ "description": "[Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels text.\n\n__Note:__ The label text and value can be assessed via the `label` and `value` properties of the axis's backing `datum` object.",
+ "type": "string"
+ },
+ "type": {
+ "$ref": "#/definitions/Type",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "type": "object"
+ },
+ "FieldOrDatumDefWithCondition<StringFieldDef,Text>": {
+ "additionalProperties": false,
+ "description": "A FieldDef with Condition<ValueDef> { condition: {value: ...}, field: ..., ... }",
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "const": "binned",
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "condition": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(Text|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(Text|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "format": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/Dict<unknown>"
+ }
+ ],
+ "description": "When used with the default `\"number\"` and `\"time\"` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `\"number\"` (e.g., for quantitative fields), this is D3's [number format pattern](https://github.com/d3/d3-format#locale_format). - If the format type is `\"time\"` (e.g., for temporal fields), this is D3's [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\n\n__Default value:__ Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format."
+ },
+ "formatType": {
+ "description": "The format type for labels. One of `\"number\"`, `\"time\"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\n\n__Default value:__ - `\"time\"` for temporal fields and ordinal and nominal fields with `timeUnit`. - `\"number\"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.",
+ "type": "string"
+ },
+ "labelExpr": {
+ "description": "[Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels text.\n\n__Note:__ The label text and value can be assessed via the `label` and `value` properties of the axis's backing `datum` object.",
+ "type": "string"
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "$ref": "#/definitions/StandardType",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "type": "object"
+ },
+ "FieldOrDatumDefWithCondition<StringFieldDef,string>": {
+ "additionalProperties": false,
+ "description": "A FieldDef with Condition<ValueDef> { condition: {value: ...}, field: ..., ... }",
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "const": "binned",
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "condition": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(string|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(string|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "format": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/Dict<unknown>"
+ }
+ ],
+ "description": "When used with the default `\"number\"` and `\"time\"` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `\"number\"` (e.g., for quantitative fields), this is D3's [number format pattern](https://github.com/d3/d3-format#locale_format). - If the format type is `\"time\"` (e.g., for temporal fields), this is D3's [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\n\n__Default value:__ Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format."
+ },
+ "formatType": {
+ "description": "The format type for labels. One of `\"number\"`, `\"time\"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\n\n__Default value:__ - `\"time\"` for temporal fields and ordinal and nominal fields with `timeUnit`. - `\"number\"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.",
+ "type": "string"
+ },
+ "labelExpr": {
+ "description": "[Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels text.\n\n__Note:__ The label text and value can be assessed via the `label` and `value` properties of the axis's backing `datum` object.",
+ "type": "string"
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "$ref": "#/definitions/StandardType",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "type": "object"
+ },
+ "FieldRangePredicate": {
+ "additionalProperties": false,
+ "properties": {
+ "field": {
+ "$ref": "#/definitions/FieldName",
+ "description": "Field to be tested."
+ },
+ "range": {
+ "anyOf": [
+ {
+ "items": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "An array of inclusive minimum and maximum values for a field value of a data item to be included in the filtered data.",
+ "maxItems": 2,
+ "minItems": 2
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit for the field to be tested."
+ }
+ },
+ "required": [
+ "field",
+ "range"
+ ],
+ "type": "object"
+ },
+ "FieldValidPredicate": {
+ "additionalProperties": false,
+ "properties": {
+ "field": {
+ "$ref": "#/definitions/FieldName",
+ "description": "Field to be tested."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit for the field to be tested."
+ },
+ "valid": {
+ "description": "If set to true the field's value has to be valid, meaning both not `null` and not [`NaN`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN).",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "field",
+ "valid"
+ ],
+ "type": "object"
+ },
+ "FilterTransform": {
+ "additionalProperties": false,
+ "properties": {
+ "filter": {
+ "$ref": "#/definitions/PredicateComposition",
+ "description": "The `filter` property must be a predication definition, which can take one of the following forms:\n\n1) an [expression](https://vega.github.io/vega-lite/docs/types.html#expression) string, where `datum` can be used to refer to the current data object. For example, `{filter: \"datum.b2 > 60\"}` would make the output data includes only items that have values in the field `b2` over 60.\n\n2) one of the [field predicates](https://vega.github.io/vega-lite/docs/predicate.html#field-predicate): [`equal`](https://vega.github.io/vega-lite/docs/predicate.html#field-equal-predicate), [`lt`](https://vega.github.io/vega-lite/docs/predicate.html#lt-predicate), [`lte`](https://vega.github.io/vega-lite/docs/predicate.html#lte-predicate), [`gt`](https://vega.github.io/vega-lite/docs/predicate.html#gt-predicate), [`gte`](https://vega.github.io/vega-lite/docs/predicate.html#gte-predicate), [`range`](https://vega.github.io/vega-lite/docs/predicate.html#range-predicate), [`oneOf`](https://vega.github.io/vega-lite/docs/predicate.html#one-of-predicate), or [`valid`](https://vega.github.io/vega-lite/docs/predicate.html#valid-predicate),\n\n3) a [selection predicate](https://vega.github.io/vega-lite/docs/predicate.html#selection-predicate), which define the names of a selection that the data point should belong to (or a logical composition of selections).\n\n4) a [logical composition](https://vega.github.io/vega-lite/docs/predicate.html#composition) of (1), (2), or (3)."
+ }
+ },
+ "required": [
+ "filter"
+ ],
+ "type": "object"
+ },
+ "Fit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/GeoJsonFeature"
+ },
+ {
+ "$ref": "#/definitions/GeoJsonFeatureCollection"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/GeoJsonFeature"
+ },
+ "type": "array"
+ }
+ ]
+ },
+ "FlattenTransform": {
+ "additionalProperties": false,
+ "properties": {
+ "as": {
+ "description": "The output field names for extracted array values.\n\n__Default value:__ The field name of the corresponding array field",
+ "items": {
+ "$ref": "#/definitions/FieldName"
+ },
+ "type": "array"
+ },
+ "flatten": {
+ "description": "An array of one or more data fields containing arrays to flatten. If multiple fields are specified, their array values should have a parallel structure, ideally with the same length. If the lengths of parallel arrays do not match, the longest array will be used with `null` values added for missing entries.",
+ "items": {
+ "$ref": "#/definitions/FieldName"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "flatten"
+ ],
+ "type": "object"
+ },
+ "FoldTransform": {
+ "additionalProperties": false,
+ "properties": {
+ "as": {
+ "description": "The output field names for the key and value properties produced by the fold transform. __Default value:__ `[\"key\", \"value\"]`",
+ "items": [
+ {
+ "$ref": "#/definitions/FieldName"
+ },
+ {
+ "$ref": "#/definitions/FieldName"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2,
+ "type": "array"
+ },
+ "fold": {
+ "description": "An array of data fields indicating the properties to fold.",
+ "items": {
+ "$ref": "#/definitions/FieldName"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "fold"
+ ],
+ "type": "object"
+ },
+ "FontStyle": {
+ "type": "string"
+ },
+ "FontWeight": {
+ "enum": [
+ "normal",
+ "bold",
+ "lighter",
+ "bolder",
+ 100,
+ 200,
+ 300,
+ 400,
+ 500,
+ 600,
+ 700,
+ 800,
+ 900
+ ],
+ "type": [
+ "string",
+ "number"
+ ]
+ },
+ "Generator": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SequenceGenerator"
+ },
+ {
+ "$ref": "#/definitions/SphereGenerator"
+ },
+ {
+ "$ref": "#/definitions/GraticuleGenerator"
+ }
+ ]
+ },
+ "NormalizedConcatSpec<GenericSpec>": {
+ "additionalProperties": false,
+ "description": "Base interface for a generalized concatenation specification.",
+ "properties": {
+ "align": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LayoutAlign"
+ },
+ {
+ "$ref": "#/definitions/RowCol<LayoutAlign>"
+ }
+ ],
+ "description": "The alignment to apply to grid rows and columns. The supported string values are `\"all\"`, `\"each\"`, and `\"none\"`.\n\n- For `\"none\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other. - For `\"each\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size. - For `\"all\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\nAlternatively, an object value of the form `{\"row\": string, \"column\": string}` can be used to supply different alignments for rows and columns.\n\n__Default value:__ `\"all\"`."
+ },
+ "bounds": {
+ "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used. - If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`",
+ "enum": [
+ "full",
+ "flush"
+ ],
+ "type": "string"
+ },
+ "center": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/RowCol<boolean>"
+ }
+ ],
+ "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\nAn object value of the form `{\"row\": boolean, \"column\": boolean}` can be used to supply different centering values for rows and columns.\n\n__Default value:__ `false`"
+ },
+ "columns": {
+ "description": "The number of columns to include in the view composition layout.\n\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\n\n__Note__:\n\n1) This property is only for: - the general (wrappable) `concat` operator (not `hconcat`/`vconcat`) - the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\n\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).",
+ "type": "number"
+ },
+ "concat": {
+ "description": "A list of views to be concatenated.",
+ "items": {
+ "$ref": "#/definitions/NormalizedSpec"
+ },
+ "type": "array"
+ },
+ "data": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Data"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
+ },
+ "description": {
+ "description": "Description of this mark for commenting purpose.",
+ "type": "string"
+ },
+ "name": {
+ "description": "Name of the visualization for later reference.",
+ "type": "string"
+ },
+ "resolve": {
+ "$ref": "#/definitions/Resolve",
+ "description": "Scale, axis, and legend resolutions for view composition specifications."
+ },
+ "spacing": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/RowCol<number>"
+ }
+ ],
+ "description": "The spacing in pixels between sub-views of the composition operator. An object of the form `{\"row\": number, \"column\": number}` can be used to set different spacing values for rows and columns.\n\n__Default value__: Depends on `\"spacing\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)"
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "$ref": "#/definitions/TitleParams"
+ }
+ ],
+ "description": "Title for the plot."
+ },
+ "transform": {
+ "description": "An array of data transformations such as filter and new field calculation.",
+ "items": {
+ "$ref": "#/definitions/Transform"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "concat"
+ ],
+ "type": "object"
+ },
+ "ConcatSpec<GenericSpec>": {
+ "additionalProperties": false,
+ "description": "Base interface for a generalized concatenation specification.",
+ "properties": {
+ "align": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LayoutAlign"
+ },
+ {
+ "$ref": "#/definitions/RowCol<LayoutAlign>"
+ }
+ ],
+ "description": "The alignment to apply to grid rows and columns. The supported string values are `\"all\"`, `\"each\"`, and `\"none\"`.\n\n- For `\"none\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other. - For `\"each\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size. - For `\"all\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\nAlternatively, an object value of the form `{\"row\": string, \"column\": string}` can be used to supply different alignments for rows and columns.\n\n__Default value:__ `\"all\"`."
+ },
+ "bounds": {
+ "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used. - If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`",
+ "enum": [
+ "full",
+ "flush"
+ ],
+ "type": "string"
+ },
+ "center": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/RowCol<boolean>"
+ }
+ ],
+ "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\nAn object value of the form `{\"row\": boolean, \"column\": boolean}` can be used to supply different centering values for rows and columns.\n\n__Default value:__ `false`"
+ },
+ "columns": {
+ "description": "The number of columns to include in the view composition layout.\n\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\n\n__Note__:\n\n1) This property is only for: - the general (wrappable) `concat` operator (not `hconcat`/`vconcat`) - the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\n\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).",
+ "type": "number"
+ },
+ "concat": {
+ "description": "A list of views to be concatenated.",
+ "items": {
+ "$ref": "#/definitions/Spec"
+ },
+ "type": "array"
+ },
+ "data": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Data"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
+ },
+ "description": {
+ "description": "Description of this mark for commenting purpose.",
+ "type": "string"
+ },
+ "name": {
+ "description": "Name of the visualization for later reference.",
+ "type": "string"
+ },
+ "resolve": {
+ "$ref": "#/definitions/Resolve",
+ "description": "Scale, axis, and legend resolutions for view composition specifications."
+ },
+ "spacing": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/RowCol<number>"
+ }
+ ],
+ "description": "The spacing in pixels between sub-views of the composition operator. An object of the form `{\"row\": number, \"column\": number}` can be used to set different spacing values for rows and columns.\n\n__Default value__: Depends on `\"spacing\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)"
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "$ref": "#/definitions/TitleParams"
+ }
+ ],
+ "description": "Title for the plot."
+ },
+ "transform": {
+ "description": "An array of data transformations such as filter and new field calculation.",
+ "items": {
+ "$ref": "#/definitions/Transform"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "concat"
+ ],
+ "type": "object"
+ },
+ "NormalizedFacetSpec": {
+ "additionalProperties": false,
+ "description": "Base interface for a facet specification.",
+ "properties": {
+ "align": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LayoutAlign"
+ },
+ {
+ "$ref": "#/definitions/RowCol<LayoutAlign>"
+ }
+ ],
+ "description": "The alignment to apply to grid rows and columns. The supported string values are `\"all\"`, `\"each\"`, and `\"none\"`.\n\n- For `\"none\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other. - For `\"each\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size. - For `\"all\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\nAlternatively, an object value of the form `{\"row\": string, \"column\": string}` can be used to supply different alignments for rows and columns.\n\n__Default value:__ `\"all\"`."
+ },
+ "bounds": {
+ "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used. - If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`",
+ "enum": [
+ "full",
+ "flush"
+ ],
+ "type": "string"
+ },
+ "center": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/RowCol<boolean>"
+ }
+ ],
+ "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\nAn object value of the form `{\"row\": boolean, \"column\": boolean}` can be used to supply different centering values for rows and columns.\n\n__Default value:__ `false`"
+ },
+ "columns": {
+ "description": "The number of columns to include in the view composition layout.\n\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\n\n__Note__:\n\n1) This property is only for: - the general (wrappable) `concat` operator (not `hconcat`/`vconcat`) - the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\n\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).",
+ "type": "number"
+ },
+ "data": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Data"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
+ },
+ "description": {
+ "description": "Description of this mark for commenting purpose.",
+ "type": "string"
+ },
+ "facet": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FacetFieldDef"
+ },
+ {
+ "$ref": "#/definitions/FacetMapping"
+ }
+ ],
+ "description": "Definition for how to facet the data. One of: 1) [a field definition for faceting the plot by one field](https://vega.github.io/vega-lite/docs/facet.html#field-def) 2) [An object that maps `row` and `column` channels to their field definitions](https://vega.github.io/vega-lite/docs/facet.html#mapping)"
+ },
+ "name": {
+ "description": "Name of the visualization for later reference.",
+ "type": "string"
+ },
+ "resolve": {
+ "$ref": "#/definitions/Resolve",
+ "description": "Scale, axis, and legend resolutions for view composition specifications."
+ },
+ "spacing": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/RowCol<number>"
+ }
+ ],
+ "description": "The spacing in pixels between sub-views of the composition operator. An object of the form `{\"row\": number, \"column\": number}` can be used to set different spacing values for rows and columns.\n\n__Default value__: Depends on `\"spacing\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)"
+ },
+ "spec": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LayerSpec"
+ },
+ {
+ "$ref": "#/definitions/FacetedUnitSpec"
+ }
+ ],
+ "description": "A specification of the view that gets faceted."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "$ref": "#/definitions/TitleParams"
+ }
+ ],
+ "description": "Title for the plot."
+ },
+ "transform": {
+ "description": "An array of data transformations such as filter and new field calculation.",
+ "items": {
+ "$ref": "#/definitions/Transform"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "facet",
+ "spec"
+ ],
+ "type": "object"
+ },
+ "FacetSpec": {
+ "additionalProperties": false,
+ "description": "Base interface for a facet specification.",
+ "properties": {
+ "align": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LayoutAlign"
+ },
+ {
+ "$ref": "#/definitions/RowCol<LayoutAlign>"
+ }
+ ],
+ "description": "The alignment to apply to grid rows and columns. The supported string values are `\"all\"`, `\"each\"`, and `\"none\"`.\n\n- For `\"none\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other. - For `\"each\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size. - For `\"all\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\nAlternatively, an object value of the form `{\"row\": string, \"column\": string}` can be used to supply different alignments for rows and columns.\n\n__Default value:__ `\"all\"`."
+ },
+ "bounds": {
+ "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used. - If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`",
+ "enum": [
+ "full",
+ "flush"
+ ],
+ "type": "string"
+ },
+ "center": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/RowCol<boolean>"
+ }
+ ],
+ "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\nAn object value of the form `{\"row\": boolean, \"column\": boolean}` can be used to supply different centering values for rows and columns.\n\n__Default value:__ `false`"
+ },
+ "columns": {
+ "description": "The number of columns to include in the view composition layout.\n\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\n\n__Note__:\n\n1) This property is only for: - the general (wrappable) `concat` operator (not `hconcat`/`vconcat`) - the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\n\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).",
+ "type": "number"
+ },
+ "data": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Data"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
+ },
+ "description": {
+ "description": "Description of this mark for commenting purpose.",
+ "type": "string"
+ },
+ "facet": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FacetFieldDef<FieldName>"
+ },
+ {
+ "$ref": "#/definitions/FacetMapping<FieldName>"
+ }
+ ],
+ "description": "Definition for how to facet the data. One of: 1) [a field definition for faceting the plot by one field](https://vega.github.io/vega-lite/docs/facet.html#field-def) 2) [An object that maps `row` and `column` channels to their field definitions](https://vega.github.io/vega-lite/docs/facet.html#mapping)"
+ },
+ "name": {
+ "description": "Name of the visualization for later reference.",
+ "type": "string"
+ },
+ "resolve": {
+ "$ref": "#/definitions/Resolve",
+ "description": "Scale, axis, and legend resolutions for view composition specifications."
+ },
+ "spacing": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/RowCol<number>"
+ }
+ ],
+ "description": "The spacing in pixels between sub-views of the composition operator. An object of the form `{\"row\": number, \"column\": number}` can be used to set different spacing values for rows and columns.\n\n__Default value__: Depends on `\"spacing\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)"
+ },
+ "spec": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LayerSpec"
+ },
+ {
+ "$ref": "#/definitions/FacetedUnitSpec"
+ }
+ ],
+ "description": "A specification of the view that gets faceted."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "$ref": "#/definitions/TitleParams"
+ }
+ ],
+ "description": "Title for the plot."
+ },
+ "transform": {
+ "description": "An array of data transformations such as filter and new field calculation.",
+ "items": {
+ "$ref": "#/definitions/Transform"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "facet",
+ "spec"
+ ],
+ "type": "object"
+ },
+ "NormalizedHConcatSpec<GenericSpec>": {
+ "additionalProperties": false,
+ "description": "Base interface for a horizontal concatenation specification.",
+ "properties": {
+ "bounds": {
+ "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used. - If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`",
+ "enum": [
+ "full",
+ "flush"
+ ],
+ "type": "string"
+ },
+ "center": {
+ "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\n__Default value:__ `false`",
+ "type": "boolean"
+ },
+ "data": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Data"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
+ },
+ "description": {
+ "description": "Description of this mark for commenting purpose.",
+ "type": "string"
+ },
+ "hconcat": {
+ "description": "A list of views to be concatenated and put into a row.",
+ "items": {
+ "$ref": "#/definitions/NormalizedSpec"
+ },
+ "type": "array"
+ },
+ "name": {
+ "description": "Name of the visualization for later reference.",
+ "type": "string"
+ },
+ "resolve": {
+ "$ref": "#/definitions/Resolve",
+ "description": "Scale, axis, and legend resolutions for view composition specifications."
+ },
+ "spacing": {
+ "description": "The spacing in pixels between sub-views of the concat operator.\n\n__Default value__: `10`",
+ "type": "number"
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "$ref": "#/definitions/TitleParams"
+ }
+ ],
+ "description": "Title for the plot."
+ },
+ "transform": {
+ "description": "An array of data transformations such as filter and new field calculation.",
+ "items": {
+ "$ref": "#/definitions/Transform"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "hconcat"
+ ],
+ "type": "object"
+ },
+ "HConcatSpec<GenericSpec>": {
+ "additionalProperties": false,
+ "description": "Base interface for a horizontal concatenation specification.",
+ "properties": {
+ "bounds": {
+ "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used. - If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`",
+ "enum": [
+ "full",
+ "flush"
+ ],
+ "type": "string"
+ },
+ "center": {
+ "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\n__Default value:__ `false`",
+ "type": "boolean"
+ },
+ "data": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Data"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
+ },
+ "description": {
+ "description": "Description of this mark for commenting purpose.",
+ "type": "string"
+ },
+ "hconcat": {
+ "description": "A list of views to be concatenated and put into a row.",
+ "items": {
+ "$ref": "#/definitions/Spec"
+ },
+ "type": "array"
+ },
+ "name": {
+ "description": "Name of the visualization for later reference.",
+ "type": "string"
+ },
+ "resolve": {
+ "$ref": "#/definitions/Resolve",
+ "description": "Scale, axis, and legend resolutions for view composition specifications."
+ },
+ "spacing": {
+ "description": "The spacing in pixels between sub-views of the concat operator.\n\n__Default value__: `10`",
+ "type": "number"
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "$ref": "#/definitions/TitleParams"
+ }
+ ],
+ "description": "Title for the plot."
+ },
+ "transform": {
+ "description": "An array of data transformations such as filter and new field calculation.",
+ "items": {
+ "$ref": "#/definitions/Transform"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "hconcat"
+ ],
+ "type": "object"
+ },
+ "NormalizedSpec": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FacetedUnitSpec"
+ },
+ {
+ "$ref": "#/definitions/LayerSpec"
+ },
+ {
+ "$ref": "#/definitions/RepeatSpec"
+ },
+ {
+ "$ref": "#/definitions/NormalizedFacetSpec"
+ },
+ {
+ "$ref": "#/definitions/NormalizedConcatSpec<GenericSpec>"
+ },
+ {
+ "$ref": "#/definitions/NormalizedVConcatSpec<GenericSpec>"
+ },
+ {
+ "$ref": "#/definitions/NormalizedHConcatSpec<GenericSpec>"
+ }
+ ],
+ "description": "Any specification in Vega-Lite."
+ },
+ "Spec": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FacetedUnitSpec"
+ },
+ {
+ "$ref": "#/definitions/LayerSpec"
+ },
+ {
+ "$ref": "#/definitions/RepeatSpec"
+ },
+ {
+ "$ref": "#/definitions/FacetSpec"
+ },
+ {
+ "$ref": "#/definitions/ConcatSpec<GenericSpec>"
+ },
+ {
+ "$ref": "#/definitions/VConcatSpec<GenericSpec>"
+ },
+ {
+ "$ref": "#/definitions/HConcatSpec<GenericSpec>"
+ }
+ ],
+ "description": "Any specification in Vega-Lite."
+ },
+ "NormalizedVConcatSpec<GenericSpec>": {
+ "additionalProperties": false,
+ "description": "Base interface for a vertical concatenation specification.",
+ "properties": {
+ "bounds": {
+ "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used. - If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`",
+ "enum": [
+ "full",
+ "flush"
+ ],
+ "type": "string"
+ },
+ "center": {
+ "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\n__Default value:__ `false`",
+ "type": "boolean"
+ },
+ "data": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Data"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
+ },
+ "description": {
+ "description": "Description of this mark for commenting purpose.",
+ "type": "string"
+ },
+ "name": {
+ "description": "Name of the visualization for later reference.",
+ "type": "string"
+ },
+ "resolve": {
+ "$ref": "#/definitions/Resolve",
+ "description": "Scale, axis, and legend resolutions for view composition specifications."
+ },
+ "spacing": {
+ "description": "The spacing in pixels between sub-views of the concat operator.\n\n__Default value__: `10`",
+ "type": "number"
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "$ref": "#/definitions/TitleParams"
+ }
+ ],
+ "description": "Title for the plot."
+ },
+ "transform": {
+ "description": "An array of data transformations such as filter and new field calculation.",
+ "items": {
+ "$ref": "#/definitions/Transform"
+ },
+ "type": "array"
+ },
+ "vconcat": {
+ "description": "A list of views to be concatenated and put into a column.",
+ "items": {
+ "$ref": "#/definitions/NormalizedSpec"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "vconcat"
+ ],
+ "type": "object"
+ },
+ "VConcatSpec<GenericSpec>": {
+ "additionalProperties": false,
+ "description": "Base interface for a vertical concatenation specification.",
+ "properties": {
+ "bounds": {
+ "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used. - If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`",
+ "enum": [
+ "full",
+ "flush"
+ ],
+ "type": "string"
+ },
+ "center": {
+ "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\n__Default value:__ `false`",
+ "type": "boolean"
+ },
+ "data": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Data"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
+ },
+ "description": {
+ "description": "Description of this mark for commenting purpose.",
+ "type": "string"
+ },
+ "name": {
+ "description": "Name of the visualization for later reference.",
+ "type": "string"
+ },
+ "resolve": {
+ "$ref": "#/definitions/Resolve",
+ "description": "Scale, axis, and legend resolutions for view composition specifications."
+ },
+ "spacing": {
+ "description": "The spacing in pixels between sub-views of the concat operator.\n\n__Default value__: `10`",
+ "type": "number"
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "$ref": "#/definitions/TitleParams"
+ }
+ ],
+ "description": "Title for the plot."
+ },
+ "transform": {
+ "description": "An array of data transformations such as filter and new field calculation.",
+ "items": {
+ "$ref": "#/definitions/Transform"
+ },
+ "type": "array"
+ },
+ "vconcat": {
+ "description": "A list of views to be concatenated and put into a column.",
+ "items": {
+ "$ref": "#/definitions/Spec"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "vconcat"
+ ],
+ "type": "object"
+ },
+ "GeoJsonFeature": {
+ },
+ "GeoJsonFeatureCollection": {
+ },
+ "Gradient": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LinearGradient"
+ },
+ {
+ "$ref": "#/definitions/RadialGradient"
+ }
+ ]
+ },
+ "GradientStop": {
+ "additionalProperties": false,
+ "properties": {
+ "color": {
+ "$ref": "#/definitions/Color",
+ "description": "The color value at this point in the gradient."
+ },
+ "offset": {
+ "description": "The offset fraction for the color stop, indicating its position within the gradient.",
+ "type": "number"
+ }
+ },
+ "required": [
+ "offset",
+ "color"
+ ],
+ "type": "object"
+ },
+ "GraticuleGenerator": {
+ "additionalProperties": false,
+ "properties": {
+ "graticule": {
+ "anyOf": [
+ {
+ "const": true,
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/GraticuleParams"
+ }
+ ],
+ "description": "Generate graticule GeoJSON data for geographic reference lines."
+ },
+ "name": {
+ "description": "Provide a placeholder name and bind data at runtime.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "graticule"
+ ],
+ "type": "object"
+ },
+ "GraticuleParams": {
+ "additionalProperties": false,
+ "properties": {
+ "extent": {
+ "$ref": "#/definitions/Vector2<Vector2<number>>",
+ "description": "Sets both the major and minor extents to the same values."
+ },
+ "extentMajor": {
+ "$ref": "#/definitions/Vector2<Vector2<number>>",
+ "description": "The major extent of the graticule as a two-element array of coordinates."
+ },
+ "extentMinor": {
+ "$ref": "#/definitions/Vector2<Vector2<number>>",
+ "description": "The minor extent of the graticule as a two-element array of coordinates."
+ },
+ "precision": {
+ "description": "The precision of the graticule in degrees.\n\n__Default value:__ `2.5`",
+ "type": "number"
+ },
+ "step": {
+ "$ref": "#/definitions/Vector2<number>",
+ "description": "Sets both the major and minor step angles to the same values."
+ },
+ "stepMajor": {
+ "$ref": "#/definitions/Vector2<number>",
+ "description": "The major step angles of the graticule.\n\n\n__Default value:__ `[90, 360]`"
+ },
+ "stepMinor": {
+ "$ref": "#/definitions/Vector2<number>",
+ "description": "The minor step angles of the graticule.\n\n__Default value:__ `[10, 10]`"
+ }
+ },
+ "type": "object"
+ },
+ "Header": {
+ "additionalProperties": false,
+ "description": "Headers of row / column channels for faceted plots.",
+ "properties": {
+ "format": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/Dict<unknown>"
+ }
+ ],
+ "description": "When used with the default `\"number\"` and `\"time\"` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `\"number\"` (e.g., for quantitative fields), this is D3's [number format pattern](https://github.com/d3/d3-format#locale_format). - If the format type is `\"time\"` (e.g., for temporal fields), this is D3's [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\n\n__Default value:__ Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format."
+ },
+ "formatType": {
+ "description": "The format type for labels. One of `\"number\"`, `\"time\"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\n\n__Default value:__ - `\"time\"` for temporal fields and ordinal and nominal fields with `timeUnit`. - `\"number\"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.",
+ "type": "string"
+ },
+ "labelAlign": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Align"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Horizontal text alignment of header labels. One of `\"left\"`, `\"center\"`, or `\"right\"`."
+ },
+ "labelAnchor": {
+ "$ref": "#/definitions/TitleAnchor",
+ "description": "The anchor position for placing the labels. One of `\"start\"`, `\"middle\"`, or `\"end\"`. For example, with a label orientation of top these anchor positions map to a left-, center-, or right-aligned label."
+ },
+ "labelAngle": {
+ "description": "The rotation angle of the header labels.\n\n__Default value:__ `0` for column header, `-90` for row header.",
+ "maximum": 360,
+ "minimum": -360,
+ "type": "number"
+ },
+ "labelBaseline": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TextBaseline"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The vertical text baseline for the header labels. One of `\"alphabetic\"` (default), `\"top\"`, `\"middle\"`, `\"bottom\"`, `\"line-top\"`, or `\"line-bottom\"`. The `\"line-top\"` and `\"line-bottom\"` values operate similarly to `\"top\"` and `\"bottom\"`, but are calculated relative to the `titleLineHeight` rather than `titleFontSize` alone."
+ },
+ "labelColor": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The color of the header label, can be in hex color code or regular color name."
+ },
+ "labelExpr": {
+ "description": "[Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels.\n\n__Note:__ The label text and value can be assessed via the `label` and `value` properties of the header's backing `datum` object.",
+ "type": "string"
+ },
+ "labelFont": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The font of the header label."
+ },
+ "labelFontSize": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The font size of the header label, in pixels.",
+ "minimum": 0
+ },
+ "labelFontStyle": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontStyle"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The font style of the header label."
+ },
+ "labelFontWeight": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontWeight"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The font weight of the header label."
+ },
+ "labelLimit": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The maximum length of the header label in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0`, indicating no limit"
+ },
+ "labelLineHeight": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Line height in pixels for multi-line header labels or title text with `\"line-top\"` or `\"line-bottom\"` baseline."
+ },
+ "labelOrient": {
+ "$ref": "#/definitions/Orient",
+ "description": "The orientation of the header label. One of `\"top\"`, `\"bottom\"`, `\"left\"` or `\"right\"`."
+ },
+ "labelPadding": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The padding, in pixel, between facet header's label and the plot.\n\n__Default value:__ `10`"
+ },
+ "labels": {
+ "description": "A boolean flag indicating if labels should be included as part of the header.\n\n__Default value:__ `true`.",
+ "type": "boolean"
+ },
+ "orient": {
+ "$ref": "#/definitions/Orient",
+ "description": "Shortcut for setting both labelOrient and titleOrient."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "titleAlign": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Align"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Horizontal text alignment (to the anchor) of header titles."
+ },
+ "titleAnchor": {
+ "$ref": "#/definitions/TitleAnchor",
+ "description": "The anchor position for placing the title. One of `\"start\"`, `\"middle\"`, or `\"end\"`. For example, with an orientation of top these anchor positions map to a left-, center-, or right-aligned title."
+ },
+ "titleAngle": {
+ "description": "The rotation angle of the header title.\n\n__Default value:__ `0`.",
+ "maximum": 360,
+ "minimum": -360,
+ "type": "number"
+ },
+ "titleBaseline": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TextBaseline"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The vertical text baseline for the header title. One of `\"alphabetic\"` (default), `\"top\"`, `\"middle\"`, `\"bottom\"`, `\"line-top\"`, or `\"line-bottom\"`. The `\"line-top\"` and `\"line-bottom\"` values operate similarly to `\"top\"` and `\"bottom\"`, but are calculated relative to the `titleLineHeight` rather than `titleFontSize` alone.\n\n__Default value:__ `\"middle\"`"
+ },
+ "titleColor": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Color of the header title, can be in hex color code or regular color name."
+ },
+ "titleFont": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Font of the header title. (e.g., `\"Helvetica Neue\"`)."
+ },
+ "titleFontSize": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Font size of the header title.",
+ "minimum": 0
+ },
+ "titleFontStyle": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontStyle"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The font style of the header title."
+ },
+ "titleFontWeight": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontWeight"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Font weight of the header title. This can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)."
+ },
+ "titleLimit": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The maximum length of the header title in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0`, indicating no limit"
+ },
+ "titleLineHeight": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Line height in pixels for multi-line header title text or title text with `\"line-top\"` or `\"line-bottom\"` baseline."
+ },
+ "titleOrient": {
+ "$ref": "#/definitions/Orient",
+ "description": "The orientation of the header title. One of `\"top\"`, `\"bottom\"`, `\"left\"` or `\"right\"`."
+ },
+ "titlePadding": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The padding, in pixel, between facet header's title and the label.\n\n__Default value:__ `10`"
+ }
+ },
+ "type": "object"
+ },
+ "HeaderConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "format": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/Dict<unknown>"
+ }
+ ],
+ "description": "When used with the default `\"number\"` and `\"time\"` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `\"number\"` (e.g., for quantitative fields), this is D3's [number format pattern](https://github.com/d3/d3-format#locale_format). - If the format type is `\"time\"` (e.g., for temporal fields), this is D3's [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\n\n__Default value:__ Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format."
+ },
+ "formatType": {
+ "description": "The format type for labels. One of `\"number\"`, `\"time\"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\n\n__Default value:__ - `\"time\"` for temporal fields and ordinal and nominal fields with `timeUnit`. - `\"number\"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.",
+ "type": "string"
+ },
+ "labelAlign": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Align"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Horizontal text alignment of header labels. One of `\"left\"`, `\"center\"`, or `\"right\"`."
+ },
+ "labelAnchor": {
+ "$ref": "#/definitions/TitleAnchor",
+ "description": "The anchor position for placing the labels. One of `\"start\"`, `\"middle\"`, or `\"end\"`. For example, with a label orientation of top these anchor positions map to a left-, center-, or right-aligned label."
+ },
+ "labelAngle": {
+ "description": "The rotation angle of the header labels.\n\n__Default value:__ `0` for column header, `-90` for row header.",
+ "maximum": 360,
+ "minimum": -360,
+ "type": "number"
+ },
+ "labelBaseline": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TextBaseline"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The vertical text baseline for the header labels. One of `\"alphabetic\"` (default), `\"top\"`, `\"middle\"`, `\"bottom\"`, `\"line-top\"`, or `\"line-bottom\"`. The `\"line-top\"` and `\"line-bottom\"` values operate similarly to `\"top\"` and `\"bottom\"`, but are calculated relative to the `titleLineHeight` rather than `titleFontSize` alone."
+ },
+ "labelColor": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The color of the header label, can be in hex color code or regular color name."
+ },
+ "labelExpr": {
+ "description": "[Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels.\n\n__Note:__ The label text and value can be assessed via the `label` and `value` properties of the header's backing `datum` object.",
+ "type": "string"
+ },
+ "labelFont": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The font of the header label."
+ },
+ "labelFontSize": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The font size of the header label, in pixels.",
+ "minimum": 0
+ },
+ "labelFontStyle": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontStyle"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The font style of the header label."
+ },
+ "labelFontWeight": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontWeight"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The font weight of the header label."
+ },
+ "labelLimit": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The maximum length of the header label in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0`, indicating no limit"
+ },
+ "labelLineHeight": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Line height in pixels for multi-line header labels or title text with `\"line-top\"` or `\"line-bottom\"` baseline."
+ },
+ "labelOrient": {
+ "$ref": "#/definitions/Orient",
+ "description": "The orientation of the header label. One of `\"top\"`, `\"bottom\"`, `\"left\"` or `\"right\"`."
+ },
+ "labelPadding": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The padding, in pixel, between facet header's label and the plot.\n\n__Default value:__ `10`"
+ },
+ "labels": {
+ "description": "A boolean flag indicating if labels should be included as part of the header.\n\n__Default value:__ `true`.",
+ "type": "boolean"
+ },
+ "orient": {
+ "$ref": "#/definitions/Orient",
+ "description": "Shortcut for setting both labelOrient and titleOrient."
+ },
+ "title": {
+ "description": "Set to null to disable title for the axis, legend, or header.",
+ "type": "null"
+ },
+ "titleAlign": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Align"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Horizontal text alignment (to the anchor) of header titles."
+ },
+ "titleAnchor": {
+ "$ref": "#/definitions/TitleAnchor",
+ "description": "The anchor position for placing the title. One of `\"start\"`, `\"middle\"`, or `\"end\"`. For example, with an orientation of top these anchor positions map to a left-, center-, or right-aligned title."
+ },
+ "titleAngle": {
+ "description": "The rotation angle of the header title.\n\n__Default value:__ `0`.",
+ "maximum": 360,
+ "minimum": -360,
+ "type": "number"
+ },
+ "titleBaseline": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TextBaseline"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The vertical text baseline for the header title. One of `\"alphabetic\"` (default), `\"top\"`, `\"middle\"`, `\"bottom\"`, `\"line-top\"`, or `\"line-bottom\"`. The `\"line-top\"` and `\"line-bottom\"` values operate similarly to `\"top\"` and `\"bottom\"`, but are calculated relative to the `titleLineHeight` rather than `titleFontSize` alone.\n\n__Default value:__ `\"middle\"`"
+ },
+ "titleColor": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Color of the header title, can be in hex color code or regular color name."
+ },
+ "titleFont": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Font of the header title. (e.g., `\"Helvetica Neue\"`)."
+ },
+ "titleFontSize": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Font size of the header title.",
+ "minimum": 0
+ },
+ "titleFontStyle": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontStyle"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The font style of the header title."
+ },
+ "titleFontWeight": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontWeight"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Font weight of the header title. This can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)."
+ },
+ "titleLimit": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The maximum length of the header title in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0`, indicating no limit"
+ },
+ "titleLineHeight": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Line height in pixels for multi-line header title text or title text with `\"line-top\"` or `\"line-bottom\"` baseline."
+ },
+ "titleOrient": {
+ "$ref": "#/definitions/Orient",
+ "description": "The orientation of the header title. One of `\"top\"`, `\"bottom\"`, `\"left\"` or `\"right\"`."
+ },
+ "titlePadding": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The padding, in pixel, between facet header's title and the label.\n\n__Default value:__ `10`"
+ }
+ },
+ "type": "object"
+ },
+ "HexColor": {
+ "format": "color-hex",
+ "type": "string"
+ },
+ "ImputeMethod": {
+ "enum": [
+ "value",
+ "median",
+ "max",
+ "min",
+ "mean"
+ ],
+ "type": "string"
+ },
+ "ImputeParams": {
+ "additionalProperties": false,
+ "properties": {
+ "frame": {
+ "description": "A frame specification as a two-element array used to control the window over which the specified method is applied. The array entries should either be a number indicating the offset from the current data object, or null to indicate unbounded rows preceding or following the current data object. For example, the value `[-5, 5]` indicates that the window should include five objects preceding and five objects following the current object.\n\n__Default value:__: `[null, null]` indicating that the window includes all objects.",
+ "items": [
+ {
+ "type": [
+ "null",
+ "number"
+ ]
+ },
+ {
+ "type": [
+ "null",
+ "number"
+ ]
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2,
+ "type": "array"
+ },
+ "keyvals": {
+ "anyOf": [
+ {
+ "items": {
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/ImputeSequence"
+ }
+ ],
+ "description": "Defines the key values that should be considered for imputation. An array of key values or an object defining a [number sequence](https://vega.github.io/vega-lite/docs/impute.html#sequence-def).\n\nIf provided, this will be used in addition to the key values observed within the input data. If not provided, the values will be derived from all unique values of the `key` field. For `impute` in `encoding`, the key field is the x-field if the y-field is imputed, or vice versa.\n\nIf there is no impute grouping, this property _must_ be specified."
+ },
+ "method": {
+ "$ref": "#/definitions/ImputeMethod",
+ "description": "The imputation method to use for the field value of imputed data objects. One of `\"value\"`, `\"mean\"`, `\"median\"`, `\"max\"` or `\"min\"`.\n\n__Default value:__ `\"value\"`"
+ },
+ "value": {
+ "description": "The field value to use when the imputation `method` is `\"value\"`."
+ }
+ },
+ "type": "object"
+ },
+ "ImputeSequence": {
+ "additionalProperties": false,
+ "properties": {
+ "start": {
+ "description": "The starting value of the sequence. __Default value:__ `0`",
+ "type": "number"
+ },
+ "step": {
+ "description": "The step value between sequence entries. __Default value:__ `1` or `-1` if `stop < start`",
+ "type": "number"
+ },
+ "stop": {
+ "description": "The ending value(exclusive) of the sequence.",
+ "type": "number"
+ }
+ },
+ "required": [
+ "stop"
+ ],
+ "type": "object"
+ },
+ "ImputeTransform": {
+ "additionalProperties": false,
+ "properties": {
+ "frame": {
+ "description": "A frame specification as a two-element array used to control the window over which the specified method is applied. The array entries should either be a number indicating the offset from the current data object, or null to indicate unbounded rows preceding or following the current data object. For example, the value `[-5, 5]` indicates that the window should include five objects preceding and five objects following the current object.\n\n__Default value:__: `[null, null]` indicating that the window includes all objects.",
+ "items": [
+ {
+ "type": [
+ "null",
+ "number"
+ ]
+ },
+ {
+ "type": [
+ "null",
+ "number"
+ ]
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2,
+ "type": "array"
+ },
+ "groupby": {
+ "description": "An optional array of fields by which to group the values. Imputation will then be performed on a per-group basis.",
+ "items": {
+ "$ref": "#/definitions/FieldName"
+ },
+ "type": "array"
+ },
+ "impute": {
+ "$ref": "#/definitions/FieldName",
+ "description": "The data field for which the missing values should be imputed."
+ },
+ "key": {
+ "$ref": "#/definitions/FieldName",
+ "description": "A key field that uniquely identifies data objects within a group. Missing key values (those occurring in the data but not in the current group) will be imputed."
+ },
+ "keyvals": {
+ "anyOf": [
+ {
+ "items": {
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/ImputeSequence"
+ }
+ ],
+ "description": "Defines the key values that should be considered for imputation. An array of key values or an object defining a [number sequence](https://vega.github.io/vega-lite/docs/impute.html#sequence-def).\n\nIf provided, this will be used in addition to the key values observed within the input data. If not provided, the values will be derived from all unique values of the `key` field. For `impute` in `encoding`, the key field is the x-field if the y-field is imputed, or vice versa.\n\nIf there is no impute grouping, this property _must_ be specified."
+ },
+ "method": {
+ "$ref": "#/definitions/ImputeMethod",
+ "description": "The imputation method to use for the field value of imputed data objects. One of `\"value\"`, `\"mean\"`, `\"median\"`, `\"max\"` or `\"min\"`.\n\n__Default value:__ `\"value\"`"
+ },
+ "value": {
+ "description": "The field value to use when the imputation `method` is `\"value\"`."
+ }
+ },
+ "required": [
+ "impute",
+ "key"
+ ],
+ "type": "object"
+ },
+ "InlineData": {
+ "additionalProperties": false,
+ "properties": {
+ "format": {
+ "$ref": "#/definitions/DataFormat",
+ "description": "An object that specifies the format for parsing the data."
+ },
+ "name": {
+ "description": "Provide a placeholder name and bind data at runtime.",
+ "type": "string"
+ },
+ "values": {
+ "$ref": "#/definitions/InlineDataset",
+ "description": "The full data set, included inline. This can be an array of objects or primitive values, an object, or a string. Arrays of primitive values are ingested as objects with a `data` property. Strings are parsed according to the specified format type."
+ }
+ },
+ "required": [
+ "values"
+ ],
+ "type": "object"
+ },
+ "InlineDataset": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "items": {
+ "type": "boolean"
+ },
+ "type": "array"
+ },
+ {
+ "items": {
+ "type": "object"
+ },
+ "type": "array"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "object"
+ }
+ ]
+ },
+ "InputBinding": {
+ "additionalProperties": false,
+ "properties": {
+ "autocomplete": {
+ "type": "string"
+ },
+ "debounce": {
+ "type": "number"
+ },
+ "element": {
+ "$ref": "#/definitions/Element"
+ },
+ "input": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "placeholder": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "Interpolate": {
+ "enum": [
+ "basis",
+ "basis-open",
+ "basis-closed",
+ "bundle",
+ "cardinal",
+ "cardinal-open",
+ "cardinal-closed",
+ "catmull-rom",
+ "linear",
+ "linear-closed",
+ "monotone",
+ "natural",
+ "step",
+ "step-before",
+ "step-after"
+ ],
+ "maximum": 900,
+ "minimum": 100,
+ "type": "string"
+ },
+ "IntervalSelection": {
+ "additionalProperties": false,
+ "properties": {
+ "bind": {
+ "const": "scales",
+ "description": "Establishes a two-way binding between the interval selection and the scales used within the same view. This allows a user to interactively pan and zoom the view.\n\n__See also:__ [`bind`](https://vega.github.io/vega-lite/docs/bind.html) documentation.",
+ "type": "string"
+ },
+ "clear": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Stream"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "description": "Clears the selection, emptying it of all values. Can be a [Event Stream](https://vega.github.io/vega/docs/event-streams/) or `false` to disable.\n\n__Default value:__ `dblclick`.\n\n__See also:__ [`clear`](https://vega.github.io/vega-lite/docs/clear.html) documentation."
+ },
+ "empty": {
+ "description": "By default, `all` data values are considered to lie within an empty selection. When set to `none`, empty selections contain no data values.",
+ "enum": [
+ "all",
+ "none"
+ ],
+ "type": "string"
+ },
+ "encodings": {
+ "description": "An array of encoding channels. The corresponding data field values must match for a data tuple to fall within the selection.\n\n__See also:__ [`encodings`](https://vega.github.io/vega-lite/docs/project.html) documentation.",
+ "items": {
+ "$ref": "#/definitions/SingleDefUnitChannel"
+ },
+ "type": "array"
+ },
+ "fields": {
+ "description": "An array of field names whose values must match for a data tuple to fall within the selection.\n\n__See also:__ [`fields`](https://vega.github.io/vega-lite/docs/project.html) documentation.",
+ "items": {
+ "$ref": "#/definitions/FieldName"
+ },
+ "type": "array"
+ },
+ "init": {
+ "$ref": "#/definitions/SelectionInitIntervalMapping",
+ "description": "Initialize the selection with a mapping between [projected channels or field names](https://vega.github.io/vega-lite/docs/project.html) and arrays of initial values.\n\n__See also:__ [`init`](https://vega.github.io/vega-lite/docs/init.html) documentation."
+ },
+ "mark": {
+ "$ref": "#/definitions/BrushConfig",
+ "description": "An interval selection also adds a rectangle mark to depict the extents of the interval. The `mark` property can be used to customize the appearance of the mark.\n\n__See also:__ [`mark`](https://vega.github.io/vega-lite/docs/selection-mark.html) documentation."
+ },
+ "on": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Stream"
+ },
+ {
+ "type": "string"
+ }
+ ],
+ "description": "A [Vega event stream](https://vega.github.io/vega/docs/event-streams/) (object or selector) that triggers the selection. For interval selections, the event stream must specify a [start and end](https://vega.github.io/vega/docs/event-streams/#between-filters)."
+ },
+ "resolve": {
+ "$ref": "#/definitions/SelectionResolution",
+ "description": "With layered and multi-view displays, a strategy that determines how selections' data queries are resolved when applied in a filter transform, conditional encoding rule, or scale domain.\n\n__See also:__ [`resolve`](https://vega.github.io/vega-lite/docs/selection-resolve.html) documentation."
+ },
+ "translate": {
+ "description": "When truthy, allows a user to interactively move an interval selection back-and-forth. Can be `true`, `false` (to disable panning), or a [Vega event stream definition](https://vega.github.io/vega/docs/event-streams/) which must include a start and end event to trigger continuous panning.\n\n__Default value:__ `true`, which corresponds to `[mousedown, window:mouseup] > window:mousemove!` which corresponds to clicks and dragging within an interval selection to reposition it.\n\n__See also:__ [`translate`](https://vega.github.io/vega-lite/docs/translate.html) documentation.",
+ "type": [
+ "string",
+ "boolean"
+ ]
+ },
+ "type": {
+ "const": "interval",
+ "description": "Determines the default event processing and data query for the selection. Vega-Lite currently supports three selection types:\n\n- `\"single\"` -- to select a single discrete data value on `click`. - `\"multi\"` -- to select multiple discrete data value; the first value is selected on `click` and additional values toggled on shift-`click`. - `\"interval\"` -- to select a continuous range of data values on `drag`.",
+ "type": "string"
+ },
+ "zoom": {
+ "description": "When truthy, allows a user to interactively resize an interval selection. Can be `true`, `false` (to disable zooming), or a [Vega event stream definition](https://vega.github.io/vega/docs/event-streams/). Currently, only `wheel` events are supported.\n\n__Default value:__ `true`, which corresponds to `wheel!`.\n\n__See also:__ [`zoom`](https://vega.github.io/vega-lite/docs/zoom.html) documentation.",
+ "type": [
+ "string",
+ "boolean"
+ ]
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "type": "object"
+ },
+ "IntervalSelectionConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "bind": {
+ "const": "scales",
+ "description": "Establishes a two-way binding between the interval selection and the scales used within the same view. This allows a user to interactively pan and zoom the view.\n\n__See also:__ [`bind`](https://vega.github.io/vega-lite/docs/bind.html) documentation.",
+ "type": "string"
+ },
+ "clear": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Stream"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "description": "Clears the selection, emptying it of all values. Can be a [Event Stream](https://vega.github.io/vega/docs/event-streams/) or `false` to disable.\n\n__Default value:__ `dblclick`.\n\n__See also:__ [`clear`](https://vega.github.io/vega-lite/docs/clear.html) documentation."
+ },
+ "empty": {
+ "description": "By default, `all` data values are considered to lie within an empty selection. When set to `none`, empty selections contain no data values.",
+ "enum": [
+ "all",
+ "none"
+ ],
+ "type": "string"
+ },
+ "encodings": {
+ "description": "An array of encoding channels. The corresponding data field values must match for a data tuple to fall within the selection.\n\n__See also:__ [`encodings`](https://vega.github.io/vega-lite/docs/project.html) documentation.",
+ "items": {
+ "$ref": "#/definitions/SingleDefUnitChannel"
+ },
+ "type": "array"
+ },
+ "fields": {
+ "description": "An array of field names whose values must match for a data tuple to fall within the selection.\n\n__See also:__ [`fields`](https://vega.github.io/vega-lite/docs/project.html) documentation.",
+ "items": {
+ "$ref": "#/definitions/FieldName"
+ },
+ "type": "array"
+ },
+ "init": {
+ "$ref": "#/definitions/SelectionInitIntervalMapping",
+ "description": "Initialize the selection with a mapping between [projected channels or field names](https://vega.github.io/vega-lite/docs/project.html) and arrays of initial values.\n\n__See also:__ [`init`](https://vega.github.io/vega-lite/docs/init.html) documentation."
+ },
+ "mark": {
+ "$ref": "#/definitions/BrushConfig",
+ "description": "An interval selection also adds a rectangle mark to depict the extents of the interval. The `mark` property can be used to customize the appearance of the mark.\n\n__See also:__ [`mark`](https://vega.github.io/vega-lite/docs/selection-mark.html) documentation."
+ },
+ "on": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Stream"
+ },
+ {
+ "type": "string"
+ }
+ ],
+ "description": "A [Vega event stream](https://vega.github.io/vega/docs/event-streams/) (object or selector) that triggers the selection. For interval selections, the event stream must specify a [start and end](https://vega.github.io/vega/docs/event-streams/#between-filters)."
+ },
+ "resolve": {
+ "$ref": "#/definitions/SelectionResolution",
+ "description": "With layered and multi-view displays, a strategy that determines how selections' data queries are resolved when applied in a filter transform, conditional encoding rule, or scale domain.\n\n__See also:__ [`resolve`](https://vega.github.io/vega-lite/docs/selection-resolve.html) documentation."
+ },
+ "translate": {
+ "description": "When truthy, allows a user to interactively move an interval selection back-and-forth. Can be `true`, `false` (to disable panning), or a [Vega event stream definition](https://vega.github.io/vega/docs/event-streams/) which must include a start and end event to trigger continuous panning.\n\n__Default value:__ `true`, which corresponds to `[mousedown, window:mouseup] > window:mousemove!` which corresponds to clicks and dragging within an interval selection to reposition it.\n\n__See also:__ [`translate`](https://vega.github.io/vega-lite/docs/translate.html) documentation.",
+ "type": [
+ "string",
+ "boolean"
+ ]
+ },
+ "zoom": {
+ "description": "When truthy, allows a user to interactively resize an interval selection. Can be `true`, `false` (to disable zooming), or a [Vega event stream definition](https://vega.github.io/vega/docs/event-streams/). Currently, only `wheel` events are supported.\n\n__Default value:__ `true`, which corresponds to `wheel!`.\n\n__See also:__ [`zoom`](https://vega.github.io/vega-lite/docs/zoom.html) documentation.",
+ "type": [
+ "string",
+ "boolean"
+ ]
+ }
+ },
+ "type": "object"
+ },
+ "JoinAggregateFieldDef": {
+ "additionalProperties": false,
+ "properties": {
+ "as": {
+ "$ref": "#/definitions/FieldName",
+ "description": "The output name for the join aggregate operation."
+ },
+ "field": {
+ "$ref": "#/definitions/FieldName",
+ "description": "The data field for which to compute the aggregate function. This can be omitted for functions that do not operate over a field such as `\"count\"`."
+ },
+ "op": {
+ "$ref": "#/definitions/AggregateOp",
+ "description": "The aggregation operation to apply (e.g., `\"sum\"`, `\"average\"` or `\"count\"`). See the list of all supported operations [here](https://vega.github.io/vega-lite/docs/aggregate.html#ops)."
+ }
+ },
+ "required": [
+ "op",
+ "as"
+ ],
+ "type": "object"
+ },
+ "JoinAggregateTransform": {
+ "additionalProperties": false,
+ "properties": {
+ "groupby": {
+ "description": "The data fields for partitioning the data objects into separate groups. If unspecified, all data points will be in a single group.",
+ "items": {
+ "$ref": "#/definitions/FieldName"
+ },
+ "type": "array"
+ },
+ "joinaggregate": {
+ "description": "The definition of the fields in the join aggregate, and what calculations to use.",
+ "items": {
+ "$ref": "#/definitions/JoinAggregateFieldDef"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "joinaggregate"
+ ],
+ "type": "object"
+ },
+ "JsonDataFormat": {
+ "additionalProperties": false,
+ "properties": {
+ "parse": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Parse"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "If set to `null`, disable type inference based on the spec and only use type inference based on the data. Alternatively, a parsing directive object can be provided for explicit data types. Each property of the object corresponds to a field name, and the value to the desired data type (one of `\"number\"`, `\"boolean\"`, `\"date\"`, or null (do not parse the field)). For example, `\"parse\": {\"modified_on\": \"date\"}` parses the `modified_on` field in each input record a Date value.\n\nFor `\"date\"`, we parse data based using Javascript's [`Date.parse()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse). For Specific date formats can be provided (e.g., `{foo: \"date:'%m%d%Y'\"}`), using the [d3-time-format syntax](https://github.com/d3/d3-time-format#locale_format). UTC date format parsing is supported similarly (e.g., `{foo: \"utc:'%m%d%Y'\"}`). See more about [UTC time](https://vega.github.io/vega-lite/docs/timeunit.html#utc)"
+ },
+ "property": {
+ "description": "The JSON property containing the desired data. This parameter can be used when the loaded JSON file may have surrounding structure or meta-data. For example `\"property\": \"values.features\"` is equivalent to retrieving `json.values.features` from the loaded JSON object.",
+ "type": "string"
+ },
+ "type": {
+ "const": "json",
+ "description": "Type of input data: `\"json\"`, `\"csv\"`, `\"tsv\"`, `\"dsv\"`.\n\n__Default value:__ The default format type is determined by the extension of the file URL. If no extension is detected, `\"json\"` will be used by default.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "LabelOverlap": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "const": "parity",
+ "type": "string"
+ },
+ {
+ "const": "greedy",
+ "type": "string"
+ }
+ ]
+ },
+ "LatLongDef": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LatLongFieldDef"
+ },
+ {
+ "$ref": "#/definitions/DatumDef"
+ },
+ {
+ "$ref": "#/definitions/NumericValueDef"
+ }
+ ]
+ },
+ "LatLongFieldDef": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.",
+ "type": "null"
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "const": "quantitative",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "LayerRepeatMapping": {
+ "additionalProperties": false,
+ "properties": {
+ "column": {
+ "description": "An array of fields to be repeated horizontally.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "layer": {
+ "description": "An array of fields to be repeated as layers.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "row": {
+ "description": "An array of fields to be repeated vertically.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "layer"
+ ],
+ "type": "object"
+ },
+ "LayerRepeatSpec": {
+ "additionalProperties": false,
+ "properties": {
+ "align": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LayoutAlign"
+ },
+ {
+ "$ref": "#/definitions/RowCol<LayoutAlign>"
+ }
+ ],
+ "description": "The alignment to apply to grid rows and columns. The supported string values are `\"all\"`, `\"each\"`, and `\"none\"`.\n\n- For `\"none\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other. - For `\"each\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size. - For `\"all\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\nAlternatively, an object value of the form `{\"row\": string, \"column\": string}` can be used to supply different alignments for rows and columns.\n\n__Default value:__ `\"all\"`."
+ },
+ "bounds": {
+ "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used. - If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`",
+ "enum": [
+ "full",
+ "flush"
+ ],
+ "type": "string"
+ },
+ "center": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/RowCol<boolean>"
+ }
+ ],
+ "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\nAn object value of the form `{\"row\": boolean, \"column\": boolean}` can be used to supply different centering values for rows and columns.\n\n__Default value:__ `false`"
+ },
+ "columns": {
+ "description": "The number of columns to include in the view composition layout.\n\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\n\n__Note__:\n\n1) This property is only for: - the general (wrappable) `concat` operator (not `hconcat`/`vconcat`) - the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\n\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).",
+ "type": "number"
+ },
+ "data": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Data"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
+ },
+ "description": {
+ "description": "Description of this mark for commenting purpose.",
+ "type": "string"
+ },
+ "name": {
+ "description": "Name of the visualization for later reference.",
+ "type": "string"
+ },
+ "repeat": {
+ "$ref": "#/definitions/LayerRepeatMapping",
+ "description": "Definition for fields to be repeated. One of: 1) An array of fields to be repeated. If `\"repeat\"` is an array, the field can be referred to as `{\"repeat\": \"repeat\"}`. The repeated views are laid out in a wrapped row. You can set the number of columns to control the wrapping. 2) An object that maps `\"row\"` and/or `\"column\"` to the listed fields to be repeated along the particular orientations. The objects `{\"repeat\": \"row\"}` and `{\"repeat\": \"column\"}` can be used to refer to the repeated field respectively."
+ },
+ "resolve": {
+ "$ref": "#/definitions/Resolve",
+ "description": "Scale, axis, and legend resolutions for view composition specifications."
+ },
+ "spacing": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/RowCol<number>"
+ }
+ ],
+ "description": "The spacing in pixels between sub-views of the composition operator. An object of the form `{\"row\": number, \"column\": number}` can be used to set different spacing values for rows and columns.\n\n__Default value__: Depends on `\"spacing\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)"
+ },
+ "spec": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LayerSpec"
+ },
+ {
+ "$ref": "#/definitions/UnitSpec"
+ }
+ ],
+ "description": "A specification of the view that gets repeated."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "$ref": "#/definitions/TitleParams"
+ }
+ ],
+ "description": "Title for the plot."
+ },
+ "transform": {
+ "description": "An array of data transformations such as filter and new field calculation.",
+ "items": {
+ "$ref": "#/definitions/Transform"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "repeat",
+ "spec"
+ ],
+ "type": "object"
+ },
+ "LayerSpec": {
+ "additionalProperties": false,
+ "description": "A full layered plot specification, which may contains `encoding` and `projection` properties that will be applied to underlying unit (single-view) specifications.",
+ "properties": {
+ "data": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Data"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
+ },
+ "description": {
+ "description": "Description of this mark for commenting purpose.",
+ "type": "string"
+ },
+ "encoding": {
+ "$ref": "#/definitions/SharedEncoding",
+ "description": "A shared key-value mapping between encoding channels and definition of fields in the underlying layers."
+ },
+ "height": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "container",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/Step"
+ }
+ ],
+ "description": "The height of a visualization.\n\n- For a plot with a continuous y-field, height should be a number. - For a plot with either a discrete y-field or no y-field, height can be either a number indicating a fixed height or an object in the form of `{step: number}` defining the height per discrete step. (No y-field is equivalent to having one discrete step.) - To enable responsive sizing on height, it should be set to `\"container\"`.\n\n__Default value:__ Based on `config.view.continuousHeight` for a plot with a continuous y-field and `config.view.discreteHeight` otherwise.\n\n__Note:__ For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the height of a single view and the `\"container\"` option cannot be used.\n\n__See also:__ [`height`](https://vega.github.io/vega-lite/docs/size.html) documentation."
+ },
+ "layer": {
+ "description": "Layer or single view specifications to be layered.\n\n__Note__: Specifications inside `layer` cannot use `row` and `column` channels as layering facet specifications is not allowed. Instead, use the [facet operator](https://vega.github.io/vega-lite/docs/facet.html) and place a layer inside a facet.",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LayerSpec"
+ },
+ {
+ "$ref": "#/definitions/UnitSpec"
+ }
+ ]
+ },
+ "type": "array"
+ },
+ "name": {
+ "description": "Name of the visualization for later reference.",
+ "type": "string"
+ },
+ "projection": {
+ "$ref": "#/definitions/Projection",
+ "description": "An object defining properties of the geographic projection shared by underlying layers."
+ },
+ "resolve": {
+ "$ref": "#/definitions/Resolve",
+ "description": "Scale, axis, and legend resolutions for view composition specifications."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "$ref": "#/definitions/TitleParams"
+ }
+ ],
+ "description": "Title for the plot."
+ },
+ "transform": {
+ "description": "An array of data transformations such as filter and new field calculation.",
+ "items": {
+ "$ref": "#/definitions/Transform"
+ },
+ "type": "array"
+ },
+ "view": {
+ "$ref": "#/definitions/ViewBackground",
+ "description": "An object defining the view background's fill and stroke.\n\n__Default value:__ none (transparent)"
+ },
+ "width": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "container",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/Step"
+ }
+ ],
+ "description": "The width of a visualization.\n\n- For a plot with a continuous x-field, width should be a number. - For a plot with either a discrete x-field or no x-field, width can be either a number indicating a fixed width or an object in the form of `{step: number}` defining the width per discrete step. (No x-field is equivalent to having one discrete step.) - To enable responsive sizing on width, it should be set to `\"container\"`.\n\n__Default value:__ Based on `config.view.continuousWidth` for a plot with a continuous x-field and `config.view.discreteWidth` otherwise.\n\n__Note:__ For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the width of a single view and the `\"container\"` option cannot be used.\n\n__See also:__ [`width`](https://vega.github.io/vega-lite/docs/size.html) documentation."
+ }
+ },
+ "required": [
+ "layer"
+ ],
+ "type": "object"
+ },
+ "LayoutAlign": {
+ "enum": [
+ "all",
+ "each",
+ "none"
+ ],
+ "type": "string"
+ },
+ "Legend": {
+ "additionalProperties": false,
+ "description": "Properties of a legend or boolean flag for determining whether to show it.",
+ "properties": {
+ "aria": {
+ "anyOf": [
+ {
+ "description": "A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the \"aria-hidden\" attribute will be set on the output SVG group, removing the legend from the ARIA accessibility tree.\n\n__Default value:__ `true`",
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "clipHeight": {
+ "anyOf": [
+ {
+ "description": "The height in pixels to clip symbol legend entries and limit their size.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "columnPadding": {
+ "anyOf": [
+ {
+ "description": "The horizontal padding in pixels between symbol legend entries.\n\n__Default value:__ `10`.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "columns": {
+ "anyOf": [
+ {
+ "description": "The number of columns in which to arrange symbol legend entries. A value of `0` or lower indicates a single row with one column per entry.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "cornerRadius": {
+ "anyOf": [
+ {
+ "description": "Corner radius for the full legend.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "description": {
+ "anyOf": [
+ {
+ "description": "A text description of this legend for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If the `aria` property is true, for SVG output the [\"aria-label\" attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute) will be set to this description. If the description is unspecified it will be automatically generated.",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "direction": {
+ "$ref": "#/definitions/Orientation",
+ "description": "The direction of the legend, one of `\"vertical\"` or `\"horizontal\"`.\n\n__Default value:__ - For top-/bottom-`orient`ed legends, `\"horizontal\"` - For left-/right-`orient`ed legends, `\"vertical\"` - For top/bottom-left/right-`orient`ed legends, `\"horizontal\"` for gradient legends and `\"vertical\"` for symbol legends."
+ },
+ "fillColor": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/Color"
+ }
+ ],
+ "description": "Background fill color for the full legend."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "format": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/Dict<unknown>"
+ }
+ ],
+ "description": "When used with the default `\"number\"` and `\"time\"` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `\"number\"` (e.g., for quantitative fields), this is D3's [number format pattern](https://github.com/d3/d3-format#locale_format). - If the format type is `\"time\"` (e.g., for temporal fields), this is D3's [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\n\n__Default value:__ Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format."
+ },
+ "formatType": {
+ "description": "The format type for labels. One of `\"number\"`, `\"time\"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\n\n__Default value:__ - `\"time\"` for temporal fields and ordinal and nominal fields with `timeUnit`. - `\"number\"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.",
+ "type": "string"
+ },
+ "gradientLength": {
+ "anyOf": [
+ {
+ "description": "The length in pixels of the primary axis of a color gradient. This value corresponds to the height of a vertical gradient or the width of a horizontal gradient.\n\n__Default value:__ `200`.",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "gradientOpacity": {
+ "anyOf": [
+ {
+ "description": "Opacity of the color gradient.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "gradientStrokeColor": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/Color"
+ }
+ ],
+ "description": "The color of the gradient stroke, can be in hex color code or regular color name.\n\n__Default value:__ `\"lightGray\"`."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "gradientStrokeWidth": {
+ "anyOf": [
+ {
+ "description": "The width of the gradient stroke, in pixels.\n\n__Default value:__ `0`.",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "gradientThickness": {
+ "anyOf": [
+ {
+ "description": "The thickness in pixels of the color gradient. This value corresponds to the width of a vertical gradient or the height of a horizontal gradient.\n\n__Default value:__ `16`.",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "gridAlign": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LayoutAlign",
+ "description": "The alignment to apply to symbol legends rows and columns. The supported string values are `\"all\"`, `\"each\"` (the default), and `none`. For more information, see the [grid layout documentation](https://vega.github.io/vega/docs/layout).\n\n__Default value:__ `\"each\"`."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "labelAlign": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Align",
+ "description": "The alignment of the legend label, can be left, center, or right."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "labelBaseline": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TextBaseline",
+ "description": "The position of the baseline of legend label, can be `\"top\"`, `\"middle\"`, `\"bottom\"`, or `\"alphabetic\"`.\n\n__Default value:__ `\"middle\"`."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "labelColor": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/Color"
+ }
+ ],
+ "description": "The color of the legend label, can be in hex color code or regular color name."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "labelExpr": {
+ "description": "[Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels.\n\n__Note:__ The label text and value can be assessed via the `label` and `value` properties of the legend's backing `datum` object.",
+ "type": "string"
+ },
+ "labelFont": {
+ "anyOf": [
+ {
+ "description": "The font of the legend label.",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "labelFontSize": {
+ "anyOf": [
+ {
+ "description": "The font size of legend label.\n\n__Default value:__ `10`.",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "labelFontStyle": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontStyle",
+ "description": "The font style of legend label."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "labelFontWeight": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontWeight",
+ "description": "The font weight of legend label."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "labelLimit": {
+ "anyOf": [
+ {
+ "description": "Maximum allowed pixel width of legend tick labels.\n\n__Default value:__ `160`.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "labelOffset": {
+ "anyOf": [
+ {
+ "description": "The offset of the legend label.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "labelOpacity": {
+ "anyOf": [
+ {
+ "description": "Opacity of labels.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "labelOverlap": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LabelOverlap",
+ "description": "The strategy to use for resolving overlap of labels in gradient legends. If `false`, no overlap reduction is attempted. If set to `true` (default) or `\"parity\"`, a strategy of removing every other label is used. If set to `\"greedy\"`, a linear scan of the labels is performed, removing any label that overlaps with the last visible label (this often works better for log-scaled axes).\n\n__Default value:__ `true`."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "labelPadding": {
+ "anyOf": [
+ {
+ "description": "Padding in pixels between the legend and legend labels.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "labelSeparation": {
+ "anyOf": [
+ {
+ "description": "The minimum separation that must be between label bounding boxes for them to be considered non-overlapping (default `0`). This property is ignored if *labelOverlap* resolution is not enabled.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "legendX": {
+ "anyOf": [
+ {
+ "description": "Custom x-position for legend with orient \"none\".",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "legendY": {
+ "anyOf": [
+ {
+ "description": "Custom y-position for legend with orient \"none\".",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "offset": {
+ "anyOf": [
+ {
+ "description": "The offset in pixels by which to displace the legend from the data rectangle and axes.\n\n__Default value:__ `18`.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "orient": {
+ "$ref": "#/definitions/LegendOrient",
+ "description": "The orientation of the legend, which determines how the legend is positioned within the scene. One of `\"left\"`, `\"right\"`, `\"top\"`, `\"bottom\"`, `\"top-left\"`, `\"top-right\"`, `\"bottom-left\"`, `\"bottom-right\"`, `\"none\"`.\n\n__Default value:__ `\"right\"`"
+ },
+ "padding": {
+ "anyOf": [
+ {
+ "description": "The padding between the border and content of the legend group.\n\n__Default value:__ `0`.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "rowPadding": {
+ "anyOf": [
+ {
+ "description": "The vertical padding in pixels between symbol legend entries.\n\n__Default value:__ `2`.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeColor": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/Color"
+ }
+ ],
+ "description": "Border stroke color for the full legend."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "symbolDash": {
+ "anyOf": [
+ {
+ "description": "An array of alternating [stroke, space] lengths for dashed symbol strokes.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "symbolDashOffset": {
+ "anyOf": [
+ {
+ "description": "The pixel offset at which to start drawing with the symbol stroke dash array.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "symbolFillColor": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/Color"
+ }
+ ],
+ "description": "The color of the legend symbol,"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "symbolLimit": {
+ "anyOf": [
+ {
+ "description": "The maximum number of allowed entries for a symbol legend. Additional entries will be dropped.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "symbolOffset": {
+ "anyOf": [
+ {
+ "description": "Horizontal pixel offset for legend symbols.\n\n__Default value:__ `0`.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "symbolOpacity": {
+ "anyOf": [
+ {
+ "description": "Opacity of the legend symbols.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "symbolSize": {
+ "anyOf": [
+ {
+ "description": "The size of the legend symbol, in pixels.\n\n__Default value:__ `100`.",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "symbolStrokeColor": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/Color"
+ }
+ ],
+ "description": "Stroke color for legend symbols."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "symbolStrokeWidth": {
+ "anyOf": [
+ {
+ "description": "The width of the symbol's stroke.\n\n__Default value:__ `1.5`.",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "symbolType": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SymbolShape",
+ "description": "The symbol shape. One of the plotting shapes `circle` (default), `square`, `cross`, `diamond`, `triangle-up`, `triangle-down`, `triangle-right`, or `triangle-left`, the line symbol `stroke`, or one of the centered directional shapes `arrow`, `wedge`, or `triangle`. Alternatively, a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) can be provided. For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.\n\n__Default value:__ `\"circle\"`."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "tickCount": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TickCount",
+ "description": "The desired number of tick values for quantitative legends."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "tickMinStep": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The minimum desired step between legend ticks, in terms of scale domain values. For example, a value of `1` indicates that ticks should not be less than 1 unit apart. If `tickMinStep` is specified, the `tickCount` value will be adjusted, if necessary, to enforce the minimum step value.\n\n__Default value__: `undefined`"
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "titleAlign": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Align",
+ "description": "Horizontal text alignment for legend titles.\n\n__Default value:__ `\"left\"`."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleAnchor": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TitleAnchor",
+ "description": "Text anchor position for placing legend titles."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleBaseline": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TextBaseline",
+ "description": "Vertical text baseline for legend titles. One of `\"alphabetic\"` (default), `\"top\"`, `\"middle\"`, `\"bottom\"`, `\"line-top\"`, or `\"line-bottom\"`. The `\"line-top\"` and `\"line-bottom\"` values operate similarly to `\"top\"` and `\"bottom\"`, but are calculated relative to the *lineHeight* rather than *fontSize* alone.\n\n__Default value:__ `\"top\"`."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleColor": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/Color"
+ }
+ ],
+ "description": "The color of the legend title, can be in hex color code or regular color name."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleFont": {
+ "anyOf": [
+ {
+ "description": "The font of the legend title.",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleFontSize": {
+ "anyOf": [
+ {
+ "description": "The font size of the legend title.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleFontStyle": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontStyle",
+ "description": "The font style of the legend title."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleFontWeight": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontWeight",
+ "description": "The font weight of the legend title. This can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleLimit": {
+ "anyOf": [
+ {
+ "description": "Maximum allowed pixel width of legend titles.\n\n__Default value:__ `180`.",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleLineHeight": {
+ "anyOf": [
+ {
+ "description": "Line height in pixels for multi-line title text or title text with `\"line-top\"` or `\"line-bottom\"` baseline.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleOpacity": {
+ "anyOf": [
+ {
+ "description": "Opacity of the legend title.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleOrient": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Orient",
+ "description": "Orientation of the legend title."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titlePadding": {
+ "anyOf": [
+ {
+ "description": "The padding, in pixels, between title and legend.\n\n__Default value:__ `5`.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "type": {
+ "description": "The type of the legend. Use `\"symbol\"` to create a discrete legend and `\"gradient\"` for a continuous color gradient.\n\n__Default value:__ `\"gradient\"` for non-binned quantitative fields and temporal fields; `\"symbol\"` otherwise.",
+ "enum": [
+ "symbol",
+ "gradient"
+ ],
+ "type": "string"
+ },
+ "values": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "items": {
+ "type": "boolean"
+ },
+ "type": "array"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/DateTime"
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Explicitly set the visible legend values."
+ },
+ "zindex": {
+ "description": "A non-negative integer indicating the z-index of the legend. If zindex is 0, legend should be drawn behind all chart elements. To put them in front, use zindex = 1.",
+ "minimum": 0,
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "LegendBinding": {
+ "anyOf": [
+ {
+ "const": "legend",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/LegendStreamBinding"
+ }
+ ]
+ },
+ "LegendConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "aria": {
+ "anyOf": [
+ {
+ "description": "A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the \"aria-hidden\" attribute will be set on the output SVG group, removing the legend from the ARIA accessibility tree.\n\n__Default value:__ `true`",
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "clipHeight": {
+ "anyOf": [
+ {
+ "description": "The height in pixels to clip symbol legend entries and limit their size.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "columnPadding": {
+ "anyOf": [
+ {
+ "description": "The horizontal padding in pixels between symbol legend entries.\n\n__Default value:__ `10`.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "columns": {
+ "anyOf": [
+ {
+ "description": "The number of columns in which to arrange symbol legend entries. A value of `0` or lower indicates a single row with one column per entry.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "cornerRadius": {
+ "anyOf": [
+ {
+ "description": "Corner radius for the full legend.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "description": {
+ "anyOf": [
+ {
+ "description": "A text description of this legend for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If the `aria` property is true, for SVG output the [\"aria-label\" attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute) will be set to this description. If the description is unspecified it will be automatically generated.",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "direction": {
+ "$ref": "#/definitions/Orientation",
+ "description": "The direction of the legend, one of `\"vertical\"` or `\"horizontal\"`.\n\n__Default value:__ - For top-/bottom-`orient`ed legends, `\"horizontal\"` - For left-/right-`orient`ed legends, `\"vertical\"` - For top/bottom-left/right-`orient`ed legends, `\"horizontal\"` for gradient legends and `\"vertical\"` for symbol legends."
+ },
+ "disable": {
+ "description": "Disable legend by default",
+ "type": "boolean"
+ },
+ "fillColor": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/Color"
+ }
+ ],
+ "description": "Background fill color for the full legend."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "gradientDirection": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Orientation",
+ "description": "The default direction (`\"horizontal\"` or `\"vertical\"`) for gradient legends.\n\n__Default value:__ `\"vertical\"`."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "gradientHorizontalMaxLength": {
+ "description": "Max legend length for a horizontal gradient when `config.legend.gradientLength` is undefined.\n\n__Default value:__ `200`",
+ "type": "number"
+ },
+ "gradientHorizontalMinLength": {
+ "description": "Min legend length for a horizontal gradient when `config.legend.gradientLength` is undefined.\n\n__Default value:__ `100`",
+ "type": "number"
+ },
+ "gradientLabelLimit": {
+ "anyOf": [
+ {
+ "description": "The maximum allowed length in pixels of color ramp gradient labels.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "gradientLabelOffset": {
+ "anyOf": [
+ {
+ "description": "Vertical offset in pixels for color ramp gradient labels.\n\n__Default value:__ `2`.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "gradientLength": {
+ "anyOf": [
+ {
+ "description": "The length in pixels of the primary axis of a color gradient. This value corresponds to the height of a vertical gradient or the width of a horizontal gradient.\n\n__Default value:__ `200`.",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "gradientOpacity": {
+ "anyOf": [
+ {
+ "description": "Opacity of the color gradient.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "gradientStrokeColor": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/Color"
+ }
+ ],
+ "description": "The color of the gradient stroke, can be in hex color code or regular color name.\n\n__Default value:__ `\"lightGray\"`."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "gradientStrokeWidth": {
+ "anyOf": [
+ {
+ "description": "The width of the gradient stroke, in pixels.\n\n__Default value:__ `0`.",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "gradientThickness": {
+ "anyOf": [
+ {
+ "description": "The thickness in pixels of the color gradient. This value corresponds to the width of a vertical gradient or the height of a horizontal gradient.\n\n__Default value:__ `16`.",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "gradientVerticalMaxLength": {
+ "description": "Max legend length for a vertical gradient when `config.legend.gradientLength` is undefined.\n\n__Default value:__ `200`",
+ "type": "number"
+ },
+ "gradientVerticalMinLength": {
+ "description": "Min legend length for a vertical gradient when `config.legend.gradientLength` is undefined.\n\n__Default value:__ `100`",
+ "type": "number"
+ },
+ "gridAlign": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LayoutAlign",
+ "description": "The alignment to apply to symbol legends rows and columns. The supported string values are `\"all\"`, `\"each\"` (the default), and `none`. For more information, see the [grid layout documentation](https://vega.github.io/vega/docs/layout).\n\n__Default value:__ `\"each\"`."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "labelAlign": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Align",
+ "description": "The alignment of the legend label, can be left, center, or right."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "labelBaseline": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TextBaseline",
+ "description": "The position of the baseline of legend label, can be `\"top\"`, `\"middle\"`, `\"bottom\"`, or `\"alphabetic\"`.\n\n__Default value:__ `\"middle\"`."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "labelColor": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/Color"
+ }
+ ],
+ "description": "The color of the legend label, can be in hex color code or regular color name."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "labelFont": {
+ "anyOf": [
+ {
+ "description": "The font of the legend label.",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "labelFontSize": {
+ "anyOf": [
+ {
+ "description": "The font size of legend label.\n\n__Default value:__ `10`.",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "labelFontStyle": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontStyle",
+ "description": "The font style of legend label."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "labelFontWeight": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontWeight",
+ "description": "The font weight of legend label."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "labelLimit": {
+ "anyOf": [
+ {
+ "description": "Maximum allowed pixel width of legend tick labels.\n\n__Default value:__ `160`.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "labelOffset": {
+ "anyOf": [
+ {
+ "description": "The offset of the legend label.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "labelOpacity": {
+ "anyOf": [
+ {
+ "description": "Opacity of labels.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "labelOverlap": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LabelOverlap"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The strategy to use for resolving overlap of labels in gradient legends. If `false`, no overlap reduction is attempted. If set to `true` or `\"parity\"`, a strategy of removing every other label is used. If set to `\"greedy\"`, a linear scan of the labels is performed, removing any label that overlaps with the last visible label (this often works better for log-scaled axes).\n\n__Default value:__ `\"greedy\"` for `log scales otherwise `true`."
+ },
+ "labelPadding": {
+ "anyOf": [
+ {
+ "description": "Padding in pixels between the legend and legend labels.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "labelSeparation": {
+ "anyOf": [
+ {
+ "description": "The minimum separation that must be between label bounding boxes for them to be considered non-overlapping (default `0`). This property is ignored if *labelOverlap* resolution is not enabled.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "layout": {
+ "$ref": "#/definitions/ExprRef"
+ },
+ "legendX": {
+ "anyOf": [
+ {
+ "description": "Custom x-position for legend with orient \"none\".",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "legendY": {
+ "anyOf": [
+ {
+ "description": "Custom y-position for legend with orient \"none\".",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "offset": {
+ "anyOf": [
+ {
+ "description": "The offset in pixels by which to displace the legend from the data rectangle and axes.\n\n__Default value:__ `18`.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "orient": {
+ "$ref": "#/definitions/LegendOrient",
+ "description": "The orientation of the legend, which determines how the legend is positioned within the scene. One of `\"left\"`, `\"right\"`, `\"top\"`, `\"bottom\"`, `\"top-left\"`, `\"top-right\"`, `\"bottom-left\"`, `\"bottom-right\"`, `\"none\"`.\n\n__Default value:__ `\"right\"`"
+ },
+ "padding": {
+ "anyOf": [
+ {
+ "description": "The padding between the border and content of the legend group.\n\n__Default value:__ `0`.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "rowPadding": {
+ "anyOf": [
+ {
+ "description": "The vertical padding in pixels between symbol legend entries.\n\n__Default value:__ `2`.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeColor": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/Color"
+ }
+ ],
+ "description": "Border stroke color for the full legend."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeDash": {
+ "anyOf": [
+ {
+ "description": "Border stroke dash pattern for the full legend.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeWidth": {
+ "anyOf": [
+ {
+ "description": "Border stroke width for the full legend.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "symbolBaseFillColor": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/Color"
+ }
+ ],
+ "description": "Default fill color for legend symbols. Only applied if there is no `\"fill\"` scale color encoding for the legend.\n\n__Default value:__ `\"transparent\"`."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "symbolBaseStrokeColor": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/Color"
+ }
+ ],
+ "description": "Default stroke color for legend symbols. Only applied if there is no `\"fill\"` scale color encoding for the legend.\n\n__Default value:__ `\"gray\"`."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "symbolDash": {
+ "anyOf": [
+ {
+ "description": "An array of alternating [stroke, space] lengths for dashed symbol strokes.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "symbolDashOffset": {
+ "anyOf": [
+ {
+ "description": "The pixel offset at which to start drawing with the symbol stroke dash array.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "symbolDirection": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Orientation",
+ "description": "The default direction (`\"horizontal\"` or `\"vertical\"`) for symbol legends.\n\n__Default value:__ `\"vertical\"`."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "symbolFillColor": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/Color"
+ }
+ ],
+ "description": "The color of the legend symbol,"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "symbolLimit": {
+ "anyOf": [
+ {
+ "description": "The maximum number of allowed entries for a symbol legend. Additional entries will be dropped.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "symbolOffset": {
+ "anyOf": [
+ {
+ "description": "Horizontal pixel offset for legend symbols.\n\n__Default value:__ `0`.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "symbolOpacity": {
+ "anyOf": [
+ {
+ "description": "Opacity of the legend symbols.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "symbolSize": {
+ "anyOf": [
+ {
+ "description": "The size of the legend symbol, in pixels.\n\n__Default value:__ `100`.",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "symbolStrokeColor": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/Color"
+ }
+ ],
+ "description": "Stroke color for legend symbols."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "symbolStrokeWidth": {
+ "anyOf": [
+ {
+ "description": "The width of the symbol's stroke.\n\n__Default value:__ `1.5`.",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "symbolType": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SymbolShape",
+ "description": "The symbol shape. One of the plotting shapes `circle` (default), `square`, `cross`, `diamond`, `triangle-up`, `triangle-down`, `triangle-right`, or `triangle-left`, the line symbol `stroke`, or one of the centered directional shapes `arrow`, `wedge`, or `triangle`. Alternatively, a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) can be provided. For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.\n\n__Default value:__ `\"circle\"`."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "tickCount": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TickCount",
+ "description": "The desired number of tick values for quantitative legends."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "title": {
+ "description": "Set to null to disable title for the axis, legend, or header.",
+ "type": "null"
+ },
+ "titleAlign": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Align",
+ "description": "Horizontal text alignment for legend titles.\n\n__Default value:__ `\"left\"`."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleAnchor": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TitleAnchor",
+ "description": "Text anchor position for placing legend titles."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleBaseline": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TextBaseline",
+ "description": "Vertical text baseline for legend titles. One of `\"alphabetic\"` (default), `\"top\"`, `\"middle\"`, `\"bottom\"`, `\"line-top\"`, or `\"line-bottom\"`. The `\"line-top\"` and `\"line-bottom\"` values operate similarly to `\"top\"` and `\"bottom\"`, but are calculated relative to the *lineHeight* rather than *fontSize* alone.\n\n__Default value:__ `\"top\"`."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleColor": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/Color"
+ }
+ ],
+ "description": "The color of the legend title, can be in hex color code or regular color name."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleFont": {
+ "anyOf": [
+ {
+ "description": "The font of the legend title.",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleFontSize": {
+ "anyOf": [
+ {
+ "description": "The font size of the legend title.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleFontStyle": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontStyle",
+ "description": "The font style of the legend title."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleFontWeight": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontWeight",
+ "description": "The font weight of the legend title. This can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleLimit": {
+ "anyOf": [
+ {
+ "description": "Maximum allowed pixel width of legend titles.\n\n__Default value:__ `180`.",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleLineHeight": {
+ "anyOf": [
+ {
+ "description": "Line height in pixels for multi-line title text or title text with `\"line-top\"` or `\"line-bottom\"` baseline.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleOpacity": {
+ "anyOf": [
+ {
+ "description": "Opacity of the legend title.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titleOrient": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Orient",
+ "description": "Orientation of the legend title."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "titlePadding": {
+ "anyOf": [
+ {
+ "description": "The padding, in pixels, between title and legend.\n\n__Default value:__ `5`.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "unselectedOpacity": {
+ "description": "The opacity of unselected legend entries.\n\n__Default value:__ 0.35.",
+ "type": "number"
+ },
+ "zindex": {
+ "anyOf": [
+ {
+ "description": "The integer z-index indicating the layering of the legend group relative to other axis, mark, and legend groups.",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ }
+ },
+ "type": "object"
+ },
+ "LegendOrient": {
+ "enum": [
+ "none",
+ "left",
+ "right",
+ "top",
+ "bottom",
+ "top-left",
+ "top-right",
+ "bottom-left",
+ "bottom-right"
+ ],
+ "type": "string"
+ },
+ "LegendResolveMap": {
+ "additionalProperties": false,
+ "properties": {
+ "angle": {
+ "$ref": "#/definitions/ResolveMode"
+ },
+ "color": {
+ "$ref": "#/definitions/ResolveMode"
+ },
+ "fill": {
+ "$ref": "#/definitions/ResolveMode"
+ },
+ "fillOpacity": {
+ "$ref": "#/definitions/ResolveMode"
+ },
+ "opacity": {
+ "$ref": "#/definitions/ResolveMode"
+ },
+ "shape": {
+ "$ref": "#/definitions/ResolveMode"
+ },
+ "size": {
+ "$ref": "#/definitions/ResolveMode"
+ },
+ "stroke": {
+ "$ref": "#/definitions/ResolveMode"
+ },
+ "strokeDash": {
+ "$ref": "#/definitions/ResolveMode"
+ },
+ "strokeOpacity": {
+ "$ref": "#/definitions/ResolveMode"
+ },
+ "strokeWidth": {
+ "$ref": "#/definitions/ResolveMode"
+ }
+ },
+ "type": "object"
+ },
+ "LegendStreamBinding": {
+ "additionalProperties": false,
+ "properties": {
+ "legend": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/Stream"
+ }
+ ]
+ }
+ },
+ "required": [
+ "legend"
+ ],
+ "type": "object"
+ },
+ "LineConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "align": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Align"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of `\"left\"`, `\"right\"`, `\"center\"`.\n\n__Note:__ Expression reference is *not* supported for range marks."
+ },
+ "angle": {
+ "anyOf": [
+ {
+ "description": "The rotation angle of the text, in degrees.",
+ "maximum": 360,
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "aria": {
+ "anyOf": [
+ {
+ "description": "A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the \"aria-hidden\" attribute will be set on the output SVG element, removing the mark item from the ARIA accessibility tree.",
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "ariaRole": {
+ "anyOf": [
+ {
+ "description": "Sets the type of user interface element of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the \"role\" attribute. Warning: this property is experimental and may be changed in the future.",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "ariaRoleDescription": {
+ "anyOf": [
+ {
+ "description": "A human-readable, author-localized description for the role of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the \"aria-roledescription\" attribute. Warning: this property is experimental and may be changed in the future.",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "aspect": {
+ "anyOf": [
+ {
+ "description": "Whether to keep aspect ratio of image marks.",
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "baseline": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TextBaseline"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "For text marks, the vertical text baseline. One of `\"alphabetic\"` (default), `\"top\"`, `\"middle\"`, `\"bottom\"`, `\"line-top\"`, `\"line-bottom\"`, or an expression reference that provides one of the valid values. The `\"line-top\"` and `\"line-bottom\"` values operate similarly to `\"top\"` and `\"bottom\"`, but are calculated relative to the `lineHeight` rather than `fontSize` alone.\n\nFor range marks, the vertical alignment of the marks. One of `\"top\"`, `\"middle\"`, `\"bottom\"`.\n\n__Note:__ Expression reference is *not* supported for range marks."
+ },
+ "blend": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Blend",
+ "description": "The color blend mode for drawing an item on its current background. Any valid [CSS mix-blend-mode](https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode) value can be used.\n\n__Default value: `\"source-over\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "color": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/Gradient"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Default color.\n\n__Default value:__ <span style=\"color: #4682b4;\">&#9632;</span> `\"#4682b4\"`\n\n__Note:__ - This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config). - The `fill` and `stroke` properties have higher precedence than `color` and will override `color`."
+ },
+ "cornerRadius": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles or arcs' corners.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "cornerRadiusBottomLeft": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles' bottom left corner.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "cornerRadiusBottomRight": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles' bottom right corner.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "cornerRadiusTopLeft": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles' top right corner.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "cornerRadiusTopRight": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles' top left corner.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "cursor": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Cursor",
+ "description": "The mouse cursor used over the mark. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "description": {
+ "anyOf": [
+ {
+ "description": "A text description of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the [\"aria-label\" attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute).",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "dir": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TextDirection",
+ "description": "The direction of the text. One of `\"ltr\"` (left-to-right) or `\"rtl\"` (right-to-left). This property determines on which side is truncated in response to the limit parameter.\n\n__Default value:__ `\"ltr\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "dx": {
+ "anyOf": [
+ {
+ "description": "The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "dy": {
+ "anyOf": [
+ {
+ "description": "The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "ellipsis": {
+ "anyOf": [
+ {
+ "description": "The ellipsis string for text truncated in response to the limit parameter.\n\n__Default value:__ `\"…\"`",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "endAngle": {
+ "anyOf": [
+ {
+ "description": "The end angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "fill": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/Gradient"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Default fill color. This property has higher precedence than `config.color`. Set to `null` to remove fill.\n\n__Default value:__ (None)"
+ },
+ "fillOpacity": {
+ "anyOf": [
+ {
+ "description": "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "filled": {
+ "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `false` for all `point`, `line`, and `rule` marks as well as `geoshape` marks for [`graticule`](https://vega.github.io/vega-lite/docs/data.html#graticule) data sources; otherwise, `true`.\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).",
+ "type": "boolean"
+ },
+ "font": {
+ "anyOf": [
+ {
+ "description": "The typeface to set the text in (e.g., `\"Helvetica Neue\"`).",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "fontSize": {
+ "anyOf": [
+ {
+ "description": "The font size, in pixels.\n\n__Default value:__ `11`",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "fontStyle": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontStyle",
+ "description": "The font style (e.g., `\"italic\"`)."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "fontWeight": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontWeight",
+ "description": "The font weight. This can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "height": {
+ "anyOf": [
+ {
+ "description": "Height of the marks.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "href": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/URI",
+ "description": "A URL to load upon mouse click. If defined, the mark acts as a hyperlink."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "innerRadius": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`."
+ },
+ "interpolate": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Interpolate",
+ "description": "The line interpolation method to use for line and area marks. One of the following: - `\"linear\"`: piecewise linear segments, as in a polyline. - `\"linear-closed\"`: close the linear segments to form a polygon. - `\"step\"`: alternate between horizontal and vertical segments, as in a step function. - `\"step-before\"`: alternate between vertical and horizontal segments, as in a step function. - `\"step-after\"`: alternate between horizontal and vertical segments, as in a step function. - `\"basis\"`: a B-spline, with control point duplication on the ends. - `\"basis-open\"`: an open B-spline; may not intersect the start or end. - `\"basis-closed\"`: a closed B-spline, as in a loop. - `\"cardinal\"`: a Cardinal spline, with control point duplication on the ends. - `\"cardinal-open\"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points. - `\"cardinal-closed\"`: a closed Cardinal spline, as in a loop. - `\"bundle\"`: equivalent to basis, except the tension parameter is used to straighten the spline. - `\"monotone\"`: cubic interpolation that preserves monotonicity in y."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "invalid": {
+ "description": "Defines how Vega-Lite should handle marks for invalid values (`null` and `NaN`). - If set to `\"filter\"` (default), all data items with null values will be skipped (for line, trail, and area marks) or filtered (for other marks). - If `null`, all data items are included. In this case, invalid values will be interpreted as zeroes.",
+ "enum": [
+ "filter",
+ null
+ ],
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "limit": {
+ "anyOf": [
+ {
+ "description": "The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0` -- indicating no limit",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "lineBreak": {
+ "anyOf": [
+ {
+ "description": "A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property is ignored if the text is array-valued.",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "lineHeight": {
+ "anyOf": [
+ {
+ "description": "The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "opacity": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.",
+ "maximum": 1,
+ "minimum": 0
+ },
+ "order": {
+ "description": "For line and trail marks, this `order` property can be set to `null` or `false` to make the lines use the original order in the data sources.",
+ "type": [
+ "null",
+ "boolean"
+ ]
+ },
+ "orient": {
+ "$ref": "#/definitions/Orientation",
+ "description": "The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical. - For bar, rule and tick, this determines whether the size of the bar and tick should be applied to x or y dimension. - For area, this property determines the orient property of the Vega output. - For line and trail marks, this property determines the sort order of the points in the line if `config.sortLineBy` is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored."
+ },
+ "outerRadius": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`."
+ },
+ "padAngle": {
+ "anyOf": [
+ {
+ "description": "The angular padding applied to sides of the arc, in radians.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "point": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/OverlayMarkDef"
+ },
+ {
+ "const": "transparent",
+ "type": "string"
+ }
+ ],
+ "description": "A flag for overlaying points on top of line or area marks, or an object defining the properties of the overlayed points.\n\n- If this property is `\"transparent\"`, transparent points will be used (for enhancing tooltips and selections).\n\n- If this property is an empty object (`{}`) or `true`, filled points with default properties will be used.\n\n- If this property is `false`, no points would be automatically added to line or area marks.\n\n__Default value:__ `false`."
+ },
+ "radius": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "For arc mark, the primary (outer) radius in pixels.\n\nFor text marks, polar coordinate radial offset, in pixels, of the text from the origin determined by the `x` and `y` properties."
+ },
+ "radius2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The secondary (inner) radius in pixels of arc marks."
+ },
+ "shape": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SymbolShape"
+ },
+ {
+ "type": "string"
+ }
+ ],
+ "description": "Shape of the point marks. Supported values include: - plotting shapes: `\"circle\"`, `\"square\"`, `\"cross\"`, `\"diamond\"`, `\"triangle-up\"`, `\"triangle-down\"`, `\"triangle-right\"`, or `\"triangle-left\"`. - the line symbol `\"stroke\"` - centered directional shapes `\"arrow\"`, `\"wedge\"`, or `\"triangle\"` - a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n__Default value:__ `\"circle\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "size": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Default size for marks. - For `point`/`circle`/`square`, this represents the pixel area of the marks. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value. - For `bar`, this represents the band size of the bar, in pixels. - For `text`, this represents the font size, in pixels.\n\n__Default value:__ - `30` for point, circle, square marks; width/height's `step` - `2` for bar marks with discrete dimensions; - `5` for bar marks with continuous dimensions; - `11` for text marks.",
+ "minimum": 0
+ },
+ "smooth": {
+ "anyOf": [
+ {
+ "description": "A boolean flag (default true) indicating if the image should be smoothed when resized. If false, individual pixels should be scaled directly rather than interpolated with smoothing. For SVG rendering, this option may not work in some browsers due to lack of standardization.",
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "startAngle": {
+ "anyOf": [
+ {
+ "description": "The start angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "stroke": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/Gradient"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Default stroke color. This property has higher precedence than `config.color`. Set to `null` to remove stroke.\n\n__Default value:__ (None)"
+ },
+ "strokeCap": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StrokeCap",
+ "description": "The stroke cap for line ending style. One of `\"butt\"`, `\"round\"`, or `\"square\"`.\n\n__Default value:__ `\"butt\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeDash": {
+ "anyOf": [
+ {
+ "description": "An array of alternating stroke, space lengths for creating dashed or dotted lines.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeDashOffset": {
+ "anyOf": [
+ {
+ "description": "The offset (in pixels) into which to begin drawing with the stroke dash array.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeJoin": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StrokeJoin",
+ "description": "The stroke line join method. One of `\"miter\"`, `\"round\"` or `\"bevel\"`.\n\n__Default value:__ `\"miter\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeMiterLimit": {
+ "anyOf": [
+ {
+ "description": "The miter limit at which to bevel a line join.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeOffset": {
+ "anyOf": [
+ {
+ "description": "The offset in pixels at which to draw the group stroke and fill. If unspecified, the default behavior is to dynamically offset stroked groups such that 1 pixel stroke widths align with the pixel grid.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeOpacity": {
+ "anyOf": [
+ {
+ "description": "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeWidth": {
+ "anyOf": [
+ {
+ "description": "The stroke width, in pixels.",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "tension": {
+ "anyOf": [
+ {
+ "description": "Depending on the interpolation type, sets the tension parameter (for line and area marks).",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "text": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text",
+ "description": "Placeholder text if the `text` channel is not specified"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "theta": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "- For arc marks, the arc length in radians if theta2 is not specified, otherwise the start arc angle. (A value of 0 indicates up or “north”, increasing values proceed clockwise.)\n\n- For text marks, polar coordinate angle in radians.",
+ "maximum": 360,
+ "minimum": 0
+ },
+ "theta2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise."
+ },
+ "timeUnitBand": {
+ "description": "Default relative band size for a time unit. If set to `1`, the bandwidth of the marks will be equal to the time unit band step. If set to `0.5`, bandwidth of the marks will be half of the time unit band step.",
+ "type": "number"
+ },
+ "timeUnitBandPosition": {
+ "description": "Default relative band position for a time unit. If set to `0`, the marks will be positioned at the beginning of the time unit band step. If set to `0.5`, the marks will be positioned in the middle of the time unit band step.",
+ "type": "number"
+ },
+ "tooltip": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/TooltipContent"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.\n\n- If `tooltip` is `true` or `{\"content\": \"encoding\"}`, then all fields from `encoding` will be used. - If `tooltip` is `{\"content\": \"data\"}`, then all fields that appear in the highlighted data point will be used. - If set to `null` or `false`, then no tooltip will be used.\n\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip in Vega-Lite.\n\n__Default value:__ `null`"
+ },
+ "url": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/URI",
+ "description": "The URL of the image file for image marks."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "width": {
+ "anyOf": [
+ {
+ "description": "Width of the marks.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "x": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "width",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "X coordinates of the marks, or width of horizontal `\"bar\"` and `\"area\"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "x2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "width",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "X2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "y": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "height",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Y coordinates of the marks, or height of vertical `\"bar\"` and `\"area\"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ },
+ "y2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "height",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Y2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ }
+ },
+ "type": "object"
+ },
+ "LinearGradient": {
+ "additionalProperties": false,
+ "properties": {
+ "gradient": {
+ "const": "linear",
+ "description": "The type of gradient. Use `\"linear\"` for a linear gradient.",
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ },
+ "stops": {
+ "description": "An array of gradient stops defining the gradient color sequence.",
+ "items": {
+ "$ref": "#/definitions/GradientStop"
+ },
+ "type": "array"
+ },
+ "x1": {
+ "description": "The starting x-coordinate, in normalized [0, 1] coordinates, of the linear gradient.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ "x2": {
+ "description": "The ending x-coordinate, in normalized [0, 1] coordinates, of the linear gradient.\n\n__Default value:__ `1`",
+ "type": "number"
+ },
+ "y1": {
+ "description": "The starting y-coordinate, in normalized [0, 1] coordinates, of the linear gradient.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ "y2": {
+ "description": "The ending y-coordinate, in normalized [0, 1] coordinates, of the linear gradient.\n\n__Default value:__ `0`",
+ "type": "number"
+ }
+ },
+ "required": [
+ "gradient",
+ "stops"
+ ],
+ "type": "object"
+ },
+ "LocalMultiTimeUnit": {
+ "enum": [
+ "yearquarter",
+ "yearquartermonth",
+ "yearmonth",
+ "yearmonthdate",
+ "yearmonthdatehours",
+ "yearmonthdatehoursminutes",
+ "yearmonthdatehoursminutesseconds",
+ "yearweek",
+ "yearweekday",
+ "yearweekdayhours",
+ "yearweekdayhoursminutes",
+ "yearweekdayhoursminutesseconds",
+ "yeardayofyear",
+ "quartermonth",
+ "monthdate",
+ "monthdatehours",
+ "monthdatehoursminutes",
+ "monthdatehoursminutesseconds",
+ "weekday",
+ "weeksdayhours",
+ "weekdayhoursminutes",
+ "weekdayhoursminutesseconds",
+ "dayhours",
+ "dayhoursminutes",
+ "dayhoursminutesseconds",
+ "hoursminutes",
+ "hoursminutesseconds",
+ "minutesseconds",
+ "secondsmilliseconds"
+ ],
+ "type": "string"
+ },
+ "LocalSingleTimeUnit": {
+ "enum": [
+ "year",
+ "quarter",
+ "month",
+ "week",
+ "day",
+ "dayofyear",
+ "date",
+ "hours",
+ "minutes",
+ "seconds",
+ "milliseconds"
+ ],
+ "type": "string"
+ },
+ "LoessTransform": {
+ "additionalProperties": false,
+ "properties": {
+ "as": {
+ "description": "The output field names for the smoothed points generated by the loess transform.\n\n__Default value:__ The field names of the input x and y values.",
+ "items": [
+ {
+ "$ref": "#/definitions/FieldName"
+ },
+ {
+ "$ref": "#/definitions/FieldName"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2,
+ "type": "array"
+ },
+ "bandwidth": {
+ "description": "A bandwidth parameter in the range `[0, 1]` that determines the amount of smoothing.\n\n__Default value:__ `0.3`",
+ "type": "number"
+ },
+ "groupby": {
+ "description": "The data fields to group by. If not specified, a single group containing all data objects will be used.",
+ "items": {
+ "$ref": "#/definitions/FieldName"
+ },
+ "type": "array"
+ },
+ "loess": {
+ "$ref": "#/definitions/FieldName",
+ "description": "The data field of the dependent variable to smooth."
+ },
+ "on": {
+ "$ref": "#/definitions/FieldName",
+ "description": "The data field of the independent variable to use a predictor."
+ }
+ },
+ "required": [
+ "loess",
+ "on"
+ ],
+ "type": "object"
+ },
+ "LogicalAnd<Predicate>": {
+ "additionalProperties": false,
+ "properties": {
+ "and": {
+ "items": {
+ "$ref": "#/definitions/PredicateComposition"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "and"
+ ],
+ "type": "object"
+ },
+ "SelectionAnd": {
+ "additionalProperties": false,
+ "properties": {
+ "and": {
+ "items": {
+ "$ref": "#/definitions/SelectionComposition"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "and"
+ ],
+ "type": "object"
+ },
+ "PredicateComposition": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LogicalNot<Predicate>"
+ },
+ {
+ "$ref": "#/definitions/LogicalAnd<Predicate>"
+ },
+ {
+ "$ref": "#/definitions/LogicalOr<Predicate>"
+ },
+ {
+ "$ref": "#/definitions/Predicate"
+ }
+ ]
+ },
+ "SelectionComposition": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SelectionNot"
+ },
+ {
+ "$ref": "#/definitions/SelectionAnd"
+ },
+ {
+ "$ref": "#/definitions/SelectionOr"
+ },
+ {
+ "type": "string"
+ }
+ ]
+ },
+ "LogicalNot<Predicate>": {
+ "additionalProperties": false,
+ "properties": {
+ "not": {
+ "$ref": "#/definitions/PredicateComposition"
+ }
+ },
+ "required": [
+ "not"
+ ],
+ "type": "object"
+ },
+ "SelectionNot": {
+ "additionalProperties": false,
+ "properties": {
+ "not": {
+ "$ref": "#/definitions/SelectionComposition"
+ }
+ },
+ "required": [
+ "not"
+ ],
+ "type": "object"
+ },
+ "LogicalOr<Predicate>": {
+ "additionalProperties": false,
+ "properties": {
+ "or": {
+ "items": {
+ "$ref": "#/definitions/PredicateComposition"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "or"
+ ],
+ "type": "object"
+ },
+ "SelectionOr": {
+ "additionalProperties": false,
+ "properties": {
+ "or": {
+ "items": {
+ "$ref": "#/definitions/SelectionComposition"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "or"
+ ],
+ "type": "object"
+ },
+ "LookupData": {
+ "additionalProperties": false,
+ "properties": {
+ "data": {
+ "$ref": "#/definitions/Data",
+ "description": "Secondary data source to lookup in."
+ },
+ "fields": {
+ "description": "Fields in foreign data or selection to lookup. If not specified, the entire object is queried.",
+ "items": {
+ "$ref": "#/definitions/FieldName"
+ },
+ "type": "array"
+ },
+ "key": {
+ "$ref": "#/definitions/FieldName",
+ "description": "Key in data to lookup."
+ }
+ },
+ "required": [
+ "data",
+ "key"
+ ],
+ "type": "object"
+ },
+ "LookupSelection": {
+ "additionalProperties": false,
+ "properties": {
+ "fields": {
+ "description": "Fields in foreign data or selection to lookup. If not specified, the entire object is queried.",
+ "items": {
+ "$ref": "#/definitions/FieldName"
+ },
+ "type": "array"
+ },
+ "key": {
+ "$ref": "#/definitions/FieldName",
+ "description": "Key in data to lookup."
+ },
+ "selection": {
+ "description": "Selection name to look up.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "key",
+ "selection"
+ ],
+ "type": "object"
+ },
+ "LookupTransform": {
+ "additionalProperties": false,
+ "properties": {
+ "as": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FieldName"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/FieldName"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "The output fields on which to store the looked up data values.\n\nFor data lookups, this property may be left blank if `from.fields` has been specified (those field names will be used); if `from.fields` has not been specified, `as` must be a string.\n\nFor selection lookups, this property is optional: if unspecified, looked up values will be stored under a property named for the selection; and if specified, it must correspond to `from.fields`."
+ },
+ "default": {
+ "description": "The default value to use if lookup fails.\n\n__Default value:__ `null`",
+ "type": "string"
+ },
+ "from": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LookupData"
+ },
+ {
+ "$ref": "#/definitions/LookupSelection"
+ }
+ ],
+ "description": "Data source or selection for secondary data reference."
+ },
+ "lookup": {
+ "description": "Key in primary data source.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "lookup",
+ "from"
+ ],
+ "type": "object"
+ },
+ "Mark": {
+ "description": "All types of primitive marks.",
+ "enum": [
+ "arc",
+ "area",
+ "bar",
+ "image",
+ "line",
+ "point",
+ "rect",
+ "rule",
+ "text",
+ "tick",
+ "trail",
+ "circle",
+ "square",
+ "geoshape"
+ ],
+ "type": "string"
+ },
+ "MarkConfig<>": {
+ "additionalProperties": false,
+ "properties": {
+ "align": {
+ "$ref": "#/definitions/Align",
+ "description": "The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of `\"left\"`, `\"right\"`, `\"center\"`.\n\n__Note:__ Expression reference is *not* supported for range marks."
+ },
+ "angle": {
+ "description": "The rotation angle of the text, in degrees.",
+ "maximum": 360,
+ "minimum": 0,
+ "type": "number"
+ },
+ "aria": {
+ "description": "A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the \"aria-hidden\" attribute will be set on the output SVG element, removing the mark item from the ARIA accessibility tree.",
+ "type": "boolean"
+ },
+ "ariaRole": {
+ "description": "Sets the type of user interface element of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the \"role\" attribute. Warning: this property is experimental and may be changed in the future.",
+ "type": "string"
+ },
+ "ariaRoleDescription": {
+ "description": "A human-readable, author-localized description for the role of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the \"aria-roledescription\" attribute. Warning: this property is experimental and may be changed in the future.",
+ "type": "string"
+ },
+ "aspect": {
+ "description": "Whether to keep aspect ratio of image marks.",
+ "type": "boolean"
+ },
+ "baseline": {
+ "$ref": "#/definitions/TextBaseline",
+ "description": "For text marks, the vertical text baseline. One of `\"alphabetic\"` (default), `\"top\"`, `\"middle\"`, `\"bottom\"`, `\"line-top\"`, `\"line-bottom\"`, or an expression reference that provides one of the valid values. The `\"line-top\"` and `\"line-bottom\"` values operate similarly to `\"top\"` and `\"bottom\"`, but are calculated relative to the `lineHeight` rather than `fontSize` alone.\n\nFor range marks, the vertical alignment of the marks. One of `\"top\"`, `\"middle\"`, `\"bottom\"`.\n\n__Note:__ Expression reference is *not* supported for range marks."
+ },
+ "blend": {
+ "$ref": "#/definitions/Blend",
+ "description": "The color blend mode for drawing an item on its current background. Any valid [CSS mix-blend-mode](https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode) value can be used.\n\n__Default value: `\"source-over\"`"
+ },
+ "color": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/Gradient"
+ }
+ ],
+ "description": "Default color.\n\n__Default value:__ <span style=\"color: #4682b4;\">&#9632;</span> `\"#4682b4\"`\n\n__Note:__ - This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config). - The `fill` and `stroke` properties have higher precedence than `color` and will override `color`."
+ },
+ "cornerRadius": {
+ "description": "The radius in pixels of rounded rectangles or arcs' corners.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ "cornerRadiusBottomLeft": {
+ "description": "The radius in pixels of rounded rectangles' bottom left corner.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ "cornerRadiusBottomRight": {
+ "description": "The radius in pixels of rounded rectangles' bottom right corner.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ "cornerRadiusTopLeft": {
+ "description": "The radius in pixels of rounded rectangles' top right corner.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ "cornerRadiusTopRight": {
+ "description": "The radius in pixels of rounded rectangles' top left corner.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ "cursor": {
+ "$ref": "#/definitions/Cursor",
+ "description": "The mouse cursor used over the mark. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used."
+ },
+ "description": {
+ "description": "A text description of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the [\"aria-label\" attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute).",
+ "type": "string"
+ },
+ "dir": {
+ "$ref": "#/definitions/TextDirection",
+ "description": "The direction of the text. One of `\"ltr\"` (left-to-right) or `\"rtl\"` (right-to-left). This property determines on which side is truncated in response to the limit parameter.\n\n__Default value:__ `\"ltr\"`"
+ },
+ "dx": {
+ "description": "The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
+ "type": "number"
+ },
+ "dy": {
+ "description": "The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
+ "type": "number"
+ },
+ "ellipsis": {
+ "description": "The ellipsis string for text truncated in response to the limit parameter.\n\n__Default value:__ `\"…\"`",
+ "type": "string"
+ },
+ "endAngle": {
+ "description": "The end angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.",
+ "type": "number"
+ },
+ "fill": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/Gradient"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Default fill color. This property has higher precedence than `config.color`. Set to `null` to remove fill.\n\n__Default value:__ (None)"
+ },
+ "fillOpacity": {
+ "description": "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "filled": {
+ "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `false` for all `point`, `line`, and `rule` marks as well as `geoshape` marks for [`graticule`](https://vega.github.io/vega-lite/docs/data.html#graticule) data sources; otherwise, `true`.\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).",
+ "type": "boolean"
+ },
+ "font": {
+ "description": "The typeface to set the text in (e.g., `\"Helvetica Neue\"`).",
+ "type": "string"
+ },
+ "fontSize": {
+ "description": "The font size, in pixels.\n\n__Default value:__ `11`",
+ "minimum": 0,
+ "type": "number"
+ },
+ "fontStyle": {
+ "$ref": "#/definitions/FontStyle",
+ "description": "The font style (e.g., `\"italic\"`)."
+ },
+ "fontWeight": {
+ "$ref": "#/definitions/FontWeight",
+ "description": "The font weight. This can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)."
+ },
+ "height": {
+ "description": "Height of the marks.",
+ "type": "number"
+ },
+ "href": {
+ "$ref": "#/definitions/URI",
+ "description": "A URL to load upon mouse click. If defined, the mark acts as a hyperlink."
+ },
+ "innerRadius": {
+ "description": "The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`.",
+ "type": "number"
+ },
+ "interpolate": {
+ "$ref": "#/definitions/Interpolate",
+ "description": "The line interpolation method to use for line and area marks. One of the following: - `\"linear\"`: piecewise linear segments, as in a polyline. - `\"linear-closed\"`: close the linear segments to form a polygon. - `\"step\"`: alternate between horizontal and vertical segments, as in a step function. - `\"step-before\"`: alternate between vertical and horizontal segments, as in a step function. - `\"step-after\"`: alternate between horizontal and vertical segments, as in a step function. - `\"basis\"`: a B-spline, with control point duplication on the ends. - `\"basis-open\"`: an open B-spline; may not intersect the start or end. - `\"basis-closed\"`: a closed B-spline, as in a loop. - `\"cardinal\"`: a Cardinal spline, with control point duplication on the ends. - `\"cardinal-open\"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points. - `\"cardinal-closed\"`: a closed Cardinal spline, as in a loop. - `\"bundle\"`: equivalent to basis, except the tension parameter is used to straighten the spline. - `\"monotone\"`: cubic interpolation that preserves monotonicity in y."
+ },
+ "invalid": {
+ "description": "Defines how Vega-Lite should handle marks for invalid values (`null` and `NaN`). - If set to `\"filter\"` (default), all data items with null values will be skipped (for line, trail, and area marks) or filtered (for other marks). - If `null`, all data items are included. In this case, invalid values will be interpreted as zeroes.",
+ "enum": [
+ "filter",
+ null
+ ],
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "limit": {
+ "description": "The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0` -- indicating no limit",
+ "type": "number"
+ },
+ "lineBreak": {
+ "description": "A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property is ignored if the text is array-valued.",
+ "type": "string"
+ },
+ "lineHeight": {
+ "description": "The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.",
+ "type": "number"
+ },
+ "opacity": {
+ "description": "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "order": {
+ "description": "For line and trail marks, this `order` property can be set to `null` or `false` to make the lines use the original order in the data sources.",
+ "type": [
+ "null",
+ "boolean"
+ ]
+ },
+ "orient": {
+ "$ref": "#/definitions/Orientation",
+ "description": "The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical. - For bar, rule and tick, this determines whether the size of the bar and tick should be applied to x or y dimension. - For area, this property determines the orient property of the Vega output. - For line and trail marks, this property determines the sort order of the points in the line if `config.sortLineBy` is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored."
+ },
+ "outerRadius": {
+ "description": "The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`.",
+ "type": "number"
+ },
+ "padAngle": {
+ "description": "The angular padding applied to sides of the arc, in radians.",
+ "type": "number"
+ },
+ "radius": {
+ "description": "For arc mark, the primary (outer) radius in pixels.\n\nFor text marks, polar coordinate radial offset, in pixels, of the text from the origin determined by the `x` and `y` properties.",
+ "type": "number"
+ },
+ "radius2": {
+ "description": "The secondary (inner) radius in pixels of arc marks.",
+ "type": "number"
+ },
+ "shape": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SymbolShape"
+ },
+ {
+ "type": "string"
+ }
+ ],
+ "description": "Shape of the point marks. Supported values include: - plotting shapes: `\"circle\"`, `\"square\"`, `\"cross\"`, `\"diamond\"`, `\"triangle-up\"`, `\"triangle-down\"`, `\"triangle-right\"`, or `\"triangle-left\"`. - the line symbol `\"stroke\"` - centered directional shapes `\"arrow\"`, `\"wedge\"`, or `\"triangle\"` - a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n__Default value:__ `\"circle\"`"
+ },
+ "size": {
+ "description": "Default size for marks. - For `point`/`circle`/`square`, this represents the pixel area of the marks. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value. - For `bar`, this represents the band size of the bar, in pixels. - For `text`, this represents the font size, in pixels.\n\n__Default value:__ - `30` for point, circle, square marks; width/height's `step` - `2` for bar marks with discrete dimensions; - `5` for bar marks with continuous dimensions; - `11` for text marks.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "smooth": {
+ "description": "A boolean flag (default true) indicating if the image should be smoothed when resized. If false, individual pixels should be scaled directly rather than interpolated with smoothing. For SVG rendering, this option may not work in some browsers due to lack of standardization.",
+ "type": "boolean"
+ },
+ "startAngle": {
+ "description": "The start angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.",
+ "type": "number"
+ },
+ "stroke": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/Gradient"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Default stroke color. This property has higher precedence than `config.color`. Set to `null` to remove stroke.\n\n__Default value:__ (None)"
+ },
+ "strokeCap": {
+ "$ref": "#/definitions/StrokeCap",
+ "description": "The stroke cap for line ending style. One of `\"butt\"`, `\"round\"`, or `\"square\"`.\n\n__Default value:__ `\"butt\"`"
+ },
+ "strokeDash": {
+ "description": "An array of alternating stroke, space lengths for creating dashed or dotted lines.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "strokeDashOffset": {
+ "description": "The offset (in pixels) into which to begin drawing with the stroke dash array.",
+ "type": "number"
+ },
+ "strokeJoin": {
+ "$ref": "#/definitions/StrokeJoin",
+ "description": "The stroke line join method. One of `\"miter\"`, `\"round\"` or `\"bevel\"`.\n\n__Default value:__ `\"miter\"`"
+ },
+ "strokeMiterLimit": {
+ "description": "The miter limit at which to bevel a line join.",
+ "type": "number"
+ },
+ "strokeOffset": {
+ "description": "The offset in pixels at which to draw the group stroke and fill. If unspecified, the default behavior is to dynamically offset stroked groups such that 1 pixel stroke widths align with the pixel grid.",
+ "type": "number"
+ },
+ "strokeOpacity": {
+ "description": "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "strokeWidth": {
+ "description": "The stroke width, in pixels.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "tension": {
+ "description": "Depending on the interpolation type, sets the tension parameter (for line and area marks).",
+ "type": "number"
+ },
+ "text": {
+ "$ref": "#/definitions/Text",
+ "description": "Placeholder text if the `text` channel is not specified"
+ },
+ "theta": {
+ "description": "- For arc marks, the arc length in radians if theta2 is not specified, otherwise the start arc angle. (A value of 0 indicates up or “north”, increasing values proceed clockwise.)\n\n- For text marks, polar coordinate angle in radians.",
+ "maximum": 360,
+ "minimum": 0,
+ "type": "number"
+ },
+ "theta2": {
+ "description": "The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise.",
+ "type": "number"
+ },
+ "timeUnitBand": {
+ "description": "Default relative band size for a time unit. If set to `1`, the bandwidth of the marks will be equal to the time unit band step. If set to `0.5`, bandwidth of the marks will be half of the time unit band step.",
+ "type": "number"
+ },
+ "timeUnitBandPosition": {
+ "description": "Default relative band position for a time unit. If set to `0`, the marks will be positioned at the beginning of the time unit band step. If set to `0.5`, the marks will be positioned in the middle of the time unit band step.",
+ "type": "number"
+ },
+ "tooltip": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/TooltipContent"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.\n\n- If `tooltip` is `true` or `{\"content\": \"encoding\"}`, then all fields from `encoding` will be used. - If `tooltip` is `{\"content\": \"data\"}`, then all fields that appear in the highlighted data point will be used. - If set to `null` or `false`, then no tooltip will be used.\n\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip in Vega-Lite.\n\n__Default value:__ `null`"
+ },
+ "url": {
+ "$ref": "#/definitions/URI",
+ "description": "The URL of the image file for image marks."
+ },
+ "width": {
+ "description": "Width of the marks.",
+ "type": "number"
+ },
+ "x": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "width",
+ "type": "string"
+ }
+ ],
+ "description": "X coordinates of the marks, or width of horizontal `\"bar\"` and `\"area\"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "x2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "width",
+ "type": "string"
+ }
+ ],
+ "description": "X2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "y": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "height",
+ "type": "string"
+ }
+ ],
+ "description": "Y coordinates of the marks, or height of vertical `\"bar\"` and `\"area\"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ },
+ "y2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "height",
+ "type": "string"
+ }
+ ],
+ "description": "Y2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ }
+ },
+ "type": "object"
+ },
+ "MarkConfig<ExprOrSignalRef>": {
+ "additionalProperties": false,
+ "properties": {
+ "align": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Align"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ],
+ "description": "The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of `\"left\"`, `\"right\"`, `\"center\"`.\n\n__Note:__ Expression reference is *not* supported for range marks."
+ },
+ "angle": {
+ "anyOf": [
+ {
+ "description": "The rotation angle of the text, in degrees.",
+ "maximum": 360,
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ]
+ },
+ "aria": {
+ "anyOf": [
+ {
+ "description": "A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the \"aria-hidden\" attribute will be set on the output SVG element, removing the mark item from the ARIA accessibility tree.",
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ]
+ },
+ "ariaRole": {
+ "anyOf": [
+ {
+ "description": "Sets the type of user interface element of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the \"role\" attribute. Warning: this property is experimental and may be changed in the future.",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ]
+ },
+ "ariaRoleDescription": {
+ "anyOf": [
+ {
+ "description": "A human-readable, author-localized description for the role of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the \"aria-roledescription\" attribute. Warning: this property is experimental and may be changed in the future.",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ]
+ },
+ "aspect": {
+ "anyOf": [
+ {
+ "description": "Whether to keep aspect ratio of image marks.",
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ]
+ },
+ "baseline": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TextBaseline"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ],
+ "description": "For text marks, the vertical text baseline. One of `\"alphabetic\"` (default), `\"top\"`, `\"middle\"`, `\"bottom\"`, `\"line-top\"`, `\"line-bottom\"`, or an expression reference that provides one of the valid values. The `\"line-top\"` and `\"line-bottom\"` values operate similarly to `\"top\"` and `\"bottom\"`, but are calculated relative to the `lineHeight` rather than `fontSize` alone.\n\nFor range marks, the vertical alignment of the marks. One of `\"top\"`, `\"middle\"`, `\"bottom\"`.\n\n__Note:__ Expression reference is *not* supported for range marks."
+ },
+ "blend": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Blend",
+ "description": "The color blend mode for drawing an item on its current background. Any valid [CSS mix-blend-mode](https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode) value can be used.\n\n__Default value: `\"source-over\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ]
+ },
+ "color": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/Gradient"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ],
+ "description": "Default color.\n\n__Default value:__ <span style=\"color: #4682b4;\">&#9632;</span> `\"#4682b4\"`\n\n__Note:__ - This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config). - The `fill` and `stroke` properties have higher precedence than `color` and will override `color`."
+ },
+ "cornerRadius": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles or arcs' corners.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ]
+ },
+ "cornerRadiusBottomLeft": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles' bottom left corner.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ]
+ },
+ "cornerRadiusBottomRight": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles' bottom right corner.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ]
+ },
+ "cornerRadiusTopLeft": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles' top right corner.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ]
+ },
+ "cornerRadiusTopRight": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles' top left corner.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ]
+ },
+ "cursor": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Cursor",
+ "description": "The mouse cursor used over the mark. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used."
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ]
+ },
+ "description": {
+ "anyOf": [
+ {
+ "description": "A text description of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the [\"aria-label\" attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute).",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ]
+ },
+ "dir": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TextDirection",
+ "description": "The direction of the text. One of `\"ltr\"` (left-to-right) or `\"rtl\"` (right-to-left). This property determines on which side is truncated in response to the limit parameter.\n\n__Default value:__ `\"ltr\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ]
+ },
+ "dx": {
+ "anyOf": [
+ {
+ "description": "The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ]
+ },
+ "dy": {
+ "anyOf": [
+ {
+ "description": "The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ]
+ },
+ "ellipsis": {
+ "anyOf": [
+ {
+ "description": "The ellipsis string for text truncated in response to the limit parameter.\n\n__Default value:__ `\"…\"`",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ]
+ },
+ "endAngle": {
+ "anyOf": [
+ {
+ "description": "The end angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ]
+ },
+ "fill": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/Gradient"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ],
+ "description": "Default fill color. This property has higher precedence than `config.color`. Set to `null` to remove fill.\n\n__Default value:__ (None)"
+ },
+ "fillOpacity": {
+ "anyOf": [
+ {
+ "description": "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ]
+ },
+ "filled": {
+ "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `false` for all `point`, `line`, and `rule` marks as well as `geoshape` marks for [`graticule`](https://vega.github.io/vega-lite/docs/data.html#graticule) data sources; otherwise, `true`.\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).",
+ "type": "boolean"
+ },
+ "font": {
+ "anyOf": [
+ {
+ "description": "The typeface to set the text in (e.g., `\"Helvetica Neue\"`).",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ]
+ },
+ "fontSize": {
+ "anyOf": [
+ {
+ "description": "The font size, in pixels.\n\n__Default value:__ `11`",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ]
+ },
+ "fontStyle": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontStyle",
+ "description": "The font style (e.g., `\"italic\"`)."
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ]
+ },
+ "fontWeight": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontWeight",
+ "description": "The font weight. This can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)."
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ]
+ },
+ "height": {
+ "anyOf": [
+ {
+ "description": "Height of the marks.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ]
+ },
+ "href": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/URI",
+ "description": "A URL to load upon mouse click. If defined, the mark acts as a hyperlink."
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ]
+ },
+ "innerRadius": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ],
+ "description": "The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`."
+ },
+ "interpolate": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Interpolate",
+ "description": "The line interpolation method to use for line and area marks. One of the following: - `\"linear\"`: piecewise linear segments, as in a polyline. - `\"linear-closed\"`: close the linear segments to form a polygon. - `\"step\"`: alternate between horizontal and vertical segments, as in a step function. - `\"step-before\"`: alternate between vertical and horizontal segments, as in a step function. - `\"step-after\"`: alternate between horizontal and vertical segments, as in a step function. - `\"basis\"`: a B-spline, with control point duplication on the ends. - `\"basis-open\"`: an open B-spline; may not intersect the start or end. - `\"basis-closed\"`: a closed B-spline, as in a loop. - `\"cardinal\"`: a Cardinal spline, with control point duplication on the ends. - `\"cardinal-open\"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points. - `\"cardinal-closed\"`: a closed Cardinal spline, as in a loop. - `\"bundle\"`: equivalent to basis, except the tension parameter is used to straighten the spline. - `\"monotone\"`: cubic interpolation that preserves monotonicity in y."
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ]
+ },
+ "invalid": {
+ "description": "Defines how Vega-Lite should handle marks for invalid values (`null` and `NaN`). - If set to `\"filter\"` (default), all data items with null values will be skipped (for line, trail, and area marks) or filtered (for other marks). - If `null`, all data items are included. In this case, invalid values will be interpreted as zeroes.",
+ "enum": [
+ "filter",
+ null
+ ],
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "limit": {
+ "anyOf": [
+ {
+ "description": "The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0` -- indicating no limit",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ]
+ },
+ "lineBreak": {
+ "anyOf": [
+ {
+ "description": "A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property is ignored if the text is array-valued.",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ]
+ },
+ "lineHeight": {
+ "anyOf": [
+ {
+ "description": "The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ]
+ },
+ "opacity": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ],
+ "description": "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.",
+ "maximum": 1,
+ "minimum": 0
+ },
+ "order": {
+ "description": "For line and trail marks, this `order` property can be set to `null` or `false` to make the lines use the original order in the data sources.",
+ "type": [
+ "null",
+ "boolean"
+ ]
+ },
+ "orient": {
+ "$ref": "#/definitions/Orientation",
+ "description": "The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical. - For bar, rule and tick, this determines whether the size of the bar and tick should be applied to x or y dimension. - For area, this property determines the orient property of the Vega output. - For line and trail marks, this property determines the sort order of the points in the line if `config.sortLineBy` is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored."
+ },
+ "outerRadius": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ],
+ "description": "The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`."
+ },
+ "padAngle": {
+ "anyOf": [
+ {
+ "description": "The angular padding applied to sides of the arc, in radians.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ]
+ },
+ "radius": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ],
+ "description": "For arc mark, the primary (outer) radius in pixels.\n\nFor text marks, polar coordinate radial offset, in pixels, of the text from the origin determined by the `x` and `y` properties."
+ },
+ "radius2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ],
+ "description": "The secondary (inner) radius in pixels of arc marks."
+ },
+ "shape": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SymbolShape"
+ },
+ {
+ "type": "string"
+ }
+ ],
+ "description": "Shape of the point marks. Supported values include: - plotting shapes: `\"circle\"`, `\"square\"`, `\"cross\"`, `\"diamond\"`, `\"triangle-up\"`, `\"triangle-down\"`, `\"triangle-right\"`, or `\"triangle-left\"`. - the line symbol `\"stroke\"` - centered directional shapes `\"arrow\"`, `\"wedge\"`, or `\"triangle\"` - a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n__Default value:__ `\"circle\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ]
+ },
+ "size": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ],
+ "description": "Default size for marks. - For `point`/`circle`/`square`, this represents the pixel area of the marks. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value. - For `bar`, this represents the band size of the bar, in pixels. - For `text`, this represents the font size, in pixels.\n\n__Default value:__ - `30` for point, circle, square marks; width/height's `step` - `2` for bar marks with discrete dimensions; - `5` for bar marks with continuous dimensions; - `11` for text marks.",
+ "minimum": 0
+ },
+ "smooth": {
+ "anyOf": [
+ {
+ "description": "A boolean flag (default true) indicating if the image should be smoothed when resized. If false, individual pixels should be scaled directly rather than interpolated with smoothing. For SVG rendering, this option may not work in some browsers due to lack of standardization.",
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ]
+ },
+ "startAngle": {
+ "anyOf": [
+ {
+ "description": "The start angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ]
+ },
+ "stroke": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/Gradient"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ],
+ "description": "Default stroke color. This property has higher precedence than `config.color`. Set to `null` to remove stroke.\n\n__Default value:__ (None)"
+ },
+ "strokeCap": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StrokeCap",
+ "description": "The stroke cap for line ending style. One of `\"butt\"`, `\"round\"`, or `\"square\"`.\n\n__Default value:__ `\"butt\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ]
+ },
+ "strokeDash": {
+ "anyOf": [
+ {
+ "description": "An array of alternating stroke, space lengths for creating dashed or dotted lines.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ]
+ },
+ "strokeDashOffset": {
+ "anyOf": [
+ {
+ "description": "The offset (in pixels) into which to begin drawing with the stroke dash array.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ]
+ },
+ "strokeJoin": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StrokeJoin",
+ "description": "The stroke line join method. One of `\"miter\"`, `\"round\"` or `\"bevel\"`.\n\n__Default value:__ `\"miter\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ]
+ },
+ "strokeMiterLimit": {
+ "anyOf": [
+ {
+ "description": "The miter limit at which to bevel a line join.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ]
+ },
+ "strokeOffset": {
+ "anyOf": [
+ {
+ "description": "The offset in pixels at which to draw the group stroke and fill. If unspecified, the default behavior is to dynamically offset stroked groups such that 1 pixel stroke widths align with the pixel grid.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ]
+ },
+ "strokeOpacity": {
+ "anyOf": [
+ {
+ "description": "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ]
+ },
+ "strokeWidth": {
+ "anyOf": [
+ {
+ "description": "The stroke width, in pixels.",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ]
+ },
+ "tension": {
+ "anyOf": [
+ {
+ "description": "Depending on the interpolation type, sets the tension parameter (for line and area marks).",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ]
+ },
+ "text": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text",
+ "description": "Placeholder text if the `text` channel is not specified"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ]
+ },
+ "theta": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ],
+ "description": "- For arc marks, the arc length in radians if theta2 is not specified, otherwise the start arc angle. (A value of 0 indicates up or “north”, increasing values proceed clockwise.)\n\n- For text marks, polar coordinate angle in radians.",
+ "maximum": 360,
+ "minimum": 0
+ },
+ "theta2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ],
+ "description": "The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise."
+ },
+ "timeUnitBand": {
+ "description": "Default relative band size for a time unit. If set to `1`, the bandwidth of the marks will be equal to the time unit band step. If set to `0.5`, bandwidth of the marks will be half of the time unit band step.",
+ "type": "number"
+ },
+ "timeUnitBandPosition": {
+ "description": "Default relative band position for a time unit. If set to `0`, the marks will be positioned at the beginning of the time unit band step. If set to `0.5`, the marks will be positioned in the middle of the time unit band step.",
+ "type": "number"
+ },
+ "tooltip": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/TooltipContent"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.\n\n- If `tooltip` is `true` or `{\"content\": \"encoding\"}`, then all fields from `encoding` will be used. - If `tooltip` is `{\"content\": \"data\"}`, then all fields that appear in the highlighted data point will be used. - If set to `null` or `false`, then no tooltip will be used.\n\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip in Vega-Lite.\n\n__Default value:__ `null`"
+ },
+ "url": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/URI",
+ "description": "The URL of the image file for image marks."
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ]
+ },
+ "width": {
+ "anyOf": [
+ {
+ "description": "Width of the marks.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ]
+ },
+ "x": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "width",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ],
+ "description": "X coordinates of the marks, or width of horizontal `\"bar\"` and `\"area\"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "x2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "width",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ],
+ "description": "X2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "y": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "height",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ],
+ "description": "Y coordinates of the marks, or height of vertical `\"bar\"` and `\"area\"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ },
+ "y2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "height",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprOrSignalRef"
+ }
+ ],
+ "description": "Y2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ }
+ },
+ "type": "object"
+ },
+ "MarkConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "align": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Align"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of `\"left\"`, `\"right\"`, `\"center\"`.\n\n__Note:__ Expression reference is *not* supported for range marks."
+ },
+ "angle": {
+ "anyOf": [
+ {
+ "description": "The rotation angle of the text, in degrees.",
+ "maximum": 360,
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "aria": {
+ "anyOf": [
+ {
+ "description": "A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the \"aria-hidden\" attribute will be set on the output SVG element, removing the mark item from the ARIA accessibility tree.",
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "ariaRole": {
+ "anyOf": [
+ {
+ "description": "Sets the type of user interface element of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the \"role\" attribute. Warning: this property is experimental and may be changed in the future.",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "ariaRoleDescription": {
+ "anyOf": [
+ {
+ "description": "A human-readable, author-localized description for the role of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the \"aria-roledescription\" attribute. Warning: this property is experimental and may be changed in the future.",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "aspect": {
+ "anyOf": [
+ {
+ "description": "Whether to keep aspect ratio of image marks.",
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "baseline": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TextBaseline"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "For text marks, the vertical text baseline. One of `\"alphabetic\"` (default), `\"top\"`, `\"middle\"`, `\"bottom\"`, `\"line-top\"`, `\"line-bottom\"`, or an expression reference that provides one of the valid values. The `\"line-top\"` and `\"line-bottom\"` values operate similarly to `\"top\"` and `\"bottom\"`, but are calculated relative to the `lineHeight` rather than `fontSize` alone.\n\nFor range marks, the vertical alignment of the marks. One of `\"top\"`, `\"middle\"`, `\"bottom\"`.\n\n__Note:__ Expression reference is *not* supported for range marks."
+ },
+ "blend": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Blend",
+ "description": "The color blend mode for drawing an item on its current background. Any valid [CSS mix-blend-mode](https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode) value can be used.\n\n__Default value: `\"source-over\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "color": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/Gradient"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Default color.\n\n__Default value:__ <span style=\"color: #4682b4;\">&#9632;</span> `\"#4682b4\"`\n\n__Note:__ - This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config). - The `fill` and `stroke` properties have higher precedence than `color` and will override `color`."
+ },
+ "cornerRadius": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles or arcs' corners.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "cornerRadiusBottomLeft": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles' bottom left corner.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "cornerRadiusBottomRight": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles' bottom right corner.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "cornerRadiusTopLeft": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles' top right corner.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "cornerRadiusTopRight": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles' top left corner.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "cursor": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Cursor",
+ "description": "The mouse cursor used over the mark. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "description": {
+ "anyOf": [
+ {
+ "description": "A text description of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the [\"aria-label\" attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute).",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "dir": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TextDirection",
+ "description": "The direction of the text. One of `\"ltr\"` (left-to-right) or `\"rtl\"` (right-to-left). This property determines on which side is truncated in response to the limit parameter.\n\n__Default value:__ `\"ltr\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "dx": {
+ "anyOf": [
+ {
+ "description": "The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "dy": {
+ "anyOf": [
+ {
+ "description": "The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "ellipsis": {
+ "anyOf": [
+ {
+ "description": "The ellipsis string for text truncated in response to the limit parameter.\n\n__Default value:__ `\"…\"`",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "endAngle": {
+ "anyOf": [
+ {
+ "description": "The end angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "fill": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/Gradient"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Default fill color. This property has higher precedence than `config.color`. Set to `null` to remove fill.\n\n__Default value:__ (None)"
+ },
+ "fillOpacity": {
+ "anyOf": [
+ {
+ "description": "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "filled": {
+ "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `false` for all `point`, `line`, and `rule` marks as well as `geoshape` marks for [`graticule`](https://vega.github.io/vega-lite/docs/data.html#graticule) data sources; otherwise, `true`.\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).",
+ "type": "boolean"
+ },
+ "font": {
+ "anyOf": [
+ {
+ "description": "The typeface to set the text in (e.g., `\"Helvetica Neue\"`).",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "fontSize": {
+ "anyOf": [
+ {
+ "description": "The font size, in pixels.\n\n__Default value:__ `11`",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "fontStyle": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontStyle",
+ "description": "The font style (e.g., `\"italic\"`)."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "fontWeight": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontWeight",
+ "description": "The font weight. This can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "height": {
+ "anyOf": [
+ {
+ "description": "Height of the marks.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "href": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/URI",
+ "description": "A URL to load upon mouse click. If defined, the mark acts as a hyperlink."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "innerRadius": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`."
+ },
+ "interpolate": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Interpolate",
+ "description": "The line interpolation method to use for line and area marks. One of the following: - `\"linear\"`: piecewise linear segments, as in a polyline. - `\"linear-closed\"`: close the linear segments to form a polygon. - `\"step\"`: alternate between horizontal and vertical segments, as in a step function. - `\"step-before\"`: alternate between vertical and horizontal segments, as in a step function. - `\"step-after\"`: alternate between horizontal and vertical segments, as in a step function. - `\"basis\"`: a B-spline, with control point duplication on the ends. - `\"basis-open\"`: an open B-spline; may not intersect the start or end. - `\"basis-closed\"`: a closed B-spline, as in a loop. - `\"cardinal\"`: a Cardinal spline, with control point duplication on the ends. - `\"cardinal-open\"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points. - `\"cardinal-closed\"`: a closed Cardinal spline, as in a loop. - `\"bundle\"`: equivalent to basis, except the tension parameter is used to straighten the spline. - `\"monotone\"`: cubic interpolation that preserves monotonicity in y."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "invalid": {
+ "description": "Defines how Vega-Lite should handle marks for invalid values (`null` and `NaN`). - If set to `\"filter\"` (default), all data items with null values will be skipped (for line, trail, and area marks) or filtered (for other marks). - If `null`, all data items are included. In this case, invalid values will be interpreted as zeroes.",
+ "enum": [
+ "filter",
+ null
+ ],
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "limit": {
+ "anyOf": [
+ {
+ "description": "The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0` -- indicating no limit",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "lineBreak": {
+ "anyOf": [
+ {
+ "description": "A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property is ignored if the text is array-valued.",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "lineHeight": {
+ "anyOf": [
+ {
+ "description": "The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "opacity": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.",
+ "maximum": 1,
+ "minimum": 0
+ },
+ "order": {
+ "description": "For line and trail marks, this `order` property can be set to `null` or `false` to make the lines use the original order in the data sources.",
+ "type": [
+ "null",
+ "boolean"
+ ]
+ },
+ "orient": {
+ "$ref": "#/definitions/Orientation",
+ "description": "The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical. - For bar, rule and tick, this determines whether the size of the bar and tick should be applied to x or y dimension. - For area, this property determines the orient property of the Vega output. - For line and trail marks, this property determines the sort order of the points in the line if `config.sortLineBy` is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored."
+ },
+ "outerRadius": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`."
+ },
+ "padAngle": {
+ "anyOf": [
+ {
+ "description": "The angular padding applied to sides of the arc, in radians.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "radius": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "For arc mark, the primary (outer) radius in pixels.\n\nFor text marks, polar coordinate radial offset, in pixels, of the text from the origin determined by the `x` and `y` properties."
+ },
+ "radius2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The secondary (inner) radius in pixels of arc marks."
+ },
+ "shape": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SymbolShape"
+ },
+ {
+ "type": "string"
+ }
+ ],
+ "description": "Shape of the point marks. Supported values include: - plotting shapes: `\"circle\"`, `\"square\"`, `\"cross\"`, `\"diamond\"`, `\"triangle-up\"`, `\"triangle-down\"`, `\"triangle-right\"`, or `\"triangle-left\"`. - the line symbol `\"stroke\"` - centered directional shapes `\"arrow\"`, `\"wedge\"`, or `\"triangle\"` - a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n__Default value:__ `\"circle\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "size": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Default size for marks. - For `point`/`circle`/`square`, this represents the pixel area of the marks. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value. - For `bar`, this represents the band size of the bar, in pixels. - For `text`, this represents the font size, in pixels.\n\n__Default value:__ - `30` for point, circle, square marks; width/height's `step` - `2` for bar marks with discrete dimensions; - `5` for bar marks with continuous dimensions; - `11` for text marks.",
+ "minimum": 0
+ },
+ "smooth": {
+ "anyOf": [
+ {
+ "description": "A boolean flag (default true) indicating if the image should be smoothed when resized. If false, individual pixels should be scaled directly rather than interpolated with smoothing. For SVG rendering, this option may not work in some browsers due to lack of standardization.",
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "startAngle": {
+ "anyOf": [
+ {
+ "description": "The start angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "stroke": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/Gradient"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Default stroke color. This property has higher precedence than `config.color`. Set to `null` to remove stroke.\n\n__Default value:__ (None)"
+ },
+ "strokeCap": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StrokeCap",
+ "description": "The stroke cap for line ending style. One of `\"butt\"`, `\"round\"`, or `\"square\"`.\n\n__Default value:__ `\"butt\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeDash": {
+ "anyOf": [
+ {
+ "description": "An array of alternating stroke, space lengths for creating dashed or dotted lines.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeDashOffset": {
+ "anyOf": [
+ {
+ "description": "The offset (in pixels) into which to begin drawing with the stroke dash array.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeJoin": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StrokeJoin",
+ "description": "The stroke line join method. One of `\"miter\"`, `\"round\"` or `\"bevel\"`.\n\n__Default value:__ `\"miter\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeMiterLimit": {
+ "anyOf": [
+ {
+ "description": "The miter limit at which to bevel a line join.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeOffset": {
+ "anyOf": [
+ {
+ "description": "The offset in pixels at which to draw the group stroke and fill. If unspecified, the default behavior is to dynamically offset stroked groups such that 1 pixel stroke widths align with the pixel grid.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeOpacity": {
+ "anyOf": [
+ {
+ "description": "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeWidth": {
+ "anyOf": [
+ {
+ "description": "The stroke width, in pixels.",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "tension": {
+ "anyOf": [
+ {
+ "description": "Depending on the interpolation type, sets the tension parameter (for line and area marks).",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "text": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text",
+ "description": "Placeholder text if the `text` channel is not specified"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "theta": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "- For arc marks, the arc length in radians if theta2 is not specified, otherwise the start arc angle. (A value of 0 indicates up or “north”, increasing values proceed clockwise.)\n\n- For text marks, polar coordinate angle in radians.",
+ "maximum": 360,
+ "minimum": 0
+ },
+ "theta2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise."
+ },
+ "timeUnitBand": {
+ "description": "Default relative band size for a time unit. If set to `1`, the bandwidth of the marks will be equal to the time unit band step. If set to `0.5`, bandwidth of the marks will be half of the time unit band step.",
+ "type": "number"
+ },
+ "timeUnitBandPosition": {
+ "description": "Default relative band position for a time unit. If set to `0`, the marks will be positioned at the beginning of the time unit band step. If set to `0.5`, the marks will be positioned in the middle of the time unit band step.",
+ "type": "number"
+ },
+ "tooltip": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/TooltipContent"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.\n\n- If `tooltip` is `true` or `{\"content\": \"encoding\"}`, then all fields from `encoding` will be used. - If `tooltip` is `{\"content\": \"data\"}`, then all fields that appear in the highlighted data point will be used. - If set to `null` or `false`, then no tooltip will be used.\n\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip in Vega-Lite.\n\n__Default value:__ `null`"
+ },
+ "url": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/URI",
+ "description": "The URL of the image file for image marks."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "width": {
+ "anyOf": [
+ {
+ "description": "Width of the marks.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "x": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "width",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "X coordinates of the marks, or width of horizontal `\"bar\"` and `\"area\"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "x2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "width",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "X2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "y": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "height",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Y coordinates of the marks, or height of vertical `\"bar\"` and `\"area\"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ },
+ "y2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "height",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Y2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ }
+ },
+ "type": "object"
+ },
+ "MarkDef": {
+ "additionalProperties": false,
+ "properties": {
+ "align": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Align"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of `\"left\"`, `\"right\"`, `\"center\"`.\n\n__Note:__ Expression reference is *not* supported for range marks."
+ },
+ "angle": {
+ "anyOf": [
+ {
+ "description": "The rotation angle of the text, in degrees.",
+ "maximum": 360,
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "aria": {
+ "anyOf": [
+ {
+ "description": "A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the \"aria-hidden\" attribute will be set on the output SVG element, removing the mark item from the ARIA accessibility tree.",
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "ariaRole": {
+ "anyOf": [
+ {
+ "description": "Sets the type of user interface element of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the \"role\" attribute. Warning: this property is experimental and may be changed in the future.",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "ariaRoleDescription": {
+ "anyOf": [
+ {
+ "description": "A human-readable, author-localized description for the role of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the \"aria-roledescription\" attribute. Warning: this property is experimental and may be changed in the future.",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "aspect": {
+ "anyOf": [
+ {
+ "description": "Whether to keep aspect ratio of image marks.",
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "bandSize": {
+ "description": "The width of the ticks.\n\n__Default value:__ 3/4 of step (width step for horizontal ticks and height step for vertical ticks).",
+ "minimum": 0,
+ "type": "number"
+ },
+ "baseline": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TextBaseline"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "For text marks, the vertical text baseline. One of `\"alphabetic\"` (default), `\"top\"`, `\"middle\"`, `\"bottom\"`, `\"line-top\"`, `\"line-bottom\"`, or an expression reference that provides one of the valid values. The `\"line-top\"` and `\"line-bottom\"` values operate similarly to `\"top\"` and `\"bottom\"`, but are calculated relative to the `lineHeight` rather than `fontSize` alone.\n\nFor range marks, the vertical alignment of the marks. One of `\"top\"`, `\"middle\"`, `\"bottom\"`.\n\n__Note:__ Expression reference is *not* supported for range marks."
+ },
+ "binSpacing": {
+ "description": "Offset between bars for binned field. The ideal value for this is either 0 (preferred by statisticians) or 1 (Vega-Lite default, D3 example style).\n\n__Default value:__ `1`",
+ "minimum": 0,
+ "type": "number"
+ },
+ "blend": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Blend",
+ "description": "The color blend mode for drawing an item on its current background. Any valid [CSS mix-blend-mode](https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode) value can be used.\n\n__Default value: `\"source-over\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "clip": {
+ "description": "Whether a mark be clipped to the enclosing group’s width and height.",
+ "type": "boolean"
+ },
+ "color": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/Gradient"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Default color.\n\n__Default value:__ <span style=\"color: #4682b4;\">&#9632;</span> `\"#4682b4\"`\n\n__Note:__ - This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config). - The `fill` and `stroke` properties have higher precedence than `color` and will override `color`."
+ },
+ "continuousBandSize": {
+ "description": "The default size of the bars on continuous scales.\n\n__Default value:__ `5`",
+ "minimum": 0,
+ "type": "number"
+ },
+ "cornerRadius": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles or arcs' corners.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "cornerRadiusBottomLeft": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles' bottom left corner.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "cornerRadiusBottomRight": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles' bottom right corner.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "cornerRadiusEnd": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "- For vertical bars, top-left and top-right corner radius. - For horizontal bars, top-right and bottom-right corner radius."
+ },
+ "cornerRadiusTopLeft": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles' top right corner.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "cornerRadiusTopRight": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles' top left corner.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "cursor": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Cursor",
+ "description": "The mouse cursor used over the mark. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "description": {
+ "anyOf": [
+ {
+ "description": "A text description of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the [\"aria-label\" attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute).",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "dir": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TextDirection",
+ "description": "The direction of the text. One of `\"ltr\"` (left-to-right) or `\"rtl\"` (right-to-left). This property determines on which side is truncated in response to the limit parameter.\n\n__Default value:__ `\"ltr\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "discreteBandSize": {
+ "description": "The default size of the bars with discrete dimensions. If unspecified, the default size is `step-2`, which provides 2 pixel offset between bars.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "dx": {
+ "anyOf": [
+ {
+ "description": "The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "dy": {
+ "anyOf": [
+ {
+ "description": "The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "ellipsis": {
+ "anyOf": [
+ {
+ "description": "The ellipsis string for text truncated in response to the limit parameter.\n\n__Default value:__ `\"…\"`",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "fill": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/Gradient"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Default fill color. This property has higher precedence than `config.color`. Set to `null` to remove fill.\n\n__Default value:__ (None)"
+ },
+ "fillOpacity": {
+ "anyOf": [
+ {
+ "description": "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "filled": {
+ "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `false` for all `point`, `line`, and `rule` marks as well as `geoshape` marks for [`graticule`](https://vega.github.io/vega-lite/docs/data.html#graticule) data sources; otherwise, `true`.\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).",
+ "type": "boolean"
+ },
+ "font": {
+ "anyOf": [
+ {
+ "description": "The typeface to set the text in (e.g., `\"Helvetica Neue\"`).",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "fontSize": {
+ "anyOf": [
+ {
+ "description": "The font size, in pixels.\n\n__Default value:__ `11`",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "fontStyle": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontStyle",
+ "description": "The font style (e.g., `\"italic\"`)."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "fontWeight": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontWeight",
+ "description": "The font weight. This can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "height": {
+ "anyOf": [
+ {
+ "description": "Height of the marks.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "href": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/URI",
+ "description": "A URL to load upon mouse click. If defined, the mark acts as a hyperlink."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "innerRadius": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`."
+ },
+ "interpolate": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Interpolate",
+ "description": "The line interpolation method to use for line and area marks. One of the following: - `\"linear\"`: piecewise linear segments, as in a polyline. - `\"linear-closed\"`: close the linear segments to form a polygon. - `\"step\"`: alternate between horizontal and vertical segments, as in a step function. - `\"step-before\"`: alternate between vertical and horizontal segments, as in a step function. - `\"step-after\"`: alternate between horizontal and vertical segments, as in a step function. - `\"basis\"`: a B-spline, with control point duplication on the ends. - `\"basis-open\"`: an open B-spline; may not intersect the start or end. - `\"basis-closed\"`: a closed B-spline, as in a loop. - `\"cardinal\"`: a Cardinal spline, with control point duplication on the ends. - `\"cardinal-open\"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points. - `\"cardinal-closed\"`: a closed Cardinal spline, as in a loop. - `\"bundle\"`: equivalent to basis, except the tension parameter is used to straighten the spline. - `\"monotone\"`: cubic interpolation that preserves monotonicity in y."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "invalid": {
+ "description": "Defines how Vega-Lite should handle marks for invalid values (`null` and `NaN`). - If set to `\"filter\"` (default), all data items with null values will be skipped (for line, trail, and area marks) or filtered (for other marks). - If `null`, all data items are included. In this case, invalid values will be interpreted as zeroes.",
+ "enum": [
+ "filter",
+ null
+ ],
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "limit": {
+ "anyOf": [
+ {
+ "description": "The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0` -- indicating no limit",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "line": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/OverlayMarkDef"
+ }
+ ],
+ "description": "A flag for overlaying line on top of area marks, or an object defining the properties of the overlayed lines.\n\n- If this value is an empty object (`{}`) or `true`, lines with default properties will be used.\n\n- If this value is `false`, no lines would be automatically added to area marks.\n\n__Default value:__ `false`."
+ },
+ "lineBreak": {
+ "anyOf": [
+ {
+ "description": "A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property is ignored if the text is array-valued.",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "lineHeight": {
+ "anyOf": [
+ {
+ "description": "The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "opacity": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.",
+ "maximum": 1,
+ "minimum": 0
+ },
+ "order": {
+ "description": "For line and trail marks, this `order` property can be set to `null` or `false` to make the lines use the original order in the data sources.",
+ "type": [
+ "null",
+ "boolean"
+ ]
+ },
+ "orient": {
+ "$ref": "#/definitions/Orientation",
+ "description": "The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical. - For bar, rule and tick, this determines whether the size of the bar and tick should be applied to x or y dimension. - For area, this property determines the orient property of the Vega output. - For line and trail marks, this property determines the sort order of the points in the line if `config.sortLineBy` is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored."
+ },
+ "outerRadius": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`."
+ },
+ "padAngle": {
+ "anyOf": [
+ {
+ "description": "The angular padding applied to sides of the arc, in radians.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "point": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/OverlayMarkDef"
+ },
+ {
+ "const": "transparent",
+ "type": "string"
+ }
+ ],
+ "description": "A flag for overlaying points on top of line or area marks, or an object defining the properties of the overlayed points.\n\n- If this property is `\"transparent\"`, transparent points will be used (for enhancing tooltips and selections).\n\n- If this property is an empty object (`{}`) or `true`, filled points with default properties will be used.\n\n- If this property is `false`, no points would be automatically added to line or area marks.\n\n__Default value:__ `false`."
+ },
+ "radius": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "For arc mark, the primary (outer) radius in pixels.\n\nFor text marks, polar coordinate radial offset, in pixels, of the text from the origin determined by the `x` and `y` properties."
+ },
+ "radius2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The secondary (inner) radius in pixels of arc marks."
+ },
+ "radius2Offset": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Offset for radius2."
+ },
+ "radiusOffset": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Offset for radius."
+ },
+ "shape": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SymbolShape"
+ },
+ {
+ "type": "string"
+ }
+ ],
+ "description": "Shape of the point marks. Supported values include: - plotting shapes: `\"circle\"`, `\"square\"`, `\"cross\"`, `\"diamond\"`, `\"triangle-up\"`, `\"triangle-down\"`, `\"triangle-right\"`, or `\"triangle-left\"`. - the line symbol `\"stroke\"` - centered directional shapes `\"arrow\"`, `\"wedge\"`, or `\"triangle\"` - a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n__Default value:__ `\"circle\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "size": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Default size for marks. - For `point`/`circle`/`square`, this represents the pixel area of the marks. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value. - For `bar`, this represents the band size of the bar, in pixels. - For `text`, this represents the font size, in pixels.\n\n__Default value:__ - `30` for point, circle, square marks; width/height's `step` - `2` for bar marks with discrete dimensions; - `5` for bar marks with continuous dimensions; - `11` for text marks.",
+ "minimum": 0
+ },
+ "smooth": {
+ "anyOf": [
+ {
+ "description": "A boolean flag (default true) indicating if the image should be smoothed when resized. If false, individual pixels should be scaled directly rather than interpolated with smoothing. For SVG rendering, this option may not work in some browsers due to lack of standardization.",
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "stroke": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/Gradient"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Default stroke color. This property has higher precedence than `config.color`. Set to `null` to remove stroke.\n\n__Default value:__ (None)"
+ },
+ "strokeCap": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StrokeCap",
+ "description": "The stroke cap for line ending style. One of `\"butt\"`, `\"round\"`, or `\"square\"`.\n\n__Default value:__ `\"butt\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeDash": {
+ "anyOf": [
+ {
+ "description": "An array of alternating stroke, space lengths for creating dashed or dotted lines.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeDashOffset": {
+ "anyOf": [
+ {
+ "description": "The offset (in pixels) into which to begin drawing with the stroke dash array.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeJoin": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StrokeJoin",
+ "description": "The stroke line join method. One of `\"miter\"`, `\"round\"` or `\"bevel\"`.\n\n__Default value:__ `\"miter\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeMiterLimit": {
+ "anyOf": [
+ {
+ "description": "The miter limit at which to bevel a line join.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeOffset": {
+ "anyOf": [
+ {
+ "description": "The offset in pixels at which to draw the group stroke and fill. If unspecified, the default behavior is to dynamically offset stroked groups such that 1 pixel stroke widths align with the pixel grid.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeOpacity": {
+ "anyOf": [
+ {
+ "description": "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeWidth": {
+ "anyOf": [
+ {
+ "description": "The stroke width, in pixels.",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "style": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "A string or array of strings indicating the name of custom styles to apply to the mark. A style is a named collection of mark property defaults defined within the [style configuration](https://vega.github.io/vega-lite/docs/mark.html#style-config). If style is an array, later styles will override earlier styles. Any [mark properties](https://vega.github.io/vega-lite/docs/encoding.html#mark-prop) explicitly defined within the `encoding` will override a style default.\n\n__Default value:__ The mark's name. For example, a bar mark will have style `\"bar\"` by default. __Note:__ Any specified style will augment the default style. For example, a bar mark with `\"style\": \"foo\"` will receive from `config.style.bar` and `config.style.foo` (the specified style `\"foo\"` has higher precedence)."
+ },
+ "tension": {
+ "anyOf": [
+ {
+ "description": "Depending on the interpolation type, sets the tension parameter (for line and area marks).",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "text": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text",
+ "description": "Placeholder text if the `text` channel is not specified"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "theta": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "- For arc marks, the arc length in radians if theta2 is not specified, otherwise the start arc angle. (A value of 0 indicates up or “north”, increasing values proceed clockwise.)\n\n- For text marks, polar coordinate angle in radians.",
+ "maximum": 360,
+ "minimum": 0
+ },
+ "theta2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise."
+ },
+ "theta2Offset": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Offset for theta2."
+ },
+ "thetaOffset": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Offset for theta."
+ },
+ "thickness": {
+ "description": "Thickness of the tick mark.\n\n__Default value:__ `1`",
+ "minimum": 0,
+ "type": "number"
+ },
+ "timeUnitBand": {
+ "description": "Default relative band size for a time unit. If set to `1`, the bandwidth of the marks will be equal to the time unit band step. If set to `0.5`, bandwidth of the marks will be half of the time unit band step.",
+ "type": "number"
+ },
+ "timeUnitBandPosition": {
+ "description": "Default relative band position for a time unit. If set to `0`, the marks will be positioned at the beginning of the time unit band step. If set to `0.5`, the marks will be positioned in the middle of the time unit band step.",
+ "type": "number"
+ },
+ "tooltip": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/TooltipContent"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.\n\n- If `tooltip` is `true` or `{\"content\": \"encoding\"}`, then all fields from `encoding` will be used. - If `tooltip` is `{\"content\": \"data\"}`, then all fields that appear in the highlighted data point will be used. - If set to `null` or `false`, then no tooltip will be used.\n\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip in Vega-Lite.\n\n__Default value:__ `null`"
+ },
+ "type": {
+ "$ref": "#/definitions/Mark",
+ "description": "The mark type. This could a primitive mark type (one of `\"bar\"`, `\"circle\"`, `\"square\"`, `\"tick\"`, `\"line\"`, `\"area\"`, `\"point\"`, `\"geoshape\"`, `\"rule\"`, and `\"text\"`) or a composite mark type (`\"boxplot\"`, `\"errorband\"`, `\"errorbar\"`)."
+ },
+ "url": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/URI",
+ "description": "The URL of the image file for image marks."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "width": {
+ "anyOf": [
+ {
+ "description": "Width of the marks.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "x": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "width",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "X coordinates of the marks, or width of horizontal `\"bar\"` and `\"area\"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "x2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "width",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "X2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "x2Offset": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Offset for x2-position."
+ },
+ "xOffset": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Offset for x-position."
+ },
+ "y": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "height",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Y coordinates of the marks, or height of vertical `\"bar\"` and `\"area\"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ },
+ "y2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "height",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Y2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ },
+ "y2Offset": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Offset for y2-position."
+ },
+ "yOffset": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Offset for y-position."
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "type": "object"
+ },
+ "MarkPropDef<(Gradient|string|null)>": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FieldOrDatumDefWithCondition<MarkPropFieldDef,(Gradient|string|null)>"
+ },
+ {
+ "$ref": "#/definitions/FieldOrDatumDefWithCondition<DatumDef,(Gradient|string|null)>"
+ },
+ {
+ "$ref": "#/definitions/ValueDefWithCondition<MarkPropFieldOrDatumDef,(Gradient|string|null)>"
+ }
+ ]
+ },
+ "MarkPropDef<(string|null),TypeForShape>": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FieldOrDatumDefWithCondition<MarkPropFieldDef<TypeForShape>,(string|null)>"
+ },
+ {
+ "$ref": "#/definitions/FieldOrDatumDefWithCondition<DatumDef,(string|null)>"
+ },
+ {
+ "$ref": "#/definitions/ValueDefWithCondition<MarkPropFieldOrDatumDef<TypeForShape>,(string|null)>"
+ }
+ ]
+ },
+ "MarkPropDef<number>": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FieldOrDatumDefWithCondition<MarkPropFieldDef,number>"
+ },
+ {
+ "$ref": "#/definitions/FieldOrDatumDefWithCondition<DatumDef,number>"
+ },
+ {
+ "$ref": "#/definitions/ValueDefWithCondition<MarkPropFieldOrDatumDef,number>"
+ }
+ ]
+ },
+ "MarkPropDef<number[]>": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FieldOrDatumDefWithCondition<MarkPropFieldDef,number[]>"
+ },
+ {
+ "$ref": "#/definitions/FieldOrDatumDefWithCondition<DatumDef,number[]>"
+ },
+ {
+ "$ref": "#/definitions/ValueDefWithCondition<MarkPropFieldOrDatumDef,number[]>"
+ }
+ ]
+ },
+ "MarkType": {
+ "enum": [
+ "arc",
+ "area",
+ "image",
+ "group",
+ "line",
+ "path",
+ "rect",
+ "rule",
+ "shape",
+ "symbol",
+ "text",
+ "trail"
+ ],
+ "type": "string"
+ },
+ "MergedStream": {
+ "additionalProperties": false,
+ "properties": {
+ "between": {
+ "items": {
+ "$ref": "#/definitions/Stream"
+ },
+ "type": "array"
+ },
+ "consume": {
+ "type": "boolean"
+ },
+ "debounce": {
+ "type": "number"
+ },
+ "filter": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Expr"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/Expr"
+ },
+ "type": "array"
+ }
+ ]
+ },
+ "markname": {
+ "type": "string"
+ },
+ "marktype": {
+ "$ref": "#/definitions/MarkType"
+ },
+ "merge": {
+ "items": {
+ "$ref": "#/definitions/Stream"
+ },
+ "type": "array"
+ },
+ "throttle": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "merge"
+ ],
+ "type": "object"
+ },
+ "Month": {
+ "maximum": 12,
+ "minimum": 1,
+ "type": "number"
+ },
+ "MultiSelection": {
+ "additionalProperties": false,
+ "properties": {
+ "bind": {
+ "$ref": "#/definitions/LegendBinding",
+ "description": "When set, a selection is populated by interacting with the corresponding legend. Direct manipulation interaction is disabled by default; to re-enable it, set the selection's [`on`](https://vega.github.io/vega-lite/docs/selection.html#common-selection-properties) property.\n\nLegend bindings are restricted to selections that only specify a single field or encoding."
+ },
+ "clear": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Stream"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "description": "Clears the selection, emptying it of all values. Can be a [Event Stream](https://vega.github.io/vega/docs/event-streams/) or `false` to disable.\n\n__Default value:__ `dblclick`.\n\n__See also:__ [`clear`](https://vega.github.io/vega-lite/docs/clear.html) documentation."
+ },
+ "empty": {
+ "description": "By default, `all` data values are considered to lie within an empty selection. When set to `none`, empty selections contain no data values.",
+ "enum": [
+ "all",
+ "none"
+ ],
+ "type": "string"
+ },
+ "encodings": {
+ "description": "An array of encoding channels. The corresponding data field values must match for a data tuple to fall within the selection.\n\n__See also:__ [`encodings`](https://vega.github.io/vega-lite/docs/project.html) documentation.",
+ "items": {
+ "$ref": "#/definitions/SingleDefUnitChannel"
+ },
+ "type": "array"
+ },
+ "fields": {
+ "description": "An array of field names whose values must match for a data tuple to fall within the selection.\n\n__See also:__ [`fields`](https://vega.github.io/vega-lite/docs/project.html) documentation.",
+ "items": {
+ "$ref": "#/definitions/FieldName"
+ },
+ "type": "array"
+ },
+ "init": {
+ "description": "Initialize the selection with a mapping between [projected channels or field names](https://vega.github.io/vega-lite/docs/project.html) and an initial value (or array of values).\n\n__See also:__ [`init`](https://vega.github.io/vega-lite/docs/init.html) documentation.",
+ "items": {
+ "$ref": "#/definitions/SelectionInitMapping"
+ },
+ "type": "array"
+ },
+ "nearest": {
+ "description": "When true, an invisible voronoi diagram is computed to accelerate discrete selection. The data value _nearest_ the mouse cursor is added to the selection.\n\n__See also:__ [`nearest`](https://vega.github.io/vega-lite/docs/nearest.html) documentation.",
+ "type": "boolean"
+ },
+ "on": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Stream"
+ },
+ {
+ "type": "string"
+ }
+ ],
+ "description": "A [Vega event stream](https://vega.github.io/vega/docs/event-streams/) (object or selector) that triggers the selection. For interval selections, the event stream must specify a [start and end](https://vega.github.io/vega/docs/event-streams/#between-filters)."
+ },
+ "resolve": {
+ "$ref": "#/definitions/SelectionResolution",
+ "description": "With layered and multi-view displays, a strategy that determines how selections' data queries are resolved when applied in a filter transform, conditional encoding rule, or scale domain.\n\n__See also:__ [`resolve`](https://vega.github.io/vega-lite/docs/selection-resolve.html) documentation."
+ },
+ "toggle": {
+ "description": "Controls whether data values should be toggled or only ever inserted into multi selections. Can be `true`, `false` (for insertion only), or a [Vega expression](https://vega.github.io/vega/docs/expressions/).\n\n__Default value:__ `true`, which corresponds to `event.shiftKey` (i.e., data values are toggled when a user interacts with the shift-key pressed).\n\nSetting the value to the Vega expression `\"true\"` will toggle data values without the user pressing the shift-key.\n\n__See also:__ [`toggle`](https://vega.github.io/vega-lite/docs/toggle.html) documentation.",
+ "type": [
+ "string",
+ "boolean"
+ ]
+ },
+ "type": {
+ "const": "multi",
+ "description": "Determines the default event processing and data query for the selection. Vega-Lite currently supports three selection types:\n\n- `\"single\"` -- to select a single discrete data value on `click`. - `\"multi\"` -- to select multiple discrete data value; the first value is selected on `click` and additional values toggled on shift-`click`. - `\"interval\"` -- to select a continuous range of data values on `drag`.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "type": "object"
+ },
+ "MultiSelectionConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "bind": {
+ "$ref": "#/definitions/LegendBinding",
+ "description": "When set, a selection is populated by interacting with the corresponding legend. Direct manipulation interaction is disabled by default; to re-enable it, set the selection's [`on`](https://vega.github.io/vega-lite/docs/selection.html#common-selection-properties) property.\n\nLegend bindings are restricted to selections that only specify a single field or encoding."
+ },
+ "clear": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Stream"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "description": "Clears the selection, emptying it of all values. Can be a [Event Stream](https://vega.github.io/vega/docs/event-streams/) or `false` to disable.\n\n__Default value:__ `dblclick`.\n\n__See also:__ [`clear`](https://vega.github.io/vega-lite/docs/clear.html) documentation."
+ },
+ "empty": {
+ "description": "By default, `all` data values are considered to lie within an empty selection. When set to `none`, empty selections contain no data values.",
+ "enum": [
+ "all",
+ "none"
+ ],
+ "type": "string"
+ },
+ "encodings": {
+ "description": "An array of encoding channels. The corresponding data field values must match for a data tuple to fall within the selection.\n\n__See also:__ [`encodings`](https://vega.github.io/vega-lite/docs/project.html) documentation.",
+ "items": {
+ "$ref": "#/definitions/SingleDefUnitChannel"
+ },
+ "type": "array"
+ },
+ "fields": {
+ "description": "An array of field names whose values must match for a data tuple to fall within the selection.\n\n__See also:__ [`fields`](https://vega.github.io/vega-lite/docs/project.html) documentation.",
+ "items": {
+ "$ref": "#/definitions/FieldName"
+ },
+ "type": "array"
+ },
+ "init": {
+ "description": "Initialize the selection with a mapping between [projected channels or field names](https://vega.github.io/vega-lite/docs/project.html) and an initial value (or array of values).\n\n__See also:__ [`init`](https://vega.github.io/vega-lite/docs/init.html) documentation.",
+ "items": {
+ "$ref": "#/definitions/SelectionInitMapping"
+ },
+ "type": "array"
+ },
+ "nearest": {
+ "description": "When true, an invisible voronoi diagram is computed to accelerate discrete selection. The data value _nearest_ the mouse cursor is added to the selection.\n\n__See also:__ [`nearest`](https://vega.github.io/vega-lite/docs/nearest.html) documentation.",
+ "type": "boolean"
+ },
+ "on": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Stream"
+ },
+ {
+ "type": "string"
+ }
+ ],
+ "description": "A [Vega event stream](https://vega.github.io/vega/docs/event-streams/) (object or selector) that triggers the selection. For interval selections, the event stream must specify a [start and end](https://vega.github.io/vega/docs/event-streams/#between-filters)."
+ },
+ "resolve": {
+ "$ref": "#/definitions/SelectionResolution",
+ "description": "With layered and multi-view displays, a strategy that determines how selections' data queries are resolved when applied in a filter transform, conditional encoding rule, or scale domain.\n\n__See also:__ [`resolve`](https://vega.github.io/vega-lite/docs/selection-resolve.html) documentation."
+ },
+ "toggle": {
+ "description": "Controls whether data values should be toggled or only ever inserted into multi selections. Can be `true`, `false` (for insertion only), or a [Vega expression](https://vega.github.io/vega/docs/expressions/).\n\n__Default value:__ `true`, which corresponds to `event.shiftKey` (i.e., data values are toggled when a user interacts with the shift-key pressed).\n\nSetting the value to the Vega expression `\"true\"` will toggle data values without the user pressing the shift-key.\n\n__See also:__ [`toggle`](https://vega.github.io/vega-lite/docs/toggle.html) documentation.",
+ "type": [
+ "string",
+ "boolean"
+ ]
+ }
+ },
+ "type": "object"
+ },
+ "MultiTimeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LocalMultiTimeUnit"
+ },
+ {
+ "$ref": "#/definitions/UtcMultiTimeUnit"
+ }
+ ]
+ },
+ "NamedData": {
+ "additionalProperties": false,
+ "properties": {
+ "format": {
+ "$ref": "#/definitions/DataFormat",
+ "description": "An object that specifies the format for parsing the data."
+ },
+ "name": {
+ "description": "Provide a placeholder name and bind data at runtime.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "type": "object"
+ },
+ "NonArgAggregateOp": {
+ "enum": [
+ "average",
+ "count",
+ "distinct",
+ "max",
+ "mean",
+ "median",
+ "min",
+ "missing",
+ "product",
+ "q1",
+ "q3",
+ "ci0",
+ "ci1",
+ "stderr",
+ "stdev",
+ "stdevp",
+ "sum",
+ "valid",
+ "values",
+ "variance",
+ "variancep"
+ ],
+ "type": "string"
+ },
+ "NonLayerRepeatSpec": {
+ "additionalProperties": false,
+ "description": "Base interface for a repeat specification.",
+ "properties": {
+ "align": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LayoutAlign"
+ },
+ {
+ "$ref": "#/definitions/RowCol<LayoutAlign>"
+ }
+ ],
+ "description": "The alignment to apply to grid rows and columns. The supported string values are `\"all\"`, `\"each\"`, and `\"none\"`.\n\n- For `\"none\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other. - For `\"each\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size. - For `\"all\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\nAlternatively, an object value of the form `{\"row\": string, \"column\": string}` can be used to supply different alignments for rows and columns.\n\n__Default value:__ `\"all\"`."
+ },
+ "bounds": {
+ "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used. - If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`",
+ "enum": [
+ "full",
+ "flush"
+ ],
+ "type": "string"
+ },
+ "center": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/RowCol<boolean>"
+ }
+ ],
+ "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\nAn object value of the form `{\"row\": boolean, \"column\": boolean}` can be used to supply different centering values for rows and columns.\n\n__Default value:__ `false`"
+ },
+ "columns": {
+ "description": "The number of columns to include in the view composition layout.\n\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\n\n__Note__:\n\n1) This property is only for: - the general (wrappable) `concat` operator (not `hconcat`/`vconcat`) - the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\n\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).",
+ "type": "number"
+ },
+ "data": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Data"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
+ },
+ "description": {
+ "description": "Description of this mark for commenting purpose.",
+ "type": "string"
+ },
+ "name": {
+ "description": "Name of the visualization for later reference.",
+ "type": "string"
+ },
+ "repeat": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/RepeatMapping"
+ }
+ ],
+ "description": "Definition for fields to be repeated. One of: 1) An array of fields to be repeated. If `\"repeat\"` is an array, the field can be referred to as `{\"repeat\": \"repeat\"}`. The repeated views are laid out in a wrapped row. You can set the number of columns to control the wrapping. 2) An object that maps `\"row\"` and/or `\"column\"` to the listed fields to be repeated along the particular orientations. The objects `{\"repeat\": \"row\"}` and `{\"repeat\": \"column\"}` can be used to refer to the repeated field respectively."
+ },
+ "resolve": {
+ "$ref": "#/definitions/Resolve",
+ "description": "Scale, axis, and legend resolutions for view composition specifications."
+ },
+ "spacing": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/RowCol<number>"
+ }
+ ],
+ "description": "The spacing in pixels between sub-views of the composition operator. An object of the form `{\"row\": number, \"column\": number}` can be used to set different spacing values for rows and columns.\n\n__Default value__: Depends on `\"spacing\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)"
+ },
+ "spec": {
+ "$ref": "#/definitions/Spec",
+ "description": "A specification of the view that gets repeated."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "$ref": "#/definitions/TitleParams"
+ }
+ ],
+ "description": "Title for the plot."
+ },
+ "transform": {
+ "description": "An array of data transformations such as filter and new field calculation.",
+ "items": {
+ "$ref": "#/definitions/Transform"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "repeat",
+ "spec"
+ ],
+ "type": "object"
+ },
+ "NumericArrayMarkPropDef": {
+ "$ref": "#/definitions/MarkPropDef<number[]>"
+ },
+ "NumericMarkPropDef": {
+ "$ref": "#/definitions/MarkPropDef<number>"
+ },
+ "NumericValueDef": {
+ "$ref": "#/definitions/ValueDef<(number|ExprRef)>"
+ },
+ "OrderFieldDef": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "const": "binned",
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "sort": {
+ "$ref": "#/definitions/SortOrder",
+ "description": "The sort order. One of `\"ascending\"` (default) or `\"descending\"`."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "$ref": "#/definitions/StandardType",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "type": "object"
+ },
+ "OrderValueDef": {
+ "additionalProperties": false,
+ "properties": {
+ "condition": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalValueDef<number>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<number>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ "value": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "required": [
+ "value"
+ ],
+ "type": "object"
+ },
+ "Orient": {
+ "enum": [
+ "left",
+ "right",
+ "top",
+ "bottom"
+ ],
+ "type": "string"
+ },
+ "Orientation": {
+ "enum": [
+ "horizontal",
+ "vertical"
+ ],
+ "type": "string"
+ },
+ "OverlayMarkDef": {
+ "additionalProperties": false,
+ "properties": {
+ "align": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Align"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of `\"left\"`, `\"right\"`, `\"center\"`.\n\n__Note:__ Expression reference is *not* supported for range marks."
+ },
+ "angle": {
+ "anyOf": [
+ {
+ "description": "The rotation angle of the text, in degrees.",
+ "maximum": 360,
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "aria": {
+ "anyOf": [
+ {
+ "description": "A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the \"aria-hidden\" attribute will be set on the output SVG element, removing the mark item from the ARIA accessibility tree.",
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "ariaRole": {
+ "anyOf": [
+ {
+ "description": "Sets the type of user interface element of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the \"role\" attribute. Warning: this property is experimental and may be changed in the future.",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "ariaRoleDescription": {
+ "anyOf": [
+ {
+ "description": "A human-readable, author-localized description for the role of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the \"aria-roledescription\" attribute. Warning: this property is experimental and may be changed in the future.",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "aspect": {
+ "anyOf": [
+ {
+ "description": "Whether to keep aspect ratio of image marks.",
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "baseline": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TextBaseline"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "For text marks, the vertical text baseline. One of `\"alphabetic\"` (default), `\"top\"`, `\"middle\"`, `\"bottom\"`, `\"line-top\"`, `\"line-bottom\"`, or an expression reference that provides one of the valid values. The `\"line-top\"` and `\"line-bottom\"` values operate similarly to `\"top\"` and `\"bottom\"`, but are calculated relative to the `lineHeight` rather than `fontSize` alone.\n\nFor range marks, the vertical alignment of the marks. One of `\"top\"`, `\"middle\"`, `\"bottom\"`.\n\n__Note:__ Expression reference is *not* supported for range marks."
+ },
+ "blend": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Blend",
+ "description": "The color blend mode for drawing an item on its current background. Any valid [CSS mix-blend-mode](https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode) value can be used.\n\n__Default value: `\"source-over\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "clip": {
+ "description": "Whether a mark be clipped to the enclosing group’s width and height.",
+ "type": "boolean"
+ },
+ "color": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/Gradient"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Default color.\n\n__Default value:__ <span style=\"color: #4682b4;\">&#9632;</span> `\"#4682b4\"`\n\n__Note:__ - This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config). - The `fill` and `stroke` properties have higher precedence than `color` and will override `color`."
+ },
+ "cornerRadius": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles or arcs' corners.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "cornerRadiusBottomLeft": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles' bottom left corner.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "cornerRadiusBottomRight": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles' bottom right corner.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "cornerRadiusTopLeft": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles' top right corner.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "cornerRadiusTopRight": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles' top left corner.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "cursor": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Cursor",
+ "description": "The mouse cursor used over the mark. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "description": {
+ "anyOf": [
+ {
+ "description": "A text description of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the [\"aria-label\" attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute).",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "dir": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TextDirection",
+ "description": "The direction of the text. One of `\"ltr\"` (left-to-right) or `\"rtl\"` (right-to-left). This property determines on which side is truncated in response to the limit parameter.\n\n__Default value:__ `\"ltr\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "dx": {
+ "anyOf": [
+ {
+ "description": "The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "dy": {
+ "anyOf": [
+ {
+ "description": "The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "ellipsis": {
+ "anyOf": [
+ {
+ "description": "The ellipsis string for text truncated in response to the limit parameter.\n\n__Default value:__ `\"…\"`",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "endAngle": {
+ "anyOf": [
+ {
+ "description": "The end angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "fill": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/Gradient"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Default fill color. This property has higher precedence than `config.color`. Set to `null` to remove fill.\n\n__Default value:__ (None)"
+ },
+ "fillOpacity": {
+ "anyOf": [
+ {
+ "description": "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "filled": {
+ "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `false` for all `point`, `line`, and `rule` marks as well as `geoshape` marks for [`graticule`](https://vega.github.io/vega-lite/docs/data.html#graticule) data sources; otherwise, `true`.\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).",
+ "type": "boolean"
+ },
+ "font": {
+ "anyOf": [
+ {
+ "description": "The typeface to set the text in (e.g., `\"Helvetica Neue\"`).",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "fontSize": {
+ "anyOf": [
+ {
+ "description": "The font size, in pixels.\n\n__Default value:__ `11`",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "fontStyle": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontStyle",
+ "description": "The font style (e.g., `\"italic\"`)."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "fontWeight": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontWeight",
+ "description": "The font weight. This can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "height": {
+ "anyOf": [
+ {
+ "description": "Height of the marks.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "href": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/URI",
+ "description": "A URL to load upon mouse click. If defined, the mark acts as a hyperlink."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "innerRadius": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`."
+ },
+ "interpolate": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Interpolate",
+ "description": "The line interpolation method to use for line and area marks. One of the following: - `\"linear\"`: piecewise linear segments, as in a polyline. - `\"linear-closed\"`: close the linear segments to form a polygon. - `\"step\"`: alternate between horizontal and vertical segments, as in a step function. - `\"step-before\"`: alternate between vertical and horizontal segments, as in a step function. - `\"step-after\"`: alternate between horizontal and vertical segments, as in a step function. - `\"basis\"`: a B-spline, with control point duplication on the ends. - `\"basis-open\"`: an open B-spline; may not intersect the start or end. - `\"basis-closed\"`: a closed B-spline, as in a loop. - `\"cardinal\"`: a Cardinal spline, with control point duplication on the ends. - `\"cardinal-open\"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points. - `\"cardinal-closed\"`: a closed Cardinal spline, as in a loop. - `\"bundle\"`: equivalent to basis, except the tension parameter is used to straighten the spline. - `\"monotone\"`: cubic interpolation that preserves monotonicity in y."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "invalid": {
+ "description": "Defines how Vega-Lite should handle marks for invalid values (`null` and `NaN`). - If set to `\"filter\"` (default), all data items with null values will be skipped (for line, trail, and area marks) or filtered (for other marks). - If `null`, all data items are included. In this case, invalid values will be interpreted as zeroes.",
+ "enum": [
+ "filter",
+ null
+ ],
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "limit": {
+ "anyOf": [
+ {
+ "description": "The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0` -- indicating no limit",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "lineBreak": {
+ "anyOf": [
+ {
+ "description": "A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property is ignored if the text is array-valued.",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "lineHeight": {
+ "anyOf": [
+ {
+ "description": "The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "opacity": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.",
+ "maximum": 1,
+ "minimum": 0
+ },
+ "order": {
+ "description": "For line and trail marks, this `order` property can be set to `null` or `false` to make the lines use the original order in the data sources.",
+ "type": [
+ "null",
+ "boolean"
+ ]
+ },
+ "orient": {
+ "$ref": "#/definitions/Orientation",
+ "description": "The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical. - For bar, rule and tick, this determines whether the size of the bar and tick should be applied to x or y dimension. - For area, this property determines the orient property of the Vega output. - For line and trail marks, this property determines the sort order of the points in the line if `config.sortLineBy` is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored."
+ },
+ "outerRadius": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`."
+ },
+ "padAngle": {
+ "anyOf": [
+ {
+ "description": "The angular padding applied to sides of the arc, in radians.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "radius": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "For arc mark, the primary (outer) radius in pixels.\n\nFor text marks, polar coordinate radial offset, in pixels, of the text from the origin determined by the `x` and `y` properties."
+ },
+ "radius2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The secondary (inner) radius in pixels of arc marks."
+ },
+ "radius2Offset": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Offset for radius2."
+ },
+ "radiusOffset": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Offset for radius."
+ },
+ "shape": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SymbolShape"
+ },
+ {
+ "type": "string"
+ }
+ ],
+ "description": "Shape of the point marks. Supported values include: - plotting shapes: `\"circle\"`, `\"square\"`, `\"cross\"`, `\"diamond\"`, `\"triangle-up\"`, `\"triangle-down\"`, `\"triangle-right\"`, or `\"triangle-left\"`. - the line symbol `\"stroke\"` - centered directional shapes `\"arrow\"`, `\"wedge\"`, or `\"triangle\"` - a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n__Default value:__ `\"circle\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "size": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Default size for marks. - For `point`/`circle`/`square`, this represents the pixel area of the marks. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value. - For `bar`, this represents the band size of the bar, in pixels. - For `text`, this represents the font size, in pixels.\n\n__Default value:__ - `30` for point, circle, square marks; width/height's `step` - `2` for bar marks with discrete dimensions; - `5` for bar marks with continuous dimensions; - `11` for text marks.",
+ "minimum": 0
+ },
+ "smooth": {
+ "anyOf": [
+ {
+ "description": "A boolean flag (default true) indicating if the image should be smoothed when resized. If false, individual pixels should be scaled directly rather than interpolated with smoothing. For SVG rendering, this option may not work in some browsers due to lack of standardization.",
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "startAngle": {
+ "anyOf": [
+ {
+ "description": "The start angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "stroke": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/Gradient"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Default stroke color. This property has higher precedence than `config.color`. Set to `null` to remove stroke.\n\n__Default value:__ (None)"
+ },
+ "strokeCap": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StrokeCap",
+ "description": "The stroke cap for line ending style. One of `\"butt\"`, `\"round\"`, or `\"square\"`.\n\n__Default value:__ `\"butt\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeDash": {
+ "anyOf": [
+ {
+ "description": "An array of alternating stroke, space lengths for creating dashed or dotted lines.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeDashOffset": {
+ "anyOf": [
+ {
+ "description": "The offset (in pixels) into which to begin drawing with the stroke dash array.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeJoin": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StrokeJoin",
+ "description": "The stroke line join method. One of `\"miter\"`, `\"round\"` or `\"bevel\"`.\n\n__Default value:__ `\"miter\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeMiterLimit": {
+ "anyOf": [
+ {
+ "description": "The miter limit at which to bevel a line join.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeOffset": {
+ "anyOf": [
+ {
+ "description": "The offset in pixels at which to draw the group stroke and fill. If unspecified, the default behavior is to dynamically offset stroked groups such that 1 pixel stroke widths align with the pixel grid.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeOpacity": {
+ "anyOf": [
+ {
+ "description": "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeWidth": {
+ "anyOf": [
+ {
+ "description": "The stroke width, in pixels.",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "style": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "A string or array of strings indicating the name of custom styles to apply to the mark. A style is a named collection of mark property defaults defined within the [style configuration](https://vega.github.io/vega-lite/docs/mark.html#style-config). If style is an array, later styles will override earlier styles. Any [mark properties](https://vega.github.io/vega-lite/docs/encoding.html#mark-prop) explicitly defined within the `encoding` will override a style default.\n\n__Default value:__ The mark's name. For example, a bar mark will have style `\"bar\"` by default. __Note:__ Any specified style will augment the default style. For example, a bar mark with `\"style\": \"foo\"` will receive from `config.style.bar` and `config.style.foo` (the specified style `\"foo\"` has higher precedence)."
+ },
+ "tension": {
+ "anyOf": [
+ {
+ "description": "Depending on the interpolation type, sets the tension parameter (for line and area marks).",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "text": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text",
+ "description": "Placeholder text if the `text` channel is not specified"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "theta": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "- For arc marks, the arc length in radians if theta2 is not specified, otherwise the start arc angle. (A value of 0 indicates up or “north”, increasing values proceed clockwise.)\n\n- For text marks, polar coordinate angle in radians.",
+ "maximum": 360,
+ "minimum": 0
+ },
+ "theta2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise."
+ },
+ "theta2Offset": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Offset for theta2."
+ },
+ "thetaOffset": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Offset for theta."
+ },
+ "timeUnitBand": {
+ "description": "Default relative band size for a time unit. If set to `1`, the bandwidth of the marks will be equal to the time unit band step. If set to `0.5`, bandwidth of the marks will be half of the time unit band step.",
+ "type": "number"
+ },
+ "timeUnitBandPosition": {
+ "description": "Default relative band position for a time unit. If set to `0`, the marks will be positioned at the beginning of the time unit band step. If set to `0.5`, the marks will be positioned in the middle of the time unit band step.",
+ "type": "number"
+ },
+ "tooltip": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/TooltipContent"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.\n\n- If `tooltip` is `true` or `{\"content\": \"encoding\"}`, then all fields from `encoding` will be used. - If `tooltip` is `{\"content\": \"data\"}`, then all fields that appear in the highlighted data point will be used. - If set to `null` or `false`, then no tooltip will be used.\n\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip in Vega-Lite.\n\n__Default value:__ `null`"
+ },
+ "url": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/URI",
+ "description": "The URL of the image file for image marks."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "width": {
+ "anyOf": [
+ {
+ "description": "Width of the marks.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "x": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "width",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "X coordinates of the marks, or width of horizontal `\"bar\"` and `\"area\"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "x2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "width",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "X2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "x2Offset": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Offset for x2-position."
+ },
+ "xOffset": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Offset for x-position."
+ },
+ "y": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "height",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Y coordinates of the marks, or height of vertical `\"bar\"` and `\"area\"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ },
+ "y2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "height",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Y2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ },
+ "y2Offset": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Offset for y2-position."
+ },
+ "yOffset": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Offset for y-position."
+ }
+ },
+ "type": "object"
+ },
+ "Padding": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "bottom": {
+ "type": "number"
+ },
+ "left": {
+ "type": "number"
+ },
+ "right": {
+ "type": "number"
+ },
+ "top": {
+ "type": "number"
+ }
+ },
+ "type": "object"
+ }
+ ],
+ "minimum": 0
+ },
+ "Parameter": {
+ "additionalProperties": false,
+ "properties": {
+ "bind": {
+ "$ref": "#/definitions/Binding",
+ "description": "Binds the parameter to an external input element such as a slider, selection list or radio button group."
+ },
+ "description": {
+ "description": "A text description of the parameter, useful for inline documentation.",
+ "type": "string"
+ },
+ "expr": {
+ "$ref": "#/definitions/Expr",
+ "description": "An expression for the value of the parameter. This expression may include other parameters, in which case the parameter will automatically update in response to upstream parameter changes."
+ },
+ "name": {
+ "description": "Required. A unique name for the parameter. Parameter names should be valid JavaScript identifiers: they should contain only alphanumeric characters (or “$”, or “_”) and may not start with a digit. Reserved keywords that may not be used as parameter names are \"datum\", \"event\", \"item\", and \"parent\".",
+ "type": "string"
+ },
+ "value": {
+ "description": "The initial value of the parameter.\n\n__Default value:__ `undefined`"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "type": "object"
+ },
+ "Parse": {
+ "additionalProperties": {
+ "$ref": "#/definitions/ParseValue"
+ },
+ "type": "object"
+ },
+ "ParseValue": {
+ "anyOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "const": "string",
+ "type": "string"
+ },
+ {
+ "const": "boolean",
+ "type": "string"
+ },
+ {
+ "const": "date",
+ "type": "string"
+ },
+ {
+ "const": "number",
+ "type": "string"
+ }
+ ]
+ },
+ "PivotTransform": {
+ "additionalProperties": false,
+ "properties": {
+ "groupby": {
+ "description": "The optional data fields to group by. If not specified, a single group containing all data objects will be used.",
+ "items": {
+ "$ref": "#/definitions/FieldName"
+ },
+ "type": "array"
+ },
+ "limit": {
+ "description": "An optional parameter indicating the maximum number of pivoted fields to generate. The default (`0`) applies no limit. The pivoted `pivot` names are sorted in ascending order prior to enforcing the limit. __Default value:__ `0`",
+ "type": "number"
+ },
+ "op": {
+ "description": "The aggregation operation to apply to grouped `value` field values. __Default value:__ `sum`",
+ "type": "string"
+ },
+ "pivot": {
+ "$ref": "#/definitions/FieldName",
+ "description": "The data field to pivot on. The unique values of this field become new field names in the output stream."
+ },
+ "value": {
+ "$ref": "#/definitions/FieldName",
+ "description": "The data field to populate pivoted fields. The aggregate values of this field become the values of the new pivoted fields."
+ }
+ },
+ "required": [
+ "pivot",
+ "value"
+ ],
+ "type": "object"
+ },
+ "PolarDef": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/PositionFieldDefBase"
+ },
+ {
+ "$ref": "#/definitions/PositionDatumDefBase"
+ },
+ {
+ "$ref": "#/definitions/PositionValueDef"
+ }
+ ]
+ },
+ "Position2Def": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SecondaryFieldDef"
+ },
+ {
+ "$ref": "#/definitions/DatumDef"
+ },
+ {
+ "$ref": "#/definitions/PositionValueDef"
+ }
+ ]
+ },
+ "PositionDatumDef": {
+ "additionalProperties": false,
+ "properties": {
+ "axis": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Axis"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of axis's gridlines, ticks and labels. If `null`, the axis for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [axis properties](https://vega.github.io/vega-lite/docs/axis.html) are applied.\n\n__See also:__ [`axis`](https://vega.github.io/vega-lite/docs/axis.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "datum": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/PrimitiveValue"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/RepeatRef"
+ }
+ ],
+ "description": "A constant value in data domain."
+ },
+ "impute": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ImputeParams"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining the properties of the Impute Operation to be applied. The field value of the other positional channel is taken as `key` of the `Impute` Operation. The field of the `color` channel if specified is used as `groupby` of the `Impute` Operation.\n\n__See also:__ [`impute`](https://vega.github.io/vega-lite/docs/impute.html) documentation."
+ },
+ "scale": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Scale"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation."
+ },
+ "stack": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StackOffset"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "description": "Type of stacking offset if the field should be stacked. `stack` is only applicable for `x`, `y`, `theta`, and `radius` channels with continuous domains. For example, `stack` of `y` can be used to customize stacking for a vertical bar chart.\n\n`stack` can be one of the following values: - `\"zero\"` or `true`: stacking with baseline offset at zero value of the scale (for creating typical stacked [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and [area](https://vega.github.io/vega-lite/docs/stack.html#area) chart). - `\"normalize\"` - stacking with normalized domain (for creating [normalized stacked bar and area charts](https://vega.github.io/vega-lite/docs/stack.html#normalized). <br/> -`\"center\"` - stacking with center baseline (for [streamgraph](https://vega.github.io/vega-lite/docs/stack.html#streamgraph)). - `null` or `false` - No-stacking. This will produce layered [bar](https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart) and area chart.\n\n__Default value:__ `zero` for plots with all of the following conditions are true: (1) the mark is `bar`, `area`, or `arc`; (2) the stacked measure channel (x or y) has a linear scale; (3) At least one of non-position channels mapped to an unaggregated field that is different from x and y. Otherwise, `null` by default.\n\n__See also:__ [`stack`](https://vega.github.io/vega-lite/docs/stack.html) documentation."
+ },
+ "type": {
+ "$ref": "#/definitions/Type",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "type": "object"
+ },
+ "PositionDatumDefBase": {
+ "additionalProperties": false,
+ "properties": {
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "datum": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/PrimitiveValue"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/RepeatRef"
+ }
+ ],
+ "description": "A constant value in data domain."
+ },
+ "scale": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Scale"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation."
+ },
+ "stack": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StackOffset"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "description": "Type of stacking offset if the field should be stacked. `stack` is only applicable for `x`, `y`, `theta`, and `radius` channels with continuous domains. For example, `stack` of `y` can be used to customize stacking for a vertical bar chart.\n\n`stack` can be one of the following values: - `\"zero\"` or `true`: stacking with baseline offset at zero value of the scale (for creating typical stacked [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and [area](https://vega.github.io/vega-lite/docs/stack.html#area) chart). - `\"normalize\"` - stacking with normalized domain (for creating [normalized stacked bar and area charts](https://vega.github.io/vega-lite/docs/stack.html#normalized). <br/> -`\"center\"` - stacking with center baseline (for [streamgraph](https://vega.github.io/vega-lite/docs/stack.html#streamgraph)). - `null` or `false` - No-stacking. This will produce layered [bar](https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart) and area chart.\n\n__Default value:__ `zero` for plots with all of the following conditions are true: (1) the mark is `bar`, `area`, or `arc`; (2) the stacked measure channel (x or y) has a linear scale; (3) At least one of non-position channels mapped to an unaggregated field that is different from x and y. Otherwise, `null` by default.\n\n__See also:__ [`stack`](https://vega.github.io/vega-lite/docs/stack.html) documentation."
+ },
+ "type": {
+ "$ref": "#/definitions/Type",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "type": "object"
+ },
+ "PositionDef": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/PositionFieldDef"
+ },
+ {
+ "$ref": "#/definitions/PositionDatumDef"
+ },
+ {
+ "$ref": "#/definitions/PositionValueDef"
+ }
+ ]
+ },
+ "PositionFieldDef": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "axis": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Axis"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of axis's gridlines, ticks and labels. If `null`, the axis for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [axis properties](https://vega.github.io/vega-lite/docs/axis.html) are applied.\n\n__See also:__ [`axis`](https://vega.github.io/vega-lite/docs/axis.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "const": "binned",
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "impute": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ImputeParams"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining the properties of the Impute Operation to be applied. The field value of the other positional channel is taken as `key` of the `Impute` Operation. The field of the `color` channel if specified is used as `groupby` of the `Impute` Operation.\n\n__See also:__ [`impute`](https://vega.github.io/vega-lite/docs/impute.html) documentation."
+ },
+ "scale": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Scale"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation."
+ },
+ "sort": {
+ "$ref": "#/definitions/Sort",
+ "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following: - `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`). - `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation."
+ },
+ "stack": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StackOffset"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "description": "Type of stacking offset if the field should be stacked. `stack` is only applicable for `x`, `y`, `theta`, and `radius` channels with continuous domains. For example, `stack` of `y` can be used to customize stacking for a vertical bar chart.\n\n`stack` can be one of the following values: - `\"zero\"` or `true`: stacking with baseline offset at zero value of the scale (for creating typical stacked [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and [area](https://vega.github.io/vega-lite/docs/stack.html#area) chart). - `\"normalize\"` - stacking with normalized domain (for creating [normalized stacked bar and area charts](https://vega.github.io/vega-lite/docs/stack.html#normalized). <br/> -`\"center\"` - stacking with center baseline (for [streamgraph](https://vega.github.io/vega-lite/docs/stack.html#streamgraph)). - `null` or `false` - No-stacking. This will produce layered [bar](https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart) and area chart.\n\n__Default value:__ `zero` for plots with all of the following conditions are true: (1) the mark is `bar`, `area`, or `arc`; (2) the stacked measure channel (x or y) has a linear scale; (3) At least one of non-position channels mapped to an unaggregated field that is different from x and y. Otherwise, `null` by default.\n\n__See also:__ [`stack`](https://vega.github.io/vega-lite/docs/stack.html) documentation."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "$ref": "#/definitions/StandardType",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "type": "object"
+ },
+ "PositionFieldDefBase": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "const": "binned",
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "scale": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Scale"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation."
+ },
+ "sort": {
+ "$ref": "#/definitions/Sort",
+ "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following: - `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`). - `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation."
+ },
+ "stack": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StackOffset"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "description": "Type of stacking offset if the field should be stacked. `stack` is only applicable for `x`, `y`, `theta`, and `radius` channels with continuous domains. For example, `stack` of `y` can be used to customize stacking for a vertical bar chart.\n\n`stack` can be one of the following values: - `\"zero\"` or `true`: stacking with baseline offset at zero value of the scale (for creating typical stacked [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and [area](https://vega.github.io/vega-lite/docs/stack.html#area) chart). - `\"normalize\"` - stacking with normalized domain (for creating [normalized stacked bar and area charts](https://vega.github.io/vega-lite/docs/stack.html#normalized). <br/> -`\"center\"` - stacking with center baseline (for [streamgraph](https://vega.github.io/vega-lite/docs/stack.html#streamgraph)). - `null` or `false` - No-stacking. This will produce layered [bar](https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart) and area chart.\n\n__Default value:__ `zero` for plots with all of the following conditions are true: (1) the mark is `bar`, `area`, or `arc`; (2) the stacked measure channel (x or y) has a linear scale; (3) At least one of non-position channels mapped to an unaggregated field that is different from x and y. Otherwise, `null` by default.\n\n__See also:__ [`stack`](https://vega.github.io/vega-lite/docs/stack.html) documentation."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "$ref": "#/definitions/StandardType",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "type": "object"
+ },
+ "PositionValueDef": {
+ "$ref": "#/definitions/ValueDef<(number|\"width\"|\"height\"|ExprRef)>"
+ },
+ "Predicate": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FieldEqualPredicate"
+ },
+ {
+ "$ref": "#/definitions/FieldRangePredicate"
+ },
+ {
+ "$ref": "#/definitions/FieldOneOfPredicate"
+ },
+ {
+ "$ref": "#/definitions/FieldLTPredicate"
+ },
+ {
+ "$ref": "#/definitions/FieldGTPredicate"
+ },
+ {
+ "$ref": "#/definitions/FieldLTEPredicate"
+ },
+ {
+ "$ref": "#/definitions/FieldGTEPredicate"
+ },
+ {
+ "$ref": "#/definitions/FieldValidPredicate"
+ },
+ {
+ "$ref": "#/definitions/SelectionPredicate"
+ },
+ {
+ "type": "string"
+ }
+ ]
+ },
+ "PrimitiveValue": {
+ "type": [
+ "number",
+ "string",
+ "boolean",
+ "null"
+ ]
+ },
+ "Projection": {
+ "additionalProperties": false,
+ "properties": {
+ "center": {
+ "$ref": "#/definitions/Vector2<number>",
+ "description": "The projection's center, a two-element array of longitude and latitude in degrees.\n\n__Default value:__ `[0, 0]`"
+ },
+ "clipAngle": {
+ "description": "The projection's clipping circle radius to the specified angle in degrees. If `null`, switches to [antimeridian](http://bl.ocks.org/mbostock/3788999) cutting rather than small-circle clipping.",
+ "type": "number"
+ },
+ "clipExtent": {
+ "$ref": "#/definitions/Vector2<Vector2<number>>",
+ "description": "The projection's viewport clip extent to the specified bounds in pixels. The extent bounds are specified as an array `[[x0, y0], [x1, y1]]`, where `x0` is the left-side of the viewport, `y0` is the top, `x1` is the right and `y1` is the bottom. If `null`, no viewport clipping is performed."
+ },
+ "coefficient": {
+ "type": "number"
+ },
+ "distance": {
+ "type": "number"
+ },
+ "extent": {
+ "$ref": "#/definitions/Vector2<Vector2<number>>"
+ },
+ "fit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Fit"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/Fit"
+ },
+ "type": "array"
+ }
+ ]
+ },
+ "fraction": {
+ "type": "number"
+ },
+ "lobes": {
+ "type": "number"
+ },
+ "parallel": {
+ "type": "number"
+ },
+ "parallels": {
+ "description": "For conic projections, the [two standard parallels](https://en.wikipedia.org/wiki/Map_projection#Conic) that define the map layout. The default depends on the specific conic projection used.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "pointRadius": {
+ "description": "The default radius (in pixels) to use when drawing GeoJSON `Point` and `MultiPoint` geometries. This parameter sets a constant default value. To modify the point radius in response to data, see the corresponding parameter of the GeoPath and GeoShape transforms.\n\n__Default value:__ `4.5`",
+ "type": "number"
+ },
+ "precision": {
+ "description": "The threshold for the projection's [adaptive resampling](http://bl.ocks.org/mbostock/3795544) to the specified value in pixels. This value corresponds to the [Douglas–Peucker distance](http://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm). If precision is not specified, returns the projection's current resampling precision which defaults to `√0.5 ≅ 0.70710…`.",
+ "type": "number"
+ },
+ "radius": {
+ "type": "number"
+ },
+ "ratio": {
+ "type": "number"
+ },
+ "reflectX": {
+ "type": "boolean"
+ },
+ "reflectY": {
+ "type": "boolean"
+ },
+ "rotate": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Vector2<number>"
+ },
+ {
+ "$ref": "#/definitions/Vector3<number>"
+ }
+ ],
+ "description": "The projection's three-axis rotation to the specified angles, which must be a two- or three-element array of numbers [`lambda`, `phi`, `gamma`] specifying the rotation angles in degrees about each spherical axis. (These correspond to yaw, pitch and roll.)\n\n__Default value:__ `[0, 0, 0]`"
+ },
+ "scale": {
+ "description": "The projection’s scale (zoom) factor, overriding automatic fitting. The default scale is projection-specific. The scale factor corresponds linearly to the distance between projected points; however, scale factor values are not equivalent across projections.",
+ "type": "number"
+ },
+ "size": {
+ "$ref": "#/definitions/Vector2<number>"
+ },
+ "spacing": {
+ "type": "number"
+ },
+ "tilt": {
+ "type": "number"
+ },
+ "translate": {
+ "$ref": "#/definitions/Vector2<number>",
+ "description": "The projection’s translation offset as a two-element array `[tx, ty]`."
+ },
+ "type": {
+ "$ref": "#/definitions/ProjectionType",
+ "description": "The cartographic projection to use. This value is case-insensitive, for example `\"albers\"` and `\"Albers\"` indicate the same projection type. You can find all valid projection types [in the documentation](https://vega.github.io/vega-lite/docs/projection.html#projection-types).\n\n__Default value:__ `mercator`"
+ }
+ },
+ "type": "object"
+ },
+ "ProjectionConfig": {
+ "$ref": "#/definitions/Projection",
+ "description": "Any property of Projection can be in config"
+ },
+ "ProjectionType": {
+ "enum": [
+ "albers",
+ "albersUsa",
+ "azimuthalEqualArea",
+ "azimuthalEquidistant",
+ "conicConformal",
+ "conicEqualArea",
+ "conicEquidistant",
+ "equalEarth",
+ "equirectangular",
+ "gnomonic",
+ "identity",
+ "mercator",
+ "naturalEarth1",
+ "orthographic",
+ "stereographic",
+ "transverseMercator"
+ ],
+ "type": "string"
+ },
+ "QuantileTransform": {
+ "additionalProperties": false,
+ "properties": {
+ "as": {
+ "description": "The output field names for the probability and quantile values.\n\n__Default value:__ `[\"prob\", \"value\"]`",
+ "items": [
+ {
+ "$ref": "#/definitions/FieldName"
+ },
+ {
+ "$ref": "#/definitions/FieldName"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2,
+ "type": "array"
+ },
+ "groupby": {
+ "description": "The data fields to group by. If not specified, a single group containing all data objects will be used.",
+ "items": {
+ "$ref": "#/definitions/FieldName"
+ },
+ "type": "array"
+ },
+ "probs": {
+ "description": "An array of probabilities in the range (0, 1) for which to compute quantile values. If not specified, the *step* parameter will be used.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "quantile": {
+ "$ref": "#/definitions/FieldName",
+ "description": "The data field for which to perform quantile estimation."
+ },
+ "step": {
+ "description": "A probability step size (default 0.01) for sampling quantile values. All values from one-half the step size up to 1 (exclusive) will be sampled. This parameter is only used if the *probs* parameter is not provided.",
+ "type": "number"
+ }
+ },
+ "required": [
+ "quantile"
+ ],
+ "type": "object"
+ },
+ "RadialGradient": {
+ "additionalProperties": false,
+ "properties": {
+ "gradient": {
+ "const": "radial",
+ "description": "The type of gradient. Use `\"radial\"` for a radial gradient.",
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ },
+ "r1": {
+ "description": "The radius length, in normalized [0, 1] coordinates, of the inner circle for the gradient.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ "r2": {
+ "description": "The radius length, in normalized [0, 1] coordinates, of the outer circle for the gradient.\n\n__Default value:__ `0.5`",
+ "type": "number"
+ },
+ "stops": {
+ "description": "An array of gradient stops defining the gradient color sequence.",
+ "items": {
+ "$ref": "#/definitions/GradientStop"
+ },
+ "type": "array"
+ },
+ "x1": {
+ "description": "The x-coordinate, in normalized [0, 1] coordinates, for the center of the inner circle for the gradient.\n\n__Default value:__ `0.5`",
+ "type": "number"
+ },
+ "x2": {
+ "description": "The x-coordinate, in normalized [0, 1] coordinates, for the center of the outer circle for the gradient.\n\n__Default value:__ `0.5`",
+ "type": "number"
+ },
+ "y1": {
+ "description": "The y-coordinate, in normalized [0, 1] coordinates, for the center of the inner circle for the gradient.\n\n__Default value:__ `0.5`",
+ "type": "number"
+ },
+ "y2": {
+ "description": "The y-coordinate, in normalized [0, 1] coordinates, for the center of the outer circle for the gradient.\n\n__Default value:__ `0.5`",
+ "type": "number"
+ }
+ },
+ "required": [
+ "gradient",
+ "stops"
+ ],
+ "type": "object"
+ },
+ "RangeConfig": {
+ "additionalProperties": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/RangeScheme"
+ },
+ {
+ "type": "array"
+ }
+ ]
+ },
+ "properties": {
+ "category": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/RangeScheme"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/Color"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "Default [color scheme](https://vega.github.io/vega/docs/schemes/) for categorical data."
+ },
+ "diverging": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/RangeScheme"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/Color"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "Default [color scheme](https://vega.github.io/vega/docs/schemes/) for diverging quantitative ramps."
+ },
+ "heatmap": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/RangeScheme"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/Color"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "Default [color scheme](https://vega.github.io/vega/docs/schemes/) for quantitative heatmaps."
+ },
+ "ordinal": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/RangeScheme"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/Color"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "Default [color scheme](https://vega.github.io/vega/docs/schemes/) for rank-ordered data."
+ },
+ "ramp": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/RangeScheme"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/Color"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "Default [color scheme](https://vega.github.io/vega/docs/schemes/) for sequential quantitative ramps."
+ },
+ "symbol": {
+ "description": "Array of [symbol](https://vega.github.io/vega/docs/marks/symbol/) names or paths for the default shape palette.",
+ "items": {
+ "$ref": "#/definitions/SymbolShape"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "RangeEnum": {
+ "enum": [
+ "width",
+ "height",
+ "symbol",
+ "category",
+ "ordinal",
+ "ramp",
+ "diverging",
+ "heatmap"
+ ],
+ "type": "string"
+ },
+ "RangeRaw": {
+ "items": {
+ "anyOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/RangeRawArray"
+ }
+ ]
+ },
+ "type": "array"
+ },
+ "RangeRawArray": {
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "RangeScheme": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/RangeEnum"
+ },
+ {
+ "$ref": "#/definitions/RangeRaw"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "count": {
+ "type": "number"
+ },
+ "extent": {
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "scheme": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/ColorScheme"
+ }
+ ]
+ }
+ },
+ "required": [
+ "scheme"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "RectConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "align": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Align"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of `\"left\"`, `\"right\"`, `\"center\"`.\n\n__Note:__ Expression reference is *not* supported for range marks."
+ },
+ "angle": {
+ "anyOf": [
+ {
+ "description": "The rotation angle of the text, in degrees.",
+ "maximum": 360,
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "aria": {
+ "anyOf": [
+ {
+ "description": "A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the \"aria-hidden\" attribute will be set on the output SVG element, removing the mark item from the ARIA accessibility tree.",
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "ariaRole": {
+ "anyOf": [
+ {
+ "description": "Sets the type of user interface element of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the \"role\" attribute. Warning: this property is experimental and may be changed in the future.",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "ariaRoleDescription": {
+ "anyOf": [
+ {
+ "description": "A human-readable, author-localized description for the role of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the \"aria-roledescription\" attribute. Warning: this property is experimental and may be changed in the future.",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "aspect": {
+ "anyOf": [
+ {
+ "description": "Whether to keep aspect ratio of image marks.",
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "baseline": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TextBaseline"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "For text marks, the vertical text baseline. One of `\"alphabetic\"` (default), `\"top\"`, `\"middle\"`, `\"bottom\"`, `\"line-top\"`, `\"line-bottom\"`, or an expression reference that provides one of the valid values. The `\"line-top\"` and `\"line-bottom\"` values operate similarly to `\"top\"` and `\"bottom\"`, but are calculated relative to the `lineHeight` rather than `fontSize` alone.\n\nFor range marks, the vertical alignment of the marks. One of `\"top\"`, `\"middle\"`, `\"bottom\"`.\n\n__Note:__ Expression reference is *not* supported for range marks."
+ },
+ "binSpacing": {
+ "description": "Offset between bars for binned field. The ideal value for this is either 0 (preferred by statisticians) or 1 (Vega-Lite default, D3 example style).\n\n__Default value:__ `1`",
+ "minimum": 0,
+ "type": "number"
+ },
+ "blend": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Blend",
+ "description": "The color blend mode for drawing an item on its current background. Any valid [CSS mix-blend-mode](https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode) value can be used.\n\n__Default value: `\"source-over\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "color": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/Gradient"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Default color.\n\n__Default value:__ <span style=\"color: #4682b4;\">&#9632;</span> `\"#4682b4\"`\n\n__Note:__ - This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config). - The `fill` and `stroke` properties have higher precedence than `color` and will override `color`."
+ },
+ "continuousBandSize": {
+ "description": "The default size of the bars on continuous scales.\n\n__Default value:__ `5`",
+ "minimum": 0,
+ "type": "number"
+ },
+ "cornerRadius": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles or arcs' corners.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "cornerRadiusBottomLeft": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles' bottom left corner.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "cornerRadiusBottomRight": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles' bottom right corner.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "cornerRadiusTopLeft": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles' top right corner.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "cornerRadiusTopRight": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles' top left corner.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "cursor": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Cursor",
+ "description": "The mouse cursor used over the mark. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "description": {
+ "anyOf": [
+ {
+ "description": "A text description of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the [\"aria-label\" attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute).",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "dir": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TextDirection",
+ "description": "The direction of the text. One of `\"ltr\"` (left-to-right) or `\"rtl\"` (right-to-left). This property determines on which side is truncated in response to the limit parameter.\n\n__Default value:__ `\"ltr\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "discreteBandSize": {
+ "description": "The default size of the bars with discrete dimensions. If unspecified, the default size is `step-2`, which provides 2 pixel offset between bars.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "dx": {
+ "anyOf": [
+ {
+ "description": "The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "dy": {
+ "anyOf": [
+ {
+ "description": "The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "ellipsis": {
+ "anyOf": [
+ {
+ "description": "The ellipsis string for text truncated in response to the limit parameter.\n\n__Default value:__ `\"…\"`",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "endAngle": {
+ "anyOf": [
+ {
+ "description": "The end angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "fill": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/Gradient"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Default fill color. This property has higher precedence than `config.color`. Set to `null` to remove fill.\n\n__Default value:__ (None)"
+ },
+ "fillOpacity": {
+ "anyOf": [
+ {
+ "description": "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "filled": {
+ "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `false` for all `point`, `line`, and `rule` marks as well as `geoshape` marks for [`graticule`](https://vega.github.io/vega-lite/docs/data.html#graticule) data sources; otherwise, `true`.\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).",
+ "type": "boolean"
+ },
+ "font": {
+ "anyOf": [
+ {
+ "description": "The typeface to set the text in (e.g., `\"Helvetica Neue\"`).",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "fontSize": {
+ "anyOf": [
+ {
+ "description": "The font size, in pixels.\n\n__Default value:__ `11`",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "fontStyle": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontStyle",
+ "description": "The font style (e.g., `\"italic\"`)."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "fontWeight": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontWeight",
+ "description": "The font weight. This can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "height": {
+ "anyOf": [
+ {
+ "description": "Height of the marks.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "href": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/URI",
+ "description": "A URL to load upon mouse click. If defined, the mark acts as a hyperlink."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "innerRadius": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`."
+ },
+ "interpolate": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Interpolate",
+ "description": "The line interpolation method to use for line and area marks. One of the following: - `\"linear\"`: piecewise linear segments, as in a polyline. - `\"linear-closed\"`: close the linear segments to form a polygon. - `\"step\"`: alternate between horizontal and vertical segments, as in a step function. - `\"step-before\"`: alternate between vertical and horizontal segments, as in a step function. - `\"step-after\"`: alternate between horizontal and vertical segments, as in a step function. - `\"basis\"`: a B-spline, with control point duplication on the ends. - `\"basis-open\"`: an open B-spline; may not intersect the start or end. - `\"basis-closed\"`: a closed B-spline, as in a loop. - `\"cardinal\"`: a Cardinal spline, with control point duplication on the ends. - `\"cardinal-open\"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points. - `\"cardinal-closed\"`: a closed Cardinal spline, as in a loop. - `\"bundle\"`: equivalent to basis, except the tension parameter is used to straighten the spline. - `\"monotone\"`: cubic interpolation that preserves monotonicity in y."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "invalid": {
+ "description": "Defines how Vega-Lite should handle marks for invalid values (`null` and `NaN`). - If set to `\"filter\"` (default), all data items with null values will be skipped (for line, trail, and area marks) or filtered (for other marks). - If `null`, all data items are included. In this case, invalid values will be interpreted as zeroes.",
+ "enum": [
+ "filter",
+ null
+ ],
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "limit": {
+ "anyOf": [
+ {
+ "description": "The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0` -- indicating no limit",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "lineBreak": {
+ "anyOf": [
+ {
+ "description": "A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property is ignored if the text is array-valued.",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "lineHeight": {
+ "anyOf": [
+ {
+ "description": "The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "opacity": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.",
+ "maximum": 1,
+ "minimum": 0
+ },
+ "order": {
+ "description": "For line and trail marks, this `order` property can be set to `null` or `false` to make the lines use the original order in the data sources.",
+ "type": [
+ "null",
+ "boolean"
+ ]
+ },
+ "orient": {
+ "$ref": "#/definitions/Orientation",
+ "description": "The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical. - For bar, rule and tick, this determines whether the size of the bar and tick should be applied to x or y dimension. - For area, this property determines the orient property of the Vega output. - For line and trail marks, this property determines the sort order of the points in the line if `config.sortLineBy` is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored."
+ },
+ "outerRadius": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`."
+ },
+ "padAngle": {
+ "anyOf": [
+ {
+ "description": "The angular padding applied to sides of the arc, in radians.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "radius": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "For arc mark, the primary (outer) radius in pixels.\n\nFor text marks, polar coordinate radial offset, in pixels, of the text from the origin determined by the `x` and `y` properties."
+ },
+ "radius2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The secondary (inner) radius in pixels of arc marks."
+ },
+ "shape": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SymbolShape"
+ },
+ {
+ "type": "string"
+ }
+ ],
+ "description": "Shape of the point marks. Supported values include: - plotting shapes: `\"circle\"`, `\"square\"`, `\"cross\"`, `\"diamond\"`, `\"triangle-up\"`, `\"triangle-down\"`, `\"triangle-right\"`, or `\"triangle-left\"`. - the line symbol `\"stroke\"` - centered directional shapes `\"arrow\"`, `\"wedge\"`, or `\"triangle\"` - a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n__Default value:__ `\"circle\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "size": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Default size for marks. - For `point`/`circle`/`square`, this represents the pixel area of the marks. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value. - For `bar`, this represents the band size of the bar, in pixels. - For `text`, this represents the font size, in pixels.\n\n__Default value:__ - `30` for point, circle, square marks; width/height's `step` - `2` for bar marks with discrete dimensions; - `5` for bar marks with continuous dimensions; - `11` for text marks.",
+ "minimum": 0
+ },
+ "smooth": {
+ "anyOf": [
+ {
+ "description": "A boolean flag (default true) indicating if the image should be smoothed when resized. If false, individual pixels should be scaled directly rather than interpolated with smoothing. For SVG rendering, this option may not work in some browsers due to lack of standardization.",
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "startAngle": {
+ "anyOf": [
+ {
+ "description": "The start angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "stroke": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/Gradient"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Default stroke color. This property has higher precedence than `config.color`. Set to `null` to remove stroke.\n\n__Default value:__ (None)"
+ },
+ "strokeCap": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StrokeCap",
+ "description": "The stroke cap for line ending style. One of `\"butt\"`, `\"round\"`, or `\"square\"`.\n\n__Default value:__ `\"butt\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeDash": {
+ "anyOf": [
+ {
+ "description": "An array of alternating stroke, space lengths for creating dashed or dotted lines.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeDashOffset": {
+ "anyOf": [
+ {
+ "description": "The offset (in pixels) into which to begin drawing with the stroke dash array.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeJoin": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StrokeJoin",
+ "description": "The stroke line join method. One of `\"miter\"`, `\"round\"` or `\"bevel\"`.\n\n__Default value:__ `\"miter\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeMiterLimit": {
+ "anyOf": [
+ {
+ "description": "The miter limit at which to bevel a line join.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeOffset": {
+ "anyOf": [
+ {
+ "description": "The offset in pixels at which to draw the group stroke and fill. If unspecified, the default behavior is to dynamically offset stroked groups such that 1 pixel stroke widths align with the pixel grid.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeOpacity": {
+ "anyOf": [
+ {
+ "description": "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeWidth": {
+ "anyOf": [
+ {
+ "description": "The stroke width, in pixels.",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "tension": {
+ "anyOf": [
+ {
+ "description": "Depending on the interpolation type, sets the tension parameter (for line and area marks).",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "text": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text",
+ "description": "Placeholder text if the `text` channel is not specified"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "theta": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "- For arc marks, the arc length in radians if theta2 is not specified, otherwise the start arc angle. (A value of 0 indicates up or “north”, increasing values proceed clockwise.)\n\n- For text marks, polar coordinate angle in radians.",
+ "maximum": 360,
+ "minimum": 0
+ },
+ "theta2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise."
+ },
+ "timeUnitBand": {
+ "description": "Default relative band size for a time unit. If set to `1`, the bandwidth of the marks will be equal to the time unit band step. If set to `0.5`, bandwidth of the marks will be half of the time unit band step.",
+ "type": "number"
+ },
+ "timeUnitBandPosition": {
+ "description": "Default relative band position for a time unit. If set to `0`, the marks will be positioned at the beginning of the time unit band step. If set to `0.5`, the marks will be positioned in the middle of the time unit band step.",
+ "type": "number"
+ },
+ "tooltip": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/TooltipContent"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.\n\n- If `tooltip` is `true` or `{\"content\": \"encoding\"}`, then all fields from `encoding` will be used. - If `tooltip` is `{\"content\": \"data\"}`, then all fields that appear in the highlighted data point will be used. - If set to `null` or `false`, then no tooltip will be used.\n\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip in Vega-Lite.\n\n__Default value:__ `null`"
+ },
+ "url": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/URI",
+ "description": "The URL of the image file for image marks."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "width": {
+ "anyOf": [
+ {
+ "description": "Width of the marks.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "x": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "width",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "X coordinates of the marks, or width of horizontal `\"bar\"` and `\"area\"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "x2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "width",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "X2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "y": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "height",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Y coordinates of the marks, or height of vertical `\"bar\"` and `\"area\"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ },
+ "y2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "height",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Y2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ }
+ },
+ "type": "object"
+ },
+ "RegressionTransform": {
+ "additionalProperties": false,
+ "properties": {
+ "as": {
+ "description": "The output field names for the smoothed points generated by the regression transform.\n\n__Default value:__ The field names of the input x and y values.",
+ "items": [
+ {
+ "$ref": "#/definitions/FieldName"
+ },
+ {
+ "$ref": "#/definitions/FieldName"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2,
+ "type": "array"
+ },
+ "extent": {
+ "description": "A [min, max] domain over the independent (x) field for the starting and ending points of the generated trend line.",
+ "items": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "number"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2,
+ "type": "array"
+ },
+ "groupby": {
+ "description": "The data fields to group by. If not specified, a single group containing all data objects will be used.",
+ "items": {
+ "$ref": "#/definitions/FieldName"
+ },
+ "type": "array"
+ },
+ "method": {
+ "description": "The functional form of the regression model. One of `\"linear\"`, `\"log\"`, `\"exp\"`, `\"pow\"`, `\"quad\"`, or `\"poly\"`.\n\n__Default value:__ `\"linear\"`",
+ "enum": [
+ "linear",
+ "log",
+ "exp",
+ "pow",
+ "quad",
+ "poly"
+ ],
+ "type": "string"
+ },
+ "on": {
+ "$ref": "#/definitions/FieldName",
+ "description": "The data field of the independent variable to use a predictor."
+ },
+ "order": {
+ "description": "The polynomial order (number of coefficients) for the 'poly' method.\n\n__Default value:__ `3`",
+ "type": "number"
+ },
+ "params": {
+ "description": "A boolean flag indicating if the transform should return the regression model parameters (one object per group), rather than trend line points. The resulting objects include a `coef` array of fitted coefficient values (starting with the intercept term and then including terms of increasing order) and an `rSquared` value (indicating the total variance explained by the model).\n\n__Default value:__ `false`",
+ "type": "boolean"
+ },
+ "regression": {
+ "$ref": "#/definitions/FieldName",
+ "description": "The data field of the dependent variable to predict."
+ }
+ },
+ "required": [
+ "regression",
+ "on"
+ ],
+ "type": "object"
+ },
+ "RepeatMapping": {
+ "additionalProperties": false,
+ "properties": {
+ "column": {
+ "description": "An array of fields to be repeated horizontally.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "row": {
+ "description": "An array of fields to be repeated vertically.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "RepeatRef": {
+ "additionalProperties": false,
+ "description": "Reference to a repeated value.",
+ "properties": {
+ "repeat": {
+ "enum": [
+ "row",
+ "column",
+ "repeat",
+ "layer"
+ ],
+ "type": "string"
+ }
+ },
+ "required": [
+ "repeat"
+ ],
+ "type": "object"
+ },
+ "RepeatSpec": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/NonLayerRepeatSpec"
+ },
+ {
+ "$ref": "#/definitions/LayerRepeatSpec"
+ }
+ ]
+ },
+ "Resolve": {
+ "additionalProperties": false,
+ "description": "Defines how scales, axes, and legends from different specs should be combined. Resolve is a mapping from `scale`, `axis`, and `legend` to a mapping from channels to resolutions. Scales and guides can be resolved to be `\"independent\"` or `\"shared\"`.",
+ "properties": {
+ "axis": {
+ "$ref": "#/definitions/AxisResolveMap"
+ },
+ "legend": {
+ "$ref": "#/definitions/LegendResolveMap"
+ },
+ "scale": {
+ "$ref": "#/definitions/ScaleResolveMap"
+ }
+ },
+ "type": "object"
+ },
+ "ResolveMode": {
+ "enum": [
+ "independent",
+ "shared"
+ ],
+ "type": "string"
+ },
+ "RowCol<LayoutAlign>": {
+ "additionalProperties": false,
+ "properties": {
+ "column": {
+ "$ref": "#/definitions/LayoutAlign"
+ },
+ "row": {
+ "$ref": "#/definitions/LayoutAlign"
+ }
+ },
+ "type": "object"
+ },
+ "RowCol<boolean>": {
+ "additionalProperties": false,
+ "properties": {
+ "column": {
+ "type": "boolean"
+ },
+ "row": {
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ },
+ "RowCol<number>": {
+ "additionalProperties": false,
+ "properties": {
+ "column": {
+ "type": "number"
+ },
+ "row": {
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "RowColumnEncodingFieldDef": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "align": {
+ "$ref": "#/definitions/LayoutAlign",
+ "description": "The alignment to apply to row/column facet's subplot. The supported string values are `\"all\"`, `\"each\"`, and `\"none\"`.\n\n- For `\"none\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other. - For `\"each\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size. - For `\"all\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\n__Default value:__ `\"all\"`."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "center": {
+ "description": "Boolean flag indicating if facet's subviews should be centered relative to their respective rows or columns.\n\n__Default value:__ `false`",
+ "type": "boolean"
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "header": {
+ "$ref": "#/definitions/Header",
+ "description": "An object defining properties of a facet's header."
+ },
+ "sort": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SortArray"
+ },
+ {
+ "$ref": "#/definitions/SortOrder"
+ },
+ {
+ "$ref": "#/definitions/EncodingSortField"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following: - `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`). - `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` is not supported for `row` and `column`."
+ },
+ "spacing": {
+ "description": "The spacing in pixels between facet's sub-views.\n\n__Default value__: Depends on `\"spacing\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)",
+ "type": "number"
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "$ref": "#/definitions/StandardType",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "type": "object"
+ },
+ "SampleTransform": {
+ "additionalProperties": false,
+ "properties": {
+ "sample": {
+ "description": "The maximum number of data objects to include in the sample.\n\n__Default value:__ `1000`",
+ "type": "number"
+ }
+ },
+ "required": [
+ "sample"
+ ],
+ "type": "object"
+ },
+ "Scale": {
+ "additionalProperties": false,
+ "properties": {
+ "align": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The alignment of the steps within the scale range.\n\nThis value must lie in the range `[0,1]`. A value of `0.5` indicates that the steps should be centered within the range. A value of `0` or `1` may be used to shift the bands to one side, say to position them adjacent to an axis.\n\n__Default value:__ `0.5`"
+ },
+ "base": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The logarithm base of the `log` scale (default `10`)."
+ },
+ "bins": {
+ "$ref": "#/definitions/ScaleBins",
+ "description": "Bin boundaries can be provided to scales as either an explicit array of bin boundaries or as a bin specification object. The legal values are: - An [array](../types/#Array) literal of bin boundary values. For example, `[0, 5, 10, 15, 20]`. The array must include both starting and ending boundaries. The previous example uses five values to indicate a total of four bin intervals: [0-5), [5-10), [10-15), [15-20]. Array literals may include signal references as elements. - A [bin specification object](https://vega.github.io/vega-lite/docs/scale.html#bins) that indicates the bin _step_ size, and optionally the _start_ and _stop_ boundaries. - An array of bin boundaries over the scale domain. If provided, axes and legends will use the bin boundaries to inform the choice of tick marks and text labels."
+ },
+ "clamp": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "If `true`, values that exceed the data domain are clamped to either the minimum or maximum range value\n\n__Default value:__ derived from the [scale config](https://vega.github.io/vega-lite/docs/config.html#scale-config)'s `clamp` (`true` by default)."
+ },
+ "constant": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant determining the slope of the symlog function around zero. Only used for `symlog` scales.\n\n__Default value:__ `1`"
+ },
+ "domain": {
+ "anyOf": [
+ {
+ "items": {
+ "anyOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "type": "array"
+ },
+ {
+ "const": "unaggregated",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/SelectionExtent"
+ },
+ {
+ "$ref": "#/definitions/DomainUnionWith"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Customized domain values in the form of constant values or dynamic values driven by a selection.\n\n1) Constant `domain` for _quantitative_ fields can take one of the following forms:\n\n- A two-element array with minimum and maximum values. To create a diverging scale, this two-element array can be combined with the `domainMid` property. - An array with more than two entries, for [Piecewise quantitative scales](https://vega.github.io/vega-lite/docs/scale.html#piecewise). - A string value `\"unaggregated\"`, if the input field is aggregated, to indicate that the domain should include the raw data values prior to the aggregation.\n\n2) Constant `domain` for _temporal_ fields can be a two-element array with minimum and maximum values, in the form of either timestamps or the [DateTime definition objects](https://vega.github.io/vega-lite/docs/types.html#datetime).\n\n3) Constant `domain` for _ordinal_ and _nominal_ fields can be an array that lists valid input values.\n\n4) To combine (union) specified constant domain with the field's values, `domain` can be an object with a `unionWith` property that specify constant domain to be combined. For example, `domain: {unionWith: [0, 100]}` for a quantitative scale means that the scale domain always includes `[0, 100]`, but will include other values in the fields beyond `[0, 100]`.\n\n5) Domain can also takes an object defining a field or encoding of a selection that [interactively determines](https://vega.github.io/vega-lite/docs/selection.html#scale-domains) the scale domain."
+ },
+ "domainMax": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Sets the maximum value in the scale domain, overriding the `domain` property. This property is only intended for use with scales having continuous domains."
+ },
+ "domainMid": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Inserts a single mid-point value into a two-element domain. The mid-point value must lie between the domain minimum and maximum values. This property can be useful for setting a midpoint for [diverging color scales](https://vega.github.io/vega-lite/docs/scale.html#piecewise). The domainMid property is only intended for use with scales supporting continuous, piecewise domains."
+ },
+ "domainMin": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Sets the minimum value in the scale domain, overriding the domain property. This property is only intended for use with scales having continuous domains."
+ },
+ "exponent": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The exponent of the `pow` scale."
+ },
+ "interpolate": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ScaleInterpolateEnum"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/ScaleInterpolateParams"
+ }
+ ],
+ "description": "The interpolation method for range values. By default, a general interpolator for numbers, dates, strings and colors (in HCL space) is used. For color ranges, this property allows interpolation in alternative color spaces. Legal values include `rgb`, `hsl`, `hsl-long`, `lab`, `hcl`, `hcl-long`, `cubehelix` and `cubehelix-long` ('-long' variants use longer paths in polar coordinate spaces). If object-valued, this property accepts an object with a string-valued _type_ property and an optional numeric _gamma_ property applicable to rgb and cubehelix interpolators. For more, see the [d3-interpolate documentation](https://github.com/d3/d3-interpolate).\n\n* __Default value:__ `hcl`"
+ },
+ "nice": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/TimeInterval"
+ },
+ {
+ "$ref": "#/definitions/TimeIntervalStep"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Extending the domain so that it starts and ends on nice round values. This method typically modifies the scale’s domain, and may only extend the bounds to the nearest round value. Nicing is useful if the domain is computed from data and may be irregular. For example, for a domain of _[0.201479…, 0.996679…]_, a nice domain might be _[0.2, 1.0]_.\n\nFor quantitative scales such as linear, `nice` can be either a boolean flag or a number. If `nice` is a number, it will represent a desired tick count. This allows greater control over the step size used to extend the bounds, guaranteeing that the returned ticks will exactly cover the domain.\n\nFor temporal fields with time and utc scales, the `nice` value can be a string indicating the desired time interval. Legal values are `\"millisecond\"`, `\"second\"`, `\"minute\"`, `\"hour\"`, `\"day\"`, `\"week\"`, `\"month\"`, and `\"year\"`. Alternatively, `time` and `utc` scales can accept an object-valued interval specifier of the form `{\"interval\": \"month\", \"step\": 3}`, which includes a desired number of interval steps. Here, the domain would snap to quarter (Jan, Apr, Jul, Oct) boundaries.\n\n__Default value:__ `true` for unbinned _quantitative_ fields; `false` otherwise."
+ },
+ "padding": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "For _[continuous](https://vega.github.io/vega-lite/docs/scale.html#continuous)_ scales, expands the scale domain to accommodate the specified number of pixels on each of the scale range. The scale range must represent pixels for this parameter to function as intended. Padding adjustment is performed prior to all other adjustments, including the effects of the `zero`, `nice`, `domainMin`, and `domainMax` properties.\n\nFor _[band](https://vega.github.io/vega-lite/docs/scale.html#band)_ scales, shortcut for setting `paddingInner` and `paddingOuter` to the same value.\n\nFor _[point](https://vega.github.io/vega-lite/docs/scale.html#point)_ scales, alias for `paddingOuter`.\n\n__Default value:__ For _continuous_ scales, derived from the [scale config](https://vega.github.io/vega-lite/docs/scale.html#config)'s `continuousPadding`. For _band and point_ scales, see `paddingInner` and `paddingOuter`. By default, Vega-Lite sets padding such that _width/height = number of unique values * step_.",
+ "minimum": 0
+ },
+ "paddingInner": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The inner padding (spacing) within each band step of band scales, as a fraction of the step size. This value must lie in the range [0,1].\n\nFor point scale, this property is invalid as point scales do not have internal band widths (only step sizes between bands).\n\n__Default value:__ derived from the [scale config](https://vega.github.io/vega-lite/docs/scale.html#config)'s `bandPaddingInner`.",
+ "maximum": 1,
+ "minimum": 0
+ },
+ "paddingOuter": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The outer padding (spacing) at the ends of the range of band and point scales, as a fraction of the step size. This value must lie in the range [0,1].\n\n__Default value:__ derived from the [scale config](https://vega.github.io/vega-lite/docs/scale.html#config)'s `bandPaddingOuter` for band scales and `pointPadding` for point scales. By default, Vega-Lite sets outer padding such that _width/height = number of unique values * step_.",
+ "maximum": 1,
+ "minimum": 0
+ },
+ "range": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/RangeEnum"
+ },
+ {
+ "items": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "type": "array"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "field": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "field"
+ ],
+ "type": "object"
+ }
+ ],
+ "description": "The range of the scale. One of:\n\n- A string indicating a [pre-defined named scale range](https://vega.github.io/vega-lite/docs/scale.html#range-config) (e.g., example, `\"symbol\"`, or `\"diverging\"`).\n\n- For [continuous scales](https://vega.github.io/vega-lite/docs/scale.html#continuous), two-element array indicating minimum and maximum values, or an array with more than two entries for specifying a [piecewise scale](https://vega.github.io/vega-lite/docs/scale.html#piecewise).\n\n- For [discrete](https://vega.github.io/vega-lite/docs/scale.html#discrete) and [discretizing](https://vega.github.io/vega-lite/docs/scale.html#discretizing) scales, an array of desired output values or an object with a `field` property representing the range values. For example, if a field `color` contains CSS color names, we can set `range` to `{field: \"color\"}`.\n\n__Notes:__\n\n1) For color scales you can also specify a color [`scheme`](https://vega.github.io/vega-lite/docs/scale.html#scheme) instead of `range`.\n\n2) Any directly specified `range` for `x` and `y` channels will be ignored. Range can be customized via the view's corresponding [size](https://vega.github.io/vega-lite/docs/size.html) (`width` and `height`)."
+ },
+ "rangeMax": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Sets the maximum value in the scale range, overriding the `range` property or the default range. This property is only intended for use with scales having continuous ranges."
+ },
+ "rangeMin": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Sets the minimum value in the scale range, overriding the `range` property or the default range. This property is only intended for use with scales having continuous ranges."
+ },
+ "reverse": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "If true, reverses the order of the scale range. __Default value:__ `false`."
+ },
+ "round": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "If `true`, rounds numeric output values to integers. This can be helpful for snapping to the pixel grid.\n\n__Default value:__ `false`."
+ },
+ "scheme": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/SchemeParams"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A string indicating a color [scheme](https://vega.github.io/vega-lite/docs/scale.html#scheme) name (e.g., `\"category10\"` or `\"blues\"`) or a [scheme parameter object](https://vega.github.io/vega-lite/docs/scale.html#scheme-params).\n\nDiscrete color schemes may be used with [discrete](https://vega.github.io/vega-lite/docs/scale.html#discrete) or [discretizing](https://vega.github.io/vega-lite/docs/scale.html#discretizing) scales. Continuous color schemes are intended for use with color scales.\n\nFor the full list of supported schemes, please refer to the [Vega Scheme](https://vega.github.io/vega/docs/schemes/#reference) reference."
+ },
+ "type": {
+ "$ref": "#/definitions/ScaleType",
+ "description": "The type of scale. Vega-Lite supports the following categories of scale types:\n\n1) [**Continuous Scales**](https://vega.github.io/vega-lite/docs/scale.html#continuous) -- mapping continuous domains to continuous output ranges ([`\"linear\"`](https://vega.github.io/vega-lite/docs/scale.html#linear), [`\"pow\"`](https://vega.github.io/vega-lite/docs/scale.html#pow), [`\"sqrt\"`](https://vega.github.io/vega-lite/docs/scale.html#sqrt), [`\"symlog\"`](https://vega.github.io/vega-lite/docs/scale.html#symlog), [`\"log\"`](https://vega.github.io/vega-lite/docs/scale.html#log), [`\"time\"`](https://vega.github.io/vega-lite/docs/scale.html#time), [`\"utc\"`](https://vega.github.io/vega-lite/docs/scale.html#utc).\n\n2) [**Discrete Scales**](https://vega.github.io/vega-lite/docs/scale.html#discrete) -- mapping discrete domains to discrete ([`\"ordinal\"`](https://vega.github.io/vega-lite/docs/scale.html#ordinal)) or continuous ([`\"band\"`](https://vega.github.io/vega-lite/docs/scale.html#band) and [`\"point\"`](https://vega.github.io/vega-lite/docs/scale.html#point)) output ranges.\n\n3) [**Discretizing Scales**](https://vega.github.io/vega-lite/docs/scale.html#discretizing) -- mapping continuous domains to discrete output ranges [`\"bin-ordinal\"`](https://vega.github.io/vega-lite/docs/scale.html#bin-ordinal), [`\"quantile\"`](https://vega.github.io/vega-lite/docs/scale.html#quantile), [`\"quantize\"`](https://vega.github.io/vega-lite/docs/scale.html#quantize) and [`\"threshold\"`](https://vega.github.io/vega-lite/docs/scale.html#threshold).\n\n__Default value:__ please see the [scale type table](https://vega.github.io/vega-lite/docs/scale.html#type)."
+ },
+ "zero": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "If `true`, ensures that a zero baseline value is included in the scale domain.\n\n__Default value:__ `true` for x and y channels if the quantitative field is not binned and no custom `domain` is provided; `false` otherwise.\n\n__Note:__ Log, time, and utc scales do not support `zero`."
+ }
+ },
+ "type": "object"
+ },
+ "ScaleBinParams": {
+ "additionalProperties": false,
+ "properties": {
+ "start": {
+ "description": "The starting (lowest-valued) bin boundary.\n\n__Default value:__ The lowest value of the scale domain will be used.",
+ "type": "number"
+ },
+ "step": {
+ "description": "The step size defining the bin interval width.",
+ "type": "number"
+ },
+ "stop": {
+ "description": "The stopping (highest-valued) bin boundary.\n\n__Default value:__ The highest value of the scale domain will be used.",
+ "type": "number"
+ }
+ },
+ "required": [
+ "step"
+ ],
+ "type": "object"
+ },
+ "ScaleBins": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/ScaleBinParams"
+ }
+ ]
+ },
+ "ScaleConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "bandPaddingInner": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Default inner padding for `x` and `y` band-ordinal scales.\n\n__Default value:__ - `barBandPaddingInner` for bar marks (`0.1` by default) - `rectBandPaddingInner` for rect and other marks (`0` by default)",
+ "maximum": 1,
+ "minimum": 0
+ },
+ "bandPaddingOuter": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Default outer padding for `x` and `y` band-ordinal scales.\n\n__Default value:__ `paddingInner/2` (which makes _width/height = number of unique values * step_)",
+ "maximum": 1,
+ "minimum": 0
+ },
+ "barBandPaddingInner": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Default inner padding for `x` and `y` band-ordinal scales of `\"bar\"` marks.\n\n__Default value:__ `0.1`",
+ "maximum": 1,
+ "minimum": 0
+ },
+ "clamp": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "If true, values that exceed the data domain are clamped to either the minimum or maximum range value"
+ },
+ "continuousPadding": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Default padding for continuous scales.\n\n__Default:__ `5` for continuous x-scale of a vertical bar and continuous y-scale of a horizontal bar.; `0` otherwise.",
+ "minimum": 0
+ },
+ "maxBandSize": {
+ "description": "The default max value for mapping quantitative fields to bar's size/bandSize.\n\nIf undefined (default), we will use the axis's size (width or height) - 1.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "maxFontSize": {
+ "description": "The default max value for mapping quantitative fields to text's size/fontSize.\n\n__Default value:__ `40`",
+ "minimum": 0,
+ "type": "number"
+ },
+ "maxOpacity": {
+ "description": "Default max opacity for mapping a field to opacity.\n\n__Default value:__ `0.8`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "maxSize": {
+ "description": "Default max value for point size scale.",
+ "minimum": 0,
+ "type": "number"
+ },
+ "maxStrokeWidth": {
+ "description": "Default max strokeWidth for the scale of strokeWidth for rule and line marks and of size for trail marks.\n\n__Default value:__ `4`",
+ "minimum": 0,
+ "type": "number"
+ },
+ "minBandSize": {
+ "description": "The default min value for mapping quantitative fields to bar and tick's size/bandSize scale with zero=false.\n\n__Default value:__ `2`",
+ "minimum": 0,
+ "type": "number"
+ },
+ "minFontSize": {
+ "description": "The default min value for mapping quantitative fields to tick's size/fontSize scale with zero=false\n\n__Default value:__ `8`",
+ "minimum": 0,
+ "type": "number"
+ },
+ "minOpacity": {
+ "description": "Default minimum opacity for mapping a field to opacity.\n\n__Default value:__ `0.3`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "minSize": {
+ "description": "Default minimum value for point size scale with zero=false.\n\n__Default value:__ `9`",
+ "minimum": 0,
+ "type": "number"
+ },
+ "minStrokeWidth": {
+ "description": "Default minimum strokeWidth for the scale of strokeWidth for rule and line marks and of size for trail marks with zero=false.\n\n__Default value:__ `1`",
+ "minimum": 0,
+ "type": "number"
+ },
+ "pointPadding": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Default outer padding for `x` and `y` point-ordinal scales.\n\n__Default value:__ `0.5` (which makes _width/height = number of unique values * step_)",
+ "maximum": 1,
+ "minimum": 0
+ },
+ "quantileCount": {
+ "description": "Default range cardinality for [`quantile`](https://vega.github.io/vega-lite/docs/scale.html#quantile) scale.\n\n__Default value:__ `4`",
+ "minimum": 0,
+ "type": "number"
+ },
+ "quantizeCount": {
+ "description": "Default range cardinality for [`quantize`](https://vega.github.io/vega-lite/docs/scale.html#quantize) scale.\n\n__Default value:__ `4`",
+ "minimum": 0,
+ "type": "number"
+ },
+ "rectBandPaddingInner": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Default inner padding for `x` and `y` band-ordinal scales of `\"rect\"` marks.\n\n__Default value:__ `0`",
+ "maximum": 1,
+ "minimum": 0
+ },
+ "round": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "If true, rounds numeric output values to integers. This can be helpful for snapping to the pixel grid. (Only available for `x`, `y`, and `size` scales.)"
+ },
+ "useUnaggregatedDomain": {
+ "description": "Use the source data range before aggregation as scale domain instead of aggregated data for aggregate axis.\n\nThis is equivalent to setting `domain` to `\"unaggregate\"` for aggregated _quantitative_ fields by default.\n\nThis property only works with aggregate functions that produce values within the raw data domain (`\"mean\"`, `\"average\"`, `\"median\"`, `\"q1\"`, `\"q3\"`, `\"min\"`, `\"max\"`). For other aggregations that produce values outside of the raw data domain (e.g. `\"count\"`, `\"sum\"`), this property is ignored.\n\n__Default value:__ `false`",
+ "type": "boolean"
+ },
+ "xReverse": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Reverse x-scale by default (useful for right-to-left charts)."
+ }
+ },
+ "type": "object"
+ },
+ "ScaleInterpolateEnum": {
+ "enum": [
+ "rgb",
+ "lab",
+ "hcl",
+ "hsl",
+ "hsl-long",
+ "hcl-long",
+ "cubehelix",
+ "cubehelix-long"
+ ],
+ "type": "string"
+ },
+ "ScaleInterpolateParams": {
+ "additionalProperties": false,
+ "properties": {
+ "gamma": {
+ "type": "number"
+ },
+ "type": {
+ "enum": [
+ "rgb",
+ "cubehelix",
+ "cubehelix-long"
+ ],
+ "type": "string"
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "type": "object"
+ },
+ "ScaleResolveMap": {
+ "additionalProperties": false,
+ "properties": {
+ "angle": {
+ "$ref": "#/definitions/ResolveMode"
+ },
+ "color": {
+ "$ref": "#/definitions/ResolveMode"
+ },
+ "fill": {
+ "$ref": "#/definitions/ResolveMode"
+ },
+ "fillOpacity": {
+ "$ref": "#/definitions/ResolveMode"
+ },
+ "opacity": {
+ "$ref": "#/definitions/ResolveMode"
+ },
+ "radius": {
+ "$ref": "#/definitions/ResolveMode"
+ },
+ "shape": {
+ "$ref": "#/definitions/ResolveMode"
+ },
+ "size": {
+ "$ref": "#/definitions/ResolveMode"
+ },
+ "stroke": {
+ "$ref": "#/definitions/ResolveMode"
+ },
+ "strokeDash": {
+ "$ref": "#/definitions/ResolveMode"
+ },
+ "strokeOpacity": {
+ "$ref": "#/definitions/ResolveMode"
+ },
+ "strokeWidth": {
+ "$ref": "#/definitions/ResolveMode"
+ },
+ "theta": {
+ "$ref": "#/definitions/ResolveMode"
+ },
+ "x": {
+ "$ref": "#/definitions/ResolveMode"
+ },
+ "y": {
+ "$ref": "#/definitions/ResolveMode"
+ }
+ },
+ "type": "object"
+ },
+ "ScaleType": {
+ "enum": [
+ "linear",
+ "log",
+ "pow",
+ "sqrt",
+ "symlog",
+ "identity",
+ "sequential",
+ "time",
+ "utc",
+ "quantile",
+ "quantize",
+ "threshold",
+ "bin-ordinal",
+ "ordinal",
+ "point",
+ "band"
+ ],
+ "type": "string"
+ },
+ "SchemeParams": {
+ "additionalProperties": false,
+ "properties": {
+ "count": {
+ "description": "The number of colors to use in the scheme. This can be useful for scale types such as `\"quantize\"`, which use the length of the scale range to determine the number of discrete bins for the scale domain.",
+ "type": "number"
+ },
+ "extent": {
+ "description": "The extent of the color range to use. For example `[0.2, 1]` will rescale the color scheme such that color values in the range _[0, 0.2)_ are excluded from the scheme.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "name": {
+ "description": "A color scheme name for ordinal scales (e.g., `\"category10\"` or `\"blues\"`).\n\nFor the full list of supported schemes, please refer to the [Vega Scheme](https://vega.github.io/vega/docs/schemes/#reference) reference.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "type": "object"
+ },
+ "SecondaryFieldDef": {
+ "additionalProperties": false,
+ "description": "A field definition of a secondary channel that shares a scale with another primary channel. For example, `x2`, `xError` and `xError2` share the same scale with `x`.",
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.",
+ "type": "null"
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ }
+ },
+ "type": "object"
+ },
+ "SelectionConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "interval": {
+ "$ref": "#/definitions/IntervalSelectionConfig",
+ "description": "The default definition for an [`interval`](https://vega.github.io/vega-lite/docs/selection.html#type) selection. All properties and transformations for an interval selection definition (except `type`) may be specified here.\n\nFor instance, setting `interval` to `{\"translate\": false}` disables the ability to move interval selections by default."
+ },
+ "multi": {
+ "$ref": "#/definitions/MultiSelectionConfig",
+ "description": "The default definition for a [`multi`](https://vega.github.io/vega-lite/docs/selection.html#type) selection. All properties and transformations for a multi selection definition (except `type`) may be specified here.\n\nFor instance, setting `multi` to `{\"toggle\": \"event.altKey\"}` adds additional values to multi selections when clicking with the alt-key pressed by default."
+ },
+ "single": {
+ "$ref": "#/definitions/SingleSelectionConfig",
+ "description": "The default definition for a [`single`](https://vega.github.io/vega-lite/docs/selection.html#type) selection. All properties and transformations for a single selection definition (except `type`) may be specified here.\n\nFor instance, setting `single` to `{\"on\": \"dblclick\"}` populates single selections on double-click by default."
+ }
+ },
+ "type": "object"
+ },
+ "SelectionDef": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SingleSelection"
+ },
+ {
+ "$ref": "#/definitions/MultiSelection"
+ },
+ {
+ "$ref": "#/definitions/IntervalSelection"
+ }
+ ]
+ },
+ "SelectionExtent": {
+ "anyOf": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "field": {
+ "$ref": "#/definitions/FieldName",
+ "description": "The field name to extract selected values for, when a selection is [projected](https://vega.github.io/vega-lite/docs/project.html) over multiple fields or encodings."
+ },
+ "selection": {
+ "description": "The name of a selection.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "selection"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "encoding": {
+ "$ref": "#/definitions/SingleDefUnitChannel",
+ "description": "The encoding channel to extract selected values for, when a selection is [projected](https://vega.github.io/vega-lite/docs/project.html) over multiple fields or encodings."
+ },
+ "selection": {
+ "description": "The name of a selection.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "selection"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "SelectionInit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/PrimitiveValue"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ }
+ ]
+ },
+ "SelectionInitInterval": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Vector2<boolean>"
+ },
+ {
+ "$ref": "#/definitions/Vector2<number>"
+ },
+ {
+ "$ref": "#/definitions/Vector2<string>"
+ },
+ {
+ "$ref": "#/definitions/Vector2<DateTime>"
+ }
+ ]
+ },
+ "SelectionInitIntervalMapping": {
+ "$ref": "#/definitions/Dict<SelectionInitInterval>"
+ },
+ "SelectionInitMapping": {
+ "$ref": "#/definitions/Dict<SelectionInit>"
+ },
+ "SelectionPredicate": {
+ "additionalProperties": false,
+ "properties": {
+ "selection": {
+ "$ref": "#/definitions/SelectionComposition",
+ "description": "Filter using a selection name or a logical composition of selection names."
+ }
+ },
+ "required": [
+ "selection"
+ ],
+ "type": "object"
+ },
+ "SelectionResolution": {
+ "enum": [
+ "global",
+ "union",
+ "intersect"
+ ],
+ "type": "string"
+ },
+ "SequenceGenerator": {
+ "additionalProperties": false,
+ "properties": {
+ "name": {
+ "description": "Provide a placeholder name and bind data at runtime.",
+ "type": "string"
+ },
+ "sequence": {
+ "$ref": "#/definitions/SequenceParams",
+ "description": "Generate a sequence of numbers."
+ }
+ },
+ "required": [
+ "sequence"
+ ],
+ "type": "object"
+ },
+ "SequenceParams": {
+ "additionalProperties": false,
+ "properties": {
+ "as": {
+ "$ref": "#/definitions/FieldName",
+ "description": "The name of the generated sequence field.\n\n__Default value:__ `\"data\"`"
+ },
+ "start": {
+ "description": "The starting value of the sequence (inclusive).",
+ "type": "number"
+ },
+ "step": {
+ "description": "The step value between sequence entries.\n\n__Default value:__ `1`",
+ "type": "number"
+ },
+ "stop": {
+ "description": "The ending value of the sequence (exclusive).",
+ "type": "number"
+ }
+ },
+ "required": [
+ "start",
+ "stop"
+ ],
+ "type": "object"
+ },
+ "SequentialMultiHue": {
+ "enum": [
+ "turbo",
+ "viridis",
+ "inferno",
+ "magma",
+ "plasma",
+ "cividis",
+ "bluegreen",
+ "bluegreen-3",
+ "bluegreen-4",
+ "bluegreen-5",
+ "bluegreen-6",
+ "bluegreen-7",
+ "bluegreen-8",
+ "bluegreen-9",
+ "bluepurple",
+ "bluepurple-3",
+ "bluepurple-4",
+ "bluepurple-5",
+ "bluepurple-6",
+ "bluepurple-7",
+ "bluepurple-8",
+ "bluepurple-9",
+ "goldgreen",
+ "goldgreen-3",
+ "goldgreen-4",
+ "goldgreen-5",
+ "goldgreen-6",
+ "goldgreen-7",
+ "goldgreen-8",
+ "goldgreen-9",
+ "goldorange",
+ "goldorange-3",
+ "goldorange-4",
+ "goldorange-5",
+ "goldorange-6",
+ "goldorange-7",
+ "goldorange-8",
+ "goldorange-9",
+ "goldred",
+ "goldred-3",
+ "goldred-4",
+ "goldred-5",
+ "goldred-6",
+ "goldred-7",
+ "goldred-8",
+ "goldred-9",
+ "greenblue",
+ "greenblue-3",
+ "greenblue-4",
+ "greenblue-5",
+ "greenblue-6",
+ "greenblue-7",
+ "greenblue-8",
+ "greenblue-9",
+ "orangered",
+ "orangered-3",
+ "orangered-4",
+ "orangered-5",
+ "orangered-6",
+ "orangered-7",
+ "orangered-8",
+ "orangered-9",
+ "purplebluegreen",
+ "purplebluegreen-3",
+ "purplebluegreen-4",
+ "purplebluegreen-5",
+ "purplebluegreen-6",
+ "purplebluegreen-7",
+ "purplebluegreen-8",
+ "purplebluegreen-9",
+ "purpleblue",
+ "purpleblue-3",
+ "purpleblue-4",
+ "purpleblue-5",
+ "purpleblue-6",
+ "purpleblue-7",
+ "purpleblue-8",
+ "purpleblue-9",
+ "purplered",
+ "purplered-3",
+ "purplered-4",
+ "purplered-5",
+ "purplered-6",
+ "purplered-7",
+ "purplered-8",
+ "purplered-9",
+ "redpurple",
+ "redpurple-3",
+ "redpurple-4",
+ "redpurple-5",
+ "redpurple-6",
+ "redpurple-7",
+ "redpurple-8",
+ "redpurple-9",
+ "yellowgreenblue",
+ "yellowgreenblue-3",
+ "yellowgreenblue-4",
+ "yellowgreenblue-5",
+ "yellowgreenblue-6",
+ "yellowgreenblue-7",
+ "yellowgreenblue-8",
+ "yellowgreenblue-9",
+ "yellowgreen",
+ "yellowgreen-3",
+ "yellowgreen-4",
+ "yellowgreen-5",
+ "yellowgreen-6",
+ "yellowgreen-7",
+ "yellowgreen-8",
+ "yellowgreen-9",
+ "yelloworangebrown",
+ "yelloworangebrown-3",
+ "yelloworangebrown-4",
+ "yelloworangebrown-5",
+ "yelloworangebrown-6",
+ "yelloworangebrown-7",
+ "yelloworangebrown-8",
+ "yelloworangebrown-9",
+ "yelloworangered",
+ "yelloworangered-3",
+ "yelloworangered-4",
+ "yelloworangered-5",
+ "yelloworangered-6",
+ "yelloworangered-7",
+ "yelloworangered-8",
+ "yelloworangered-9",
+ "darkblue",
+ "darkblue-3",
+ "darkblue-4",
+ "darkblue-5",
+ "darkblue-6",
+ "darkblue-7",
+ "darkblue-8",
+ "darkblue-9",
+ "darkgold",
+ "darkgold-3",
+ "darkgold-4",
+ "darkgold-5",
+ "darkgold-6",
+ "darkgold-7",
+ "darkgold-8",
+ "darkgold-9",
+ "darkgreen",
+ "darkgreen-3",
+ "darkgreen-4",
+ "darkgreen-5",
+ "darkgreen-6",
+ "darkgreen-7",
+ "darkgreen-8",
+ "darkgreen-9",
+ "darkmulti",
+ "darkmulti-3",
+ "darkmulti-4",
+ "darkmulti-5",
+ "darkmulti-6",
+ "darkmulti-7",
+ "darkmulti-8",
+ "darkmulti-9",
+ "darkred",
+ "darkred-3",
+ "darkred-4",
+ "darkred-5",
+ "darkred-6",
+ "darkred-7",
+ "darkred-8",
+ "darkred-9",
+ "lightgreyred",
+ "lightgreyred-3",
+ "lightgreyred-4",
+ "lightgreyred-5",
+ "lightgreyred-6",
+ "lightgreyred-7",
+ "lightgreyred-8",
+ "lightgreyred-9",
+ "lightgreyteal",
+ "lightgreyteal-3",
+ "lightgreyteal-4",
+ "lightgreyteal-5",
+ "lightgreyteal-6",
+ "lightgreyteal-7",
+ "lightgreyteal-8",
+ "lightgreyteal-9",
+ "lightmulti",
+ "lightmulti-3",
+ "lightmulti-4",
+ "lightmulti-5",
+ "lightmulti-6",
+ "lightmulti-7",
+ "lightmulti-8",
+ "lightmulti-9",
+ "lightorange",
+ "lightorange-3",
+ "lightorange-4",
+ "lightorange-5",
+ "lightorange-6",
+ "lightorange-7",
+ "lightorange-8",
+ "lightorange-9",
+ "lighttealblue",
+ "lighttealblue-3",
+ "lighttealblue-4",
+ "lighttealblue-5",
+ "lighttealblue-6",
+ "lighttealblue-7",
+ "lighttealblue-8",
+ "lighttealblue-9"
+ ],
+ "type": "string"
+ },
+ "SequentialSingleHue": {
+ "enum": [
+ "blues",
+ "tealblues",
+ "teals",
+ "greens",
+ "browns",
+ "greys",
+ "purples",
+ "warmgreys",
+ "reds",
+ "oranges"
+ ],
+ "type": "string"
+ },
+ "ShapeDef": {
+ "$ref": "#/definitions/MarkPropDef<(string|null),TypeForShape>"
+ },
+ "SharedEncoding": {
+ "additionalProperties": false,
+ "properties": {
+ "angle": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "condition": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalMarkPropFieldOrDatumDef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "A field definition or one or more value definition(s) with a selection predicate."
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ "datum": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/PrimitiveValue"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/RepeatRef"
+ }
+ ],
+ "description": "A constant value in data domain."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "legend": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Legend"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
+ },
+ "scale": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Scale"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation."
+ },
+ "sort": {
+ "$ref": "#/definitions/Sort",
+ "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following: - `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`). - `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StandardType",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ },
+ {
+ "$ref": "#/definitions/Type",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ ],
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ },
+ "value": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "type": "object"
+ },
+ "color": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "condition": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalMarkPropFieldOrDatumDef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "A field definition or one or more value definition(s) with a selection predicate."
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ "datum": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/PrimitiveValue"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/RepeatRef"
+ }
+ ],
+ "description": "A constant value in data domain."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "legend": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Legend"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
+ },
+ "scale": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Scale"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation."
+ },
+ "sort": {
+ "$ref": "#/definitions/Sort",
+ "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following: - `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`). - `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StandardType",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ },
+ {
+ "$ref": "#/definitions/Type",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ ],
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ },
+ "value": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Gradient"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "type": "object"
+ },
+ "description": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "const": "binned",
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "condition": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(string|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(string|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalMarkPropFieldOrDatumDef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(string|null|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(string|null|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "A field definition or one or more value definition(s) with a selection predicate."
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "format": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/Dict<unknown>"
+ }
+ ],
+ "description": "When used with the default `\"number\"` and `\"time\"` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `\"number\"` (e.g., for quantitative fields), this is D3's [number format pattern](https://github.com/d3/d3-format#locale_format). - If the format type is `\"time\"` (e.g., for temporal fields), this is D3's [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\n\n__Default value:__ Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format."
+ },
+ "formatType": {
+ "description": "The format type for labels. One of `\"number\"`, `\"time\"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\n\n__Default value:__ - `\"time\"` for temporal fields and ordinal and nominal fields with `timeUnit`. - `\"number\"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.",
+ "type": "string"
+ },
+ "labelExpr": {
+ "description": "[Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels text.\n\n__Note:__ The label text and value can be assessed via the `label` and `value` properties of the axis's backing `datum` object.",
+ "type": "string"
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "$ref": "#/definitions/StandardType",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ },
+ "value": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "type": "object"
+ },
+ "detail": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FieldDefWithoutScale"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/FieldDefWithoutScale"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "Additional levels of detail for grouping data in aggregate views and in line, trail, and area marks without mapping data to a specific visual channel."
+ },
+ "fill": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "condition": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalMarkPropFieldOrDatumDef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "A field definition or one or more value definition(s) with a selection predicate."
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ "datum": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/PrimitiveValue"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/RepeatRef"
+ }
+ ],
+ "description": "A constant value in data domain."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "legend": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Legend"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
+ },
+ "scale": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Scale"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation."
+ },
+ "sort": {
+ "$ref": "#/definitions/Sort",
+ "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following: - `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`). - `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StandardType",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ },
+ {
+ "$ref": "#/definitions/Type",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ ],
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ },
+ "value": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Gradient"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "type": "object"
+ },
+ "fillOpacity": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "condition": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalMarkPropFieldOrDatumDef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "A field definition or one or more value definition(s) with a selection predicate."
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ "datum": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/PrimitiveValue"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/RepeatRef"
+ }
+ ],
+ "description": "A constant value in data domain."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "legend": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Legend"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
+ },
+ "scale": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Scale"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation."
+ },
+ "sort": {
+ "$ref": "#/definitions/Sort",
+ "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following: - `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`). - `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StandardType",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ },
+ {
+ "$ref": "#/definitions/Type",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ ],
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ },
+ "value": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "type": "object"
+ },
+ "href": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "const": "binned",
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "condition": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(string|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(string|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalMarkPropFieldOrDatumDef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(string|null|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(string|null|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "A field definition or one or more value definition(s) with a selection predicate."
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "format": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/Dict<unknown>"
+ }
+ ],
+ "description": "When used with the default `\"number\"` and `\"time\"` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `\"number\"` (e.g., for quantitative fields), this is D3's [number format pattern](https://github.com/d3/d3-format#locale_format). - If the format type is `\"time\"` (e.g., for temporal fields), this is D3's [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\n\n__Default value:__ Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format."
+ },
+ "formatType": {
+ "description": "The format type for labels. One of `\"number\"`, `\"time\"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\n\n__Default value:__ - `\"time\"` for temporal fields and ordinal and nominal fields with `timeUnit`. - `\"number\"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.",
+ "type": "string"
+ },
+ "labelExpr": {
+ "description": "[Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels text.\n\n__Note:__ The label text and value can be assessed via the `label` and `value` properties of the axis's backing `datum` object.",
+ "type": "string"
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "$ref": "#/definitions/StandardType",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ },
+ "value": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "type": "object"
+ },
+ "key": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "const": "binned",
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "$ref": "#/definitions/StandardType",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "type": "object"
+ },
+ "latitude": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.",
+ "type": "null"
+ },
+ "datum": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/PrimitiveValue"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/RepeatRef"
+ }
+ ],
+ "description": "A constant value in data domain."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "anyOf": [
+ {
+ "const": "quantitative",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/Type",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ ],
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ },
+ "value": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "type": "object"
+ },
+ "latitude2": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.",
+ "type": "null"
+ },
+ "datum": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/PrimitiveValue"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/RepeatRef"
+ }
+ ],
+ "description": "A constant value in data domain."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "$ref": "#/definitions/Type",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ },
+ "value": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "width",
+ "type": "string"
+ },
+ {
+ "const": "height",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "type": "object"
+ },
+ "longitude": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.",
+ "type": "null"
+ },
+ "datum": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/PrimitiveValue"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/RepeatRef"
+ }
+ ],
+ "description": "A constant value in data domain."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "anyOf": [
+ {
+ "const": "quantitative",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/Type",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ ],
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ },
+ "value": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "type": "object"
+ },
+ "longitude2": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.",
+ "type": "null"
+ },
+ "datum": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/PrimitiveValue"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/RepeatRef"
+ }
+ ],
+ "description": "A constant value in data domain."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "$ref": "#/definitions/Type",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ },
+ "value": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "width",
+ "type": "string"
+ },
+ {
+ "const": "height",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "type": "object"
+ },
+ "opacity": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "condition": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalMarkPropFieldOrDatumDef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "A field definition or one or more value definition(s) with a selection predicate."
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ "datum": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/PrimitiveValue"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/RepeatRef"
+ }
+ ],
+ "description": "A constant value in data domain."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "legend": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Legend"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
+ },
+ "scale": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Scale"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation."
+ },
+ "sort": {
+ "$ref": "#/definitions/Sort",
+ "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following: - `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`). - `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StandardType",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ },
+ {
+ "$ref": "#/definitions/Type",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ ],
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ },
+ "value": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "type": "object"
+ },
+ "order": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/OrderFieldDef"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/OrderFieldDef"
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/OrderValueDef"
+ }
+ ],
+ "description": "Order of the marks. - For stacked marks, this `order` channel encodes [stack order](https://vega.github.io/vega-lite/docs/stack.html#order). - For line and trail marks, this `order` channel encodes order of data points in the lines. This can be useful for creating [a connected scatterplot](https://vega.github.io/vega-lite/examples/connected_scatterplot.html). Setting `order` to `{\"value\": null}` makes the line marks use the original order in the data sources. - Otherwise, this `order` channel encodes layer order of the marks.\n\n__Note__: In aggregate plots, `order` field should be `aggregate`d to avoid creating additional aggregation grouping."
+ },
+ "radius": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "const": "binned",
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "datum": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/PrimitiveValue"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/RepeatRef"
+ }
+ ],
+ "description": "A constant value in data domain."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "scale": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Scale"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation."
+ },
+ "sort": {
+ "$ref": "#/definitions/Sort",
+ "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following: - `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`). - `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation."
+ },
+ "stack": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StackOffset"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "description": "Type of stacking offset if the field should be stacked. `stack` is only applicable for `x`, `y`, `theta`, and `radius` channels with continuous domains. For example, `stack` of `y` can be used to customize stacking for a vertical bar chart.\n\n`stack` can be one of the following values: - `\"zero\"` or `true`: stacking with baseline offset at zero value of the scale (for creating typical stacked [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and [area](https://vega.github.io/vega-lite/docs/stack.html#area) chart). - `\"normalize\"` - stacking with normalized domain (for creating [normalized stacked bar and area charts](https://vega.github.io/vega-lite/docs/stack.html#normalized). <br/> -`\"center\"` - stacking with center baseline (for [streamgraph](https://vega.github.io/vega-lite/docs/stack.html#streamgraph)). - `null` or `false` - No-stacking. This will produce layered [bar](https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart) and area chart.\n\n__Default value:__ `zero` for plots with all of the following conditions are true: (1) the mark is `bar`, `area`, or `arc`; (2) the stacked measure channel (x or y) has a linear scale; (3) At least one of non-position channels mapped to an unaggregated field that is different from x and y. Otherwise, `null` by default.\n\n__See also:__ [`stack`](https://vega.github.io/vega-lite/docs/stack.html) documentation."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StandardType",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ },
+ {
+ "$ref": "#/definitions/Type",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ ],
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ },
+ "value": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "width",
+ "type": "string"
+ },
+ {
+ "const": "height",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "type": "object"
+ },
+ "radius2": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.",
+ "type": "null"
+ },
+ "datum": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/PrimitiveValue"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/RepeatRef"
+ }
+ ],
+ "description": "A constant value in data domain."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "$ref": "#/definitions/Type",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ },
+ "value": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "width",
+ "type": "string"
+ },
+ {
+ "const": "height",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "type": "object"
+ },
+ "shape": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "condition": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(string|null|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(string|null|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalMarkPropFieldOrDatumDef<TypeForShape>"
+ },
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(string|null|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(string|null|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "A field definition or one or more value definition(s) with a selection predicate."
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ "datum": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/PrimitiveValue"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/RepeatRef"
+ }
+ ],
+ "description": "A constant value in data domain."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "legend": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Legend"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
+ },
+ "scale": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Scale"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation."
+ },
+ "sort": {
+ "$ref": "#/definitions/Sort",
+ "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following: - `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`). - `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TypeForShape",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ },
+ {
+ "$ref": "#/definitions/Type",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ ],
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ },
+ "value": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "type": "object"
+ },
+ "size": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "condition": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalMarkPropFieldOrDatumDef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "A field definition or one or more value definition(s) with a selection predicate."
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ "datum": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/PrimitiveValue"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/RepeatRef"
+ }
+ ],
+ "description": "A constant value in data domain."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "legend": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Legend"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
+ },
+ "scale": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Scale"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation."
+ },
+ "sort": {
+ "$ref": "#/definitions/Sort",
+ "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following: - `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`). - `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StandardType",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ },
+ {
+ "$ref": "#/definitions/Type",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ ],
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ },
+ "value": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "type": "object"
+ },
+ "stroke": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "condition": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalMarkPropFieldOrDatumDef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "A field definition or one or more value definition(s) with a selection predicate."
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ "datum": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/PrimitiveValue"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/RepeatRef"
+ }
+ ],
+ "description": "A constant value in data domain."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "legend": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Legend"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
+ },
+ "scale": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Scale"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation."
+ },
+ "sort": {
+ "$ref": "#/definitions/Sort",
+ "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following: - `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`). - `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StandardType",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ },
+ {
+ "$ref": "#/definitions/Type",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ ],
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ },
+ "value": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Gradient"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "type": "object"
+ },
+ "strokeDash": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "condition": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(number[]|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(number[]|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalMarkPropFieldOrDatumDef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(number[]|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(number[]|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "A field definition or one or more value definition(s) with a selection predicate."
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ "datum": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/PrimitiveValue"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/RepeatRef"
+ }
+ ],
+ "description": "A constant value in data domain."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "legend": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Legend"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
+ },
+ "scale": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Scale"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation."
+ },
+ "sort": {
+ "$ref": "#/definitions/Sort",
+ "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following: - `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`). - `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StandardType",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ },
+ {
+ "$ref": "#/definitions/Type",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ ],
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ },
+ "value": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "type": "object"
+ },
+ "strokeOpacity": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "condition": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalMarkPropFieldOrDatumDef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "A field definition or one or more value definition(s) with a selection predicate."
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ "datum": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/PrimitiveValue"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/RepeatRef"
+ }
+ ],
+ "description": "A constant value in data domain."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "legend": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Legend"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
+ },
+ "scale": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Scale"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation."
+ },
+ "sort": {
+ "$ref": "#/definitions/Sort",
+ "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following: - `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`). - `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StandardType",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ },
+ {
+ "$ref": "#/definitions/Type",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ ],
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ },
+ "value": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "type": "object"
+ },
+ "strokeWidth": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "condition": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalMarkPropFieldOrDatumDef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "A field definition or one or more value definition(s) with a selection predicate."
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ "datum": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/PrimitiveValue"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/RepeatRef"
+ }
+ ],
+ "description": "A constant value in data domain."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "legend": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Legend"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
+ },
+ "scale": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Scale"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation."
+ },
+ "sort": {
+ "$ref": "#/definitions/Sort",
+ "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following: - `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`). - `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StandardType",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ },
+ {
+ "$ref": "#/definitions/Type",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ ],
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ },
+ "value": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "type": "object"
+ },
+ "text": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "const": "binned",
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "condition": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(Text|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(Text|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalStringFieldDef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(Text|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(Text|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "A field definition or one or more value definition(s) with a selection predicate."
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ "datum": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/PrimitiveValue"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/RepeatRef"
+ }
+ ],
+ "description": "A constant value in data domain."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "format": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/Dict<unknown>"
+ }
+ ],
+ "description": "When used with the default `\"number\"` and `\"time\"` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `\"number\"` (e.g., for quantitative fields), this is D3's [number format pattern](https://github.com/d3/d3-format#locale_format). - If the format type is `\"time\"` (e.g., for temporal fields), this is D3's [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\n\n__Default value:__ Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format."
+ },
+ "formatType": {
+ "description": "The format type for labels. One of `\"number\"`, `\"time\"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\n\n__Default value:__ - `\"time\"` for temporal fields and ordinal and nominal fields with `timeUnit`. - `\"number\"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.",
+ "type": "string"
+ },
+ "labelExpr": {
+ "description": "[Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels text.\n\n__Note:__ The label text and value can be assessed via the `label` and `value` properties of the axis's backing `datum` object.",
+ "type": "string"
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StandardType",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ },
+ {
+ "$ref": "#/definitions/Type",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ ],
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ },
+ "value": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "type": "object"
+ },
+ "theta": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "const": "binned",
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "datum": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/PrimitiveValue"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/RepeatRef"
+ }
+ ],
+ "description": "A constant value in data domain."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "scale": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Scale"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation."
+ },
+ "sort": {
+ "$ref": "#/definitions/Sort",
+ "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following: - `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`). - `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation."
+ },
+ "stack": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StackOffset"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "description": "Type of stacking offset if the field should be stacked. `stack` is only applicable for `x`, `y`, `theta`, and `radius` channels with continuous domains. For example, `stack` of `y` can be used to customize stacking for a vertical bar chart.\n\n`stack` can be one of the following values: - `\"zero\"` or `true`: stacking with baseline offset at zero value of the scale (for creating typical stacked [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and [area](https://vega.github.io/vega-lite/docs/stack.html#area) chart). - `\"normalize\"` - stacking with normalized domain (for creating [normalized stacked bar and area charts](https://vega.github.io/vega-lite/docs/stack.html#normalized). <br/> -`\"center\"` - stacking with center baseline (for [streamgraph](https://vega.github.io/vega-lite/docs/stack.html#streamgraph)). - `null` or `false` - No-stacking. This will produce layered [bar](https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart) and area chart.\n\n__Default value:__ `zero` for plots with all of the following conditions are true: (1) the mark is `bar`, `area`, or `arc`; (2) the stacked measure channel (x or y) has a linear scale; (3) At least one of non-position channels mapped to an unaggregated field that is different from x and y. Otherwise, `null` by default.\n\n__See also:__ [`stack`](https://vega.github.io/vega-lite/docs/stack.html) documentation."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StandardType",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ },
+ {
+ "$ref": "#/definitions/Type",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ ],
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ },
+ "value": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "width",
+ "type": "string"
+ },
+ {
+ "const": "height",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "type": "object"
+ },
+ "theta2": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.",
+ "type": "null"
+ },
+ "datum": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/PrimitiveValue"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/RepeatRef"
+ }
+ ],
+ "description": "A constant value in data domain."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "$ref": "#/definitions/Type",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ },
+ "value": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "width",
+ "type": "string"
+ },
+ {
+ "const": "height",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "type": "object"
+ },
+ "tooltip": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StringFieldDefWithCondition"
+ },
+ {
+ "$ref": "#/definitions/StringValueDefWithCondition"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/StringFieldDef"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The tooltip text to show upon mouse hover. Specifying `tooltip` encoding overrides [the `tooltip` property in the mark definition](https://vega.github.io/vega-lite/docs/mark.html#mark-def).\n\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip in Vega-Lite."
+ },
+ "url": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "const": "binned",
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "condition": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(string|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(string|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalMarkPropFieldOrDatumDef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(string|null|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(string|null|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "A field definition or one or more value definition(s) with a selection predicate."
+ }
+ ],
+ "description": "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "format": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/Dict<unknown>"
+ }
+ ],
+ "description": "When used with the default `\"number\"` and `\"time\"` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `\"number\"` (e.g., for quantitative fields), this is D3's [number format pattern](https://github.com/d3/d3-format#locale_format). - If the format type is `\"time\"` (e.g., for temporal fields), this is D3's [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\n\n__Default value:__ Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format."
+ },
+ "formatType": {
+ "description": "The format type for labels. One of `\"number\"`, `\"time\"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\n\n__Default value:__ - `\"time\"` for temporal fields and ordinal and nominal fields with `timeUnit`. - `\"number\"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.",
+ "type": "string"
+ },
+ "labelExpr": {
+ "description": "[Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels text.\n\n__Note:__ The label text and value can be assessed via the `label` and `value` properties of the axis's backing `datum` object.",
+ "type": "string"
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "$ref": "#/definitions/StandardType",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ },
+ "value": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "type": "object"
+ },
+ "x": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "axis": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Axis"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of axis's gridlines, ticks and labels. If `null`, the axis for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [axis properties](https://vega.github.io/vega-lite/docs/axis.html) are applied.\n\n__See also:__ [`axis`](https://vega.github.io/vega-lite/docs/axis.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "const": "binned",
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "datum": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/PrimitiveValue"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/RepeatRef"
+ }
+ ],
+ "description": "A constant value in data domain."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "impute": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ImputeParams"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining the properties of the Impute Operation to be applied. The field value of the other positional channel is taken as `key` of the `Impute` Operation. The field of the `color` channel if specified is used as `groupby` of the `Impute` Operation.\n\n__See also:__ [`impute`](https://vega.github.io/vega-lite/docs/impute.html) documentation."
+ },
+ "scale": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Scale"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation."
+ },
+ "sort": {
+ "$ref": "#/definitions/Sort",
+ "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following: - `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`). - `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation."
+ },
+ "stack": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StackOffset"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "description": "Type of stacking offset if the field should be stacked. `stack` is only applicable for `x`, `y`, `theta`, and `radius` channels with continuous domains. For example, `stack` of `y` can be used to customize stacking for a vertical bar chart.\n\n`stack` can be one of the following values: - `\"zero\"` or `true`: stacking with baseline offset at zero value of the scale (for creating typical stacked [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and [area](https://vega.github.io/vega-lite/docs/stack.html#area) chart). - `\"normalize\"` - stacking with normalized domain (for creating [normalized stacked bar and area charts](https://vega.github.io/vega-lite/docs/stack.html#normalized). <br/> -`\"center\"` - stacking with center baseline (for [streamgraph](https://vega.github.io/vega-lite/docs/stack.html#streamgraph)). - `null` or `false` - No-stacking. This will produce layered [bar](https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart) and area chart.\n\n__Default value:__ `zero` for plots with all of the following conditions are true: (1) the mark is `bar`, `area`, or `arc`; (2) the stacked measure channel (x or y) has a linear scale; (3) At least one of non-position channels mapped to an unaggregated field that is different from x and y. Otherwise, `null` by default.\n\n__See also:__ [`stack`](https://vega.github.io/vega-lite/docs/stack.html) documentation."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StandardType",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ },
+ {
+ "$ref": "#/definitions/Type",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ ],
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ },
+ "value": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "width",
+ "type": "string"
+ },
+ {
+ "const": "height",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "type": "object"
+ },
+ "x2": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.",
+ "type": "null"
+ },
+ "datum": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/PrimitiveValue"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/RepeatRef"
+ }
+ ],
+ "description": "A constant value in data domain."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "$ref": "#/definitions/Type",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ },
+ "value": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "width",
+ "type": "string"
+ },
+ {
+ "const": "height",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "type": "object"
+ },
+ "xError": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.",
+ "type": "null"
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "value": {
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "xError2": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.",
+ "type": "null"
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "value": {
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "y": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "axis": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Axis"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of axis's gridlines, ticks and labels. If `null`, the axis for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [axis properties](https://vega.github.io/vega-lite/docs/axis.html) are applied.\n\n__See also:__ [`axis`](https://vega.github.io/vega-lite/docs/axis.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "const": "binned",
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "datum": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/PrimitiveValue"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/RepeatRef"
+ }
+ ],
+ "description": "A constant value in data domain."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "impute": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ImputeParams"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining the properties of the Impute Operation to be applied. The field value of the other positional channel is taken as `key` of the `Impute` Operation. The field of the `color` channel if specified is used as `groupby` of the `Impute` Operation.\n\n__See also:__ [`impute`](https://vega.github.io/vega-lite/docs/impute.html) documentation."
+ },
+ "scale": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Scale"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation."
+ },
+ "sort": {
+ "$ref": "#/definitions/Sort",
+ "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following: - `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`). - `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation."
+ },
+ "stack": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StackOffset"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "description": "Type of stacking offset if the field should be stacked. `stack` is only applicable for `x`, `y`, `theta`, and `radius` channels with continuous domains. For example, `stack` of `y` can be used to customize stacking for a vertical bar chart.\n\n`stack` can be one of the following values: - `\"zero\"` or `true`: stacking with baseline offset at zero value of the scale (for creating typical stacked [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and [area](https://vega.github.io/vega-lite/docs/stack.html#area) chart). - `\"normalize\"` - stacking with normalized domain (for creating [normalized stacked bar and area charts](https://vega.github.io/vega-lite/docs/stack.html#normalized). <br/> -`\"center\"` - stacking with center baseline (for [streamgraph](https://vega.github.io/vega-lite/docs/stack.html#streamgraph)). - `null` or `false` - No-stacking. This will produce layered [bar](https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart) and area chart.\n\n__Default value:__ `zero` for plots with all of the following conditions are true: (1) the mark is `bar`, `area`, or `arc`; (2) the stacked measure channel (x or y) has a linear scale; (3) At least one of non-position channels mapped to an unaggregated field that is different from x and y. Otherwise, `null` by default.\n\n__See also:__ [`stack`](https://vega.github.io/vega-lite/docs/stack.html) documentation."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StandardType",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ },
+ {
+ "$ref": "#/definitions/Type",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ ],
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ },
+ "value": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "width",
+ "type": "string"
+ },
+ {
+ "const": "height",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "type": "object"
+ },
+ "y2": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.",
+ "type": "null"
+ },
+ "datum": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/PrimitiveValue"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "$ref": "#/definitions/RepeatRef"
+ }
+ ],
+ "description": "A constant value in data domain."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "$ref": "#/definitions/Type",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ },
+ "value": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "width",
+ "type": "string"
+ },
+ {
+ "const": "height",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "type": "object"
+ },
+ "yError": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.",
+ "type": "null"
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "value": {
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "yError2": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.",
+ "type": "null"
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "value": {
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "SingleDefUnitChannel": {
+ "enum": [
+ "x",
+ "y",
+ "x2",
+ "y2",
+ "longitude",
+ "latitude",
+ "longitude2",
+ "latitude2",
+ "theta",
+ "theta2",
+ "radius",
+ "radius2",
+ "color",
+ "fill",
+ "stroke",
+ "opacity",
+ "fillOpacity",
+ "strokeOpacity",
+ "strokeWidth",
+ "strokeDash",
+ "size",
+ "angle",
+ "shape",
+ "key",
+ "text",
+ "href",
+ "url",
+ "description"
+ ],
+ "type": "string"
+ },
+ "SingleSelection": {
+ "additionalProperties": false,
+ "properties": {
+ "bind": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Binding"
+ },
+ {
+ "additionalProperties": {
+ "$ref": "#/definitions/Binding"
+ },
+ "type": "object"
+ },
+ {
+ "$ref": "#/definitions/LegendBinding"
+ }
+ ],
+ "description": "When set, a selection is populated by input elements (also known as dynamic query widgets) or by interacting with the corresponding legend. Direct manipulation interaction is disabled by default; to re-enable it, set the selection's [`on`](https://vega.github.io/vega-lite/docs/selection.html#common-selection-properties) property.\n\nLegend bindings are restricted to selections that only specify a single field or encoding.\n\nQuery widget binding takes the form of Vega's [input element binding definition](https://vega.github.io/vega/docs/signals/#bind) or can be a mapping between projected field/encodings and binding definitions.\n\n__See also:__ [`bind`](https://vega.github.io/vega-lite/docs/bind.html) documentation."
+ },
+ "clear": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Stream"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "description": "Clears the selection, emptying it of all values. Can be a [Event Stream](https://vega.github.io/vega/docs/event-streams/) or `false` to disable.\n\n__Default value:__ `dblclick`.\n\n__See also:__ [`clear`](https://vega.github.io/vega-lite/docs/clear.html) documentation."
+ },
+ "empty": {
+ "description": "By default, `all` data values are considered to lie within an empty selection. When set to `none`, empty selections contain no data values.",
+ "enum": [
+ "all",
+ "none"
+ ],
+ "type": "string"
+ },
+ "encodings": {
+ "description": "An array of encoding channels. The corresponding data field values must match for a data tuple to fall within the selection.\n\n__See also:__ [`encodings`](https://vega.github.io/vega-lite/docs/project.html) documentation.",
+ "items": {
+ "$ref": "#/definitions/SingleDefUnitChannel"
+ },
+ "type": "array"
+ },
+ "fields": {
+ "description": "An array of field names whose values must match for a data tuple to fall within the selection.\n\n__See also:__ [`fields`](https://vega.github.io/vega-lite/docs/project.html) documentation.",
+ "items": {
+ "$ref": "#/definitions/FieldName"
+ },
+ "type": "array"
+ },
+ "init": {
+ "$ref": "#/definitions/SelectionInitMapping",
+ "description": "Initialize the selection with a mapping between [projected channels or field names](https://vega.github.io/vega-lite/docs/project.html) and initial values.\n\n__See also:__ [`init`](https://vega.github.io/vega-lite/docs/init.html) documentation."
+ },
+ "nearest": {
+ "description": "When true, an invisible voronoi diagram is computed to accelerate discrete selection. The data value _nearest_ the mouse cursor is added to the selection.\n\n__See also:__ [`nearest`](https://vega.github.io/vega-lite/docs/nearest.html) documentation.",
+ "type": "boolean"
+ },
+ "on": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Stream"
+ },
+ {
+ "type": "string"
+ }
+ ],
+ "description": "A [Vega event stream](https://vega.github.io/vega/docs/event-streams/) (object or selector) that triggers the selection. For interval selections, the event stream must specify a [start and end](https://vega.github.io/vega/docs/event-streams/#between-filters)."
+ },
+ "resolve": {
+ "$ref": "#/definitions/SelectionResolution",
+ "description": "With layered and multi-view displays, a strategy that determines how selections' data queries are resolved when applied in a filter transform, conditional encoding rule, or scale domain.\n\n__See also:__ [`resolve`](https://vega.github.io/vega-lite/docs/selection-resolve.html) documentation."
+ },
+ "type": {
+ "const": "single",
+ "description": "Determines the default event processing and data query for the selection. Vega-Lite currently supports three selection types:\n\n- `\"single\"` -- to select a single discrete data value on `click`. - `\"multi\"` -- to select multiple discrete data value; the first value is selected on `click` and additional values toggled on shift-`click`. - `\"interval\"` -- to select a continuous range of data values on `drag`.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "type": "object"
+ },
+ "SingleSelectionConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "bind": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Binding"
+ },
+ {
+ "additionalProperties": {
+ "$ref": "#/definitions/Binding"
+ },
+ "type": "object"
+ },
+ {
+ "$ref": "#/definitions/LegendBinding"
+ }
+ ],
+ "description": "When set, a selection is populated by input elements (also known as dynamic query widgets) or by interacting with the corresponding legend. Direct manipulation interaction is disabled by default; to re-enable it, set the selection's [`on`](https://vega.github.io/vega-lite/docs/selection.html#common-selection-properties) property.\n\nLegend bindings are restricted to selections that only specify a single field or encoding.\n\nQuery widget binding takes the form of Vega's [input element binding definition](https://vega.github.io/vega/docs/signals/#bind) or can be a mapping between projected field/encodings and binding definitions.\n\n__See also:__ [`bind`](https://vega.github.io/vega-lite/docs/bind.html) documentation."
+ },
+ "clear": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Stream"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "description": "Clears the selection, emptying it of all values. Can be a [Event Stream](https://vega.github.io/vega/docs/event-streams/) or `false` to disable.\n\n__Default value:__ `dblclick`.\n\n__See also:__ [`clear`](https://vega.github.io/vega-lite/docs/clear.html) documentation."
+ },
+ "empty": {
+ "description": "By default, `all` data values are considered to lie within an empty selection. When set to `none`, empty selections contain no data values.",
+ "enum": [
+ "all",
+ "none"
+ ],
+ "type": "string"
+ },
+ "encodings": {
+ "description": "An array of encoding channels. The corresponding data field values must match for a data tuple to fall within the selection.\n\n__See also:__ [`encodings`](https://vega.github.io/vega-lite/docs/project.html) documentation.",
+ "items": {
+ "$ref": "#/definitions/SingleDefUnitChannel"
+ },
+ "type": "array"
+ },
+ "fields": {
+ "description": "An array of field names whose values must match for a data tuple to fall within the selection.\n\n__See also:__ [`fields`](https://vega.github.io/vega-lite/docs/project.html) documentation.",
+ "items": {
+ "$ref": "#/definitions/FieldName"
+ },
+ "type": "array"
+ },
+ "init": {
+ "$ref": "#/definitions/SelectionInitMapping",
+ "description": "Initialize the selection with a mapping between [projected channels or field names](https://vega.github.io/vega-lite/docs/project.html) and initial values.\n\n__See also:__ [`init`](https://vega.github.io/vega-lite/docs/init.html) documentation."
+ },
+ "nearest": {
+ "description": "When true, an invisible voronoi diagram is computed to accelerate discrete selection. The data value _nearest_ the mouse cursor is added to the selection.\n\n__See also:__ [`nearest`](https://vega.github.io/vega-lite/docs/nearest.html) documentation.",
+ "type": "boolean"
+ },
+ "on": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Stream"
+ },
+ {
+ "type": "string"
+ }
+ ],
+ "description": "A [Vega event stream](https://vega.github.io/vega/docs/event-streams/) (object or selector) that triggers the selection. For interval selections, the event stream must specify a [start and end](https://vega.github.io/vega/docs/event-streams/#between-filters)."
+ },
+ "resolve": {
+ "$ref": "#/definitions/SelectionResolution",
+ "description": "With layered and multi-view displays, a strategy that determines how selections' data queries are resolved when applied in a filter transform, conditional encoding rule, or scale domain.\n\n__See also:__ [`resolve`](https://vega.github.io/vega-lite/docs/selection-resolve.html) documentation."
+ }
+ },
+ "type": "object"
+ },
+ "SingleTimeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LocalSingleTimeUnit"
+ },
+ {
+ "$ref": "#/definitions/UtcSingleTimeUnit"
+ }
+ ]
+ },
+ "Sort": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SortArray"
+ },
+ {
+ "$ref": "#/definitions/AllSortString"
+ },
+ {
+ "$ref": "#/definitions/EncodingSortField"
+ },
+ {
+ "$ref": "#/definitions/SortByEncoding"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "SortArray": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "items": {
+ "type": "boolean"
+ },
+ "type": "array"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/DateTime"
+ },
+ "type": "array"
+ }
+ ]
+ },
+ "SortByChannel": {
+ "enum": [
+ "x",
+ "y",
+ "color",
+ "fill",
+ "stroke",
+ "strokeWidth",
+ "size",
+ "shape",
+ "fillOpacity",
+ "strokeOpacity",
+ "opacity",
+ "text"
+ ],
+ "type": "string"
+ },
+ "SortByChannelDesc": {
+ "enum": [
+ "-x",
+ "-y",
+ "-color",
+ "-fill",
+ "-stroke",
+ "-strokeWidth",
+ "-size",
+ "-shape",
+ "-fillOpacity",
+ "-strokeOpacity",
+ "-opacity",
+ "-text"
+ ],
+ "type": "string"
+ },
+ "SortByEncoding": {
+ "additionalProperties": false,
+ "properties": {
+ "encoding": {
+ "$ref": "#/definitions/SortByChannel",
+ "description": "The [encoding channel](https://vega.github.io/vega-lite/docs/encoding.html#channels) to sort by (e.g., `\"x\"`, `\"y\"`)"
+ },
+ "order": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SortOrder"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The sort order. One of `\"ascending\"` (default), `\"descending\"`, or `null` (no not sort)."
+ }
+ },
+ "required": [
+ "encoding"
+ ],
+ "type": "object"
+ },
+ "SortField": {
+ "additionalProperties": false,
+ "description": "A sort definition for transform",
+ "properties": {
+ "field": {
+ "$ref": "#/definitions/FieldName",
+ "description": "The name of the field to sort."
+ },
+ "order": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SortOrder"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Whether to sort the field in ascending or descending order. One of `\"ascending\"` (default), `\"descending\"`, or `null` (no not sort)."
+ }
+ },
+ "required": [
+ "field"
+ ],
+ "type": "object"
+ },
+ "SortOrder": {
+ "enum": [
+ "ascending",
+ "descending"
+ ],
+ "type": "string"
+ },
+ "SphereGenerator": {
+ "additionalProperties": false,
+ "properties": {
+ "name": {
+ "description": "Provide a placeholder name and bind data at runtime.",
+ "type": "string"
+ },
+ "sphere": {
+ "anyOf": [
+ {
+ "const": true,
+ "type": "boolean"
+ },
+ {
+ "additionalProperties": false,
+ "type": "object"
+ }
+ ],
+ "description": "Generate sphere GeoJSON data for the full globe."
+ }
+ },
+ "required": [
+ "sphere"
+ ],
+ "type": "object"
+ },
+ "StackOffset": {
+ "enum": [
+ "zero",
+ "center",
+ "normalize"
+ ],
+ "type": "string"
+ },
+ "StackTransform": {
+ "additionalProperties": false,
+ "properties": {
+ "as": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FieldName"
+ },
+ {
+ "items": [
+ {
+ "$ref": "#/definitions/FieldName"
+ },
+ {
+ "$ref": "#/definitions/FieldName"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2,
+ "type": "array"
+ }
+ ],
+ "description": "Output field names. This can be either a string or an array of strings with two elements denoting the name for the fields for stack start and stack end respectively. If a single string(e.g., `\"val\"`) is provided, the end field will be `\"val_end\"`."
+ },
+ "groupby": {
+ "description": "The data fields to group by.",
+ "items": {
+ "$ref": "#/definitions/FieldName"
+ },
+ "type": "array"
+ },
+ "offset": {
+ "description": "Mode for stacking marks. One of `\"zero\"` (default), `\"center\"`, or `\"normalize\"`. The `\"zero\"` offset will stack starting at `0`. The `\"center\"` offset will center the stacks. The `\"normalize\"` offset will compute percentage values for each stack point, with output values in the range `[0,1]`.\n\n__Default value:__ `\"zero\"`",
+ "enum": [
+ "zero",
+ "center",
+ "normalize"
+ ],
+ "type": "string"
+ },
+ "sort": {
+ "description": "Field that determines the order of leaves in the stacked charts.",
+ "items": {
+ "$ref": "#/definitions/SortField"
+ },
+ "type": "array"
+ },
+ "stack": {
+ "$ref": "#/definitions/FieldName",
+ "description": "The field which is stacked."
+ }
+ },
+ "required": [
+ "stack",
+ "groupby",
+ "as"
+ ],
+ "type": "object"
+ },
+ "StandardType": {
+ "enum": [
+ "quantitative",
+ "ordinal",
+ "temporal",
+ "nominal"
+ ],
+ "type": "string"
+ },
+ "Step": {
+ "additionalProperties": false,
+ "properties": {
+ "step": {
+ "description": "The size (width/height) per discrete step.",
+ "type": "number"
+ }
+ },
+ "required": [
+ "step"
+ ],
+ "type": "object"
+ },
+ "Stream": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/EventStream"
+ },
+ {
+ "$ref": "#/definitions/DerivedStream"
+ },
+ {
+ "$ref": "#/definitions/MergedStream"
+ }
+ ]
+ },
+ "StringFieldDef": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "const": "binned",
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "format": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/Dict<unknown>"
+ }
+ ],
+ "description": "When used with the default `\"number\"` and `\"time\"` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `\"number\"` (e.g., for quantitative fields), this is D3's [number format pattern](https://github.com/d3/d3-format#locale_format). - If the format type is `\"time\"` (e.g., for temporal fields), this is D3's [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\n\n__Default value:__ Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format."
+ },
+ "formatType": {
+ "description": "The format type for labels. One of `\"number\"`, `\"time\"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\n\n__Default value:__ - `\"time\"` for temporal fields and ordinal and nominal fields with `timeUnit`. - `\"number\"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.",
+ "type": "string"
+ },
+ "labelExpr": {
+ "description": "[Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels text.\n\n__Note:__ The label text and value can be assessed via the `label` and `value` properties of the axis's backing `datum` object.",
+ "type": "string"
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "$ref": "#/definitions/StandardType",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "type": "object"
+ },
+ "StringFieldDefWithCondition": {
+ "$ref": "#/definitions/FieldOrDatumDefWithCondition<StringFieldDef,string>"
+ },
+ "StringValueDefWithCondition": {
+ "$ref": "#/definitions/ValueDefWithCondition<MarkPropFieldOrDatumDef,(string|null)>"
+ },
+ "StrokeCap": {
+ "enum": [
+ "butt",
+ "round",
+ "square"
+ ],
+ "type": "string"
+ },
+ "StrokeJoin": {
+ "enum": [
+ "miter",
+ "round",
+ "bevel"
+ ],
+ "type": "string"
+ },
+ "StyleConfigIndex": {
+ "additionalProperties": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/AnyMarkConfig"
+ },
+ {
+ "$ref": "#/definitions/Axis"
+ }
+ ]
+ },
+ "properties": {
+ "arc": {
+ "$ref": "#/definitions/RectConfig",
+ "description": "Arc-specific Config"
+ },
+ "area": {
+ "$ref": "#/definitions/AreaConfig",
+ "description": "Area-Specific Config"
+ },
+ "bar": {
+ "$ref": "#/definitions/BarConfig",
+ "description": "Bar-Specific Config"
+ },
+ "circle": {
+ "$ref": "#/definitions/MarkConfig",
+ "description": "Circle-Specific Config"
+ },
+ "geoshape": {
+ "$ref": "#/definitions/MarkConfig",
+ "description": "Geoshape-Specific Config"
+ },
+ "group-subtitle": {
+ "$ref": "#/definitions/MarkConfig",
+ "description": "Default style for chart subtitles"
+ },
+ "group-title": {
+ "$ref": "#/definitions/MarkConfig",
+ "description": "Default style for chart titles"
+ },
+ "guide-label": {
+ "$ref": "#/definitions/MarkConfig",
+ "description": "Default style for axis, legend, and header labels."
+ },
+ "guide-title": {
+ "$ref": "#/definitions/MarkConfig",
+ "description": "Default style for axis, legend, and header titles."
+ },
+ "image": {
+ "$ref": "#/definitions/RectConfig",
+ "description": "Image-specific Config"
+ },
+ "line": {
+ "$ref": "#/definitions/LineConfig",
+ "description": "Line-Specific Config"
+ },
+ "mark": {
+ "$ref": "#/definitions/MarkConfig",
+ "description": "Mark Config"
+ },
+ "point": {
+ "$ref": "#/definitions/MarkConfig",
+ "description": "Point-Specific Config"
+ },
+ "rect": {
+ "$ref": "#/definitions/RectConfig",
+ "description": "Rect-Specific Config"
+ },
+ "rule": {
+ "$ref": "#/definitions/MarkConfig",
+ "description": "Rule-Specific Config"
+ },
+ "square": {
+ "$ref": "#/definitions/MarkConfig",
+ "description": "Square-Specific Config"
+ },
+ "text": {
+ "$ref": "#/definitions/MarkConfig",
+ "description": "Text-Specific Config"
+ },
+ "tick": {
+ "$ref": "#/definitions/TickConfig",
+ "description": "Tick-Specific Config"
+ },
+ "trail": {
+ "$ref": "#/definitions/LineConfig",
+ "description": "Trail-Specific Config"
+ }
+ },
+ "type": "object"
+ },
+ "SymbolShape": {
+ "type": "string"
+ },
+ "Text": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ ]
+ },
+ "TextBaseline": {
+ "anyOf": [
+ {
+ "const": "alphabetic",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/Baseline"
+ },
+ {
+ "const": "line-top",
+ "type": "string"
+ },
+ {
+ "const": "line-bottom",
+ "type": "string"
+ }
+ ]
+ },
+ "TextDef": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FieldOrDatumDefWithCondition<StringFieldDef,Text>"
+ },
+ {
+ "$ref": "#/definitions/FieldOrDatumDefWithCondition<StringDatumDef,Text>"
+ },
+ {
+ "$ref": "#/definitions/ValueDefWithCondition<StringFieldDef,Text>"
+ }
+ ]
+ },
+ "TextDirection": {
+ "enum": [
+ "ltr",
+ "rtl"
+ ],
+ "type": "string"
+ },
+ "TickConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "align": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Align"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of `\"left\"`, `\"right\"`, `\"center\"`.\n\n__Note:__ Expression reference is *not* supported for range marks."
+ },
+ "angle": {
+ "anyOf": [
+ {
+ "description": "The rotation angle of the text, in degrees.",
+ "maximum": 360,
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "aria": {
+ "anyOf": [
+ {
+ "description": "A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the \"aria-hidden\" attribute will be set on the output SVG element, removing the mark item from the ARIA accessibility tree.",
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "ariaRole": {
+ "anyOf": [
+ {
+ "description": "Sets the type of user interface element of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the \"role\" attribute. Warning: this property is experimental and may be changed in the future.",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "ariaRoleDescription": {
+ "anyOf": [
+ {
+ "description": "A human-readable, author-localized description for the role of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the \"aria-roledescription\" attribute. Warning: this property is experimental and may be changed in the future.",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "aspect": {
+ "anyOf": [
+ {
+ "description": "Whether to keep aspect ratio of image marks.",
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "bandSize": {
+ "description": "The width of the ticks.\n\n__Default value:__ 3/4 of step (width step for horizontal ticks and height step for vertical ticks).",
+ "minimum": 0,
+ "type": "number"
+ },
+ "baseline": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TextBaseline"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "For text marks, the vertical text baseline. One of `\"alphabetic\"` (default), `\"top\"`, `\"middle\"`, `\"bottom\"`, `\"line-top\"`, `\"line-bottom\"`, or an expression reference that provides one of the valid values. The `\"line-top\"` and `\"line-bottom\"` values operate similarly to `\"top\"` and `\"bottom\"`, but are calculated relative to the `lineHeight` rather than `fontSize` alone.\n\nFor range marks, the vertical alignment of the marks. One of `\"top\"`, `\"middle\"`, `\"bottom\"`.\n\n__Note:__ Expression reference is *not* supported for range marks."
+ },
+ "blend": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Blend",
+ "description": "The color blend mode for drawing an item on its current background. Any valid [CSS mix-blend-mode](https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode) value can be used.\n\n__Default value: `\"source-over\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "color": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/Gradient"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Default color.\n\n__Default value:__ <span style=\"color: #4682b4;\">&#9632;</span> `\"#4682b4\"`\n\n__Note:__ - This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config). - The `fill` and `stroke` properties have higher precedence than `color` and will override `color`."
+ },
+ "cornerRadius": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles or arcs' corners.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "cornerRadiusBottomLeft": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles' bottom left corner.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "cornerRadiusBottomRight": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles' bottom right corner.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "cornerRadiusTopLeft": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles' top right corner.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "cornerRadiusTopRight": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles' top left corner.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "cursor": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Cursor",
+ "description": "The mouse cursor used over the mark. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "description": {
+ "anyOf": [
+ {
+ "description": "A text description of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the [\"aria-label\" attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute).",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "dir": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TextDirection",
+ "description": "The direction of the text. One of `\"ltr\"` (left-to-right) or `\"rtl\"` (right-to-left). This property determines on which side is truncated in response to the limit parameter.\n\n__Default value:__ `\"ltr\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "dx": {
+ "anyOf": [
+ {
+ "description": "The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "dy": {
+ "anyOf": [
+ {
+ "description": "The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "ellipsis": {
+ "anyOf": [
+ {
+ "description": "The ellipsis string for text truncated in response to the limit parameter.\n\n__Default value:__ `\"…\"`",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "endAngle": {
+ "anyOf": [
+ {
+ "description": "The end angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "fill": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/Gradient"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Default fill color. This property has higher precedence than `config.color`. Set to `null` to remove fill.\n\n__Default value:__ (None)"
+ },
+ "fillOpacity": {
+ "anyOf": [
+ {
+ "description": "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "filled": {
+ "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `false` for all `point`, `line`, and `rule` marks as well as `geoshape` marks for [`graticule`](https://vega.github.io/vega-lite/docs/data.html#graticule) data sources; otherwise, `true`.\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).",
+ "type": "boolean"
+ },
+ "font": {
+ "anyOf": [
+ {
+ "description": "The typeface to set the text in (e.g., `\"Helvetica Neue\"`).",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "fontSize": {
+ "anyOf": [
+ {
+ "description": "The font size, in pixels.\n\n__Default value:__ `11`",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "fontStyle": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontStyle",
+ "description": "The font style (e.g., `\"italic\"`)."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "fontWeight": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontWeight",
+ "description": "The font weight. This can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "height": {
+ "anyOf": [
+ {
+ "description": "Height of the marks.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "href": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/URI",
+ "description": "A URL to load upon mouse click. If defined, the mark acts as a hyperlink."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "innerRadius": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`."
+ },
+ "interpolate": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Interpolate",
+ "description": "The line interpolation method to use for line and area marks. One of the following: - `\"linear\"`: piecewise linear segments, as in a polyline. - `\"linear-closed\"`: close the linear segments to form a polygon. - `\"step\"`: alternate between horizontal and vertical segments, as in a step function. - `\"step-before\"`: alternate between vertical and horizontal segments, as in a step function. - `\"step-after\"`: alternate between horizontal and vertical segments, as in a step function. - `\"basis\"`: a B-spline, with control point duplication on the ends. - `\"basis-open\"`: an open B-spline; may not intersect the start or end. - `\"basis-closed\"`: a closed B-spline, as in a loop. - `\"cardinal\"`: a Cardinal spline, with control point duplication on the ends. - `\"cardinal-open\"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points. - `\"cardinal-closed\"`: a closed Cardinal spline, as in a loop. - `\"bundle\"`: equivalent to basis, except the tension parameter is used to straighten the spline. - `\"monotone\"`: cubic interpolation that preserves monotonicity in y."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "invalid": {
+ "description": "Defines how Vega-Lite should handle marks for invalid values (`null` and `NaN`). - If set to `\"filter\"` (default), all data items with null values will be skipped (for line, trail, and area marks) or filtered (for other marks). - If `null`, all data items are included. In this case, invalid values will be interpreted as zeroes.",
+ "enum": [
+ "filter",
+ null
+ ],
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "limit": {
+ "anyOf": [
+ {
+ "description": "The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0` -- indicating no limit",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "lineBreak": {
+ "anyOf": [
+ {
+ "description": "A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property is ignored if the text is array-valued.",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "lineHeight": {
+ "anyOf": [
+ {
+ "description": "The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "opacity": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.",
+ "maximum": 1,
+ "minimum": 0
+ },
+ "order": {
+ "description": "For line and trail marks, this `order` property can be set to `null` or `false` to make the lines use the original order in the data sources.",
+ "type": [
+ "null",
+ "boolean"
+ ]
+ },
+ "orient": {
+ "$ref": "#/definitions/Orientation",
+ "description": "The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical. - For bar, rule and tick, this determines whether the size of the bar and tick should be applied to x or y dimension. - For area, this property determines the orient property of the Vega output. - For line and trail marks, this property determines the sort order of the points in the line if `config.sortLineBy` is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored."
+ },
+ "outerRadius": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`."
+ },
+ "padAngle": {
+ "anyOf": [
+ {
+ "description": "The angular padding applied to sides of the arc, in radians.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "radius": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "For arc mark, the primary (outer) radius in pixels.\n\nFor text marks, polar coordinate radial offset, in pixels, of the text from the origin determined by the `x` and `y` properties."
+ },
+ "radius2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The secondary (inner) radius in pixels of arc marks."
+ },
+ "shape": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SymbolShape"
+ },
+ {
+ "type": "string"
+ }
+ ],
+ "description": "Shape of the point marks. Supported values include: - plotting shapes: `\"circle\"`, `\"square\"`, `\"cross\"`, `\"diamond\"`, `\"triangle-up\"`, `\"triangle-down\"`, `\"triangle-right\"`, or `\"triangle-left\"`. - the line symbol `\"stroke\"` - centered directional shapes `\"arrow\"`, `\"wedge\"`, or `\"triangle\"` - a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n__Default value:__ `\"circle\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "size": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Default size for marks. - For `point`/`circle`/`square`, this represents the pixel area of the marks. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value. - For `bar`, this represents the band size of the bar, in pixels. - For `text`, this represents the font size, in pixels.\n\n__Default value:__ - `30` for point, circle, square marks; width/height's `step` - `2` for bar marks with discrete dimensions; - `5` for bar marks with continuous dimensions; - `11` for text marks.",
+ "minimum": 0
+ },
+ "smooth": {
+ "anyOf": [
+ {
+ "description": "A boolean flag (default true) indicating if the image should be smoothed when resized. If false, individual pixels should be scaled directly rather than interpolated with smoothing. For SVG rendering, this option may not work in some browsers due to lack of standardization.",
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "startAngle": {
+ "anyOf": [
+ {
+ "description": "The start angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "stroke": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/Gradient"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Default stroke color. This property has higher precedence than `config.color`. Set to `null` to remove stroke.\n\n__Default value:__ (None)"
+ },
+ "strokeCap": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StrokeCap",
+ "description": "The stroke cap for line ending style. One of `\"butt\"`, `\"round\"`, or `\"square\"`.\n\n__Default value:__ `\"butt\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeDash": {
+ "anyOf": [
+ {
+ "description": "An array of alternating stroke, space lengths for creating dashed or dotted lines.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeDashOffset": {
+ "anyOf": [
+ {
+ "description": "The offset (in pixels) into which to begin drawing with the stroke dash array.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeJoin": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StrokeJoin",
+ "description": "The stroke line join method. One of `\"miter\"`, `\"round\"` or `\"bevel\"`.\n\n__Default value:__ `\"miter\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeMiterLimit": {
+ "anyOf": [
+ {
+ "description": "The miter limit at which to bevel a line join.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeOffset": {
+ "anyOf": [
+ {
+ "description": "The offset in pixels at which to draw the group stroke and fill. If unspecified, the default behavior is to dynamically offset stroked groups such that 1 pixel stroke widths align with the pixel grid.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeOpacity": {
+ "anyOf": [
+ {
+ "description": "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeWidth": {
+ "anyOf": [
+ {
+ "description": "The stroke width, in pixels.",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "tension": {
+ "anyOf": [
+ {
+ "description": "Depending on the interpolation type, sets the tension parameter (for line and area marks).",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "text": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text",
+ "description": "Placeholder text if the `text` channel is not specified"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "theta": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "- For arc marks, the arc length in radians if theta2 is not specified, otherwise the start arc angle. (A value of 0 indicates up or “north”, increasing values proceed clockwise.)\n\n- For text marks, polar coordinate angle in radians.",
+ "maximum": 360,
+ "minimum": 0
+ },
+ "theta2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise."
+ },
+ "thickness": {
+ "description": "Thickness of the tick mark.\n\n__Default value:__ `1`",
+ "minimum": 0,
+ "type": "number"
+ },
+ "timeUnitBand": {
+ "description": "Default relative band size for a time unit. If set to `1`, the bandwidth of the marks will be equal to the time unit band step. If set to `0.5`, bandwidth of the marks will be half of the time unit band step.",
+ "type": "number"
+ },
+ "timeUnitBandPosition": {
+ "description": "Default relative band position for a time unit. If set to `0`, the marks will be positioned at the beginning of the time unit band step. If set to `0.5`, the marks will be positioned in the middle of the time unit band step.",
+ "type": "number"
+ },
+ "tooltip": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/TooltipContent"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.\n\n- If `tooltip` is `true` or `{\"content\": \"encoding\"}`, then all fields from `encoding` will be used. - If `tooltip` is `{\"content\": \"data\"}`, then all fields that appear in the highlighted data point will be used. - If set to `null` or `false`, then no tooltip will be used.\n\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip in Vega-Lite.\n\n__Default value:__ `null`"
+ },
+ "url": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/URI",
+ "description": "The URL of the image file for image marks."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "width": {
+ "anyOf": [
+ {
+ "description": "Width of the marks.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "x": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "width",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "X coordinates of the marks, or width of horizontal `\"bar\"` and `\"area\"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "x2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "width",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "X2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot."
+ },
+ "y": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "height",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Y coordinates of the marks, or height of vertical `\"bar\"` and `\"area\"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ },
+ "y2": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "height",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "Y2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot."
+ }
+ },
+ "type": "object"
+ },
+ "TickCount": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/TimeInterval"
+ },
+ {
+ "$ref": "#/definitions/TimeIntervalStep"
+ }
+ ]
+ },
+ "TimeInterval": {
+ "enum": [
+ "millisecond",
+ "second",
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "year"
+ ],
+ "type": "string"
+ },
+ "TimeIntervalStep": {
+ "additionalProperties": false,
+ "properties": {
+ "interval": {
+ "$ref": "#/definitions/TimeInterval"
+ },
+ "step": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "interval",
+ "step"
+ ],
+ "type": "object"
+ },
+ "TimeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SingleTimeUnit"
+ },
+ {
+ "$ref": "#/definitions/MultiTimeUnit"
+ }
+ ]
+ },
+ "TimeUnitParams": {
+ "additionalProperties": false,
+ "properties": {
+ "maxbins": {
+ "description": "If no `unit` is specified, maxbins is used to infer time units.",
+ "type": "number"
+ },
+ "step": {
+ "description": "The number of steps between bins, in terms of the least significant unit provided.",
+ "type": "number"
+ },
+ "unit": {
+ "$ref": "#/definitions/TimeUnit",
+ "description": "Defines how date-time values should be binned."
+ },
+ "utc": {
+ "description": "True to use UTC timezone. Equivalent to using a `utc` prefixed `TimeUnit`.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ },
+ "TimeUnitTransform": {
+ "additionalProperties": false,
+ "properties": {
+ "as": {
+ "$ref": "#/definitions/FieldName",
+ "description": "The output field to write the timeUnit value."
+ },
+ "field": {
+ "$ref": "#/definitions/FieldName",
+ "description": "The data field to apply time unit."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "The timeUnit."
+ }
+ },
+ "required": [
+ "timeUnit",
+ "field",
+ "as"
+ ],
+ "type": "object"
+ },
+ "TitleAnchor": {
+ "enum": [
+ null,
+ "start",
+ "middle",
+ "end"
+ ],
+ "type": [
+ "null",
+ "string"
+ ]
+ },
+ "TitleConfig": {
+ "$ref": "#/definitions/BaseTitleNoValueRefs"
+ },
+ "TitleFrame": {
+ "enum": [
+ "bounds",
+ "group"
+ ],
+ "type": "string"
+ },
+ "TitleOrient": {
+ "enum": [
+ "none",
+ "left",
+ "right",
+ "top",
+ "bottom"
+ ],
+ "type": "string"
+ },
+ "TitleParams": {
+ "additionalProperties": false,
+ "properties": {
+ "align": {
+ "$ref": "#/definitions/Align",
+ "description": "Horizontal text alignment for title text. One of `\"left\"`, `\"center\"`, or `\"right\"`."
+ },
+ "anchor": {
+ "$ref": "#/definitions/TitleAnchor",
+ "description": "The anchor position for placing the title. One of `\"start\"`, `\"middle\"`, or `\"end\"`. For example, with an orientation of top these anchor positions map to a left-, center-, or right-aligned title.\n\n__Default value:__ `\"middle\"` for [single](https://vega.github.io/vega-lite/docs/spec.html) and [layered](https://vega.github.io/vega-lite/docs/layer.html) views. `\"start\"` for other composite views.\n\n__Note:__ [For now](https://github.com/vega/vega-lite/issues/2875), `anchor` is only customizable only for [single](https://vega.github.io/vega-lite/docs/spec.html) and [layered](https://vega.github.io/vega-lite/docs/layer.html) views. For other composite views, `anchor` is always `\"start\"`."
+ },
+ "angle": {
+ "anyOf": [
+ {
+ "description": "Angle in degrees of title and subtitle text.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "aria": {
+ "anyOf": [
+ {
+ "description": "A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the \"aria-hidden\" attribute will be set on the output SVG group, removing the title from the ARIA accessibility tree.\n\n__Default value:__ `true`",
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "baseline": {
+ "$ref": "#/definitions/TextBaseline",
+ "description": "Vertical text baseline for title and subtitle text. One of `\"alphabetic\"` (default), `\"top\"`, `\"middle\"`, `\"bottom\"`, `\"line-top\"`, or `\"line-bottom\"`. The `\"line-top\"` and `\"line-bottom\"` values operate similarly to `\"top\"` and `\"bottom\"`, but are calculated relative to the *lineHeight* rather than *fontSize* alone."
+ },
+ "color": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/Color"
+ }
+ ],
+ "description": "Text color for title text."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "dx": {
+ "anyOf": [
+ {
+ "description": "Delta offset for title and subtitle text x-coordinate.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "dy": {
+ "anyOf": [
+ {
+ "description": "Delta offset for title and subtitle text y-coordinate.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "font": {
+ "anyOf": [
+ {
+ "description": "Font name for title text.",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "fontSize": {
+ "anyOf": [
+ {
+ "description": "Font size in pixels for title text.",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "fontStyle": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontStyle",
+ "description": "Font style for title text."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "fontWeight": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontWeight",
+ "description": "Font weight for title text. This can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "frame": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TitleFrame"
+ },
+ {
+ "type": "string"
+ }
+ ],
+ "description": "The reference frame for the anchor position, one of `\"bounds\"` (to anchor relative to the full bounding box) or `\"group\"` (to anchor relative to the group width or height)."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "limit": {
+ "anyOf": [
+ {
+ "description": "The maximum allowed length in pixels of title and subtitle text.",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "lineHeight": {
+ "anyOf": [
+ {
+ "description": "Line height in pixels for multi-line title text or title text with `\"line-top\"` or `\"line-bottom\"` baseline.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "offset": {
+ "anyOf": [
+ {
+ "description": "The orthogonal offset in pixels by which to displace the title group from its position along the edge of the chart.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "orient": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TitleOrient",
+ "description": "Default title orientation (`\"top\"`, `\"bottom\"`, `\"left\"`, or `\"right\"`)"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "style": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "A [mark style property](https://vega.github.io/vega-lite/docs/config.html#style) to apply to the title text mark.\n\n__Default value:__ `\"group-title\"`."
+ },
+ "subtitle": {
+ "$ref": "#/definitions/Text",
+ "description": "The subtitle Text."
+ },
+ "subtitleColor": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/Color"
+ }
+ ],
+ "description": "Text color for subtitle text."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "subtitleFont": {
+ "anyOf": [
+ {
+ "description": "Font name for subtitle text.",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "subtitleFontSize": {
+ "anyOf": [
+ {
+ "description": "Font size in pixels for subtitle text.",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "subtitleFontStyle": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontStyle",
+ "description": "Font style for subtitle text."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "subtitleFontWeight": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FontWeight",
+ "description": "Font weight for subtitle text. This can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)."
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "subtitleLineHeight": {
+ "anyOf": [
+ {
+ "description": "Line height in pixels for multi-line subtitle text.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "subtitlePadding": {
+ "anyOf": [
+ {
+ "description": "The padding in pixels between title and subtitle text.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "text": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The title text."
+ },
+ "zindex": {
+ "description": "The integer z-index indicating the layering of the title group relative to other axis, mark and legend groups.\n\n__Default value:__ `0`.",
+ "minimum": 0,
+ "type": "number"
+ }
+ },
+ "required": [
+ "text"
+ ],
+ "type": "object"
+ },
+ "TooltipContent": {
+ "additionalProperties": false,
+ "properties": {
+ "content": {
+ "enum": [
+ "encoding",
+ "data"
+ ],
+ "type": "string"
+ }
+ },
+ "required": [
+ "content"
+ ],
+ "type": "object"
+ },
+ "TopLevelNormalizedConcatSpec<GenericSpec>": {
+ "additionalProperties": false,
+ "properties": {
+ "$schema": {
+ "description": "URL to [JSON schema](http://json-schema.org/) for a Vega-Lite specification. Unless you have a reason to change this, use `https://vega.github.io/schema/vega-lite/v4.json`. Setting the `$schema` property allows automatic validation and autocomplete in editors that support JSON schema.",
+ "format": "uri",
+ "type": "string"
+ },
+ "align": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LayoutAlign"
+ },
+ {
+ "$ref": "#/definitions/RowCol<LayoutAlign>"
+ }
+ ],
+ "description": "The alignment to apply to grid rows and columns. The supported string values are `\"all\"`, `\"each\"`, and `\"none\"`.\n\n- For `\"none\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other. - For `\"each\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size. - For `\"all\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\nAlternatively, an object value of the form `{\"row\": string, \"column\": string}` can be used to supply different alignments for rows and columns.\n\n__Default value:__ `\"all\"`."
+ },
+ "autosize": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/AutosizeType"
+ },
+ {
+ "$ref": "#/definitions/AutoSizeParams"
+ }
+ ],
+ "description": "How the visualization size should be determined. If a string, should be one of `\"pad\"`, `\"fit\"` or `\"none\"`. Object values can additionally specify parameters for content sizing and automatic resizing.\n\n__Default value__: `pad`"
+ },
+ "background": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "CSS color property to use as the background of the entire view.\n\n__Default value:__ `\"white\"`"
+ },
+ "bounds": {
+ "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used. - If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`",
+ "enum": [
+ "full",
+ "flush"
+ ],
+ "type": "string"
+ },
+ "center": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/RowCol<boolean>"
+ }
+ ],
+ "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\nAn object value of the form `{\"row\": boolean, \"column\": boolean}` can be used to supply different centering values for rows and columns.\n\n__Default value:__ `false`"
+ },
+ "columns": {
+ "description": "The number of columns to include in the view composition layout.\n\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\n\n__Note__:\n\n1) This property is only for: - the general (wrappable) `concat` operator (not `hconcat`/`vconcat`) - the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\n\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).",
+ "type": "number"
+ },
+ "concat": {
+ "description": "A list of views to be concatenated.",
+ "items": {
+ "$ref": "#/definitions/NormalizedSpec"
+ },
+ "type": "array"
+ },
+ "config": {
+ "$ref": "#/definitions/Config",
+ "description": "Vega-Lite configuration object. This property can only be defined at the top-level of a specification."
+ },
+ "data": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Data"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
+ },
+ "datasets": {
+ "$ref": "#/definitions/Datasets",
+ "description": "A global data store for named datasets. This is a mapping from names to inline datasets. This can be an array of objects or primitive values or a string. Arrays of primitive values are ingested as objects with a `data` property."
+ },
+ "description": {
+ "description": "Description of this mark for commenting purpose.",
+ "type": "string"
+ },
+ "name": {
+ "description": "Name of the visualization for later reference.",
+ "type": "string"
+ },
+ "padding": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Padding"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides. If an object, the value should have the format `{\"left\": 5, \"top\": 5, \"right\": 5, \"bottom\": 5}` to specify padding for each side of the visualization.\n\n__Default value__: `5`"
+ },
+ "params": {
+ "description": "Dynamic variables that parameterize a visualization.",
+ "items": {
+ "$ref": "#/definitions/Parameter"
+ },
+ "type": "array"
+ },
+ "resolve": {
+ "$ref": "#/definitions/Resolve",
+ "description": "Scale, axis, and legend resolutions for view composition specifications."
+ },
+ "spacing": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/RowCol<number>"
+ }
+ ],
+ "description": "The spacing in pixels between sub-views of the composition operator. An object of the form `{\"row\": number, \"column\": number}` can be used to set different spacing values for rows and columns.\n\n__Default value__: Depends on `\"spacing\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)"
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "$ref": "#/definitions/TitleParams"
+ }
+ ],
+ "description": "Title for the plot."
+ },
+ "transform": {
+ "description": "An array of data transformations such as filter and new field calculation.",
+ "items": {
+ "$ref": "#/definitions/Transform"
+ },
+ "type": "array"
+ },
+ "usermeta": {
+ "$ref": "#/definitions/Dict<unknown>",
+ "description": "Optional metadata that will be passed to Vega. This object is completely ignored by Vega and Vega-Lite and can be used for custom metadata."
+ }
+ },
+ "required": [
+ "concat"
+ ],
+ "type": "object"
+ },
+ "TopLevelNormalizedHConcatSpec<GenericSpec>": {
+ "additionalProperties": false,
+ "properties": {
+ "$schema": {
+ "description": "URL to [JSON schema](http://json-schema.org/) for a Vega-Lite specification. Unless you have a reason to change this, use `https://vega.github.io/schema/vega-lite/v4.json`. Setting the `$schema` property allows automatic validation and autocomplete in editors that support JSON schema.",
+ "format": "uri",
+ "type": "string"
+ },
+ "autosize": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/AutosizeType"
+ },
+ {
+ "$ref": "#/definitions/AutoSizeParams"
+ }
+ ],
+ "description": "How the visualization size should be determined. If a string, should be one of `\"pad\"`, `\"fit\"` or `\"none\"`. Object values can additionally specify parameters for content sizing and automatic resizing.\n\n__Default value__: `pad`"
+ },
+ "background": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "CSS color property to use as the background of the entire view.\n\n__Default value:__ `\"white\"`"
+ },
+ "bounds": {
+ "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used. - If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`",
+ "enum": [
+ "full",
+ "flush"
+ ],
+ "type": "string"
+ },
+ "center": {
+ "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\n__Default value:__ `false`",
+ "type": "boolean"
+ },
+ "config": {
+ "$ref": "#/definitions/Config",
+ "description": "Vega-Lite configuration object. This property can only be defined at the top-level of a specification."
+ },
+ "data": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Data"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
+ },
+ "datasets": {
+ "$ref": "#/definitions/Datasets",
+ "description": "A global data store for named datasets. This is a mapping from names to inline datasets. This can be an array of objects or primitive values or a string. Arrays of primitive values are ingested as objects with a `data` property."
+ },
+ "description": {
+ "description": "Description of this mark for commenting purpose.",
+ "type": "string"
+ },
+ "hconcat": {
+ "description": "A list of views to be concatenated and put into a row.",
+ "items": {
+ "$ref": "#/definitions/NormalizedSpec"
+ },
+ "type": "array"
+ },
+ "name": {
+ "description": "Name of the visualization for later reference.",
+ "type": "string"
+ },
+ "padding": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Padding"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides. If an object, the value should have the format `{\"left\": 5, \"top\": 5, \"right\": 5, \"bottom\": 5}` to specify padding for each side of the visualization.\n\n__Default value__: `5`"
+ },
+ "params": {
+ "description": "Dynamic variables that parameterize a visualization.",
+ "items": {
+ "$ref": "#/definitions/Parameter"
+ },
+ "type": "array"
+ },
+ "resolve": {
+ "$ref": "#/definitions/Resolve",
+ "description": "Scale, axis, and legend resolutions for view composition specifications."
+ },
+ "spacing": {
+ "description": "The spacing in pixels between sub-views of the concat operator.\n\n__Default value__: `10`",
+ "type": "number"
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "$ref": "#/definitions/TitleParams"
+ }
+ ],
+ "description": "Title for the plot."
+ },
+ "transform": {
+ "description": "An array of data transformations such as filter and new field calculation.",
+ "items": {
+ "$ref": "#/definitions/Transform"
+ },
+ "type": "array"
+ },
+ "usermeta": {
+ "$ref": "#/definitions/Dict<unknown>",
+ "description": "Optional metadata that will be passed to Vega. This object is completely ignored by Vega and Vega-Lite and can be used for custom metadata."
+ }
+ },
+ "required": [
+ "hconcat"
+ ],
+ "type": "object"
+ },
+ "TopLevelNormalizedVConcatSpec<GenericSpec>": {
+ "additionalProperties": false,
+ "properties": {
+ "$schema": {
+ "description": "URL to [JSON schema](http://json-schema.org/) for a Vega-Lite specification. Unless you have a reason to change this, use `https://vega.github.io/schema/vega-lite/v4.json`. Setting the `$schema` property allows automatic validation and autocomplete in editors that support JSON schema.",
+ "format": "uri",
+ "type": "string"
+ },
+ "autosize": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/AutosizeType"
+ },
+ {
+ "$ref": "#/definitions/AutoSizeParams"
+ }
+ ],
+ "description": "How the visualization size should be determined. If a string, should be one of `\"pad\"`, `\"fit\"` or `\"none\"`. Object values can additionally specify parameters for content sizing and automatic resizing.\n\n__Default value__: `pad`"
+ },
+ "background": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "CSS color property to use as the background of the entire view.\n\n__Default value:__ `\"white\"`"
+ },
+ "bounds": {
+ "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used. - If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`",
+ "enum": [
+ "full",
+ "flush"
+ ],
+ "type": "string"
+ },
+ "center": {
+ "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\n__Default value:__ `false`",
+ "type": "boolean"
+ },
+ "config": {
+ "$ref": "#/definitions/Config",
+ "description": "Vega-Lite configuration object. This property can only be defined at the top-level of a specification."
+ },
+ "data": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Data"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
+ },
+ "datasets": {
+ "$ref": "#/definitions/Datasets",
+ "description": "A global data store for named datasets. This is a mapping from names to inline datasets. This can be an array of objects or primitive values or a string. Arrays of primitive values are ingested as objects with a `data` property."
+ },
+ "description": {
+ "description": "Description of this mark for commenting purpose.",
+ "type": "string"
+ },
+ "name": {
+ "description": "Name of the visualization for later reference.",
+ "type": "string"
+ },
+ "padding": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Padding"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides. If an object, the value should have the format `{\"left\": 5, \"top\": 5, \"right\": 5, \"bottom\": 5}` to specify padding for each side of the visualization.\n\n__Default value__: `5`"
+ },
+ "params": {
+ "description": "Dynamic variables that parameterize a visualization.",
+ "items": {
+ "$ref": "#/definitions/Parameter"
+ },
+ "type": "array"
+ },
+ "resolve": {
+ "$ref": "#/definitions/Resolve",
+ "description": "Scale, axis, and legend resolutions for view composition specifications."
+ },
+ "spacing": {
+ "description": "The spacing in pixels between sub-views of the concat operator.\n\n__Default value__: `10`",
+ "type": "number"
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "$ref": "#/definitions/TitleParams"
+ }
+ ],
+ "description": "Title for the plot."
+ },
+ "transform": {
+ "description": "An array of data transformations such as filter and new field calculation.",
+ "items": {
+ "$ref": "#/definitions/Transform"
+ },
+ "type": "array"
+ },
+ "usermeta": {
+ "$ref": "#/definitions/Dict<unknown>",
+ "description": "Optional metadata that will be passed to Vega. This object is completely ignored by Vega and Vega-Lite and can be used for custom metadata."
+ },
+ "vconcat": {
+ "description": "A list of views to be concatenated and put into a column.",
+ "items": {
+ "$ref": "#/definitions/NormalizedSpec"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "vconcat"
+ ],
+ "type": "object"
+ },
+ "TopLevelLayerSpec": {
+ "additionalProperties": false,
+ "properties": {
+ "$schema": {
+ "description": "URL to [JSON schema](http://json-schema.org/) for a Vega-Lite specification. Unless you have a reason to change this, use `https://vega.github.io/schema/vega-lite/v4.json`. Setting the `$schema` property allows automatic validation and autocomplete in editors that support JSON schema.",
+ "format": "uri",
+ "type": "string"
+ },
+ "autosize": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/AutosizeType"
+ },
+ {
+ "$ref": "#/definitions/AutoSizeParams"
+ }
+ ],
+ "description": "How the visualization size should be determined. If a string, should be one of `\"pad\"`, `\"fit\"` or `\"none\"`. Object values can additionally specify parameters for content sizing and automatic resizing.\n\n__Default value__: `pad`"
+ },
+ "background": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "CSS color property to use as the background of the entire view.\n\n__Default value:__ `\"white\"`"
+ },
+ "config": {
+ "$ref": "#/definitions/Config",
+ "description": "Vega-Lite configuration object. This property can only be defined at the top-level of a specification."
+ },
+ "data": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Data"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
+ },
+ "datasets": {
+ "$ref": "#/definitions/Datasets",
+ "description": "A global data store for named datasets. This is a mapping from names to inline datasets. This can be an array of objects or primitive values or a string. Arrays of primitive values are ingested as objects with a `data` property."
+ },
+ "description": {
+ "description": "Description of this mark for commenting purpose.",
+ "type": "string"
+ },
+ "encoding": {
+ "$ref": "#/definitions/SharedEncoding",
+ "description": "A shared key-value mapping between encoding channels and definition of fields in the underlying layers."
+ },
+ "height": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "container",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/Step"
+ }
+ ],
+ "description": "The height of a visualization.\n\n- For a plot with a continuous y-field, height should be a number. - For a plot with either a discrete y-field or no y-field, height can be either a number indicating a fixed height or an object in the form of `{step: number}` defining the height per discrete step. (No y-field is equivalent to having one discrete step.) - To enable responsive sizing on height, it should be set to `\"container\"`.\n\n__Default value:__ Based on `config.view.continuousHeight` for a plot with a continuous y-field and `config.view.discreteHeight` otherwise.\n\n__Note:__ For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the height of a single view and the `\"container\"` option cannot be used.\n\n__See also:__ [`height`](https://vega.github.io/vega-lite/docs/size.html) documentation."
+ },
+ "layer": {
+ "description": "Layer or single view specifications to be layered.\n\n__Note__: Specifications inside `layer` cannot use `row` and `column` channels as layering facet specifications is not allowed. Instead, use the [facet operator](https://vega.github.io/vega-lite/docs/facet.html) and place a layer inside a facet.",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LayerSpec"
+ },
+ {
+ "$ref": "#/definitions/UnitSpec"
+ }
+ ]
+ },
+ "type": "array"
+ },
+ "name": {
+ "description": "Name of the visualization for later reference.",
+ "type": "string"
+ },
+ "padding": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Padding"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides. If an object, the value should have the format `{\"left\": 5, \"top\": 5, \"right\": 5, \"bottom\": 5}` to specify padding for each side of the visualization.\n\n__Default value__: `5`"
+ },
+ "params": {
+ "description": "Dynamic variables that parameterize a visualization.",
+ "items": {
+ "$ref": "#/definitions/Parameter"
+ },
+ "type": "array"
+ },
+ "projection": {
+ "$ref": "#/definitions/Projection",
+ "description": "An object defining properties of the geographic projection shared by underlying layers."
+ },
+ "resolve": {
+ "$ref": "#/definitions/Resolve",
+ "description": "Scale, axis, and legend resolutions for view composition specifications."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "$ref": "#/definitions/TitleParams"
+ }
+ ],
+ "description": "Title for the plot."
+ },
+ "transform": {
+ "description": "An array of data transformations such as filter and new field calculation.",
+ "items": {
+ "$ref": "#/definitions/Transform"
+ },
+ "type": "array"
+ },
+ "usermeta": {
+ "$ref": "#/definitions/Dict<unknown>",
+ "description": "Optional metadata that will be passed to Vega. This object is completely ignored by Vega and Vega-Lite and can be used for custom metadata."
+ },
+ "view": {
+ "$ref": "#/definitions/ViewBackground",
+ "description": "An object defining the view background's fill and stroke.\n\n__Default value:__ none (transparent)"
+ },
+ "width": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "container",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/Step"
+ }
+ ],
+ "description": "The width of a visualization.\n\n- For a plot with a continuous x-field, width should be a number. - For a plot with either a discrete x-field or no x-field, width can be either a number indicating a fixed width or an object in the form of `{step: number}` defining the width per discrete step. (No x-field is equivalent to having one discrete step.) - To enable responsive sizing on width, it should be set to `\"container\"`.\n\n__Default value:__ Based on `config.view.continuousWidth` for a plot with a continuous x-field and `config.view.discreteWidth` otherwise.\n\n__Note:__ For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the width of a single view and the `\"container\"` option cannot be used.\n\n__See also:__ [`width`](https://vega.github.io/vega-lite/docs/size.html) documentation."
+ }
+ },
+ "required": [
+ "layer"
+ ],
+ "type": "object"
+ },
+ "TopLevelRepeatSpec": {
+ "anyOf": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "$schema": {
+ "description": "URL to [JSON schema](http://json-schema.org/) for a Vega-Lite specification. Unless you have a reason to change this, use `https://vega.github.io/schema/vega-lite/v4.json`. Setting the `$schema` property allows automatic validation and autocomplete in editors that support JSON schema.",
+ "format": "uri",
+ "type": "string"
+ },
+ "align": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LayoutAlign"
+ },
+ {
+ "$ref": "#/definitions/RowCol<LayoutAlign>"
+ }
+ ],
+ "description": "The alignment to apply to grid rows and columns. The supported string values are `\"all\"`, `\"each\"`, and `\"none\"`.\n\n- For `\"none\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other. - For `\"each\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size. - For `\"all\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\nAlternatively, an object value of the form `{\"row\": string, \"column\": string}` can be used to supply different alignments for rows and columns.\n\n__Default value:__ `\"all\"`."
+ },
+ "autosize": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/AutosizeType"
+ },
+ {
+ "$ref": "#/definitions/AutoSizeParams"
+ }
+ ],
+ "description": "How the visualization size should be determined. If a string, should be one of `\"pad\"`, `\"fit\"` or `\"none\"`. Object values can additionally specify parameters for content sizing and automatic resizing.\n\n__Default value__: `pad`"
+ },
+ "background": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "CSS color property to use as the background of the entire view.\n\n__Default value:__ `\"white\"`"
+ },
+ "bounds": {
+ "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used. - If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`",
+ "enum": [
+ "full",
+ "flush"
+ ],
+ "type": "string"
+ },
+ "center": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/RowCol<boolean>"
+ }
+ ],
+ "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\nAn object value of the form `{\"row\": boolean, \"column\": boolean}` can be used to supply different centering values for rows and columns.\n\n__Default value:__ `false`"
+ },
+ "columns": {
+ "description": "The number of columns to include in the view composition layout.\n\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\n\n__Note__:\n\n1) This property is only for: - the general (wrappable) `concat` operator (not `hconcat`/`vconcat`) - the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\n\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).",
+ "type": "number"
+ },
+ "config": {
+ "$ref": "#/definitions/Config",
+ "description": "Vega-Lite configuration object. This property can only be defined at the top-level of a specification."
+ },
+ "data": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Data"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
+ },
+ "datasets": {
+ "$ref": "#/definitions/Datasets",
+ "description": "A global data store for named datasets. This is a mapping from names to inline datasets. This can be an array of objects or primitive values or a string. Arrays of primitive values are ingested as objects with a `data` property."
+ },
+ "description": {
+ "description": "Description of this mark for commenting purpose.",
+ "type": "string"
+ },
+ "name": {
+ "description": "Name of the visualization for later reference.",
+ "type": "string"
+ },
+ "padding": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Padding"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides. If an object, the value should have the format `{\"left\": 5, \"top\": 5, \"right\": 5, \"bottom\": 5}` to specify padding for each side of the visualization.\n\n__Default value__: `5`"
+ },
+ "params": {
+ "description": "Dynamic variables that parameterize a visualization.",
+ "items": {
+ "$ref": "#/definitions/Parameter"
+ },
+ "type": "array"
+ },
+ "repeat": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/RepeatMapping"
+ }
+ ],
+ "description": "Definition for fields to be repeated. One of: 1) An array of fields to be repeated. If `\"repeat\"` is an array, the field can be referred to as `{\"repeat\": \"repeat\"}`. The repeated views are laid out in a wrapped row. You can set the number of columns to control the wrapping. 2) An object that maps `\"row\"` and/or `\"column\"` to the listed fields to be repeated along the particular orientations. The objects `{\"repeat\": \"row\"}` and `{\"repeat\": \"column\"}` can be used to refer to the repeated field respectively."
+ },
+ "resolve": {
+ "$ref": "#/definitions/Resolve",
+ "description": "Scale, axis, and legend resolutions for view composition specifications."
+ },
+ "spacing": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/RowCol<number>"
+ }
+ ],
+ "description": "The spacing in pixels between sub-views of the composition operator. An object of the form `{\"row\": number, \"column\": number}` can be used to set different spacing values for rows and columns.\n\n__Default value__: Depends on `\"spacing\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)"
+ },
+ "spec": {
+ "$ref": "#/definitions/Spec",
+ "description": "A specification of the view that gets repeated."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "$ref": "#/definitions/TitleParams"
+ }
+ ],
+ "description": "Title for the plot."
+ },
+ "transform": {
+ "description": "An array of data transformations such as filter and new field calculation.",
+ "items": {
+ "$ref": "#/definitions/Transform"
+ },
+ "type": "array"
+ },
+ "usermeta": {
+ "$ref": "#/definitions/Dict<unknown>",
+ "description": "Optional metadata that will be passed to Vega. This object is completely ignored by Vega and Vega-Lite and can be used for custom metadata."
+ }
+ },
+ "required": [
+ "repeat",
+ "spec"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "$schema": {
+ "description": "URL to [JSON schema](http://json-schema.org/) for a Vega-Lite specification. Unless you have a reason to change this, use `https://vega.github.io/schema/vega-lite/v4.json`. Setting the `$schema` property allows automatic validation and autocomplete in editors that support JSON schema.",
+ "format": "uri",
+ "type": "string"
+ },
+ "align": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LayoutAlign"
+ },
+ {
+ "$ref": "#/definitions/RowCol<LayoutAlign>"
+ }
+ ],
+ "description": "The alignment to apply to grid rows and columns. The supported string values are `\"all\"`, `\"each\"`, and `\"none\"`.\n\n- For `\"none\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other. - For `\"each\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size. - For `\"all\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\nAlternatively, an object value of the form `{\"row\": string, \"column\": string}` can be used to supply different alignments for rows and columns.\n\n__Default value:__ `\"all\"`."
+ },
+ "autosize": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/AutosizeType"
+ },
+ {
+ "$ref": "#/definitions/AutoSizeParams"
+ }
+ ],
+ "description": "How the visualization size should be determined. If a string, should be one of `\"pad\"`, `\"fit\"` or `\"none\"`. Object values can additionally specify parameters for content sizing and automatic resizing.\n\n__Default value__: `pad`"
+ },
+ "background": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "CSS color property to use as the background of the entire view.\n\n__Default value:__ `\"white\"`"
+ },
+ "bounds": {
+ "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used. - If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`",
+ "enum": [
+ "full",
+ "flush"
+ ],
+ "type": "string"
+ },
+ "center": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/RowCol<boolean>"
+ }
+ ],
+ "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\nAn object value of the form `{\"row\": boolean, \"column\": boolean}` can be used to supply different centering values for rows and columns.\n\n__Default value:__ `false`"
+ },
+ "columns": {
+ "description": "The number of columns to include in the view composition layout.\n\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\n\n__Note__:\n\n1) This property is only for: - the general (wrappable) `concat` operator (not `hconcat`/`vconcat`) - the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\n\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).",
+ "type": "number"
+ },
+ "config": {
+ "$ref": "#/definitions/Config",
+ "description": "Vega-Lite configuration object. This property can only be defined at the top-level of a specification."
+ },
+ "data": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Data"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
+ },
+ "datasets": {
+ "$ref": "#/definitions/Datasets",
+ "description": "A global data store for named datasets. This is a mapping from names to inline datasets. This can be an array of objects or primitive values or a string. Arrays of primitive values are ingested as objects with a `data` property."
+ },
+ "description": {
+ "description": "Description of this mark for commenting purpose.",
+ "type": "string"
+ },
+ "name": {
+ "description": "Name of the visualization for later reference.",
+ "type": "string"
+ },
+ "padding": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Padding"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides. If an object, the value should have the format `{\"left\": 5, \"top\": 5, \"right\": 5, \"bottom\": 5}` to specify padding for each side of the visualization.\n\n__Default value__: `5`"
+ },
+ "params": {
+ "description": "Dynamic variables that parameterize a visualization.",
+ "items": {
+ "$ref": "#/definitions/Parameter"
+ },
+ "type": "array"
+ },
+ "repeat": {
+ "$ref": "#/definitions/LayerRepeatMapping",
+ "description": "Definition for fields to be repeated. One of: 1) An array of fields to be repeated. If `\"repeat\"` is an array, the field can be referred to as `{\"repeat\": \"repeat\"}`. The repeated views are laid out in a wrapped row. You can set the number of columns to control the wrapping. 2) An object that maps `\"row\"` and/or `\"column\"` to the listed fields to be repeated along the particular orientations. The objects `{\"repeat\": \"row\"}` and `{\"repeat\": \"column\"}` can be used to refer to the repeated field respectively."
+ },
+ "resolve": {
+ "$ref": "#/definitions/Resolve",
+ "description": "Scale, axis, and legend resolutions for view composition specifications."
+ },
+ "spacing": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/RowCol<number>"
+ }
+ ],
+ "description": "The spacing in pixels between sub-views of the composition operator. An object of the form `{\"row\": number, \"column\": number}` can be used to set different spacing values for rows and columns.\n\n__Default value__: Depends on `\"spacing\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)"
+ },
+ "spec": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LayerSpec"
+ },
+ {
+ "$ref": "#/definitions/UnitSpec"
+ }
+ ],
+ "description": "A specification of the view that gets repeated."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "$ref": "#/definitions/TitleParams"
+ }
+ ],
+ "description": "Title for the plot."
+ },
+ "transform": {
+ "description": "An array of data transformations such as filter and new field calculation.",
+ "items": {
+ "$ref": "#/definitions/Transform"
+ },
+ "type": "array"
+ },
+ "usermeta": {
+ "$ref": "#/definitions/Dict<unknown>",
+ "description": "Optional metadata that will be passed to Vega. This object is completely ignored by Vega and Vega-Lite and can be used for custom metadata."
+ }
+ },
+ "required": [
+ "repeat",
+ "spec"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "TopLevelFacetSpec": {
+ "additionalProperties": false,
+ "properties": {
+ "$schema": {
+ "description": "URL to [JSON schema](http://json-schema.org/) for a Vega-Lite specification. Unless you have a reason to change this, use `https://vega.github.io/schema/vega-lite/v4.json`. Setting the `$schema` property allows automatic validation and autocomplete in editors that support JSON schema.",
+ "format": "uri",
+ "type": "string"
+ },
+ "align": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LayoutAlign"
+ },
+ {
+ "$ref": "#/definitions/RowCol<LayoutAlign>"
+ }
+ ],
+ "description": "The alignment to apply to grid rows and columns. The supported string values are `\"all\"`, `\"each\"`, and `\"none\"`.\n\n- For `\"none\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other. - For `\"each\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size. - For `\"all\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\nAlternatively, an object value of the form `{\"row\": string, \"column\": string}` can be used to supply different alignments for rows and columns.\n\n__Default value:__ `\"all\"`."
+ },
+ "autosize": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/AutosizeType"
+ },
+ {
+ "$ref": "#/definitions/AutoSizeParams"
+ }
+ ],
+ "description": "How the visualization size should be determined. If a string, should be one of `\"pad\"`, `\"fit\"` or `\"none\"`. Object values can additionally specify parameters for content sizing and automatic resizing.\n\n__Default value__: `pad`"
+ },
+ "background": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "CSS color property to use as the background of the entire view.\n\n__Default value:__ `\"white\"`"
+ },
+ "bounds": {
+ "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used. - If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`",
+ "enum": [
+ "full",
+ "flush"
+ ],
+ "type": "string"
+ },
+ "center": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/RowCol<boolean>"
+ }
+ ],
+ "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\nAn object value of the form `{\"row\": boolean, \"column\": boolean}` can be used to supply different centering values for rows and columns.\n\n__Default value:__ `false`"
+ },
+ "columns": {
+ "description": "The number of columns to include in the view composition layout.\n\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\n\n__Note__:\n\n1) This property is only for: - the general (wrappable) `concat` operator (not `hconcat`/`vconcat`) - the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\n\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).",
+ "type": "number"
+ },
+ "config": {
+ "$ref": "#/definitions/Config",
+ "description": "Vega-Lite configuration object. This property can only be defined at the top-level of a specification."
+ },
+ "data": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Data"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
+ },
+ "datasets": {
+ "$ref": "#/definitions/Datasets",
+ "description": "A global data store for named datasets. This is a mapping from names to inline datasets. This can be an array of objects or primitive values or a string. Arrays of primitive values are ingested as objects with a `data` property."
+ },
+ "description": {
+ "description": "Description of this mark for commenting purpose.",
+ "type": "string"
+ },
+ "facet": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/FacetFieldDef"
+ },
+ {
+ "$ref": "#/definitions/FacetMapping"
+ }
+ ],
+ "description": "Definition for how to facet the data. One of: 1) [a field definition for faceting the plot by one field](https://vega.github.io/vega-lite/docs/facet.html#field-def) 2) [An object that maps `row` and `column` channels to their field definitions](https://vega.github.io/vega-lite/docs/facet.html#mapping)"
+ },
+ "name": {
+ "description": "Name of the visualization for later reference.",
+ "type": "string"
+ },
+ "padding": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Padding"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides. If an object, the value should have the format `{\"left\": 5, \"top\": 5, \"right\": 5, \"bottom\": 5}` to specify padding for each side of the visualization.\n\n__Default value__: `5`"
+ },
+ "params": {
+ "description": "Dynamic variables that parameterize a visualization.",
+ "items": {
+ "$ref": "#/definitions/Parameter"
+ },
+ "type": "array"
+ },
+ "resolve": {
+ "$ref": "#/definitions/Resolve",
+ "description": "Scale, axis, and legend resolutions for view composition specifications."
+ },
+ "spacing": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/RowCol<number>"
+ }
+ ],
+ "description": "The spacing in pixels between sub-views of the composition operator. An object of the form `{\"row\": number, \"column\": number}` can be used to set different spacing values for rows and columns.\n\n__Default value__: Depends on `\"spacing\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)"
+ },
+ "spec": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LayerSpec"
+ },
+ {
+ "$ref": "#/definitions/UnitSpecWithFrame"
+ }
+ ],
+ "description": "A specification of the view that gets faceted."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "$ref": "#/definitions/TitleParams"
+ }
+ ],
+ "description": "Title for the plot."
+ },
+ "transform": {
+ "description": "An array of data transformations such as filter and new field calculation.",
+ "items": {
+ "$ref": "#/definitions/Transform"
+ },
+ "type": "array"
+ },
+ "usermeta": {
+ "$ref": "#/definitions/Dict<unknown>",
+ "description": "Optional metadata that will be passed to Vega. This object is completely ignored by Vega and Vega-Lite and can be used for custom metadata."
+ }
+ },
+ "required": [
+ "data",
+ "facet",
+ "spec"
+ ],
+ "type": "object"
+ },
+ "TopLevelSpec": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TopLevelUnitSpec"
+ },
+ {
+ "$ref": "#/definitions/TopLevelFacetSpec"
+ },
+ {
+ "$ref": "#/definitions/TopLevelLayerSpec"
+ },
+ {
+ "$ref": "#/definitions/TopLevelRepeatSpec"
+ },
+ {
+ "$ref": "#/definitions/TopLevelNormalizedConcatSpec<GenericSpec>"
+ },
+ {
+ "$ref": "#/definitions/TopLevelNormalizedVConcatSpec<GenericSpec>"
+ },
+ {
+ "$ref": "#/definitions/TopLevelNormalizedHConcatSpec<GenericSpec>"
+ }
+ ],
+ "description": "A Vega-Lite top-level specification. This is the root class for all Vega-Lite specifications. (The json schema is generated from this type.)"
+ },
+ "TopLevelUnitSpec": {
+ "additionalProperties": false,
+ "properties": {
+ "$schema": {
+ "description": "URL to [JSON schema](http://json-schema.org/) for a Vega-Lite specification. Unless you have a reason to change this, use `https://vega.github.io/schema/vega-lite/v4.json`. Setting the `$schema` property allows automatic validation and autocomplete in editors that support JSON schema.",
+ "format": "uri",
+ "type": "string"
+ },
+ "align": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/LayoutAlign"
+ },
+ {
+ "$ref": "#/definitions/RowCol<LayoutAlign>"
+ }
+ ],
+ "description": "The alignment to apply to grid rows and columns. The supported string values are `\"all\"`, `\"each\"`, and `\"none\"`.\n\n- For `\"none\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other. - For `\"each\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size. - For `\"all\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\nAlternatively, an object value of the form `{\"row\": string, \"column\": string}` can be used to supply different alignments for rows and columns.\n\n__Default value:__ `\"all\"`."
+ },
+ "autosize": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/AutosizeType"
+ },
+ {
+ "$ref": "#/definitions/AutoSizeParams"
+ }
+ ],
+ "description": "How the visualization size should be determined. If a string, should be one of `\"pad\"`, `\"fit\"` or `\"none\"`. Object values can additionally specify parameters for content sizing and automatic resizing.\n\n__Default value__: `pad`"
+ },
+ "background": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "CSS color property to use as the background of the entire view.\n\n__Default value:__ `\"white\"`"
+ },
+ "bounds": {
+ "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used. - If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`",
+ "enum": [
+ "full",
+ "flush"
+ ],
+ "type": "string"
+ },
+ "center": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/RowCol<boolean>"
+ }
+ ],
+ "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\nAn object value of the form `{\"row\": boolean, \"column\": boolean}` can be used to supply different centering values for rows and columns.\n\n__Default value:__ `false`"
+ },
+ "config": {
+ "$ref": "#/definitions/Config",
+ "description": "Vega-Lite configuration object. This property can only be defined at the top-level of a specification."
+ },
+ "data": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Data"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
+ },
+ "datasets": {
+ "$ref": "#/definitions/Datasets",
+ "description": "A global data store for named datasets. This is a mapping from names to inline datasets. This can be an array of objects or primitive values or a string. Arrays of primitive values are ingested as objects with a `data` property."
+ },
+ "description": {
+ "description": "Description of this mark for commenting purpose.",
+ "type": "string"
+ },
+ "encoding": {
+ "$ref": "#/definitions/FacetedEncoding",
+ "description": "A key-value mapping between encoding channels and definition of fields."
+ },
+ "height": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "container",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/Step"
+ }
+ ],
+ "description": "The height of a visualization.\n\n- For a plot with a continuous y-field, height should be a number. - For a plot with either a discrete y-field or no y-field, height can be either a number indicating a fixed height or an object in the form of `{step: number}` defining the height per discrete step. (No y-field is equivalent to having one discrete step.) - To enable responsive sizing on height, it should be set to `\"container\"`.\n\n__Default value:__ Based on `config.view.continuousHeight` for a plot with a continuous y-field and `config.view.discreteHeight` otherwise.\n\n__Note:__ For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the height of a single view and the `\"container\"` option cannot be used.\n\n__See also:__ [`height`](https://vega.github.io/vega-lite/docs/size.html) documentation."
+ },
+ "mark": {
+ "$ref": "#/definitions/AnyMark",
+ "description": "A string describing the mark type (one of `\"bar\"`, `\"circle\"`, `\"square\"`, `\"tick\"`, `\"line\"`, `\"area\"`, `\"point\"`, `\"rule\"`, `\"geoshape\"`, and `\"text\"`) or a [mark definition object](https://vega.github.io/vega-lite/docs/mark.html#mark-def)."
+ },
+ "name": {
+ "description": "Name of the visualization for later reference.",
+ "type": "string"
+ },
+ "padding": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Padding"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides. If an object, the value should have the format `{\"left\": 5, \"top\": 5, \"right\": 5, \"bottom\": 5}` to specify padding for each side of the visualization.\n\n__Default value__: `5`"
+ },
+ "params": {
+ "description": "Dynamic variables that parameterize a visualization.",
+ "items": {
+ "$ref": "#/definitions/Parameter"
+ },
+ "type": "array"
+ },
+ "projection": {
+ "$ref": "#/definitions/Projection",
+ "description": "An object defining properties of geographic projection, which will be applied to `shape` path for `\"geoshape\"` marks and to `latitude` and `\"longitude\"` channels for other marks."
+ },
+ "resolve": {
+ "$ref": "#/definitions/Resolve",
+ "description": "Scale, axis, and legend resolutions for view composition specifications."
+ },
+ "selection": {
+ "additionalProperties": {
+ "$ref": "#/definitions/SelectionDef"
+ },
+ "description": "A key-value mapping between selection names and definitions.",
+ "type": "object"
+ },
+ "spacing": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/RowCol<number>"
+ }
+ ],
+ "description": "The spacing in pixels between sub-views of the composition operator. An object of the form `{\"row\": number, \"column\": number}` can be used to set different spacing values for rows and columns.\n\n__Default value__: Depends on `\"spacing\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)"
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "$ref": "#/definitions/TitleParams"
+ }
+ ],
+ "description": "Title for the plot."
+ },
+ "transform": {
+ "description": "An array of data transformations such as filter and new field calculation.",
+ "items": {
+ "$ref": "#/definitions/Transform"
+ },
+ "type": "array"
+ },
+ "usermeta": {
+ "$ref": "#/definitions/Dict<unknown>",
+ "description": "Optional metadata that will be passed to Vega. This object is completely ignored by Vega and Vega-Lite and can be used for custom metadata."
+ },
+ "view": {
+ "$ref": "#/definitions/ViewBackground",
+ "description": "An object defining the view background's fill and stroke.\n\n__Default value:__ none (transparent)"
+ },
+ "width": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "container",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/Step"
+ }
+ ],
+ "description": "The width of a visualization.\n\n- For a plot with a continuous x-field, width should be a number. - For a plot with either a discrete x-field or no x-field, width can be either a number indicating a fixed width or an object in the form of `{step: number}` defining the width per discrete step. (No x-field is equivalent to having one discrete step.) - To enable responsive sizing on width, it should be set to `\"container\"`.\n\n__Default value:__ Based on `config.view.continuousWidth` for a plot with a continuous x-field and `config.view.discreteWidth` otherwise.\n\n__Note:__ For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the width of a single view and the `\"container\"` option cannot be used.\n\n__See also:__ [`width`](https://vega.github.io/vega-lite/docs/size.html) documentation."
+ }
+ },
+ "required": [
+ "data",
+ "mark"
+ ],
+ "type": "object"
+ },
+ "TopoDataFormat": {
+ "additionalProperties": false,
+ "properties": {
+ "feature": {
+ "description": "The name of the TopoJSON object set to convert to a GeoJSON feature collection. For example, in a map of the world, there may be an object set named `\"countries\"`. Using the feature property, we can extract this set and generate a GeoJSON feature object for each country.",
+ "type": "string"
+ },
+ "mesh": {
+ "description": "The name of the TopoJSON object set to convert to mesh. Similar to the `feature` option, `mesh` extracts a named TopoJSON object set. Unlike the `feature` option, the corresponding geo data is returned as a single, unified mesh instance, not as individual GeoJSON features. Extracting a mesh is useful for more efficiently drawing borders or other geographic elements that you do not need to associate with specific regions such as individual countries, states or counties.",
+ "type": "string"
+ },
+ "parse": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Parse"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "If set to `null`, disable type inference based on the spec and only use type inference based on the data. Alternatively, a parsing directive object can be provided for explicit data types. Each property of the object corresponds to a field name, and the value to the desired data type (one of `\"number\"`, `\"boolean\"`, `\"date\"`, or null (do not parse the field)). For example, `\"parse\": {\"modified_on\": \"date\"}` parses the `modified_on` field in each input record a Date value.\n\nFor `\"date\"`, we parse data based using Javascript's [`Date.parse()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse). For Specific date formats can be provided (e.g., `{foo: \"date:'%m%d%Y'\"}`), using the [d3-time-format syntax](https://github.com/d3/d3-time-format#locale_format). UTC date format parsing is supported similarly (e.g., `{foo: \"utc:'%m%d%Y'\"}`). See more about [UTC time](https://vega.github.io/vega-lite/docs/timeunit.html#utc)"
+ },
+ "type": {
+ "const": "topojson",
+ "description": "Type of input data: `\"json\"`, `\"csv\"`, `\"tsv\"`, `\"dsv\"`.\n\n__Default value:__ The default format type is determined by the extension of the file URL. If no extension is detected, `\"json\"` will be used by default.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "Transform": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/AggregateTransform"
+ },
+ {
+ "$ref": "#/definitions/BinTransform"
+ },
+ {
+ "$ref": "#/definitions/CalculateTransform"
+ },
+ {
+ "$ref": "#/definitions/DensityTransform"
+ },
+ {
+ "$ref": "#/definitions/FilterTransform"
+ },
+ {
+ "$ref": "#/definitions/FlattenTransform"
+ },
+ {
+ "$ref": "#/definitions/FoldTransform"
+ },
+ {
+ "$ref": "#/definitions/ImputeTransform"
+ },
+ {
+ "$ref": "#/definitions/JoinAggregateTransform"
+ },
+ {
+ "$ref": "#/definitions/LoessTransform"
+ },
+ {
+ "$ref": "#/definitions/LookupTransform"
+ },
+ {
+ "$ref": "#/definitions/QuantileTransform"
+ },
+ {
+ "$ref": "#/definitions/RegressionTransform"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitTransform"
+ },
+ {
+ "$ref": "#/definitions/SampleTransform"
+ },
+ {
+ "$ref": "#/definitions/StackTransform"
+ },
+ {
+ "$ref": "#/definitions/WindowTransform"
+ },
+ {
+ "$ref": "#/definitions/PivotTransform"
+ }
+ ]
+ },
+ "Type": {
+ "description": "Data type based on level of measurement",
+ "enum": [
+ "quantitative",
+ "ordinal",
+ "temporal",
+ "nominal",
+ "geojson"
+ ],
+ "type": "string"
+ },
+ "TypeForShape": {
+ "enum": [
+ "nominal",
+ "ordinal",
+ "geojson"
+ ],
+ "type": "string"
+ },
+ "TypedFieldDef": {
+ "additionalProperties": false,
+ "description": "Definition object for a data field, its type and transformation of an encoding channel.",
+ "properties": {
+ "aggregate": {
+ "$ref": "#/definitions/Aggregate",
+ "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation."
+ },
+ "band": {
+ "description": "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "bin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "#/definitions/BinParams"
+ },
+ {
+ "const": "binned",
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation."
+ },
+ "field": {
+ "$ref": "#/definitions/Field",
+ "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`."
+ },
+ "timeUnit": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TimeUnit"
+ },
+ {
+ "$ref": "#/definitions/TimeUnitParams"
+ }
+ ],
+ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used."
+ },
+ "type": {
+ "$ref": "#/definitions/StandardType",
+ "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal\"\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `\"quantitative\"` if the datum is a number - `\"nominal\"` if the datum is a string - `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation."
+ }
+ },
+ "type": "object"
+ },
+ "URI": {
+ "format": "uri-reference",
+ "type": "string"
+ },
+ "UnitSpec": {
+ "additionalProperties": false,
+ "description": "A unit specification, which can contain either [primitive marks or composite marks](https://vega.github.io/vega-lite/docs/mark.html#types).",
+ "properties": {
+ "data": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Data"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
+ },
+ "description": {
+ "description": "Description of this mark for commenting purpose.",
+ "type": "string"
+ },
+ "encoding": {
+ "$ref": "#/definitions/Encoding",
+ "description": "A key-value mapping between encoding channels and definition of fields."
+ },
+ "height": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "container",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/Step"
+ }
+ ],
+ "description": "__Deprecated:__ Please avoid using width in a unit spec that's a part of a layer spec."
+ },
+ "mark": {
+ "$ref": "#/definitions/AnyMark",
+ "description": "A string describing the mark type (one of `\"bar\"`, `\"circle\"`, `\"square\"`, `\"tick\"`, `\"line\"`, `\"area\"`, `\"point\"`, `\"rule\"`, `\"geoshape\"`, and `\"text\"`) or a [mark definition object](https://vega.github.io/vega-lite/docs/mark.html#mark-def)."
+ },
+ "name": {
+ "description": "Name of the visualization for later reference.",
+ "type": "string"
+ },
+ "projection": {
+ "$ref": "#/definitions/Projection",
+ "description": "An object defining properties of geographic projection, which will be applied to `shape` path for `\"geoshape\"` marks and to `latitude` and `\"longitude\"` channels for other marks."
+ },
+ "selection": {
+ "additionalProperties": {
+ "$ref": "#/definitions/SelectionDef"
+ },
+ "description": "A key-value mapping between selection names and definitions.",
+ "type": "object"
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "$ref": "#/definitions/TitleParams"
+ }
+ ],
+ "description": "Title for the plot."
+ },
+ "transform": {
+ "description": "An array of data transformations such as filter and new field calculation.",
+ "items": {
+ "$ref": "#/definitions/Transform"
+ },
+ "type": "array"
+ },
+ "view": {
+ "$ref": "#/definitions/ViewBackground",
+ "description": "__Deprecated:__ Please avoid using width in a unit spec that's a part of a layer spec."
+ },
+ "width": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "container",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/Step"
+ }
+ ],
+ "description": "__Deprecated:__ Please avoid using width in a unit spec that's a part of a layer spec."
+ }
+ },
+ "required": [
+ "mark"
+ ],
+ "type": "object"
+ },
+ "UnitSpecWithFrame": {
+ "additionalProperties": false,
+ "properties": {
+ "data": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Data"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
+ },
+ "description": {
+ "description": "Description of this mark for commenting purpose.",
+ "type": "string"
+ },
+ "encoding": {
+ "$ref": "#/definitions/Encoding",
+ "description": "A key-value mapping between encoding channels and definition of fields."
+ },
+ "height": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "container",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/Step"
+ }
+ ],
+ "description": "The height of a visualization.\n\n- For a plot with a continuous y-field, height should be a number. - For a plot with either a discrete y-field or no y-field, height can be either a number indicating a fixed height or an object in the form of `{step: number}` defining the height per discrete step. (No y-field is equivalent to having one discrete step.) - To enable responsive sizing on height, it should be set to `\"container\"`.\n\n__Default value:__ Based on `config.view.continuousHeight` for a plot with a continuous y-field and `config.view.discreteHeight` otherwise.\n\n__Note:__ For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the height of a single view and the `\"container\"` option cannot be used.\n\n__See also:__ [`height`](https://vega.github.io/vega-lite/docs/size.html) documentation."
+ },
+ "mark": {
+ "$ref": "#/definitions/AnyMark",
+ "description": "A string describing the mark type (one of `\"bar\"`, `\"circle\"`, `\"square\"`, `\"tick\"`, `\"line\"`, `\"area\"`, `\"point\"`, `\"rule\"`, `\"geoshape\"`, and `\"text\"`) or a [mark definition object](https://vega.github.io/vega-lite/docs/mark.html#mark-def)."
+ },
+ "name": {
+ "description": "Name of the visualization for later reference.",
+ "type": "string"
+ },
+ "projection": {
+ "$ref": "#/definitions/Projection",
+ "description": "An object defining properties of geographic projection, which will be applied to `shape` path for `\"geoshape\"` marks and to `latitude` and `\"longitude\"` channels for other marks."
+ },
+ "selection": {
+ "additionalProperties": {
+ "$ref": "#/definitions/SelectionDef"
+ },
+ "description": "A key-value mapping between selection names and definitions.",
+ "type": "object"
+ },
+ "title": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "$ref": "#/definitions/TitleParams"
+ }
+ ],
+ "description": "Title for the plot."
+ },
+ "transform": {
+ "description": "An array of data transformations such as filter and new field calculation.",
+ "items": {
+ "$ref": "#/definitions/Transform"
+ },
+ "type": "array"
+ },
+ "view": {
+ "$ref": "#/definitions/ViewBackground",
+ "description": "An object defining the view background's fill and stroke.\n\n__Default value:__ none (transparent)"
+ },
+ "width": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "container",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/Step"
+ }
+ ],
+ "description": "The width of a visualization.\n\n- For a plot with a continuous x-field, width should be a number. - For a plot with either a discrete x-field or no x-field, width can be either a number indicating a fixed width or an object in the form of `{step: number}` defining the width per discrete step. (No x-field is equivalent to having one discrete step.) - To enable responsive sizing on width, it should be set to `\"container\"`.\n\n__Default value:__ Based on `config.view.continuousWidth` for a plot with a continuous x-field and `config.view.discreteWidth` otherwise.\n\n__Note:__ For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the width of a single view and the `\"container\"` option cannot be used.\n\n__See also:__ [`width`](https://vega.github.io/vega-lite/docs/size.html) documentation."
+ }
+ },
+ "required": [
+ "mark"
+ ],
+ "type": "object"
+ },
+ "UrlData": {
+ "additionalProperties": false,
+ "properties": {
+ "format": {
+ "$ref": "#/definitions/DataFormat",
+ "description": "An object that specifies the format for parsing the data."
+ },
+ "name": {
+ "description": "Provide a placeholder name and bind data at runtime.",
+ "type": "string"
+ },
+ "url": {
+ "description": "An URL from which to load the data set. Use the `format.type` property to ensure the loaded data is correctly parsed.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "url"
+ ],
+ "type": "object"
+ },
+ "UtcMultiTimeUnit": {
+ "enum": [
+ "utcyearquarter",
+ "utcyearquartermonth",
+ "utcyearmonth",
+ "utcyearmonthdate",
+ "utcyearmonthdatehours",
+ "utcyearmonthdatehoursminutes",
+ "utcyearmonthdatehoursminutesseconds",
+ "utcyearweek",
+ "utcyearweekday",
+ "utcyearweekdayhours",
+ "utcyearweekdayhoursminutes",
+ "utcyearweekdayhoursminutesseconds",
+ "utcyeardayofyear",
+ "utcquartermonth",
+ "utcmonthdate",
+ "utcmonthdatehours",
+ "utcmonthdatehoursminutes",
+ "utcmonthdatehoursminutesseconds",
+ "utcweekday",
+ "utcweeksdayhours",
+ "utcweekdayhoursminutes",
+ "utcweekdayhoursminutesseconds",
+ "utcdayhours",
+ "utcdayhoursminutes",
+ "utcdayhoursminutesseconds",
+ "utchoursminutes",
+ "utchoursminutesseconds",
+ "utcminutesseconds",
+ "utcsecondsmilliseconds"
+ ],
+ "type": "string"
+ },
+ "UtcSingleTimeUnit": {
+ "enum": [
+ "utcyear",
+ "utcquarter",
+ "utcmonth",
+ "utcweek",
+ "utcday",
+ "utcdayofyear",
+ "utcdate",
+ "utchours",
+ "utcminutes",
+ "utcseconds",
+ "utcmilliseconds"
+ ],
+ "type": "string"
+ },
+ "ValueDef<(number|\"width\"|\"height\"|ExprRef)>": {
+ "additionalProperties": false,
+ "description": "Definition object for a constant value (primitive value or gradient definition) of an encoding channel.",
+ "properties": {
+ "value": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "const": "width",
+ "type": "string"
+ },
+ {
+ "const": "height",
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "required": [
+ "value"
+ ],
+ "type": "object"
+ },
+ "ValueDef<(number|ExprRef)>": {
+ "additionalProperties": false,
+ "description": "Definition object for a constant value (primitive value or gradient definition) of an encoding channel.",
+ "properties": {
+ "value": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "required": [
+ "value"
+ ],
+ "type": "object"
+ },
+ "ValueDef<number>": {
+ "additionalProperties": false,
+ "description": "Definition object for a constant value (primitive value or gradient definition) of an encoding channel.",
+ "properties": {
+ "value": {
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).",
+ "type": "number"
+ }
+ },
+ "required": [
+ "value"
+ ],
+ "type": "object"
+ },
+ "ValueDefWithCondition<MarkPropFieldOrDatumDef,(Gradient|string|null)>": {
+ "additionalProperties": false,
+ "minProperties": 1,
+ "properties": {
+ "condition": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalMarkPropFieldOrDatumDef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "A field definition or one or more value definition(s) with a selection predicate."
+ },
+ "value": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Gradient"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "type": "object"
+ },
+ "ValueDefWithCondition<MarkPropFieldOrDatumDef,(string|null)>": {
+ "additionalProperties": false,
+ "minProperties": 1,
+ "properties": {
+ "condition": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalMarkPropFieldOrDatumDef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(string|null|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(string|null|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "A field definition or one or more value definition(s) with a selection predicate."
+ },
+ "value": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "type": "object"
+ },
+ "ValueDefWithCondition<MarkPropFieldOrDatumDef,number>": {
+ "additionalProperties": false,
+ "minProperties": 1,
+ "properties": {
+ "condition": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalMarkPropFieldOrDatumDef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "A field definition or one or more value definition(s) with a selection predicate."
+ },
+ "value": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "type": "object"
+ },
+ "ValueDefWithCondition<MarkPropFieldOrDatumDef,number[]>": {
+ "additionalProperties": false,
+ "minProperties": 1,
+ "properties": {
+ "condition": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalMarkPropFieldOrDatumDef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(number[]|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(number[]|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "A field definition or one or more value definition(s) with a selection predicate."
+ },
+ "value": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "type": "object"
+ },
+ "ValueDefWithCondition<MarkPropFieldOrDatumDef<TypeForShape>,(string|null)>": {
+ "additionalProperties": false,
+ "minProperties": 1,
+ "properties": {
+ "condition": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalMarkPropFieldOrDatumDef<TypeForShape>"
+ },
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(string|null|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(string|null|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "A field definition or one or more value definition(s) with a selection predicate."
+ },
+ "value": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "type": "object"
+ },
+ "ValueDefWithCondition<StringFieldDef,Text>": {
+ "additionalProperties": false,
+ "minProperties": 1,
+ "properties": {
+ "condition": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ConditionalStringFieldDef"
+ },
+ {
+ "$ref": "#/definitions/ConditionalValueDef<(Text|ExprRef)>"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/ConditionalValueDef<(Text|ExprRef)>"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "A field definition or one or more value definition(s) with a selection predicate."
+ },
+ "value": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Text"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)."
+ }
+ },
+ "type": "object"
+ },
+ "Vector2<DateTime>": {
+ "items": [
+ {
+ "$ref": "#/definitions/DateTime"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2,
+ "type": "array"
+ },
+ "Vector2<Vector2<number>>": {
+ "items": [
+ {
+ "$ref": "#/definitions/Vector2<number>"
+ },
+ {
+ "$ref": "#/definitions/Vector2<number>"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2,
+ "type": "array"
+ },
+ "Vector2<boolean>": {
+ "items": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2,
+ "type": "array"
+ },
+ "Vector2<number>": {
+ "items": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "number"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2,
+ "type": "array"
+ },
+ "Vector2<string>": {
+ "items": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "string"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2,
+ "type": "array"
+ },
+ "Vector3<number>": {
+ "items": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "number"
+ }
+ ],
+ "maxItems": 3,
+ "minItems": 3,
+ "type": "array"
+ },
+ "ViewBackground": {
+ "additionalProperties": false,
+ "properties": {
+ "cornerRadius": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles or arcs' corners.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "cursor": {
+ "$ref": "#/definitions/Cursor",
+ "description": "The mouse cursor used over the view. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used."
+ },
+ "fill": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The fill color.\n\n__Default value:__ `undefined`"
+ },
+ "fillOpacity": {
+ "anyOf": [
+ {
+ "description": "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "opacity": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.",
+ "maximum": 1,
+ "minimum": 0
+ },
+ "stroke": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The stroke color.\n\n__Default value:__ `\"#ddd\"`"
+ },
+ "strokeCap": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StrokeCap",
+ "description": "The stroke cap for line ending style. One of `\"butt\"`, `\"round\"`, or `\"square\"`.\n\n__Default value:__ `\"butt\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeDash": {
+ "anyOf": [
+ {
+ "description": "An array of alternating stroke, space lengths for creating dashed or dotted lines.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeDashOffset": {
+ "anyOf": [
+ {
+ "description": "The offset (in pixels) into which to begin drawing with the stroke dash array.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeJoin": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StrokeJoin",
+ "description": "The stroke line join method. One of `\"miter\"`, `\"round\"` or `\"bevel\"`.\n\n__Default value:__ `\"miter\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeMiterLimit": {
+ "anyOf": [
+ {
+ "description": "The miter limit at which to bevel a line join.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeOpacity": {
+ "anyOf": [
+ {
+ "description": "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeWidth": {
+ "anyOf": [
+ {
+ "description": "The stroke width, in pixels.",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "style": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "A string or array of strings indicating the name of custom styles to apply to the view background. A style is a named collection of mark property defaults defined within the [style configuration](https://vega.github.io/vega-lite/docs/mark.html#style-config). If style is an array, later styles will override earlier styles.\n\n__Default value:__ `\"cell\"` __Note:__ Any specified view background properties will augment the default style."
+ }
+ },
+ "type": "object"
+ },
+ "ViewConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "clip": {
+ "description": "Whether the view should be clipped.",
+ "type": "boolean"
+ },
+ "continuousHeight": {
+ "description": "The default height when the plot has a continuous y-field for x or latitude, or has arc marks.\n\n__Default value:__ `200`",
+ "type": "number"
+ },
+ "continuousWidth": {
+ "description": "The default width when the plot has a continuous field for x or longitude, or has arc marks.\n\n__Default value:__ `200`",
+ "type": "number"
+ },
+ "cornerRadius": {
+ "anyOf": [
+ {
+ "description": "The radius in pixels of rounded rectangles or arcs' corners.\n\n__Default value:__ `0`",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "cursor": {
+ "$ref": "#/definitions/Cursor",
+ "description": "The mouse cursor used over the view. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used."
+ },
+ "discreteHeight": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "step": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "step"
+ ],
+ "type": "object"
+ }
+ ],
+ "description": "The default height when the plot has non arc marks and either a discrete y-field or no y-field. The height can be either a number indicating a fixed height or an object in the form of `{step: number}` defining the height per discrete step.\n\n__Default value:__ a step size based on `config.view.step`."
+ },
+ "discreteWidth": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "step": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "step"
+ ],
+ "type": "object"
+ }
+ ],
+ "description": "The default width when the plot has non-arc marks and either a discrete x-field or no x-field. The width can be either a number indicating a fixed width or an object in the form of `{step: number}` defining the width per discrete step.\n\n__Default value:__ a step size based on `config.view.step`."
+ },
+ "fill": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The fill color.\n\n__Default value:__ `undefined`"
+ },
+ "fillOpacity": {
+ "anyOf": [
+ {
+ "description": "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "height": {
+ "description": "Default height\n\n__Deprecated:__ Since Vega-Lite 4.0. Please use continuousHeight and discreteHeight instead.",
+ "type": "number"
+ },
+ "opacity": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.",
+ "maximum": 1,
+ "minimum": 0
+ },
+ "step": {
+ "description": "Default step size for x-/y- discrete fields.",
+ "type": "number"
+ },
+ "stroke": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Color"
+ },
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ],
+ "description": "The stroke color.\n\n__Default value:__ `\"#ddd\"`"
+ },
+ "strokeCap": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StrokeCap",
+ "description": "The stroke cap for line ending style. One of `\"butt\"`, `\"round\"`, or `\"square\"`.\n\n__Default value:__ `\"butt\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeDash": {
+ "anyOf": [
+ {
+ "description": "An array of alternating stroke, space lengths for creating dashed or dotted lines.",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeDashOffset": {
+ "anyOf": [
+ {
+ "description": "The offset (in pixels) into which to begin drawing with the stroke dash array.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeJoin": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/StrokeJoin",
+ "description": "The stroke line join method. One of `\"miter\"`, `\"round\"` or `\"bevel\"`.\n\n__Default value:__ `\"miter\"`"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeMiterLimit": {
+ "anyOf": [
+ {
+ "description": "The miter limit at which to bevel a line join.",
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeOpacity": {
+ "anyOf": [
+ {
+ "description": "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "strokeWidth": {
+ "anyOf": [
+ {
+ "description": "The stroke width, in pixels.",
+ "minimum": 0,
+ "type": "number"
+ },
+ {
+ "$ref": "#/definitions/ExprRef"
+ }
+ ]
+ },
+ "width": {
+ "description": "Default width\n\n__Deprecated:__ Since Vega-Lite 4.0. Please use continuousWidth and discreteWidth instead.",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "WindowEventType": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/EventType"
+ },
+ {
+ "type": "string"
+ }
+ ]
+ },
+ "WindowFieldDef": {
+ "additionalProperties": false,
+ "properties": {
+ "as": {
+ "$ref": "#/definitions/FieldName",
+ "description": "The output name for the window operation."
+ },
+ "field": {
+ "$ref": "#/definitions/FieldName",
+ "description": "The data field for which to compute the aggregate or window function. This can be omitted for window functions that do not operate over a field such as `\"count\"`, `\"rank\"`, `\"dense_rank\"`."
+ },
+ "op": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/AggregateOp"
+ },
+ {
+ "$ref": "#/definitions/WindowOnlyOp"
+ }
+ ],
+ "description": "The window or aggregation operation to apply within a window (e.g., `\"rank\"`, `\"lead\"`, `\"sum\"`, `\"average\"` or `\"count\"`). See the list of all supported operations [here](https://vega.github.io/vega-lite/docs/window.html#ops)."
+ },
+ "param": {
+ "description": "Parameter values for the window functions. Parameter values can be omitted for operations that do not accept a parameter.\n\nSee the list of all supported operations and their parameters [here](https://vega.github.io/vega-lite/docs/transforms/window.html).",
+ "type": "number"
+ }
+ },
+ "required": [
+ "op",
+ "as"
+ ],
+ "type": "object"
+ },
+ "WindowOnlyOp": {
+ "enum": [
+ "row_number",
+ "rank",
+ "dense_rank",
+ "percent_rank",
+ "cume_dist",
+ "ntile",
+ "lag",
+ "lead",
+ "first_value",
+ "last_value",
+ "nth_value"
+ ],
+ "type": "string"
+ },
+ "WindowTransform": {
+ "additionalProperties": false,
+ "properties": {
+ "frame": {
+ "description": "A frame specification as a two-element array indicating how the sliding window should proceed. The array entries should either be a number indicating the offset from the current data object, or null to indicate unbounded rows preceding or following the current data object. The default value is `[null, 0]`, indicating that the sliding window includes the current object and all preceding objects. The value `[-5, 5]` indicates that the window should include five objects preceding and five objects following the current object. Finally, `[null, null]` indicates that the window frame should always include all data objects. If you this frame and want to assign the same value to add objects, you can use the simpler [join aggregate transform](https://vega.github.io/vega-lite/docs/joinaggregate.html). The only operators affected are the aggregation operations and the `first_value`, `last_value`, and `nth_value` window operations. The other window operations are not affected by this.\n\n__Default value:__: `[null, 0]` (includes the current object and all preceding objects)",
+ "items": {
+ "type": [
+ "null",
+ "number"
+ ]
+ },
+ "type": "array"
+ },
+ "groupby": {
+ "description": "The data fields for partitioning the data objects into separate windows. If unspecified, all data points will be in a single window.",
+ "items": {
+ "$ref": "#/definitions/FieldName"
+ },
+ "type": "array"
+ },
+ "ignorePeers": {
+ "description": "Indicates if the sliding window frame should ignore peer values (data that are considered identical by the sort criteria). The default is false, causing the window frame to expand to include all peer values. If set to true, the window frame will be defined by offset values only. This setting only affects those operations that depend on the window frame, namely aggregation operations and the first_value, last_value, and nth_value window operations.\n\n__Default value:__ `false`",
+ "type": "boolean"
+ },
+ "sort": {
+ "description": "A sort field definition for sorting data objects within a window. If two data objects are considered equal by the comparator, they are considered \"peer\" values of equal rank. If sort is not specified, the order is undefined: data objects are processed in the order they are observed and none are considered peers (the ignorePeers parameter is ignored and treated as if set to `true`).",
+ "items": {
+ "$ref": "#/definitions/SortField"
+ },
+ "type": "array"
+ },
+ "window": {
+ "description": "The definition of the fields in the window, and what calculations to use.",
+ "items": {
+ "$ref": "#/definitions/WindowFieldDef"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "window"
+ ],
+ "type": "object"
+ }
+ }
+} \ No newline at end of file
diff --git a/venv/lib/python3.9/site-packages/altair/vegalite/v4/tests/__init__.py b/venv/lib/python3.9/site-packages/altair/vegalite/v4/tests/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vegalite/v4/tests/__init__.py
diff --git a/venv/lib/python3.9/site-packages/altair/vegalite/v4/tests/test_api.py b/venv/lib/python3.9/site-packages/altair/vegalite/v4/tests/test_api.py
new file mode 100644
index 00000000..450553f3
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vegalite/v4/tests/test_api.py
@@ -0,0 +1,958 @@
+"""Unit tests for altair API"""
+
+import io
+import json
+import operator
+import os
+import pathlib
+import tempfile
+
+import jsonschema
+import pytest
+import pandas as pd
+
+import altair.vegalite.v4 as alt
+
+try:
+ import altair_saver # noqa: F401
+except ImportError:
+ altair_saver = None
+
+
+def getargs(*args, **kwargs):
+ return args, kwargs
+
+
+OP_DICT = {
+ "layer": operator.add,
+ "hconcat": operator.or_,
+ "vconcat": operator.and_,
+}
+
+
+def _make_chart_type(chart_type):
+ data = pd.DataFrame(
+ {
+ "x": [28, 55, 43, 91, 81, 53, 19, 87],
+ "y": [43, 91, 81, 53, 19, 87, 52, 28],
+ "color": list("AAAABBBB"),
+ }
+ )
+ base = (
+ alt.Chart(data)
+ .mark_point()
+ .encode(
+ x="x",
+ y="y",
+ color="color",
+ )
+ )
+
+ if chart_type in ["layer", "hconcat", "vconcat", "concat"]:
+ func = getattr(alt, chart_type)
+ return func(base.mark_square(), base.mark_circle())
+ elif chart_type == "facet":
+ return base.facet("color")
+ elif chart_type == "facet_encoding":
+ return base.encode(facet="color")
+ elif chart_type == "repeat":
+ return base.encode(alt.X(alt.repeat(), type="quantitative")).repeat(["x", "y"])
+ elif chart_type == "chart":
+ return base
+ else:
+ raise ValueError("chart_type='{}' is not recognized".format(chart_type))
+
+
+@pytest.fixture
+def basic_chart():
+ data = pd.DataFrame(
+ {
+ "a": ["A", "B", "C", "D", "E", "F", "G", "H", "I"],
+ "b": [28, 55, 43, 91, 81, 53, 19, 87, 52],
+ }
+ )
+
+ return alt.Chart(data).mark_bar().encode(x="a", y="b")
+
+
+def test_chart_data_types():
+ def Chart(data):
+ return alt.Chart(data).mark_point().encode(x="x:Q", y="y:Q")
+
+ # Url Data
+ data = "/path/to/my/data.csv"
+ dct = Chart(data).to_dict()
+ assert dct["data"] == {"url": data}
+
+ # Dict Data
+ data = {"values": [{"x": 1, "y": 2}, {"x": 2, "y": 3}]}
+ with alt.data_transformers.enable(consolidate_datasets=False):
+ dct = Chart(data).to_dict()
+ assert dct["data"] == data
+
+ with alt.data_transformers.enable(consolidate_datasets=True):
+ dct = Chart(data).to_dict()
+ name = dct["data"]["name"]
+ assert dct["datasets"][name] == data["values"]
+
+ # DataFrame data
+ data = pd.DataFrame({"x": range(5), "y": range(5)})
+ with alt.data_transformers.enable(consolidate_datasets=False):
+ dct = Chart(data).to_dict()
+ assert dct["data"]["values"] == data.to_dict(orient="records")
+
+ with alt.data_transformers.enable(consolidate_datasets=True):
+ dct = Chart(data).to_dict()
+ name = dct["data"]["name"]
+ assert dct["datasets"][name] == data.to_dict(orient="records")
+
+ # Named data object
+ data = alt.NamedData(name="Foo")
+ dct = Chart(data).to_dict()
+ assert dct["data"] == {"name": "Foo"}
+
+
+def test_chart_infer_types():
+ data = pd.DataFrame(
+ {
+ "x": pd.date_range("2012", periods=10, freq="Y"),
+ "y": range(10),
+ "c": list("abcabcabca"),
+ }
+ )
+
+ def _check_encodings(chart):
+ dct = chart.to_dict()
+ assert dct["encoding"]["x"]["type"] == "temporal"
+ assert dct["encoding"]["x"]["field"] == "x"
+ assert dct["encoding"]["y"]["type"] == "quantitative"
+ assert dct["encoding"]["y"]["field"] == "y"
+ assert dct["encoding"]["color"]["type"] == "nominal"
+ assert dct["encoding"]["color"]["field"] == "c"
+
+ # Pass field names by keyword
+ chart = alt.Chart(data).mark_point().encode(x="x", y="y", color="c")
+ _check_encodings(chart)
+
+ # pass Channel objects by keyword
+ chart = (
+ alt.Chart(data)
+ .mark_point()
+ .encode(x=alt.X("x"), y=alt.Y("y"), color=alt.Color("c"))
+ )
+ _check_encodings(chart)
+
+ # pass Channel objects by value
+ chart = alt.Chart(data).mark_point().encode(alt.X("x"), alt.Y("y"), alt.Color("c"))
+ _check_encodings(chart)
+
+ # override default types
+ chart = (
+ alt.Chart(data)
+ .mark_point()
+ .encode(alt.X("x", type="nominal"), alt.Y("y", type="ordinal"))
+ )
+ dct = chart.to_dict()
+ assert dct["encoding"]["x"]["type"] == "nominal"
+ assert dct["encoding"]["y"]["type"] == "ordinal"
+
+
+@pytest.mark.parametrize(
+ "args, kwargs",
+ [
+ getargs(detail=["value:Q", "name:N"], tooltip=["value:Q", "name:N"]),
+ getargs(detail=["value", "name"], tooltip=["value", "name"]),
+ getargs(alt.Detail(["value:Q", "name:N"]), alt.Tooltip(["value:Q", "name:N"])),
+ getargs(alt.Detail(["value", "name"]), alt.Tooltip(["value", "name"])),
+ getargs(
+ [alt.Detail("value:Q"), alt.Detail("name:N")],
+ [alt.Tooltip("value:Q"), alt.Tooltip("name:N")],
+ ),
+ getargs(
+ [alt.Detail("value"), alt.Detail("name")],
+ [alt.Tooltip("value"), alt.Tooltip("name")],
+ ),
+ ],
+)
+def test_multiple_encodings(args, kwargs):
+ df = pd.DataFrame({"value": [1, 2, 3], "name": ["A", "B", "C"]})
+ encoding_dct = [
+ {"field": "value", "type": "quantitative"},
+ {"field": "name", "type": "nominal"},
+ ]
+ chart = alt.Chart(df).mark_point().encode(*args, **kwargs)
+ dct = chart.to_dict()
+ assert dct["encoding"]["detail"] == encoding_dct
+ assert dct["encoding"]["tooltip"] == encoding_dct
+
+
+def test_chart_operations():
+ data = pd.DataFrame(
+ {
+ "x": pd.date_range("2012", periods=10, freq="Y"),
+ "y": range(10),
+ "c": list("abcabcabca"),
+ }
+ )
+ chart1 = alt.Chart(data).mark_line().encode(x="x", y="y", color="c")
+ chart2 = chart1.mark_point()
+ chart3 = chart1.mark_circle()
+ chart4 = chart1.mark_square()
+
+ chart = chart1 + chart2 + chart3
+ assert isinstance(chart, alt.LayerChart)
+ assert len(chart.layer) == 3
+ chart += chart4
+ assert len(chart.layer) == 4
+
+ chart = chart1 | chart2 | chart3
+ assert isinstance(chart, alt.HConcatChart)
+ assert len(chart.hconcat) == 3
+ chart |= chart4
+ assert len(chart.hconcat) == 4
+
+ chart = chart1 & chart2 & chart3
+ assert isinstance(chart, alt.VConcatChart)
+ assert len(chart.vconcat) == 3
+ chart &= chart4
+ assert len(chart.vconcat) == 4
+
+
+def test_selection_to_dict():
+ brush = alt.selection(type="interval")
+
+ # test some value selections
+ # Note: X and Y cannot have conditions
+ alt.Chart("path/to/data.json").mark_point().encode(
+ color=alt.condition(brush, alt.ColorValue("red"), alt.ColorValue("blue")),
+ opacity=alt.condition(brush, alt.value(0.5), alt.value(1.0)),
+ text=alt.condition(brush, alt.TextValue("foo"), alt.value("bar")),
+ ).to_dict()
+
+ # test some field selections
+ # Note: X and Y cannot have conditions
+ # Conditions cannot both be fields
+ alt.Chart("path/to/data.json").mark_point().encode(
+ color=alt.condition(brush, alt.Color("col1:N"), alt.value("blue")),
+ opacity=alt.condition(brush, "col1:N", alt.value(0.5)),
+ text=alt.condition(brush, alt.value("abc"), alt.Text("col2:N")),
+ size=alt.condition(brush, alt.value(20), "col2:N"),
+ ).to_dict()
+
+
+def test_selection_expression():
+ selection = alt.selection_single(fields=["value"])
+
+ assert isinstance(selection.value, alt.expr.Expression)
+ assert selection.value.to_dict() == "{0}.value".format(selection.name)
+
+ assert isinstance(selection["value"], alt.expr.Expression)
+ assert selection["value"].to_dict() == "{0}['value']".format(selection.name)
+
+ with pytest.raises(AttributeError):
+ selection.__magic__
+
+
+@pytest.mark.parametrize("format", ["html", "json", "png", "svg", "pdf"])
+def test_save(format, basic_chart):
+ if format in ["pdf", "png"]:
+ out = io.BytesIO()
+ mode = "rb"
+ else:
+ out = io.StringIO()
+ mode = "r"
+
+ if format in ["svg", "png", "pdf"]:
+ if not altair_saver:
+ with pytest.raises(ValueError) as err:
+ basic_chart.save(out, format=format)
+ assert "github.com/altair-viz/altair_saver" in str(err.value)
+ return
+ elif format not in altair_saver.available_formats():
+ with pytest.raises(ValueError) as err:
+ basic_chart.save(out, format=format)
+ assert f"No enabled saver found that supports format='{format}'" in str(
+ err.value
+ )
+ return
+
+ basic_chart.save(out, format=format)
+ out.seek(0)
+ content = out.read()
+
+ if format == "json":
+ assert "$schema" in json.loads(content)
+ if format == "html":
+ assert content.startswith("<!DOCTYPE html>")
+
+ fid, filename = tempfile.mkstemp(suffix="." + format)
+ os.close(fid)
+
+ # test both string filenames and pathlib.Paths
+ for fp in [filename, pathlib.Path(filename)]:
+ try:
+ basic_chart.save(fp)
+ with open(fp, mode) as f:
+ assert f.read()[:1000] == content[:1000]
+ finally:
+ os.remove(fp)
+
+
+def test_facet_basic():
+ # wrapped facet
+ chart1 = (
+ alt.Chart("data.csv")
+ .mark_point()
+ .encode(
+ x="x:Q",
+ y="y:Q",
+ )
+ .facet("category:N", columns=2)
+ )
+
+ dct1 = chart1.to_dict()
+
+ assert dct1["facet"] == alt.Facet("category:N").to_dict()
+ assert dct1["columns"] == 2
+ assert dct1["data"] == alt.UrlData("data.csv").to_dict()
+
+ # explicit row/col facet
+ chart2 = (
+ alt.Chart("data.csv")
+ .mark_point()
+ .encode(
+ x="x:Q",
+ y="y:Q",
+ )
+ .facet(row="category1:Q", column="category2:Q")
+ )
+
+ dct2 = chart2.to_dict()
+
+ assert dct2["facet"]["row"] == alt.Facet("category1:Q").to_dict()
+ assert dct2["facet"]["column"] == alt.Facet("category2:Q").to_dict()
+ assert "columns" not in dct2
+ assert dct2["data"] == alt.UrlData("data.csv").to_dict()
+
+
+def test_facet_parse():
+ chart = (
+ alt.Chart("data.csv")
+ .mark_point()
+ .encode(x="x:Q", y="y:Q")
+ .facet(row="row:N", column="column:O")
+ )
+ dct = chart.to_dict()
+ assert dct["data"] == {"url": "data.csv"}
+ assert "data" not in dct["spec"]
+ assert dct["facet"] == {
+ "column": {"field": "column", "type": "ordinal"},
+ "row": {"field": "row", "type": "nominal"},
+ }
+
+
+def test_facet_parse_data():
+ data = pd.DataFrame({"x": range(5), "y": range(5), "row": list("abcab")})
+ chart = (
+ alt.Chart(data)
+ .mark_point()
+ .encode(x="x", y="y:O")
+ .facet(row="row", column="column:O")
+ )
+ with alt.data_transformers.enable(consolidate_datasets=False):
+ dct = chart.to_dict()
+ assert "values" in dct["data"]
+ assert "data" not in dct["spec"]
+ assert dct["facet"] == {
+ "column": {"field": "column", "type": "ordinal"},
+ "row": {"field": "row", "type": "nominal"},
+ }
+
+ with alt.data_transformers.enable(consolidate_datasets=True):
+ dct = chart.to_dict()
+ assert "datasets" in dct
+ assert "name" in dct["data"]
+ assert "data" not in dct["spec"]
+ assert dct["facet"] == {
+ "column": {"field": "column", "type": "ordinal"},
+ "row": {"field": "row", "type": "nominal"},
+ }
+
+
+def test_selection():
+ # test instantiation of selections
+ interval = alt.selection_interval(name="selec_1")
+ assert interval.selection.type == "interval"
+ assert interval.name == "selec_1"
+
+ single = alt.selection_single(name="selec_2")
+ assert single.selection.type == "single"
+ assert single.name == "selec_2"
+
+ multi = alt.selection_multi(name="selec_3")
+ assert multi.selection.type == "multi"
+ assert multi.name == "selec_3"
+
+ # test adding to chart
+ chart = alt.Chart().add_selection(single)
+ chart = chart.add_selection(multi, interval)
+ assert set(chart.selection.keys()) == {"selec_1", "selec_2", "selec_3"}
+
+ # test logical operations
+ assert isinstance(single & multi, alt.Selection)
+ assert isinstance(single | multi, alt.Selection)
+ assert isinstance(~single, alt.Selection)
+ assert isinstance((single & multi)[0].group, alt.SelectionAnd)
+ assert isinstance((single | multi)[0].group, alt.SelectionOr)
+ assert isinstance((~single)[0].group, alt.SelectionNot)
+
+ # test that default names increment (regression for #1454)
+ sel1 = alt.selection_single()
+ sel2 = alt.selection_multi()
+ sel3 = alt.selection_interval()
+ names = {s.name for s in (sel1, sel2, sel3)}
+ assert len(names) == 3
+
+
+def test_transforms():
+ # aggregate transform
+ agg1 = alt.AggregatedFieldDef(**{"as": "x1", "op": "mean", "field": "y"})
+ agg2 = alt.AggregatedFieldDef(**{"as": "x2", "op": "median", "field": "z"})
+ chart = alt.Chart().transform_aggregate([agg1], ["foo"], x2="median(z)")
+ kwds = dict(aggregate=[agg1, agg2], groupby=["foo"])
+ assert chart.transform == [alt.AggregateTransform(**kwds)]
+
+ # bin transform
+ chart = alt.Chart().transform_bin("binned", field="field", bin=True)
+ kwds = {"as": "binned", "field": "field", "bin": True}
+ assert chart.transform == [alt.BinTransform(**kwds)]
+
+ # calcualte transform
+ chart = alt.Chart().transform_calculate("calc", "datum.a * 4")
+ kwds = {"as": "calc", "calculate": "datum.a * 4"}
+ assert chart.transform == [alt.CalculateTransform(**kwds)]
+
+ # density transform
+ chart = alt.Chart().transform_density("x", as_=["value", "density"])
+ kwds = {"as": ["value", "density"], "density": "x"}
+ assert chart.transform == [alt.DensityTransform(**kwds)]
+
+ # filter transform
+ chart = alt.Chart().transform_filter("datum.a < 4")
+ assert chart.transform == [alt.FilterTransform(filter="datum.a < 4")]
+
+ # flatten transform
+ chart = alt.Chart().transform_flatten(["A", "B"], ["X", "Y"])
+ kwds = {"as": ["X", "Y"], "flatten": ["A", "B"]}
+ assert chart.transform == [alt.FlattenTransform(**kwds)]
+
+ # fold transform
+ chart = alt.Chart().transform_fold(["A", "B", "C"], as_=["key", "val"])
+ kwds = {"as": ["key", "val"], "fold": ["A", "B", "C"]}
+ assert chart.transform == [alt.FoldTransform(**kwds)]
+
+ # impute transform
+ chart = alt.Chart().transform_impute("field", "key", groupby=["x"])
+ kwds = {"impute": "field", "key": "key", "groupby": ["x"]}
+ assert chart.transform == [alt.ImputeTransform(**kwds)]
+
+ # joinaggregate transform
+ chart = alt.Chart().transform_joinaggregate(min="min(x)", groupby=["key"])
+ kwds = {
+ "joinaggregate": [
+ alt.JoinAggregateFieldDef(field="x", op="min", **{"as": "min"})
+ ],
+ "groupby": ["key"],
+ }
+ assert chart.transform == [alt.JoinAggregateTransform(**kwds)]
+
+ # loess transform
+ chart = alt.Chart().transform_loess("x", "y", as_=["xx", "yy"])
+ kwds = {"on": "x", "loess": "y", "as": ["xx", "yy"]}
+ assert chart.transform == [alt.LoessTransform(**kwds)]
+
+ # lookup transform (data)
+ lookup_data = alt.LookupData(alt.UrlData("foo.csv"), "id", ["rate"])
+ chart = alt.Chart().transform_lookup("a", from_=lookup_data, as_="a", default="b")
+ kwds = {"from": lookup_data, "as": "a", "lookup": "a", "default": "b"}
+ assert chart.transform == [alt.LookupTransform(**kwds)]
+
+ # lookup transform (selection)
+ lookup_selection = alt.LookupSelection(key="key", selection="sel")
+ chart = alt.Chart().transform_lookup(
+ "a", from_=lookup_selection, as_="a", default="b"
+ )
+ kwds = {"from": lookup_selection, "as": "a", "lookup": "a", "default": "b"}
+ assert chart.transform == [alt.LookupTransform(**kwds)]
+
+ # pivot transform
+ chart = alt.Chart().transform_pivot("x", "y")
+ assert chart.transform == [alt.PivotTransform(pivot="x", value="y")]
+
+ # quantile transform
+ chart = alt.Chart().transform_quantile("x", as_=["prob", "value"])
+ kwds = {"quantile": "x", "as": ["prob", "value"]}
+ assert chart.transform == [alt.QuantileTransform(**kwds)]
+
+ # regression transform
+ chart = alt.Chart().transform_regression("x", "y", as_=["xx", "yy"])
+ kwds = {"on": "x", "regression": "y", "as": ["xx", "yy"]}
+ assert chart.transform == [alt.RegressionTransform(**kwds)]
+
+ # sample transform
+ chart = alt.Chart().transform_sample()
+ assert chart.transform == [alt.SampleTransform(1000)]
+
+ # stack transform
+ chart = alt.Chart().transform_stack("stacked", "x", groupby=["y"])
+ assert chart.transform == [
+ alt.StackTransform(stack="x", groupby=["y"], **{"as": "stacked"})
+ ]
+
+ # timeUnit transform
+ chart = alt.Chart().transform_timeunit("foo", field="x", timeUnit="date")
+ kwds = {"as": "foo", "field": "x", "timeUnit": "date"}
+ assert chart.transform == [alt.TimeUnitTransform(**kwds)]
+
+ # window transform
+ chart = alt.Chart().transform_window(xsum="sum(x)", ymin="min(y)", frame=[None, 0])
+ window = [
+ alt.WindowFieldDef(**{"as": "xsum", "field": "x", "op": "sum"}),
+ alt.WindowFieldDef(**{"as": "ymin", "field": "y", "op": "min"}),
+ ]
+
+ # kwargs don't maintain order in Python < 3.6, so window list can
+ # be reversed
+ assert chart.transform == [
+ alt.WindowTransform(frame=[None, 0], window=window)
+ ] or chart.transform == [alt.WindowTransform(frame=[None, 0], window=window[::-1])]
+
+
+def test_filter_transform_selection_predicates():
+ selector1 = alt.selection_interval(name="s1")
+ selector2 = alt.selection_interval(name="s2")
+ base = alt.Chart("data.txt").mark_point()
+
+ chart = base.transform_filter(selector1)
+ assert chart.to_dict()["transform"] == [{"filter": {"selection": "s1"}}]
+
+ chart = base.transform_filter(~selector1)
+ assert chart.to_dict()["transform"] == [{"filter": {"selection": {"not": "s1"}}}]
+
+ chart = base.transform_filter(selector1 & selector2)
+ assert chart.to_dict()["transform"] == [
+ {"filter": {"selection": {"and": ["s1", "s2"]}}}
+ ]
+
+ chart = base.transform_filter(selector1 | selector2)
+ assert chart.to_dict()["transform"] == [
+ {"filter": {"selection": {"or": ["s1", "s2"]}}}
+ ]
+
+ chart = base.transform_filter(selector1 | ~selector2)
+ assert chart.to_dict()["transform"] == [
+ {"filter": {"selection": {"or": ["s1", {"not": "s2"}]}}}
+ ]
+
+ chart = base.transform_filter(~selector1 | ~selector2)
+ assert chart.to_dict()["transform"] == [
+ {"filter": {"selection": {"or": [{"not": "s1"}, {"not": "s2"}]}}}
+ ]
+
+ chart = base.transform_filter(~(selector1 & selector2))
+ assert chart.to_dict()["transform"] == [
+ {"filter": {"selection": {"not": {"and": ["s1", "s2"]}}}}
+ ]
+
+
+def test_resolve_methods():
+ chart = alt.LayerChart().resolve_axis(x="shared", y="independent")
+ assert chart.resolve == alt.Resolve(
+ axis=alt.AxisResolveMap(x="shared", y="independent")
+ )
+
+ chart = alt.LayerChart().resolve_legend(color="shared", fill="independent")
+ assert chart.resolve == alt.Resolve(
+ legend=alt.LegendResolveMap(color="shared", fill="independent")
+ )
+
+ chart = alt.LayerChart().resolve_scale(x="shared", y="independent")
+ assert chart.resolve == alt.Resolve(
+ scale=alt.ScaleResolveMap(x="shared", y="independent")
+ )
+
+
+def test_layer_encodings():
+ chart = alt.LayerChart().encode(x="column:Q")
+ assert chart.encoding.x == alt.X(shorthand="column:Q")
+
+
+def test_add_selection():
+ selections = [
+ alt.selection_interval(),
+ alt.selection_single(),
+ alt.selection_multi(),
+ ]
+ chart = (
+ alt.Chart()
+ .mark_point()
+ .add_selection(selections[0])
+ .add_selection(selections[1], selections[2])
+ )
+ expected = {s.name: s.selection for s in selections}
+ assert chart.selection == expected
+
+
+def test_repeat_add_selections():
+ base = alt.Chart("data.csv").mark_point()
+ selection = alt.selection_single()
+ chart1 = base.add_selection(selection).repeat(list("ABC"))
+ chart2 = base.repeat(list("ABC")).add_selection(selection)
+ assert chart1.to_dict() == chart2.to_dict()
+
+
+def test_facet_add_selections():
+ base = alt.Chart("data.csv").mark_point()
+ selection = alt.selection_single()
+ chart1 = base.add_selection(selection).facet("val:Q")
+ chart2 = base.facet("val:Q").add_selection(selection)
+ assert chart1.to_dict() == chart2.to_dict()
+
+
+def test_layer_add_selection():
+ base = alt.Chart("data.csv").mark_point()
+ selection = alt.selection_single()
+ chart1 = alt.layer(base.add_selection(selection), base)
+ chart2 = alt.layer(base, base).add_selection(selection)
+ assert chart1.to_dict() == chart2.to_dict()
+
+
+@pytest.mark.parametrize("charttype", [alt.concat, alt.hconcat, alt.vconcat])
+def test_compound_add_selections(charttype):
+ base = alt.Chart("data.csv").mark_point()
+ selection = alt.selection_single()
+ chart1 = charttype(base.add_selection(selection), base.add_selection(selection))
+ chart2 = charttype(base, base).add_selection(selection)
+ assert chart1.to_dict() == chart2.to_dict()
+
+
+def test_selection_property():
+ sel = alt.selection_interval()
+ chart = alt.Chart("data.csv").mark_point().properties(selection=sel)
+
+ assert list(chart["selection"].keys()) == [sel.name]
+
+
+def test_LookupData():
+ df = pd.DataFrame({"x": [1, 2, 3], "y": [4, 5, 6]})
+ lookup = alt.LookupData(data=df, key="x")
+
+ dct = lookup.to_dict()
+ assert dct["key"] == "x"
+ assert dct["data"] == {
+ "values": [{"x": 1, "y": 4}, {"x": 2, "y": 5}, {"x": 3, "y": 6}]
+ }
+
+
+def test_themes():
+ chart = alt.Chart("foo.txt").mark_point()
+
+ with alt.themes.enable("default"):
+ assert chart.to_dict()["config"] == {
+ "view": {"continuousWidth": 400, "continuousHeight": 300}
+ }
+
+ with alt.themes.enable("opaque"):
+ assert chart.to_dict()["config"] == {
+ "background": "white",
+ "view": {"continuousWidth": 400, "continuousHeight": 300},
+ }
+
+ with alt.themes.enable("none"):
+ assert "config" not in chart.to_dict()
+
+
+def test_chart_from_dict():
+ base = alt.Chart("data.csv").mark_point().encode(x="x:Q", y="y:Q")
+
+ charts = [
+ base,
+ base + base,
+ base | base,
+ base & base,
+ base.facet("c:N"),
+ (base + base).facet(row="c:N", data="data.csv"),
+ base.repeat(["c", "d"]),
+ (base + base).repeat(row=["c", "d"]),
+ ]
+
+ for chart in charts:
+ chart_out = alt.Chart.from_dict(chart.to_dict())
+ assert type(chart_out) is type(chart)
+
+ # test that an invalid spec leads to a schema validation error
+ with pytest.raises(jsonschema.ValidationError):
+ alt.Chart.from_dict({"invalid": "spec"})
+
+
+def test_consolidate_datasets(basic_chart):
+ subchart1 = basic_chart
+ subchart2 = basic_chart.copy()
+ subchart2.data = basic_chart.data.copy()
+ chart = subchart1 | subchart2
+
+ with alt.data_transformers.enable(consolidate_datasets=True):
+ dct_consolidated = chart.to_dict()
+
+ with alt.data_transformers.enable(consolidate_datasets=False):
+ dct_standard = chart.to_dict()
+
+ assert "datasets" in dct_consolidated
+ assert "datasets" not in dct_standard
+
+ datasets = dct_consolidated["datasets"]
+
+ # two dataset copies should be recognized as duplicates
+ assert len(datasets) == 1
+
+ # make sure data matches original & names are correct
+ name, data = datasets.popitem()
+
+ for spec in dct_standard["hconcat"]:
+ assert spec["data"]["values"] == data
+
+ for spec in dct_consolidated["hconcat"]:
+ assert spec["data"] == {"name": name}
+
+
+def test_consolidate_InlineData():
+ data = alt.InlineData(
+ values=[{"a": 1, "b": 1}, {"a": 2, "b": 2}], format={"type": "csv"}
+ )
+ chart = alt.Chart(data).mark_point()
+
+ with alt.data_transformers.enable(consolidate_datasets=False):
+ dct = chart.to_dict()
+ assert dct["data"]["format"] == data.format
+ assert dct["data"]["values"] == data.values
+
+ with alt.data_transformers.enable(consolidate_datasets=True):
+ dct = chart.to_dict()
+ assert dct["data"]["format"] == data.format
+ assert list(dct["datasets"].values())[0] == data.values
+
+ data = alt.InlineData(values=[], name="runtime_data")
+ chart = alt.Chart(data).mark_point()
+
+ with alt.data_transformers.enable(consolidate_datasets=False):
+ dct = chart.to_dict()
+ assert dct["data"] == data.to_dict()
+
+ with alt.data_transformers.enable(consolidate_datasets=True):
+ dct = chart.to_dict()
+ assert dct["data"] == data.to_dict()
+
+
+def test_repeat():
+ # wrapped repeat
+ chart1 = (
+ alt.Chart("data.csv")
+ .mark_point()
+ .encode(
+ x=alt.X(alt.repeat(), type="quantitative"),
+ y="y:Q",
+ )
+ .repeat(["A", "B", "C", "D"], columns=2)
+ )
+
+ dct1 = chart1.to_dict()
+
+ assert dct1["repeat"] == ["A", "B", "C", "D"]
+ assert dct1["columns"] == 2
+ assert dct1["spec"]["encoding"]["x"]["field"] == {"repeat": "repeat"}
+
+ # explicit row/col repeat
+ chart2 = (
+ alt.Chart("data.csv")
+ .mark_point()
+ .encode(
+ x=alt.X(alt.repeat("row"), type="quantitative"),
+ y=alt.Y(alt.repeat("column"), type="quantitative"),
+ )
+ .repeat(row=["A", "B", "C"], column=["C", "B", "A"])
+ )
+
+ dct2 = chart2.to_dict()
+
+ assert dct2["repeat"] == {"row": ["A", "B", "C"], "column": ["C", "B", "A"]}
+ assert "columns" not in dct2
+ assert dct2["spec"]["encoding"]["x"]["field"] == {"repeat": "row"}
+ assert dct2["spec"]["encoding"]["y"]["field"] == {"repeat": "column"}
+
+
+def test_data_property():
+ data = pd.DataFrame({"x": [1, 2, 3], "y": list("ABC")})
+ chart1 = alt.Chart(data).mark_point()
+ chart2 = alt.Chart().mark_point().properties(data=data)
+
+ assert chart1.to_dict() == chart2.to_dict()
+
+
+@pytest.mark.parametrize("method", ["layer", "hconcat", "vconcat", "concat"])
+@pytest.mark.parametrize(
+ "data", ["data.json", pd.DataFrame({"x": range(3), "y": list("abc")})]
+)
+def test_subcharts_with_same_data(method, data):
+ func = getattr(alt, method)
+
+ point = alt.Chart(data).mark_point().encode(x="x:Q", y="y:Q")
+ line = point.mark_line()
+ text = point.mark_text()
+
+ chart1 = func(point, line, text)
+ assert chart1.data is not alt.Undefined
+ assert all(c.data is alt.Undefined for c in getattr(chart1, method))
+
+ if method != "concat":
+ op = OP_DICT[method]
+ chart2 = op(op(point, line), text)
+ assert chart2.data is not alt.Undefined
+ assert all(c.data is alt.Undefined for c in getattr(chart2, method))
+
+
+@pytest.mark.parametrize("method", ["layer", "hconcat", "vconcat", "concat"])
+@pytest.mark.parametrize(
+ "data", ["data.json", pd.DataFrame({"x": range(3), "y": list("abc")})]
+)
+def test_subcharts_different_data(method, data):
+ func = getattr(alt, method)
+
+ point = alt.Chart(data).mark_point().encode(x="x:Q", y="y:Q")
+ otherdata = alt.Chart("data.csv").mark_point().encode(x="x:Q", y="y:Q")
+ nodata = alt.Chart().mark_point().encode(x="x:Q", y="y:Q")
+
+ chart1 = func(point, otherdata)
+ assert chart1.data is alt.Undefined
+ assert getattr(chart1, method)[0].data is data
+
+ chart2 = func(point, nodata)
+ assert chart2.data is alt.Undefined
+ assert getattr(chart2, method)[0].data is data
+
+
+def test_layer_facet(basic_chart):
+ chart = (basic_chart + basic_chart).facet(row="row:Q")
+ assert chart.data is not alt.Undefined
+ assert chart.spec.data is alt.Undefined
+ for layer in chart.spec.layer:
+ assert layer.data is alt.Undefined
+
+ dct = chart.to_dict()
+ assert "data" in dct
+
+
+def test_layer_errors():
+ toplevel_chart = alt.Chart("data.txt").mark_point().configure_legend(columns=2)
+
+ facet_chart1 = alt.Chart("data.txt").mark_point().encode(facet="row:Q")
+
+ facet_chart2 = alt.Chart("data.txt").mark_point().facet("row:Q")
+
+ repeat_chart = alt.Chart("data.txt").mark_point().repeat(["A", "B", "C"])
+
+ simple_chart = alt.Chart("data.txt").mark_point()
+
+ with pytest.raises(ValueError) as err:
+ toplevel_chart + simple_chart
+ assert str(err.value).startswith(
+ 'Objects with "config" attribute cannot be used within LayerChart.'
+ )
+
+ with pytest.raises(ValueError) as err:
+ repeat_chart + simple_chart
+ assert str(err.value) == "Repeat charts cannot be layered."
+
+ with pytest.raises(ValueError) as err:
+ facet_chart1 + simple_chart
+ assert str(err.value) == "Faceted charts cannot be layered."
+
+ with pytest.raises(ValueError) as err:
+ alt.layer(simple_chart) + facet_chart2
+ assert str(err.value) == "Faceted charts cannot be layered."
+
+
+@pytest.mark.parametrize(
+ "chart_type",
+ ["layer", "hconcat", "vconcat", "concat", "facet", "facet_encoding", "repeat"],
+)
+def test_resolve(chart_type):
+ chart = _make_chart_type(chart_type)
+ chart = (
+ chart.resolve_scale(
+ x="independent",
+ )
+ .resolve_legend(color="independent")
+ .resolve_axis(y="independent")
+ )
+ dct = chart.to_dict()
+ assert dct["resolve"] == {
+ "scale": {"x": "independent"},
+ "legend": {"color": "independent"},
+ "axis": {"y": "independent"},
+ }
+
+
+# TODO: test vconcat, hconcat, concat, facet_encoding when schema allows them.
+# This is blocked by https://github.com/vega/vega-lite/issues/5261
+@pytest.mark.parametrize("chart_type", ["chart", "layer"])
+@pytest.mark.parametrize("facet_arg", [None, "facet", "row", "column"])
+def test_facet(chart_type, facet_arg):
+ chart = _make_chart_type(chart_type)
+ if facet_arg is None:
+ chart = chart.facet("color:N", columns=2)
+ else:
+ chart = chart.facet(**{facet_arg: "color:N", "columns": 2})
+ dct = chart.to_dict()
+
+ assert "spec" in dct
+ assert dct["columns"] == 2
+ expected = {"field": "color", "type": "nominal"}
+ if facet_arg is None or facet_arg == "facet":
+ assert dct["facet"] == expected
+ else:
+ assert dct["facet"][facet_arg] == expected
+
+
+def test_sequence():
+ data = alt.sequence(100)
+ assert data.to_dict() == {"sequence": {"start": 0, "stop": 100}}
+
+ data = alt.sequence(5, 10)
+ assert data.to_dict() == {"sequence": {"start": 5, "stop": 10}}
+
+ data = alt.sequence(0, 1, 0.1, as_="x")
+ assert data.to_dict() == {
+ "sequence": {"start": 0, "stop": 1, "step": 0.1, "as": "x"}
+ }
+
+
+def test_graticule():
+ data = alt.graticule()
+ assert data.to_dict() == {"graticule": True}
+
+ data = alt.graticule(step=[15, 15])
+ assert data.to_dict() == {"graticule": {"step": [15, 15]}}
+
+
+def test_sphere():
+ data = alt.sphere()
+ assert data.to_dict() == {"sphere": True}
+
+
+def test_validate_dataset():
+ d = {"data": {"values": [{}]}, "mark": {"type": "point"}}
+
+ chart = alt.Chart.from_dict(d)
+ jsn = chart.to_json()
+
+ assert jsn
diff --git a/venv/lib/python3.9/site-packages/altair/vegalite/v4/tests/test_data.py b/venv/lib/python3.9/site-packages/altair/vegalite/v4/tests/test_data.py
new file mode 100644
index 00000000..8eae11c8
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vegalite/v4/tests/test_data.py
@@ -0,0 +1,33 @@
+import os
+
+import pandas as pd
+import pytest
+
+from .. import data as alt
+
+
+@pytest.fixture
+def sample_data():
+ return pd.DataFrame({"x": range(10), "y": range(10)})
+
+
+def test_disable_max_rows(sample_data):
+ with alt.data_transformers.enable("default", max_rows=5):
+ # Ensure max rows error is raised.
+ with pytest.raises(alt.MaxRowsError):
+ alt.data_transformers.get()(sample_data)
+
+ # Ensure that max rows error is properly disabled.
+ with alt.data_transformers.disable_max_rows():
+ alt.data_transformers.get()(sample_data)
+
+ try:
+ with alt.data_transformers.enable("json"):
+ # Ensure that there is no TypeError for non-max_rows transformers.
+ with alt.data_transformers.disable_max_rows():
+ jsonfile = alt.data_transformers.get()(sample_data)
+ except TypeError:
+ jsonfile = {}
+ finally:
+ if jsonfile:
+ os.remove(jsonfile["url"])
diff --git a/venv/lib/python3.9/site-packages/altair/vegalite/v4/tests/test_display.py b/venv/lib/python3.9/site-packages/altair/vegalite/v4/tests/test_display.py
new file mode 100644
index 00000000..e7ccc27f
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vegalite/v4/tests/test_display.py
@@ -0,0 +1,69 @@
+from contextlib import contextmanager
+
+import pytest
+
+import altair.vegalite.v4 as alt
+
+
+@contextmanager
+def check_render_options(**options):
+ """
+ Context manager that will assert that alt.renderers.options are equivalent
+ to the given options in the IPython.display.display call
+ """
+ import IPython.display
+
+ def check_options(obj):
+ assert alt.renderers.options == options
+
+ _display = IPython.display.display
+ IPython.display.display = check_options
+ try:
+ yield
+ finally:
+ IPython.display.display = _display
+
+
+def test_check_renderer_options():
+ # this test should pass
+ with check_render_options():
+ from IPython.display import display
+
+ display(None)
+
+ # check that an error is appropriately raised if the test fails
+ with pytest.raises(AssertionError):
+ with check_render_options(foo="bar"):
+ from IPython.display import display
+
+ display(None)
+
+
+def test_display_options():
+ chart = alt.Chart("data.csv").mark_point().encode(x="foo:Q")
+
+ # check that there are no options by default
+ with check_render_options():
+ chart.display()
+
+ # check that display options are passed
+ with check_render_options(embed_options={"tooltip": False, "renderer": "canvas"}):
+ chart.display("canvas", tooltip=False)
+
+ # check that above options do not persist
+ with check_render_options():
+ chart.display()
+
+ # check that display options augment rather than overwrite pre-set options
+ with alt.renderers.enable(embed_options={"tooltip": True, "renderer": "svg"}):
+ with check_render_options(embed_options={"tooltip": True, "renderer": "svg"}):
+ chart.display()
+
+ with check_render_options(
+ embed_options={"tooltip": True, "renderer": "canvas"}
+ ):
+ chart.display("canvas")
+
+ # check that above options do not persist
+ with check_render_options():
+ chart.display()
diff --git a/venv/lib/python3.9/site-packages/altair/vegalite/v4/tests/test_geo_interface.py b/venv/lib/python3.9/site-packages/altair/vegalite/v4/tests/test_geo_interface.py
new file mode 100644
index 00000000..b637b28f
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vegalite/v4/tests/test_geo_interface.py
@@ -0,0 +1,204 @@
+import pytest
+import altair.vegalite.v4 as alt
+
+
+def geom_obj(geom):
+ class Geom(object):
+ pass
+
+ geom_obj = Geom()
+ setattr(geom_obj, "__geo_interface__", geom)
+ return geom_obj
+
+
+# correct translation of Polygon geometry to Feature type
+def test_geo_interface_polygon_feature():
+ geom = {
+ "coordinates": [[(0, 0), (0, 2), (2, 2), (2, 0), (0, 0)]],
+ "type": "Polygon",
+ }
+ feat = geom_obj(geom)
+
+ with alt.data_transformers.enable(consolidate_datasets=False):
+ spec = alt.Chart(feat).mark_geoshape().to_dict()
+ assert spec["data"]["values"]["type"] == "Feature"
+
+
+# merge geometry with empty properties dictionary
+def test_geo_interface_removal_empty_properties():
+ geom = {
+ "geometry": {
+ "coordinates": [
+ [[6.90, 53.48], [5.98, 51.85], [6.07, 53.51], [6.90, 53.48]]
+ ],
+ "type": "Polygon",
+ },
+ "id": None,
+ "properties": {},
+ "type": "Feature",
+ }
+ feat = geom_obj(geom)
+
+ with alt.data_transformers.enable(consolidate_datasets=False):
+ spec = alt.Chart(feat).mark_geoshape().to_dict()
+ assert spec["data"]["values"]["type"] == "Feature"
+
+
+# only register metadata in the properties member
+def test_geo_interface_register_foreign_member():
+ geom = {
+ "geometry": {
+ "coordinates": [
+ [[6.90, 53.48], [5.98, 51.85], [6.07, 53.51], [6.90, 53.48]]
+ ],
+ "type": "Polygon",
+ },
+ "id": 2,
+ "properties": {"foo": "bah"},
+ "type": "Feature",
+ }
+ feat = geom_obj(geom)
+
+ with alt.data_transformers.enable(consolidate_datasets=False):
+ spec = alt.Chart(feat).mark_geoshape().to_dict()
+ with pytest.raises(KeyError):
+ spec["data"]["values"]["id"]
+ assert spec["data"]["values"]["foo"] == "bah"
+
+
+# correct serializing of arrays and nested tuples
+def test_geo_interface_serializing_arrays_tuples():
+ import array as arr
+
+ geom = {
+ "bbox": arr.array("d", [1, 2, 3, 4]),
+ "geometry": {
+ "coordinates": [
+ tuple(
+ (
+ tuple((6.90, 53.48)),
+ tuple((5.98, 51.85)),
+ tuple((6.07, 53.51)),
+ tuple((6.90, 53.48)),
+ )
+ )
+ ],
+ "type": "Polygon",
+ },
+ "id": 27,
+ "properties": {},
+ "type": "Feature",
+ }
+ feat = geom_obj(geom)
+
+ with alt.data_transformers.enable(consolidate_datasets=False):
+ spec = alt.Chart(feat).mark_geoshape().to_dict()
+ assert spec["data"]["values"]["geometry"]["coordinates"][0][0] == [6.9, 53.48]
+
+
+# overwrite existing 'type' value in properties with `Feature`
+def test_geo_interface_reserved_members():
+ geom = {
+ "geometry": {
+ "coordinates": [
+ [[6.90, 53.48], [5.98, 51.85], [6.07, 53.51], [6.90, 53.48]]
+ ],
+ "type": "Polygon",
+ },
+ "id": 27,
+ "properties": {"type": "foo"},
+ "type": "Feature",
+ }
+ feat = geom_obj(geom)
+
+ with alt.data_transformers.enable(consolidate_datasets=False):
+ spec = alt.Chart(feat).mark_geoshape().to_dict()
+ assert spec["data"]["values"]["type"] == "Feature"
+
+
+# an empty FeatureCollection is valid
+def test_geo_interface_empty_feature_collection():
+ geom = {"type": "FeatureCollection", "features": []}
+ feat = geom_obj(geom)
+
+ with alt.data_transformers.enable(consolidate_datasets=False):
+ spec = alt.Chart(feat).mark_geoshape().to_dict()
+ assert spec["data"]["values"] == []
+
+
+# Features in a FeatureCollection only keep properties and geometry
+def test_geo_interface_feature_collection():
+ geom = {
+ "type": "FeatureCollection",
+ "features": [
+ {
+ "geometry": {
+ "coordinates": [
+ [[6.90, 53.48], [5.98, 51.85], [6.07, 53.51], [6.90, 53.48]]
+ ],
+ "type": "Polygon",
+ },
+ "id": 27,
+ "properties": {"type": "foo", "id": 1, "geometry": 1},
+ "type": "Feature",
+ },
+ {
+ "geometry": {
+ "coordinates": [
+ [[8.90, 53.48], [7.98, 51.85], [8.07, 53.51], [8.90, 53.48]]
+ ],
+ "type": "Polygon",
+ },
+ "id": 28,
+ "properties": {"type": "foo", "id": 2, "geometry": 1},
+ "type": "Feature",
+ },
+ ],
+ }
+ feat = geom_obj(geom)
+
+ with alt.data_transformers.enable(consolidate_datasets=False):
+ spec = alt.Chart(feat).mark_geoshape().to_dict()
+ assert spec["data"]["values"][0]["id"] == 1
+ assert spec["data"]["values"][1]["id"] == 2
+ assert "coordinates" in spec["data"]["values"][0]["geometry"]
+ assert "coordinates" in spec["data"]["values"][1]["geometry"]
+ assert spec["data"]["values"][0]["type"] == "Feature"
+ assert spec["data"]["values"][1]["type"] == "Feature"
+
+
+# typical output of a __geo_interface__ from geopandas GeoDataFrame
+# notic that the index value is registerd as a commonly used identifier
+# with the name "id" (in this case 49). Similar to serialization of a
+# pandas DataFrame is the index not included in the output
+def test_geo_interface_feature_collection_gdf():
+ geom = {
+ "bbox": (19.89, -26.82, 29.43, -17.66),
+ "features": [
+ {
+ "bbox": (19.89, -26.82, 29.43, -17.66),
+ "geometry": {
+ "coordinates": [
+ [[6.90, 53.48], [5.98, 51.85], [6.07, 53.51], [6.90, 53.48]]
+ ],
+ "type": "Polygon",
+ },
+ "id": "49",
+ "properties": {
+ "continent": "Africa",
+ "gdp_md_est": 35900.0,
+ "id": "BWA",
+ "iso_a3": "BWA",
+ "name": "Botswana",
+ "pop_est": 2214858,
+ },
+ "type": "Feature",
+ }
+ ],
+ "type": "FeatureCollection",
+ }
+ feat = geom_obj(geom)
+
+ with alt.data_transformers.enable(consolidate_datasets=False):
+ spec = alt.Chart(feat).mark_geoshape().to_dict()
+ assert spec["data"]["values"][0]["id"] == "BWA"
diff --git a/venv/lib/python3.9/site-packages/altair/vegalite/v4/tests/test_renderers.py b/venv/lib/python3.9/site-packages/altair/vegalite/v4/tests/test_renderers.py
new file mode 100644
index 00000000..55c5e4ff
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vegalite/v4/tests/test_renderers.py
@@ -0,0 +1,65 @@
+"""Tests of various renderers"""
+
+import json
+
+import pytest
+
+import altair.vegalite.v4 as alt
+
+
+@pytest.fixture
+def chart():
+ return alt.Chart("data.csv").mark_point()
+
+
+def test_html_renderer_embed_options(chart, renderer="html"):
+ """Test that embed_options in renderer metadata are correctly manifest in html"""
+ # Short of parsing the javascript, it's difficult to parse out the
+ # actions. So we use string matching
+
+ def assert_has_options(chart, **opts):
+ html = chart._repr_mimebundle_(None, None)["text/html"]
+ for key, val in opts.items():
+ assert json.dumps({key: val})[1:-1] in html
+
+ with alt.renderers.enable(renderer):
+ assert_has_options(chart, mode="vega-lite")
+
+ with alt.renderers.enable(embed_options=dict(actions={"export": True})):
+ assert_has_options(chart, mode="vega-lite", actions={"export": True})
+
+ with alt.renderers.set_embed_options(actions=True):
+ assert_has_options(chart, mode="vega-lite", actions=True)
+
+
+def test_mimetype_renderer_embed_options(chart, renderer="mimetype"):
+ # check that metadata is passed appropriately
+ mimetype = alt.display.VEGALITE_MIME_TYPE
+ spec = chart.to_dict()
+ with alt.renderers.enable(renderer):
+ # Sanity check: no metadata specified
+ bundle, metadata = chart._repr_mimebundle_(None, None)
+ assert bundle[mimetype] == spec
+ assert metadata == {}
+ with alt.renderers.set_embed_options(actions=False):
+ bundle, metadata = chart._repr_mimebundle_(None, None)
+ assert set(bundle.keys()) == {mimetype, "text/plain"}
+ assert bundle[mimetype] == spec
+ assert metadata == {mimetype: {"embed_options": {"actions": False}}}
+
+
+def test_json_renderer_embed_options(chart, renderer="json"):
+ """Test that embed_options in renderer metadata are correctly manifest in html"""
+ mimetype = "application/json"
+ spec = chart.to_dict()
+ with alt.renderers.enable(renderer):
+ # Sanity check: no options specified
+ bundle, metadata = chart._repr_mimebundle_(None, None)
+ assert bundle[mimetype] == spec
+ assert metadata == {}
+
+ with alt.renderers.enable(option="foo"):
+ bundle, metadata = chart._repr_mimebundle_(None, None)
+ assert set(bundle.keys()) == {mimetype, "text/plain"}
+ assert bundle[mimetype] == spec
+ assert metadata == {mimetype: {"option": "foo"}}
diff --git a/venv/lib/python3.9/site-packages/altair/vegalite/v4/tests/test_theme.py b/venv/lib/python3.9/site-packages/altair/vegalite/v4/tests/test_theme.py
new file mode 100644
index 00000000..d159d2fa
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vegalite/v4/tests/test_theme.py
@@ -0,0 +1,19 @@
+import pytest
+
+import altair.vegalite.v4 as alt
+from altair.vegalite.v4.theme import VEGA_THEMES
+
+
+@pytest.fixture
+def chart():
+ return alt.Chart("data.csv").mark_bar().encode(x="x:Q")
+
+
+def test_vega_themes(chart):
+ for theme in VEGA_THEMES:
+ with alt.themes.enable(theme):
+ dct = chart.to_dict()
+ assert dct["usermeta"] == {"embedOptions": {"theme": theme}}
+ assert dct["config"] == {
+ "view": {"continuousWidth": 400, "continuousHeight": 300}
+ }
diff --git a/venv/lib/python3.9/site-packages/altair/vegalite/v4/theme.py b/venv/lib/python3.9/site-packages/altair/vegalite/v4/theme.py
new file mode 100644
index 00000000..b1db4577
--- /dev/null
+++ b/venv/lib/python3.9/site-packages/altair/vegalite/v4/theme.py
@@ -0,0 +1,56 @@
+"""Tools for enabling and registering chart themes"""
+
+from ...utils.theme import ThemeRegistry
+
+VEGA_THEMES = [
+ "ggplot2",
+ "quartz",
+ "vox",
+ "fivethirtyeight",
+ "dark",
+ "latimes",
+ "urbaninstitute",
+]
+
+
+class VegaTheme(object):
+ """Implementation of a builtin vega theme."""
+
+ def __init__(self, theme):
+ self.theme = theme
+
+ def __call__(self):
+ return {
+ "usermeta": {"embedOptions": {"theme": self.theme}},
+ "config": {"view": {"continuousWidth": 400, "continuousHeight": 300}},
+ }
+
+ def __repr__(self):
+ return "VegaTheme({!r})".format(self.theme)
+
+
+# The entry point group that can be used by other packages to declare other
+# renderers that will be auto-detected. Explicit registration is also
+# allowed by the PluginRegistery API.
+ENTRY_POINT_GROUP = "altair.vegalite.v4.theme" # type: str
+themes = ThemeRegistry(entry_point_group=ENTRY_POINT_GROUP)
+
+themes.register(
+ "default",
+ lambda: {"config": {"view": {"continuousWidth": 400, "continuousHeight": 300}}},
+)
+themes.register(
+ "opaque",
+ lambda: {
+ "config": {
+ "background": "white",
+ "view": {"continuousWidth": 400, "continuousHeight": 300},
+ }
+ },
+)
+themes.register("none", lambda: {})
+
+for theme in VEGA_THEMES:
+ themes.register(theme, VegaTheme(theme))
+
+themes.enable("default")