D
D
des1roer2015-06-01 07:48:26
Yii
des1roer, 2015-06-01 07:48:26

Yii graph to the right of cgridview?

to the right of the GridView I want to display a graph using the HighchartsWidget. I put it on the grid
'htmlOptions' => array('style' => 'width: 80%'),
, but how to make the graph be drawn not after the table, but in the same line?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
des1roer, 2015-06-01
@des1roer

We need to wrap the grid in a div. The grid itself will stretch to the width of the div. For example like this

<style>
.columns { overflow: hidden; clear: both; width: 100%; }
.columns .left, .columns .right { float: left; }
.columns .left { width: 80%; }
.columns .right { width: 20%; }
</style>

<div class="container">
  <div class="left"><?php $this->widget('CGridView'/* тут вызываем грид */); ?></div>
  <div class="right"><!-- тут вызываем график --></div>
</div>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question