Skip to content

Commit

Permalink
docs(example): add example
Browse files Browse the repository at this point in the history
  • Loading branch information
kanitw committed Jul 6, 2023
1 parent 17646fb commit 039ed1f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion site/docs/encoding/scale.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ bar, image, rect, and rule marks while `"point"` is the default scales for all o

By default, a scale in Vega-Lite draws domain values directly from a channel's encoded field. Users can specify the `domain` property of a scale to customize its domain values. To sort the order of the domain of the encoded, the [`sort`](sort.html) property of a [field definition](encoding.html#field-def) can be specified.

{% include table.html props="domain,domainMax,domainMin,domainMid" source="Scale" %}
{% include table.html props="domain,domainMax,domainMin,domainMid,domainRaw" source="Scale" %}

A common use case for the `domain` property is to limit, for example, the `x` range of values to include in a plot. However, setting the domain property alone is insufficient to achieve the desired effect.

Expand All @@ -101,6 +101,11 @@ There are two approaches to keep the mark from being plotted outside the desired

<div class="vl-example" data-name="line_inside_domain_using_transform"></div>


### Example: Using `domainRaw` to bind domain interactively

<div class="vl-example" data-name="interactive_point_domainRaw_binding"></div>

<!--
#### Example: Custom Domain
TODO: Custom Domain for quantitative / discrete scales
Expand Down

0 comments on commit 039ed1f

Please sign in to comment.