<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Widget\Chart; use ModStart\Core\Util\ColorUtil; use ModStart\Core\Util\TimeUtil; class Line extends Chart { protected $option = array('grid' => array('right' => '1%', 'left' => '1%', 'bottom' => '10%', 'containLabel' => true), 'toolbox' => array('feature' => array('dataView' => array('show' => true, 'readOnly' => false), 'restore' => array('show' => true), 'saveAsImage' => array('show' => true))), 'tooltip' => array('trigger' => 'axis', 'axisPointer' => array('type' => 'shadow', 'snap' => true, 'crossStyle' => array('color' => '#999'))), 'legend' => array('data' => array()), 'xAxis' => array('type' => 'category', 'data' => array()), 'yAxis' => array('type' => 'value', 'minInterval' => 1), 'series' => array()); public function ySeries($tMyPy, $HDpl6, $f0dxO = '数量', $AXgEz = array()) { goto gIo8A; BBjxf: return $this; goto NXlY0; t4AuP: $this->option['series'][$tMyPy] = array('name' => $f0dxO, 'data' => $HDpl6, 'type' => 'line', 'smooth' => true, 'itemStyle' => array('normal' => array('color' => $AXgEz['lineColor'], 'lineStyle' => array('color' => $AXgEz['lineColor'])))); goto BBjxf; gIo8A: if (!isset($AXgEz['lineColor'])) { $AXgEz['lineColor'] = ColorUtil::pick('L-' . $tMyPy); } goto k_ZMY; k_ZMY: $this->option['legend']['data'][$tMyPy] = $f0dxO; goto t4AuP; NXlY0: } public function tableDailyCountLatest($l8Ger = array(), $D8igw = 15) { goto j8Ugs; k25Gg: $nR73L = strtotime($HBrrp); goto pS7uo; j8Ugs: $HBrrp = date('Y-m-d'); goto k25Gg; HZSqJ: $JCIt8 = date('Y-m-d', $X2G8M); goto xZWPS; xZWPS: return $this->tableDailyCount($JCIt8, $HBrrp, $l8Ger); goto Ms_WN; pS7uo: $X2G8M = $nR73L - ($D8igw - 1) * TimeUtil::PERIOD_DAY; goto HZSqJ; Ms_WN: } public function tableDailyCount($JCIt8, $HBrrp, $l8Ger = array()) { goto eiddg; oNdP8: return $this; goto IcXcM; ysEO8: $this->option['series'] = array(); goto SiMoc; eiddg: $zonFp = $this->dsTableCountSeriesDaily($JCIt8, $HBrrp, $l8Ger); goto Aj7Ne; SiMoc: foreach ($zonFp['values'] as $xlsSz => $HDpl6) { $ZN2LW = isset($l8Ger[$xlsSz]['color']) ? $l8Ger[$xlsSz]['color'] : ColorUtil::randomColor(); $this->option['series'][] = array('name' => $l8Ger[$xlsSz]['title'], 'data' => $HDpl6, 'type' => 'line', 'smooth' => true, 'itemStyle' => array('normal' => array('color' => $ZN2LW, 'lineStyle' => array('color' => $ZN2LW)))); } goto oNdP8; Aj7Ne: $this->xData($zonFp['time']); goto ysEO8; IcXcM: } public function tableDailySumLatest($l8Ger = array(), $D8igw = 15) { goto nTAgr; p9RVw: $X2G8M = $nR73L - ($D8igw - 1) * TimeUtil::PERIOD_DAY; goto nIp7K; nIp7K: $JCIt8 = date('Y-m-d', $X2G8M); goto Jpwxq; nTAgr: $HBrrp = date('Y-m-d'); goto E7oqx; E7oqx: $nR73L = strtotime($HBrrp); goto p9RVw; Jpwxq: return $this->tableDailySum($JCIt8, $HBrrp, $l8Ger); goto NGuxy; NGuxy: } public function tableDailySum($JCIt8, $HBrrp, $l8Ger = array()) { goto On5ON; aBZCz: $this->xData($zonFp['time']); goto r6Nfg; On5ON: $zonFp = $this->dsTableSumSeriesDaily($JCIt8, $HBrrp, $l8Ger); goto aBZCz; ItJEz: return $this; goto j90vs; SyagA: foreach ($zonFp['values'] as $xlsSz => $HDpl6) { $ZN2LW = isset($l8Ger[$xlsSz]['color']) ? $l8Ger[$xlsSz]['color'] : ColorUtil::randomColor(); $this->option['series'][] = array('name' => $l8Ger[$xlsSz]['title'], 'data' => $HDpl6, 'type' => 'line', 'smooth' => true, 'itemStyle' => array('normal' => array('color' => $ZN2LW, 'lineStyle' => array('color' => $ZN2LW)))); } goto ItJEz; r6Nfg: $this->option['series'] = array(); goto SyagA; j90vs: } }