-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
Mixed chart #5134
Mixed chart #5134
Changes from 3 commits
619d1f6
ee8e195
76b13d1
cd75f9b
1a32e89
7cdd680
a01f580
042920e
05669ed
2f9727b
6e84627
de80075
f24d979
8ea9ee6
32f14aa
892dc15
25119d4
780f4eb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,6 +37,10 @@ defaults._set('scatter', { | |
module.exports = function(Chart) { | ||
|
||
// Scatter charts use line controllers | ||
Chart.controllers.scatter = Chart.controllers.line; | ||
Chart.controllers.scatter = Chart.controllers.line.extend({ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's the reason for overriding and returning false here? Shouldn't that have already happened? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From what i understand, with mixed chart, the default style applied is the style of the 'main' chart. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But now that I think about it, is being able to show lines in a scatter chart a wanted feature ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think lines on a scatter chart is something that should be possible and its currently the default behaviour There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So does that mean a test should be added via another PR to make sure it stays that way in the future ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would think adding a test to ensure that a scatter chart can optionally use a line or not is a good idea. @simonbrunel thoughts? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't see why scatter charts couldn't display lines, so yes these |
||
lineEnabled: function() { | ||
return false; | ||
}, | ||
}); | ||
|
||
}; |
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.
[nit] I would put
defaultBar.scales.xAxes[0]
into a local variable to save a few bytes