-
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
Sample File Updates #3504
Sample File Updates #3504
Conversation
…ing colours that should be used by all samples. I added new samples to explain behaviour and modified all samples to have consistent styling. In updating the samples, I removed the use of jQuery and instead use standard methods. For the custom tooltip samples, I updated the styling to show color boxes like the regular tooltips.
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.
Awesome work @etimberg, much cleaner and consistent and I like the jQuery dependency removal. A minor note on the directory structure: what do you think to gather all scales together under scales/{scale_type}/*
to avoid the composed directory name? It would make the samples directory simpler to browse. I would also rename the AnimationCallback
directory to simply animation
.
@@ -0,0 +1,9 @@ | |||
window.chartColors = { |
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.
We could generalize this file and move in it all samples helpers (e.g. randomScalingFactor
)? It would be renamed to helpers.js
or utils.js
? Similar to the utils.js file in the deferred plugin.
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.
Sure, I can do that. It will definitely simplify things.
I will rename the animation folder. I like the idea of putting the scales under |
Renamed |
I added a new helper,
samples/chartColors.js
that defines the colors that match the docs. I updated all of the samples to use these colours.I improved sample organization, with common samples grouped into folders. I added new samples that allow comparing different settings. For example,
samples/tooltips/interaction-modes.html
creates a number of charts that allow the user to compare the different interaction mode settings.