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

Not working the tooltip issue(formatter) with the new version 2.0

Open Allwithyou999 opened this issue 5 years ago • 7 comments

Today, I upgraded the react-native-echarts-wrapper to v2.0. After I upgraded, the chart tooltip formatter is not working like the previous one.

tooltip: {
      trigger: 'axis',
      triggerOn: 'mousemove|click',
      alwaysShowContent: true,
      backgroundColor: COMP_COLOR,
      padding: 10,
      textStyle: {
        color: '#fff',
      },
      formatter: function() {
        return 'Product'
      },
}

This is the code part I use.

Please let me know why "formatter" option is not working. Thanks

Allwithyou999 avatar Oct 25 '19 04:10 Allwithyou999

I am having the same issue. @tomLadder Any thoughts?

herzogpeter avatar Nov 07 '19 12:11 herzogpeter

@Allwithyou999 @herzogpeter i will have a look at it

tomLadder avatar Nov 07 '19 16:11 tomLadder

I don't think formatter is working at all, I could render the same way like this https://echarts.apache.org/examples/en/editor.html?c=bar-rich-text. check the icon on yAxis

ty-sang avatar Dec 19 '19 02:12 ty-sang

@tomLadder any update now? I'm still facing this problem.

chj-damon avatar Mar 05 '20 07:03 chj-damon

Comparing v2.0.0 and v1.3.1, I think the problem lies in jsBuilder.js line:6. return new Function("return " + val.toString()); // v2.0.0 return val.toString(); // v1.3.1 This makes function no longer included in result.

summer88123 avatar Mar 25 '20 03:03 summer88123

Any formatter/position/etc is working until next Option update. Easiest solution - reupdate Option with:

chart.setOption({
  tooltip: {
	formatter: params => {
		return ...
	}
  }
});

Markyza avatar Jun 18 '20 19:06 Markyza

I am having the same issue. @tomLadder Any thoughts?

I am having the same issue.

lzweife avatar Jul 23 '20 07:07 lzweife