林在Android和Java的很新。所以不要求明確的答案只是一個正確的方向。 網站使用的是highcharts,即時得到的東西是highchart數據。獲取值highchart
http://webpage/javascript/city/newyork.js
new Highcharts.Chart({
chart: { renderTo: 'graph1' },
yAxis: { min: 0, max: 100 },
plotOptions: { line: { dataLabels: { y: 20 } } },
series: [{ data: [95,96,96,45,37,36,42,51,54,61,62,49,42,39,47,56,60,63,61,49,35,35,39,46,52] }]
});
new Highcharts.Chart({
chart: { renderTo: 'graph2', defaultSeriesType: 'column' },
yAxis: { min: 0, max: 3 },
plotOptions: { column: { pointPadding: 0.2, borderWidth: 0 } },
series: [{ data: [0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00] }]
});
new Highcharts.Chart({
chart: { renderTo: 'graph4' },
plotOptions: { line: { dataLabels: { formatter: function() { if(this.x != ' ') return this.y; } } } },
series: [{ data: [1015,1016,1018,1018,1017,1015,1015,1016,1017,1017,1018,1017,1015,1013,1012,1013,1011,1010,1011,1010,1008,1006,1007,1008,1009] }]
});
$(document).ready(
function($){
$('#sevendays > li').live(
'click hover',
function(){
$('#sevendays > li').removeClass('selected');
$(this).addClass('selected');
$('.day').hide();
$('#chosen-day > div:nth-child(' + ($(this).index() + 1) + ')').show();
}
);
$('#chonsen-city a').click(
function(){
icity = $(this).attr('rel');
$('#chosen-city').load('/ajax/chosen-city.php', {ig: icity});
return false;
}
);
});
我需要的是得到的數字數組中graph1,graph2 & graph4數據,所以我可以畫我自己的圖形。大多數教程都是關於json解析的,但由於這不是json格式,所以我有點失落。 再次,只是正確的方向,一些可讀的材料。 謝謝。
,所以你想獲得每個排行榜中的所有點的陣列?或一個數組中的所有圖表中的所有點? – 2013-05-13 12:28:32
每個圖表中所有點的數組。 graph4到ary4,graph2到ary2等等。 – user2375984 2013-05-13 13:03:40
因此,您需要在每個圖表中進行交互並推送到一個全局數組,所有點。 – 2013-05-13 13:30:51