mirror of
https://github.com/apache/superset.git
synced 2024-09-06 13:57:40 -04:00
chore: move xaxis to superset-ui (#20438)
This commit is contained in:
parent
60eb1094a4
commit
111affdb02
@ -67,6 +67,8 @@ import {
|
|||||||
ExtraControlProps,
|
ExtraControlProps,
|
||||||
SelectControlConfig,
|
SelectControlConfig,
|
||||||
Dataset,
|
Dataset,
|
||||||
|
ControlState,
|
||||||
|
ControlPanelState,
|
||||||
} from '../types';
|
} from '../types';
|
||||||
import { ColumnOption } from '../components/ColumnOption';
|
import { ColumnOption } from '../components/ColumnOption';
|
||||||
|
|
||||||
@ -544,6 +546,30 @@ const enableExploreDnd = isFeatureEnabled(
|
|||||||
FeatureFlag.ENABLE_EXPLORE_DRAG_AND_DROP,
|
FeatureFlag.ENABLE_EXPLORE_DRAG_AND_DROP,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const x_axis: SharedControlConfig = {
|
||||||
|
...(enableExploreDnd ? dndGroupByControl : groupByControl),
|
||||||
|
label: t('X-axis'),
|
||||||
|
default: (
|
||||||
|
control: ControlState,
|
||||||
|
controlPanel: Partial<ControlPanelState>,
|
||||||
|
) => {
|
||||||
|
// default to the chosen time column if x-axis is unset and the
|
||||||
|
// GENERIC_CHART_AXES feature flag is enabled
|
||||||
|
const { value } = control;
|
||||||
|
if (value) {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
const timeColumn = controlPanel?.form_data?.granularity_sqla;
|
||||||
|
if (isFeatureEnabled(FeatureFlag.GENERIC_CHART_AXES) && timeColumn) {
|
||||||
|
return timeColumn;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
multi: false,
|
||||||
|
description: t('Dimension to use on x-axis.'),
|
||||||
|
validators: [validateNonEmpty],
|
||||||
|
};
|
||||||
|
|
||||||
const sharedControls = {
|
const sharedControls = {
|
||||||
metrics: enableExploreDnd ? dnd_adhoc_metrics : metrics,
|
metrics: enableExploreDnd ? dnd_adhoc_metrics : metrics,
|
||||||
metric: enableExploreDnd ? dnd_adhoc_metric : metric,
|
metric: enableExploreDnd ? dnd_adhoc_metric : metric,
|
||||||
@ -579,6 +605,7 @@ const sharedControls = {
|
|||||||
series_limit_metric: enableExploreDnd ? dnd_sort_by : sort_by,
|
series_limit_metric: enableExploreDnd ? dnd_sort_by : sort_by,
|
||||||
legacy_order_by: enableExploreDnd ? dnd_sort_by : sort_by,
|
legacy_order_by: enableExploreDnd ? dnd_sort_by : sort_by,
|
||||||
truncate_metric,
|
truncate_metric,
|
||||||
|
x_axis,
|
||||||
};
|
};
|
||||||
|
|
||||||
export { sharedControls, dndEntity, dndColumnsControl };
|
export { sharedControls, dndEntity, dndColumnsControl };
|
||||||
|
@ -25,7 +25,8 @@ import {
|
|||||||
SetDataMaskHook,
|
SetDataMaskHook,
|
||||||
} from '@superset-ui/core';
|
} from '@superset-ui/core';
|
||||||
import { EChartsCoreOption } from 'echarts';
|
import { EChartsCoreOption } from 'echarts';
|
||||||
import { EchartsTitleFormData, DEFAULT_TITLE_FORM_DATA } from '../types';
|
import { EchartsTitleFormData } from '../types';
|
||||||
|
import { DEFAULT_TITLE_FORM_DATA } from '../constants';
|
||||||
|
|
||||||
export type BoxPlotQueryFormData = QueryFormData & {
|
export type BoxPlotQueryFormData = QueryFormData & {
|
||||||
numberFormat?: string;
|
numberFormat?: string;
|
||||||
|
@ -35,7 +35,6 @@ import {
|
|||||||
EchartsFunnelLabelTypeType,
|
EchartsFunnelLabelTypeType,
|
||||||
FunnelChartTransformedProps,
|
FunnelChartTransformedProps,
|
||||||
} from './types';
|
} from './types';
|
||||||
import { DEFAULT_LEGEND_FORM_DATA } from '../types';
|
|
||||||
import {
|
import {
|
||||||
extractGroupbyLabel,
|
extractGroupbyLabel,
|
||||||
getChartPadding,
|
getChartPadding,
|
||||||
@ -43,7 +42,7 @@ import {
|
|||||||
sanitizeHtml,
|
sanitizeHtml,
|
||||||
} from '../utils/series';
|
} from '../utils/series';
|
||||||
import { defaultGrid, defaultTooltip } from '../defaults';
|
import { defaultGrid, defaultTooltip } from '../defaults';
|
||||||
import { OpacityEnum } from '../constants';
|
import { OpacityEnum, DEFAULT_LEGEND_FORM_DATA } from '../constants';
|
||||||
|
|
||||||
const percentFormatter = getNumberFormatter(NumberFormats.PERCENT_2_POINT);
|
const percentFormatter = getNumberFormatter(NumberFormats.PERCENT_2_POINT);
|
||||||
|
|
||||||
|
@ -25,12 +25,8 @@ import {
|
|||||||
QueryFormData,
|
QueryFormData,
|
||||||
SetDataMaskHook,
|
SetDataMaskHook,
|
||||||
} from '@superset-ui/core';
|
} from '@superset-ui/core';
|
||||||
import {
|
import { EchartsLegendFormData, LegendOrientation, LegendType } from '../types';
|
||||||
DEFAULT_LEGEND_FORM_DATA,
|
import { DEFAULT_LEGEND_FORM_DATA } from '../constants';
|
||||||
EchartsLegendFormData,
|
|
||||||
LegendOrientation,
|
|
||||||
LegendType,
|
|
||||||
} from '../types';
|
|
||||||
|
|
||||||
export type EchartsFunnelFormData = QueryFormData &
|
export type EchartsFunnelFormData = QueryFormData &
|
||||||
EchartsLegendFormData & {
|
EchartsLegendFormData & {
|
||||||
|
@ -22,7 +22,8 @@ import {
|
|||||||
QueryFormColumn,
|
QueryFormColumn,
|
||||||
QueryFormData,
|
QueryFormData,
|
||||||
} from '@superset-ui/core';
|
} from '@superset-ui/core';
|
||||||
import { DEFAULT_LEGEND_FORM_DATA, EChartTransformedProps } from '../types';
|
import { EChartTransformedProps } from '../types';
|
||||||
|
import { DEFAULT_LEGEND_FORM_DATA } from '../constants';
|
||||||
|
|
||||||
export type AxisTickLineStyle = {
|
export type AxisTickLineStyle = {
|
||||||
width: number;
|
width: number;
|
||||||
|
@ -19,12 +19,8 @@
|
|||||||
import { QueryFormData } from '@superset-ui/core';
|
import { QueryFormData } from '@superset-ui/core';
|
||||||
import { GraphNodeItemOption } from 'echarts/types/src/chart/graph/GraphSeries';
|
import { GraphNodeItemOption } from 'echarts/types/src/chart/graph/GraphSeries';
|
||||||
import { SeriesTooltipOption } from 'echarts/types/src/util/types';
|
import { SeriesTooltipOption } from 'echarts/types/src/util/types';
|
||||||
import {
|
import { EchartsLegendFormData, LegendOrientation, LegendType } from '../types';
|
||||||
DEFAULT_LEGEND_FORM_DATA,
|
import { DEFAULT_LEGEND_FORM_DATA } from '../constants';
|
||||||
EchartsLegendFormData,
|
|
||||||
LegendOrientation,
|
|
||||||
LegendType,
|
|
||||||
} from '../types';
|
|
||||||
|
|
||||||
export type EdgeSymbol = 'none' | 'circle' | 'arrow';
|
export type EdgeSymbol = 'none' | 'circle' | 'arrow';
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ import {
|
|||||||
|
|
||||||
import { DEFAULT_FORM_DATA } from './types';
|
import { DEFAULT_FORM_DATA } from './types';
|
||||||
import { EchartsTimeseriesSeriesType } from '../Timeseries/types';
|
import { EchartsTimeseriesSeriesType } from '../Timeseries/types';
|
||||||
import { legendSection, richTooltipSection, xAxisControl } from '../controls';
|
import { legendSection, richTooltipSection } from '../controls';
|
||||||
|
|
||||||
const {
|
const {
|
||||||
area,
|
area,
|
||||||
@ -295,7 +295,7 @@ const config: ControlPanelConfig = {
|
|||||||
? {
|
? {
|
||||||
label: t('Shared query fields'),
|
label: t('Shared query fields'),
|
||||||
expanded: true,
|
expanded: true,
|
||||||
controlSetRows: [[xAxisControl]],
|
controlSetRows: [['x_axis']],
|
||||||
}
|
}
|
||||||
: null,
|
: null,
|
||||||
createQuerySection(t('Query A'), ''),
|
createQuerySection(t('Query A'), ''),
|
||||||
|
@ -28,17 +28,17 @@ import {
|
|||||||
QueryFormColumn,
|
QueryFormColumn,
|
||||||
} from '@superset-ui/core';
|
} from '@superset-ui/core';
|
||||||
import {
|
import {
|
||||||
DEFAULT_LEGEND_FORM_DATA,
|
|
||||||
EchartsLegendFormData,
|
EchartsLegendFormData,
|
||||||
EchartsTitleFormData,
|
EchartsTitleFormData,
|
||||||
DEFAULT_TITLE_FORM_DATA,
|
|
||||||
StackType,
|
StackType,
|
||||||
} from '../types';
|
|
||||||
import {
|
|
||||||
DEFAULT_FORM_DATA as TIMESERIES_DEFAULTS,
|
|
||||||
EchartsTimeseriesContributionType,
|
EchartsTimeseriesContributionType,
|
||||||
EchartsTimeseriesSeriesType,
|
EchartsTimeseriesSeriesType,
|
||||||
} from '../Timeseries/types';
|
} from '../types';
|
||||||
|
import {
|
||||||
|
DEFAULT_LEGEND_FORM_DATA,
|
||||||
|
DEFAULT_TITLE_FORM_DATA,
|
||||||
|
DEFAULT_FORM_DATA as TIMESERIES_DEFAULTS,
|
||||||
|
} from '../constants';
|
||||||
|
|
||||||
export type EchartsMixedTimeseriesFormData = QueryFormData & {
|
export type EchartsMixedTimeseriesFormData = QueryFormData & {
|
||||||
annotationLayers: AnnotationLayer[];
|
annotationLayers: AnnotationLayer[];
|
||||||
|
@ -36,7 +36,7 @@ import {
|
|||||||
EchartsPieLabelType,
|
EchartsPieLabelType,
|
||||||
PieChartTransformedProps,
|
PieChartTransformedProps,
|
||||||
} from './types';
|
} from './types';
|
||||||
import { DEFAULT_LEGEND_FORM_DATA } from '../types';
|
import { DEFAULT_LEGEND_FORM_DATA, OpacityEnum } from '../constants';
|
||||||
import {
|
import {
|
||||||
extractGroupbyLabel,
|
extractGroupbyLabel,
|
||||||
getChartPadding,
|
getChartPadding,
|
||||||
@ -45,7 +45,6 @@ import {
|
|||||||
sanitizeHtml,
|
sanitizeHtml,
|
||||||
} from '../utils/series';
|
} from '../utils/series';
|
||||||
import { defaultGrid, defaultTooltip } from '../defaults';
|
import { defaultGrid, defaultTooltip } from '../defaults';
|
||||||
import { OpacityEnum } from '../constants';
|
|
||||||
import { convertInteger } from '../utils/convertInteger';
|
import { convertInteger } from '../utils/convertInteger';
|
||||||
|
|
||||||
const percentFormatter = getNumberFormatter(NumberFormats.PERCENT_2_POINT);
|
const percentFormatter = getNumberFormatter(NumberFormats.PERCENT_2_POINT);
|
||||||
|
@ -25,12 +25,8 @@ import {
|
|||||||
QueryFormData,
|
QueryFormData,
|
||||||
SetDataMaskHook,
|
SetDataMaskHook,
|
||||||
} from '@superset-ui/core';
|
} from '@superset-ui/core';
|
||||||
import {
|
import { EchartsLegendFormData, LegendOrientation, LegendType } from '../types';
|
||||||
DEFAULT_LEGEND_FORM_DATA,
|
import { DEFAULT_LEGEND_FORM_DATA } from '../constants';
|
||||||
EchartsLegendFormData,
|
|
||||||
LegendOrientation,
|
|
||||||
LegendType,
|
|
||||||
} from '../types';
|
|
||||||
|
|
||||||
export type EchartsPieFormData = QueryFormData &
|
export type EchartsPieFormData = QueryFormData &
|
||||||
EchartsLegendFormData & {
|
EchartsLegendFormData & {
|
||||||
|
@ -36,7 +36,7 @@ import {
|
|||||||
EchartsRadarLabelType,
|
EchartsRadarLabelType,
|
||||||
RadarChartTransformedProps,
|
RadarChartTransformedProps,
|
||||||
} from './types';
|
} from './types';
|
||||||
import { DEFAULT_LEGEND_FORM_DATA } from '../types';
|
import { DEFAULT_LEGEND_FORM_DATA, OpacityEnum } from '../constants';
|
||||||
import {
|
import {
|
||||||
extractGroupbyLabel,
|
extractGroupbyLabel,
|
||||||
getChartPadding,
|
getChartPadding,
|
||||||
@ -44,7 +44,6 @@ import {
|
|||||||
getLegendProps,
|
getLegendProps,
|
||||||
} from '../utils/series';
|
} from '../utils/series';
|
||||||
import { defaultGrid, defaultTooltip } from '../defaults';
|
import { defaultGrid, defaultTooltip } from '../defaults';
|
||||||
import { OpacityEnum } from '../constants';
|
|
||||||
|
|
||||||
export function formatLabel({
|
export function formatLabel({
|
||||||
params,
|
params,
|
||||||
|
@ -27,12 +27,12 @@ import {
|
|||||||
SetDataMaskHook,
|
SetDataMaskHook,
|
||||||
} from '@superset-ui/core';
|
} from '@superset-ui/core';
|
||||||
import {
|
import {
|
||||||
DEFAULT_LEGEND_FORM_DATA,
|
|
||||||
EchartsLegendFormData,
|
EchartsLegendFormData,
|
||||||
LabelPositionEnum,
|
LabelPositionEnum,
|
||||||
LegendOrientation,
|
LegendOrientation,
|
||||||
LegendType,
|
LegendType,
|
||||||
} from '../types';
|
} from '../types';
|
||||||
|
import { DEFAULT_LEGEND_FORM_DATA } from '../constants';
|
||||||
|
|
||||||
type RadarColumnConfig = Record<string, { radarMetricMaxValue?: number }>;
|
type RadarColumnConfig = Record<string, { radarMetricMaxValue?: number }>;
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { FeatureFlag, isFeatureEnabled, t } from '@superset-ui/core';
|
import { t } from '@superset-ui/core';
|
||||||
import {
|
import {
|
||||||
ControlPanelConfig,
|
ControlPanelConfig,
|
||||||
ControlPanelsContainerProps,
|
ControlPanelsContainerProps,
|
||||||
@ -28,10 +28,10 @@ import {
|
|||||||
} from '@superset-ui/chart-controls';
|
} from '@superset-ui/chart-controls';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
DEFAULT_FORM_DATA,
|
|
||||||
EchartsTimeseriesContributionType,
|
EchartsTimeseriesContributionType,
|
||||||
EchartsTimeseriesSeriesType,
|
EchartsTimeseriesSeriesType,
|
||||||
} from '../types';
|
} from '../types';
|
||||||
|
import { DEFAULT_FORM_DATA } from '../constants';
|
||||||
import {
|
import {
|
||||||
legendSection,
|
legendSection,
|
||||||
onlyTotalControl,
|
onlyTotalControl,
|
||||||
@ -62,7 +62,7 @@ const config: ControlPanelConfig = {
|
|||||||
label: t('Query'),
|
label: t('Query'),
|
||||||
expanded: true,
|
expanded: true,
|
||||||
controlSetRows: [
|
controlSetRows: [
|
||||||
isFeatureEnabled(FeatureFlag.GENERIC_CHART_AXES) ? [xAxisControl] : [],
|
[xAxisControl],
|
||||||
['metrics'],
|
['metrics'],
|
||||||
['groupby'],
|
['groupby'],
|
||||||
[
|
[
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { FeatureFlag, isFeatureEnabled, t } from '@superset-ui/core';
|
import { t } from '@superset-ui/core';
|
||||||
import {
|
import {
|
||||||
ControlPanelConfig,
|
ControlPanelConfig,
|
||||||
ControlPanelsContainerProps,
|
ControlPanelsContainerProps,
|
||||||
@ -31,10 +31,10 @@ import {
|
|||||||
} from '@superset-ui/chart-controls';
|
} from '@superset-ui/chart-controls';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
DEFAULT_FORM_DATA,
|
|
||||||
EchartsTimeseriesContributionType,
|
EchartsTimeseriesContributionType,
|
||||||
OrientationType,
|
OrientationType,
|
||||||
} from '../../types';
|
} from '../../types';
|
||||||
|
import { DEFAULT_FORM_DATA } from '../../constants';
|
||||||
import {
|
import {
|
||||||
legendSection,
|
legendSection,
|
||||||
richTooltipSection,
|
richTooltipSection,
|
||||||
@ -269,7 +269,7 @@ const config: ControlPanelConfig = {
|
|||||||
label: t('Query'),
|
label: t('Query'),
|
||||||
expanded: true,
|
expanded: true,
|
||||||
controlSetRows: [
|
controlSetRows: [
|
||||||
isFeatureEnabled(FeatureFlag.GENERIC_CHART_AXES) ? [xAxisControl] : [],
|
[xAxisControl],
|
||||||
['metrics'],
|
['metrics'],
|
||||||
['groupby'],
|
['groupby'],
|
||||||
[
|
[
|
||||||
|
@ -25,15 +25,15 @@ import {
|
|||||||
isFeatureEnabled,
|
isFeatureEnabled,
|
||||||
t,
|
t,
|
||||||
} from '@superset-ui/core';
|
} from '@superset-ui/core';
|
||||||
import buildQuery from '../../buildQuery';
|
|
||||||
import controlPanel from './controlPanel';
|
|
||||||
import transformProps from '../../transformProps';
|
|
||||||
import thumbnail from './images/thumbnail.png';
|
|
||||||
import {
|
import {
|
||||||
EchartsTimeseriesChartProps,
|
EchartsTimeseriesChartProps,
|
||||||
EchartsTimeseriesFormData,
|
EchartsTimeseriesFormData,
|
||||||
EchartsTimeseriesSeriesType,
|
EchartsTimeseriesSeriesType,
|
||||||
} from '../../types';
|
} from '../../types';
|
||||||
|
import buildQuery from '../../buildQuery';
|
||||||
|
import controlPanel from './controlPanel';
|
||||||
|
import transformProps from '../../transformProps';
|
||||||
|
import thumbnail from './images/thumbnail.png';
|
||||||
import example1 from './images/Bar1.png';
|
import example1 from './images/Bar1.png';
|
||||||
import example2 from './images/Bar2.png';
|
import example2 from './images/Bar2.png';
|
||||||
import example3 from './images/Bar3.png';
|
import example3 from './images/Bar3.png';
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { FeatureFlag, isFeatureEnabled, t } from '@superset-ui/core';
|
import { t } from '@superset-ui/core';
|
||||||
import {
|
import {
|
||||||
ControlPanelConfig,
|
ControlPanelConfig,
|
||||||
ControlPanelsContainerProps,
|
ControlPanelsContainerProps,
|
||||||
@ -28,16 +28,16 @@ import {
|
|||||||
} from '@superset-ui/chart-controls';
|
} from '@superset-ui/chart-controls';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
DEFAULT_FORM_DATA,
|
|
||||||
EchartsTimeseriesContributionType,
|
EchartsTimeseriesContributionType,
|
||||||
EchartsTimeseriesSeriesType,
|
EchartsTimeseriesSeriesType,
|
||||||
} from './types';
|
} from '../../types';
|
||||||
|
import { DEFAULT_FORM_DATA } from '../../constants';
|
||||||
import {
|
import {
|
||||||
legendSection,
|
legendSection,
|
||||||
richTooltipSection,
|
richTooltipSection,
|
||||||
showValueSection,
|
showValueSection,
|
||||||
xAxisControl,
|
xAxisControl,
|
||||||
} from '../controls';
|
} from '../../../controls';
|
||||||
|
|
||||||
const {
|
const {
|
||||||
area,
|
area,
|
||||||
@ -61,7 +61,7 @@ const config: ControlPanelConfig = {
|
|||||||
label: t('Query'),
|
label: t('Query'),
|
||||||
expanded: true,
|
expanded: true,
|
||||||
controlSetRows: [
|
controlSetRows: [
|
||||||
isFeatureEnabled(FeatureFlag.GENERIC_CHART_AXES) ? [xAxisControl] : [],
|
[xAxisControl],
|
||||||
['metrics'],
|
['metrics'],
|
||||||
['groupby'],
|
['groupby'],
|
||||||
[
|
[
|
@ -25,15 +25,15 @@ import {
|
|||||||
isFeatureEnabled,
|
isFeatureEnabled,
|
||||||
t,
|
t,
|
||||||
} from '@superset-ui/core';
|
} from '@superset-ui/core';
|
||||||
import buildQuery from '../../buildQuery';
|
|
||||||
import controlPanel from '../controlPanel';
|
|
||||||
import transformProps from '../../transformProps';
|
|
||||||
import thumbnail from './images/thumbnail.png';
|
|
||||||
import {
|
import {
|
||||||
EchartsTimeseriesChartProps,
|
EchartsTimeseriesChartProps,
|
||||||
EchartsTimeseriesFormData,
|
EchartsTimeseriesFormData,
|
||||||
EchartsTimeseriesSeriesType,
|
EchartsTimeseriesSeriesType,
|
||||||
} from '../../types';
|
} from '../../types';
|
||||||
|
import buildQuery from '../../buildQuery';
|
||||||
|
import controlPanel from './controlPanel';
|
||||||
|
import transformProps from '../../transformProps';
|
||||||
|
import thumbnail from './images/thumbnail.png';
|
||||||
import example1 from './images/Line1.png';
|
import example1 from './images/Line1.png';
|
||||||
import example2 from './images/Line2.png';
|
import example2 from './images/Line2.png';
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { FeatureFlag, isFeatureEnabled, t } from '@superset-ui/core';
|
import { t } from '@superset-ui/core';
|
||||||
import {
|
import {
|
||||||
ControlPanelConfig,
|
ControlPanelConfig,
|
||||||
ControlPanelsContainerProps,
|
ControlPanelsContainerProps,
|
||||||
@ -27,7 +27,7 @@ import {
|
|||||||
sharedControls,
|
sharedControls,
|
||||||
} from '@superset-ui/chart-controls';
|
} from '@superset-ui/chart-controls';
|
||||||
|
|
||||||
import { DEFAULT_FORM_DATA } from '../../types';
|
import { DEFAULT_FORM_DATA } from '../../constants';
|
||||||
import {
|
import {
|
||||||
legendSection,
|
legendSection,
|
||||||
richTooltipSection,
|
richTooltipSection,
|
||||||
@ -53,7 +53,7 @@ const config: ControlPanelConfig = {
|
|||||||
label: t('Query'),
|
label: t('Query'),
|
||||||
expanded: true,
|
expanded: true,
|
||||||
controlSetRows: [
|
controlSetRows: [
|
||||||
isFeatureEnabled(FeatureFlag.GENERIC_CHART_AXES) ? [xAxisControl] : [],
|
[xAxisControl],
|
||||||
['metrics'],
|
['metrics'],
|
||||||
['groupby'],
|
['groupby'],
|
||||||
['adhoc_filters'],
|
['adhoc_filters'],
|
||||||
|
@ -25,15 +25,15 @@ import {
|
|||||||
isFeatureEnabled,
|
isFeatureEnabled,
|
||||||
t,
|
t,
|
||||||
} from '@superset-ui/core';
|
} from '@superset-ui/core';
|
||||||
import buildQuery from '../../buildQuery';
|
|
||||||
import controlPanel from './controlPanel';
|
|
||||||
import transformProps from '../../transformProps';
|
|
||||||
import thumbnail from './images/thumbnail.png';
|
|
||||||
import {
|
import {
|
||||||
EchartsTimeseriesChartProps,
|
EchartsTimeseriesChartProps,
|
||||||
EchartsTimeseriesFormData,
|
EchartsTimeseriesFormData,
|
||||||
EchartsTimeseriesSeriesType,
|
EchartsTimeseriesSeriesType,
|
||||||
} from '../../types';
|
} from '../../types';
|
||||||
|
import buildQuery from '../../buildQuery';
|
||||||
|
import controlPanel from './controlPanel';
|
||||||
|
import transformProps from '../../transformProps';
|
||||||
|
import thumbnail from './images/thumbnail.png';
|
||||||
import example1 from './images/Scatter1.png';
|
import example1 from './images/Scatter1.png';
|
||||||
|
|
||||||
const scatterTransformProps = (chartProps: EchartsTimeseriesChartProps) =>
|
const scatterTransformProps = (chartProps: EchartsTimeseriesChartProps) =>
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { FeatureFlag, isFeatureEnabled, t } from '@superset-ui/core';
|
import { t } from '@superset-ui/core';
|
||||||
import {
|
import {
|
||||||
ControlPanelConfig,
|
ControlPanelConfig,
|
||||||
ControlPanelsContainerProps,
|
ControlPanelsContainerProps,
|
||||||
@ -27,13 +27,14 @@ import {
|
|||||||
sharedControls,
|
sharedControls,
|
||||||
} from '@superset-ui/chart-controls';
|
} from '@superset-ui/chart-controls';
|
||||||
|
|
||||||
import { DEFAULT_FORM_DATA, EchartsTimeseriesContributionType } from '../types';
|
import { EchartsTimeseriesContributionType } from '../../types';
|
||||||
|
import { DEFAULT_FORM_DATA } from '../../constants';
|
||||||
import {
|
import {
|
||||||
legendSection,
|
legendSection,
|
||||||
richTooltipSection,
|
richTooltipSection,
|
||||||
showValueSectionWithoutStack,
|
showValueSectionWithoutStack,
|
||||||
xAxisControl,
|
xAxisControl,
|
||||||
} from '../../controls';
|
} from '../../../controls';
|
||||||
|
|
||||||
const {
|
const {
|
||||||
contributionMode,
|
contributionMode,
|
||||||
@ -54,7 +55,7 @@ const config: ControlPanelConfig = {
|
|||||||
label: t('Query'),
|
label: t('Query'),
|
||||||
expanded: true,
|
expanded: true,
|
||||||
controlSetRows: [
|
controlSetRows: [
|
||||||
isFeatureEnabled(FeatureFlag.GENERIC_CHART_AXES) ? [xAxisControl] : [],
|
[xAxisControl],
|
||||||
['metrics'],
|
['metrics'],
|
||||||
['groupby'],
|
['groupby'],
|
||||||
[
|
[
|
@ -25,15 +25,15 @@ import {
|
|||||||
isFeatureEnabled,
|
isFeatureEnabled,
|
||||||
t,
|
t,
|
||||||
} from '@superset-ui/core';
|
} from '@superset-ui/core';
|
||||||
import buildQuery from '../../buildQuery';
|
|
||||||
import controlPanel from '../controlPanel';
|
|
||||||
import transformProps from '../../transformProps';
|
|
||||||
import thumbnail from './images/thumbnail.png';
|
|
||||||
import {
|
import {
|
||||||
EchartsTimeseriesChartProps,
|
EchartsTimeseriesChartProps,
|
||||||
EchartsTimeseriesFormData,
|
EchartsTimeseriesFormData,
|
||||||
EchartsTimeseriesSeriesType,
|
EchartsTimeseriesSeriesType,
|
||||||
} from '../../types';
|
} from '../../types';
|
||||||
|
import buildQuery from '../../buildQuery';
|
||||||
|
import controlPanel from './controlPanel';
|
||||||
|
import transformProps from '../../transformProps';
|
||||||
|
import thumbnail from './images/thumbnail.png';
|
||||||
import example1 from './images/SmoothLine1.png';
|
import example1 from './images/SmoothLine1.png';
|
||||||
|
|
||||||
const smoothTransformProps = (chartProps: EchartsTimeseriesChartProps) =>
|
const smoothTransformProps = (chartProps: EchartsTimeseriesChartProps) =>
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { FeatureFlag, isFeatureEnabled, t } from '@superset-ui/core';
|
import { t } from '@superset-ui/core';
|
||||||
import {
|
import {
|
||||||
ControlPanelConfig,
|
ControlPanelConfig,
|
||||||
ControlPanelsContainerProps,
|
ControlPanelsContainerProps,
|
||||||
@ -28,10 +28,10 @@ import {
|
|||||||
} from '@superset-ui/chart-controls';
|
} from '@superset-ui/chart-controls';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
DEFAULT_FORM_DATA,
|
|
||||||
EchartsTimeseriesContributionType,
|
EchartsTimeseriesContributionType,
|
||||||
EchartsTimeseriesSeriesType,
|
EchartsTimeseriesSeriesType,
|
||||||
} from '../types';
|
} from '../../types';
|
||||||
|
import { DEFAULT_FORM_DATA } from '../constants';
|
||||||
import {
|
import {
|
||||||
legendSection,
|
legendSection,
|
||||||
richTooltipSection,
|
richTooltipSection,
|
||||||
@ -60,7 +60,7 @@ const config: ControlPanelConfig = {
|
|||||||
label: t('Query'),
|
label: t('Query'),
|
||||||
expanded: true,
|
expanded: true,
|
||||||
controlSetRows: [
|
controlSetRows: [
|
||||||
isFeatureEnabled(FeatureFlag.GENERIC_CHART_AXES) ? [xAxisControl] : [],
|
[xAxisControl],
|
||||||
['metrics'],
|
['metrics'],
|
||||||
['groupby'],
|
['groupby'],
|
||||||
[
|
[
|
||||||
|
@ -25,14 +25,14 @@ import {
|
|||||||
isFeatureEnabled,
|
isFeatureEnabled,
|
||||||
t,
|
t,
|
||||||
} from '@superset-ui/core';
|
} from '@superset-ui/core';
|
||||||
|
import {
|
||||||
|
EchartsTimeseriesChartProps,
|
||||||
|
EchartsTimeseriesFormData,
|
||||||
|
} from '@superset-ui/plugin-chart-echarts';
|
||||||
import buildQuery from '../buildQuery';
|
import buildQuery from '../buildQuery';
|
||||||
import controlPanel from './controlPanel';
|
import controlPanel from './controlPanel';
|
||||||
import transformProps from '../transformProps';
|
import transformProps from '../transformProps';
|
||||||
import thumbnail from './images/thumbnail.png';
|
import thumbnail from './images/thumbnail.png';
|
||||||
import {
|
|
||||||
EchartsTimeseriesChartProps,
|
|
||||||
EchartsTimeseriesFormData,
|
|
||||||
} from '../types';
|
|
||||||
import example1 from './images/Step1.png';
|
import example1 from './images/Step1.png';
|
||||||
import example2 from './images/Step2.png';
|
import example2 from './images/Step2.png';
|
||||||
|
|
||||||
|
@ -0,0 +1,66 @@
|
|||||||
|
/**
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
import { sections } from '@superset-ui/chart-controls';
|
||||||
|
import {
|
||||||
|
OrientationType,
|
||||||
|
EchartsTimeseriesSeriesType,
|
||||||
|
EchartsTimeseriesFormData,
|
||||||
|
} from './types';
|
||||||
|
import {
|
||||||
|
DEFAULT_LEGEND_FORM_DATA,
|
||||||
|
DEFAULT_TITLE_FORM_DATA,
|
||||||
|
} from '../constants';
|
||||||
|
|
||||||
|
// @ts-ignore
|
||||||
|
export const DEFAULT_FORM_DATA: EchartsTimeseriesFormData = {
|
||||||
|
...DEFAULT_LEGEND_FORM_DATA,
|
||||||
|
...DEFAULT_TITLE_FORM_DATA,
|
||||||
|
annotationLayers: sections.annotationLayers,
|
||||||
|
area: false,
|
||||||
|
forecastEnabled: sections.FORECAST_DEFAULT_DATA.forecastEnabled,
|
||||||
|
forecastInterval: sections.FORECAST_DEFAULT_DATA.forecastInterval,
|
||||||
|
forecastPeriods: sections.FORECAST_DEFAULT_DATA.forecastPeriods,
|
||||||
|
forecastSeasonalityDaily:
|
||||||
|
sections.FORECAST_DEFAULT_DATA.forecastSeasonalityDaily,
|
||||||
|
forecastSeasonalityWeekly:
|
||||||
|
sections.FORECAST_DEFAULT_DATA.forecastSeasonalityWeekly,
|
||||||
|
forecastSeasonalityYearly:
|
||||||
|
sections.FORECAST_DEFAULT_DATA.forecastSeasonalityYearly,
|
||||||
|
logAxis: false,
|
||||||
|
markerEnabled: false,
|
||||||
|
markerSize: 6,
|
||||||
|
minorSplitLine: false,
|
||||||
|
opacity: 0.2,
|
||||||
|
orderDesc: true,
|
||||||
|
rowLimit: 10000,
|
||||||
|
seriesType: EchartsTimeseriesSeriesType.Line,
|
||||||
|
stack: false,
|
||||||
|
tooltipTimeFormat: 'smart_date',
|
||||||
|
truncateYAxis: false,
|
||||||
|
yAxisBounds: [null, null],
|
||||||
|
zoomable: false,
|
||||||
|
richTooltip: true,
|
||||||
|
xAxisLabelRotation: 0,
|
||||||
|
emitFilter: false,
|
||||||
|
groupby: [],
|
||||||
|
showValue: false,
|
||||||
|
onlyTotal: false,
|
||||||
|
percentageThreshold: 0,
|
||||||
|
orientation: OrientationType.vertical,
|
||||||
|
};
|
@ -26,7 +26,7 @@ import {
|
|||||||
t,
|
t,
|
||||||
} from '@superset-ui/core';
|
} from '@superset-ui/core';
|
||||||
import buildQuery from './buildQuery';
|
import buildQuery from './buildQuery';
|
||||||
import controlPanel from './controlPanel';
|
import controlPanel from './Regular/Line/controlPanel';
|
||||||
import transformProps from './transformProps';
|
import transformProps from './transformProps';
|
||||||
import thumbnail from './images/thumbnail.png';
|
import thumbnail from './images/thumbnail.png';
|
||||||
import {
|
import {
|
||||||
|
@ -36,13 +36,13 @@ import { isDerivedSeries } from '@superset-ui/chart-controls';
|
|||||||
import { EChartsCoreOption, SeriesOption } from 'echarts';
|
import { EChartsCoreOption, SeriesOption } from 'echarts';
|
||||||
import { ZRLineType } from 'echarts/types/src/util/types';
|
import { ZRLineType } from 'echarts/types/src/util/types';
|
||||||
import {
|
import {
|
||||||
DEFAULT_FORM_DATA,
|
|
||||||
EchartsTimeseriesChartProps,
|
EchartsTimeseriesChartProps,
|
||||||
EchartsTimeseriesFormData,
|
EchartsTimeseriesFormData,
|
||||||
EchartsTimeseriesSeriesType,
|
EchartsTimeseriesSeriesType,
|
||||||
TimeseriesChartTransformedProps,
|
TimeseriesChartTransformedProps,
|
||||||
OrientationType,
|
OrientationType,
|
||||||
} from './types';
|
} from './types';
|
||||||
|
import { DEFAULT_FORM_DATA } from './constants';
|
||||||
import { ForecastSeriesEnum, ForecastValue } from '../types';
|
import { ForecastSeriesEnum, ForecastValue } from '../types';
|
||||||
import { parseYAxisBound } from '../utils/controls';
|
import { parseYAxisBound } from '../utils/controls';
|
||||||
import {
|
import {
|
||||||
|
@ -24,13 +24,10 @@ import {
|
|||||||
QueryFormData,
|
QueryFormData,
|
||||||
TimeGranularity,
|
TimeGranularity,
|
||||||
} from '@superset-ui/core';
|
} from '@superset-ui/core';
|
||||||
import { sections } from '@superset-ui/chart-controls';
|
|
||||||
import {
|
import {
|
||||||
DEFAULT_LEGEND_FORM_DATA,
|
|
||||||
EchartsLegendFormData,
|
EchartsLegendFormData,
|
||||||
EChartTransformedProps,
|
EChartTransformedProps,
|
||||||
EchartsTitleFormData,
|
EchartsTitleFormData,
|
||||||
DEFAULT_TITLE_FORM_DATA,
|
|
||||||
StackType,
|
StackType,
|
||||||
} from '../types';
|
} from '../types';
|
||||||
|
|
||||||
@ -93,44 +90,6 @@ export type EchartsTimeseriesFormData = QueryFormData & {
|
|||||||
} & EchartsLegendFormData &
|
} & EchartsLegendFormData &
|
||||||
EchartsTitleFormData;
|
EchartsTitleFormData;
|
||||||
|
|
||||||
// @ts-ignore
|
|
||||||
export const DEFAULT_FORM_DATA: EchartsTimeseriesFormData = {
|
|
||||||
...DEFAULT_LEGEND_FORM_DATA,
|
|
||||||
annotationLayers: sections.annotationLayers,
|
|
||||||
area: false,
|
|
||||||
forecastEnabled: sections.FORECAST_DEFAULT_DATA.forecastEnabled,
|
|
||||||
forecastInterval: sections.FORECAST_DEFAULT_DATA.forecastInterval,
|
|
||||||
forecastPeriods: sections.FORECAST_DEFAULT_DATA.forecastPeriods,
|
|
||||||
forecastSeasonalityDaily:
|
|
||||||
sections.FORECAST_DEFAULT_DATA.forecastSeasonalityDaily,
|
|
||||||
forecastSeasonalityWeekly:
|
|
||||||
sections.FORECAST_DEFAULT_DATA.forecastSeasonalityWeekly,
|
|
||||||
forecastSeasonalityYearly:
|
|
||||||
sections.FORECAST_DEFAULT_DATA.forecastSeasonalityYearly,
|
|
||||||
logAxis: false,
|
|
||||||
markerEnabled: false,
|
|
||||||
markerSize: 6,
|
|
||||||
minorSplitLine: false,
|
|
||||||
opacity: 0.2,
|
|
||||||
orderDesc: true,
|
|
||||||
rowLimit: 10000,
|
|
||||||
seriesType: EchartsTimeseriesSeriesType.Line,
|
|
||||||
stack: false,
|
|
||||||
tooltipTimeFormat: 'smart_date',
|
|
||||||
truncateYAxis: false,
|
|
||||||
yAxisBounds: [null, null],
|
|
||||||
zoomable: false,
|
|
||||||
richTooltip: true,
|
|
||||||
xAxisLabelRotation: 0,
|
|
||||||
emitFilter: false,
|
|
||||||
groupby: [],
|
|
||||||
showValue: false,
|
|
||||||
onlyTotal: false,
|
|
||||||
percentageThreshold: 0,
|
|
||||||
orientation: OrientationType.vertical,
|
|
||||||
...DEFAULT_TITLE_FORM_DATA,
|
|
||||||
};
|
|
||||||
|
|
||||||
export interface EchartsTimeseriesChartProps
|
export interface EchartsTimeseriesChartProps
|
||||||
extends ChartProps<EchartsTimeseriesFormData> {
|
extends ChartProps<EchartsTimeseriesFormData> {
|
||||||
formData: EchartsTimeseriesFormData;
|
formData: EchartsTimeseriesFormData;
|
||||||
|
@ -19,7 +19,13 @@
|
|||||||
|
|
||||||
import { JsonValue, t, TimeGranularity } from '@superset-ui/core';
|
import { JsonValue, t, TimeGranularity } from '@superset-ui/core';
|
||||||
import { ReactNode } from 'react';
|
import { ReactNode } from 'react';
|
||||||
import { LabelPositionEnum } from './types';
|
import {
|
||||||
|
EchartsLegendFormData,
|
||||||
|
EchartsTitleFormData,
|
||||||
|
LabelPositionEnum,
|
||||||
|
LegendOrientation,
|
||||||
|
LegendType,
|
||||||
|
} from './types';
|
||||||
|
|
||||||
// eslint-disable-next-line import/prefer-default-export
|
// eslint-disable-next-line import/prefer-default-export
|
||||||
export const NULL_STRING = '<NULL>';
|
export const NULL_STRING = '<NULL>';
|
||||||
@ -84,3 +90,20 @@ export const TIMEGRAIN_TO_TIMESTAMP = {
|
|||||||
[TimeGranularity.QUARTER]: 3600 * 1000 * 24 * 31 * 3,
|
[TimeGranularity.QUARTER]: 3600 * 1000 * 24 * 31 * 3,
|
||||||
[TimeGranularity.YEAR]: 3600 * 1000 * 24 * 31 * 12,
|
[TimeGranularity.YEAR]: 3600 * 1000 * 24 * 31 * 12,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const DEFAULT_LEGEND_FORM_DATA: EchartsLegendFormData = {
|
||||||
|
legendMargin: null,
|
||||||
|
legendOrientation: LegendOrientation.Top,
|
||||||
|
legendType: LegendType.Scroll,
|
||||||
|
showLegend: true,
|
||||||
|
};
|
||||||
|
|
||||||
|
export const DEFAULT_TITLE_FORM_DATA: EchartsTitleFormData = {
|
||||||
|
xAxisTitle: '',
|
||||||
|
xAxisTitleMargin: 0,
|
||||||
|
yAxisTitle: '',
|
||||||
|
yAxisTitleMargin: 0,
|
||||||
|
yAxisTitlePosition: 'Top',
|
||||||
|
};
|
||||||
|
|
||||||
|
export { DEFAULT_FORM_DATA } from './Timeseries/constants';
|
||||||
|
@ -17,22 +17,15 @@
|
|||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {
|
import { FeatureFlag, isFeatureEnabled, t } from '@superset-ui/core';
|
||||||
FeatureFlag,
|
|
||||||
isFeatureEnabled,
|
|
||||||
t,
|
|
||||||
validateNonEmpty,
|
|
||||||
} from '@superset-ui/core';
|
|
||||||
import {
|
import {
|
||||||
ControlPanelsContainerProps,
|
ControlPanelsContainerProps,
|
||||||
ControlPanelState,
|
|
||||||
ControlSetItem,
|
ControlSetItem,
|
||||||
ControlSetRow,
|
ControlSetRow,
|
||||||
ControlState,
|
|
||||||
sharedControls,
|
sharedControls,
|
||||||
} from '@superset-ui/chart-controls';
|
} from '@superset-ui/chart-controls';
|
||||||
import { DEFAULT_LEGEND_FORM_DATA } from './types';
|
import { DEFAULT_LEGEND_FORM_DATA } from './constants';
|
||||||
import { DEFAULT_FORM_DATA } from './Timeseries/types';
|
import { DEFAULT_FORM_DATA } from './Timeseries/constants';
|
||||||
|
|
||||||
const { legendMargin, legendOrientation, legendType, showLegend } =
|
const { legendMargin, legendOrientation, legendType, showLegend } =
|
||||||
DEFAULT_LEGEND_FORM_DATA;
|
DEFAULT_LEGEND_FORM_DATA;
|
||||||
@ -145,32 +138,9 @@ export const onlyTotalControl: ControlSetItem = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export const xAxisControl: ControlSetItem = {
|
export const xAxisControl = isFeatureEnabled(FeatureFlag.GENERIC_CHART_AXES)
|
||||||
name: 'x_axis',
|
? 'x_axis'
|
||||||
config: {
|
: null;
|
||||||
...sharedControls.groupby,
|
|
||||||
label: t('X-axis'),
|
|
||||||
default: (
|
|
||||||
control: ControlState,
|
|
||||||
controlPanel: Partial<ControlPanelState>,
|
|
||||||
) => {
|
|
||||||
// default to the chosen time column if x-axis is unset and the
|
|
||||||
// GENERIC_CHART_AXES feature flag is enabled
|
|
||||||
const { value } = control;
|
|
||||||
if (value) {
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
const timeColumn = controlPanel?.form_data?.granularity_sqla;
|
|
||||||
if (isFeatureEnabled(FeatureFlag.GENERIC_CHART_AXES) && timeColumn) {
|
|
||||||
return timeColumn;
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
multi: false,
|
|
||||||
description: t('Dimension to use on x-axis.'),
|
|
||||||
validators: [validateNonEmpty],
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
const percentageThresholdControl: ControlSetItem = {
|
const percentageThresholdControl: ControlSetItem = {
|
||||||
name: 'percentage_threshold',
|
name: 'percentage_threshold',
|
||||||
|
@ -45,7 +45,7 @@ export { default as TimeseriesTransformProps } from './Timeseries/transformProps
|
|||||||
export { default as TreeTransformProps } from './Tree/transformProps';
|
export { default as TreeTransformProps } from './Tree/transformProps';
|
||||||
export { default as TreemapTransformProps } from './Treemap/transformProps';
|
export { default as TreemapTransformProps } from './Treemap/transformProps';
|
||||||
|
|
||||||
export { DEFAULT_FORM_DATA as TimeseriesDefaultFormData } from './Timeseries/types';
|
export { DEFAULT_FORM_DATA as TimeseriesDefaultFormData } from './Timeseries/constants';
|
||||||
|
|
||||||
export * from './types';
|
export * from './types';
|
||||||
|
|
||||||
|
@ -85,13 +85,6 @@ export type EchartsLegendFormData = {
|
|||||||
showLegend: boolean;
|
showLegend: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const DEFAULT_LEGEND_FORM_DATA: EchartsLegendFormData = {
|
|
||||||
legendMargin: null,
|
|
||||||
legendOrientation: LegendOrientation.Top,
|
|
||||||
legendType: LegendType.Scroll,
|
|
||||||
showLegend: true,
|
|
||||||
};
|
|
||||||
|
|
||||||
export type EventHandlers = Record<string, { (props: any): void }>;
|
export type EventHandlers = Record<string, { (props: any): void }>;
|
||||||
|
|
||||||
export enum LabelPositionEnum {
|
export enum LabelPositionEnum {
|
||||||
@ -132,14 +125,6 @@ export interface EchartsTitleFormData {
|
|||||||
yAxisTitlePosition: string;
|
yAxisTitlePosition: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const DEFAULT_TITLE_FORM_DATA: EchartsTitleFormData = {
|
|
||||||
xAxisTitle: '',
|
|
||||||
xAxisTitleMargin: 0,
|
|
||||||
yAxisTitle: '',
|
|
||||||
yAxisTitleMargin: 0,
|
|
||||||
yAxisTitlePosition: 'Top',
|
|
||||||
};
|
|
||||||
|
|
||||||
export type StackType = boolean | null | Partial<AreaChartExtraControlsValue>;
|
export type StackType = boolean | null | Partial<AreaChartExtraControlsValue>;
|
||||||
|
|
||||||
export * from './Timeseries/types';
|
export * from './Timeseries/types';
|
||||||
|
@ -20,7 +20,7 @@ import {
|
|||||||
isPostProcessingBoxplot,
|
isPostProcessingBoxplot,
|
||||||
PostProcessingBoxplot,
|
PostProcessingBoxplot,
|
||||||
} from '@superset-ui/core';
|
} from '@superset-ui/core';
|
||||||
import { DEFAULT_TITLE_FORM_DATA } from '../../src/types';
|
import { DEFAULT_TITLE_FORM_DATA } from '../../src/constants';
|
||||||
import buildQuery from '../../src/BoxPlot/buildQuery';
|
import buildQuery from '../../src/BoxPlot/buildQuery';
|
||||||
import { BoxPlotQueryFormData } from '../../src/BoxPlot/types';
|
import { BoxPlotQueryFormData } from '../../src/BoxPlot/types';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user