Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

please find the plunker at http://plnkr.co/edit/119EaqzLCwimipYldezW?p=preview

Initially the charts are nicely aligned as 2x2 in the page. But when I recompile the template in onclickCreate() function, the CSS is not applying to the compiled template, so all charts are appearing in one line and thus messed up. Can any one help me to fix the code so that I can get the 2x2 alignment even after compilation in onclickCreate() function.

In the template compilation I have even given the class 'col' too but nothing get effected.

 var template = '  <div class="col">  <nvd3 id = "chart1" options="options" data="data"></nvd3>     </div><div class="col"> '
                      + ' <div class="col">  <nvd3 id = "chart2" options="options" data="data"></nvd3>     </div><div class="col"> '
                      + ' <div class="col">  <nvd3 id = "chart3" options="options" data="data"></nvd3>     </div><div class="col"> '
                      + ' <div class="col">  <nvd3 id = "chart4" options="options" data="data"></nvd3>     </div><div class="col"> ';          
share|improve this question
    
Look at here. –  krispo Jul 22 '14 at 11:34
    
You open divs at both the end and the beginning of lines. That might be a first hint. –  Christopher Chiche Jul 29 '14 at 8:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.