• 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,
            #myChart {
                height: 100%;
                width: 100%;
            }
    
            zing-grid[loading] {
                height: 450px;
            }
        </style>
    </head>
    
    <body>
        <div id='myChart'></div>
        <script>
            ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
            var myConfigXc = {
                "type": "hmixed",
                "plot": {
                    "bars-overlap": "100%",
                    "stacked": true
                },
                "scale-x": {
                    "labels": ["Superior", "Michigan", "Huron", "Erie", "Ontario"],
                    "guide": {
                        "visible": false
                    }
                },
                "scale-y": {
                    "values": "0:50:10",
                    "guide": {
                        "visible": false
                    }
                },
                "series": [{
                        "type": "hbar",
                        "values": [25, 30, 15, 20, 25],
                        "stack": 1,
                        "background-color": "gray",
                        "alpha": 0.7,
                        "hover-state": {
                            "visible": false
                        },
                        "max-trackers": 0
                    },
                    {
                        "type": "hbar",
                        "values": [20, 10, 30, 25, 15],
                        "stack": 1,
                        "background-color": "gray",
                        "alpha": 0.5,
                        "hover-state": {
                            "visible": false
                        },
                        "max-trackers": 0
                    },
                    {
                        "type": "hbar",
                        "values": [5, 10, 5, 5, 10],
                        "stack": 1,
                        "background-color": "gray",
                        "alpha": 0.3,
                        "hover-state": {
                            "visible": false
                        },
                        "max-trackers": 0
                    },
                    {
                        "type": "hbullet",
                        "values": [35, 42, 40, 43, 36],
                        "goals": [38, 39, 43, 35, 41],
                        "background-color": "black",
                        "stack": 2,
                        "tooltip": {
                            "text": "Actual: %v<br>Goal: %g",
                            "font-color": "black",
                            "background-color": "white"
                        }
                    }
                ]
            };
    
            zingchart.render({
                id: 'myChart',
                data: myConfigXc,
                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'></div>
    	</body>
    </html>
    html,body,#myChart{height: 100%;width: 100%;}
    var myConfigXc = {
      "type":"hmixed",
      "plot":{
     	  "bars-overlap":"100%",
     	  "stacked":true
     	},
     	"scale-x":{
     	  "labels":["Superior","Michigan","Huron","Erie","Ontario"],
     	  "guide":{
     	    "visible":false
     	  }
     	},
     	"scale-y":{
     	  "values":"0:50:10",
     	  "guide":{
     	    "visible":false
     	  }
     	},
      "series": [
        {
          "type":"hbar",
          "values":[25,30,15,20,25],
          "stack":1,
          "background-color":"gray",
          "alpha":0.7,
          "hover-state":{
    			  "visible":false
    			},
    			"max-trackers":0
        },
        {
          "type":"hbar",
          "values":[20,10,30,25,15],
          "stack":1,
          "background-color":"gray",
          "alpha":0.5,
          "hover-state":{
    			  "visible":false
    			},
    			"max-trackers":0
        },
        {
          "type":"hbar",
          "values":[5,10,5,5,10],
          "stack":1,
          "background-color":"gray",
          "alpha":0.3,
          "hover-state":{
    			  "visible":false
    			},
    			"max-trackers":0
        },
        {
          "type":"hbullet",
          "values":[35,42,40,43,36],
          "goals": [38,39,43,35,41],
          "background-color":"black",
          "stack":2,
          "tooltip":{
            "text":"Actual: %v<br>Goal: %g",
            "font-color":"black",
            "background-color":"white"
          }
        }
      ]
    };
    
    zingchart.render({ 
    	id : 'myChart', 
    	data : myConfigXc, 
    	height : "100%", 
    	width: "100%" 
    });