chiasm-project / chiasm

A browser based environment for interactive data visualizations.
MIT License
184 stars 27 forks source link

Unify plugins #27

Closed curran closed 8 years ago

curran commented 9 years ago

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.

curran commented 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.

curran commented 8 years ago

Done in Fundamental Visualizations and chiasm-component.