MCPcopy Index your code
hub / github.com/bqplot/bqplot / initialize

Method initialize

js/src/BarsModel.ts:74–94  ·  view source on GitHub ↗
(attributes, options)

Source from the content-addressed store, hash-verified

72 }
73
74 initialize(attributes, options) {
75 super.initialize(attributes, options);
76 this.yIs2d = false;
77 this.on_some_change(['x', 'y', 'base'], this.update_data, this);
78 this.on_some_change(
79 ['color', 'opacities', 'color_mode', 'opacity_mode'],
80 function () {
81 this.update_color();
82 this.trigger('colors_updated');
83 },
84 this
85 );
86 // FIXME: replace this with on("change:preserve_domain"). It is not done here because
87 // on_some_change depends on the GLOBAL backbone on("change") handler which
88 // is called AFTER the specific handlers on("change:foobar") and we make this
89 // assumption.
90 this.on_some_change(['preserve_domain'], this.update_domains, this);
91 this.update_data();
92 this.update_color();
93 this.update_domains();
94 }
95
96 update_data() {
97 let x_data = this.get('x');

Callers

nothing calls this directly

Calls 3

update_colorMethod · 0.95
update_dataMethod · 0.95
update_domainsMethod · 0.95

Tested by

no test coverage detected