Skip to content

Commit 7698e76

Browse files
committed
add config attributes to plot-schema
1 parent 10bbf37 commit 7698e76

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/plot_api/plot_schema.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ var baseAttributes = require('../plots/attributes');
1616
var baseLayoutAttributes = require('../plots/layout_attributes');
1717
var frameAttributes = require('../plots/frame_attributes');
1818
var animationAttributes = require('../plots/animation_attributes');
19+
var configAttributes = require('./plot_config').configAttributes;
1920

2021
// polar attributes are not part of the Registry yet
2122
var polarAreaAttrs = require('../plots/polar/legacy/area_attributes');
@@ -47,7 +48,7 @@ exports.UNDERSCORE_ATTRS = UNDERSCORE_ATTRS;
4748
* - transforms
4849
* - frames
4950
* - animations
50-
* - config (coming soon ...)
51+
* - config
5152
*/
5253
exports.get = function() {
5354
var traces = {};
@@ -96,7 +97,9 @@ exports.get = function() {
9697
transforms: transforms,
9798

9899
frames: getFramesAttributes(),
99-
animation: formatAttributes(animationAttributes)
100+
animation: formatAttributes(animationAttributes),
101+
102+
config: formatAttributes(configAttributes)
100103
};
101104
};
102105

test/jasmine/bundle_tests/plotschema_test.js

+5
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,11 @@ describe('plot schema', function() {
328328
expect(plotSchema.frames.items.frames_entry.role).toEqual('object');
329329
});
330330

331+
it('should list config attributes', function() {
332+
expect(plotSchema.config).toBeDefined();
333+
expect(plotSchema.config.scrollZoom).toBeDefined();
334+
});
335+
331336
it('should list trace-dependent & direction-dependent error bar attributes', function() {
332337
var scatterSchema = plotSchema.traces.scatter.attributes;
333338
expect(scatterSchema.error_x.copy_ystyle).toBeDefined();

0 commit comments

Comments
 (0)