Back Button Laravel

Charting and You

At some point, you'll be called upon to prepare a series of graphs, or charts for your business. It's scary at first; where do you even begin? But, luckily, you'll find that, thanks to tools like Chart.js, it has never been easier to accomplish such a task. I'll show you how, one easy-to-understand step at a time.

8 episodes
1:17:24 hrs
Start Series
    1. Run Time 5:03 Free

      Let's begin with the "hello world" of graphs, using the excellent Chart.js library.

      View the source for this first example on

    2. Let's take another step. What if we pull Chart.js in through NPM, and then leverage Browserify, so that we may write modern ES6+ code? Let's get started on that workflow in this episode.

    3. Let's continue working on structure, as we create a reusable graph Vue component. If you've worked your way through any of the Vue series at Laracasts, this should all be a cinch!

      View the relevant source for this lesson on GitHub.

    4. Run Time 7:29

      Chart.js can automatically generate a chart "legend" for you; however, it's up to you to insert it into the DOM and add any applicable styling. I'll show you the basic workflow in this lesson.

    5. In this lesson, we'll create a master Graph component, to which all other specific graphs may extend. This way, we may use custom properties that are unique to each type of graph that are application requires.

      View the source for this lesson on GitHub.

    6. Imagine that your boss assigns you the task of rendering a graph to display the company's monthly revenue. Well, it sounds like we'll need to perform the proper database query (which groups and sums the revenue for the month), and then we'll of course pass that data to our graph component. Let's get started.

      View the source for this lesson on GitHub.

    7. Run Time 10:37

      Now what if you want your graph to instead fire an AJAX request to fetch your desired data? No problem! Let's add a url custom property to our graph component, and then leverage the Vue Resource plugin to perform the request.

      View the source code for this lesson on GitHub.

    8. Run Time 16:55

      How might we make our graphs more dynamic? Maybe we want to limit revenue to only x number of days; and, further, we should be able to modify this range on the fly, without requiring a page reload. Well, I'll show you how!

      View the source code for this lesson on GitHub.

You May Also Enjoy...

Here are some additional series that may be up your alley.

Vue Learning Vue 1.0: Step By Step

Mark my words: Vue.js will sky-rocket in popularity in 2016. It's that good. Want to get ahead of the pack? Let me show you the building blocks of Vue...

3:14:36 hrs
Vue Learn Vue 2: Step By Step

Vue is easily one of the most exciting additions to the front-end world in many years. With its intuitive API, and the fact that it can be applied to...

7:43:06 hrs
Testing Testing Vue

How in the world are we supposed to unit test Vue components? Is it even possible? Why, yes. Yes it is! I'll show you the full process, step by step....

2:10:04 hrs