Skip to content
This repository has been archived by the owner on Dec 10, 2021. It is now read-only.

feat: add sort by metric for charts with multiple metrics #952

Merged
merged 3 commits into from
Feb 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,18 @@ const config: ControlPanelConfig = {
['secondary_metric'],
['adhoc_filters'],
['limit', 'row_limit'],
['timeseries_limit_metric'],
[
{
name: 'order_desc',
config: {
type: 'CheckboxControl',
label: t('Sort Descending'),
default: true,
description: t('Whether to sort descending or ascending'),
},
},
],
],
},
{
Expand Down
12 changes: 12 additions & 0 deletions plugins/legacy-plugin-chart-pivot-table/src/controlPanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,18 @@ const config: ControlPanelConfig = {
['groupby'],
['columns'],
['row_limit', null],
['timeseries_limit_metric'],
[
{
name: 'order_desc',
config: {
type: 'CheckboxControl',
label: t('Sort Descending'),
default: true,
description: t('Whether to sort descending or ascending'),
},
},
],
],
},
{
Expand Down
19 changes: 18 additions & 1 deletion plugins/legacy-plugin-chart-treemap/src/controlPanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,24 @@ const config: ControlPanelConfig = {
{
label: t('Query'),
expanded: true,
controlSetRows: [['metrics'], ['adhoc_filters'], ['groupby'], ['row_limit']],
controlSetRows: [
['metrics'],
['adhoc_filters'],
['groupby'],
['row_limit'],
['timeseries_limit_metric'],
[
{
name: 'order_desc',
config: {
type: 'CheckboxControl',
label: t('Sort Descending'),
default: true,
description: t('Whether to sort descending or ascending'),
},
},
],
],
},
{
label: t('Chart Options'),
Expand Down