CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 jqPlot in CCS

Print topic Send  topic

Author Message
gameon

Posts: 10
Posted: 09/25/2013, 2:13 PM

having trouble passing variable array from CCS to jqPlot (via jquery). Using jqPlot as we need a log line chart. Can get jqPlot to work if variable is not used. in the we page Before Show event use this code:

$db = new clsDBdbname();
$db->query("SELECT field1,field2 FROM table");
$var1 = array();
while ($db->next_record())
{
$a = array();
$a["field1"] = $db->f("field1");
$a["field2"] = $db->f("field2");
$var1[] = $a;
}

And this code directly in the HTML file:

<script class="code" type="text/javascript">
$(document).ready(function(){
var plot1 =$.jqplot('chart1', [$var1]);
});
</script>


If I replace $var1 with [number1, number 2] it will plot. Thoughts?

View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by UltraApps.com  and YesSoftware, Inc.