Last active
September 27, 2016 07:26
-
-
Save plum-shiga/8b40c4e585c9c8f52c75d0c74a086eea to your computer and use it in GitHub Desktop.
amchartsで1画面に2つ
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 chart = AmCharts.makeChart("chart1div", { | |
"type": "serial", | |
"categoryField": "category", | |
"categoryAxis": { | |
"gridPosition": "start" | |
}, | |
"graphs": [ | |
{ | |
"title": "Graph title", | |
"valueField": "column-1" | |
} | |
], | |
"valueAxes": [ | |
{ | |
"title": "Axis title" | |
} | |
], | |
"legend": { | |
"useGraphSettings": true | |
}, | |
"titles": [ | |
{ | |
"size": 15, | |
"text": "Chart Title" | |
} | |
], | |
"dataProvider": [ | |
{ | |
"category": "category 1", | |
"column-1": 8 | |
}, | |
{ | |
"category": "category 2", | |
"column-1": 10 | |
} | |
] | |
}); | |
// -------------------------------------------- | |
var chart2 = AmCharts.makeChart("chart2div", { | |
"type": "serial", | |
"categoryField": "category", | |
"categoryAxis": { | |
"gridPosition": "start" | |
}, | |
"graphs": [ | |
{ | |
"title": "Graph title", | |
"valueField": "column-1" | |
} | |
], | |
"valueAxes": [ | |
{ | |
"title": "Axis title" | |
} | |
], | |
"legend": { | |
"useGraphSettings": true | |
}, | |
"titles": [ | |
{ | |
"size": 15, | |
"text": "Chart Title" | |
} | |
], | |
"dataProvider": [ | |
{ | |
"category": "category 1", | |
"column-1": 100 | |
}, | |
{ | |
"category": "category 2", | |
"column-1": 200 | |
}, | |
] | |
}); |
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
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1"> | |
<meta http-equiv = "X-UA-Compatible" content = "IE=edge"> | |
<title>demo</title> | |
<!--[if lt IE 9]> | |
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> | |
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> | |
<![endif]--> | |
</head> | |
<body> | |
<div id="chart1div" style="width:500px;height:300px;"></div> | |
<div id="chart2div" style="width:500px;height:300px;"></div> | |
<script src = "./js/amcharts/amcharts.js"></script> | |
<script src = "./js/amcharts/serial.js"></script> | |
<script src = "./js/charts.js"></script> | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment