Skip to content

Commit

Permalink
release 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
pissang committed Jan 16, 2021
1 parent 47e6182 commit 7e9a6ff
Show file tree
Hide file tree
Showing 6 changed files with 1,466 additions and 15,339 deletions.
41 changes: 25 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ import * as echarts from 'echarts'
import 'echarts-wordcloud';
```

NOTE:

echarts-wordcloud@2 is for echarts@5
echarts-wordcloud@1 is for echarts@4

## Usage

```js
Expand Down Expand Up @@ -79,22 +84,28 @@ chart.setOption({
// Allow word bigger than the size of the canvas to be drawn
drawOutOfBound: false,

// If perform layout animation.
// NOTE disable it will lead to UI blocking when there is lots of words.
layoutAnimation: true,

// Global text style
textStyle: {
normal: {
fontFamily: 'sans-serif',
fontWeight: 'bold',
// Color can be a callback function or a color string
color: function () {
// Random color
return 'rgb(' + [
Math.round(Math.random() * 160),
Math.round(Math.random() * 160),
Math.round(Math.random() * 160)
].join(',') + ')';
}
},
emphasis: {
fontFamily: 'sans-serif',
fontWeight: 'bold',
// Color can be a callback function or a color string
color: function () {
// Random color
return 'rgb(' + [
Math.round(Math.random() * 160),
Math.round(Math.random() * 160),
Math.round(Math.random() * 160)
].join(',') + ')';
}
},
emphasis: {
focus: 'self',

textStyle: {
shadowBlur: 10,
shadowColor: '#333'
}
Expand All @@ -106,8 +117,6 @@ chart.setOption({
value: 366,
// Style of single text
textStyle: {
normal: {},
emphasis: {}
}
}]
}]
Expand Down
Loading

0 comments on commit 7e9a6ff

Please sign in to comment.