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

1.1.3版本采用maskimage方式绘制词云渲染失败 #62

Open
wupeiwen opened this issue May 24, 2018 · 6 comments
Open

1.1.3版本采用maskimage方式绘制词云渲染失败 #62

wupeiwen opened this issue May 24, 2018 · 6 comments

Comments

@wupeiwen
Copy link

wupeiwen commented May 24, 2018

"dependencies": {
"echarts": "4.1.0",
"echarts-liquidfill": "2.0.0",
"echarts-wordcloud": "1.1.3",
"element-ui": "^2.3.8",
"vue": "^2.5.2",
"vue-baidu-map": "0.21.9",
"vue-router": "^3.0.1"
}
是不是echarts版本问题造成的?

@wupeiwen
Copy link
Author

踩了坑,做了兼容性测试,供参考
webwxgetmsgimg

@wupeiwen wupeiwen changed the title 1.1.3版本maskimage方式绘制字符云失败 1.1.3版本采用maskimage方式绘制词云渲染失败 May 24, 2018
@fnjoe
Copy link

fnjoe commented Jun 5, 2018

我使用 echarts@3.2.2 , echarts-wordcloud@1.0.0 ,maskimage的形状正常,但是textcolor配置不生效。

 "echarts": "3.2.2",
 "echarts-wordcloud": "1.0.0",

......

import echarts from 'echarts';
import 'echarts-wordcloud';
import image from './human2.png';

......

var option = {
        series: [ {
            type: 'wordCloud',
            maskImage: maskImage,
            gridSize: 2,
            sizeRange: [12, 50],
            rotationRange: [-90, 90],
            shape: 'pentagon',       
            textStyle: {
                normal: {
                    color: function () {
                        const color = 'rgb(' + [
                            Math.round(Math.random() * 160),
                            Math.round(Math.random() * 160),
                            Math.round(Math.random() * 160)
                        ].join(',') + ')';
                        return color;
                    }
                },
                emphasis: {
                    shadowBlur: 10,
                    shadowColor: '#333'
                }
            },
            data: data.sort(function (a, b) {
                return b.value  - a.value;
            })
        } ]
    };

能帮忙看下不

@wupeiwen
Copy link
Author

wupeiwen commented Jun 7, 2018

@fnjoe 再次检查你的版本,应该是版本的问题,参考上方兼容性表格,祝好运

@MMDkkk
Copy link

MMDkkk commented Aug 30, 2018

@fnjoe 请问你解决了吗?

@fnjoe
Copy link

fnjoe commented Aug 31, 2018

@MMDkkk 当时重新 install 了下依赖,就OK了,表里的兼容性是对的

@sktm4a1
Copy link

sktm4a1 commented Apr 7, 2022

我使用 echarts@3.2.2 , echarts-wordcloud@1.0.0 ,maskimage的形状正常,但是textcolor配置不生效。

 "echarts": "3.2.2",
 "echarts-wordcloud": "1.0.0",

......

import echarts from 'echarts';
import 'echarts-wordcloud';
import image from './human2.png';

......

var option = {
        series: [ {
            type: 'wordCloud',
            maskImage: maskImage,
            gridSize: 2,
            sizeRange: [12, 50],
            rotationRange: [-90, 90],
            shape: 'pentagon',       
            textStyle: {
                normal: {
                    color: function () {
                        const color = 'rgb(' + [
                            Math.round(Math.random() * 160),
                            Math.round(Math.random() * 160),
                            Math.round(Math.random() * 160)
                        ].join(',') + ')';
                        return color;
                    }
                },
                emphasis: {
                    shadowBlur: 10,
                    shadowColor: '#333'
                }
            },
            data: data.sort(function (a, b) {
                return b.value  - a.value;
            })
        } ]
    };

能帮忙看下不

老哥,你这里的图是个人形吗,maskImage怎么写的啊

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

4 participants