|
@@ -132,6 +132,9 @@ Page({
|
|
|
})
|
|
|
records = res.data.data.records
|
|
|
today_stock = res.data.data.today_record.today_stock
|
|
|
+ this.setData({
|
|
|
+ today_stock:today_stock
|
|
|
+ })
|
|
|
this.getDays()
|
|
|
this.getzan()
|
|
|
this.getComment()
|
|
@@ -418,6 +421,11 @@ function initChart1(canvas, width, height, dpr) {
|
|
|
show: true,
|
|
|
orient: 'vertical',
|
|
|
right: '1%',
|
|
|
+ itemWidth:10,
|
|
|
+ itemHeight:10,
|
|
|
+ textStyle:{
|
|
|
+ fontSize:12
|
|
|
+ },
|
|
|
formatter: function (name){
|
|
|
var index = 0;
|
|
|
today_stock.forEach(function (value, i) {
|
|
@@ -425,9 +433,13 @@ function initChart1(canvas, width, height, dpr) {
|
|
|
index = i;
|
|
|
}
|
|
|
});
|
|
|
- return name + " " + today_stock[index].value;
|
|
|
+ return name;
|
|
|
+ // + " " + today_stock[index].value+ " " + today_stock[index].money
|
|
|
}
|
|
|
},
|
|
|
+ grid:{
|
|
|
+ // right:'10%'
|
|
|
+ },
|
|
|
series: [{
|
|
|
label: {
|
|
|
|
|
@@ -440,7 +452,7 @@ function initChart1(canvas, width, height, dpr) {
|
|
|
}
|
|
|
},
|
|
|
type: 'pie',
|
|
|
- center: ['37%', '40%'],
|
|
|
+ center: ['38%', '40%'],
|
|
|
radius: ['0%', radius],
|
|
|
data: today_stock
|
|
|
|