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

Function fixColumeMeterData

front/components/u-charts/u-charts.js:1179–1195  ·  view source on GitHub ↗
(points, eachSpacing, columnLen, index, config, opts, border)

Source from the content-addressed store, hash-verified

1177}
1178
1179function fixColumeMeterData(points, eachSpacing, columnLen, index, config, opts, border) {
1180 return points.map(function(item) {
1181 if (item === null) {
1182 return null;
1183 }
1184 item.width = Math.ceil((eachSpacing - 2 * config.columePadding) / 2);
1185
1186 if (opts.extra.column && opts.extra.column.width && +opts.extra.column.width > 0) {
1187 item.width = Math.min(item.width, +opts.extra.column.width);
1188 }
1189
1190 if (index > 0) {
1191 item.width -= 2 * border;
1192 }
1193 return item;
1194 });
1195}
1196
1197function fixColumeStackData(points, eachSpacing, columnLen, index, config, opts, series) {
1198

Callers 1

drawColumnDataPointsFunction · 0.85

Calls 1

mapMethod · 0.80

Tested by

no test coverage detected