chiasm-project / chiasm

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

Modify Chiasm constructor to take a selection string #45

Closed curran closed 8 years ago

curran commented 8 years ago

Currently, the Chiasm constructor expects a DOM element. This means that writing code to use Chiasm involves something like this:

var containerDiv = document.getElementById("chiasm-container");
var chiasm = Chiasm(containerDiv);

It would be nicer to be able to simply pass a selector string into the constructor, like this:

var chiasm = Chiasm("#chiasm-container");

Both of the above snippets should work for instantiating Chiasm.

curran commented 8 years ago

Decided against this strategy, and instead solved the issue by making containerSelector a public property in chiasm-layout.