Git Product home page Git Product logo

yii-highcharts's People

Contributors

acorncom avatar miloschuman avatar stahlgmbh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

yii-highcharts's Issues

Highcharts not displaying on rendering view using renderPartial() for ajax request

Thank you for the widget..

I have an issue rendering the chart using renderPartial().

  1. If I provide the widget in a separate view and called renderPartial() in the main view, the chart displayed as expected.
  2. If I return the view containing the widget as renderPartial() with $processOutput as true for an ajax request of dropDownList, the chart is displayed on the navigation menu of the page.
  3. For the above version, if I add '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.??

Pdf output

Is there any way to include charts in the pdf output?

How to install this extension?

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?

Themes not applied when in debug mode

When YII_DEBUG is true, no template scripts will be registered because Highcharts does not currently provide *.src.js files for the included themes.

Register script files to end -> option

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);

plotLines not working

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

polar chart

hi Milo,
I try to run polar chart, but it's shown as regular chart :(
Any suggestion?

[ 'modules/exporting', 'themes/grid-light', ], 'options' => [ 'chart' => ['polar'=>true, 'type'=>'column'], ``` 'title' => ['text' => 'Fruit Consumption'], 'xAxis' => [ 'categories'=> ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] ], 'series' => [ [ 'name' => 'Jane', 'data' => [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]], ] ``` ] ]); ?>

Can you upgrade to lastest version?

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 !

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.