Closed curran closed 8 years ago
Perhaps this can take some inspiration from the API for Backbone Models. Here's how to extend a Backbone Model (from http://backbonejs.org/#Model ):
var Sidebar = Backbone.Model.extend({
promptColor: function() {
var cssColor = prompt("Please enter a CSS color:");
this.set({color: cssColor});
}
});
Wouldn't it be cool if one could create a new Chiasm plugin by extending some kind of "Chiasm plugin base" thing that specifies a simple API for visualization components.
Done in Fundamental Visualizations and chiasm-component.
The three plugins that currently exist (bar chart, line chart, scatter plot) must be unified in their implementation approach. Issues that need to be addressed include:
After this refactoring, these three plugins will serve as canonical plugin examples to guide development of future D3-based plugins.