Skip to content

Instantly share code, notes, and snippets.

@ArthurZ
Created November 28, 2014 20:33
Show Gist options
  • Save ArthurZ/b133179a28814321970d to your computer and use it in GitHub Desktop.
Save ArthurZ/b133179a28814321970d to your computer and use it in GitHub Desktop.
Getting Started With Chartist
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="//cdn.jsdelivr.net/chartist.js/latest/chartist.min.css">
<script src="//cdn.jsdelivr.net/chartist.js/latest/chartist.min.js">
</script>
<script>
var data =
{
// A labels array that can contain any sort of values
labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'],
// Our series array that contains series objects or in this case series data arrays
series: [[5, 2, 4, 2, 0]]
};
// Create a new line chart object where as first parameter we pass in a selector
// that is resolving to our chart container element. The Second parameter
// is the actual data object.
new Chartist.Line('.ct-chart', data);
</script>
</head>
<body>
<div class="ct-chart ct-perfect-fourth">Testing Chartist</div>
</body>
</html>
@ArthurZ
Copy link
Author

ArthurZ commented Nov 28, 2014

The combination of these two hints has fixed my issue.
Thank you gionkunz!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment