<div class="col-lg-9">
            <div style="width:100%">
            <?php 
$rows = 0;
$query = "SELECT sp.afm as ΑΦΜ, sp.name as ΕΠΩΝΥΜΙΑ, ROUND(SUM(sp.amount), 2) as ΠΟΣΟ, COUNT(sp.amount) as ΠΛΗΘΟΣ, ROUND(AVG(sp.amount), 2) as ΜΟ\nFROM decisions as dc, decisionsb21 as db21, sponsor as sp\nWHERE dc.ada=db21.b21_ada AND sp.sp_ada=dc.ada and dc.organizationId=" . $org . "  \nGROUP BY sp.afm\nORDER BY ΠΟΣΟ DESC \n";
$model = $connection->createCommand($query);
$lines = $model->queryAll();
$label = array();
$data = array();
foreach ($lines as $line) {
    $label[] = $line['ΑΦΜ'];
    $data[] = $line['ΠΟΣΟ'];
    $rows += 1;
}
$label = array_slice($label, 0, 20);
$data = array_slice($data, 0, 20);
$dataProvider = new SqlDataProvider(['sql' => "SELECT sp.afm as ΑΦΜ, sp.name as ΕΠΩΝΥΜΙΑ, ROUND(SUM(sp.amount), 2) as ΠΟΣΟ, COUNT(sp.amount) as ΠΛΗΘΟΣ, ROUND(AVG(sp.amount), 2) as ΜΟ\nFROM decisions as dc, decisionsb21 as db21, sponsor as sp\nWHERE dc.ada=db21.b21_ada AND sp.sp_ada=dc.ada and dc.organizationId=" . $org . "  \nGROUP BY sp.afm\n", 'totalCount' => $rows, 'pagination' => ['pageSize' => 20], 'sort' => ['attributes' => ['ΑΦΜ', 'ΕΠΩΝΥΜΙΑ', 'ΠΟΣΟ', 'ΠΛΗΘΟΣ', 'ΜΟ']]]);
//$searchModel = app\models\Decisionsb21::findAll();
?>
            <?php 
echo ChartJs::widget(['type' => 'Bar', 'options' => [], 'data' => ['labels' => $label, 'datasets' => [['fillColor' => "rgba(220,220,220,0.5)", 'strokeColor' => "rgba(220,220,220,1)", 'pointColor' => "rgba(220,220,220,1)", 'pointStrokeColor' => "#fff", 'data' => $data]]]]);
?>
                <hr>
                <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'responsive' => true, 'export' => ['fontAwesome' => true, 'showConfirmAlert' => false, 'target' => GridView::TARGET_BLANK], 'hover' => true, 'pjax' => true, 'showPageSummary' => true, 'panel' => ['type' => 'primary', 'heading' => 'ΠΟΣΑ ΑΝΑ ΑΦΜ ΓΙΑ ΟΡΓΑΝΙΣΜΟ ' . $org]]);
?>
                
            </div>
        </div>
    </div>
Example #2
1
    echo $points[$tilesCategory->name] . '/' . $outOf[$tilesCategory->name] * 7;
    ?>
</h4>
                    </div>
                    <div class="col-xs-3 blueish-bg">
                        <h4><?php 
    echo round($toBeRounded) . ' (' . number_format($toBeRounded, 2) . ' out of 7)';
    ?>
</h4>
                    </div>
                    <div class="col-xs-3 blueish-bg block-center text-center">
                        <h4 style="background-color: <?php 
    echo $colors[$tilesCategory->name];
    ?>
;"><?php 
    echo $levels[$tilesCategory->name];
    ?>
</h4>
                    </div>
                </div>
        <?php 
}
?>
    </div>

    <div class="center-block text-center">
    <?php 
echo ChartJs::widget(['type' => 'Radar', 'options' => ['height' => 800, 'width' => 800], 'clientOptions' => ['scaleOverride' => true, 'scaleSteps' => 7, 'scaleStepWidth' => 1, 'scaleStartValue' => 0, 'scaleLineColor' => 'blue', 'angleLineColor' => 'blue', 'pointLabelFontColor' => '#000', 'pointLabelFontSize' => 15], 'data' => ['labels' => $categoriesNames, 'datasets' => [['fillColor' => 'rgba(220,220,220,0.5)', 'strokeColor' => 'black', 'pointColor' => 'white', 'pointStrokeColor' => '#fff', 'data' => $categoriesLevels]]]]);
?>
    </div>
</div>
Example #3
0
?>
            </div>
        </div>
        <div class="col-md-6 col-lg-3">
            <h2><?php 
echo Html::a(Yii::t('audit', 'Javascripts'), ['javascript/index']);
?>
</h2>

            <div class="well">
                <?php 
echo ChartJs::widget(['type' => 'Bar', 'options' => $options, 'data' => ['labels' => $days, 'datasets' => [ArrayHelper::merge($dataSet, ['data' => $count['javascript']])]]]);
?>
            </div>
        </div>
        <div class="col-md-6 col-lg-3">
            <h2><?php 
echo Html::a(Yii::t('audit', 'Errors'), ['error/index']);
?>
</h2>

            <div class="well">
                <?php 
echo ChartJs::widget(['type' => 'Bar', 'options' => $options, 'data' => ['labels' => $days, 'datasets' => [ArrayHelper::merge($dataSet, ['data' => $count['error']])]]]);
?>
            </div>
        </div>
    </div>

</div>
Example #4
0
<?php

/* @var $panel JavascriptPanel */
use bedezign\yii2\audit\models\AuditJavascript;
use bedezign\yii2\audit\panels\JavascriptPanel;
use dosamigos\chartjs\ChartJs;
$days = [];
$count = [];
foreach (range(-6, 0) as $day) {
    $date = strtotime($day . 'days');
    $days[] = date('D: Y-m-d', $date);
    $count[] = AuditJavascript::find()->where(['between', 'created', date('Y-m-d 00:00:00', $date), date('Y-m-d 23:59:59', $date)])->count();
}
echo ChartJs::widget(['type' => 'bar', 'data' => ['labels' => $days, 'datasets' => [['fillColor' => 'rgba(151,187,205,0.5)', 'strokeColor' => 'rgba(151,187,205,1)', 'pointColor' => 'rgba(151,187,205,1)', 'pointStrokeColor' => '#fff', 'data' => $count]]]]);
Example #5
0
                        </div>
                        <div class="col-md-3">
                            <?php 
echo Html::dropDownList('analytic', $selected, $allCodes, ['prompt' => 'Please select code', 'class' => 'form-control', 'id' => 'code-select']);
?>
                        </div>


                    </div>
                    <div class="row">
                        <?php 
if (count($labels) > 0 && count($total) > 0 && count($unique) > 0) {
    ?>
                        <div class="col-md-12" >
                            <?php 
    echo ChartJs::widget(['type' => 'Line', 'clientOptions' => ['responsive' => true], 'options' => ['style' => 'padding-right:30px;padding-top:10px', 'height' => 100], 'data' => ['labels' => $labels, 'datasets' => [['fillColor' => "rgba(220,220,220,0.5)", 'strokeColor' => "rgba(220,220,220,1)", 'pointColor' => "rgba(220,220,220,1)", 'pointStrokeColor' => "#fff", 'data' => $total], ['fillColor' => "rgba(151,187,205,0.5)", 'strokeColor' => "rgba(151,187,205,1)", 'pointColor' => "rgba(151,187,205,1)", 'pointStrokeColor' => "#fff", 'data' => $unique]]]]);
    ?>
                        </div>
                            <?php 
} else {
    ?>
                                <h2 style="text-align: center">Please select code to view data</h2>

                        <?php 
}
?>
                    </div>
                </div><!--/end row-->

                <hr>
Example #6
0
        <?php 
echo Html::a(FontAwesome::i('arrow-left') . Html::tag('small', 'Назад'), ['/quiz/default/index'], ['class' => 'btn btn-app']);
?>
        <?php 
echo Html::a(FontAwesome::i('pencil') . Html::tag('small', 'Редактировать'), ['/quiz/edit/' . $quiz->id], ['class' => 'btn btn-app']);
?>
    </div>
    <div class="panel-body">
        <div class="col-xs-6">
            <?php 
echo ChartJs::widget(['type' => 'pie', 'data' => ['datasets' => [['data' => ArrayHelper::toPercents(array_values(ArrayHelper::getColumn($quiz->answersWithCount, 'count'))), 'label' => 'Результаты опроса', 'backgroundColor' => $colors]], 'labels' => array_values(ArrayHelper::getColumn($quiz->answersWithCount, 'text'))]]);
?>
        </div>
        <div class="col-xs-6">
            <?php 
echo ChartJs::widget(['type' => 'bar', 'data' => ['datasets' => [['data' => array_values(ArrayHelper::getColumn($quiz->answersWithCount, 'count')), 'label' => 'Результаты опроса', 'backgroundColor' => $colors]], 'labels' => array_values(ArrayHelper::getColumn($quiz->answersWithCount, 'text'))], 'options' => []]);
?>
        </div>
        <div class="col-xs-12">
            <hr>
            <h3>Ответы по дням</h3>
            <?php 
$graphs = [];
foreach ($quiz->answers as $key => $answer) {
    $graphs[] = ['balloonText' => '[[title]]: <b>[[value]]</b>', 'fillAlphas' => true, 'id' => 'Graph' . $key, 'title' => $answer->text, 'type' => 'column', 'valueField' => 'answer' . $answer->id];
}
echo \speixoto\amcharts\Widget::widget(['width' => 'auto', 'height' => '600px', 'chartConfiguration' => ['colors' => $colors, 'type' => 'serial', 'dataProvider' => $quiz->answersByDayForChart, 'categoryField' => 'date', 'startDuration' => 1, 'chartScrollbar' => ['enabled' => true], 'chartCursor' => ['enabled' => true], 'trendLines' => [], 'guides' => [], 'valueAxes' => [['stackType' => 'regular', 'id' => 'values']], 'categoryAxis' => ['gridPosition' => 'start', 'autoGridCount' => false], 'legend' => ['enabled' => true, 'useGraphSettings' => true], 'gridAboveGraphs' => true, 'graphs' => $graphs]]);
?>
        </div>
    </div>
</div>
        </div>
        <div class="col-lg-9">
            <div style="width:100%">
            <?php 
$query = "SELECT SUM(awk.amount) as ΠΟΣΟ, COUNT(awk.amount) as ΠΛΗΘΟΣ, AVG(awk.amount ) as ΜΟ, CONCAT(YEAR(dc.issueDate),LPAD(MONTH(dc.issueDate), 2, '0')) as ΣΕΙΡΑ, CONCAT(MONTHNAME(STR_TO_DATE(MONTH(dc.issueDate), '%m')), ', ', YEAR(dc.issueDate)) as ΜΗΝΑΣ\nFROM decisions as dc, decisionsb21 as db21, amountwithkae as awk\nWHERE dc.ada=db21.b21_ada AND awk.awk_ada=dc.ada and dc.organizationId=99206915\nGROUP BY MONTH(dc.issueDate), YEAR(dc.issueDate)\nORDER BY YEAR(dc.issueDate), MONTH(dc.issueDate)";
$model = $connection->createCommand($query);
$lines = $model->queryAll();
$label = array();
$data = array();
foreach ($lines as $line) {
    $label[] = $line['ΜΗΝΑΣ'];
    $data[] = "[ 'value' => " . $line['ΠΟΣΟ'] . ",<br> 'label' => '" . $line['ΜΗΝΑΣ'] . "',<br> 'color' => 'rgb(" . rand(0, 255) . ", " . rand(0, 255) . ", " . rand(0, 255) . ")'], <br> ";
}
//echo $data;
echo json_encode($data);
$dataProvider = new SqlDataProvider(['sql' => "SELECT SUM(awk.amount) as ΠΟΣΟ, COUNT(awk.amount) as ΠΛΗΘΟΣ, AVG(awk.amount ) as ΜΟ, CONCAT(YEAR(dc.issueDate),LPAD(MONTH(dc.issueDate), 2, '0')) as ΣΕΙΡΑ, CONCAT(MONTHNAME(STR_TO_DATE(MONTH(dc.issueDate), '%m')), ', ', YEAR(dc.issueDate)) as ΜΗΝΑΣ\nFROM decisions as dc, decisionsb21 as db21, amountwithkae as awk\nWHERE dc.ada=db21.b21_ada AND awk.awk_ada=dc.ada and dc.organizationId=99206915\nGROUP BY MONTH(dc.issueDate), YEAR(dc.issueDate)", 'totalCount' => 25, 'pagination' => ['pageSize' => 10], 'sort' => ['attributes' => ['ΣΕΙΡΑ', 'ΠΟΣΟ', 'ΠΛΗΘΟΣ', 'ΜΟ']]]);
//$searchModel = app\models\OrganisationsSearch::findAll();
?>
            <?php 
echo ChartJs::widget(['type' => 'Pie', 'options' => [], 'data' => [['value' => 55442.349853515625, 'label' => 'March, 2012', 'color' => 'rgb(42, 155, 70)'], ['value' => 76.68000030517578, 'label' => 'December, 2013', 'color' => 'rgb(102, 178, 116)'], ['value' => 392.40000915527344, 'label' => 'January, 2014', 'color' => 'rgb(160, 123, 253)'], ['value' => 4896.4000244140625, 'label' => 'February, 2014', 'color' => 'rgb(139, 42, 202)'], ['value' => 22640.369285583496, 'label' => 'March, 2014', 'color' => 'rgb(195, 55, 92)'], ['value' => 23341.93978881836, 'label' => 'April, 2014', 'color' => 'rgb(106, 62, 81)'], ['value' => 11547.870056152344, 'label' => 'May, 2014', 'color' => 'rgb(45, 243, 35)'], ['value' => 24215.759998321533, 'label' => 'June, 2014', 'color' => 'rgb(48, 21, 127)'], ['value' => 15909.88003540039, 'label' => 'July, 2014', 'color' => 'rgb(173, 173, 13)'], ['value' => 1908.969970703125, 'label' => 'August, 2014', 'color' => 'rgb(163, 145, 31)'], ['value' => 25065.349796295166, 'label' => 'September, 2014', 'color' => 'rgb(141, 121, 10)'], ['value' => 20071.410041809082, 'label' => 'October, 2014', 'color' => 'rgb(95, 140, 153)'], ['value' => 36541.939598083496, 'label' => 'November, 2014', 'color' => 'rgb(205, 197, 130)'], ['value' => 188290.54085731506, 'label' => 'December, 2014', 'color' => 'rgb(26, 21, 40)'], ['value' => 609588.8594331741, 'label' => 'January, 2015', 'color' => 'rgb(104, 148, 151)'], ['value' => 1757221.9784402847, 'label' => 'February, 2015', 'color' => 'rgb(224, 181, 33)'], ['value' => 2273693.5973677635, 'label' => 'March, 2015', 'color' => 'rgb(141, 198, 98)'], ['value' => 1813442.117225647, 'label' => 'April, 2015', 'color' => 'rgb(86, 175, 49)'], ['value' => 964446.4097697735, 'label' => 'May, 2015', 'color' => 'rgb(231, 77, 52)'], ['value' => 1232082.028182812, 'label' => 'June, 2015', 'color' => 'rgb(250, 59, 158)'], ['value' => 1152080.2222545147, 'label' => 'July, 2015', 'color' => 'rgb(213, 120, 214)'], ['value' => 283942.33806324005, 'label' => 'August, 2015', 'color' => 'rgb(96, 201, 132)'], ['value' => 5571938.102293968, 'label' => 'September, 2015', 'color' => 'rgb(177, 44, 201)'], ['value' => 1955766.4294872284, 'label' => 'October, 2015', 'color' => 'rgb(117, 68, 25)']]]);
?>
                <hr>
                <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'responsive' => true, 'export' => ['fontAwesome' => true, 'showConfirmAlert' => false, 'target' => GridView::TARGET_BLANK], 'hover' => true, 'pjax' => true, 'showPageSummary' => true, 'panel' => ['type' => 'primary', 'heading' => 'ΠΟΣΑ ΑΝΑ ΜΗΝΑ']]);
?>
                
                
            </div>
        </div>
    </div>
            </div>
        </div>
    </div>
</div>

<div class="box box-primary">
    <div class="box-header">
        <h3 class="box-title"><?php 
echo Statistics::t('statistics', 'Statistics of payments for 30 days');
?>
</h3>
        <div class="box-body">
            <div class="row">
                <div class="col-md-12">
                    <?php 
echo ChartJs::widget(['type' => 'Bar', 'options' => ['class' => 'chartjs'], 'clientOptions' => ['scaleBeginAtZero' => true, 'scaleShowGridLines' => true, 'scaleGridLineColor' => true, 'scaleShowHorizontalLines' => true, 'scaleShowVerticalLines' => true, 'barShowStroke' => true, 'barStrokeWidth' => 2, 'barValueSpacing' => 5, 'barDatasetSpacing' => 1, 'scaleGridLineColor' => "rgba(0,0,0,0.3)", 'scaleGridLineWidth' => 1], 'data' => ['labels' => ArrayHelper::getColumn($payMonthStat, 'date'), 'datasets' => [['label' => "Количество платежей", 'fillColor' => "rgba(220,0,0,0.5)", 'strokeColor' => "rgba(220,0,0,1)", 'pointColor' => "rgba(220,0,0,1)", 'pointStrokeColor' => "#fff", 'data' => ArrayHelper::getColumn($payMonthStat, 'count')], ['label' => "Сумма платежей", 'fillColor' => "rgba(0,220,0,0.5)", 'strokeColor' => "rgba(0,220,0,1)", 'pointColor' => "rgba(0,220,0,1)", 'pointStrokeColor' => "#fff", 'data' => ArrayHelper::getColumn($payMonthStat, 'sum_cash')], ['label' => "Сумма платежей бонусами", 'fillColor' => "rgba(0,0,205,0.5)", 'strokeColor' => "rgba(0,0,205,1)", 'pointColor' => "rgba(0,0,205,1)", 'pointStrokeColor' => "#fff", 'data' => ArrayHelper::getColumn($payMonthStat, 'sum_bonus_cash')]]]]);
?>

                </div>
            </div>
            <div class="row">
                <div class="col-sm-4">
                    <div class="row">
                        <div class="col-xs-1">
                            <div class="chart-info" style="background-color: rgba(220,0,0,1)"></div>
                        </div>
                        <div class="col-xs-11">
                            - <?php 
echo Statistics::t('statistics', 'Number of payments');
?>
.
Example #9
0
    </div>
</div>
<div class="row">
    <div class="col-lg-12">
        <div id="chart">
            <?php 
$ratings = Tweet::find()->select(['COUNT(*) AS rating_count', 'rating'])->where(['entry_id' => $model->id, 'needs_validation' => 0])->groupBy(['rating'])->asArray()->all();
$chart_labels = [];
$chart_values = [];
foreach ($ratings as $elem) {
    $chart_labels[] = $elem['rating'];
    $chart_values[] = $elem['rating_count'];
}
?>
            <?php 
echo ChartJs::widget(['type' => 'Bar', 'options' => ['height' => 250], 'clientOptions' => ['responsive' => true, 'maintainAspectRatio' => false], 'data' => ['labels' => $chart_labels, 'datasets' => [['label' => "My Second dataset", 'fillColor' => "rgba(151,187,205,0.5)", 'strokeColor' => "rgba(151,187,205,1)", 'pointColor' => "rgba(151,187,205,1)", 'pointStrokeColor' => "#fff", 'data' => $chart_values]]]]);
?>
        </div>
    </div>
</div>
<div class="row">
    <div class="col-lg-12">
        <h2><?php 
echo Yii::t('app', 'Tweets');
?>
</h2>
        <?php 
Pjax::begin(['id' => 'tweet-grid']);
echo GridView::widget(['dataProvider' => new ActiveDataProvider(['query' => Tweet::find()->where(['entry_id' => $model->id, 'needs_validation' => 0, 'old_vote' => 0])]), 'columns' => [['attribute' => 'user.screen_name', 'value' => function ($data) {
    return $data->user->screen_name;
}], 'rating', ['attribute' => 'text', 'contentOptions' => ['class' => 'hidden-xs'], 'headerOptions' => ['class' => 'hidden-xs']], ['label' => Yii::t('app', 'Tweeted at'), 'attribute' => 'created_at', 'format' => ['datetime', 'php:d.m.Y - H:i:s'], 'contentOptions' => ['class' => 'hidden-xs'], 'headerOptions' => ['class' => 'hidden-xs']]]]);
Example #10
0
<?php

/**
 * Created by PhpStorm.
 * User: marat
 * Date: 12.11.15
 * Time: 16:42
 */
use dosamigos\chartjs\ChartJs;
?>
<button onclick="function(){}">+</button>
<?php 
echo ChartJs::widget(['type' => 'Line', 'clientOptions' => ['pointDotRadius' => 2], 'options' => ['height' => 800, 'width' => 800], 'data' => ['labels' => $data['labels'], 'datasets' => [['fillColor' => "rgba(220,220,220,0.5)", 'strokeColor' => "rgba(220,220,220,1)", 'pointColor' => "rgba(220,220,220,1)", 'pointStrokeColor' => "#fff", 'data' => $data['data']]]]]);
Example #11
0
use kartik\export\ExportMenu;
use kartik\grid\GridView;
/* @var $this yii\web\View */
/* @var $searchModel reuhtte\admin\models\SysAccessLogSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = Yii::t('app', 'Access Log');
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Admin'), 'url' => ['/admin']];
$this->params['breadcrumbs'][] = $this->title;
$this->params['sidebar'] = [['label' => Yii::t('app', 'Access Log'), 'url' => ['/admin/sys-log/access-log']], ['label' => Yii::t('app', 'Audit Log'), 'url' => ['/admin/sys-log/audit-log']]];
?>

<div class="sys-access-log">
    
    <div class="canvas-holder">
        <?php 
echo ChartJs::widget(['type' => 'Line', 'options' => ['height' => 150, 'width' => 800], 'data' => ['labels' => ["January", "February", "March", "April", "May", "June", "July"], 'datasets' => [['fillColor' => "rgba(220,220,220,0.5)", 'strokeColor' => "rgba(220,220,220,1)", 'pointColor' => "rgba(220,220,220,1)", 'pointStrokeColor' => "#fff", 'data' => [65, 59, 90, 81, 56, 55, 40]], ['fillColor' => "rgba(151,187,205,0.5)", 'strokeColor' => "rgba(151,187,205,1)", 'pointColor' => "rgba(151,187,205,1)", 'pointStrokeColor' => "#fff", 'data' => [28, 48, 40, 19, 96, 27, 100]]]]]);
?>
    
    </div>
    <!-- Query Builder -->
    <?php 
QueryBuilderForm::begin(['rules' => $rules, 'builder' => ['id' => 'query-builder', 'filters' => [['id' => 'id', 'label' => 'Id', 'type' => 'integer'], ['id' => 'username', 'label' => 'Username', 'type' => 'string'], ['id' => 'ip_address', 'label' => 'IP', 'type' => 'string'], ['id' => 'success', 'label' => 'Success', 'type' => 'boolean'], ['id' => 'attempt_date', 'label' => 'Attempt Date', 'type' => 'datetime']]]]);
?>

        <?php 
echo Html::submitButton('Apply');
?>
        <?php 
echo Html::resetButton('Reset');
?>
Example #12
0
</div>
<?php 
}
if ($usersPerDay && count($usersPerDay['datasets']) > 0) {
    ?>
<div class="row">
    <div class="panel panel-info">
        <div class="panel-heading"><h2 class="panel-title"><i class="fa fa-bar-chart"></i> Количество уникальных посетителей по дням недели</h2></div>
        <div class="panel-body no-padding">
    <?php 
    echo \dosamigos\chartjs\ChartJs::widget(['type' => 'bar', 'options' => ['height' => 200, 'width' => 800], 'data' => ['labels' => $usersPerDay['labels'], 'datasets' => $usersPerDay['datasets']], 'clientOptions' => ['tooltipTemplate' => "<%= value %> чел-к", 'responsive' => true, 'scaleBeginAtZero' => true, 'scaleShowGridLines' => true, 'scaleGridLineColor' => 'rgba(0,0,0,.05)', 'scaleGridLineWidth' => 1, 'scaleShowHorizontalLines' => true, 'scaleShowVerticalLines' => true, 'barShowStroke' => true, 'barStrokeWidth' => 1, 'barValueSpacing' => 3, 'barDatasetSpacing' => 3]]);
    ?>
        </div>
    </div>
</div>
<?php 
}
if ($incomePerDay && count($incomePerDay['datasets']) > 0) {
    ?>
<div class="row">
    <div class="panel panel-info">
        <div class="panel-heading"><h2 class="panel-title"><i class="fa fa-bar-chart"></i> Доход по дням недели</h2></div>
        <div class="panel-body no-padding">
            <?php 
    echo \dosamigos\chartjs\ChartJs::widget(['type' => 'bar', 'options' => ['height' => 200, 'width' => 800], 'data' => ['labels' => $incomePerDay['labels'], 'datasets' => $incomePerDay['datasets']], 'clientOptions' => ['tooltipTemplate' => "<%= value %>" . str_replace('0,00', '', Yii::$app->formatter->asCurrency(0)), 'responsive' => true, 'scaleBeginAtZero' => true, 'scaleShowGridLines' => true, 'scaleGridLineColor' => 'rgba(0,0,0,.05)', 'scaleGridLineWidth' => 1, 'scaleShowHorizontalLines' => true, 'scaleShowVerticalLines' => true, 'barShowStroke' => true, 'barStrokeWidth' => 1, 'barValueSpacing' => 4, 'barDatasetSpacing' => 1]]);
    ?>
        </div>
    </div>
</div>
<?php 
}
<?php

use dosamigos\chartjs\ChartJs;
use app\models\Questionnaire;
//Yii::$app->ChartJsData->createPieDataSet();
\yii\helpers\Vardumper::dump($pieChart, 10, true);
?>


<?php 
echo ChartJs::widget(['type' => 'Pie', 'options' => ['height' => 100, 'width' => 100], 'data' => $pieChart[Questionnaire::TYPE_CONTENT]]);
?>

<?php 
echo ChartJs::widget(['type' => 'Pie', 'options' => ['height' => 100, 'width' => 100], 'data' => $pieChart[Questionnaire::TYPE_CONTEST]]);
echo ChartJs::widget(['type' => 'Pie', 'options' => ['height' => 100, 'width' => 100], 'data' => $pieChart[Questionnaire::TYPE_ICT]]);
echo ChartJs::widget(['type' => 'Pie', 'options' => ['height' => 100, 'width' => 100], 'data' => $pieChart[Questionnaire::TYPE_ICT]]);
echo ChartJs::widget(['type' => 'Pie', 'options' => ['height' => 100, 'width' => 100], 'data' => $pieChart[Questionnaire::TYPE_ICT]]);
Example #14
0
}
?>

            <?php 
if ($arrTypes) {
    ?>
            <p class="lead mainText">Ваши расходы по кошельку "<?php 
    echo $active_purse->name;
    ?>
" с: <?php 
    echo $date;
    ?>
</p>
                <div class="chartMain">
            <?php 
    echo ChartJs::widget(['type' => 'Doughnut', 'options' => ['height' => 400, 'width' => 400], 'clientOptions' => ['animateScale' => true, 'showScale' => true, 'segmentShowStroke' => false, 'percentageInnerCutout' => 70, 'scaleShowLabels' => true, 'scaleLabel' => "<%=value%>", 'scaleFontStyle' => "normal"], 'data' => $arrTypes]);
    ?>
                </div>
                <div class="legendMain">
                <?php 
    foreach ($arrTypes as $type) {
        ?>
                <div class="legendElem">
                    <div class="legendColorBox" style="background-color: <?php 
        echo $type['color'];
        ?>
"></div>
                    <div class="legendText"><?php 
        echo $type['label'] . " (<span class='money-text'>{$type["value"]} бел. руб.</span>)";
        ?>
</div>
Example #15
0
    $status = array();
    $quantity = array();
    foreach ($c as $key => $value) {
        array_push($status, $c[$key]->status);
        array_push($quantity, $c[$key]->quantity);
    }
    // -----------------------------------------------------------this is for total
    $total_encode = json_encode($total);
    $total_decode = json_decode($total_encode);
    foreach ($total_decode as $key2 => $value2) {
    }
    //print_r($c);
    ?>

<?php 
    echo ChartJs::widget(['type' => 'Bar', 'options' => ['height' => 400, 'width' => 600], 'data' => ['labels' => $status, 'datasets' => [['fillColor' => "rgba(151,187,205,0.5)", 'strokeColor' => "rgba(151,187,205,1)", 'pointColor' => "rgba(151,187,205,1)", 'pointStrokeColor' => "#fff", 'data' => $quantity]]]]);
    ?>
<h3> Total Projects: <?php 
    echo $total_decode[0]->total;
    ?>
</h3>

</center>
</div>
<?php 
} else {
    $this->title = 'Projects';
    ?>


<div class="project-index">
Example #16
0
                        <p>注册日期:<?php 
echo Yii::$app->formatter->asDatetime($model->created_at);
?>
</p>
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="panel panel-primary">
                    <div class="panel-heading">统计数据</div>
                    <div class="panel-body">
                        <p>总订单量:<?php 
echo Order::getCountByUserId($model->id);
?>
</p>
                    </div>
                </div>
            </div>
        </div>
        <div class="panel panel-default hidden-xs">
            <div class="panel-heading">近15天订单生成统计表</div>
            <div class="panel-body">
                <div>
                    <?php 
echo ChartJs::widget(['type' => 'Line', 'options' => ['height' => 40], 'clientOptions' => ['responsive' => true, 'tooltipTemplate' => '<%if (label){%><%=label%>: <%}%><%= value %>个'], 'data' => ['labels' => $last15days, 'datasets' => [['fillColor' => "rgba(151,187,205,0.5)", 'strokeColor' => "rgba(151,187,205,1)", 'pointColor' => "rgba(151,187,205,1)", 'pointStrokeColor' => "#fff", 'data' => $numDataOrder]]]]);
?>
                </div>
            </div>
        </div>
    </div>
</div>
Example #17
0
>
                <strong><?php 
echo Yii::$app->formatter->asCurrency($cashBoxCash);
?>
</strong> / в кассе
            </div>
        </div>
        <div class="row">
            <?php 
if ([] !== $usersPerHour) {
    ?>
            <div class="panel panel-success">
                <div class="panel-heading"><h2 class="panel-title"><i class="fa fa-bar-chart"></i> Посетители</h2></div>
                <div class="panel-body no-padding">
                    <?php 
    echo \dosamigos\chartjs\ChartJs::widget(['type' => 'bar', 'options' => ['height' => 100, 'width' => 800], 'data' => $usersPerHour]);
    ?>
                </div>
            </div>
            <?php 
}
?>
        </div>
        <div class="row">
            <div class="panel panel-primary">
                <div class="panel-heading"><h2 class="panel-title"><i class="fa fa-star"></i> Акции</h2></div>
                <div class="panel-body no-padding">
                    <div class="table-responsive">
                    <?php 
\yii\widgets\Pjax::begin();
?>
Example #18
0
    [
        'value'=> '100',
        'color'=> 'FDB45C',
        'highlight'=> '#FFC870',
        'label'=> 'Yellow'
    ]
]
]);

?>
<div class="col-md-3 col-sm-6 col-xs-12">
    <div class="info-box">
            <span class="info-box-icon bg-aqua">
                <i class="ion ion-ios-gear-outline">
                <?php 
echo ChartJs::widget(['type' => 'Pie', 'options' => ['height' => 70, 'width' => 70], 'data' => [['value' => '300', 'color' => '#F7464A', 'highlight' => '#FF5A5E', 'label' => 'Red'], ['value' => '50', 'color' => '#46BFBD', 'highlight' => '#5AD3D1', 'label' => 'Green'], ['value' => '100', 'color' => 'FDB45C', 'highlight' => '#FFC870', 'label' => 'Yellow']]]);
// echo $coba;
?>
                </i>
            </span>
        <div class="info-box-content">
            <span class="info-box-text"> Employe Count</span>
        </div>
    </div>
    <div class="info-box">
            <span class="info-box-icon bg-aqua">
                <i class="ion ion-ios-gear-outline">

                </i>
            </span>
        <div class="info-box-content">