<!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--container { height: 100%; width: 100%; min-height: 150px; } .zc-ref { display: none; } </style> </head> <body> <!-- CHART CONTAINER --> <div id="myChart" class="chart--container"> <a class="zc-ref" href="https://www.zingchart.com">Powered by ZingChart</a> </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 myConfig = { type: 'bar', title: { text: 'Data Basics - [x,y] Timeseries Data', fontSize: 24, }, scaleX: { // set scale label label: { text: 'Date' }, zooming: true, // enable auto-date formatting transform: { type: 'date', }, }, // enable scrollbar scrollX: {}, // enable click and drag window preview: { adjustLayout: true, }, scaleY: { // scale label with unicode character label: { text: 'Value' }, // enable abbreviated units short: true, }, // set margins for labels around chart plotarea: { margin: '40 dynamic dynamic dynamic' }, series: [{ values: [ [1147651200000, 18921051], [1147737600000, 33470860], [1147824000000, 26941146], [1147910400000, 23524811], [1147996800000, 35221586], [1148256000000, 25680800], [1148342400000, 24814061], [1148428800000, 32722949], [1148515200000, 16563319], [1148601600000, 15464811], [1148947200000, 20125338], [1149033600000, 45755325], [1149120000000, 33669043], [1149206400000, 24496720], [1149465600000, 21639826], [1149552000000, 25933308], [1149638400000, 26813938], [1149724800000, 49911361], [1149811200000, 27712815], [1150070400000, 25642234], [1150156800000, 38605066], [1150243200000, 31371508], [1150329600000, 42519228], [1150416000000, 29939223], [1150675200000, 25773905], [1150761600000, 24036581], [1150848000000, 30856077], [1150934400000, 34551392], [1151020800000, 23578607], [1151280000000, 16661904], [1151366400000, 19665400], [1151452800000, 30395258], [1151539200000, 31258941], [1151625600000, 26451164], [1151884800000, 6956169], [1152057600000, 18530216], [1152144000000, 22620152], [1152230400000, 28549502], [1152489600000, 18971433], [1152576000000, 29477035], [1152662400000, 33118840], [1152748800000, 44639492], [1152835200000, 35465535], [1153094400000, 36594798], [1153180800000, 35755729], [1153267200000, 50133874], [1153353600000, 70446830], [1153440000000, 31860034], [1153699200000, 25821004], [1153785600000, 21045822], [1153872000000, 32093907], ], text: 'Week 1', }, ] }; // render chart with width and height to // fill the parent container CSS dimensions zingchart.render({ id: 'myChart', data: myConfig, 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 id="myChart" class="chart--container"> <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; } .chart--container { height: 100%; width: 100%; min-height: 150px; } .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 myConfig = { type: 'bar', title: { text: 'Data Basics - [x,y] Timeseries Data', fontSize: 24, }, scaleX: { // set scale label label: { text: 'Date' }, zooming: true, // enable auto-date formatting transform: { type: 'date', }, }, // enable scrollbar scrollX: {}, // enable click and drag window preview: { adjustLayout: true, }, scaleY: { // scale label with unicode character label: { text: 'Value' }, // enable abbreviated units short: true, }, // set margins for labels around chart plotarea: { margin: '40 dynamic dynamic dynamic' }, series: [{ values: [ [1147651200000, 18921051], [1147737600000, 33470860], [1147824000000, 26941146], [1147910400000, 23524811], [1147996800000, 35221586], [1148256000000, 25680800], [1148342400000, 24814061], [1148428800000, 32722949], [1148515200000, 16563319], [1148601600000, 15464811], [1148947200000, 20125338], [1149033600000, 45755325], [1149120000000, 33669043], [1149206400000, 24496720], [1149465600000, 21639826], [1149552000000, 25933308], [1149638400000, 26813938], [1149724800000, 49911361], [1149811200000, 27712815], [1150070400000, 25642234], [1150156800000, 38605066], [1150243200000, 31371508], [1150329600000, 42519228], [1150416000000, 29939223], [1150675200000, 25773905], [1150761600000, 24036581], [1150848000000, 30856077], [1150934400000, 34551392], [1151020800000, 23578607], [1151280000000, 16661904], [1151366400000, 19665400], [1151452800000, 30395258], [1151539200000, 31258941], [1151625600000, 26451164], [1151884800000, 6956169], [1152057600000, 18530216], [1152144000000, 22620152], [1152230400000, 28549502], [1152489600000, 18971433], [1152576000000, 29477035], [1152662400000, 33118840], [1152748800000, 44639492], [1152835200000, 35465535], [1153094400000, 36594798], [1153180800000, 35755729], [1153267200000, 50133874], [1153353600000, 70446830], [1153440000000, 31860034], [1153699200000, 25821004], [1153785600000, 21045822], [1153872000000, 32093907], ], text: 'Week 1', }, ] }; // render chart with width and height to // fill the parent container CSS dimensions zingchart.render({ id: 'myChart', data: myConfig, height: '100%', width: '100%' }); });