PHP code example of energieproduction / chart
1. Go to this page and download the library: Download energieproduction/chart library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
energieproduction / chart example snippets
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/highcharts-more.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
$chart = app('chart');
$chart->pushSubset('title', function($title){
$title->pushCriteria(new Criterias\Text('Solar Employment Growth by Sector, 2010-2016'));
});
$chart->pushSubset('subtitle', function($subtitle){
$subtitle->pushCriteria(new Criterias\Text('Source: thesolarfoundation.com'));
});
$chart->pushSubset('yAxis.title', function($title){
$title->pushCriteria(new Criterias\Text('Number of Employees'));
});
$chart->pushSubset('legend', function($legend){
$legend->pushCriteria(new Criterias\Layout('vertical'));
$legend->pushCriteria(new Criterias\Align('right'));
$legend->pushCriteria(new Criterias\VerticalAlign('middle'));
});
$chart->pushSubset('plotOptions.series', function($plotOptions){
$plotOptions->pushCriteria(new Criterias\PointStart(2010));
});
$chart->pushSubset('series', function($series){
$series->pushCriteria(new Criterias\Name('Installation'));
$series->pushCriteria(new Criterias\Data([43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175]));
});
$chartSolarEmployment = $chart->render();
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/highcharts-more.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<div id='chart'></div>
<script type="text/javascript">
$(function () {
$('chart').highcharts({{$chartSolarEmployment}});
});
</script>