diff --git a/html/config/LocationCali.php b/html/config/LocationCali.php index 390dc85..42cdaa7 100644 --- a/html/config/LocationCali.php +++ b/html/config/LocationCali.php @@ -1,5 +1,10 @@ "; echo "finish"; -echo '回到首页'; \ No newline at end of file + +echo '回到首页'; + +$file=fopen('/home/data/test.csv','r'); + +while ($data = fgetcsv($file)) { //每次读取CSV里面的一行内容 +//print_r($data); //此为一个数组,要获得每一个数据,访问数组下标即可 + $goods_list[] = $data; +} + +var_dump($goods_list[0]); +$hang=count($goods_list); +$x=$goods_list[0][2]; +$y=$goods_list[0][1];; +for($i=1;$i<$hang;$i++) +{ + $x=$x.','.$goods_list[$i][2]; + $y=$y.','.$goods_list[$i][1]; +} +echo '
'; + +echo ' '; +echo ''; +echo ''; \ No newline at end of file diff --git a/html/config/js/printercaliresult.js b/html/config/js/printercaliresult.js new file mode 100644 index 0000000..70a2dfc --- /dev/null +++ b/html/config/js/printercaliresult.js @@ -0,0 +1,30 @@ +var chartDom = document.getElementById('main'); +var myChart = echarts.init(chartDom); +// 指定图表的配置项和数据 +var option = { + xAxis: { + type: 'category', + data: [1,2,3,4,5,6] + }, + yAxis: { + type: 'value' + }, + tooltip:{ + trigger:'axis' + }, + dataZoom:[{ + type:"inside" //详细配置可见echarts官网 + }], + series: [ + { + name: 'DN', + data: [150, 230, 224, 218, 135, 147, 260], + type: 'line' + } + ] +}; + +option.xAxis.data=xx; +option.series[0].data=yy; +option +myChart.setOption(option); \ No newline at end of file