Skip to content

Instantly share code, notes, and snippets.

@klaemo
Last active August 29, 2015 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save klaemo/77de883b48a0aa7660b2 to your computer and use it in GitHub Desktop.
Save klaemo/77de883b48a0aa7660b2 to your computer and use it in GitHub Desktop.
var Starplot = require('./starplot.js')
var plot = new Starplot()
plot.draw(foo)
var d3 = require('d3')
function Starplot() {
this.data = []
this.svgContainer = null
}
Starplot.prototype.draw = function(e) {
this.svgContainer = d3.select(e).append('div')
.attr('class', 'plot')
.append('svg')
.attr('viewBox', '-50 -55 100 100')
}
module.exports = Starplot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment