Forum - jschmidt-systemberatung.de

× php-RGraph and php-rgraph Joomla Content Plugin

Graphs not showing in Joomla

  • Marco
  • Topic Author
  • Fresh Boarder
  • Fresh Boarder
More
1 year 4 months ago #1550 by Marco
Graphs not showing in Joomla was created by Marco
Congratulations for the excellent work!

I am looking forward to use the "php-RGraph" in Joomla.

I am using a LAMP local server for testing.

I managed to install the unziped "php-RGraph-V2.1.19.zip" file in my root web server directory (/var/www/html/) and it works with all the examples!: http://localhost/RGraph/index.html

My Joomla installation (/var/www/html/) is in: http://localhost/Joomla

And I also installed the "php-RGraph" plugin in Joomla and enabled it, but I can't see the graph when I type the following text directly in my article: {rgraph data="50,60,70,80,90,60|109,120,100,130,140,100" title="Sample 1"} sample01{/rgraph}

Please help, probably I miss understood something


 

Please Log in or Create an account to join the conversation.

  • jochen
  • Administrator
  • Administrator
More
1 year 4 months ago #1551 by jochen
Replied by jochen on topic Graphs not showing in Joomla
hi,
pls. check if your editor did not convert the doüble quotes or the curly brackets (e.g. browse created html source)

Please Log in or Create an account to join the conversation.

  • Marco
  • Topic Author
  • Fresh Boarder
  • Fresh Boarder
More
1 year 4 months ago - 1 year 4 months ago #1553 by Marco
Replied by Marco on topic Graphs not showing in Joomla
I am posting the html generated, please help:

<!DOCTYPE html>
<html lang="en-gb" dir="ltr">
<head>
    <meta charset="utf-8">
    <meta name="author" content="Administrador del Joomla de Prueba">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="generator" content="Joomla! - Open Source Content Management">
    <title>Mirar2</title>
    <link href="/Joomla/media/system/images/joomla-favicon.svg" rel="icon" type="image/svg+xml">
    <link href="/Joomla/media/system/images/favicon.ico" rel="alternate icon" type="image/vnd.microsoft.icon">
    <link href="/Joomla/media/system/images/joomla-favicon-pinned.svg" rel="mask-icon" color="#000">

    <link href="/Joomla/media/system/css/joomla-fontawesome.min.css?b18fe04fe1c65c603dda465d645cf8af" rel="lazy-stylesheet" /><noscript><link href="/Joomla/media/system/css/joomla-fontawesome.min.css?b18fe04fe1c65c603dda465d645cf8af" rel="stylesheet" /></noscript>
    <link href="/Joomla/media/templates/site/cassiopeia/css/global/colors_standard.min.css?b18fe04fe1c65c603dda465d645cf8af" rel="stylesheet" />
    <link href="/Joomla/media/templates/site/cassiopeia/css/template.min.css?b18fe04fe1c65c603dda465d645cf8af" rel="stylesheet" />
    <link href="/Joomla/media/templates/site/cassiopeia/css/vendor/joomla-custom-elements/joomla-alert.min.css?0.2.0" rel="stylesheet" />
    <link href="/Joomla/media/plg_content_rgraph/css/rgraph.css?b18fe04fe1c65c603dda465d645cf8af" rel="stylesheet" />
    <style>:root {
        --hue: 214;
        --template-bg-light: #f0f4fb;
        --template-text-dark: #495057;
        --template-text-light: #ffffff;
        --template-link-color: #2a69b8;
        --template-special-color: #001B4C;
        
    }</style>

    <script src="/Joomla/media/plg_content_rgraph/js/php-rgraph.common.js?b18fe04fe1c65c603dda465d645cf8af"></script>
    <script src="/Joomla/media/plg_content_rgraph/js/RGraph.hbar.js?b18fe04fe1c65c603dda465d645cf8af"></script>
    <script type="application/json" class="joomla-script-options new">{"joomla.jtext":{"ERROR":"Error","MESSAGE":"Message","NOTICE":"Notice","WARNING":"Warning","JCLOSE":"Close","JOK":"OK","JOPEN":"Open"},"system.paths":{"root":"\/Joomla","rootFull":"http:\/\/localhost\/Joomla\/","base":"\/Joomla","baseFull":"http:\/\/localhost\/Joomla\/"},"csrf.token":"24ce1a28edd81446d71fa6e06296f4d1"}</script>
    <script src="/Joomla/media/system/js/core.min.js?576eb51da909dcf692c98643faa6fc89629ead18"></script>
    <script src="/Joomla/media/templates/site/cassiopeia/js/template.min.js?b18fe04fe1c65c603dda465d645cf8af" defer></script>
    <script src="/Joomla/media/system/js/messages-es5.min.js?44e3f60beada646706be6569e75b36f7cf293bf9" nomodule defer></script>
    <script src="/Joomla/media/system/js/messages.min.js?7425e8d1cb9e4f061d5e30271d6d99b085344117" type="module"></script>
    <script>   if (typeof jQuery == 'undefined') {
           console.log ('Error! jQuery not availanble, php-rgaph needs jQuery library'); }
</script>
    <script>jQuery(document).ready(function() { 
  chartcvs = new RGraph.HBar( {"chart_type":"HBar","id":"cvs","data":[40,50,80,30,50,60,70],"options":{"debug":false,"marginTop":35,"marginBottom":30,"marginLeft":25,"marginRight":15,"scaleDecimals":0,"scalePoint":",","scaleThousand":".","colors":["#e60000","#008000","#0052cc","#52CCA3","#996633","#339933","#00BFFF","#66ff33","#191970","#FF6600"],"tooltipsEffect":"fade","backgroundColor":"rgba(240, 240, 240, 0.4)","colorsSequential":false,"linewidth":1.5,"backgroundGrid":true,"backgroundGridColor":"#dddddd","titleFont":"Arial","titleSize":11,"titleColor":"#555555","textFont":"Arial","textColor":"#555555","textSize":9,"tooltipsCssClass":"rgraph_tooltips","tooltipsPointer":true,"tooltipsPositionStatic":false,"xaxisColor":"#000000","yaxisColor":"#000000","xaxisTitleFont":"Arial","yaxisTitleFont":"Arial","xaxisTitleColor":"#555555","yaxisTitleColor":"#555555","xaxisTitleSize":9,"yaxisTitleSize":9,"xaxisTitlePos":0.3,"yaxisTitlePos":0.3,"marginLeftAuto":true,"xaxisScaleMax":90,"variant":"3d","xaxisScalePoint":",","xaxisScaleThousand":".","yaxisScalePoint":",","yaxisScaleThousand":".","labels":["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],"yaxisLabels":["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"]}} ).draw();
  });
</script>

</head>

<body class="site com_content wrapper-static view-article no-layout no-task itemid-138">
    <header class="header container-header full-width">

        
        
                    <div class="grid-child">
                <div class="navbar-brand">
                    <a class="brand-logo" href="/Joomla/">
                        <img class="logo d-inline-block" loading="eager" decoding="async" src="/Joomla/media/templates/site/cassiopeia/images/logo.svg" alt="Joomla de Prueba">                    </a>
                                    </div>
            </div>
        
            </header>

    <div class="site-grid">
        
        
        
        
        <div class="grid-child container-component">
            
            
            <div id="system-message-container" aria-live="polite"></div>

            <main>
            <div class="com-content-article item-page" itemscope itemtype=" schema.org/Article ">
    <meta itemprop="inLanguage" content="en-GB">
    
    
        <div class="page-header">
        <h1 itemprop="headline">
            Prueba2        </h1>
                            </div>
        
        
            <dl class="article-info text-muted">

            <dt class="article-info-term">
                            Details                    </dt>

                    <dd class="createdby" itemprop="author" itemscope itemtype=" schema.org/Person ">
    <span class="icon-user icon-fw" aria-hidden="true"></span>
                    Written by: <span itemprop="name">Administrador del Joomla de Prueba</span>    </dd>
        
        
                    <dd class="category-name">
    <span class="icon-folder-open icon-fw" aria-hidden="true"></span>                Category: <span itemprop="genre">Uncategorised</span>    </dd>
        
        
        
    
                        <dd class="create">
    <span class="icon-calendar icon-fw" aria-hidden="true"></span>
    <time datetime="2024-07-08T20:24:23+00:00" itemprop="dateCreated">
        Created: 08 July 2024    </time>
</dd>
        
                    <dd class="modified">
    <span class="icon-calendar icon-fw" aria-hidden="true"></span>
    <time datetime="2024-07-08T20:41:53+00:00" itemprop="dateModified">
        Last Updated: 08 July 2024    </time>
</dd>
        
                    <dd class="hits">
    <span class="icon-eye icon-fw" aria-hidden="true"></span>
    <meta itemprop="interactionCount" content="UserPageVisits:13">
    Hits: 13</dd>
            </dl>
    
    
        
                                                <div itemprop="articleBody" class="com-content-article__body">
        <p>
<div style='padding-top: 25px;display: inline-block;' class=''>
<canvas id='cvs' width='400' height='250'>[No canvas support]></canvas>
</div></p>    </div>

        
                                        </div>

            </main>
            
        </div>

        
        
            </div>

    
    
    
</body>
</html>
Attachments:
Last edit: 1 year 4 months ago by Marco. Reason: Adding a file

Please Log in or Create an account to join the conversation.

  • Marco
  • Topic Author
  • Fresh Boarder
  • Fresh Boarder
More
1 year 4 months ago #1554 by Marco
Replied by Marco on topic Graphs not showing in Joomla
I even tried copying the text:

{rgraph data="50,60,70,80,90,60|109,120,100,130,140,100" title="Sample 1"} sample01{/rgraph}
into a "Custom Module" and enabling the "Prepare Content" Option, by doing that, thet text itself is not showing, only a blank space where the graph should be.

Does the "Plugin php-RGraph" actually include all the libraries of the "php-RGraph" by itself? or do I have to install the "php-RGraph" somewhere inside the Joomla in order to all libraries needed to be visible by Joomla?

Please Log in or Create an account to join the conversation.

  • Mavi
  • Fresh Boarder
  • Fresh Boarder
More
1 year 4 months ago - 1 year 4 months ago #1555 by Mavi
Replied by Mavi on topic Graphs not showing in Joomla
Hello Marco

 Your posted code is based on the example from this page. 
I used this example myself and also explicitly tested your code again in my Joomla installation and it works. 

Are you sure that you imported your code as plain text into the Joomla editor? 
If you copy the code 1:1, it will contain design elements that interfere with Joomla's interpretation.

Have you also checked whether the plugin was activated in Joomla?

Something else that could be disruptive would be a Content Security Policy (CSP) in your htaccess (only applicable if you have changed it) in this case, an exception rule must be added

Does the "Plugin php-RGraph" actually include all the libraries of the "php-RGraph" by itself?


The installation includes everything needed to run the code example.
The bug/error must lie somewhere in your Joomla installation or maybe in your environment

**Edit** 
Yes, it is a fault of your environment:

'Error! jQuery not availanble, php-rgaph needs jQuery library');

Last edit: 1 year 4 months ago by Mavi.

Please Log in or Create an account to join the conversation.

  • Marco
  • Topic Author
  • Fresh Boarder
  • Fresh Boarder
More
1 year 4 months ago #1557 by Marco
Replied by Marco on topic Graphs not showing in Joomla
Thank you very much for the answer.

I wanted to tell you for information purposes what I did:

I installed the "php-RGraph" in my root web server directory (/var/www/html/), so I access it in : http://localhost/RGraph/

And my Joomla installation also is in /var/www/html/ , so I access it in: http://localhost/Joomla

Then I just installed the "Plugin php-RGraph" and enabled it.

Then I changed in Joomla Global Configuration -> Site -> Default Editor -> from TinyMCE to None.

After that, I just copied the {rgraph data="50,60,70,80,90,60|109,120,100,130,140,100" title="Sample 1"} sample01{/rgraph} and pasted directly in an article.

Since I did not touch anything else, where do I check the environment?, is there a file? or do I have to insert some libraries reference before in that article?

Thank you very much for your patience, I think we are on the right track.

Please Log in or Create an account to join the conversation.

Time to create page: 0.508 seconds
Powered by Kunena Forum
We use cookies

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.