<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>ZingGrid: Blank Grid</title> <script nonce="undefined" src="https://cdn.zingchart.com/zingchart.min.js"></script> <style> html, body { height: 100%; width: 100%; margin: 0; padding: 0; } .chart-parent--container { display: flex; } .chart--container { height: 100%; width: 100%; min-height: 400px; } .zc-ref { display: none; } </style> </head> <body> <!-- CHART CONTAINER --> <div class="chart-parent--container"> <div id="myChart" class="chart--container"> <a class="zc-ref" href="https://www.zingchart.com">Powered by ZingChart</a> </div> <div id="myChart1" class="chart--container"> <a class="zc-ref" href="https://www.zingchart.com">Powered by ZingChart</a> </div> </div> <script> ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"]; // window:load event for Javascript to run after HTML // because this Javascript is injected into the document head window.addEventListener('load', () => { // Javascript code to execute after DOM content // full ZingChart schema can be found here: // https://www.zingchart.com/docs/api/json-configuration/ const chordConfig1 = { "type": "chord", "options": { "band-width": 10, "radius": 120 }, "title": { "text": "'band-width':10" }, "series": [{ "values": [6637, 5700, 4789, 2771], "text": "A" }, { "values": [7737, 2691, 2202, 7006], "text": "B" }, { "values": [8574, 9898, 4084, 1765], "text": "C" }, { "values": [5309, 1602, 8395, 2908], "text": "D" } ] }; const chordConfig2 = { "type": "chord", "options": { "band-width": 50, "radius": 120 }, "title": { "text": "'band-width':50" }, "series": [{ "values": [6637, 5700, 4789, 2771], "text": "A" }, { "values": [7737, 2691, 2202, 7006], "text": "B" }, { "values": [8574, 9898, 4084, 1765], "text": "C" }, { "values": [5309, 1602, 8395, 2908], "text": "D" } ] }; // render chart with width and height to // fill the parent container CSS dimensions zingchart.render({ id: 'myChart', data: chordConfig1, height: '100%', width: '100%' }); zingchart.render({ id: 'myChart1', data: chordConfig2, height: '100%', width: '100%' }); }); </script> </body> </html>
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>ZingGrid: Blank Grid</title> <script src="https://cdn.zingchart.com/zingchart.min.js"></script> </head> <body> <!-- CHART CONTAINER --> <div class="chart-parent--container"> <div id="myChart" class="chart--container"> <a class="zc-ref" href="https://www.zingchart.com">Powered by ZingChart</a> </div> <div id="myChart1" class="chart--container"> <a class="zc-ref" href="https://www.zingchart.com">Powered by ZingChart</a> </div> </div> </body> </html>
html, body { height: 100%; width: 100%; margin: 0; padding: 0; } .chart-parent--container { display: flex; } .chart--container { height: 100%; width: 100%; min-height: 400px; } .zc-ref { display: none; }
// window:load event for Javascript to run after HTML // because this Javascript is injected into the document head window.addEventListener('load', () => { // Javascript code to execute after DOM content // full ZingChart schema can be found here: // https://www.zingchart.com/docs/api/json-configuration/ const chordConfig1 = { "type": "chord", "options": { "band-width": 10, "radius": 120 }, "title": { "text": "'band-width':10" }, "series": [{ "values": [6637, 5700, 4789, 2771], "text": "A" }, { "values": [7737, 2691, 2202, 7006], "text": "B" }, { "values": [8574, 9898, 4084, 1765], "text": "C" }, { "values": [5309, 1602, 8395, 2908], "text": "D" } ] }; const chordConfig2 = { "type": "chord", "options": { "band-width": 50, "radius": 120 }, "title": { "text": "'band-width':50" }, "series": [{ "values": [6637, 5700, 4789, 2771], "text": "A" }, { "values": [7737, 2691, 2202, 7006], "text": "B" }, { "values": [8574, 9898, 4084, 1765], "text": "C" }, { "values": [5309, 1602, 8395, 2908], "text": "D" } ] }; // render chart with width and height to // fill the parent container CSS dimensions zingchart.render({ id: 'myChart', data: chordConfig1, height: '100%', width: '100%' }); zingchart.render({ id: 'myChart1', data: chordConfig2, height: '100%', width: '100%' }); });