Skip to content

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

Description

@lichaomeng

如果是 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,真心感谢~~~

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions