miloschuman / yii-highcharts Goto Github PK
View Code? Open in Web Editor NEWHighcharts Adapter for Yii Framework
Home Page: http://www.yiiframework.com/extension/highcharts/
License: MIT License
Highcharts Adapter for Yii Framework
Home Page: http://www.yiiframework.com/extension/highcharts/
License: MIT License
Thank you for the widget..
I have an issue rendering the chart using renderPartial()
.
renderPartial()
in the main view, the chart displayed as expected.renderPartial()
with $processOutput
as true
for an ajax request of dropDownList, the chart is displayed on the navigation menu of the page.'id' : 'some_id'
to chart option, it displays as expected. Now if I change the dropdownList, the chart is not displayed, which means the chart is displayed only for the first dropdown selection.Please find below the code snippets:
index.php
<div class="dashboard bg-white box-shadow brnr mrl mvl">
<label class="color-ash ptl plxm">Details</label>
<div class="pam mbm">
<div class="row">
<div class="col-xs-8 col-xs-offset-3">
<label class="color-ash">Select Label</label>
</div>
</div>
<div class="row">
<div class="col-xs-8 col-xs-offset-3">
<?php echo CHtml::dropDownList('ev_id', $model,
CHtml::listData(EvTbl::model()->findAll(), 'ev_id', 'ev_title'),
array('empty' => '-- Select --', 'options' => array($model->ev_id=>array('selected'=>true)),
'ajax' => array(
'type'=>'POST',
'url'=>$this->createUrl('dash/evreg'),
'update'=>'#evChart',
'data'=>array('ev_id' => 'js:$(\'#ev_id\').val()'),
)
));
?>
</div>
</div>
</div>
<div id="evChart" class="paxm">
</div>
</div>
_chart.php
<div class="paxm">
<div class="mbm">
<label class="color-ash">Header</label>
</div>
<div class="box-shadow-around">
<?php
$this->Widget('ext.highcharts.HighchartsWidget', array(
'id' => 'evChart', <---- If commented, chart displays on navigation menu
'options' => array(
'title' => array('text' => ''),
'xAxis' => array(
'categories' => array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sept', 'Oct', 'Nov', 'Dec'),
'labels' => array('enabled' => false),
'title' => array(
'text' => 'Days',
'margin' => 40
)
),
'yAxis' => array(
'title' => array('text' => '')
),
'legend' => array('enabled' => false),
'plotOptions' => array(
'line' => array(
'dataLabels' => array('enabled' => true),
'enableMouseTracking' => true
)
),
'credits' => array('enabled' => false),
'series' => array(
array('name' => 'John', 'data' => array(10, 0, 42, 12, 99, 69, 2, 12, 32, 10, 9, 55, 10, 0, 42, 12, 99, 69, 2, 12, 32, 10, 9, 55)),
)
)
));
?>
</div>
</div>
DashCottroller.php
...
public function actionEvReg()
{
if (Yii::app()->request->isAjaxRequest && isset($_POST['ev_id'])) {
$this->renderPartial('_chart', [], false, true); <--- If $processOutput is false, then the chart is not displayed.
Yii::app()->end();
}
}
...
Am I missing anything to obtain this issue.??
Is there any way to include charts in the pdf output?
I am using Yii2
and want to use this extension. I have downloaded it but I am not able to use it. i.e. I don't know where to put the files? I can't find protected/extensions
in my whole project? Can anyone please help me out?
When YII_DEBUG
is true
, no template scripts will be registered because Highcharts does not currently provide *.src.js
files for the included themes.
An additional check (similar to the one in yii2-highcharts-widget) should be performed in the registerScripts method to prevent both from being loaded on the same page.
allow user to set where to register script because i load jquery to end and this extension not work only after i change this line:
$cs->registerScriptFile("{$baseUrl}/{$script}{$extension}",$position=CClientScript::POS_END);
Hello,
i'm trying to insert a horizontal plotline in my chart in the value 0.42, when my range in yAxis is[-1.2,1.6] , with the following code:
'yAxis' => array(
'plotLines' => array(
'color' => '#FF0000',
'width' => 2,
'value' => 0.42
),
'title' => array(
'text' => 'Results',
),
'allowDecimals' => true,
'min' => -1.2,
'max' => 1.6,
),
So when i put the plotline code, the chart shows only the axes and the line doesn't show at all.
However when i remove only the code about the plotline everything works just fine.
Is there a chance to let me know what am i doing wrong and how could i solve this problem?
Thank you in advance,
Rania
Short array syntax requires 5.4+
hi Milo,
I try to run polar chart, but it's shown as regular chart :(
Any suggestion?
I'd like to start using this library into my project.
Can you exaplain me how to upgrade to 3.0.9?
Can you upgrade the extension itself ?
thanks for your work.
It's excellent !
Dears,
how i can add URL to chart body??
Thanks,
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.