Skip to content

Commit

Permalink
fix(legacy-preset-chart-nvd3): dual line dnd control missing (#1259)
Browse files Browse the repository at this point in the history
  • Loading branch information
kgabryje authored and zhaoyongjie committed Nov 26, 2021
1 parent e92b8ef commit 072e494
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ export const dnd_adhoc_metric: SharedControlConfig<'DndMetricSelect'> = {
description: t('Metric'),
};

export const dnd_adhoc_metric_2: SharedControlConfig<'DndMetricSelect'> = {
...dnd_adhoc_metric,
label: t('Right Axis Metric'),
description: t('Choose a metric for right axis'),
};

export const dnd_sort_by: SharedControlConfig<'DndMetricSelect'> = {
type: 'DndMetricSelect',
label: t('Sort by'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ import {
dndEntity,
dndGroupByControl,
dndSeries,
dnd_adhoc_metric_2,
} from './dndControls';

const categoricalSchemeRegistry = getCategoricalSchemeRegistry();
Expand Down Expand Up @@ -470,7 +471,7 @@ const sharedControls = {
datasource: datasourceControl,
viz_type,
color_picker,
metric_2,
metric_2: enableExploreDnd ? dnd_adhoc_metric_2 : metric_2,
linear_color_scheme,
secondary_metric: enableExploreDnd ? dnd_secondary_metric : secondary_metric,
groupby: enableExploreDnd ? dndGroupByControl : groupByControl,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ const config: ControlPanelConfig = {
{
label: t('Y Axis 1'),
expanded: true,
controlSetRows: [['metric', 'y_axis_format'], [yAxisShowMinmax], [yAxisBounds]],
controlSetRows: [['metric'], ['y_axis_format'], [yAxisShowMinmax], [yAxisBounds]],
},
{
label: t('Y Axis 2'),
expanded: true,
controlSetRows: [['metric_2', yAxis2Format], [yAxis2ShowMinmax], [yAxis2Bounds]],
controlSetRows: [['metric_2'], [yAxis2Format], [yAxis2ShowMinmax], [yAxis2Bounds]],
},
{
label: t('Query'),
Expand Down

0 comments on commit 072e494

Please sign in to comment.