-
Notifications
You must be signed in to change notification settings - Fork 12k
Allow functions to be specified for scale grid line options #6700
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
Conversation
|
Just FYI, the build is failing |
|
Looks like I have a lint error in the HTML sample |
kurkle
left a comment
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.
Might be a stupid idea, but should we consider making grid lines Elements?
I'm trying to do an |
bbb8a99 to
5cc283c
Compare
|
Note: build is failing |
|
Thanks @kurkle. Looks like I rebased something badly |
1d4ed53 to
f3c0baa
Compare
|
The docs don't specify what the function context is which might be useful since it's not the normal context that's passed in.
Could you just make this one scriptable and not indexable? (though even with indexing it's not quite clear to me what would be wrong. the user could theoretically pass an array of arrays) |
|
@benmccann Not quite in the scope of this PR: Another thing I was thinking about is left cfg = {
type: 'line',
data: {
datasets: [{
border: {
width: 2
},
point: {
backgroundColor: 'red'
},
data: [1, 2, 3]
}This would be easier in some aspects. Could be also faster in some cases (define all border properties in a single function call vs 4 different calls when scriptable). |
|
@etimberg looks like this one will need to be rebased |
f3c0baa to
09cc1e4
Compare
|
Lgtm. The only comment I had was that the docs don't specify what the function context is. I think that might be useful to include since it's not the normal scriptable options context that's passed in. |
|
@benmccann I added a note on the context format |
Builds off of #6697 to add function options for grid line styling. I couldn't support a function for the
borderDashoption because the type is an array and so indexing would go badly.I added a sample, the image of which is shown below