react-native-echarts icon indicating copy to clipboard operation
react-native-echarts copied to clipboard

Cannot update textStyle in tooltip with formatter

Open pavelbabenko opened this issue 3 years ago • 5 comments

Hi! I'm trying to customize tooltip in series with type: 'custom' using formatted function, but I'm not able to change styles of text

    type: 'custom',
    data: [7000],
    tooltip: {
      formatter: (params: CallbackDataParams) => {
        return `Data: ${params.data}`;
      },
      textStyle: {
        fontSize: 20,
      },
    },

The result:

image

pavelbabenko avatar Feb 02 '23 12:02 pavelbabenko

Yes, this is a problem. ~~custom tooltip in echarts uses html instead of svg, and html is not currently supported in wrn-echarts.~~

~~Alternatively, you can select svg rendering in the chart editor in echarts and locate if htm is used by the browser's review element.~~

We are also in the process of sorting out the relevant currently unsupported features.

zhiqingchen avatar Feb 02 '23 13:02 zhiqingchen

is it possible to support this?

chj-damon avatar Mar 06 '23 07:03 chj-damon

we will try it.

zhiqingchen avatar Mar 06 '23 10:03 zhiqingchen

custom tooltip in echarts uses html instead of svg, and html is not currently supported in wrn-echarts.

This sentence is misrepresented

zhiqingchen avatar Mar 07 '23 03:03 zhiqingchen

https://github.com/apache/echarts/issues/18339

It may be an issue of echarts.

zhiqingchen avatar Mar 07 '23 07:03 zhiqingchen