Skip to content

Commit

Permalink
[Doc] Add integers to four digit year format example
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiaLingWeng committed Oct 6, 2023
1 parent 505ff69 commit c3c419f
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions doc/user_guide/encodings/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -534,18 +534,6 @@ While the above examples show sorting of axes by specifying ``sort`` in the
Here the y-axis is sorted reverse-alphabetically, while the color legend is
sorted in the specified order, beginning with ``'Morris'``.

Here is another example using :class:`EncodingSortField` class to sort color legend.
By specifying ``field``, ``op`` and ``order``, the legend can be sorted based on chosen data field.

.. altair-plot::

alt.Chart(barley).mark_rect().encode(
alt.X('mean(yield):Q').sort('ascending'),
alt.Y('site:N').sort('x'),
color=alt.Color('site',
sort=alt.EncodingSortField(field='yield', op='mean', order='ascending'))
)

Datum and Value
~~~~~~~~~~~~~~~

Expand Down

0 comments on commit c3c419f

Please sign in to comment.