Skip to content

Trace type <-> trace module 1-to-1 correspondance #124

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 28 commits into from
Dec 17, 2015
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
1e923c9
break up heatmap index:
etpinard Dec 15, 2015
6b8885a
split parts of the scatter index:
etpinard Dec 16, 2015
c0f85e6
split up bars index
etpinard Dec 16, 2015
503fd93
mv traceColorbar from colorbar/ to heatmap/
etpinard Dec 16, 2015
7f1801e
split up contour index
etpinard Dec 16, 2015
2ba8f80
split up histogram index
etpinard Dec 16, 2015
27b0910
mv histogram calc2d to histogram2d/
etpinard Dec 16, 2015
50f290c
register histogram module, require parts for Bars in it.
etpinard Dec 16, 2015
ab7ff1d
register histogram2d module, require parts of heatmap in it.
etpinard Dec 16, 2015
1a90968
register histogram2dcontour, require pars of contour in it.
etpinard Dec 16, 2015
2f3bd84
require histogram2d/calc in heatmap/calc,
etpinard Dec 16, 2015
bb542ab
require histogram/defaults in heatmap/defaults
etpinard Dec 16, 2015
0d6fecc
require xy defaults + errorbar defaults in scattergl defaults
etpinard Dec 16, 2015
67ae5aa
adapt jasmine tests
etpinard Dec 16, 2015
1d18222
require in new trace modules,
etpinard Dec 16, 2015
c42a6d1
rm trailing lines
etpinard Dec 16, 2015
1f0b92d
rename bars / Bars --> bar / Bar consistently with trace type
etpinard Dec 16, 2015
db469d8
rename boxes / Boxes --> box / Box consistently with trace type
etpinard Dec 16, 2015
b043ec3
update layout module definition with Bar and Box
etpinard Dec 16, 2015
de92572
make bar and histogram have distinct attribute object,
etpinard Dec 17, 2015
9c90e0a
make contour and heatmap have distinct attribute objects
etpinard Dec 17, 2015
f4f1a93
make histogram2d and histogram2dcontour have distinct attribute objs
etpinard Dec 17, 2015
7bc3e75
make bar and histogram have distinct defaults step:
etpinard Dec 17, 2015
03b1557
make contour and heatmap have distinct defaults step:
etpinard Dec 17, 2015
eb327f0
make histogram2d and histogram2dcontour have distinct defaults step:
etpinard Dec 17, 2015
dccf3ed
update histogram* index files,
etpinard Dec 17, 2015
c1055b6
lint (name module.exports functions to help out during debugging)
etpinard Dec 17, 2015
2247b7c
remove warnings on PlotSchema.get() :
etpinard Dec 17, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
require histogram2d/calc in heatmap/calc,
- histogram2d and heatmap share the same calc function for now
  • Loading branch information
etpinard committed Dec 16, 2015
commit 2f3bd84d9152c74fc8bc3a79bc8495ef4a6a17a9
3 changes: 2 additions & 1 deletion src/traces/heatmap/calc.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ var isNumeric = require('fast-isnumeric');
var Plotly = require('../../plotly');
var Lib = require('../../lib');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Lib is free of circular imports. 🎉 So, let's try import it directly from now on.

Copy link
Contributor

Choose a reason for hiding this comment

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

💯


var histogram2dCalc = require('../histogram2d/calc');
var hasColumns = require('./has_columns');
var convertColumnXYZ = require('./convert_column_xyz');
var maxRowLength = require('./max_row_length');
Expand Down Expand Up @@ -45,7 +46,7 @@ module.exports = function calc(gd, trace) {
Lib.markTime('done convert x&y');

if(isHist) {
var binned = Plotly.Histogram.calc2d(gd, trace);
var binned = histogram2dCalc(gd, trace);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

To keep this PR readable, histogram2d and heatmap still share the same calc step.

x = binned.x;
x0 = binned.x0;
dx = binned.dx;
Expand Down