mirror of
https://github.com/apache/superset.git
synced 2026-04-20 00:24:38 +00:00
feat(formatters): Add custom d3-time-format locale (#24263)
This commit is contained in:
@@ -24,7 +24,7 @@ import {
|
||||
getTimeFormatter,
|
||||
getTimeFormatterForGranularity,
|
||||
QueryFormData,
|
||||
smartDateFormatter,
|
||||
SMART_DATE_ID,
|
||||
TimeFormats,
|
||||
} from '@superset-ui/core';
|
||||
import { getColorFormatters } from '@superset-ui/chart-controls';
|
||||
@@ -120,7 +120,7 @@ export default function transformProps(chartProps: ChartProps<QueryFormData>) {
|
||||
temporalColname: string,
|
||||
) => {
|
||||
let formatter: DateFormatter | undefined;
|
||||
if (dateFormat === smartDateFormatter.id) {
|
||||
if (dateFormat === SMART_DATE_ID) {
|
||||
if (granularity) {
|
||||
// time column use formats based on granularity
|
||||
formatter = getTimeFormatterForGranularity(granularity);
|
||||
|
||||
Reference in New Issue
Block a user