Mike_Device
Mike_Device

Reputation: 672

Set fixed height in Flot js

I use a lib for plotting. I want to set fixed height for plot. Now plot's height depends of data displayed inside. How to do it?

Upvotes: 0

Views: 1923

Answers (1)

Mike_Device
Mike_Device

Reputation: 672

Solution is:

You need to set the width and height of this div, otherwise the plot library doesn't know how to scale the graph. You can do it inline like this:

<div id="placeholder" style="width:600px;height:300px"></div>

Upvotes: 2

Related Questions