Skip to content

Instantly share code, notes, and snippets.

@EE2dev
Last active September 9, 2018 13:35
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/2824e611d757667f26c42a979fd2e4ba to your computer and use it in GitHub Desktop.
Save EE2dev/2824e611d757667f26c42a979fd2e4ba to your computer and use it in GitHub Desktop.
you-draw-it test
license: mit
<!DOCTYPE html>
<meta charset="utf-8"
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="Content-Type" content="text/html">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="viewport" content="width=device-width,user-scalable=yes,initial-scale=1,minimum-scale=1">
<!--link rel="stylesheet" href="../dist/css/style.css"-->
<link rel="stylesheet" href="https://ee2dev.github.io/ydi/css/style.css">
</head>
<body>
<!--script src="../node_modules/d3/dist/d3.js"></script-->
<script src="https://d3js.org/d3.v5.min.js"></script>
<!--script src="../dist/js/youdrawit.min.js"></script-->
<script src="https://ee2dev.github.io/ydi/js/youdrawit.min.js"></script>
<script>
var questions = [];
var question = {};
question = {
data: [
{2015: 1503451},
{2016: -1491897},
{2017: 1495333},
{2018: 1453203},
{2019: 1458438},
{2020: 1442801}
]
};
questions.push(question);
question = {
data: 17.1,
};
questions.push(question);
var myChart = youdrawit
.chart()
.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