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

Function fixColumeStackData

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

Source from the content-addressed store, hash-verified

1195}
1196
1197function fixColumeStackData(points, eachSpacing, columnLen, index, config, opts, series) {
1198
1199 return points.map(function(item, indexn) {
1200
1201 if (item === null) {
1202 return null;
1203 }
1204 item.width = Math.ceil((eachSpacing - 2 * config.columePadding) / 2);
1205
1206 if (opts.extra.column && opts.extra.column.width && +opts.extra.column.width > 0) {
1207 item.width = Math.min(item.width, +opts.extra.column.width);
1208 }
1209 return item;
1210 });
1211}
1212
1213function getXAxisPoints(categories, opts, config) {
1214 var yAxisTotalWidth = config.yAxisWidth + config.yAxisTitleWidth;

Callers 1

drawColumnDataPointsFunction · 0.85

Calls 1

mapMethod · 0.80

Tested by

no test coverage detected