From bb9783fe0a476b81e4109479f0cd72252ab43dd7 Mon Sep 17 00:00:00 2001 From: songguoqiang <765017469@qq.com> Date: Wed, 27 Dec 2023 10:05:41 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=A8=E9=87=8F=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tjanalysis/zlanalysis/components/ztfbview.vue | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/views/tjanalysis/zlanalysis/components/ztfbview.vue b/src/views/tjanalysis/zlanalysis/components/ztfbview.vue index 4a22a94..d1a75f5 100644 --- a/src/views/tjanalysis/zlanalysis/components/ztfbview.vue +++ b/src/views/tjanalysis/zlanalysis/components/ztfbview.vue @@ -132,7 +132,7 @@ const getYArr = async (maxX,xMax , xMin , mean , stdev,pingjun,max:number) => { } let beishu =Math.floor((max+25)/(Number(pingjun)));//为了更好看把曲线出现频率与范围内有多少数的柱状图强行绑定在一起,(最大柱状图数+42)/平均值时的正态分布频率 当做每个正态分布的倍数,这样能保证曲线总是在柱状图的最上面 var distance = xMax - xMin //为了更好看,设置正态曲线起止位置 - for (var j = xMin + distance / 4; j < maxX-distance / 4; j += jj) { + for (var j = xMin + distance / 4; j < maxX; j += jj) { //for (var j = xMin + distance / 4; j < xMax-distance / 4; j += 0.01) { var xy = [j, func(j, mean, stdev)*beishu] //var xy = [j, pdf(j, mean, stdev)] @@ -209,7 +209,7 @@ function setEchartData(xMin , xMax , yArr , fArr , threeSigLow , threeSigUp,thre yAxis: [ { type: "value", //数值轴 - name: "正态分布", + // name: "正态分布", position: "right", axisTick: { show: true }, axisLine: { @@ -231,7 +231,7 @@ function setEchartData(xMin , xMax , yArr , fArr , threeSigLow , threeSigUp,thre }, { type: "value", - name: "频数", + // name: "频数", position: "left", axisLabel: { //formatter: '{value} %' @@ -354,7 +354,11 @@ function setEchartData(xMin , xMax , yArr , fArr , threeSigLow , threeSigUp,thre xAxis: avgXs, label: { show: true, - formatter: "平均:"+avgXs + color:'green', + formatter: "均值:"+avgXs + }, + lineStyle:{ + color:'green' } }