* [refac bug #57397] Adjust graph wg.
This commit is contained in:
@@ -9,14 +9,17 @@ class graph extends wg
|
||||
'responsive?: bool=false',
|
||||
'width?: number|string="100%"',
|
||||
'height?: number|string="500"',
|
||||
'graphID?: number=0',
|
||||
);
|
||||
|
||||
protected function build(): zui
|
||||
{
|
||||
list($type, $width, $height, $responsive) = $this->prop(array('type', 'width', 'height', 'responsive'));
|
||||
list($type, $width, $height, $responsive, $graphID) = $this->prop(array('type', 'width', 'height', 'responsive', 'graphID'));
|
||||
if(empty($graphID)) $graphID = uniqid();
|
||||
|
||||
|
||||
return zui::graph(
|
||||
set::_id('zin_graph_' . uniqid()),
|
||||
set::_id('zin_graph_' . $graphID),
|
||||
set::type($type),
|
||||
set::responsive($responsive),
|
||||
set::_style(array('width' => is_int($width) ? "{$width}px" : $width, 'height' => is_int($height) ? "{$height}px" : $height)),
|
||||
|
||||
Reference in New Issue
Block a user