Last active
December 15, 2015 22:59
-
-
Save xuexue/5337257 to your computer and use it in GitHub Desktop.
This file contains 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 data = { fruits: ['apple', 'banana', 'orange'], values: [100, 120, 85] }; | |
gg.graph(data) | |
.layer( | |
gg.layer.bar().map({ | |
'x':'fruits', | |
'y':'values' | |
}) | |
).opts({ | |
'title':'Bar Chart with Polychart.js V1', | |
'dom':'#chart_bar_old', | |
'width':400, | |
'height':200 | |
}).render(); |
This file contains 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 data2 = polyjs.data({fruits: ['apple', 'banana', 'orange'], values: [100, 120, 85] }); | |
polyjs.chart({ | |
layer: { | |
type: 'bar', | |
data: data2, | |
x: 'fruits', | |
y: 'values' | |
}, | |
title: 'Bar chart with Polychart.js V2', | |
dom: 'chart_bar_new', | |
width: 400, | |
height: 200 | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment