Skip to content

Commit 680e79c

Browse files
(DOCSP-10697): As an author, I can create a donut chart from multiple aggregation fields (#369)
* (DOCSP-10697): As an author, I can create a donut chart from multiple aggregation fields * Cleanup * Copy review
1 parent d4e5b28 commit 680e79c

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

source/chart-type-reference/donut-chart.txt

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ Donut charts provide the following :ref:`encoding channels
4444
based on the aggregation method selected. This field dictates
4545
the size of each circle segment.
4646

47+
If you don't add a field to the :guilabel:`Label` channel, you
48+
can add multiple fields to the :guilabel:`Arc` channel. |charts|
49+
creates one segment for each encoded field.
50+
4751
Use Cases
4852
---------
4953

@@ -98,7 +102,7 @@ counts of the three different purchase methods the store provides:
98102

99103
.. figure:: /images/charts/donut-chart-store-example.png
100104
:figwidth: 750px
101-
:alt: Donut Chart Example
105+
:alt: Donut Chart Using Count Example
102106

103107
The :guilabel:`Label` field of ``purchaseMethod`` tells |charts| to
104108
create a circle segment for each unique value in the ``purchaseMethod``
@@ -128,7 +132,7 @@ performing each exercise activity:
128132

129133
.. figure:: /images/charts/donut-chart-workout-example.png
130134
:figwidth: 750px
131-
:alt: Donut Chart Example
135+
:alt: Donut Chart Using Sum Example
132136

133137
The :guilabel:`Label` field of ``Activity Type`` tells |charts| to
134138
create a circle segment for each unique value in the ``Activity Type``
@@ -140,4 +144,22 @@ documents with the same ``Activity Type`` value.
140144
We see based on the visualization that the activity with the greatest
141145
total workout time is ``Surf``, followed by ``Bike Ride``.
142146

147+
Donut Chart Using Multiple Arc Fields
148+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
149+
150+
The following chart vizualizes rental property data. Each
151+
document in the collection represents a single rental property, which
152+
includes information on prices. This donut chart shows the average price
153+
of all properties in the collection for a daily, weekly, and monthly
154+
rental:
143155

156+
.. figure:: /images/charts/donut-chart-airbnb-example.png
157+
:figwidth: 750px
158+
:alt: Donut Chart Multiple Arc Fields Example
159+
160+
Because there is no :guilabel:`Label` field, |charts| creates a circle
161+
segment for each :guilabel:`Arc` field. |charts| proportions each
162+
segment according to the aggregated value signified in the
163+
:guilabel:`Arc` encoding channel. In this case, we aggregate the
164+
:guilabel:`mean` price for all properties rented by the day, week, and
165+
month.
Loading

0 commit comments

Comments
 (0)