Commit d03e36fb by 姜雷

修改数据首页饼图样式

parent b8e5399d
...@@ -38,7 +38,7 @@ export default { ...@@ -38,7 +38,7 @@ export default {
container: 'CampusRank', container: 'CampusRank',
forceFit: true, forceFit: true,
height: this.height - 30, height: this.height - 30,
padding: [20, 249, 20, 0], padding: [0, 249, 0, 0],
}); });
this.chart.source(this.data); this.chart.source(this.data);
this.chart.coord('theta', { this.chart.coord('theta', {
...@@ -81,18 +81,10 @@ export default { ...@@ -81,18 +81,10 @@ export default {
width: '244px', width: '244px',
'max-width': '244px', 'max-width': '244px',
'max-height': this.height - 30 + 'px', 'max-height': this.height - 30 + 'px',
right: 0,
}, },
'g2-legend-list-item': { 'g2-legend-list-item': {
color: '#333', color: '#333',
}, },
'g2-legend-text': {
display: 'inline-block',
width: '100px',
overflow: 'hidden',
'text-overflow': 'ellipsis',
'white-space': 'nowrap',
},
'g2-legend-marker': { 'g2-legend-marker': {
width: '10px', width: '10px',
height: '5px', height: '5px',
...@@ -198,10 +190,6 @@ export default { ...@@ -198,10 +190,6 @@ export default {
top: 50%; top: 50%;
right: 0; right: 0;
} }
.g2-legend {
max-height: 270px;
overflow-y: auto;
}
.g2-legend-text { .g2-legend-text {
display: inline-block; display: inline-block;
width: 100px; width: 100px;
......
...@@ -33,7 +33,7 @@ export default { ...@@ -33,7 +33,7 @@ export default {
container: 'SeviceRatio', container: 'SeviceRatio',
forceFit: true, forceFit: true,
height: this.height - 30, height: this.height - 30,
padding: [0, 205, 0, 0], padding: [0, 220, 0, 0],
}); });
this.chart.source(this.data); this.chart.source(this.data);
this.chart.coord('theta', { this.chart.coord('theta', {
...@@ -73,7 +73,8 @@ export default { ...@@ -73,7 +73,8 @@ export default {
`; `;
}, },
'g2-legend': { 'g2-legend': {
width: '200px', width: '215px',
'max-width': '215px',
// left: '-20px', // left: '-20px',
}, },
'g2-legend-list-item': { 'g2-legend-list-item': {
...@@ -89,7 +90,18 @@ export default { ...@@ -89,7 +90,18 @@ export default {
this.chartGeom = this.chart this.chartGeom = this.chart
.intervalStack() .intervalStack()
.position('count') .position('count')
.color('serviceName', ['#4e82fb', '#fb774e', '#ffc934', '#41bf52']); .color('serviceName', [
'#4e82fb',
'#fb774e',
'#ffc934',
'#41bf52',
'#9b50ff',
'#94de70',
'#b5593d',
'#fe8787',
'#254eae',
'#2f4554',
]);
// 辅助元素 // 辅助元素
this.chart.guide().html({ this.chart.guide().html({
...@@ -162,7 +174,7 @@ export default { ...@@ -162,7 +174,7 @@ export default {
} }
.g2-legend-price { .g2-legend-price {
display: inline-block; display: inline-block;
width: 72px; width: 86px;
text-align: right; text-align: right;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment