msyavuz commented on code in PR #31765:
URL: https://github.com/apache/superset/pull/31765#discussion_r2224926766
##########
superset-frontend/plugins/plugin-chart-echarts/src/utils/formatters.ts:
##########
@@ -76,24 +77,40 @@ export const getYAxisFormatter = (
export function getTooltipTimeFormatter(
format?: string,
+ timeGrain?: TimeGranularity,
): TimeFormatter | StringConstructor {
+ if (
+ timeGrain === TimeGranularity.QUARTER ||
+ timeGrain === TimeGranularity.MONTH ||
+ timeGrain === TimeGranularity.YEAR
+ ) {
+ return getTimeFormatter(undefined, timeGrain);
+ }
if (format === SMART_DATE_ID) {
- return getSmartDateVerboseFormatter();
+ return getTimeFormatter(SMART_DATE_VERBOSE_ID, timeGrain);
Review Comment:
With this change `getSmartDateVerboseFormatter` function is unused. Can we
modify that function instead to pass the `timeGrain`.
##########
superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/transformProps.ts:
##########
@@ -214,7 +215,11 @@ export default function transformProps(
percentageThreshold,
metrics = [],
metricsB = [],
- }: EchartsMixedTimeseriesFormData = { ...DEFAULT_FORM_DATA, ...formData };
+ }: EchartsMixedTimeseriesFormData = {
+ ...DEFAULT_FORM_DATA,
+ ...formData,
+ ...convertKeysToCamelCase(formData.extraFormData),
Review Comment:
Is this change with convertKeysToCamelCase necessary. What do we need and
use from extraFormData?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]