I have 4 different models, and of course 4 different database tables. I need to make a line chart, that shows, how many new records, of each table have been made on a particular day. The chart must show records of current month, but only show the days, on which at least one record has been created. I currently have such chart made with jQuery, but I don't know, how to make an array, to pass to the chart. The array should look like this (except, that I have 4 types of records, so that would be (a, b, c, d):
data: [
{ date: '07-31-2015', a: 6, b: 90 },
{ date: '08-01-2015', a: 0, b: 90 },
{ date: '08-02-2015', a: 87, b: 90 },
{ date: '08-03-2015', a: 95, b: 90 },
{ date: '08-04-2015', a: 86, b: 90 },
{ date: '08-05-2015', a: 43, b: 90 },
{ date: '08-06-2015', a: 25, b: 90 },
{ date: '08-07-2015', a: 0, b: 90 },
]