Commit 28a7fcea authored by leon's avatar leon

feat: progress add fontsize config

parent e7fc3709
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
canvas.setChart(chart) canvas.setChart(chart)
let { endVal } = this.elementData.dataList let { endVal } = this.elementData.dataList
endVal = endVal || 0 endVal = endVal || 0
const { width: pCanvasWidth, strokeColor, trailColor, titleColor, strokeWidth, gapPosition, gapDegree, strokeLinecap} = this.elementInfo.option.progress const { width: pCanvasWidth, strokeColor, trailColor, titleColor,fontSize, strokeWidth, gapPosition, gapDegree, strokeLinecap} = this.elementInfo.option.progress
const color = [ const color = [
[endVal / 100, strokeColor], [endVal / 100, strokeColor],
[1, trailColor] [1, trailColor]
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
x: 'center', x: 'center',
top: 'middle', top: 'middle',
textStyle: { textStyle: {
fontSize: Math.max(14 * pCanvasWidth / 132, 14), fontSize: fontSize,
color: titleColor, color: titleColor,
}, },
}], }],
......
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