diff --git a/chart/chart.php b/chart/chart.php new file mode 100644 index 0000000..e708173 --- /dev/null +++ b/chart/chart.php @@ -0,0 +1,159 @@ +name=$n; + + $this->cols=$cols_data; + $this->value=$cols_value; + } + };//class ChartData + + class Chart + { + private $id; + private $width,$height; + + private $title=null; + + private $type=null; + + private $data_list=array(); + + /** + * @param n 名称(用于显示) + * @param i id + * @param w 宽 + * @param h 高 + * @param t 类型 + **/ + public function __construct($n,$i,$w,$h,$t) + { + $this->title=$n; + $this->id=$i; + $this->width=$w; + $this->height=$h; + $this->type=$t; + } + + public function set_title($t) + { + $this->title=$t; + } + + public function set_type($t) + { + $this->type=$t; + } + + public function add_data($data) + { + array_push($this->data_list,$data); + } + + public function draw() + { + echo '
'; + + echo ''; + } + };//class Chart diff --git a/tools.php b/tools.php index a905006..35cb589 100644 --- a/tools.php +++ b/tools.php @@ -19,6 +19,11 @@ echo ''; } + function include_echarts() + { + echo ''; + } + function echo_html_header($title) { echo ' @@ -31,6 +36,7 @@ include_jquery(); include_font_awesome(); include_bootstrap(); + include_echarts(); echo ''; }