Please help me, i have a project dashboard widgets using drag and drop. I have left(widgets lists) and right(widgets area). widgets on left are draggable and droppable into widgets area.
When the widgets example:staff list(just a title) is dragged and dropped on the widgets area it shows the list of name in datagrid. I manage to do that.
However, my problem is on the charts, it doesn't show anything but it cloned the div that the chart is using. Please help me guys, any information will be appreciated. btw im using jqx for chart
Here's my code to give you information:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Eto Na</title>
<script type="text/javascript" src="jquery-1.11.1.min.js"></script>
<script src="jquery.gridster.js" type="text/javascript" charset="utf-8"></script>
<script src="jquery-ui.js" type="text/javascript" charset="utf-8"></script>
<link rel="stylesheet" type="text/css" href="jquery.gridster.css">
<script type="text/javascript" src="dragNdrop.js"></script>
<!--
<script type="text/javascript" language="javascript" src="dtjs/data-tables.js"></script>
<script type="text/javascript" language="javascript" src="dtjs/jquery.dataTables.js"></script>
<link rel="stylesheet" type="text/css" href="dtcss/jquery.dataTables.css">
<link rel="stylesheet" type="text/css" href="dtcss/demo.css">
<script type="text/javascript" src="jqwidgets/jqxcore.js"></script>
<script type="text/javascript" src="jqwidgets/jqxdraw.js"></script>
<script type="text/javascript" src="jqwidgets/jqxchart.core.js"></script>
<script type="text/javascript" src="jqwidgets/jqxdata.js"></script>
<script type="text/javascript">
$(document).ready(function () {
var sampleData = [
{ Country: 'China', Population: 1347350000, Percent: 19.18},
{ Country: 'India', Population: 1210193422, Percent: 17.22},
{ Country: 'USA', Population: 313912000, Percent: 4.47},
{ Country: 'Indonesia', Population: 237641326, Percent: 3.38},
{ Country: 'Brazil', Population: 192376496, Percent: 2.74}];
var settings = {
title: "Top 5 most populated countries",
description: "Statistics for 2011",
showLegend: true,
enableAnimations: true,
padding: { left: 20, top: 5, right: 20, bottom: 5 },
titlePadding: { left: 90, top: 0, right: 0, bottom: 10 },
source: sampleData,
xAxis:
{
dataField: 'Country',
showGridLines: true,
flip: false
},
colorScheme: 'scheme01',
seriesGroups:
[
{
type: 'column',
orientation: 'horizontal',
columnsGapPercent: 100,
toolTipFormatSettings: { thousandsSeparator: ',' },
valueAxis:
{
flip: true,
unitInterval: 100000000,
maxValue: 1500000000,
displayValueAxis: true,
description: '',
formatFunction: function (value) {
return parseInt(value / 1000000);
}
},
series: [
{ dataField: 'Population', displayText: 'Population (millions)' }
]
}
]
};
$('#chartContainer').jqxChart(settings);
});
</script>
<style>
.overlay_fix {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 100000;
opacity: 0;
display: none;
}
</style>
</head>
<body>
<h1>Resize</h1>
<p>http://jsfiddle.net/cnb8eL9a/</p>
<p>http://www.codeproject.com/Articles/24123/Drag-and-Drop-with-Persistence-using-JQuery</p>
<div id="widget-list">
<ul>
<li class="sglwidgets" data-row="6" data-col="6" data-sizex="2" data-sizey="2">
<p class="title">Bar</p>
<div class="big">
<p class="content">
<iframe src="bakaeto.htm" style="width:100%; height:290px;">
<p>Your browser does not support iframes.</p>
</iframe>
</p>
</div>
<div class="overlay_fix"> </div>
</li>
<li class="sglwidgets " data-row="6" data-col="6" data-sizex="2" data-sizey="2">
<p class="title">Staff List</p>
<div class="small">
<p class="content">
<ul>
<li>Suzie Billips</li>
<li>Sherri Tworek</li>
<li>Larue Gaspard</li>
<li>Debroah Nestle</li>
<li>Lillian Langston</li>
<li>Delphine Keach</li>
<li>Mirta Laver</li>
<li>Drucilla Ve nema</li>
</ul>
</p>
</div>
</li>
<li class="sglwidgets" data-row="6" data-col="6" data-sizex="2" data-sizey="2">
<p class="title">Staff Info</p>
<div class="big">
<p class="content">
<div id="demo"></div>
</p>
</div>
</li>
</ul>
</div>
<div class="gridster" id="widgets-area">
<ul>
</ul>
</div>
</body>
</html>