Skip to content

Instantly share code, notes, and snippets.

@EE2dev
Last active September 10, 2018 21:30
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/e085741d2376c4c12800c855f381266d to your computer and use it in GitHub Desktop.
Save EE2dev/e085741d2376c4c12800c855f381266d to your computer and use it in GitHub Desktop.
you-draw-it template German
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: "de",
// header: "Viel Spass beim Quiz",
// subHeader: "Versuchen Sie die richtige Antwort zu erraten und sehen Sie selbst, wie gut Sie sich auskennen!",
// drawAreaTitle: "Ihre\nEinschätzung",
// drawLine: "Zeichnen Sie von hier\nden Verlauf zu Ende",
// drawBar: "Ziehen Sie den Balken\nauf die entsprechende Höhe",
// resultButtonText: "Zeig mir die Lösung!",
// resultButtonTooltip: "Zeichnen Sie Ihre Einschätzung. Der Klick verrät, ob sie stimmt.",
// showScore: true,
// scoreButtonText: "Zeig mir, wie gut ich war!",
// scoreButtonTooltip: "Klicken Sie hier, um Ihr Gesamtergebnis zu sehen",
// scoreTitle: "Ihr Ergebnis:",
// scoreHtml: "<b>Ausgezeichnet!!</b>",
// or scoreHtml: [{lower: 0, upper: 50, html: "<b>Das war wohl nichts!!</b>"}, {lower: 50, upper: 101, html: "<b>Ausgezeichnet!!</b>"}],
};
// ----- for additional questions, copy FROM here
question = {
data: [
{2017: 150},
{2018: 142},
{2019: 145},
{2020: 170},
],
heading: "Frage 1",
// subHeading: "Kontext zu Frage 1",
// resultHtml: "War das wirklich so <b>schwer</b>?",
unit: "Mio",
// precision: 1,
// lastPointShownAt: 2018,
// yAxisMin: ,
yAxisMax: 250,
};
questions.push(question);
// ----- for additional questions, copy TO here
// ----- for additional questions, copy FROM here
question = {
data: 17.1,
heading: "Frage 2",
// subHeading: "Kontext zu Frage 2",
// resultHtml: "War das wirklich so <b>schwer</b>?",
unit: "Mio",
precision: 3,
// lastPointShownAt: ,
// yAxisMin: ,
// yAxisMax: ,
};
questions.push(question);
// ----- for additional questions, copy TO here
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