Hassan Hassan - 1 year ago 116
AngularJS Question

How can aligned pie charts in nvd3? code: http://plnkr.co/edit/w0LewO7TmG6Lx3ALfwj8?p=preview

I am new to AngularJS and I want to make 2 pie charts equal in everything (i.e. size) and align them horizontally. When I make 2 pie charts they align vertically - the first pie chart is on one row, the second on the next.

How can I align both pie charts horizontally and draw them on the same row?

p2. p2.
Answer Source

Try this :

<body ng-controller="MainCtrl">
    <div style="width:100%;">
      <div style="width:50%; float : left;">
        <nvd3 options="options" data="data"></nvd3> // first pie chart 
      <div style="width:50%; float:right;"> 
        <nvd3 options="options" data="data"></nvd3> // second pie chart in same row
    </div><br><a href="http://krispo.github.io/angular-nvd3/" target="_blank" style="float: right;">See more</a>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download