in a same html page i need to use jquerymobile (http://www.jquerymobile.com) and plot a simple chart with the jqplot js library (http://www.jqplot.com).
I think i have a conflict issue between jqplot and jquerymobile, because the chart isn’t displayed. But if i comment the jquerymobile script the chart became visible.
This is the part of my html code:
[...head...]
<link rel="stylesheet" type="text/css" href="jquery.jqplot.1.0.0b2_r792/dist/jquery.jqplot.css" />
<script type="text/javascript" src="jquery-1.7.1.js"></script>
<script type="text/javascript" src="jquery.mobile-1.0/jquery.mobile-1.0.js"></script>
<script type="text/javascript" src="jquery-ui-1.8.16.custom/js/jquery-ui-1.8.16.custom.min.js"></script>
<script type="text/javascript" src="jquery.jqplot.1.0.0b2_r792/dist/jquery.jqplot.js"></script>
<script type="text/javascript" src="jquery.jqplot.1.0.0b2_r792/dist/plugins/jqplot.canvasTextRenderer.min.js"></script>
<script type="text/javascript" src="jquery.jqplot.1.0.0b2_r792/dist/plugins/jqplot.canvasAxisLabelRenderer.min.js"></script>
[...script...]
$(document).ready(function () {
var plot1 = $.jqplot ('chart1', [[3,7,9,1,4,6,8,2,5]]);
});
[...body...]
<div class="jqplot" id="chart1" style="height:300px;width:400px;"></div>
Any advise for overcome the conflict? maybe i miss something?
Thanks in advance,
M.
Is a common issue, the workaround it´s buggy…
Don´t use document ready with jquerymobile, use pageInit()
In jquery forum found this thread, its works with static data but i never make it work jqplot with a json call on jquerymobile.
http://forum.jquery.com/topic/ajax-problem-jquery-mobile-with-jqplot
Good luck!