<!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 config1 = { "type": "rankflow", "title": { "text": "`col-space`: 0", "font-size": 14, }, "options": { "col-space": 0 }, "plotarea": { "margin": 20 }, "scale-x": { "labels": ["ON-TIME", "BAGGAGE", "PASSENGERS"], "values": ["ON-TIME", "BAGGAGE", "PASSENGERS"] }, "series": [{ "text": "Air West", "ranks": [3, 4, 1], "rank": 3 }, { "text": "Braniff", "ranks": [1, 1, 5], "rank": 1 }, { "text": "Capital", "ranks": [5, 2, 4], "rank": 4 }, { "text": "Eastern", "ranks": [2, 3, 2], "rank": 2 }, { "text": "Galaxy", "ranks": [4, 5, 3], "rank": 5 } ] }; const config2 = { "type": "rankflow", "title": { "text": "`col-space`: 50", "font-size": 14 }, "options": { "col-space": 50 }, "plotarea": { "margin": 20 }, "scale-x": { "labels": ["ON-TIME", "BAGGAGE", "PASSENGERS"], "values": ["ON-TIME", "BAGGAGE", "PASSENGERS"] }, "series": [{ "text": "Air West", "ranks": [3, 4, 1], "rank": 3 }, { "text": "Braniff", "ranks": [1, 1, 5], "rank": 1 }, { "text": "Capital", "ranks": [5, 2, 4], "rank": 4 }, { "text": "Eastern", "ranks": [2, 3, 2], "rank": 2 }, { "text": "Galaxy", "ranks": [4, 5, 3], "rank": 5 } ] }; // render chart with width and height to // fill the parent container CSS dimensions zingchart.render({ id: 'myChart', data: config1, height: '100%', width: '100%' }); zingchart.render({ id: 'myChart1', data: config2, 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 config1 = { "type": "rankflow", "title": { "text": "`col-space`: 0", "font-size": 14, }, "options": { "col-space": 0 }, "plotarea": { "margin": 20 }, "scale-x": { "labels": ["ON-TIME", "BAGGAGE", "PASSENGERS"], "values": ["ON-TIME", "BAGGAGE", "PASSENGERS"] }, "series": [{ "text": "Air West", "ranks": [3, 4, 1], "rank": 3 }, { "text": "Braniff", "ranks": [1, 1, 5], "rank": 1 }, { "text": "Capital", "ranks": [5, 2, 4], "rank": 4 }, { "text": "Eastern", "ranks": [2, 3, 2], "rank": 2 }, { "text": "Galaxy", "ranks": [4, 5, 3], "rank": 5 } ] }; const config2 = { "type": "rankflow", "title": { "text": "`col-space`: 50", "font-size": 14 }, "options": { "col-space": 50 }, "plotarea": { "margin": 20 }, "scale-x": { "labels": ["ON-TIME", "BAGGAGE", "PASSENGERS"], "values": ["ON-TIME", "BAGGAGE", "PASSENGERS"] }, "series": [{ "text": "Air West", "ranks": [3, 4, 1], "rank": 3 }, { "text": "Braniff", "ranks": [1, 1, 5], "rank": 1 }, { "text": "Capital", "ranks": [5, 2, 4], "rank": 4 }, { "text": "Eastern", "ranks": [2, 3, 2], "rank": 2 }, { "text": "Galaxy", "ranks": [4, 5, 3], "rank": 5 } ] }; // render chart with width and height to // fill the parent container CSS dimensions zingchart.render({ id: 'myChart', data: config1, height: '100%', width: '100%' }); zingchart.render({ id: 'myChart1', data: config2, height: '100%', width: '100%' }); });