× Support forum for php-RGraph and php-rgraph content plugin for Joomla

Auto Rendering

6 months 1 week ago - 6 months 1 week ago #1209 by jochen
Replied by jochen on topic Auto Rendering
seems that your plugin parms have been corrupted. Did you copy/paste my sample? Ensure that you paste with option "paste as plain text" otherwise imbedded html-codes may invalidate your input.
  Also  check with setting parm debug="1" and have a look at your html-page's source

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

6 months 1 week ago #1208 by Tan
Replied by Tan on topic Auto Rendering
There's a mistake. Could it be the order to publish the plugin? I changed the order but it has no effect.

{rgraph chart_name="chart" type="Bar" title="Update Chart with a click" width="600" height="300"
data="5000,5000,5000,5000,6000,7000,8000,8000,11000,9000" colorsSequential="true"
variant="3d" gutterBottom="105" gutterLeft="85" event_script="plugins/content/rgraph/js/tan-event-js/event-script-1.js" }csv{/rgraph}


php-rgraph.common.js:388 Uncaught TypeError: Cannot read property 'width' of null
at Object.RG.reset.RG.Reset (php-rgraph.common.js:388)
at home:262
RG.reset.RG.Reset @ php-rgraph.common.js:388
(anonymous) @ home:262
postMessage (async)
onclick @ home:1313

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

6 months 1 week ago - 6 months 1 week ago #1207 by jochen
Replied by jochen on topic Auto Rendering
hi,
this may help...-
see my sample at -> jschmidt-systemberatung.de/index.php?opt...5&Itemid=659&lang=en
 also have look at the sample event script: jschmidt-systemberatung.de/plugins/conte...aph/js/test_event.js

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

6 months 1 week ago #1206 by Tan
Replied by Tan on topic Auto Rendering
Hi Joachim

Not working. I know, this is only javascript issue but I feel like an idiot. I trying with simple setted values but  chart refreshes with the first values. :(
I know I was so tired of you. I am so sorry.


event_script:
var worker=new Worker("/plugins/content/rgraph/js/tan-event-js/event-script-1-worker.js"); worker.addEventListener("message",function(e){ console.log(Array(e.data)); chart.data=Array(e.data); chart.grow();},false);

standalone script: 
var delay=5000;function Update(){var pass_data = '11,15,20'; postMessage(pass_data);setTimeout(Update,delay);}setTimeout(Update,5000);

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

6 months 1 week ago - 6 months 1 week ago #1205 by jochen
Replied by jochen on topic Auto Rendering
hi,
you will need plugin parms with parmeter event_script pointing to a script file containing event-script like this 
window.addEventListener("message",function(e)
         {var chart.data=(Array(e.data));
         chart.redraw(); },
         false);

a second (standalone) script would get the data and issue a post to trigger event-script ,,,:postMessage(yourdata,"*")... Eventscript would then do the update of data and redraw chart. 

so you have plugin parms:
{rgraph chart_name="chart" event_script="your-scriptfile" ...}cvs{/rgraph}

and your "data-Script" (e.g.) within your article.
   

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

6 months 2 weeks ago #1204 by Tan
Replied by Tan on topic Auto Rendering
Dear Master,

I need your  support. I tryed a simple event_script with triggered a button but it's didn't change data. I don't understand where I'm doing wrong.



jQuery(document).ready(function() { jQuery("#growed").click(function(){var data = [1,2,3]; chartcsv_bar2.data=data; chartcsv_bar2.grow();}); var chartcsv_bar2 = new RGraph.Bar( {"chart_type":"Bar","id":"csv_bar2","data":[14,7,1],"options":{"gutterLeft":40,"gutterRight":10,"gutterTop":40,"gutterBottom":120,"colors":["#0052cc","#52CCA3","#996633","#339933","#00BFFF","#66ff33","191970","#FF6600","#e60000","#008000"],"backgroundColor":"rgba(240, 240, 240, 0.4)","colorsSequential":true,"linewidth":1.5,"backgroundGrid":true,"backgroundGridColor":"#000000","scaleDecimals":0,"textAccessible":false,"titleFont":"Arial","titleSize":11,"titleColor":"#555555","textFont":"Arial","textColor":"#555555","textSize":6,"tooltipsCssClass":"rgraph_tooltips","axisColor":"#000000","titleYaxisColor":"#555555","titleXaxisSize":9,"titleYaxisSize":9,"titleXaxisPos":0.3,"titleYaxisPos":0.3,"grouping":"stacked","labelsAbove":true,"labelsAboveSize":7,"labelsAboveDecimals":0,"tooltipsEvent":"onmousemove","variant":"bar","keyBackground":"rgba(145,168,238,0.4)","unitsPost":"psc.","textAngle":45,"variantThreedAngle":0.06,"shadow":true,"bevel":true,"scalePoint":",","scaleThousand":".","labels":["PRICING -> [Registered group\nSTART and send to\nCustomer Representative group]","PRICING -> [Customer Representative group\nACCEPT and send to\nDesign group]","PRICING -> [Registered group\nREROUTE and send to\nCustomer Representative group]"],"strokestyle":"rgba(250,250,250,0.1)","xlabelsOffset":5,"tooltips":["PRICING -> [Registered group\nSTART and send to\nCustomer Representative group]<br>14 pcs.\/ Total 22 pcs.","PRICING -> [Customer Representative group\nACCEPT and send to\nDesign group]<br>7 pcs.\/ Total 22 pcs.","PRICING -> [Registered group\nREROUTE and send to\nCustomer Representative group]<br>1 pcs.\/ Total 22 pcs."]}} ).grow();
});

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

Time to create page: 0.154 seconds
Powered by Kunena Forum

Visitors

Today: 59
Yesterday: 103
This Week: 162
Last Week: 309
This Month: 59
Last Month: 1,699
0162115
United States 31.9% USA
Germany 17.8% Germany
Russia 4.6% Russia
France 3.5% France
Indonesia 2.6% Indonesia
Italy 2.6% Italy
India 2.3% India
Poland 2.2% Poland

Total:

204

countries

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.