I am trying to display a flot generated chart in a jQuery Mobile project. If I call the jQuery Mobile page by its absolute path (sth. like: http://server.com/graph/fancy.php) everything works fine, but as soon as I start using the jQM integrated AJAx navigation the chart looks scrambled.
I also found this other topic jquery mobile and flot library, but none of the described solutions do work for me.
Is there a way to get jQM and flot working together? Unfortunatelly disabling AJAX is also not an option.
The chart generation:
<script type="text/javascript">
var data = [[0, 3], [4, 8], [8, 5], [9, 13]];
$(function () {
var plot = $.plot($("#chart"), [
{
label: "Oh hai",
data: data,
bars: { show: true }
}
]);
});
</script>
<div id="chart" style="width: 600px; height: 350px;"></div>