Asking for help: How to pull data for c3.js charts

Tuesday, January 20th 2015

What the page looks like loaded

I'm building out this feature to display a basic graph of page views on my blog using google analytics. I'm totally open to redesigning how the data is being delivered if anyone has suggestions. What I really want is the correct way to do this :)

Here is the current running branch on GitHub. The code as of right now is using Rails to consume the google analytics API. Then in the index controller action I run a method that formats the data in columns for C3.js. The data looks like this:

  "analytics": [

In Ember land I pull the data by doing getJSON, but I want to use ember data so I can pass my auth token and secure my API. So instead I could do something like"analytics");. Does anyone have suggestions? Basically I want to give the C3.js charts data using ember data.