Series: [{
type: ' Pie ',
name: ' Browser share ',
data: [
' Firefox ', 45.0],
[' IE ', 26.8],
{
name: ' Chrome ',
y:12.8,
sliced:true,
selected:true
},
[' Safari ', 8.5],
[' Opera ', 6.2],
[' Others ', 0.7]
]
}]
Mainly look at this paragraph:
{
name: ' Chrome ',
y:12.8,
sliced:true,
selected:true
}
<title>Fusioncharts</title>
<script type= "Text/javascript" src= "Http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js" ></ script> <script type= "Text/javascript" > $ (function () {var ds = [{"Name": "\u4e0a\u6d77", "Y": 28.2},{"name": "\u
5317\u4eac "," Y ": 48.2},{" name ":" \u5e7f\u4e1c "," Y ": 18.2}];
In fact, just follow the example in the JSON display way to show the line, such as Chrome. Radialize the Colors highcharts.getoptions (). Colors = Highcharts.map (Highcharts.getoptions (). colors, Function ( Color) {return {radialgradient: {cx:0.5, cy:0.3, r:0.7}, stops: [0, color
], [1, Highcharts.color (Color). Brighten ( -0.3). Get (' RGB ')]//darken]};
});
Build the chart $ (' #container '). Highcharts ({chart: {plotbackgroundcolor:null,
Plotborderwidth:null, Plotshadow:false}, title: {
Text: ' Browser market shares at a specific website, 2010 ' }, tooltip: {pointformat: ' {series.name}: {point.percentage:.1f}%'}, Plotoptions: {pie: {allowpointselect:true,
Cursor: ' pointer ', DataLabels: {enabled:true,
Color: ' #000000 ', Connectorcolor: ' #000000 ', formatter:function () { Return '' + this.point.name + ': ' + this.percentage + '% ';
}}}, Series: [{type: ' Pie ',
Name: ' Browser share ', Data:ds,}]};
}); </script>
<script src= "Js/hc.js" ></script> <script src= "Js/modules/exporting.js" ></script>
-->' Shanghai ', ' y ' =>28.2 ', Array (' name ' => ' Beijing ', ' y ' =>48.2), Array (' name ' => ' Guangdong ', ' y ' =>18.2),);
$data = Json_encode ($b);
Echo ($data); }?>
Here is the PHP output JSON data for JS use:
-->
Output:
{"2": {"name": "Lo", "Data": [0,0]}, "3": {"name": "Eth0", "Data": [0.40377,0.00353]}
JS call:
Series: [
ds[2], ds[3]
]