jquery – HighCharts饼图图例值对齐

我只想让我的传奇名称值左对齐,百分比值对齐,我已经连续两天研究这个事情,并在论坛上开了几个不同的问题,得到了0个答案,所以任何知识的人我爱你的帮助!非常感谢你
http://jsfiddle.net/hAnCr/2/

$("document").ready(
function(){
$('#container').highcharts({
        chart:{
            type:'pie',height: 300,width: 400
              },credits:{enabled: false},colors:[
            '#5485BC','#AA8C30','#5C9384','#981A37','#FCB319','#86A033','#614931','#00526F','#594266','#cb6828','#aaaaab','#a89375'
            ],title:{text: null},plotOptions: {
            pie: {
                allowPointSelect: true,cursor: 'pointer',showInLegend: true,dataLabels: {
                    enabled: false,formatter: function() {
                        return this.percentage.toFixed(2) + '%';
                    }
                }                                   
            }
        },legend: {
            enabled: true,layout: 'vertical',align: 'right',width: 200,verticalAlign: 'middle',useHTML: true,labelFormatter: function() {
                return '<div style="text-align: left; width:130px;">' + this.name + '</div><div style="width:40px; text-align:right;">' + this.y + '%</div>';
            }
        },series: [{
            type: 'pie',dataLabels: {

                    },data: [
                ['Domestic Equity',38.5],['International Equity',26.85],['Other',15.70],['Cash and Equivalents',10.48],['Fixed Income',8.48]
            ]
        }]
    });
});

解决方法

你应该设置float:left;对于传说中的两个div.

http://jsfiddle.net/hAnCr/25/

labelFormatter: function() {
                return '<div style="text-align: left; width:130px;float:left;">' + this.name + '</div><div style="width:40px; float:left;text-align:right;">' + this.y + '%</div>';

相关文章

页面搜索关键词突出 // 页面搜索关键词突出 $(function () {...
jQuery实时显示日期、时间 html: &lt;span id=&quot...
jQuery 添加水印 &lt;script src=&quot;../../../.....
中文:Sys.WebForms.PageRequestManagerParserErrorExceptio...
1. 用Response.Write方法 代码如下: Response.Write(&q...
Jquery实现按钮点击遮罩加载,处理完后恢复 思路: 1.点击按...