Created
June 12, 2014 00:20
-
-
Save ffullenk/b19281a2dae5dca000ca to your computer and use it in GitHub Desktop.
stacked horizontal bar chart dxChart
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 dataSource = [ | |
{ state: "Germany", young: 6.7, middle: 28.6, older: 5.1 } | |
]; | |
$("#chartContainer").dxChart({ | |
dataSource: dataSource, | |
rotated: true, | |
commonAxisSettings: { | |
label: { visible: false }, | |
grid: { visible: false } | |
}, | |
commonSeriesSettings: { | |
argumentField: "state", | |
type: "stackedBar" | |
}, | |
series: [ | |
{ valueField: "young", name: "0-14" }, | |
{ valueField: "middle", name: "15-64" }, | |
{ valueField: "older", name: "65 and older" } | |
], | |
argumentAxis: { visible: false }, | |
legend: { | |
visible: false | |
}, | |
tooltip: { | |
enabled: true, | |
customizeText: function () { | |
return this.seriesName + " years: " + this.valueText; | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment