Skip to content

Trace Module Functionality #180

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 30 commits into from
Jan 14, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
7e41625
Removed reference to Plotly
mdtusz Jan 8, 2016
b716568
Removed more references to Plotly
mdtusz Jan 11, 2016
d639a93
Change `module` to `_module`
mdtusz Jan 11, 2016
356d0af
Change `Plotly.Lib` to `Lib`
mdtusz Jan 11, 2016
7a22cff
Modify trace modules to all follow the same format, exporing `plot`
mdtusz Jan 12, 2016
2ac3605
Modify trace modules to work with registry
mdtusz Jan 13, 2016
6e53762
Update tests to require trace modules directly
mdtusz Jan 13, 2016
46b83d8
Modify index and plotly to have register func and traces registered
mdtusz Jan 13, 2016
23519f0
Require pie trace module directly
mdtusz Jan 13, 2016
71db785
Plot register function warns instead of throwing error
mdtusz Jan 13, 2016
06640b4
Update plotting calls to work agnostically using registered modules
mdtusz Jan 13, 2016
4507ec5
Fix eslint warnings for multiple var declarations
mdtusz Jan 13, 2016
6bd4c5b
Removed reference to Plotly
mdtusz Jan 8, 2016
b4793c1
Removed more references to Plotly
mdtusz Jan 11, 2016
48b3803
Change `module` to `_module`
mdtusz Jan 11, 2016
5a2da5c
Change `Plotly.Lib` to `Lib`
mdtusz Jan 11, 2016
4fe8440
Modify trace modules to all follow the same format, exporing `plot`
mdtusz Jan 12, 2016
e46373e
Modify trace modules to work with registry
mdtusz Jan 13, 2016
a7fda91
Update tests to require trace modules directly
mdtusz Jan 13, 2016
43156a3
Modify index and plotly to have register func and traces registered
mdtusz Jan 13, 2016
03232e0
Require pie trace module directly
mdtusz Jan 13, 2016
28def12
Plot register function warns instead of throwing error
mdtusz Jan 13, 2016
f831b66
Update plotting calls to work agnostically using registered modules
mdtusz Jan 13, 2016
4994256
Fix eslint warnings for multiple var declarations
mdtusz Jan 13, 2016
6dd9a41
Fix undefined reference
mdtusz Jan 13, 2016
823ae72
Merge branch 'agnostic-geo-trace' of github.com:plotly/plotly.js into…
mdtusz Jan 13, 2016
75dc282
Change fields used by module registry
mdtusz Jan 14, 2016
b8864eb
Require styleOne directly
mdtusz Jan 14, 2016
5f26169
Use Object.keys instead of for-in
mdtusz Jan 14, 2016
a693bb2
Change register function and add test
mdtusz Jan 14, 2016
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
4 changes: 3 additions & 1 deletion src/components/legend/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
var Plotly = require('../../plotly');
var d3 = require('d3');

var styleOne = require('../../traces/pie/style_one');

var legend = module.exports = {};

legend.layoutAttributes = require('./attributes');
Expand Down Expand Up @@ -233,7 +235,7 @@ legend.pie = function(d) {
.attr('transform', 'translate(20,0)');
pts.exit().remove();

if(pts.size()) pts.call(Plotly.Pie.styleOne, d[0], trace);
if(pts.size()) pts.call(styleOne, d[0], trace);
};

legend.style = function(s) {
Expand Down
17 changes: 17 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,20 @@ exports.Queue = Plotly.Queue;

// export d3 used in the bundle
exports.d3 = require('d3');

Plotly.register([
require('./traces/bar'),
require('./traces/box'),
require('./traces/heatmap'),
require('./traces/histogram'),
require('./traces/histogram2d'),
require('./traces/histogram2dcontour'),
require('./traces/pie'),
require('./traces/contour'),
require('./traces/scatter3d'),
require('./traces/surface'),
require('./traces/mesh3d'),
require('./traces/scattergeo'),
require('./traces/choropleth'),
require('./traces/scattergl')
]);
Loading