Nk SP
Nk SP

Reputation: 862

jquery-Flot using <Div> with % width and height


I am using Flot Jquery library, I want to set the placeholder div dimension (height and width) in %
<div id="placeholderYear" style="width:50%;height:30%;"></div>
But I get always the exception:
"JavaScript runtime error: Invalid dimensions for plot, width = 360, height = 0"

How can I fix it? Thanks,Nk

Upvotes: 1

Views: 4575

Answers (1)

waki
waki

Reputation: 1258

DEMO I think problem with css style and need two div, like

<div class="demo-container"> <div id="placeholder" class="demo-placeholder"></div> </div>

Upvotes: 2

Related Questions