Skip to content
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

Merged
merged 3 commits into from
Oct 23, 2016
Merged

Sample File Updates #3504

merged 3 commits into from
Oct 23, 2016

Conversation

etimberg
Copy link
Member

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.

…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.
Copy link
Member

@simonbrunel simonbrunel left a 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 = {
Copy link
Member

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.

Copy link
Member Author

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.

@etimberg
Copy link
Member Author

I will rename the animation folder. I like the idea of putting the scales under scales/type/* so I will make that change as well

@etimberg
Copy link
Member Author

Renamed chartColors.js to utils.js. I moved randomScalingFactor into there. I also moved the files around so that scales are in a better spot and AnimationCallbacks is now animation.

@etimberg etimberg merged commit 80bd08b into master Oct 23, 2016
@etimberg etimberg deleted the update-sample-styles branch October 23, 2016 21:33
@simonbrunel simonbrunel added this to the Version 2.4 milestone Oct 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants