Template:TestTemplate: Difference between revisions
From FANTOM5_SSTAR
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
<html> | <html> | ||
<script language="javascript" type="text/javascript" src="/resource_browser/rb_js/flot/jquery.flot.js"></script> | |||
<script language="javascript" type="text/javascript" src="/resource_browser/rb_js/highcharts/highcharts.js""></script> | |||
<script language="javascript" type="text/javascript" src="/resource_browser/rb_js/highcharts/modules/exporting.js"></script> | |||
<script type="text/javascript"> | <script type="text/javascript"> | ||
var content = "</html>{{{1}}}<html>"; | var content = "</html>{{{1}}}<html>"; | ||
var content_array = content.split(","); | var content_array = content.split(","); | ||
Line 13: | Line 15: | ||
} | } | ||
var chart; | |||
// Build the chart | |||
chart = new Highcharts.Chart({ | |||
chart: { | |||
renderTo: 'container', | |||
plotBackgroundColor: null, | |||
plotBorderWidth: null, | |||
plotShadow: false | |||
}, | |||
title: { | |||
text: 'Browser market shares at a specific website, 2010' | |||
}, | |||
tooltip: { | |||
pointFormat: '{series.name}: <b>{point.percentage}%</b>', | |||
percentageDecimals: 1 | |||
}, | |||
plotOptions: { | |||
pie: { | |||
allowPointSelect: true, | |||
cursor: 'pointer', | |||
dataLabels: { | |||
enabled: true, | |||
color: '#000000', | |||
connectorColor: '#000000', | |||
formatter: function() { | |||
return '<b>'+ this.point.name +'</b>: '+ this.percentage +' %'; | |||
} | |||
} | |||
} | |||
}, | |||
series: [{ | |||
type: 'pie', | |||
name: 'Browser share', | |||
data: [ | |||
['Firefox', 45.0], | |||
['IE', 26.8], | |||
['Dolphin',2] , | |||
{ | |||
name: 'Chrome', | |||
y: 12.8, | |||
sliced: true, | |||
selected: true | |||
}, | |||
['Safari', 8.5], | |||
['Opera', 4.2], | |||
['Others', 0.7] | |||
] | |||
}] | |||
}); | |||
function getDistinctElements(anArray) { | function getDistinctElements(anArray) { |
Revision as of 17:58, 11 June 2013