Skip to content

Commit 93493a6

Browse files
committed
make 'pie' a layout category,
- so that fullLayout.has('pie') returns true - note that fullLayout.has('cartesian') also returns true now as pie trace use the cartesian plot module.
1 parent 4e0c6da commit 93493a6

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/plots/plots.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ plots.getSubplotIds = function getSubplotIds(layout, type) {
193193
if(type === 'cartesian' && !layout._hasCartesian) return [];
194194
if(type === 'gl2d' && !layout._hasGL2D) return [];
195195
if(type === 'cartesian' || type === 'gl2d') {
196-
return Object.keys(layout._plots);
196+
return Object.keys(layout._plots || {});
197197
}
198198

199199
var idRegex = _module.idRegex,

src/traces/pie/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Pie.moduleType = 'trace';
2323
Pie.name = 'pie';
2424
Pie.basePlotModule = require('../../plots/cartesian');
2525
Pie.categories = ['pie', 'showLegend'];
26+
Pie.layoutCategories = ['pie'];
2627
Pie.meta = {
2728
description: [
2829
'A data visualized by the sectors of the pie is set in `values`.',

0 commit comments

Comments
 (0)