mirror of
https://github.com/apache/superset.git
synced 2026-04-23 18:14:56 +00:00
feat: Improves the Waterfall chart (#25557)
This commit is contained in:
committed by
GitHub
parent
8061d5cce9
commit
d619078d25
@@ -80,8 +80,6 @@ import { defaultGrid, defaultYAxis } from '../defaults';
|
||||
import {
|
||||
getBaselineSeriesForStream,
|
||||
getPadding,
|
||||
getTooltipTimeFormatter,
|
||||
getXAxisFormatter,
|
||||
transformEventAnnotation,
|
||||
transformFormulaAnnotation,
|
||||
transformIntervalAnnotation,
|
||||
@@ -94,7 +92,11 @@ import {
|
||||
TIMEGRAIN_TO_TIMESTAMP,
|
||||
} from '../constants';
|
||||
import { getDefaultTooltip } from '../utils/tooltip';
|
||||
import { getYAxisFormatter } from '../utils/getYAxisFormatter';
|
||||
import {
|
||||
getTooltipTimeFormatter,
|
||||
getXAxisFormatter,
|
||||
getYAxisFormatter,
|
||||
} from '../utils/formatters';
|
||||
|
||||
export default function transformProps(
|
||||
chartProps: EchartsTimeseriesChartProps,
|
||||
|
||||
@@ -24,14 +24,10 @@ import {
|
||||
EventAnnotationLayer,
|
||||
FilterState,
|
||||
FormulaAnnotationLayer,
|
||||
getTimeFormatter,
|
||||
IntervalAnnotationLayer,
|
||||
isTimeseriesAnnotationResult,
|
||||
LegendState,
|
||||
smartDateDetailedFormatter,
|
||||
smartDateFormatter,
|
||||
SupersetTheme,
|
||||
TimeFormatter,
|
||||
TimeseriesAnnotationLayer,
|
||||
TimeseriesDataRecord,
|
||||
ValueFormatter,
|
||||
@@ -582,27 +578,3 @@ export function getPadding(
|
||||
: TIMESERIES_CONSTANTS.gridOffsetRight,
|
||||
});
|
||||
}
|
||||
|
||||
export function getTooltipTimeFormatter(
|
||||
format?: string,
|
||||
): TimeFormatter | StringConstructor {
|
||||
if (format === smartDateFormatter.id) {
|
||||
return smartDateDetailedFormatter;
|
||||
}
|
||||
if (format) {
|
||||
return getTimeFormatter(format);
|
||||
}
|
||||
return String;
|
||||
}
|
||||
|
||||
export function getXAxisFormatter(
|
||||
format?: string,
|
||||
): TimeFormatter | StringConstructor | undefined {
|
||||
if (format === smartDateFormatter.id || !format) {
|
||||
return undefined;
|
||||
}
|
||||
if (format) {
|
||||
return getTimeFormatter(format);
|
||||
}
|
||||
return String;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user