Compare commits

..

18 Commits

Author SHA1 Message Date
JM
419fa0c3a9 update dist and lib 2020-04-15 14:03:45 +08:00
JM
d2bb06a36c update version to 2.7.4 2020-04-15 14:03:37 +08:00
JM
94824f32d8 update change log 2020-04-15 14:03:27 +08:00
wzx
b99410ef94 Bug Fixes:#59 修复胶囊图数值错误 2020-04-07 17:54:33 +08:00
JM
4b69668327 update dist and lib 2020-01-16 10:23:42 +08:00
JM
d15bcf34cb update version to 2.7.3 2020-01-16 10:23:15 +08:00
JM
43a04efb62 update changelog 2020-01-16 10:23:06 +08:00
JM
81b8bef8e1 Bug Fixes: parseInt precision lost 2020-01-16 10:21:58 +08:00
JM
6467bd516f remove useless character 2020-01-12 17:38:53 +08:00
JM
62c5998938 update version to 2.7.2 2020-01-10 14:30:09 +08:00
JM
247221729f update dist and lib 2020-01-10 14:29:37 +08:00
JM
c48aa8ee84 update change log 2020-01-10 14:29:28 +08:00
JM
b18962855c add digitalFlopToFixed configuration 2020-01-10 14:28:22 +08:00
JM
ae3345bd95 update change log 2020-01-08 19:05:14 +08:00
JM
dceb761e8c update dist and lib 2020-01-08 19:04:36 +08:00
JM
bd178192f1 update version to 2.7.1 2020-01-08 19:03:46 +08:00
JM
8c47ae03db update change log 2020-01-08 19:03:39 +08:00
JM
cc14ac7670 Bug Fixes: exception when relative is false 2020-01-08 19:02:32 +08:00
12 changed files with 65 additions and 26 deletions

View File

@ -1,3 +1,27 @@
# 2.7.4-alpha (2020-04-15)
### Bug Fixes
- **capsuleChart:** Calculate exception when min value is less 5 [(#59)](https://github.com/DataV-Team/DataV/pull/59).
# 2.7.3-alpha (2020-01-16)
### Bug Fixes
- **activeRingChart:** `parseInt` precision lost.
# 2.7.2-alpha (2020-01-10)
### Perfect
- **ativeRingChart:** Add digitalFlopToFixed configuration.
# 2.7.1-alpha (2020-01-08)
### Bug Fixes
- **flylineChartEnhanced:** Exception when relative is false.
# 2.7.0-alpha (2020-01-05)
### New

27
dist/datav.map.vue.js vendored
View File

@ -4,7 +4,7 @@
(global = global || self, factory(global.Vue));
}(this, (function (Vue) { 'use strict';
Vue = Vue && Vue.hasOwnProperty('default') ? Vue['default'] : Vue;
Vue = Vue && Object.prototype.hasOwnProperty.call(Vue, 'default') ? Vue['default'] : Vue;
function randomExtend(minNum, maxNum) {
if (arguments.length === 1) {
@ -3735,7 +3735,7 @@
const timestamp = Date.now();
return {
ref: 'border-box-11',
filterId: `borderr-box-11-filterId-${timestamp}`,
filterId: `border-box-11-filterId-${timestamp}`,
defaultColor: ['#8aaafb', '#1f33a2'],
mergedColor: []
};
@ -4225,7 +4225,7 @@
/* style */
const __vue_inject_styles__$c = function (inject) {
if (!inject) return
inject("data-v-35a67b46_0", { source: ".dv-border-box-11 {\n position: relative;\n width: 100%;\n height: 100%;\n}\n.dv-border-box-11 .dv-border-svg-container {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0px;\n left: 0px;\n}\n.dv-border-box-11 .dv-border-svg-container polyline {\n fill: none;\n stroke-width: 1;\n}\n.dv-border-box-11 .border-box-content {\n position: relative;\n width: 100%;\n height: 100%;\n}\n", map: {"version":3,"sources":["main.vue"],"names":[],"mappings":"AAAA;EACE,kBAAkB;EAClB,WAAW;EACX,YAAY;AACd;AACA;EACE,kBAAkB;EAClB,WAAW;EACX,YAAY;EACZ,QAAQ;EACR,SAAS;AACX;AACA;EACE,UAAU;EACV,eAAe;AACjB;AACA;EACE,kBAAkB;EAClB,WAAW;EACX,YAAY;AACd","file":"main.vue","sourcesContent":[".dv-border-box-11 {\n position: relative;\n width: 100%;\n height: 100%;\n}\n.dv-border-box-11 .dv-border-svg-container {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0px;\n left: 0px;\n}\n.dv-border-box-11 .dv-border-svg-container polyline {\n fill: none;\n stroke-width: 1;\n}\n.dv-border-box-11 .border-box-content {\n position: relative;\n width: 100%;\n height: 100%;\n}\n"]}, media: undefined });
inject("data-v-75210825_0", { source: ".dv-border-box-11 {\n position: relative;\n width: 100%;\n height: 100%;\n}\n.dv-border-box-11 .dv-border-svg-container {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0px;\n left: 0px;\n}\n.dv-border-box-11 .dv-border-svg-container polyline {\n fill: none;\n stroke-width: 1;\n}\n.dv-border-box-11 .border-box-content {\n position: relative;\n width: 100%;\n height: 100%;\n}\n", map: {"version":3,"sources":["main.vue"],"names":[],"mappings":"AAAA;EACE,kBAAkB;EAClB,WAAW;EACX,YAAY;AACd;AACA;EACE,kBAAkB;EAClB,WAAW;EACX,YAAY;EACZ,QAAQ;EACR,SAAS;AACX;AACA;EACE,UAAU;EACV,eAAe;AACjB;AACA;EACE,kBAAkB;EAClB,WAAW;EACX,YAAY;AACd","file":"main.vue","sourcesContent":[".dv-border-box-11 {\n position: relative;\n width: 100%;\n height: 100%;\n}\n.dv-border-box-11 .dv-border-svg-container {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0px;\n left: 0px;\n}\n.dv-border-box-11 .dv-border-svg-container polyline {\n fill: none;\n stroke-width: 1;\n}\n.dv-border-box-11 .border-box-content {\n position: relative;\n width: 100%;\n height: 100%;\n}\n"]}, media: undefined });
};
/* scoped */
@ -19182,6 +19182,12 @@
fill: '#fff'
},
/**
* @description Digital flop toFixed
* @type {Number}
*/
digitalFlopToFixed: 0,
/**
* @description CRender animationCurve
* @type {String}
@ -19212,17 +19218,19 @@
if (!mergedConfig) return {};
const {
digitalFlopStyle,
digitalFlopToFixed,
data
} = mergedConfig;
const value = data.map(({
value
}) => value);
const sum = value.reduce((all, v) => all + v, 0);
const percent = parseInt(value[activeIndex] / sum * 100) || 0;
const percent = parseFloat(value[activeIndex] / sum * 100) || 0;
return {
content: '{nt}%',
number: [percent],
style: digitalFlopStyle
style: digitalFlopStyle,
toFixed: digitalFlopToFixed
};
},
@ -19420,7 +19428,7 @@
/* style */
const __vue_inject_styles__$s = function (inject) {
if (!inject) return
inject("data-v-784c5a14_0", { source: ".dv-active-ring-chart {\n position: relative;\n}\n.dv-active-ring-chart .active-ring-chart-container {\n width: 100%;\n height: 100%;\n}\n.dv-active-ring-chart .active-ring-info {\n position: absolute;\n width: 100%;\n height: 100%;\n left: 0px;\n top: 0px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n}\n.dv-active-ring-chart .active-ring-info .dv-digital-flop {\n width: 100px;\n height: 30px;\n}\n.dv-active-ring-chart .active-ring-info .active-ring-name {\n width: 100px;\n height: 30px;\n color: #fff;\n text-align: center;\n vertical-align: middle;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n}\n", map: {"version":3,"sources":["main.vue"],"names":[],"mappings":"AAAA;EACE,kBAAkB;AACpB;AACA;EACE,WAAW;EACX,YAAY;AACd;AACA;EACE,kBAAkB;EAClB,WAAW;EACX,YAAY;EACZ,SAAS;EACT,QAAQ;EACR,aAAa;EACb,sBAAsB;EACtB,uBAAuB;EACvB,mBAAmB;AACrB;AACA;EACE,YAAY;EACZ,YAAY;AACd;AACA;EACE,YAAY;EACZ,YAAY;EACZ,WAAW;EACX,kBAAkB;EAClB,sBAAsB;EACtB,uBAAuB;EACvB,gBAAgB;EAChB,mBAAmB;AACrB","file":"main.vue","sourcesContent":[".dv-active-ring-chart {\n position: relative;\n}\n.dv-active-ring-chart .active-ring-chart-container {\n width: 100%;\n height: 100%;\n}\n.dv-active-ring-chart .active-ring-info {\n position: absolute;\n width: 100%;\n height: 100%;\n left: 0px;\n top: 0px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n}\n.dv-active-ring-chart .active-ring-info .dv-digital-flop {\n width: 100px;\n height: 30px;\n}\n.dv-active-ring-chart .active-ring-info .active-ring-name {\n width: 100px;\n height: 30px;\n color: #fff;\n text-align: center;\n vertical-align: middle;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n}\n"]}, media: undefined });
inject("data-v-b2e793e2_0", { source: ".dv-active-ring-chart {\n position: relative;\n}\n.dv-active-ring-chart .active-ring-chart-container {\n width: 100%;\n height: 100%;\n}\n.dv-active-ring-chart .active-ring-info {\n position: absolute;\n width: 100%;\n height: 100%;\n left: 0px;\n top: 0px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n}\n.dv-active-ring-chart .active-ring-info .dv-digital-flop {\n width: 100px;\n height: 30px;\n}\n.dv-active-ring-chart .active-ring-info .active-ring-name {\n width: 100px;\n height: 30px;\n color: #fff;\n text-align: center;\n vertical-align: middle;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n}\n", map: {"version":3,"sources":["main.vue"],"names":[],"mappings":"AAAA;EACE,kBAAkB;AACpB;AACA;EACE,WAAW;EACX,YAAY;AACd;AACA;EACE,kBAAkB;EAClB,WAAW;EACX,YAAY;EACZ,SAAS;EACT,QAAQ;EACR,aAAa;EACb,sBAAsB;EACtB,uBAAuB;EACvB,mBAAmB;AACrB;AACA;EACE,YAAY;EACZ,YAAY;AACd;AACA;EACE,YAAY;EACZ,YAAY;EACZ,WAAW;EACX,kBAAkB;EAClB,sBAAsB;EACtB,uBAAuB;EACvB,gBAAgB;EAChB,mBAAmB;AACrB","file":"main.vue","sourcesContent":[".dv-active-ring-chart {\n position: relative;\n}\n.dv-active-ring-chart .active-ring-chart-container {\n width: 100%;\n height: 100%;\n}\n.dv-active-ring-chart .active-ring-info {\n position: absolute;\n width: 100%;\n height: 100%;\n left: 0px;\n top: 0px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n}\n.dv-active-ring-chart .active-ring-info .dv-digital-flop {\n width: 100px;\n height: 30px;\n}\n.dv-active-ring-chart .active-ring-info .active-ring-name {\n width: 100px;\n height: 30px;\n color: #fff;\n text-align: center;\n vertical-align: middle;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n}\n"]}, media: undefined });
};
/* scoped */
@ -19528,7 +19536,7 @@
const maxValue = Math.max(...capsuleValue);
this.capsuleLength = capsuleValue.map(v => maxValue ? v / maxValue : 0);
const oneFifth = maxValue / 5;
this.labelData = new Array(6).fill(0).map((v, i) => Math.ceil(i * oneFifth));
this.labelData = new Set(new Array(6).fill(0).map((v, i) => Math.ceil(i * oneFifth)));
}
},
@ -19625,7 +19633,7 @@
/* style */
const __vue_inject_styles__$t = function (inject) {
if (!inject) return
inject("data-v-99dd88f2_0", { source: ".dv-capsule-chart {\n position: relative;\n display: flex;\n flex-direction: row;\n box-sizing: border-box;\n padding: 10px;\n color: #fff;\n}\n.dv-capsule-chart .label-column {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n box-sizing: border-box;\n padding-right: 10px;\n text-align: right;\n font-size: 12px;\n}\n.dv-capsule-chart .label-column div {\n height: 20px;\n line-height: 20px;\n}\n.dv-capsule-chart .capsule-container {\n flex: 1;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n}\n.dv-capsule-chart .capsule-item {\n box-shadow: 0 0 3px #999;\n height: 10px;\n margin: 5px 0px;\n border-radius: 5px;\n}\n.dv-capsule-chart .capsule-item div {\n height: 8px;\n margin-top: 1px;\n border-radius: 5px;\n transition: all 0.3s;\n}\n.dv-capsule-chart .unit-label {\n height: 20px;\n font-size: 12px;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n}\n.dv-capsule-chart .unit-text {\n text-align: right;\n display: flex;\n align-items: flex-end;\n font-size: 12px;\n line-height: 20px;\n margin-left: 10px;\n}\n", map: {"version":3,"sources":["main.vue"],"names":[],"mappings":"AAAA;EACE,kBAAkB;EAClB,aAAa;EACb,mBAAmB;EACnB,sBAAsB;EACtB,aAAa;EACb,WAAW;AACb;AACA;EACE,aAAa;EACb,sBAAsB;EACtB,8BAA8B;EAC9B,sBAAsB;EACtB,mBAAmB;EACnB,iBAAiB;EACjB,eAAe;AACjB;AACA;EACE,YAAY;EACZ,iBAAiB;AACnB;AACA;EACE,OAAO;EACP,aAAa;EACb,sBAAsB;EACtB,8BAA8B;AAChC;AACA;EACE,wBAAwB;EACxB,YAAY;EACZ,eAAe;EACf,kBAAkB;AACpB;AACA;EACE,WAAW;EACX,eAAe;EACf,kBAAkB;EAClB,oBAAoB;AACtB;AACA;EACE,YAAY;EACZ,eAAe;EACf,aAAa;EACb,mBAAmB;EACnB,mBAAmB;EACnB,8BAA8B;AAChC;AACA;EACE,iBAAiB;EACjB,aAAa;EACb,qBAAqB;EACrB,eAAe;EACf,iBAAiB;EACjB,iBAAiB;AACnB","file":"main.vue","sourcesContent":[".dv-capsule-chart {\n position: relative;\n display: flex;\n flex-direction: row;\n box-sizing: border-box;\n padding: 10px;\n color: #fff;\n}\n.dv-capsule-chart .label-column {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n box-sizing: border-box;\n padding-right: 10px;\n text-align: right;\n font-size: 12px;\n}\n.dv-capsule-chart .label-column div {\n height: 20px;\n line-height: 20px;\n}\n.dv-capsule-chart .capsule-container {\n flex: 1;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n}\n.dv-capsule-chart .capsule-item {\n box-shadow: 0 0 3px #999;\n height: 10px;\n margin: 5px 0px;\n border-radius: 5px;\n}\n.dv-capsule-chart .capsule-item div {\n height: 8px;\n margin-top: 1px;\n border-radius: 5px;\n transition: all 0.3s;\n}\n.dv-capsule-chart .unit-label {\n height: 20px;\n font-size: 12px;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n}\n.dv-capsule-chart .unit-text {\n text-align: right;\n display: flex;\n align-items: flex-end;\n font-size: 12px;\n line-height: 20px;\n margin-left: 10px;\n}\n"]}, media: undefined });
inject("data-v-f5166d04_0", { source: ".dv-capsule-chart {\n position: relative;\n display: flex;\n flex-direction: row;\n box-sizing: border-box;\n padding: 10px;\n color: #fff;\n}\n.dv-capsule-chart .label-column {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n box-sizing: border-box;\n padding-right: 10px;\n text-align: right;\n font-size: 12px;\n}\n.dv-capsule-chart .label-column div {\n height: 20px;\n line-height: 20px;\n}\n.dv-capsule-chart .capsule-container {\n flex: 1;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n}\n.dv-capsule-chart .capsule-item {\n box-shadow: 0 0 3px #999;\n height: 10px;\n margin: 5px 0px;\n border-radius: 5px;\n}\n.dv-capsule-chart .capsule-item div {\n height: 8px;\n margin-top: 1px;\n border-radius: 5px;\n transition: all 0.3s;\n}\n.dv-capsule-chart .unit-label {\n height: 20px;\n font-size: 12px;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n}\n.dv-capsule-chart .unit-text {\n text-align: right;\n display: flex;\n align-items: flex-end;\n font-size: 12px;\n line-height: 20px;\n margin-left: 10px;\n}\n", map: {"version":3,"sources":["main.vue"],"names":[],"mappings":"AAAA;EACE,kBAAkB;EAClB,aAAa;EACb,mBAAmB;EACnB,sBAAsB;EACtB,aAAa;EACb,WAAW;AACb;AACA;EACE,aAAa;EACb,sBAAsB;EACtB,8BAA8B;EAC9B,sBAAsB;EACtB,mBAAmB;EACnB,iBAAiB;EACjB,eAAe;AACjB;AACA;EACE,YAAY;EACZ,iBAAiB;AACnB;AACA;EACE,OAAO;EACP,aAAa;EACb,sBAAsB;EACtB,8BAA8B;AAChC;AACA;EACE,wBAAwB;EACxB,YAAY;EACZ,eAAe;EACf,kBAAkB;AACpB;AACA;EACE,WAAW;EACX,eAAe;EACf,kBAAkB;EAClB,oBAAoB;AACtB;AACA;EACE,YAAY;EACZ,eAAe;EACf,aAAa;EACb,mBAAmB;EACnB,mBAAmB;EACnB,8BAA8B;AAChC;AACA;EACE,iBAAiB;EACjB,aAAa;EACb,qBAAqB;EACrB,eAAe;EACf,iBAAiB;EACjB,iBAAiB;AACnB","file":"main.vue","sourcesContent":[".dv-capsule-chart {\n position: relative;\n display: flex;\n flex-direction: row;\n box-sizing: border-box;\n padding: 10px;\n color: #fff;\n}\n.dv-capsule-chart .label-column {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n box-sizing: border-box;\n padding-right: 10px;\n text-align: right;\n font-size: 12px;\n}\n.dv-capsule-chart .label-column div {\n height: 20px;\n line-height: 20px;\n}\n.dv-capsule-chart .capsule-container {\n flex: 1;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n}\n.dv-capsule-chart .capsule-item {\n box-shadow: 0 0 3px #999;\n height: 10px;\n margin: 5px 0px;\n border-radius: 5px;\n}\n.dv-capsule-chart .capsule-item div {\n height: 8px;\n margin-top: 1px;\n border-radius: 5px;\n transition: all 0.3s;\n}\n.dv-capsule-chart .unit-label {\n height: 20px;\n font-size: 12px;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n}\n.dv-capsule-chart .unit-text {\n text-align: right;\n display: flex;\n align-items: flex-end;\n font-size: 12px;\n line-height: 20px;\n margin-left: 10px;\n}\n"]}, media: undefined });
};
/* scoped */
@ -21518,7 +21526,6 @@
relative,
points
} = mergedConfig;
if (!relative) return;
this.flylinePoints = points.map((item, i) => {
const {
coordinate: [x, y],
@ -21913,7 +21920,7 @@
/* style */
const __vue_inject_styles__$x = function (inject) {
if (!inject) return
inject("data-v-185fc66c_0", { source: ".dv-flyline-chart-enhanced {\n display: flex;\n flex-direction: column;\n background-size: 100% 100%;\n}\n.dv-flyline-chart-enhanced text {\n text-anchor: middle;\n dominant-baseline: middle;\n}\n", map: {"version":3,"sources":["main.vue"],"names":[],"mappings":"AAAA;EACE,aAAa;EACb,sBAAsB;EACtB,0BAA0B;AAC5B;AACA;EACE,mBAAmB;EACnB,yBAAyB;AAC3B","file":"main.vue","sourcesContent":[".dv-flyline-chart-enhanced {\n display: flex;\n flex-direction: column;\n background-size: 100% 100%;\n}\n.dv-flyline-chart-enhanced text {\n text-anchor: middle;\n dominant-baseline: middle;\n}\n"]}, media: undefined });
inject("data-v-5cc44b0b_0", { source: ".dv-flyline-chart-enhanced {\n display: flex;\n flex-direction: column;\n background-size: 100% 100%;\n}\n.dv-flyline-chart-enhanced text {\n text-anchor: middle;\n dominant-baseline: middle;\n}\n", map: {"version":3,"sources":["main.vue"],"names":[],"mappings":"AAAA;EACE,aAAa;EACb,sBAAsB;EACtB,0BAA0B;AAC5B;AACA;EACE,mBAAmB;EACnB,yBAAyB;AAC3B","file":"main.vue","sourcesContent":[".dv-flyline-chart-enhanced {\n display: flex;\n flex-direction: column;\n background-size: 100% 100%;\n}\n.dv-flyline-chart-enhanced text {\n text-anchor: middle;\n dominant-baseline: middle;\n}\n"]}, media: undefined });
};
/* scoped */

File diff suppressed because one or more lines are too long

View File

@ -78,6 +78,11 @@ export default {
fontSize: 25,
fill: '#fff'
},
/**
* @description Digital flop toFixed
* @type {Number}
*/
digitalFlopToFixed: 0,
/**
* @description CRender animationCurve
* @type {String}
@ -107,18 +112,19 @@ export default {
if (!mergedConfig) return {}
const { digitalFlopStyle, data } = mergedConfig
const { digitalFlopStyle, digitalFlopToFixed, data } = mergedConfig
const value = data.map(({ value }) => value)
const sum = value.reduce((all, v) => all + v, 0)
const percent = parseInt(value[activeIndex] / sum * 100) || 0
const percent = parseFloat(value[activeIndex] / sum * 100) || 0
return {
content: '{nt}%',
number: [percent],
style: digitalFlopStyle
style: digitalFlopStyle,
toFixed: digitalFlopToFixed
}
},
ringName () {

View File

@ -237,7 +237,7 @@ export default {
const timestamp = Date.now()
return {
ref: 'border-box-11',
filterId: `borderr-box-11-filterId-${timestamp}`,
filterId: `border-box-11-filterId-${timestamp}`,
defaultColor: ['#8aaafb', '#1f33a2'],

View File

@ -102,7 +102,7 @@ export default {
const oneFifth = maxValue / 5
this.labelData = new Array(6).fill(0).map((v, i) => Math.ceil(i * oneFifth))
this.labelData = new Set(new Array(6).fill(0).map((v, i) => Math.ceil(i * oneFifth)))
}
},
mounted () {

View File

@ -472,8 +472,6 @@ export default {
const { relative, points } = mergedConfig
if (!relative) return
this.flylinePoints = points.map((item, i) => {
const { coordinate: [x, y], halo, icon, text } = item

View File

@ -1,6 +1,6 @@
{
"name": "@jiaminghi/data-view",
"version": "2.7.0",
"version": "2.7.4",
"author": "JiaMing <743192023@qq.com>",
"description": "Vue Large screen data display component library",
"main": "lib/index.js",

View File

@ -78,6 +78,11 @@ export default {
fontSize: 25,
fill: '#fff'
},
/**
* @description Digital flop toFixed
* @type {Number}
*/
digitalFlopToFixed: 0,
/**
* @description CRender animationCurve
* @type {String}
@ -107,18 +112,19 @@ export default {
if (!mergedConfig) return {}
const { digitalFlopStyle, data } = mergedConfig
const { digitalFlopStyle, digitalFlopToFixed, data } = mergedConfig
const value = data.map(({ value }) => value)
const sum = value.reduce((all, v) => all + v, 0)
const percent = parseInt(value[activeIndex] / sum * 100) || 0
const percent = parseFloat(value[activeIndex] / sum * 100) || 0
return {
content: '{nt}%',
number: [percent],
style: digitalFlopStyle
style: digitalFlopStyle,
toFixed: digitalFlopToFixed
}
},
ringName () {

View File

@ -237,7 +237,7 @@ export default {
const timestamp = Date.now()
return {
ref: 'border-box-11',
filterId: `borderr-box-11-filterId-${timestamp}`,
filterId: `border-box-11-filterId-${timestamp}`,
defaultColor: ['#8aaafb', '#1f33a2'],

View File

@ -102,7 +102,7 @@ export default {
const oneFifth = maxValue / 5
this.labelData = new Array(6).fill(0).map((v, i) => Math.ceil(i * oneFifth))
this.labelData = new Set(new Array(6).fill(0).map((v, i) => Math.ceil(i * oneFifth)))
}
},
mounted () {

View File

@ -472,8 +472,6 @@ export default {
const { relative, points } = mergedConfig
if (!relative) return
this.flylinePoints = points.map((item, i) => {
const { coordinate: [x, y], halo, icon, text } = item