MCPcopy Index your code
hub / github.com/plotly/plotly.js / getArea

Function getArea

test/jasmine/tests/bar_test.js:2171–2184  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

2169 });
2170
2171 function getArea(path) {
2172 var pos = path
2173 .slice(1, path.length - 1)
2174 .replace('V', ',')
2175 .replace('H', ',')
2176 .replace('V', ',')
2177 .split(',');
2178 var dx = +pos[0];
2179 var dy = +pos[1];
2180 dy -= +pos[2];
2181 dx -= +pos[3];
2182
2183 return Math.abs(dx * dy);
2184 }
2185
2186 it('should not show up null and zero bars as thin bars', function(done) {
2187 var mock = Lib.extendDeep({}, require('../../image/mocks/bar_hide_nulls.json'));

Callers 1

bar_test.jsFile · 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…