Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Allwithyou999 opened this issue Oct 25, 2019 · 7 comments
Open

Comments

@Allwithyou999
Copy link

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

@herzogpeter
Copy link

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

@tomLadder
Copy link
Owner

@Allwithyou999 @herzogpeter i will have a look at it

@ty-sang
Copy link

ty-sang commented Dec 19, 2019

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

@chj-damon
Copy link

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

@summer88123
Copy link

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.

@Markyza
Copy link

Markyza commented Jun 18, 2020

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

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

@lzweife
Copy link

lzweife commented Jul 23, 2020

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

I am having the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants