<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>ZingSoft Demo</title> <script nonce="undefined" 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; } </style> </head> <body> <div id="zc"></div> <script> ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"]; var IDS = ["AL", "AK", "AZ", "AR", "CA", "CO", "CT", "DE", "DC", "FL", "GA", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "OH", "OK", "OR", "PA", "RI", "SC", "SD", "TN", "TX", "UT", "VT", "VA", "WA", "WV", "WI", "WY"]; var data = {}; for (var i = 0; i < IDS.length; i++) { data[IDS[i]] = { value: ZC._r_(0, 100) }; } var cdata = { "type": "tilemap", "options": { "map": "USA", "type": "hex", "size-factor": 1.1, "data": data, "tile": { "border-width": 1, "border-color": "#fff" }, "groups": [{ "rule": "%value >= 0 && %value < 25", "background-color": "#89b92e", "text": "0-25" }, { "rule": "%value >= 25 && %value < 50", "background-color": "#0392bb", "text": "25-50" }, { "rule": "%value >= 50 && %value < 75", "background-color": "#cc3300", "text": "50-75" }, { "rule": "%value >= 75 && %value < 100", "background-color": "#da9b04", "text": "75-100" } ] }, "tooltip": { "padding": 10, "border-width": 1, "border-color": "#333", "font-weight": "600" }, "legend": { "margin": "auto auto 10 auto", "layout": "float", "marker": { "type": "circle" } }, "plotarea": { "margin": "10 10 40 10" } }; zingchart.render({ id: 'zc', width: 640, height: 480, output: 'svg', data: cdata }); </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="zc"></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 IDS = ["AL", "AK", "AZ", "AR", "CA", "CO", "CT", "DE", "DC", "FL", "GA", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "OH", "OK", "OR", "PA", "RI", "SC", "SD", "TN", "TX", "UT", "VT", "VA", "WA", "WV", "WI", "WY"]; var data = {}; for (var i = 0; i < IDS.length; i++) { data[IDS[i]] = { value: ZC._r_(0, 100) }; } var cdata = { "type": "tilemap", "options": { "map": "USA", "type": "hex", "size-factor": 1.1, "data": data, "tile": { "border-width": 1, "border-color": "#fff" }, "groups": [{ "rule": "%value >= 0 && %value < 25", "background-color": "#89b92e", "text": "0-25" }, { "rule": "%value >= 25 && %value < 50", "background-color": "#0392bb", "text": "25-50" }, { "rule": "%value >= 50 && %value < 75", "background-color": "#cc3300", "text": "50-75" }, { "rule": "%value >= 75 && %value < 100", "background-color": "#da9b04", "text": "75-100" } ] }, "tooltip": { "padding": 10, "border-width": 1, "border-color": "#333", "font-weight": "600" }, "legend": { "margin": "auto auto 10 auto", "layout": "float", "marker": { "type": "circle" } }, "plotarea": { "margin": "10 10 40 10" } }; zingchart.render({ id: 'zc', width: 640, height: 480, output: 'svg', data: cdata });