Welcome Guest Search | Active Topics |

jqChart resizable
lung12
#1 Posted : Monday, April 21, 2014 6:50:41 PM(UTC)
Rank: Member

Groups: Registered
Joined: 8/16/2012(UTC)
Posts: 15

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)

Hi,
I have jqChartJQueryPlugin_3_7_0_0_Release.
I use sample file AxisSettings.htm and add $('#jqChart').resizable();
The resizable seems working ok.
However, if I call $('#jqChart').jqChart("destroy") and then draw the chart again followed by $('#jqChart').resizable()
The chart is not resizable anymore. Any idea?

Please see the code as below:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>HTML5 Chart jQuery Plugin - Axis Settings </title>
<link rel="stylesheet" type="text/css" href="../css/jquery.jqChart.css" />
<link rel="stylesheet" type="text/css" href="../css/jquery.jqRangeSlider.css" />
<link rel="stylesheet" type="text/css" href="../themes/smoothness/jquery-ui-1.8.21.css" />
<script src="../js/jquery-1.5.1.min.js" type="text/javascript"></script>
<script src="../js/jquery-ui-1.10.3.custom.min.js" type="text/javascript"></script>

<script src="../js/jquery.jqChart.min.js" type="text/javascript"></script>
<script src="../js/jquery.jqRangeSlider.min.js" type="text/javascript"></script>
<!--[if IE]><script lang="javascript" type="text/javascript" src="../js/excanvas.js"></script><![endif]-->
<script lang="javascript" type="text/javascript">
$(document).ready(function () {

$('#jqChart').jqChart({
title: { text: 'Axis Settings' },
axes: [
{
location: 'left',
minimum: 10,
maximum: 100,
interval: 10
}
],
series: [
{
type: 'column',
data: [['a', 70], ['b', 40], ['c', 85], ['d', 50], ['e', 25], ['f', 40]]
}
]
});

$('#jqChart').resizable();

$('#jqChart').jqChart("destroy");

$('#jqChart').jqChart({
title: { text: 'Axis Settings' },
axes: [
{
location: 'left',
minimum: 10,
maximum: 100,
interval: 10
}
],
series: [
{
type: 'column',
data: [['a', 70], ['b', 40], ['c', 85], ['d', 50], ['e', 25], ['f', 40]]
}
]
});
$('#jqChart').resizable();

});
</script>
</head>
<body>
<div>
<div id="jqChart" style="width: 500px; height: 400px;">
</div>
</div>
</body>
</html>
Dragan
#2 Posted : Wednesday, April 23, 2014 5:40:37 AM(UTC)
Rank: Advanced Member

Groups: Administrators, DataVizJavaScript, jQueryChart, jQueryDV, MvcChart, Registered
Joined: 1/3/2011(UTC)
Posts: 483

Thanks: 0 times
Was thanked: 87 time(s) in 87 post(s)
We'll check what is the issue here. In the meantime if you want to recreate some chart, you don't really need to destroy it first. Just call the new chart configuration $('#jqChart').jqChart({...});. That's enough.
Best Regards,
Dragan Matek
jqChart Inc.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

FlatEarth Theme by Jaben Cargman (Tiny Gecko)
Powered by YAF 1.9.4 | YAF © 2003-2010, Yet Another Forum.NET
This page was generated in 0.138 seconds.