MCPcopy Create free account
hub / github.com/CoderOpen/waimai / getArcbarDataPoints

Function getArcbarDataPoints

front/components/u-charts/u-charts.js:1075–1099  ·  view source on GitHub ↗
(series, arcbarOption)

Source from the content-addressed store, hash-verified

1073}
1074
1075function getArcbarDataPoints(series, arcbarOption) {
1076 var process = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
1077 if (process == 1) {
1078 process = 0.999999;
1079 }
1080 for (let i = 0; i < series.length; i++) {
1081 let item = series[i];
1082 item.data = item.data === null ? 0 : item.data;
1083 let totalAngle;
1084 if (arcbarOption.type == 'default') {
1085 if (arcbarOption.endAngle < arcbarOption.startAngle) {
1086 totalAngle = 2 + arcbarOption.endAngle - arcbarOption.startAngle;
1087 } else{
1088 totalAngle = arcbarOption.startAngle - arcbarOption.endAngle;
1089 }
1090 } else {
1091 totalAngle = 2;
1092 }
1093 item._proportion_ = totalAngle * item.data * process + arcbarOption.startAngle;
1094 if (item._proportion_ >= 2) {
1095 item._proportion_ = item._proportion_ % 2;
1096 }
1097 }
1098 return series;
1099}
1100
1101function getGaugeAxisPoints(categories, startAngle, endAngle) {
1102 let totalAngle = startAngle - endAngle + 1;

Callers 1

drawArcbarDataPointsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected