-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
just in case to add tooltip method
in ChartPresenter file ...vendor\muhamadrezaar\highcharts\src\Classes\Presenters
add
public $tooltip;
public function tooltip($tooltip=[])
{
$this->transform->tooltip=$tooltip;
return $this;
}
in JsTransformerPresenter file
...\vendor\muhamadrezaar\highcharts\src\Classes\Presenters
add
public $tooltip=[]; public function encode_tooltip() { $data = $this->tooltip; $this->tooltip = !empty($data) ? 'tooltip: '.json_encode($data).',' : null; return $this; }
edit this method
public function transform()
{
...
$this->encode_tooltip(); //add this line
$this->credits();
and add to $allString
$allString = $this->title. $this->tooltip.
in your controller
->tooltip([ 'formatter'=> "startJs:function(){return '' + this.x + '
' + this.series.name + '
' + 'Valor:'+this.y + '
' + 'Total: ' + this.point.stackTotal }:endJs",
])
Metadata
Metadata
Assignees
Labels
No labels