JSFiddle - React, Tailwind, and code Playground
HTML
<div id="linecontainer" style="width: 980px; height: 500px; margin: 0 auto"></div>
<script type="text/javascript" src="http://dev.highcharts.com/js/testing.js"></script>
JavaScript
// JavaScript Document
//var chart;
$(document).ready(function() {
var options = {
chart: {
renderTo: 'linecontainer',
defaultSeriesType: 'line',
marginRight: 130,
marginBottom: 25,
backgroundColor: '#e3dfd4'
},
title: {
text: '',
},
xAxis: {
categories: ['2001', '2002', '2003', '2004', '2005', '2006',
'2007', '2008', '2009', '2010'],
},
plotOptions: {
series: { //line series color + size
lineWidth: .5,
lineColor: '#000',
shadow: false,
marker: { //marker fill (circle itself) + line = border
fillColor: null,
lineColor: null // inherit from series
}
},
},
yAxis: {
title: {
text: 'Brand Value',
}
},
//legend of brands
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
x: 60,
y: 80,
borderWidth: 0
},
//uses ajax to load
tooltip: {
shared: true,
crosshairs: true,
formatter: function() {
var s = '<b>' + this.x + '</b><br/>';
$.each(this.points, function(i, point) {
color = point.series.color;
if (color == '#eee') color = '#888';
s += '<span style="color: ' + color + '">' + point.series.name + '</span>: ' + Highcharts.numberFormat(point.y, 0) + '<br/>';
});
return s;
}
},
exporting: {
enabled: false
},
credits: {
enabled: false
},
//Initial series on document load
series: [{
name: 'A',
...