Chart.js how to easily import data from Indigo

Posted on
Tue May 17, 2016 8:34 am
davinci offline

Chart.js how to easily import data from Indigo

I want to use Chart.js and SQlite database for my sensors. Has anyone an idea how to add data efficiently so I can just change the ID for the devices or variables? Let's say we use the data from the last 48h.

Code: Select all
data = {
    labels: ["January", "February", "March", "April", "May", "June", "July"],
    datasets: [
        {
            label: "My First dataset",
            fill: false,
            lineTension: 0.1,
            backgroundColor: "rgba(75,192,192,0.4)",
            borderColor: "rgba(75,192,192,1)",
            borderCapStyle: 'butt',
            borderDash: [],
            borderDashOffset: 0.0,
            borderJoinStyle: 'miter',
            pointBorderColor: "rgba(75,192,192,1)",
            pointBackgroundColor: "#fff",
            pointBorderWidth: 1,
            pointHoverRadius: 5,
            pointHoverBackgroundColor: "rgba(75,192,192,1)",
            pointHoverBorderColor: "rgba(220,220,220,1)",
            pointHoverBorderWidth: 2,
            pointRadius: 1,
            pointHitRadius: 10,
            data: [65, 59, 80, 81, 56, 55, 40],
        }
    ]
};


Thanks for any input.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest