how make default zoom asia continent when page loads. in amcharts map
you can set zoomlatitude
, zoomlongitude
, zoomlevel
in map dataprovider
default position , zoom level want map on load.
example below:
var map = amcharts.makechart("chartdiv", { "type": "map", "theme": "light", "dataprovider": { "map": "continentslow", "zoomlatitude": 47.8936, "zoomlongitude": 115.6176, "zoomlevel": 2, "getareasfrommap": true, "areas": [{ "id": "asia", "showasselected": true }] }, "areassettings": { "autozoom": false, "selectedcolor": "#cc0000" } });
<script src="https://www.amcharts.com/lib/3/ammap.js"></script> <script src="https://www.amcharts.com/lib/3/maps/js/continentslow.js"></script> <script src="https://www.amcharts.com/lib/3/themes/light.js"></script> <div id="chartdiv" style="width:100%; height: 250px"></div>
Comments
Post a Comment