javascript - HighCharts Pie Chart legend Alignment -


basically i'd use data name , value in legened, have them spaced data name aligned left , data value aligned right this;

name1           val1 name2           val2 

etc. defaults

name1 val1 name2 val2 

with space in between set, if name 1 10 characters , name 2 8 characters staggered this;

name1isthis val1 name2lookslikethis val2 

any appreciated. here code , fiddle. http://jsfiddle.net/hancr/1/

$("document").ready( function(){ $('#container').highcharts({         chart:{type:'pie'},         credits:{enabled: false},         colors:[             '#5485bc', '#aa8c30', '#5c9384', '#981a37', '#fcb319',     '#86a033', '#614931', '#00526f', '#594266', '#cb6828', '#aaaaab', '#a89375'             ],         title:{text: null},          tooltip: {             pointformat: '<b>{point.y}%</b>',             percentagedecimals: 1         },         plotoptions: {             pie: {                 allowpointselect: true,                                  cursor: 'pointer',                 showinlegend: true,                 datalabels: {                     enabled: false                                        }                                                }         },         legend: {             enabled: true,             layout: 'vertical',             align: 'right',             verticalalign: 'middle',             labelformatter: function() {                 return this.name + ' ' + this.y + '%';             }         },         series: [{             type: 'pie',             datalabels:{              },             data: [                 ['domestic equity', 38.5],                 ['international equity', 26.85],                 ['other', 15.70],                 ['cash , equivalents', 10.48],                 ['fixed income', 8.48]             ]         }]     }); }); 


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -