mirror of
https://github.com/apache/superset.git
synced 2026-04-26 11:34:27 +00:00
fix(legacy-plugin-chart-calendar): fix timestamp timezone in Calendar (#17664)
* fix(legacy-plugin-chart-calendar): fix timestamp timezone in Calendar * Fix prop type
This commit is contained in:
committed by
GitHub
parent
2ae83fac86
commit
e660ea2533
@@ -16,6 +16,10 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import { getNumberFormatter } from '@superset-ui/core';
|
||||
import { getFormattedUTCTime } from './utils';
|
||||
|
||||
export default function transformProps(chartProps) {
|
||||
const { height, formData, queriesData, datasource } = chartProps;
|
||||
const {
|
||||
@@ -34,6 +38,8 @@ export default function transformProps(chartProps) {
|
||||
} = formData;
|
||||
|
||||
const { verboseMap } = datasource;
|
||||
const timeFormatter = ts => getFormattedUTCTime(ts, xAxisTimeFormat);
|
||||
const valueFormatter = getNumberFormatter(yAxisFormat);
|
||||
|
||||
return {
|
||||
height,
|
||||
@@ -48,8 +54,8 @@ export default function transformProps(chartProps) {
|
||||
showValues,
|
||||
steps,
|
||||
subdomainGranularity,
|
||||
timeFormat: xAxisTimeFormat,
|
||||
valueFormat: yAxisFormat,
|
||||
timeFormatter,
|
||||
valueFormatter,
|
||||
verboseMap,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user