Class yii\debug\models\timeline\Svg

Inheritanceyii\debug\models\timeline\Svg » yii\base\Object
Available since version2.0.8

Svg is used to draw a graph using SVG

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$panel yii\debug\panels\TimelinePanel yii\debug\models\timeline\Svg
$points array Each point is define by a X and a Y coordinate. yii\debug\models\timeline\Svg

Property Details

$gradient public property

Color indicators svg graph.

public array $gradient = [10 => '#d6e685'60 => '#8cc665'90 => '#44a340'100 => '#1e6823']
$listenMessages public property

Listen messages panels

public array $listenMessages = ['log''profiling']
$panel protected property
$points protected property

Each point is define by a X and a Y coordinate.

protected array $points = []
$stroke public property

Stroke color

public string $stroke '#1e6823'
$template public property

Svg template

public string $template '<svg width="{x}" height="{y}" viewBox="0 0 {x} {y}" preserveAspectRatio="none"><defs>{linearGradient}</defs><g><polygon points="{polygon}" fill="url(#gradient)"/><polyline points="{polyline}" fill="none" stroke="{stroke}" stroke-width="1"/></g></svg>'
$x public property

Max X coordinate

public integer $x 1920
$y public property

Max Y coordinate

public integer $y 40

Method Details

__construct() public method

public void __construct ( yii\debug\panels\TimelinePanel $panel, $config = [] )
$panel
$config
__toString() public method

public string __toString ( )
addPoints() protected method

protected integer addPoints ( $messages )
$messages array

Log messages. See \yii\debug\models\timeline\Logger::messages for the structure

return integer

Added points

hasPoints() public method

public boolean hasPoints ( )
return boolean

Has points

linearGradient() protected method

protected string linearGradient ( )
polygon() protected method

protected string polygon ( )
return string

Points attribute for polygon path

polyline() protected method

protected string polyline ( )
return string

Points attribute for polyline path