Javascript examples for highcharts:Chart Color
Additive Color in polygon chart
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.9.1.js"></script> <script type="text/javascript"> $(function () {/*w w w . j av a2 s . c om*/ $('#container').highcharts({ title: { text: 'Height vs Weight' }, subtitle: { text: 'Polygon series in Highcharts' }, xAxis: { gridLineWidth: 1, title: { enabled: true, text: 'Height (cm)' }, startOnTick: true, endOnTick: true, showLastLabel: true }, yAxis: { title: { text: 'Weight (kg)' } }, legend: { layout: 'vertical', align: 'right', verticalAlign: 'middle' }, plotOptions: { polygon: { borderColor: 'grey', borderWidth: 2 } }, series: [{ name: 'Target1', type: 'polygon', data: [[153, 42], [149, 46], [187, 61], [190, 57]], color: 'rgba(55,55,155,0.5)', enableMouseTracking: true },{ name: 'Target2', type: 'polygon', data: [[153, 52], [149, 56], [187, 71], [190, 67]], color: 'rgba(155,155,155,0.5)', borderWidth:1, borderColor:'black', enableMouseTracking: true },{ name: 'Target2', type: 'polygon', data: [[153, 42], [149, 46], [187, 71], [190, 79]], color: 'rgba(155,55,55,0.5)', borderWidth:1, borderColor:'black', enableMouseTracking: true }], tooltip: { headerFormat: '<b>{series.name}</b><br>', pointFormat: '{point.x} cm, {point.y} kg' } }); }); </script> </head> <body> <script src="https://code.highcharts.com/highcharts.js"></script> <script src="https://code.highcharts.com/highcharts-more.js"></script> <script src="https://code.highcharts.com/modules/exporting.js"></script> <div id="container" style="min-width: 310px; height: 400px; max-width: 600px; margin: 0 auto"></div> </body> </html>