Home Forums Report Bugs canvasjs dose not work in phonegap

canvasjs dose not work in phonegap

Viewing 1 post (of 1 total)
  • #9218


    I build hybrid app using phonegap. in the html site my canvasJS chart works perfect, but when i build my app with phonegap my chart isn’t work – i cant see it.

    this is my HTML code:

    <!DOCTYPE html>
    <meta charset=”UTF-8″>
    <script src=”http://code.jquery.com/jquery-1.7.2.min.js”></script&gt;
    <script src=”http://code.jquery.com/ui/1.8.21/jquery-ui.min.js”></script&gt;
    <script src=”jquery.ui.touch-punch.min.js”></script>
    <script type=”text/javascript” charset=”utf-8″ src=”cordova-2.5.0.js”></script>
    <script src=”../js/script.js”></script>
    <script src=”../js/jquery.js”></script>
    <link rel=”stylesheet” href=”//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css”>
    <script src=”//code.jquery.com/jquery-1.10.2.js”></script>
    <script src=”//code.jquery.com/ui/1.11.2/jquery-ui.js”></script>
    <script src=”js/jquery.canvasjs.min.js” type=”text/javascript” ></script>
    <script type=”text/javascript” src=”../cordova.js”></script>
    <script src=”../js/index.js”></script>
    <link rel=”stylesheet” href=”../styles/style.css”>
    <meta name=”viewport” content=”width=device-width, initial-scale=1″ charset=”utf-8″>
    <body onload=”app.initialize();”>
    <div id=”wrapper”>
    <header class=”headerHome”>

    <ul class=”navCover”>
    <li onclick=”showmenu(this)” class=”navMenu”>

    <main class=”pagesMain”>
    <section class=”analyzeMainTitle generalFormTextR”>Events analysis</section>
    <section class=”analyzeSubTitle generalFormTextB”>Month classification</section>
    <section id=”chartContent” class=”chartContent”></section>

    <script src=”../js/analyze.js”></script>

    This is my js code:

    function showmenu(elem) {
    // Clear any currently open menu
    var openMenu = document.getElementById(“activeMenu”);
    if (openMenu) {
    if (openMenu === elem) {

    // Only apply it if the element actually has LI child nodes.
    // OPTIONAL: Will still work without if statement.
    if (elem.getElementsByTagName(“li”).length > 0) {
    elem.setAttribute(“id”, “activeMenu”);

    $(window).on(“load” ,function () {

    $.getJSON(“http://liorha.mtacloud.co.il/tech-care/analyzeController.php&#8221;, function (result) {
    var chart = new CanvasJS.Chart(“chartContent”, {

    type: “column”,
    backgroundColor: null,
    axisY: {
    gridThickness: 0
    data: [
    color: “#be1e2d”,
    dataPoints: result



    function logout(){
    $.post( “http://liorha.mtacloud.co.il/tech-care/mainScreenCotroller.php&#8221;, { handle: “logout” })
    .done(function( data ) {
    if (data.match(“success”)){

    What am i missing here? Tnx.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.