<?php
use yii\helpers\Html;
use dosamigos\chartjs\ChartJs;
?>

<div class="auctions-index">
    <div class="panel panel-primary">
        <div class="panel-heading"><span class="glyphicon glyphicon-th-large"></span><strong> <?= Html::encode($this->title) ?></strong></div>
<div class="panel-body">

    <h2>USER STATISTICS TEST PAGE</h2>

</div>
        <div>
            1. Заявки (поданные, одобренные, отклоненные).
            2. Аукционы (все, выигранные, ожидают торгов) (edited)

            3. рассылок на по категориям
        </div>

        <div class="row">
            <div class="col-xs-12">
                <hr>
            </div>

            <div class="col-md-12">
                <h2><?= Yii::t('app', 'Bidding ID'); ?></h2>
                <?= ChartJs::widget([
                    'type' => 'pie',
                    'options' => [
                        'height' => 90,
                    ],
                    'clientOptions' => [
                        'legend' => [
                            'position' => 'left'
                        ]
                    ],
                    'data' => [
                        'labels' => $userBiddings['labels'],
                        'datasets' => [
                            [
                                'data' => $userBiddings['data'],
                                'backgroundColor' => $userBiddings['backgroundColor'],
                            ]
                        ]
                    ]
                ]); ?>
            </div>
<!--
            <div class="col-md-12">
                <h2><?/*= Yii::t('app', 'Auctions ID'); */?></h2>
                <?/*= ChartJs::widget([
                    'type' => 'pie',
                    'options' => [
                        'height' => 90,
                    ],
                    'clientOptions' => [
                        'legend' => [
                            'position' => 'left'
                        ]
                    ],
                    'data' => [
                        'labels' => $userBiddings['labels'],
                        'datasets' => [
                            [
                                'data' => $userBiddings['data'],
                                'backgroundColor' => $userBiddings['backgroundColor'],
                            ]
                        ]
                    ]
                ]); */?>
            </div>-->

            <div class="col-md-12">
                <h2><?= Yii::t('app', 'Mailing by category'); ?></h2>
                <?= ChartJs::widget([
                    'type' => 'pie',
                    'options' => [
                        'height' => 90,
                    ],
                    'clientOptions' => [
                        'legend' => [
                            'position' => 'left'
                        ]
                    ],
                    'data' => [
                        'labels' => $userMailing['labels'],
                        'datasets' => [
                            [
                                'data' => $userMailing['data'],
                                'backgroundColor' => $userMailing['backgroundColor'],
                            ]
                        ]
                    ]
                ]); ?>
            </div>

        </div>

    </div>

</div>
