-1

I want to put 2 different highcharts side by side in one page. One is pie chart and the other one is gauge chart. Can you please help me to organize this structure?

frusciante
  • 11
  • 1
  • 3

3 Answers3

2

You can use float. More information about float is available here. Try if something like this works.

#chart1{
    width: 50%; /* set width to 50% of page width */
    float: left; /* Make the element go to the left */
}

#chart2{
    width: 50%;
    float: right;
}

Don't forget to add style="clear: both" to the next element! Good luck! Hope this helps!

Pete
  • 333
  • 1
  • 12
1

One option is using a flexbox.

.container {
  display: flex;
  width: 100%;
  height: 150px;
}

.chart1,
.chart2 {
  width: 50%;
  background-color: lightblue;
  border: thin solid darkgray;
}
<div class="container">
  <div class="chart1">chart 1</div>
  <div class="chart2">chart 2</div>
</div>
Gerard
  • 15,418
  • 5
  • 30
  • 52
0

You can add bootstrap classes like this

<div class="col-md-12">
  <div class="col-md-6">
    Chart 1
  </div>
  <div class="col-md-6">
    Chart 2
  </div>
</div>
shabeer90
  • 5,161
  • 4
  • 47
  • 65
Jaimin Raval
  • 146
  • 5