mirror of
https://github.com/apache/superset.git
synced 2026-04-24 10:35:01 +00:00
refactor: preparation for time section migration (#21766)
This commit is contained in:
@@ -17,12 +17,7 @@
|
||||
* under the License.
|
||||
*/
|
||||
import React from 'react';
|
||||
import {
|
||||
ensureIsArray,
|
||||
FeatureFlag,
|
||||
isFeatureEnabled,
|
||||
t,
|
||||
} from '@superset-ui/core';
|
||||
import { ensureIsArray, hasGenericChartAxes, t } from '@superset-ui/core';
|
||||
import { cloneDeep } from 'lodash';
|
||||
import {
|
||||
ControlPanelConfig,
|
||||
@@ -292,7 +287,7 @@ function createAdvancedAnalyticsSection(
|
||||
const config: ControlPanelConfig = {
|
||||
controlPanelSections: [
|
||||
sections.genericTime,
|
||||
isFeatureEnabled(FeatureFlag.GENERIC_CHART_AXES)
|
||||
hasGenericChartAxes
|
||||
? {
|
||||
label: t('Shared query fields'),
|
||||
expanded: true,
|
||||
|
||||
@@ -21,8 +21,7 @@ import {
|
||||
Behavior,
|
||||
ChartMetadata,
|
||||
ChartPlugin,
|
||||
FeatureFlag,
|
||||
isFeatureEnabled,
|
||||
hasGenericChartAxes,
|
||||
t,
|
||||
} from '@superset-ui/core';
|
||||
import buildQuery from './buildQuery';
|
||||
@@ -57,7 +56,7 @@ export default class EchartsTimeseriesChartPlugin extends ChartPlugin<
|
||||
behaviors: [Behavior.INTERACTIVE_CHART],
|
||||
category: t('Evolution'),
|
||||
credits: ['https://echarts.apache.org'],
|
||||
description: isFeatureEnabled(FeatureFlag.GENERIC_CHART_AXES)
|
||||
description: hasGenericChartAxes
|
||||
? t(
|
||||
'Visualize two different series using the same x-axis. Note that both series can be visualized with a different chart type (e.g. 1 using bars and 1 using a line).',
|
||||
)
|
||||
@@ -70,9 +69,7 @@ export default class EchartsTimeseriesChartPlugin extends ChartPlugin<
|
||||
AnnotationType.Interval,
|
||||
AnnotationType.Timeseries,
|
||||
],
|
||||
name: isFeatureEnabled(FeatureFlag.GENERIC_CHART_AXES)
|
||||
? t('Mixed Chart')
|
||||
: t('Mixed Time-Series'),
|
||||
name: hasGenericChartAxes ? t('Mixed Chart') : t('Mixed Time-Series'),
|
||||
thumbnail,
|
||||
tags: [
|
||||
t('Advanced-Analytics'),
|
||||
|
||||
Reference in New Issue
Block a user