Template - version English-bare for you-draw-it.
For documentation see https://github.com/EE2dev/you-draw-it
license: mit |
Template - version English-bare for you-draw-it.
For documentation see https://github.com/EE2dev/you-draw-it
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<head> | |
<title>My quiz</title> | |
<meta name="viewport" content="width=device-width,user-scalable=yes,initial-scale=1,minimum-scale=1"> | |
<link rel="stylesheet" href="https://ee2dev.github.io/ydi/css/style.css"> | |
</head> | |
<body> | |
<script src="https://d3js.org/d3.v5.min.js"></script> | |
<script src="https://ee2dev.github.io/ydi/js/youdrawit.min.js"></script> | |
<script> | |
var questions = []; | |
var question = {}; | |
var globals = { default: "en" }; | |
question = { | |
heading: "Question 1", | |
data: [ | |
{2017: 150}, | |
{2018: 142}, | |
{2019: 145}, | |
{2020: 170}, | |
], | |
}; | |
questions.push(question); | |
question = { | |
heading: "Question 2", | |
data: 17.1, | |
}; | |
questions.push(question); | |
var myChart = youdrawit | |
.chart() | |
.globals(globals) | |
.questions(questions); | |
d3.select("body") | |
.append("div") | |
.attr("class", "chart") | |
.call(myChart); | |
</script> | |
</body> | |
</html> |