highcharts - How to add border in polygon plot? -


i plotting polygon series using highcharts cannot add border it. tried use plotoptions.series.borderwidth no effect.

code:

  $(function () {      $('#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'         },         series: [{             name: 'target',             type: 'polygon',             data: [[153, 42], [149, 46], [149, 55], [152, 60], [159, 70], [170, 77], [180, 70],                 [180, 60], [173, 52], [166, 45]],             color: highcharts.color(highcharts.getoptions().colors[0]).setopacity(0.5).get(),             enablemousetracking: false          }],         tooltip: {             headerformat: '<b>{series.name}</b><br>',             pointformat: '{point.x} cm, {point.y} kg'         }     }); }); 

how can add plot polygon series?

you can set line-width show border around polygon using :

 plotoptions: {         series: {             linewidth: 3 //whatever width want         }     } 

see fiddle code here

if want set different color in border of polygon use :

  plotoptions: {         series: {             linewidth: 3,             linecolor:'#ff9634' // whatever border color want         }     }  

see different border color on code here


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -