Browse Source

more ppt testing

pull/10/head
crunch 3 months ago
parent
commit
abf4d1d2c3
1 changed files with 23 additions and 17 deletions
  1. +23
    -17
      Consulta_project/landing/static/js/stats_test.js

+ 23
- 17
Consulta_project/landing/static/js/stats_test.js View File

@@ -1,31 +1,37 @@
function createBarChart(series, labels, target_id) {
/* console.log(series + " " + labels + " " + target_id); */
var ctx = document.getElementById("stats").getContext('2d');
var chart = new Chart(ctx, {
window.onload = function() {
function createBarChart(series, labels, target_id) {
/* console.log(series + " " + labels + " " + target_id); */
var ctx = document.getElementById("stats").getContext("2d");
var chart = new Chart(ctx, {
// The type of chart we want to create
type: 'bar',
type: "bar",

// The data for our dataset
data: {
labels: ["test", "kek", "lel"],
datasets: [{
label: 'Number of votes',
backgroundColor: 'rgb(0,188,140)',
borderColor: '#282d32',
data: [1, 2, 3]
}]
labels: ["test", "kek", "lel"],
datasets: [
{
label: "Number of votes",
backgroundColor: "rgb(0,188,140)",
borderColor: "#282d32",
data: [1, 2, 3]
}
]
},

// Configuration options go here
options: {
events: null,
scales: {
yAxes: [{
yAxes: [
{
ticks: {
beginAtZero: true
beginAtZero: true
}
}]
}
]
}
}
});
}
});
}
};

Loading…
Cancel
Save