(window.webpackJsonp=window.webpackJsonp||[]).push([[334],{960:function(t,e,r){"use strict";r.r(e);r(38),r(4),r(8);var o=r(65),n=r(365),c=r(385),d=r(382);Object(o.a)([n.a,c.a,d.a]);var l={props:{chartData:{type:Array,required:!0},getChartSerie:{type:Function,required:!0},handleSelect:{type:Function,default:function(){return null}},tipoAtivo:{type:String,default:function(){return"???"}},subtitulo:{type:String,default:function(){return""}}},data:function(){return{updateCount:0}},computed:{chartOption:function(){var t=this,option={title:{text:"Monitoração"},legend:{top:"bottom"},tooltip:{trigger:"item"},xAxis:[{type:"category",data:[]}],yAxis:[{type:"value"}],series:[]};return void 0!==this.subtitulo&&""!==this.subtitulo&&(option.yAxis[0].name=this.getNameSubTitulo(this.subtitulo),option.yAxis[0].nameGap=30,option.yAxis[0].nameLocation="center"),this.chartData.forEach((function(e){e.classificacao;var r=e.categoria,o=e.horasDisponiveis,n=e.horasIndisponiveis;if(console.log("kilometro ==> ",r),option.xAxis[0].data.push(r),void 0!==o){var c=t.getChartSerie("horasDisponiveis");void 0===c.data&&(c.data=[]),c.data.push(o),option.series.push(c)}if(void 0!==n){var d=t.getChartSerie("horasIndisponiveis");void 0===d.data&&(d.data=[]),d.data.push(n),option.series.push(d)}})),option}},watch:{chartData:function(){this.updateCount++}},methods:{getNameSubTitulo:function(t){var text="";return"PAV"===this.tipoAtivo&&("ATR"===t?text="Flechas nas trilhas de roda":"TRI"===t?text="Percentual de área trincada":"FC2"===t?text="Áreas afetadas por trincas interligadas":"IRI"===t?text="IRI 1000m":"DC"===t?text="FWD":"IGG"===t?text="IGG":"DEG"===t?text="Degrau":"HS"===t?text="Aderência (HS)":"VRD"===t?text="Aderência (VRD)":"ICP"===t&&(text="ICP")),text}}},h=r(37),component=Object(h.a)(l,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("b-card",[0===t.chartData.length?r("b-alert",{attrs:{show:"",variant:"info"}},[r("fa-icon",{staticClass:"mr-1",staticStyle:{"font-size":"1.2rem"},attrs:{icon:"circle-info"}}),t._v(" "),r("span",[t._v(" Não há dados para o filtro informado. ")])],1):t._e(),t._v(" "),r("v-chart",{key:t.updateCount,staticClass:"chart",attrs:{option:t.chartOption,autoresize:""},on:{click:t.handleSelect}})],1)}),[],!1,null,null,null);e.default=component.exports}}]);
//# sourceMappingURL=62615ee-1.2.10.js.map