Skip to content

Instantly share code, notes, and snippets.

@sigon426
Created July 14, 2013 11:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sigon426/5994038 to your computer and use it in GitHub Desktop.
Save sigon426/5994038 to your computer and use it in GitHub Desktop.
function creaChart(cartoData,barrio){
$('#highchart').highcharts({
chart: {
type: 'line',
marginRight: 50,
marginBottom: 50,
marginTop:100
},
title: {
text: 'Distribución Renta BCN | Indice RFD',
x: -20 //center
},
subtitle: {
text: 'Fuente Dtos: <a href="http://opendata.bcn.cat/opendata/cataleg/SOCIETAT_I_BENESTAR/rendafam-a/">Opendata.bcn.cat</a><br/>BCN=100',
x: -20
},
//años
xAxis: {
categories: ['2008', '2009', '2010', '1011']
},
//rfd
yAxis: {
title: {
text: 'Indice RDF'
},
plotLines: [{
value: 0,
width: 1,
color: '#808080'
}]
},
tooltip: {
valueSuffix: '',
valuePrefix: 'RFD: '
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
x: -20,
y: 60,
borderWidth: 0
},
series: [{
name: barrio,
data: cartoData
}]
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment