Last active
August 29, 2015 14:24
-
-
Save klaemo/77de883b48a0aa7660b2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Starplot = require('./starplot.js') | |
var plot = new Starplot() | |
plot.draw(foo) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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