remove unused code
This commit is contained in:
@@ -20,7 +20,6 @@ export default {
|
||||
'nameField',
|
||||
'valueField',
|
||||
'percentField',
|
||||
'currencyField',
|
||||
'colorField',
|
||||
'hiddenField',
|
||||
'minValidPercent',
|
||||
@@ -86,7 +85,6 @@ export default {
|
||||
value: item[this.valueField],
|
||||
percent: (item[this.percentField] > 0 || item[this.percentField] === 0 || item[this.percentField] === '0') ? item[this.percentField] : (item[this.valueField] / totalValidValue * 100),
|
||||
actualPercent: item[this.valueField] / totalValidValue,
|
||||
currency: item[this.currencyField],
|
||||
itemStyle: {
|
||||
color: this.getColor(item[this.colorField] ? item[this.colorField] : colorConstants.defaultChartColors[validItems.length % colorConstants.defaultChartColors.length]),
|
||||
},
|
||||
@@ -95,7 +93,7 @@ export default {
|
||||
};
|
||||
|
||||
finalItem.displayPercent = formatPercent(finalItem.percent, 2, '<0.01');
|
||||
finalItem.displayValue = this.getDisplayCurrency(finalItem.value, (finalItem.currency || this.defaultCurrency));
|
||||
finalItem.displayValue = this.getDisplayCurrency(finalItem.value, this.defaultCurrency);
|
||||
|
||||
validItems.push(finalItem);
|
||||
}
|
||||
|
||||
@@ -28,7 +28,6 @@ export default {
|
||||
'idField',
|
||||
'nameField',
|
||||
'valueField',
|
||||
'currencyField',
|
||||
'colorField',
|
||||
'hiddenField',
|
||||
'defaultCurrency',
|
||||
@@ -139,7 +138,6 @@ export default {
|
||||
const finalItem = {
|
||||
id: (this.idField && item[this.idField]) ? item[this.idField] : item[this.nameField],
|
||||
name: (this.idField && item[this.idField]) ? item[this.idField] : item[this.nameField],
|
||||
currency: item[this.currencyField],
|
||||
itemStyle: {
|
||||
color: this.getColor(item[this.colorField] ? item[this.colorField] : colorConstants.defaultChartColors[i % colorConstants.defaultChartColors.length]),
|
||||
},
|
||||
@@ -230,8 +228,7 @@ export default {
|
||||
const name = self.itemsMap[id] && self.nameField && self.itemsMap[id][self.nameField] ? self.itemsMap[id][self.nameField] : id;
|
||||
|
||||
if (params[i].data !== 0) {
|
||||
const currency = self.itemsMap[id] && self.currencyField && self.itemsMap[id][self.currencyField] ? self.itemsMap[id][self.currencyField] : self.defaultCurrency;
|
||||
const value = self.getDisplayCurrency(params[i].data, currency);
|
||||
const value = self.getDisplayCurrency(params[i].data, self.defaultCurrency);
|
||||
tooltip += '<div><span class="chart-pointer" style="background-color: ' + params[i].color + '"></span>';
|
||||
tooltip += `<span>${name}</span><span style="margin-left: 20px; float: right">${value}</span><br/>`;
|
||||
tooltip += '</div>';
|
||||
|
||||
@@ -90,7 +90,6 @@ export default {
|
||||
'nameField',
|
||||
'valueField',
|
||||
'percentField',
|
||||
'currencyField',
|
||||
'colorField',
|
||||
'hiddenField',
|
||||
'minValidPercent',
|
||||
@@ -139,13 +138,12 @@ export default {
|
||||
value: item[this.valueField],
|
||||
percent: (item[this.percentField] > 0 || item[this.percentField] === 0 || item[this.percentField] === '0') ? item[this.percentField] : (item[this.valueField] / totalValidValue * 100),
|
||||
actualPercent: item[this.valueField] / totalValidValue,
|
||||
currency: item[this.currencyField],
|
||||
color: item[this.colorField] ? item[this.colorField] : colorConstants.defaultChartColors[validItems.length % colorConstants.defaultChartColors.length],
|
||||
sourceItem: item
|
||||
};
|
||||
|
||||
finalItem.displayPercent = formatPercent(finalItem.percent, 2, '<0.01');
|
||||
finalItem.displayValue = this.getDisplayCurrency(finalItem.value, (finalItem.currency || this.defaultCurrency));
|
||||
finalItem.displayValue = this.getDisplayCurrency(finalItem.value, this.defaultCurrency);
|
||||
|
||||
validItems.push(finalItem);
|
||||
}
|
||||
|
||||
@@ -160,7 +160,6 @@
|
||||
name-field="name"
|
||||
value-field="totalAmount"
|
||||
percent-field="percent"
|
||||
currency-field="currency"
|
||||
hidden-field="hidden"
|
||||
v-else-if="!initing"
|
||||
@click="clickPieChartItem"
|
||||
@@ -247,7 +246,6 @@
|
||||
id-field="id"
|
||||
name-field="name"
|
||||
value-field="totalAmount"
|
||||
currency-field="currency"
|
||||
hidden-field="hidden"
|
||||
v-else-if="!initing"
|
||||
@click="clickTrendChartItem"
|
||||
|
||||
@@ -59,7 +59,6 @@
|
||||
name-field="name"
|
||||
value-field="totalAmount"
|
||||
percent-field="percent"
|
||||
currency-field="currency"
|
||||
hidden-field="hidden"
|
||||
v-else-if="!loading"
|
||||
@click="clickPieChartItem"
|
||||
|
||||
Reference in New Issue
Block a user