问题
I'm trying to use flot to plot something on the webview but hard to get the figure to fit nicely according to the screen size. It seems that only absolute size is accepted, while I change it to relative, the figure disappeared:
<div id="placeholder" style="width:80%;height:40%;"></div>
An example you can try is here from someone else: Using Flot's Bar Graph in an Android WebView with Highlighting
回答1:
problem solved. I have to use the device-width:
<div id="graphHolder" STYLE="height:200px;width:device-width"></div>
thanks to How to set device height and width for a bar chart in android
来源:https://stackoverflow.com/questions/9895663/flot-on-android-how-to-fit-the-screen-size