Skip to content

Instantly share code, notes, and snippets.

@EE2dev
Last active September 7, 2018 23:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EE2dev/9e1984c29d946b2912beb62df680ff9a to your computer and use it in GitHub Desktop.
Save EE2dev/9e1984c29d946b2912beb62df680ff9a to your computer and use it in GitHub Desktop.
you-draw-it template English-bare
license: mit
<!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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment