mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 09:38:51 +00:00
fix(data-vi): issue where data transformations do not work on tooltip in dual-axies charts (#5649)
This commit is contained in:
parent
c607e886bc
commit
b1fcfe0b21
@ -84,6 +84,20 @@ export class DualAxes extends G2PlotChart {
|
||||
return {
|
||||
type: 'line',
|
||||
yField,
|
||||
tooltip: {
|
||||
items: [
|
||||
(data: any) => {
|
||||
const { [yField]: y } = data;
|
||||
const yFieldProps = fieldProps[yField];
|
||||
const name = yFieldProps?.label || yField;
|
||||
const value = yFieldProps?.transformer ? yFieldProps.transformer(y) : y;
|
||||
return {
|
||||
name,
|
||||
value,
|
||||
};
|
||||
},
|
||||
],
|
||||
},
|
||||
colorField: () => {
|
||||
const props = fieldProps[yField];
|
||||
return props?.label || yField;
|
||||
|
Loading…
Reference in New Issue
Block a user