1.Chart宽高当使用<1的值时,视为百分比宽高
2.Chart增加sub text输出支持
This commit is contained in:
parent
da5d328eb5
commit
30a26ac35d
@ -35,6 +35,7 @@
|
||||
private $width,$height;
|
||||
|
||||
private $title=null;
|
||||
private $sub_text=null;
|
||||
|
||||
private $tip_trigger=null;
|
||||
private $tip_formatter=null;
|
||||
@ -73,6 +74,11 @@
|
||||
$this->title=$t;
|
||||
}
|
||||
|
||||
public function set_sub_text($t)
|
||||
{
|
||||
$this->sub_text=$t;
|
||||
}
|
||||
|
||||
public function set_tooltip($tt,$tf)
|
||||
{
|
||||
$this->tip_trigger=$tt;
|
||||
@ -287,11 +293,17 @@
|
||||
|
||||
if($this->width==0)
|
||||
echo '100%;height:';
|
||||
else
|
||||
if($this->width<=1)
|
||||
echo ($this->width*100).'%;height:';
|
||||
else
|
||||
echo $this->width.'px;height:';
|
||||
|
||||
if($this->height==0)
|
||||
echo '100%;"></div>';
|
||||
else
|
||||
if($this->height<=1)
|
||||
echo ($this->height*100).'%;"></div>';
|
||||
else
|
||||
echo $this->width.'px;"></div>';
|
||||
|
||||
@ -304,19 +316,22 @@
|
||||
';
|
||||
|
||||
if($this->title)
|
||||
echo 'title:{text:"'.$this->title.'"},';
|
||||
{
|
||||
echo 'title:{text:"'.$this->title.'"';
|
||||
|
||||
if($this->sub_text)
|
||||
echo ',subtext:"'.$this->sub_text.'"';
|
||||
|
||||
echo '},';
|
||||
}
|
||||
|
||||
echo 'tooltip:
|
||||
{';
|
||||
if($this->tip_trigger||$this->tip_formatter)
|
||||
{
|
||||
{';
|
||||
if($this->tip_trigger)
|
||||
echo 'trigger:"'.$this->tip_trigger.'",';
|
||||
|
||||
if($this->tip_trigger)
|
||||
echo 'trigger:"'.$this->tip_trigger.'",';
|
||||
|
||||
if($this->tip_formatter)
|
||||
echo 'formatter:"'.$this->tip_formatter.'"';
|
||||
}
|
||||
if($this->tip_formatter)
|
||||
echo 'formatter:"'.$this->tip_formatter.'"';
|
||||
echo '},';
|
||||
|
||||
if($this->save_as_image)
|
||||
|
Loading…
x
Reference in New Issue
Block a user