Skip to content

Commit

Permalink
release 2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Ovilia committed Nov 24, 2022
1 parent ada5d36 commit 1dafd88
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 36 deletions.
23 changes: 20 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import * as echarts from 'echarts';
import 'echarts-wordcloud';
```

NOTE:
⚠️ NOTE:

echarts-wordcloud@2 is for echarts@5
echarts-wordcloud@1 is for echarts@4
Expand All @@ -52,7 +52,7 @@ chart.setOption({
shape: 'circle',

// Keep aspect ratio of maskImage or 1:1 for shapes
// This option is supported from echarts-wordcloud@2.1.0
// This option is supported since echarts-wordcloud@2.1.0
keepAspect: false,

// A silhouette image which the white area will be excluded from drawing texts.
Expand Down Expand Up @@ -85,10 +85,17 @@ chart.setOption({

gridSize: 8,

// set to true to allow word being draw partly outside of the canvas.
// set to true to allow word to be drawn partly outside of the canvas.
// Allow word bigger than the size of the canvas to be drawn
// This option is supported since echarts-wordcloud@2.1.0
drawOutOfBound: false,

// if the font size is too large for the text to be displayed,
// whether to shrink the text. If it is set to false, the text will
// not be rendered. If it is set to true, the text will be shrinked.
// This option is supported since echarts-wordcloud@2.1.0
shrinkToFit: false,

// If perform layout animation.
// NOTE disable it will lead to UI blocking when there is lots of words.
layoutAnimation: true,
Expand Down Expand Up @@ -127,3 +134,13 @@ chart.setOption({
}]
});
```

## Changelog

### 2.0.0

- [chore] Support Apache ECharts 5
- [chore] Sync with the latest wordcloud2.js and use prettier to format the code
- [feature] Add `keepAspect` option to keep aspect ratio of maskImage or 1:1 for shapes
- [feature] Add `drawOutOfBound` option to allow words to be drawn partly outside of the canvas
- [feature] Add `shrinkToFit` option to shrink the text if the font size is too large for the text to be displayed
27 changes: 18 additions & 9 deletions dist/echarts-wordcloud.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/echarts-wordcloud.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/echarts-wordcloud.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/echarts-wordcloud.min.js.map

Large diffs are not rendered by default.

38 changes: 19 additions & 19 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "echarts-wordcloud",
"version": "2.1.0-beta",
"version": "2.1.0",
"description": "ECharts wordcloud extension based on wordcloud2.js",
"main": "index.js",
"author": "",
Expand All @@ -18,7 +18,7 @@
"url": "https://github.com/ecomfe/echarts-wordcloud.git"
},
"devDependencies": {
"echarts": "^5.2.2",
"echarts": "^5.4.0",
"prettier": "^2.5.1",
"webpack": "^5.11.1",
"webpack-cli": "^4.3.1"
Expand Down

0 comments on commit 1dafd88

Please sign in to comment.