1
이것은 내 ccv 파일이 여러 행과 열을 가지고 있지만 많은 행과 열이있는 파일에는 적합하지 않습니다. 코딩 여기Highcharts JS로 막대 그래프를 만들려고하는데 바가 그래프에 그려지지 않습니까?
Date Time Tcoll Tstor TglyHXin TglyHXout TH2OHXout Tcold Thot 01/01/2013 0:00:54 103.34 103.32 26.94 23.06 32.31 13.81 40.06 46.06 01/01/2013 0:01:55 103.29 103.3 26.94 23.06 32.31 13.81 40.06 46 01/01/2013 0:02:55 103.29 103.33 26.95 23.06 32.31 13.81 40.06 46 01/01/2013 0:03:55 103.29 103.03 26.94 23.06 32.31 13.81 40.06 46.05 01/01/2013 0:04:55 103.34 103.27 26.94 23.06 32.31 13.81 40.06 46.02 01/01/2013 0:05:55 103.39 103.33 26.94 23.06 32.31 13.81 40.04 45.99 01/01/2013 0:06:55 103.3 103.01 26.94 23.06 32.31 13.81 40.05 45.94 01/01/2013 0:07:55 103.42 103.17 26.94 23.06 32.31 13.81 40.06 45.89 01/01/2013 0:08:55 103.37 103.16 26.94 23.06 32.31 13.8 40.03 45.88 01/01/2013 0:09:55 103.34 103.28 26.94 23.06 32.31 13.8 40.01 45.88
됩니다 :
var options = {
chart: {
renderTo: 'container',
defaultSeriesType: 'column'
},
title: {
text: 'January Analysis'
},
xAxis: {
categories: []
},
yAxis: {
title: {
text: 'Temperature'
}
},
series: []
};
$.get('WEL_log_2013_01.csv', function(data) {
// Split the lines
var lines = data.split('\n');
// Iterate over the lines and add categories or series
$.each(lines, function(lineNo, line) {
var items = line.split(',');
// header line containes categories
if (lineNo == 0) {
$.each(items, function(itemNo, item) {
if (itemNo > 0) options.xAxis.categories.push(item);
});
}
// the rest of the lines contain data with their name in the first position
else {
var series = {
data: []
};
$.each(items, function(itemNo, item) {
if (itemNo == 0) {
series.name = item;
} else {
series.data.push(parseFloat(item));
}
});
options.series.push(series);
}
});
// Create the chart
var chart = new Highcharts.Chart(options);
});
</script>
희망 내 질문 특정 오전하지 않습니다이 시간
이
내가 그래프를 생성 할 파일의 일부입니다 빼기 점수를 받고 닫히십시오.감사합니다.
답장을 보내 주셔서 감사합니다.하지만 여전히 작동하지 않습니다. – user2413421
CSV가 정말 까다 롭다고 생각합니다. – user2413421