Problem with RGraph distant but not in local

Share RGraph:   Share or Like RGraph on Facebook!

« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by Arnaud on 17th November 2016
Hello,
I have a problem with Rgraph and dygraph on my pcduino V2.
When i check in locally, I have no problem but if i send a request to the pcduino on a distant client, i have no graphic displayed. Have you idea for solved this problem?
Regards
Posted by Richard on 17th November 2016
Hi there,

Check your browsers console for an error message. Maybe you have the paths to the RGraph libraries incorrect.



Richard
Posted by Arnaud on 18th November 2016
Hello,
where are theses informations ??? I have no error displayed.
please let me know
thanks
Posted by Richard on 18th November 2016
Hi there,

In your browsers JavaScript console. In Chrome (and maybe Firefox too) you can press CTRL+SHIFT+J to see it.



Richard
Posted by Arnaud on 18th November 2016
Hello,
I have this error
ReferenceError: RGraph is not defined
what is the problem ?
Regards
Posted by Richard on 18th November 2016
Hi there,

You probably have the paths incorrect. They shoud look something like this (where you've put the library files determines the actiual path):

<script src="/javascript/RGraph.common.core.js" ></script>
<script src="/javascript/RGraph.bar.js" ></script>




Richard
Posted by Arnaud on 19th November 2016
Hello,
thanks for your response...
I want use two library in same time (dygraphs et rgraph) but there is a problem...
For dygraph, i use theses parameters
  <!-- DYGRAPH -->
  function path(jsFileNameIn) { // fonction pour fixer chemin absolu
    var js = document.createElement("script");
    js.type = "text/javascript";
    js.src = "\"+window.location.hostname+\":80"+"/javascript/dygraphs/"+jsFileNameIn; // si utilisation server http local port 80

    document.head.appendChild(js);
    //alert(js.src); // debug

   } // fin fonction path

    //---- fichiers a charger ---
   path('dygraph-combined.js'); // fichier simplifiant acces a tous les fichiers de la librairie dygraph






for rgraph, i use this code but there is a problem, the path fonction is the same for the library rgraph et dygraph. How use them in same time ???





                                function path(jsFileNameIn) { // fonction pour fixer chemin absolu       
                                         var js = document.createElement("script");
                                         js.type = "text/javascript";
                                         js.src = "\"+window.location.hostname+\":80"+"/javascript/rgraph/"+jsFileNameIn; // si utilisation server http local port 80
                                         document.head.appendChild(js);
                                         //alert(js.src); // debug
                                 }

                                 //---- fichiers a charger ---
                                 path('RGraph.common.core.js');
                                 path('RGraph.gauge.js');

                                 window.onload = function () { // fonction executee apres chargement de la page HTML

                                         //--- code graphique ---

                                         // parametres sont : nom du canva, min, max, valeur courante
                                         var gauge = new RGraph.Gauge('nomCanvas', 0, 1023, 300); // declare widget graphique
                                         gauge.Draw(); // dessine le widget graphique dans le canvas

                                 } // fin fonction onload






Thanks for your help
Regards
Posted by Richard on 19th November 2016
Hi there,

Can't help you with Dygraphs I'm afraid, but regarding the function names - just name them differently:

function Dypath()
{
}

function RGpath()
{
}


Richard

Add a reply




« Back to message list