-
Notifications
You must be signed in to change notification settings - Fork 185
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
feat: enable or disable scatter dot on charts except scatter chart #769
Merged
theiliad
merged 7 commits into
carbon-design-system:master
from
JennChao:scatter-option
Sep 11, 2020
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e434491
feat: enable or disable scatter dot on charts except scatter chart
JennChao f55700c
refactor: rename variable
JennChao 68f0af7
Merge branch 'master' of https://github.com/JennChao/carbon-charts in…
JennChao d1aa973
Merge branch 'master' of https://github.com/JennChao/carbon-charts in…
JennChao 77ebcf3
fix: always enable scatter dot for bubble chart
JennChao e26af21
Merge branch 'master' of https://github.com/JennChao/carbon-charts in…
JennChao a141dfc
refactor: have enabled option within points
JennChao File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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.
probably under the
points
flag asenabled
?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.
if we move
scatterDotEnabled
under thepoints
flag asenabled
, then only scatter chart can access the config option. However, axis charts, such as line chart and area chart, also need to access this config option as well.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.
Don't think this'd be the case. Any chart that uses scatter should extend scatter chart and their options should do the same
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.
Sometimes we don't want to have the scatter dot displayed. That's the reason why I setup this
scatterDotEnabled
option for letting the user enable or disable the scatter dot. And please note that, there will always be scatter dot displayed on scatter charts. Only line chart, area chart, and step chart can have the option to disable scatter dot.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.
Yes in the screenshot you have above,
AreaChart
should be extending scatter which means theenabled
flag would be available in thereThere 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.
I think I need to figure out what you mean by saying
extending scatter chart
. Both area chart and scatter chart extendAxisChart
and have scatter component in them. That's the reason why we can see the scatter dot. And from my understanding, scatter component will only be newed inAxisChart
.From what I have observed above, I think whether we want to show or not show the scatter dot,
Scatter
component, should not be configure inscatterChart
option.scatterDotEnabled
should be specify inaxisChart
option so all the axis charts withScatter
component can access this config option.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.
what @theiliad is saying is that the
ScatterChartOptions
extends
theAxisChartOptions
meaning that all charts that have Scatter dots will haveScatterChartOptions
in addition to theAxisChartOptions
.so if you change ScatterChartOptions like this (charts.ts):
than you can update how you access the config in both scatter-stacked.ts and scatter.ts:
const isScatterEnabled = Tools.getProperty(this.model.getOptions(), "points", "enabled");