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

http://antvis.github.io/g2/demo/05-pie/pie.html 代码在本地出错 #196

Open
lichaomeng opened this issue Jul 23, 2018 · 0 comments
Open

Comments

@lichaomeng
Copy link

如果是 G2、G2-mobile、G6、可视化基础的使用问题,请您按照下面的模板来提 issue,并打上 label,真心感谢~~~

代码在本地出错 for 循环 data 未说明来源 is not defined

   chart.legend('name', {
            position: 'bottom',
            itemWrap: true,
            formatter: function(val) {
                for(var i = 0, len = data.length; i < len; i++) {
                    var obj = data[i];
                    if (obj.name === val) {
                        return val + ': ' + obj.value + '%';
                    }
                }
            }
        });

G2

  • G2 版本: 2.3.13
  • 使用环境:chrome

如果是其他的问题,请按照如下模板来提 issue,并打上 label,真心感谢~~~

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

1 participant