Skip to content

Instantly share code, notes, and snippets.

@wiless
Created March 25, 2016 17:51
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save wiless/f5ba46a9d4f8b2d4be85 to your computer and use it in GitHub Desktop.
Simplest CSV plotter using c3js library
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Output Plot</title>
</head>
<body>
<h1>Tutorial <h1>
<h2> Plot of the CSV data stored in <b>output.csv</b> </h2>
<div id="graph" > </div>
</body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.16/d3.min.js" type="text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/c3/0.4.10/c3.js" type="text/javascript" ></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/c3/0.4.10/c3.css">
<script type="text/javascript">
var chart = c3.generate({
bindto:"#graph",
data: {
url: 'output.csv',
// x:'x',
// y:'y'
}
});
</script>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment