@@ -268,15 +268,50 @@ chart type:
268
268
Sort Data
269
269
---------
270
270
271
- By default, |charts-short| sorts data based on the :guilabel:`Value`
272
- field in descending order.
271
+ Use the :guilabel:`Sort By` dropdown in the Chart Builder to sort
272
+ chart data by either:
273
273
274
- Use the :guilabel:`Sort By` dropdown in the Chart Builder to sort by
275
- either the :guilabel:`Category` field or aggregated value.
274
+ - Category
275
+ - Value
276
+ - Series field (for :ref:`multi-series charts <multi-series-charts>`)
277
+
278
+ If you sort a multi-series chart generically by :guilabel:`Value`
279
+ without sorting by a specific series, |charts| sorts your data based on
280
+ the sum of all values in your series.
276
281
277
282
To toggle between ascending or descending sort order, click the ``a-z``
278
283
button to the right of the :guilabel:`Sort By` dropdown.
279
284
285
+ By default, |charts-short| sorts data based on :guilabel:`Value`
286
+ in descending order.
287
+
288
+ Sort Multi-Series Charts by Series Value
289
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
290
+
291
+ If you create a :ref:`multi-series chart <multi-series-charts>` using a
292
+ different field per series, you can sort the chart by a specific series
293
+ field.
294
+
295
+ .. example::
296
+
297
+ The following charts use the :ref:`Sample Data: Movies <sample-data>`
298
+ data source to compare the mean number of ``fresh`` and ``rotten``
299
+ Rotten Tomato ratings for movies in each genre.
300
+
301
+ This chart is sorted by the mean ``fresh`` value in descending
302
+ order:
303
+
304
+ .. figure:: /images/charts/sort-by-series-fresh-desc.png
305
+ :figwidth: 550px
306
+ :alt: Chart sorted by fresh rating in descending order
307
+
308
+ This chart is sorted by the mean ``rotten`` value in ascending
309
+ order:
310
+
311
+ .. figure:: /images/charts/sort-by-series-rotten-asc.png
312
+ :figwidth: 550px
313
+ :alt: Chart sorted by rotten rating in ascending order
314
+
280
315
.. _charts-limit-data:
281
316
282
317
Limit Data
0 commit comments