Highcharts Demo
author(s): Torstein Hønsi
by koh_edwin
HTML
<script src="https://code.highcharts.com/highcharts.js"></script>
<div id="container"></div>
CSS
#container {
min-width: 300px;
max-width: 800px;
margin: 0 auto;
}
JavaScript
function degrees_to_radians(degrees)
{
var pi = Math.PI;
return degrees * (pi/180);
}
function renderMarkers () {
//marker.SetMarkers;
Highcharts.SVGRenderer.prototype.symbols.parallelogram = function(x, y, w, h) {
x=x+Math.floor(0.5*w);
y=y+Math.floor(0.5*w);
w=Math.floor(0.5*w);
return ['M', (x -w), (y+w),
'L', (x -Math.floor(0.5*w)), (y-w),
'L', (x +w), (y-w),
'L', (x +Math.floor(0.5*w)), (y+w),
'L', (x -w), (y+w),'z']
}
Highcharts.SVGRenderer.prototype.symbols.doubleCircle = function(x, y, w, h) {
x=x+Math.floor(0.5*w);
y=y+Math.floor(0.5*w);
const r=w/3
w=Math.floor(0.5*w);
return ['M', x-r, y-r,
'a', r, r, 0, 1, 0, (r*2),0,
'a', r, r, 0, 1, 0, -(r*2),0,
'M', x-r, y+r,
'a', r, r, 0, 1, 0, (r*2),0,
'a', r, r, 0, 1, 0, -(r*2),0,
'z']
//x=x+Math.floor(0.5*w);
//y=y+Math.floor(0.5*w);
//const r=w/3
//w=Math.floor(0.5*w);
//return ['M', x-2*r, y,
//'a', r, r, 0, 1, 0, (r*2),0,
//'a', r, r, 0, 1, 0, -(r*2),0,
//'M', x, y,
//'a', r, r, 0, 1, 0, (r*2),0,
//'a', r, r, 0, 1, 0, -(r*2),0,
//'z']
}
Highcharts.SVGRenderer.prototype.symbols.asterisk = function(x, y, w, h) {
x=x+Math.floor(0.5*w);
y=y+Math.floor(0.5*w);
//w=Math.floor(0.5*w);
//return ['M 80 80 A 45 45, 0, 0, 0, 125 125 L 125 80 Z']
return [
'M', x+10.962,y+6.966,
'c.036.108.108.162.216.162s.198-.054.27-.162',
'L',x+15.444,y+.271,
'c.108-.181.306-.271.594-.271.252,0,.468.072.648.216',
'l',2.916,2.053,
...