-
Notifications
You must be signed in to change notification settings - Fork 37
Description
When providing a custom formatter function in the tooltip configuration, the chart does not render properly often it renders only the y-axis labels but no data points, lines, or other chart elements. The chart works correctly when the formatter is removed or replaced with a simple string formatter.
example:
tooltip: {
show: true,
trigger: 'item',
formatter: (params: any) => {
// Any custom logic here causes the issue
const param = Array.isArray(params) ? params[0] : params;
return Value: ${param?.value?.[1] || 'N/A'};
}
},
The same options works in @wuba/react-native-echarts
Simple string formatters work correctly
(The issue could to be related to JavaScript function serialization.)
(Using JSON.parse(JSON.stringify(options)) sometimes works as a workaround but is not a proper solution.)
Environment
React Native ECharts Pro version: 1.9.3
React Native version: 0.77.2
Expo Version: 52.0.42
Platform: iOS
Device: iphone 16