Last active
December 22, 2015 00:29
-
-
Save wwqrd/6389845 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
data = [ | |
{ | |
name: series, | |
points: [ {}, .. ] | |
} | |
... | |
] | |
axis = new アシ({ | |
ctx: ctx, | |
dispatcher: dispatcher | |
}); | |
... | |
ガ = new ガラパ( data ); | |
ガ.add( axis ) | |
ガ.add( bars ) | |
ガ.add( legend ) | |
ガ.add( tooltip ) | |
ガ.render(); |
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
ガラパ = function( data ) { | |
this.data; | |
} | |
ガラパ.prototype = { | |
add: function( renderer ) { | |
this.renderers.push( renderer ) | |
}, | |
render: function() { | |
for( var i in this.renderers ) { | |
this.renderers[i]( this.data ); | |
} | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Each element can render to different places!