Warm tip: This article is reproduced from serverfault.com, please click

php-如何在Yii的High Chart容器中给我自己的ID

(php - How to give my own id to the container of High Chart in Yii)

发布于 2013-12-19 11:44:12

我使用的是高图扩展名,但我不知道如何给ID容器,现在却获得了随机IDyw11,yw12等,如何给容器提供我自己的IDgraph1, graph2等,

在此处输入图片说明

Questioner
arun
Viewed
0
Paweł Fus 2013-12-19 20:10:14

你有两种选择:

  1. 此行中将小部件id容器更改为状态
  2. 直接设置容器的ID:

    $this->Widget('ext.highcharts.HighchartsWidget',array(
        'options' =>array(   
            'chart' => array('renderTo' => $id),                                 
            'title' => array('text' => 'title'),
            'yAxis' => array(
                'title' => array('text' => 'y-values'),                           
            )
        )        
    ));