世界の人口を地域別に示すグラフを作成する必要があり、サンプル データは次のようになります。
China 1,361,300,000
India 1,236,970,000
United States 317,148,000
Indonesia 237,641,326
Brazil 201,032,714
私は初めてDygraphs
で、同じことで簡単な例を試しました:
<html>
<head>
<script type="text/javascript"
src="http://dygraphs.com/dygraph-combined.js"></script>
</head>
<body>
<div id="demodiv" style="width:500px;height:500px"></div>
<script type="text/javascript">
var data = "Country,Population\n" +
"1,1361300000\n" +
"2,1236970000\n" +
"3,317148000\n" +
"4,237641326\n" +
"5,201032714\n";
g = new Dygraph(document.getElementById("demodiv"), data, {
title: "World's Population"
});
</script>
</body>
</html>
Dygraphs
さて、数字の代わりに国名を表示するにはどうすればよいx-Axis
ですか?で可能Dygraphs
ですか?
前もって感謝します。