× Search About Posts Code Music Links
Blank Try
experiment
lots
learn
more

Chartist JS

Updated on
Last site update: 8 May 2024

Finger strength of max-hang on a 20mm edge for 5 seconds

Alex MegosWill BosiMax MilneJim PopeSteve McClureMagnus MitboBen Moon100102.5105107.5110112.5115117.5120122.5125127.5130132.5135137.5140

Max-weight 5s hang on a 20mm edge

Alex MegosWill BosiMax MilneJim PopeSteve McClureMagnus MitboBen Moon012.52537.55062.57587.5100112.5125137.5

Here is the code for the first graph. Note the last line where you have to include each block (data and options in this case).

 1var data = {
 2    // A labels array that can contain any sort of value
 3    labels: ['Ben Moon', 'Magnus Mitbo', 'Steve McClure', 'Jim Pope', 'Max Milne', 'Will Bosi', 'Alex Megos'],
 4    // Our series array that contains series objects or in this case series data arrays
 5    series: [
 6    [101, 106, 115, 116, 118, 130, 132]
 7    ]
 8};
 9
10var options = {
11    low: 100,
12    high: 140,
13    horizontalBars: true,
14    reverseData: true,
15    axisY: {
16        offset: 70
17    }
18}
19
20// Create a new bar chart object where as first parameter we pass in a selector
21// that is resolving to our chart container element. The Second parameter
22// is the actual data object.
23new Chartist.Bar('.ct-chart', data, options);