Compare commits

..

No commits in common. "b0078cb099be275f97a4c7a48a9cb9235af15a14" and "6b452dce36bf20733ed77a009334b79b64d1d4ea" have entirely different histories.

3 changed files with 21 additions and 40 deletions

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-01-29 13:45:56
* @LastEditTime: 2024-04-15 09:28:21
* @LastEditTime: 2024-04-11 11:02:53
* @LastEditors: zhp
* @Description:
-->
@ -13,7 +13,6 @@
</template>
<script>
import { position } from '@antv/x6-common/lib/dom/position';
import * as echarts from 'echarts';
// import resize from './../mixins/resize'
// import NotMsg from './../components/NotMsg'
@ -50,45 +49,29 @@ export default {
mounted() {
this.chartData = [
{
name: '0904褶皱/严重',
name: '细长泡',
num: 1112,
yield: 0.97,
},
{
name: '0904褶皱/严重',
name: '长泡',
num: 1112,
yield: 0.97,
},
{
name: '0904褶皱/严重',
name: '开口泡',
num: 1112,
yield: 0.97,
},
{
name: '0904褶皱/严重',
name: '结石',
num: 1112,
yield: 0.97,
}
]
this.updateChart()
},
methods: {
getEqualNewlineString(params, length) {
let text = ''
let count = Math.ceil(params.length / length) //
// length
if (count > 1) {
for (let z = 1; z <= count; z++) {
text += params.substr((z - 1) * length, length)
if (z < count) {
text += '\n'
}
}
} else {
text += params.substr(0, length)
}
return text
},
methods: {
updateChart() {
console.log('update')
let num = 0
@ -144,38 +127,27 @@ export default {
},
series:[{
name: 'ISRA缺陷检测',
type: 'pie',
// position:outerHeight,
type: 'pie',
center: ['50%', '40%'],
radius: ['45%', '70%'],
avoidLabelOverlap: true,
label: {
show: true,
label: {
show: true,
normal: {
alignTo: 'labelLine',
margin: 10,
edgeDistance: 10,
lineHeight: 16,
//
// params: data,
formatter: function (params) {
console.log(params);
return ;
},
formatter: (params) => {
//
return this.getEqualNewlineString(params.value + " | " + params.percent.toFixed(0) + "%" + "\n" + params.name,10);
return params.value + " | " + params.percent.toFixed(0) + "%" + "\n\n" + params.name;
},
textStyle: { //
// color: '#595959',
fontSize: 16
fontSize: 24.48
}
}
},
labelLine: {
show: true,
length: 25,
length2: 10,
show: true,
},
data: this.chartData && this.chartData.length > 0 && this.chartData.map((item, index) => ({
name:item.name,

View File

@ -58,12 +58,20 @@ export default {
type: 'bar',
data: [],
barWidth: 20,
label: {
show: true,
position: 'top',
},
},
{
name: '上期',
type: 'bar',
data: [],
barWidth: 20,
// label: {
// show: true,
// position: 'top'
// }
},
];
for (let j = 0; j < arr.length; j++) {

View File

@ -103,6 +103,7 @@ export default {
: undefined,
].filter((v) => v),
tableData: [],
tableProps: [
// {
// prop: 'createTime',