(window.webpackJsonp=window.webpackJsonp||[]).push([[508],{2089:function(t,r,o){"use strict";o.r(r);var l=o(891);l.f.register(l.n,l.j,l.m,l.i,l.e,l.k,l.l,l.h,l.p,l.q,l.d);var e={name:"ChartGranulometria",props:{elemento:{type:Array,default:function(){return[]},required:!0}},data:function(){return{baseChart:{},chartCtx:null,customAxis:null,chartData:{datasets:[{label:"",data:[],backgroundColor:"#007355",hoverBackgroundColor:"#fff0",borderColor:"#007355",type:"bubble"},{label:"",data:[],backgroundColor:"#4DB848",hoverBackgroundColor:"#fff0",borderColor:"#4DB848",type:"line",borderDash:[5,2]},{label:"",data:[],backgroundColor:"#007355de",hoverBackgroundColor:"#fff0",borderColor:"#007355de",type:"line",borderDash:[5,2]},{label:"",data:[],backgroundColor:"#0073558f",hoverBackgroundColor:"#fff0",borderColor:"#0073558f",type:"line"}],labels:[15,20,25,30,35,40,45]},options:{responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"right"},title:{display:!0,text:"",font:{size:14}},tooltip:{callbacks:{}}},scales:{x:{bounds:"ticks",display:!0,type:"linear",min:15,max:45,ticks:{crossAlign:"center",major:{enabled:!0}},title:{display:!0,text:"Teor de Umidade (%)"}},y:{display:!0,min:10,max:100,title:{display:!0,text:"Nº Golpes"}},myScale:{axis:"r"}}}}},watch:{elemento:{deep:!0,handler:function(t){var r=this.chartData.datasets;r[0].data=[],r[1].data=[],r[2].data=[],r[3].data=[];var o=t[0][6],l=t[0][7],e=o.amostra1?o.amostra1:null,n=l.amostra1?l.amostra1:null;r[0].data.push({x:e,y:n,r:5}),e=o.amostra2?o.amostra2:null,n=l.amostra2?l.amostra2:null,r[0].data.push({x:e,y:n,r:5}),e=o.amostra3?o.amostra3:null,n=l.amostra3?l.amostra3:null,r[0].data.push({x:e,y:n,r:5}),e=o.amostra4?o.amostra4:null,n=l.amostra4?l.amostra4:null,r[0].data.push({x:e,y:n,r:5}),e=o.amostra5?o.amostra5:null,n=l.amostra5?l.amostra5:null,r[0].data.push({x:e,y:n,r:5});var m=o.amostra1?o.amostra1:null,d=o.amostra2?o.amostra2:null,h=o.amostra3?o.amostra3:null,c=o.amostra4?o.amostra4:null,y=o.amostra5?o.amostra5:null,f=m+d+h+c+y,x=l.amostra1?l.amostra1:null,v=l.amostra2?l.amostra2:null,C=l.amostra3?l.amostra3:null,w=l.amostra4?l.amostra4:null,k=l.amostra5?l.amostra5:null,D=x+v+C+w+k,b=(5*((m&&x?m*x:null)+(d&&v?d*v:null)+(h&&C?h*C:null)+(c&&w?c*w:null)+(y&&k?y*k:null))-f*D)/(5*((m?Math.pow(m,2):null)+(d?Math.pow(d,2):null)+(h?Math.pow(h,2):null)+(c?Math.pow(c,2):null)+(y?Math.pow(y,2):null))-Math.pow(f,2)),a=(D-b*f)/5,B=a+b*(o.amostra1?o.amostra1:null),M=a+b*(o.amostra5?o.amostra5:null);r[2].data.push({x:o.amostra1?o.amostra1:null,y:B}),r[2].data.push({x:o.amostra5?o.amostra5:null,y:M}),n=l.amostra3?l.amostra3:null,e=o.amostra3?o.amostra3:null,r[3].data.push({x:t[1][0].valor,y:25}),r[3].data.push({x:t[1][0].valor,y:0});var _=o.amostra1?o.amostra1-5:15,A=o.amostra5?o.amostra5+5:45,j=l.amostra5?l.amostra5-5:10,E=l.amostra1?l.amostra1+5:100;this.options.scales.x.min=_,this.options.scales.x.max=A,this.options.scales.y.min=j,this.options.scales.y.max=E,r[1].data.push({x:_,y:25}),r[1].data.push({x:t[1][0].valor,y:25}),this.chartData.datasets=r,this.baseChart.update()}}},mounted:function(){this.chartCtx=document.getElementById("chart-serie-sequencia"),this.baseChart=new l.f(this.chartCtx,{type:"line",data:this.chartData,options:this.options})}},n=o(42),component=Object(n.a)(e,(function(){var t=this,r=t.$createElement;t._self._c;return t._m(0)}),[function(){var t=this.$createElement,r=this._self._c||t;return r("div",{staticClass:"col-12"},[r("div",{staticStyle:{position:"relative",height:"40vh",width:"50vw"},attrs:{id:"chart-container"}},[r("canvas",{attrs:{id:"chart-serie-sequencia"}})])])}],!1,null,null,null);r.default=component.exports}}]);
//# sourceMappingURL=250c37d-1.2.11.js.map