mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-07-01 10:42:19 +08: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 {
|
return {
|
||||||
type: 'line',
|
type: 'line',
|
||||||
yField,
|
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: () => {
|
colorField: () => {
|
||||||
const props = fieldProps[yField];
|
const props = fieldProps[yField];
|
||||||
return props?.label || yField;
|
return props?.label || yField;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user