对比图表bug

dev
liuyongli 3 years ago
parent 8d7a88b5c0
commit 0eeb715242

@ -36,9 +36,9 @@ export default function multipleColumn(columnName = [], xMsg = [], data = [],) {
fontSize: 8
},
left: 20,
itemWidth: 12,
itemHeight: 12,
borderRadius: 1, //圆角半径
itemWidth: 10,
itemHeight: 10,
// borderRadius: 1, //圆角半径
},
grid: {
left: 20,

@ -93,9 +93,8 @@ export default function negaposiOption(dName = [], data = {}) {
color: 'black',
fontSize: 8
},
itemWidth: 12,
itemHeight: 16,
borderRadius: 1,
itemWidth: 10,
itemHeight: 10,
},
grid: {
bottom: 20,

@ -25,9 +25,8 @@ export default function stack(yName=[],data=[],color=[]){
color: 'black',
fontSize: 8
},
itemWidth: 12,
itemHeight: 12,
borderRadius: 1,
itemWidth: 10,
itemHeight: 10,
},
tooltip: {
trigger: 'axis',

@ -13,7 +13,7 @@ Component({
brandOption: histogram([], [], [], '#0084FF'),
brandOption2: histogram([], [], [], '#20cc62'),
brandOption4: sHistogram(),
stackOption: stack([], [], ['#00aaff', '#20cc62', '#ff4852']),
stackOption: stack([], [], dColor),
genderOption:negaposiOption([],{}),
genderOptio2:negaposiOption([],{}),
boxArr: new Array(6),
@ -95,7 +95,7 @@ Component({
data[2].push(i.Data['负面'])
}
this.setData({
stackOption: stack(yMsg, data, ['#00aaff', '#20cc62', '#ff4852'])
stackOption: stack(yMsg, data, dColor)
})
})
//微博大V
@ -126,7 +126,7 @@ Component({
console.log(data);
//横轴,数据,纵轴
this.setData({
brandOption4: sHistogram(xMsg, data, sBrand, [])
brandOption4: sHistogram(xMsg, data, sBrand, dColor)
})
})
//微博内容方向对比

@ -221,7 +221,7 @@ Component({
}
//横轴,数据,纵轴
this.setData({
brandOption4: sHistogram(xMsg, data, SeriesName, [])
brandOption4: sHistogram(xMsg, data, SeriesName, dColor)
})
})
//品牌传播TOP媒体

@ -99,7 +99,7 @@ Component({
data[2].push(i.Data['负面'])
}
this.setData({
stackOption: stack(yMsg, data, ['#00aaff', '#20cc62', '#ff4852'])
stackOption: stack(yMsg, data,dColor )//['#00aaff', '#20cc62', '#ff4852']
})
})
//微博大V
@ -129,7 +129,7 @@ Component({
}
//横轴,数据,纵轴
this.setData({
brandOption4: sHistogram(xMsg, data, SeriesName, [])
brandOption4: sHistogram(xMsg, data, SeriesName, dColor)
})
})
//微博内容方向对比

@ -65,7 +65,7 @@ Component({
}
// //横轴,数据,纵轴
this.setData({
brandOption4: sHistogram(xMsg, data, ['事件一','事件二'], [],35)
brandOption4: sHistogram(xMsg, data, ['事件一','事件二'], dColor,35)
})
})
//事件调性分布

@ -9,6 +9,8 @@
font-size: 36rpx;
font-weight: bold;
margin-left:32rpx ;
height: 100rpx;
line-height: 100rpx;
}
.table{
height: 380rpx;

@ -25,7 +25,19 @@ Component({
area: [],
weiboDist: [],
sex:[],
attestation:[]
attestation:[],
pieColor: [
'background: rgb(244,72,85)',
'background: rgb(245,109,47)',
'background: rgb(248,189,32)',
'background: rgb(75,203,100)',
'background: rgb(75,214,213)',
'background: rgb(244,72,85)',
'background: rgb(245,109,47)',
'background: rgb(248,189,32)',
'background: rgb(75,203,100)',
'background: rgb(75,214,213)',
],
},
lifetimes: {
attached() {
@ -103,7 +115,7 @@ Component({
console.log(data);
//横轴,数据,纵轴
this.setData({
brandOption4: sHistogram(xMsg, data, ['事件一', '事件二'], [])
brandOption4: sHistogram(xMsg, data, ['事件一', '事件二'], dColor)
})
})
//微博调性对比
@ -137,7 +149,7 @@ Component({
for (let i of data) {
let obj = {}
obj.arr = i
obj.func = pieOption(['#0283ff', '#a8eac1', '#ffe49a'], i)
obj.func = pieOption(['#FF4852', '#FF6E25', '#FFBF00', '#20CC62', '#00D6D6', '#00AAFF', '#7257FF'], i)
newData.push(obj)
}
console.log(newData);
@ -237,13 +249,13 @@ Component({
sex = sex.map(ele => {
return {
arr: ele,
func: pieOption(['#0283ff', '#a8eac1', '#ffe49a'], ele)
func: pieOption(['#FF4852', '#FF6E25', '#FFBF00', '#20CC62', '#00D6D6', '#00AAFF', '#7257FF'], ele)
}
})
attestation = attestation.map(ele => {
return {
arr: ele,
func: pieOption(['#0283ff', '#a8eac1', '#ffe49a'], ele)
func: pieOption(['#FF4852', '#FF6E25', '#FFBF00', '#20CC62', '#00D6D6', '#00AAFF', '#7257FF'], ele)
}
})
console.log(sex);

@ -29,7 +29,7 @@
<view class="circle-data">
<view wx:for="{{weiboDist[0].arr}}" wx:for-item="item" wx:key="name" style="margin-bottom: 64rpx;display: flex;justify-content: flex-start;margin-top: 60rpx;">
<view class="circle-data-item">
<view style="width: 10px;height: 10px;background: #0084FF;border-radius: 1px;"></view>
<view class="colorTags" style="{{pieColor[index]}}"></view>
<view class="circle-data-title">{{item.name}}</view>
</view>
<view class="circle-data-item">
@ -51,7 +51,7 @@
<view class="circle-data">
<view wx:for="{{weiboDist[1].arr}}" wx:for-item="item" wx:key="name" style="margin-bottom: 64rpx;display: flex;justify-content: flex-start;margin-top: 60rpx;">
<view class="circle-data-item">
<view style="width: 10px;height: 10px;background: #0084FF;border-radius: 1px;"></view>
<view class="colorTags" style="{{pieColor[index]}}"></view>
<view class="circle-data-title">{{item.name}}</view>
</view>
<view class="circle-data-item">
@ -94,7 +94,7 @@
<view class="circle-data">
<view wx:for="{{sex[0].arr}}" wx:for-item="item" wx:key="name" style="margin-bottom: 64rpx;display: flex;justify-content: flex-start;margin-top: 60rpx;">
<view class="circle-data-item">
<view style="width: 10px;height: 10px;background: #0084FF;border-radius: 1px;"></view>
<view class="colorTags" style="{{pieColor[index]}}"></view>
<view class="circle-data-title">{{item.name}}</view>
</view>
<view class="circle-data-item">
@ -116,7 +116,7 @@
<view class="circle-data">
<view wx:for="{{sex[1].arr}}" wx:for-item="item" wx:key="name" style="margin-bottom: 64rpx;display: flex;justify-content: flex-start;margin-top: 60rpx;">
<view class="circle-data-item">
<view style="width: 10px;height: 10px;background: #0084FF;border-radius: 1px;"></view>
<view class="colorTags" style="{{pieColor[index]}}"></view>
<view class="circle-data-title">{{item.name}}</view>
</view>
<view class="circle-data-item">
@ -143,7 +143,7 @@
<view class="circle-data">
<view wx:for="{{attestation[0].arr}}" wx:for-item="item" wx:key="name" style="margin-bottom: 64rpx;display: flex;justify-content: flex-start;margin-top: 60rpx;">
<view class="circle-data-item">
<view style="width: 10px;height: 10px;background: #0084FF;border-radius: 1px;"></view>
<view class="colorTags" style="{{pieColor[index]}}"></view>
<view class="circle-data-title">{{item.name}}</view>
</view>
<view class="circle-data-item">
@ -165,7 +165,7 @@
<view class="circle-data">
<view wx:for="{{attestation[1].arr}}" wx:for-item="item" wx:key="name" style="margin-bottom: 64rpx;display: flex;justify-content: flex-start;margin-top: 60rpx;">
<view class="circle-data-item">
<view style="width: 10px;height: 10px;background: #0084FF;border-radius: 1px;"></view>
<view class="colorTags" style="{{pieColor[index]}}"></view>
<view class="circle-data-title">{{item.name}}</view>
</view>
<view class="circle-data-item">

@ -104,3 +104,6 @@
/* margin-left:16rpx ; */
margin-top: 32rpx;
}
.colorTags {
width: 10px;height: 10px;border-radius: 1px;
}

@ -125,7 +125,7 @@ Component({
console.log('cdc',data);
//横轴,数据,纵轴
this.setData({
brandOption4: sHistogram(xMsg, data, themeName, [])
brandOption4: sHistogram(xMsg, data, themeName, dColor)
})
})
//微博内容方向对比

Loading…
Cancel
Save