mirror of
https://github.com/apache/superset.git
synced 2026-04-23 10:04:45 +00:00
refactor: create echarts query section (#20445)
This commit is contained in:
@@ -22,22 +22,18 @@ import {
|
||||
ControlPanelConfig,
|
||||
ControlPanelsContainerProps,
|
||||
D3_TIME_FORMAT_DOCS,
|
||||
emitFilterControl,
|
||||
sections,
|
||||
sharedControls,
|
||||
} from '@superset-ui/chart-controls';
|
||||
|
||||
import { EchartsTimeseriesContributionType } from '../../types';
|
||||
import { DEFAULT_FORM_DATA } from '../../constants';
|
||||
import {
|
||||
legendSection,
|
||||
richTooltipSection,
|
||||
showValueSectionWithoutStack,
|
||||
xAxisControl,
|
||||
} from '../../../controls';
|
||||
|
||||
const {
|
||||
contributionMode,
|
||||
logAxis,
|
||||
markerEnabled,
|
||||
markerSize,
|
||||
@@ -51,38 +47,7 @@ const {
|
||||
const config: ControlPanelConfig = {
|
||||
controlPanelSections: [
|
||||
sections.legacyTimeseriesTime,
|
||||
{
|
||||
label: t('Query'),
|
||||
expanded: true,
|
||||
controlSetRows: [
|
||||
[xAxisControl],
|
||||
['metrics'],
|
||||
['groupby'],
|
||||
[
|
||||
{
|
||||
name: 'contributionMode',
|
||||
config: {
|
||||
type: 'SelectControl',
|
||||
label: t('Contribution Mode'),
|
||||
default: contributionMode,
|
||||
choices: [
|
||||
[null, 'None'],
|
||||
[EchartsTimeseriesContributionType.Row, 'Row'],
|
||||
[EchartsTimeseriesContributionType.Column, 'Series'],
|
||||
],
|
||||
description: t('Calculate contribution per series or row'),
|
||||
},
|
||||
},
|
||||
],
|
||||
['adhoc_filters'],
|
||||
emitFilterControl,
|
||||
['limit'],
|
||||
['timeseries_limit_metric'],
|
||||
['order_desc'],
|
||||
['row_limit'],
|
||||
['truncate_metric'],
|
||||
],
|
||||
},
|
||||
sections.echartsTimeSeriesQuery,
|
||||
sections.advancedAnalyticsControls,
|
||||
sections.annotationsAndLayersControls,
|
||||
sections.forecastIntervalControls,
|
||||
|
||||
Reference in New Issue
Block a user