#9839
HTML
<script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
<script src="https://www.amcharts.com/lib/3/xy.js"></script>
<div id="chartdiv"></div>
CSS
#chartdiv {
width: 100%;
height: 500px;
}
JavaScript
var chart = AmCharts.makeChart("chartdiv",
{
"type": "xy",
"autoMarginOffset": 10,
"marginRight": 10,
"marginTop": 10,
"startDuration": 0,
"fontSize": 13,
"theme": "default",
"language": "fr",
"guides": [],
"graphs": [
{
"animationPlayed": false,
"balloonText": "x:<b>[[x]]</b> y:<b>[[y]]</b><br>value:<b>[[value]]</b>",
"bullet": "square",
"bulletBorderThickness": 0,
"bulletSize": 10,
"id": "AmGraph-1",
"lineAlpha": 0,
"lineColor": "#b0de09",
"maxBulletSize": 0,
"minBulletSize": 10,
"periodSpan": 0,
"valueField": "bin",
"xField": "x",
"yField": "y",
"showBalloon": false
}
],
"dataLoader": {
"url": "xy.json",
"format": "json"
}
}
);
var chartCursor = new AmCharts.ChartCursor();
//chartCursor.selectWithoutZooming = true;
chart.addChartCursor(chartCursor);