我想将标签对齐饼图的右侧。目前它是最重要的。我该如何改变?
这是我的代码:
$json_ar = array(
["label"=> "Management Frames", "data"=> $cnt_mgt, "color"=> "#50D050"],
["label"=> "Control frames", "data"=> $cnt_control, "color"=> "#005CDE" ],
[ "label"=> "Data Frames", "data"=> $cnt_data, "color"=> "#A52A2A" ],
);
//Control vs Data vs Management
$json = encode_to_json($json_ar);
$pie = " <script type='text/javascript'>
$(function () { $.plot($('#cdm_pie'),$json,{series: {pie: {radius:120, show: true, label:{show:true, radius:0.5, formatter:function(label,series){var percent = Math.round(series.percent);return(' <b>'+percent+ '%</b>');} }}},legend:{show:true,}}); });
</script>";
$tables["cdm"]="<div id='wrapper' style='display: inline-flex'>
<div id='cdm_pie' style='float: none;width: 250px;height: 250px;'></div>
$pie
</div>";
它产生以下输出:
另外,如何将标签的颜色从黑色更改为白色?