</div> <div class="col-sm-2"> <?php echo $form->field($model, 'isKurs')->widget('cs\\Widget\\CheckBox2\\CheckBox', ['options' => ['data-onstyle' => 'success']])->label('', ['class' => 'hide']); ?> </div> <?php ActiveForm::end(); ?> </div> <div class="row col-lg-12"> <?php $graph3 = new \cs\Widget\ChartJs\Line(['width' => 800, 'lineArray' => $lineArrayPast, 'colors' => [$colorGreen, $colorRed, $colorBlue]]); echo $graph3->run(); $timeEnd = time() - 60 * 60 * 24; $timeStart = $timeEnd - 60 * 60 * 24 * 30 * 6; $defaultEnd = $timeEnd; $defaultStart = $defaultEnd - 60 * 60 * 24 * 30; $this->registerJs(<<<JS /** * * @param f float */ function getDate(f) { start = new Date(); start.setTime(parseInt(f) + '000'); var m = start.getMonth() + 1; if (m < 10) m = '0' + m;