• Edit
  • Download
  • <!DOCTYPE html>
    <html>
    
    <head>
        <meta charset="utf-8">
        <title>ZingSoft Demo</title>
    
        <script src="https://cdn.zingchart.com/zingchart.min.js"></script>
        <style>
            html,
            body {
                height: 100%;
                width: 100%;
                margin: 0;
                padding: 0;
            }
    
            #myChart {
                height: 100%;
                width: 100%;
                min-height: 150px;
            }
    
            .zc-ref {
                display: none;
            }
    
            zing-grid[loading] {
                height: 450px;
            }
        </style>
    </head>
    
    <body>
        <div id="myChart"><a class="zc-ref" href="https://www.zingchart.com">Powered by ZingChart</a></div>
        <script>
            ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
            var myConfig = {
                "graphset": [{
                    "shapes": [{
                            "type": "zingchart.maps",
                            "options": {
                                "name": "usa",
                                "scrolling": false,
                                "style": {
                                    "label": {
                                        "visible": false
                                    },
                                    "items": {
                                        "CA": {
                                            "background-color": "#9e9e9e"
                                        }
                                    }
                                }
                            }
                        },
                        {
                            "type": "circle", // shapeid is OPTIONAL but smart if you are targeting events to this shape
                            "id": "sd",
                            "x": "-117.1611lon", // hook shape based on lon/lat
                            "y": "32.7157lat", // hook shape based on lon/lat
                            "map": "usa", // assigning to map name or id is necessary
                            "size": 15,
                            "background-color": '#4dd0e1',
                            "cursor": "pointer",
                            "url": "https://en.wikipedia.org/wiki/Anchorman:_The_Legend_of_Ron_Burgundy", // is how you link url to shapes
                            "target": "_blank", // just like HTMl we have target _blank
                            "tooltip": {
                                "backgroundColor": "#ff9800",
                                "borderColor": "#333",
                                "borderRadius": 4,
                                "fontSize": 16,
                                "text": "We're located right in San Diego!"
                            }
                        }
                    ]
                }]
            };
    
            zingchart.bind(null, 'shape_click', function(e) {
                if (e.shapeid === 'sd')
                    console.log(e)
            });
            zingchart.loadModules('maps, maps-usa', function() {
                zingchart.render({
                    id: 'myChart',
                    data: myConfig,
                    height: '100%',
                    width: '100%'
                });
            });
        </script>
    </body>
    
    </html>
    <!DOCTYPE html>
    <html>
    	<head>
        <meta charset="utf-8">
        <title>ZingSoft Demo</title>
    	
    		<script src="https://cdn.zingchart.com/zingchart.min.js"></script>
    </head>
    	<body>
    		<div id="myChart"><a class="zc-ref" href="https://www.zingchart.com">Powered by ZingChart</a></div>
    	</body>
    </html>
    html, body {
    	height:100%;
    	width:100%;
    	margin:0;
    	padding:0;
    }
    #myChart {
    	height:100%;
    	width:100%;
    	min-height:150px;
    }
    .zc-ref {
    	display:none;
    }
    var myConfig = {
    "graphset":[
        {
            "shapes":[
                {
                    "type":"zingchart.maps",
                    "options":{
                        "name":"usa",
                        "scrolling": false,
                        "style":{
                            "label":{
                                "visible":false
                            },
                            "items": {
                              "CA": {
                                "background-color": "#9e9e9e"
                              }
                            }
                        }
                    }
                },
                {
                    "type":"circle", // shapeid is OPTIONAL but smart if you are targeting events to this shape
                    "id":"sd",
                    "x":"-117.1611lon", // hook shape based on lon/lat
                    "y":"32.7157lat",   // hook shape based on lon/lat
                    "map":"usa", // assigning to map name or id is necessary
                    "size":15,
                    "background-color": '#4dd0e1',
                    "cursor":"pointer",
                    "url": "https://en.wikipedia.org/wiki/Anchorman:_The_Legend_of_Ron_Burgundy", // is how you link url to shapes
                    "target": "_blank", // just like HTMl we have target _blank
                    "tooltip":{
                        "backgroundColor":"#ff9800",
                        "borderColor":"#333",
                        "borderRadius":4,
                        "fontSize":16,
                        "text":"We're located right in San Diego!"
                    }
                }
            ]
        }
    ]
    };
    
    zingchart.bind(null, 'shape_click', function(e) {
      if (e.shapeid === 'sd')
        console.log(e)
    });
    zingchart.loadModules('maps, maps-usa', function() {
      zingchart.render({ 
      	id: 'myChart', 
      	data: myConfig, 
      	height: '100%', 
      	width: '100%' 
      });
    });