Commit b6065cab authored by s7_spruge_k's avatar s7_spruge_k
Browse files

still now ork

parent fda5ae0a
......@@ -20,11 +20,11 @@ var allEvents = JSON.parse(document.getElementById("events").value)
window.onload = function () {
var dataFromEvents = {label: "apple", y: 3};
var dataFromEvents = [];
// for (i = 0; i < allEvents.length; i++) {
// dataFromEvents: { label: allEvents[i].name, y: allEvents[i].eventCount }
// }
for (i = 0; i < allEvents.length; i++) {
dataFromEvents[i] = { label: allEvents[i].name, y: allEvents[i].eventCount }
}
console.log(dataFromEvents);
......@@ -36,16 +36,14 @@ window.onload = function () {
{
// Change type to "doughnut", "line", "splineArea", etc.
type: "column",
// dataPoints: dataFromEvents;
//dataPoints : dataFromEvents;
dataPoints: [
{ label: "apple", y: 3 },
{ label: "orange", y: 15 },
{ label: "banana", y: 25 },
{ label: "mango", y: 30 },
{ label: "grape", y: 28 }
]
{ label: "grape", y: 28 }]
}
]
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment