Charts, Graphs, and more!


Simple Line Chart

 

Bar Chart

 

Horizontal Bar Chart

 

Pie Chart

 

Pie Chart with Custom Labels

 

Guage Chart

 

Adding to your page

Include the following in your headcode

		<link rel="stylesheet" href="/_resources/css/chartist.css" />
		<script src="//cdn.jsdelivr.net/chartist.js/latest/chartist.min.js"></script>
		

Using html view, add this code where you would like the chart to appear on your page.

		<div class="ct-chart ct-perfect-fourth"></div>
		

Because of the nature of responsive design it's important to understand that charts need to be able to scale and adapt to the media. In order for an element to scale, you need to rely on a certain aspect ratios (like 4:3, 3:2, 16:9 etc.) rather than specifying a fixed width and height. Refer to the table below for the aspect ratios that are available.

Available Aspect Ratios

Add this script to the footcode of your page.

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);