Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
ant-design-pro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
duanledexianxianxian
ant-design-pro
Commits
88faa662
Commit
88faa662
authored
Oct 31, 2017
by
nikogu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix tagCloud repain
parent
61cd9c1a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
src/components/Charts/TagCloud/index.js
src/components/Charts/TagCloud/index.js
+6
-6
No files found.
src/components/Charts/TagCloud/index.js
View file @
88faa662
...
...
@@ -73,7 +73,7 @@ class TagCloud extends PureComponent {
this
.
node
=
node
;
}
@
Debounce
(
3
00
)
@
Debounce
(
5
00
)
renderChart
=
(
newData
)
=>
{
const
data
=
newData
||
this
.
props
.
data
;
if
(
!
data
||
data
.
length
<
1
)
{
...
...
@@ -88,11 +88,6 @@ class TagCloud extends PureComponent {
width
=
this
.
root
.
offsetWidth
*
4
;
}
// clean
if
(
this
.
node
)
{
this
.
node
.
innerHTML
=
''
;
}
data
.
sort
((
a
,
b
)
=>
b
.
value
-
a
.
value
);
const
max
=
data
[
0
].
value
;
...
...
@@ -114,6 +109,11 @@ class TagCloud extends PureComponent {
});
layout
.
image
(
imgUrl
,
(
imageCloud
)
=>
{
// clean
if
(
this
.
node
)
{
this
.
node
.
innerHTML
=
''
;
}
// 执行词云布局函数,并在回调函数中调用G2对结果进行绘制
imageCloud
.
exec
((
texts
)
=>
{
const
chart
=
new
G2
.
Chart
({
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment