Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
fix #8009 & #5969, symbol symbolSize and opacity setting for category itemStyle in graph #9171
fix #8009 & #5969, symbol symbolSize and opacity setting for category itemStyle in graph #9171
Changes from 4 commits
c309055
4a8e61c
fa319d2
81e8caf
104005c
d011ec2
360e0d5
8767981
0e390af
d801e18
9dccfd0
886d4c5
2c2d8ef
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please mention your code style. Space after
,
and;
at the end.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Space after
;
,for
, and)
. Please also check other places.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you test
graph-symbol.html
? It seemsitemModel.getShallow('symbolOffset', true)
always return undefined, so thatsymbolOffset: ['30%', 0]
is config is not used. This doesn't seem right.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both symbolOffset and other items return undefined, but somehow it works. I have checked that it can be consoled during the upper section.
In my local server, changing the symbolOffset do bring some effects to the symbol. You could put the percentage larger to see that.
But I am not sure whether the position is right since it is not computed by my code...
Really really sorry for those mistakes I have made...
Here is a new version with formatted code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reduct the latter symbolStyleList with symbolOffset and symbolRotate, it also works. Others need both two functions to do that.
In fact I don't know why...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, we have to make sure we understand our changes. 🤣
I'll check it later. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After we have done all of this, there is another work need to do:
properties like
color
,opacity
,symbolSize
have been saved to data bydata.setItemVisual
,but only
color
is retrieved from data (by data.getItemVisual(...)) and be used to render inGraphView.js
.We need to make
opacity
andsymbolSize
follow the same way, and then the entire patch can work.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ummm, I am confused about this. Where is color retrieved?
The opacity and symbolSize also work currently...What's wrong? O.O
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
color
,opacity
,symbolSize
are retrieved insrc/chart/helper/Symbol.js
(search'getItemVisual'
in this file). Thesrc/chart/helper/Symbol.js
, used byGraphView.js
, is a common module abstracting the drawing and other behaviors of each node of the graph.