intelica-library-ui 0.1.113 → 0.1.114
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3873,16 +3873,15 @@ class EchartService {
|
|
|
3873
3873
|
* @param value - rate value
|
|
3874
3874
|
* @param textSize - size of the letter
|
|
3875
3875
|
* @param color - color of the letter and pie
|
|
3876
|
+
* @param total - total value for the pie (default is 100)
|
|
3876
3877
|
* @returns
|
|
3877
3878
|
*/
|
|
3878
|
-
getRateDoughnutPieOptions(letter, value, textSize, color) {
|
|
3879
|
-
const power = Math.ceil(Math.log10(value));
|
|
3880
|
-
const placeholderValue = Math.pow(10, power);
|
|
3879
|
+
getRateDoughnutPieOptions(letter, value, textSize, color, total = 100) {
|
|
3881
3880
|
const data = [
|
|
3882
3881
|
{ name: letter, value: value, itemStyle: { color: color } },
|
|
3883
3882
|
{
|
|
3884
3883
|
name: "placeholder",
|
|
3885
|
-
value:
|
|
3884
|
+
value: total - value,
|
|
3886
3885
|
itemStyle: { color: Color.gray5 },
|
|
3887
3886
|
},
|
|
3888
3887
|
];
|