You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
:alt:This screenshot shows a list chart illustrating the number of active hosts per AWS EC2 instance type.
100
100
101
-
Sorting list charts
101
+
Sort list charts
102
102
-------------------
103
103
104
-
The API lets you sort values in list charts by specifying the ``options.sortBy`` property in the request to create or update a chart.
105
-
You can sort on one of the dimensions in the MTS for the chart, a data point, the metric name, or the ``publish()`` method ``label`` argument of the SignalFlow statement that generates the data. To choose one of these options, specify one of the keyword values shown in the following table:
106
-
107
-
.. list-table::
108
-
:header-rows: 1
109
-
:widths: 10 40 50
110
-
111
-
* - :strong:`Keyword`
112
-
- :strong:`Alias in the user interface`
113
-
- :strong:`Description`
114
-
115
-
* - ``<dimension-name>``
116
-
- Dimension name
117
-
- One of the dimensions of the displayed MTS. To see the available dimensions, follow the instructions following this table.
118
-
119
-
* - ``sf_metric``
120
-
- Plot name
121
-
- The ``label`` argument of the SignalFlow ``publish()`` that provides the displayed data. This is also the plot name of the corresponding signal in the user interface.
122
-
123
-
* - ``sf_originatingMetric``
124
-
- Metric
125
-
- Name of the metric for the displayed MTS.
126
-
127
-
* - ``value``
128
-
- Value
129
-
- Value of the data point when Splunk Observability Cloud receives it.
130
-
131
-
In addition, you can sort by any dimension of an MTS displayed in the chart.
132
-
133
-
To see a list of entities on which you can sort:
134
-
135
-
#. In the user interface, open the chart.
136
-
#. Select the :strong:`Chart options` tab.
137
-
#. Open the :strong:`Sort` dropdown list. In the list, :strong:`Value` is the alias for ``value``, :strong:`Plot name` is the alias for ``sf_metric``, and :strong:`Metric` is the alias for ``sf_originatingMetric``. All other list items are dimension names.
138
-
139
-
140
-
141
-
Examples
142
-
++++++++++
143
-
144
-
To sort a list chart by value, specify the following in the request body:
145
-
146
-
.. code-block::
147
-
148
-
{
149
-
options: {
150
-
"sortBy": "value",
151
-
...
152
-
}
153
-
}
154
-
155
-
156
-
To sort by plot name, specify the following:
157
-
158
-
.. code-block::
159
-
160
-
{
161
-
options: {
162
-
"sortBy": "sf_metric",
163
-
...
164
-
}
165
-
}
166
-
167
-
To sort by the dimension ``demo_datacenter``, specify the following:
168
-
169
-
.. code-block::
170
-
171
-
{
172
-
options: {
173
-
"sortBy": "demo_datacenter",
174
-
...
175
-
}
176
-
}
177
-
178
-
179
-
.. note::
180
-
Splunk Observability Cloud doesn't guarantee the sort order of identical values in the input stream.
104
+
You can sort a list chart using the API. For more information, see the :new-page:`Sort a list chart <https://dev.splunk.com/observability/docs/chartsdashboards/charts_overview#Sort-a-list-chart>` section in the `Splunk Observability Cloud Developer Guide`.
0 commit comments