答案 0 :(得分:0)
getSummaryValue: function(serie) {
const start = this.start || (serie.data.slice(0, 1)[0] || [])[0]
const end = this.end || (serie.data.slice(-1)[0] || [])[0]
const processedYData = _filter(serie.data, data => {
return data[0] >= start && data[0] <= end
})
let values = processedYData.map(item => parseFloat(item[1] || 0))
return formatter(_sum(values), serie.unit)
}