HEX
Server: Apache
System: Linux 185.122.168.184.host.secureserver.net 5.14.0-570.52.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Oct 15 06:39:08 EDT 2025 x86_64
User: barbeatleanalyti (1024)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: /home/barbeatleanalyti/www/barisnew.beatleanalytics.com/theme/black/rgraph/RGraph.common.key.js
RGraph=window.RGraph||{isRGraph:true};RGraph.HTML=RGraph.HTML||{};(function(win,doc,undefined)
{var RG=RGraph,ua=navigator.userAgent,ma=Math;RG.drawKey=RG.DrawKey=function(obj,key,colors)
{if(!key){return;}
var ca=obj.canvas,co=obj.context,prop=obj.properties,keypos=prop['chart.key.position'],textsize=prop['chart.text.size'],key_non_null=[],colors_non_null=[];co.lineWidth=1;co.beginPath();if(typeof(prop['chart.key.vpos'])=='number'){obj.set('chart.key.position.y',prop['chart.key.vpos']*obj.get('chart.margin.top'));}
for(var i=0;i<key.length;++i){if(key[i]!=null){colors_non_null.push(colors[i]);key_non_null.push(key[i]);}}
key=key_non_null;colors=colors_non_null;var textAccessible=false;if(typeof prop['chart.key.text.accessible']==='boolean'){textAccessible=prop['chart.key.text.accessible'];}
function DrawKey_graph(obj,key,colors)
{var marginLeft=obj.marginLeft,marginRight=obj.marginRight,marginTop=obj.marginTop,marginBottom=obj.marginBottom,hpos=prop['chart.yaxis.position']=='right'?marginLeft+10:ca.width-marginRight-10,vpos=marginTop+10,title=prop['chart.title'],hmargin=8,vmargin=4,fillstyle=prop['chart.key.background'],strokestyle='#333',height=0,width=0;var textConf=RG.getTextConf({object:obj,prefix:'chart.key.labels'});blob_size=textConf.size;text_size=textConf.size;if(!obj.coords)obj.coords={};obj.coords.key=[];co.font=text_size+'pt '+prop['chart.text.font'];for(i=0;i<key.length;++i){width=Math.max(width,co.measureText(key[i]).width);}
width+=5;width+=blob_size;width+=5;width+=5;width+=5;if(prop['chart.yaxispos']=='left'||(obj.type==='pie'&&!prop['chart.yaxis.position'])||(obj.type==='hbar'&&!prop['chart.yaxis.position'])||(obj.type==='hbar'&&prop['chart.yaxis.position']==='center')||(obj.type==='hbar'&&prop['chart.yaxis.position']==='right')||(obj.type==='rscatter'&&!prop['chart.yaxis.position'])||(obj.type==='radar'&&!prop['chart.yaxis.position'])||(obj.type==='rose'&&!prop['chart.yaxis.position'])||(obj.type==='funnel'&&!prop['chart.yaxis.position'])||(obj.type==='vprogress'&&!prop['chart.yaxis.position'])||(obj.type==='hprogress'&&!prop['chart.yaxis.position'])){hpos-=width;}
if(typeof(prop['chart.key.halign'])=='string'){if(prop['chart.key.halign']=='left'){hpos=marginLeft+10;}else if(prop['chart.key.halign']=='right'){hpos=ca.width-marginRight-width;}}
if(typeof(prop['chart.key.position.x'])=='number'){hpos=prop['chart.key.position.x'];}
if(typeof(prop['chart.key.position.y'])=='number'){vpos=prop['chart.key.position.y'];}
if(prop['chart.key.shadow']){co.shadowColor=prop['chart.key.shadow.color'];co.shadowBlur=prop['chart.key.shadow.blur'];co.shadowOffsetX=prop['chart.key.shadow.offsetx'];co.shadowOffsetY=prop['chart.key.shadow.offsety'];}
co.beginPath();co.fillStyle=prop['chart.key.background'];co.strokeStyle='black';if(typeof(prop['chart.key.position.graph.boxed'])=='undefined'||(typeof(prop['chart.key.position.graph.boxed'])=='boolean'&&prop['chart.key.position.graph.boxed'])){if(arguments[3]!=false){co.lineWidth=typeof(prop['chart.key.linewidth'])=='number'?prop['chart.key.linewidth']:1;if(prop['chart.key.rounded']==true){co.beginPath();co.strokeStyle=strokestyle;RG.strokedCurvyRect(co,Math.round(hpos),Math.round(vpos),width-5,5+((text_size+5)*RG.getKeyLength(key)),4);co.stroke();co.fill();RG.NoShadow(obj);}else{co.strokeRect(Math.round(hpos),Math.round(vpos),width-5,5+((text_size+5)*RG.getKeyLength(key)));co.fillRect(Math.round(hpos),Math.round(vpos),width-5,5+((text_size+5)*RG.getKeyLength(key)));}}}
RG.NoShadow(obj);co.beginPath();if(prop['chart.key.colors']){colors=prop['chart.key.colors'];}
for(var i=key.length-1;i>=0;i--){var j=Number(i)+1;if(typeof prop['chart.key.color.shape']==='object'&&typeof prop['chart.key.color.shape'][i]==='string'){var blob_shape=prop['chart.key.color.shape'][i];}else if(typeof prop['chart.key.color.shape']==='object'&&typeof prop['chart.key.color.shape'][i]==='function'){var blob_shape=prop['chart.key.color.shape'][i];}else if(typeof prop['chart.key.color.shape']==='string'){var blob_shape=prop['chart.key.color.shape'];}else if(typeof prop['chart.key.color.shape']==='function'){var blob_shape=prop['chart.key.color.shape'];}else{var blob_shape='rect';}
if(blob_shape=='circle'){co.beginPath();co.fillStyle=colors[i];co.arc(hpos+5+(blob_size/2),vpos+(5*j)+(text_size*j)-text_size+(blob_size/2),blob_size/2,0,6.26,0);co.fill();}else if(blob_shape=='line'){co.beginPath();co.strokeStyle=colors[i];co.moveTo(hpos+5,vpos+(5*j)+(text_size*j)-text_size+(blob_size/2));co.lineTo(hpos+blob_size+5,vpos+(5*j)+(text_size*j)-text_size+(blob_size/2));co.stroke();}else if(blob_shape=='triangle'){co.beginPath();co.strokeStyle=colors[i];co.moveTo(hpos+5,vpos+(5*j)+(text_size*j)-text_size+blob_size);co.lineTo(hpos+(blob_size/2)+5,vpos+(5*j)+(text_size*j)-text_size);co.lineTo(hpos+blob_size+5,vpos+(5*j)+(text_size*j)-text_size+blob_size);co.closePath();co.fillStyle=colors[i];co.fill();}else if(typeof blob_shape==='function'){blob_shape({object:obj,color:colors[i],x:hpos+5,y:vpos+(5*j)+(text_size*j)-text_size,width:text_size,height:text_size+1});}else{co.fillStyle=colors[i];co.fillRect(hpos+5,vpos+(5*j)+(text_size*j)-text_size,text_size,text_size+1);}
co.beginPath();ret=RG.text2(obj,{font:textConf.font,size:textConf.size,bold:textConf.bold,italic:textConf.italic,color:typeof textConf.color=='object'?textConf.color[i]:textConf.color,x:hpos+blob_size+5+5+(prop['chart.key.labels.offsetx']||0),y:vpos+(5*j)+(text_size*j)+3+(prop['chart.key.labels.offsety']||0),text:key[i],accessible:textAccessible});obj.coords.key[i]=[ret.x,ret.y,ret.width,ret.height,key[i],colors[i],obj];}
co.fill();}
function DrawKey_margin(obj,key,colors)
{var text_size=typeof(prop['chart.key.labels.size'])=='number'?prop['chart.key.labels.size']:prop['chart.text.size'],text_bold=prop['chart.key.labels.bold'],text_italic=prop['chart.key.labels.italic'],text_font=prop['chart.key.labels.font']||prop['chart.key.font']||prop['chart.text.font'],text_color=prop['chart.key.labels.color']||'black',marginLeft=obj.marginLeft,marginRight=obj.marginRight,marginTop=obj.marginTop,marginBottom=obj.marginBottom,hpos=((ca.width-marginLeft-marginRight)/2)+obj.marginLeft,vpos=marginTop-text_size-5,title=prop['chart.title'],blob_size=text_size,hmargin=8,vmargin=4,fillstyle=prop['chart.key.background'],strokestyle='#999',length=0;if(!obj.coords)obj.coords={};obj.coords.key=[];co.font=(obj.properties['chart.key.labels.italic']?'italic ':'')+(obj.properties['chart.key.labels.bold']?'bold ':'')+text_size+'pt '+text_font;for(i=0;i<key.length;++i){length+=hmargin;length+=blob_size;length+=hmargin;length+=co.measureText(key[i]).width;}
length+=hmargin;if(obj.type=='pie'){if(prop['chart.align']=='left'){var hpos=obj.radius+marginLeft;}else if(prop['chart.align']=='right'){var hpos=ca.width-obj.radius-marginRight;}else{hpos=ca.width/2;}}
hpos-=(length/2);if(typeof(prop['chart.key.position.x'])=='number'){hpos=prop['chart.key.position.x'];}
if(typeof(prop['chart.key.position.y'])=='number'){vpos=prop['chart.key.position.y'];}
if(obj.get('chart.key.position.gutter.boxed')||obj.get('chart.key.position.margin.boxed')){if(prop['chart.key.shadow']){co.shadowColor=prop['chart.key.shadow.color'];co.shadowBlur=prop['chart.key.shadow.blur'];co.shadowOffsetX=prop['chart.key.shadow.offsetx'];co.shadowOffsetY=prop['chart.key.shadow.offsety'];}
co.beginPath();co.fillStyle=fillstyle;co.strokeStyle=strokestyle;if(prop['chart.key.rounded']){RG.strokedCurvyRect(co,hpos,vpos-vmargin,length,text_size+vmargin+vmargin)}else{co.rect(hpos,vpos-vmargin,length,text_size+vmargin+vmargin);}
co.stroke();co.fill();RG.NoShadow(obj);}
if(prop['chart.key.colors']){colors=prop['chart.key.colors'];}
for(var i=0,pos=hpos;i<key.length;++i){pos+=hmargin;if(typeof prop['chart.key.color.shape']==='object'&&typeof prop['chart.key.color.shape'][i]==='string'){var blob_shape=prop['chart.key.color.shape'][i];}else if(typeof prop['chart.key.color.shape']==='object'&&typeof prop['chart.key.color.shape'][i]==='function'){var blob_shape=prop['chart.key.color.shape'][i];}else if(typeof prop['chart.key.color.shape']==='function'){var blob_shape=prop['chart.key.color.shape'];}else if(typeof(prop['chart.key.color.shape'])=='string'){var blob_shape=prop['chart.key.color.shape'];}else{var blob_shape='square';}
if(blob_shape=='line'){co.beginPath();co.strokeStyle=colors[i];co.moveTo(pos,vpos+(blob_size/2));co.lineTo(pos+blob_size,vpos+(blob_size/2));co.stroke();}else if(blob_shape=='circle'){co.beginPath();co.fillStyle=colors[i];co.moveTo(pos,vpos+(blob_size/2));co.arc(pos+(blob_size/2),vpos+(blob_size/2),(blob_size/2),0,6.28,0);co.fill();}else if(blob_shape=='triangle'){co.fillStyle=colors[i];co.beginPath();co.strokeStyle=colors[i];co.moveTo(pos,vpos+blob_size);co.lineTo(pos+(blob_size/2),vpos);co.lineTo(pos+blob_size,vpos+blob_size);co.closePath();co.fill();}else if(typeof blob_shape==='function'){blob_shape({object:obj,color:colors[i],x:pos,y:vpos,width:blob_size,height:blob_size});}else{co.beginPath();co.fillStyle=colors[i];co.rect(pos,vpos,blob_size,blob_size);co.fill();}
pos+=blob_size;pos+=hmargin;co.beginPath();co.fillStyle=(typeof text_color==='object')?text_color[i]:text_color;var ret=RG.Text2(obj,{font:text_font,bold:text_bold,size:text_size,italic:text_italic,x:pos+ +(prop['chart.key.labels.offsetx']||0),y:vpos+text_size+1+ +(prop['chart.key.labels.offsety']||0),text:key[i],accessible:textAccessible});co.fill();pos+=co.measureText(key[i]).width;obj.coords.key[i]=[ret.x,ret.y,ret.width,ret.height,key[i],colors[i],obj];}}
if(keypos&&(keypos==='gutter'||keypos==='margin')){DrawKey_margin(obj,key,colors);}else if(keypos&&(keypos==='graph'||keypos==='chart')){DrawKey_graph(obj,key,colors);}else{alert('[COMMON] ('+obj.id+') Unknown key position: '+keypos);}
if(prop['chart.key.interactive']){if(!RGraph.Drawing||!RGraph.Drawing.Rect){alert('[INTERACTIVE KEY] The drawing API Rect library does not appear to have been included (which the interactive key uses)');}
if(!RGraph.InstallWindowMousedownListener){alert('[INTERACTIVE KEY] The dynamic library does not appear to have been included');}
for(var i=0,len=obj.coords.key.length,maxlen=0;i<len;i+=1){maxlen=Math.max(maxlen,obj.coords.key[i][2]);}
for(var i=0,len=obj.coords.key.length;i<len;i+=1){(function(idx)
{var arr=obj.coords.key;var value=obj.coords.key[idx];var index=idx;var rect=new RGraph.Drawing.Rect(obj.id,value[0],value[1],(prop['chart.key.position']==='gutter'||prop['chart.key.position']==='margin')?value[2]:maxlen,value[3]).set('colorsFill','rgba(0,0,0,0)').draw();rect.onclick=function(e,shape)
{var co=rect.context;co.fillStyle=prop['chart.key.interactive.highlight.label'];co.fillRect(shape.x,shape.y,shape.width,shape.height);if(typeof obj.interactiveKeyHighlight=='function'){obj.Set('chart.key.interactive.index',idx);RG.FireCustomEvent(obj,'onbeforeinteractivekey');obj.interactiveKeyHighlight(index);RG.FireCustomEvent(obj,'onafterinteractivekey');}}
rect.onmousemove=function(e,shape)
{return true;}})(i);}}};RG.getKeyLength=function(key)
{var length=0;for(var i=0,len=key.length;i<len;i+=1){if(key[i]!=null){++length;}}
return length;};RGraph.HTML.key=RGraph.HTML.Key=function(id,prop)
{var div=doc.getElementById(id);var uid=RG.createUID();var str='<table border="0" cellspacing="0" cellpadding="0" id="rgraph_key_'+uid+'" style="display: inline;'+(function()
{var style=''
for(i in prop.tableCss){if(typeof i==='string'){style=style+i+': '+prop.tableCss[i]+';';}}
return style;})()+'" '+(prop.tableClass?'class="'+prop.tableClass+'"':'')+'>';for(var i=0;i<prop.labels.length;i+=1){str+='<tr><td><div style="'+(function()
{var style='';for(var j in prop.blobCss){if(typeof j==='string'){style=style+j+': '+prop.blobCss[j]+';';}}
return style;})()+'display: inline-block; margin-right: 5px; margin-top: 4px; width: 15px; height: 15px; background-color: '+prop.colors[i]+'"'+(prop.blobClass?'class="'+prop.blobClass+'"':'')+'>&nbsp;</div><td>'+(prop.links&&prop.links[i]?'<a href="'+prop.links[i]+'">':'')+'<span '+(prop.labelClass?'class="'+prop.labelClass+'"':'')+'" style="'+(function()
{var style='';for(var j in prop.labelCss){if(typeof j==='string'){style=style+j+': '+prop.labelCss[j]+';';}}
return style;})()+' '+(function()
{var style='';if(prop['labelCss_'+i]){for(var j in prop['labelCss_'+i]){style=style+j+': '+prop['labelCss_'+i][j]+';';}}
return style?style+'"':'"';})()+'>'+prop.labels[i]+'</span>'+(prop.links&&prop.links[i]?'</a>':'')+'</td></tr>';}
div.innerHTML+=(str+'</table>');return doc.getElementById('rgraph_key_'+uid);};})(window,document);