Skip to content

Commit bfbfed9

Browse files
steverenjeff-allen-mongo
authored andcommitted
DOCSP-11788: [Charts] As an author, I can filter dates to a current time period (#407)
1 parent b639ac6 commit bfbfed9

File tree

2 files changed

+67
-2
lines changed

2 files changed

+67
-2
lines changed

source/filter-chart-results.txt

Lines changed: 67 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,17 @@ options. You can filter fields with the following data types:
139139
relative to the time the chart is rendered (e.g., the last six
140140
months).
141141

142+
- A date range based on the current time when the chart is rendered,
143+
with a choice of periods.
144+
142145
- An absolute date range, which is a range
143146
between specific begin and end dates.
144147

145148
Select the appropriate tab for more information on the date filter:
146149

147150
.. tabs::
148151

149-
.. tab:: Relative Date Filter
152+
.. tab:: Relative
150153
:tabid: relative-date
151154

152155
Relative date filters specify a range relative to the
@@ -181,7 +184,69 @@ options. You can filter fields with the following data types:
181184
:scale: 70%
182185
:alt: Image showing relative date filter
183186

184-
.. tab:: Absolute Date Filter
187+
.. tab:: Period
188+
:tabid: period-date
189+
190+
Period date filters specify a range relative to the current
191+
time when the chart is rendered. To define an period date range,
192+
select :guilabel:`Period` at the top of your date filter card.
193+
194+
Period options include:
195+
196+
- Hour (from the top of the hour)
197+
- Day (from midnight)
198+
- Week (from midnight Sunday)
199+
- Month (from midnight on the 1st of the month)
200+
- Year (from midnight on the 1st of January)
201+
202+
The Period date filter has two usage options:
203+
204+
- **Current**. The start date is the beginning of the selected
205+
period before the current time, and the end date is the
206+
end of the selected period. For example, the :guilabel:`Month`
207+
option includes only data from the current month, starting at
208+
midnight on the first day of the month and extending until
209+
the last day of the month.
210+
211+
- **Previous**. The start date is the beginning of the previous
212+
period, and the end date is the start of the most recent
213+
period before the current time. For example, the :guilabel:`Day`
214+
option includes only data from the day before the current day
215+
up until midnight of the current day.
216+
217+
.. list-table::
218+
:header-rows: 1
219+
220+
* - To use the **Current** option:
221+
- To use the **Previous** option:
222+
223+
* - 1. Select :guilabel:`Current` from the left dropdown
224+
menu.
225+
226+
#. Choose a time period from the right dropdown menu.
227+
Chart data is restricted to the time period from
228+
the beginning of the selected period to the end of
229+
the selected period.
230+
231+
- 1. Select :guilabel:`Previous` from the left dropdown
232+
menu.
233+
234+
#. Choose a time period from the right dropdown menu.
235+
Chart data is restricted to the time period from
236+
the beginning of the selected period to the beginning
237+
of the next period after the selected one.
238+
239+
.. example::
240+
241+
The following period date filter only shows documents
242+
with a ``released`` field that is in the current week,
243+
starting from midnight of the most recent Sunday.
244+
245+
.. figure:: /images/charts/period-date.png
246+
:scale: 70%
247+
:alt: Image showing period date filter
248+
249+
.. tab:: Absolute
185250
:tabid: absolute-date
186251

187252
Absolute date filters use absolute dates to define their upper and lower

source/images/charts/period-date.png

50.9 KB
Loading

0 commit comments

Comments
 (0)