function value_chart(e){const t=acct[e];console.log(e,t),console.log(acct_master,filtered_data),console.log(value_terms,value_data[t]),document.getElementById("chart_title").innerText=acct_master[t][6];let d=value_data[t].map(e=>isNaN(e)?0:e);const n=parseInt(.98*document.getElementById("chart").offsetWidth);height=n>800?parseInt(.4*n):parseInt(.8*n),document.getElementById("chart").innerHTML=draw_value_chart(value_terms,d,n,height)}function draw_value_chart(e,d,n=370,i=150,l=10){const o=n-20,a=i-10;let r,s=d.length,u=o/s,g=Math.max.apply(Math,d),m=Math.min.apply(Math,d),y=.5*g+.5*m,c=d.map(e=>a-10-(e-m)/(g-m)*(a-10)),_={};_.max=.8*g+.2*y,_.mid=y,_.min=.2*y+.8*m;let h,x,b=Object.values(_).sort(),$=b.map(e=>a-10-(e-m)/(g-m)*(a-10));for(x=(e[e.length-1]-e[0])/2592e6>=1?"L":"S",r=``,r+="",r+="",r+='',r+='',r+='',r+="",r+="",r+=``,h=0;h`;for(h=0;h<3;h++){let e=b[h];r+=`${add_commas(e,2)}`}for(h=s-1;h>0;h-=Math.max(Math.round(s/5),1))t=e[h],r+=`${t}`,r+=``;for(r+='',r+='`,r+='',r+='',r+='',h=0;h${add_commas(d[h],2)}`,r+=`${t}`,r+=``}return r+=""}function value_guide(e,t,d,n,i,l){for(var o=0;od/2?(document.getElementById("guide_box").setAttribute("x",e-63),document.getElementById("guide_val_"+i).setAttribute("x",e-3),document.getElementById("guide_time_"+i).setAttribute("x",e-3)):(document.getElementById("guide_box").setAttribute("x",e+3),document.getElementById("guide_val_"+i).setAttribute("x",e+63),document.getElementById("guide_time_"+i).setAttribute("x",e+63)),t>n/2?(document.getElementById("guide_box").setAttribute("y",t-28),document.getElementById("guide_val_"+i).setAttribute("y",t-26),document.getElementById("guide_time_"+i).setAttribute("y",t-14)):(document.getElementById("guide_box").setAttribute("y",t+3),document.getElementById("guide_val_"+i).setAttribute("y",t+5),document.getElementById("guide_time_"+i).setAttribute("y",t+17))}