mirror of https://github.com/apache/superset.git
Migrating horizon controls (#9368)
* migrating unique controls
* linting ✨
This commit is contained in:
parent
b12188ec80
commit
9fcdc93c06
|
@ -1119,7 +1119,6 @@ Note the `y_axis_format` is defined under various section for some charts.
|
||||||
| `flt_op_1` | _N/A_ | |
|
| `flt_op_1` | _N/A_ | |
|
||||||
| `goto_dash` | _N/A_ | |
|
| `goto_dash` | _N/A_ | |
|
||||||
| `grid_size` | _N/A_ | |
|
| `grid_size` | _N/A_ | |
|
||||||
| `horizon_color_scale` | _N/A_ | |
|
|
||||||
| `import_time` | _N/A_ | |
|
| `import_time` | _N/A_ | |
|
||||||
| `instant_filtering` | _N/A_ | |
|
| `instant_filtering` | _N/A_ | |
|
||||||
| `js_agg_function` | _N/A_ | |
|
| `js_agg_function` | _N/A_ | |
|
||||||
|
@ -1182,7 +1181,6 @@ Note the `y_axis_format` is defined under various section for some charts.
|
||||||
| `schema` | _N/A_ | |
|
| `schema` | _N/A_ | |
|
||||||
| `select_country` | _N/A_ | |
|
| `select_country` | _N/A_ | |
|
||||||
| `series` | _N/A_ | |
|
| `series` | _N/A_ | |
|
||||||
| `series_height` | _N/A_ | |
|
|
||||||
| `show_bar_value` | _N/A_ | |
|
| `show_bar_value` | _N/A_ | |
|
||||||
| `show_brush` | _N/A_ | |
|
| `show_brush` | _N/A_ | |
|
||||||
| `show_bubbles` | _N/A_ | |
|
| `show_bubbles` | _N/A_ | |
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
*/
|
*/
|
||||||
import { t } from '@superset-ui/translation';
|
import { t } from '@superset-ui/translation';
|
||||||
import { NVD3TimeSeries } from './sections';
|
import { NVD3TimeSeries } from './sections';
|
||||||
|
import { formatSelectOptions } from '../../modules/utils';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
controlPanelSections: [
|
controlPanelSections: [
|
||||||
|
@ -25,7 +26,48 @@ export default {
|
||||||
{
|
{
|
||||||
label: t('Chart Options'),
|
label: t('Chart Options'),
|
||||||
expanded: true,
|
expanded: true,
|
||||||
controlSetRows: [['series_height', 'horizon_color_scale']],
|
controlSetRows: [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
name: 'series_height',
|
||||||
|
config: {
|
||||||
|
type: 'SelectControl',
|
||||||
|
renderTrigger: true,
|
||||||
|
freeForm: true,
|
||||||
|
label: t('Series Height'),
|
||||||
|
default: '25',
|
||||||
|
choices: formatSelectOptions([
|
||||||
|
'10',
|
||||||
|
'25',
|
||||||
|
'40',
|
||||||
|
'50',
|
||||||
|
'75',
|
||||||
|
'100',
|
||||||
|
'150',
|
||||||
|
'200',
|
||||||
|
]),
|
||||||
|
description: t('Pixel height of each series'),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'horizon_color_scale',
|
||||||
|
config: {
|
||||||
|
type: 'SelectControl',
|
||||||
|
renderTrigger: true,
|
||||||
|
label: t('Value Domain'),
|
||||||
|
choices: [
|
||||||
|
['series', 'series'],
|
||||||
|
['overall', 'overall'],
|
||||||
|
['change', 'change'],
|
||||||
|
],
|
||||||
|
default: 'series',
|
||||||
|
description: t(
|
||||||
|
'series: Treat each series independently; overall: All series use the same scale; change: Show changes compared to the first data point in each series',
|
||||||
|
),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
|
@ -381,21 +381,6 @@ export const controls = {
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
|
||||||
horizon_color_scale: {
|
|
||||||
type: 'SelectControl',
|
|
||||||
renderTrigger: true,
|
|
||||||
label: t('Value Domain'),
|
|
||||||
choices: [
|
|
||||||
['series', 'series'],
|
|
||||||
['overall', 'overall'],
|
|
||||||
['change', 'change'],
|
|
||||||
],
|
|
||||||
default: 'series',
|
|
||||||
description: t(
|
|
||||||
'series: Treat each series independently; overall: All series use the same scale; change: Show changes compared to the first data point in each series',
|
|
||||||
),
|
|
||||||
},
|
|
||||||
|
|
||||||
autozoom: {
|
autozoom: {
|
||||||
type: 'CheckboxControl',
|
type: 'CheckboxControl',
|
||||||
label: t('Auto Zoom'),
|
label: t('Auto Zoom'),
|
||||||
|
@ -1065,25 +1050,6 @@ export const controls = {
|
||||||
description: t('Suffix to apply after the percentage display'),
|
description: t('Suffix to apply after the percentage display'),
|
||||||
},
|
},
|
||||||
|
|
||||||
series_height: {
|
|
||||||
type: 'SelectControl',
|
|
||||||
renderTrigger: true,
|
|
||||||
freeForm: true,
|
|
||||||
label: t('Series Height'),
|
|
||||||
default: '25',
|
|
||||||
choices: formatSelectOptions([
|
|
||||||
'10',
|
|
||||||
'25',
|
|
||||||
'40',
|
|
||||||
'50',
|
|
||||||
'75',
|
|
||||||
'100',
|
|
||||||
'150',
|
|
||||||
'200',
|
|
||||||
]),
|
|
||||||
description: t('Pixel height of each series'),
|
|
||||||
},
|
|
||||||
|
|
||||||
x_axis_format: {
|
x_axis_format: {
|
||||||
type: 'SelectControl',
|
type: 'SelectControl',
|
||||||
freeForm: true,
|
freeForm: true,
|
||||||
|
|
Loading…
Reference in New Issue