Created
July 14, 2013 11:54
-
-
Save sigon426/5994038 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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