JavaScript
/*var months = [
[0, "Jan"],
[1, "Feb"],
[2, "Mar"],
[3, "Apr"],
[4, "May"],
[5, "Jun"],
[6, "Jul"],
[7, "Aug"],
[8, "Sep"],
[9, "Oct"],
[10, "Nov"],
[11, "Dec"]
];*/
// Start market_share pie chart
(function basic_pie(container) {
Flotr.draw(container, [{
"pie": {
"explode": 10
},
"label": "SLICE_0",
"data": [
['NPR', 49.8562173100609]
]
}, {
"pie": {
"explode": 10
},
"label": "SLICE_1",
"data": [
[0, 32.8444538519]
]
}, {
"label": "SLICE_2",
"data": [
[0, 14.144752034288]
]
}, {
"pie": {
"explode": 25
},
"label": "SLICE_3",
"data": [
[0, 1.65685972348305]
]
}], {
title: 'THIS IS THE TITLE',
subtitle: 'AND THIS IS THE SUBTITLE',
defaultType: pie, // lines, bars, points, candles, markers, radar, bubbles
colors: ['#F00', '#00a3ff', '#fcd716', '#434141'],
parseFloat: true, // data can contain strings, see SLICE_1
fontColor: '#000',
fontSize: 6.5,
HtmlText: false,
shadowSize: 5,
resolution: 1,
//show: true, // ???
grid: {
verticalLines: false,
horizontalLines: false
},
xaxis: {
showLabels: false
},
yaxis: {
showLabels: false
},
pie: {
show: true,
explode: 6,
//shows slice value instead of percents
labelFormatter : function (pie, slice) {
return slice;
}
},
mouse: {
track: true,
relative: true, // tooltip next to mouse pointer
fillOpacity: 1
},
legend: {
position: 'sw',
//noColumns: 5,
backgroundColor:...