Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Treehouse Charts

Hi, I have created an project here which will use the great chart.js here. To pull JSON points data for team treehouse and build a chart for each subject. Just download the repo and change the userName variable to see yours. Still some tweaks to be made but looking for feedback

2 Answers

Andrew Chalkley
STAFF
Andrew Chalkley
Treehouse Guest Teacher

Hi Adam Sackfield

Great project. I've taken a look at your code and put these videos together for you. In the first video I'll give you feedback in the form of code improvements and the second video will go over creating a jQuery Plugin so the same code can be used multiple times on the same page with no code duplication.


Improving JavaScript Code


Making a Plugin

Around 3:18 in this video I do options.radius not options.radiusSize however in my fork of the project on github has the corrected code.


For those who are interested in following along with Improving JavaScript Code and Making a Plugin just watch the video and download the code from the github project and download the plugin_example.html.

Hope this helps!

Regards
Andrew

This is brilliant Andrew Chalkley really appreciate you taking the time and I have learnt a lot in those 20mins. Think jQuery is the language I am starting to enjoy working with the most. Also sass so perhaps this is the way to study more for me.

Thanks again

James Mejia
James Mejia
7,726 Points

Fantastic post. I learned a lot! Do these types of posts get featured? I'd love to see more.

I agree it would be great it they added them as a featured post.

Constantine Antonakos
Constantine Antonakos
9,741 Points

You rock, Andrew! This is an awesome forum video!

Also, couldn't you place the "totals" string in the 'exclude' array to ignore it?

It's awesome that you've done that. I'll have to remember to submit projects to the forum in case I get some great advice like this.