MCPcopy Create free account
hub / github.com/plotly/plotly.js / transformForSVG

Function transformForSVG

src/plots/polar/helpers.js:213–225  ·  view source on GitHub ↗
(pts0, cx, cy)

Source from the content-addressed store, hash-verified

211}
212
213function transformForSVG(pts0, cx, cy) {
214 cx = cx || 0;
215 cy = cy || 0;
216
217 var len = pts0.length;
218 var pts1 = new Array(len);
219
220 for(var i = 0; i < len; i++) {
221 var pt = pts0[i];
222 pts1[i] = [cx + pt[0], cy - pt[1]];
223 }
224 return pts1;
225}
226
227/**
228 * path polygon

Callers 2

pathPolygonFunction · 0.85
pathPolygonAnnulusFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…