Skip to content

React finance precursor #2525

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Apr 5, 2018
8 changes: 2 additions & 6 deletions src/traces/carpet/calc.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,6 @@ module.exports = function calc(gd, trace) {
// create conversion functions that depend on the data
trace.setScale();

// Convert cartesian-space x/y coordinates to screen space pixel coordinates:
t.xp = trace._xp = map2dArray(trace._xp, x, xa.c2p);
t.yp = trace._yp = map2dArray(trace._yp, y, ya.c2p);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉


// This is a rather expensive scan. Nothing guarantees monotonicity,
// so we need to scan through all data to get proper ranges:
var xrange = arrayMinmax(x);
Expand All @@ -92,8 +88,8 @@ module.exports = function calc(gd, trace) {

// Enumerate the gridlines, both major and minor, and store them on the trace
// object:
calcGridlines(trace, t, 'a', 'b');
calcGridlines(trace, t, 'b', 'a');
calcGridlines(trace, 'a', 'b');
calcGridlines(trace, 'b', 'a');

// Calculate the text labels for each major gridline and store them on the
// trace object:
Expand Down
2 changes: 1 addition & 1 deletion src/traces/carpet/calc_gridlines.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
var Axes = require('../../plots/cartesian/axes');
var extendFlat = require('../../lib/extend').extendFlat;

module.exports = function calcGridlines(trace, cd, axisLetter, crossAxisLetter) {
module.exports = function calcGridlines(trace, axisLetter, crossAxisLetter) {
var i, j, j0;
var eps, bounds, n1, n2, n, value, v;
var j1, v0, v1, d;
Expand Down