• Edit
  • Download
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingSoft Demo</title>
    7. <script nonce="undefined" src="https://cdn.zingchart.com/zingchart.min.js"></script>
    8. <style>
    9. html,
    10. body {
    11. margin: 0;
    12. padding: 0;
    13. width: 100%;
    14. height: 100%;
    15. }
    16.  
    17. .chart--container {
    18. min-height: 150px;
    19. width: 100%;
    20. height: 100%;
    21. }
    22.  
    23. .zc-ref {
    24. display: none;
    25. }
    26. </style>
    27. </head>
    28.  
    29. <body>
    30. <!-- CHART CONTAINER -->
    31. <div id="myChart" class="chart--container">
    32. <a class="zc-ref" href="https://www.zingchart.com/">Powered by ZingChart</a>
    33. </div>
    34. <script>
    35. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"]; // window:load event for Javascript to run after HTML
    36. // because this Javascript is injected into the document head
    37. window.addEventListener('load', () => {
    38. // Javascript code to execute after DOM content
    39.  
    40. // full ZingChart schema can be found here:
    41. // https://www.zingchart.com/docs/api/json-configuration/
    42. let chartConfig = {
    43. "graphset": [{
    44. "type": "hboxplot",
    45. "background-color": "white",
    46. "plot": {
    47. "dataStationName": ["BARDUFOSS", "E6 HEIA", "DIVIDALEN II", "TAMOKDALEN", "SJUFJELLET", "BONES I BARDU"],
    48. "dataStationElevation": [69, 297, 391, 481, 484, 540]
    49. },
    50. "plotarea": {
    51. "margin": "dynamic"
    52. },
    53. "scale-x": {
    54. "zooming": true,
    55. "ranged": false,
    56. "label": {
    57. "text": "Altitude"
    58. },
    59. "format": "%v",
    60. "tick": {},
    61. "item": {
    62. "font-size": "14px"
    63. },
    64. "guide": {
    65. "lineWidth": 1,
    66. "visible": true
    67. },
    68. "minValue": 0,
    69. "maxValue": 600,
    70. },
    71. "scale-y": {
    72. "label": {
    73. "text": "Temp (Celsius)"
    74. },
    75. "ref-line": {
    76. "visible": true,
    77. "line-color": "darkgrey",
    78. "line-width": 1,
    79. "line-style": "solid"
    80. },
    81. "format": "%v C",
    82. "line-color": "darkgrey",
    83. "tick": {
    84. "line-color": "darkgrey"
    85. },
    86. "item": {
    87. "font-size": "14px"
    88. },
    89. "guide": {
    90. "visible": true
    91. }
    92. },
    93. "options": {
    94. "box": {
    95. "border-color": "black",
    96. "border-width": 1,
    97. "tooltip": {
    98. "paddingBottom": 5,
    99. "background-color": "darkgrey",
    100. "border-color": "lightgrey",
    101. "border-radius": 10,
    102. "text": "%data-station-name, %data-station-elevation moh"
    103. }
    104. }
    105. },
    106. "series": [{
    107. "barWidth": 25,
    108. "url": "http://www.google.com",
    109. "target": "_blank",
    110. "data-box": [
    111. [69, 2, 3, 3.8, 4, 4.2],
    112. [297, 1, 2.2, 2.4, 3.1, 3.8],
    113. [391, 0.4, 0.766666651, 1.4, 1.73333335, 2.3],
    114. [481, 2.1, 2.7, 3.2, 3.7, 4.5],
    115. [484, -4.3, -3.8, -3.1, -2.26666665, -1],
    116. [540, 1.6, 2.5, 3.05, 3.6, 5.2]
    117. ]
    118. }]
    119. }]
    120. };
    121.  
    122. // render chart
    123. zingchart.render({
    124. id: 'myChart',
    125. data: chartConfig,
    126. width: '100%',
    127. });
    128. });
    129. </script>
    130. </body>
    131.  
    132. </html>
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingSoft Demo</title>
    7. <script src="https://cdn.zingchart.com/zingchart.min.js"></script>
    8. </head>
    9.  
    10. <body>
    11. <!-- CHART CONTAINER -->
    12. <div id="myChart" class="chart--container">
    13. <a class="zc-ref" href="https://www.zingchart.com/">Powered by ZingChart</a>
    14. </div>
    15. </body>
    16.  
    17. </html>
    1. html,
    2. body {
    3. margin: 0;
    4. padding: 0;
    5. width: 100%;
    6. height: 100%;
    7. }
    8.  
    9. .chart--container {
    10. min-height: 150px;
    11. width: 100%;
    12. height: 100%;
    13. }
    14.  
    15. .zc-ref {
    16. display: none;
    17. }
    1. // window:load event for Javascript to run after HTML
    2. // because this Javascript is injected into the document head
    3. window.addEventListener('load', () => {
    4. // Javascript code to execute after DOM content
    5.  
    6. // full ZingChart schema can be found here:
    7. // https://www.zingchart.com/docs/api/json-configuration/
    8. let chartConfig = {
    9. "graphset": [{
    10. "type": "hboxplot",
    11. "background-color": "white",
    12. "plot": {
    13. "dataStationName": ["BARDUFOSS", "E6 HEIA", "DIVIDALEN II", "TAMOKDALEN", "SJUFJELLET", "BONES I BARDU"],
    14. "dataStationElevation": [69, 297, 391, 481, 484, 540]
    15. },
    16. "plotarea": {
    17. "margin": "dynamic"
    18. },
    19. "scale-x": {
    20. "zooming": true,
    21. "ranged": false,
    22. "label": {
    23. "text": "Altitude"
    24. },
    25. "format": "%v",
    26. "tick": {},
    27. "item": {
    28. "font-size": "14px"
    29. },
    30. "guide": {
    31. "lineWidth": 1,
    32. "visible": true
    33. },
    34. "minValue": 0,
    35. "maxValue": 600,
    36. },
    37. "scale-y": {
    38. "label": {
    39. "text": "Temp (Celsius)"
    40. },
    41. "ref-line": {
    42. "visible": true,
    43. "line-color": "darkgrey",
    44. "line-width": 1,
    45. "line-style": "solid"
    46. },
    47. "format": "%v C",
    48. "line-color": "darkgrey",
    49. "tick": {
    50. "line-color": "darkgrey"
    51. },
    52. "item": {
    53. "font-size": "14px"
    54. },
    55. "guide": {
    56. "visible": true
    57. }
    58. },
    59. "options": {
    60. "box": {
    61. "border-color": "black",
    62. "border-width": 1,
    63. "tooltip": {
    64. "paddingBottom": 5,
    65. "background-color": "darkgrey",
    66. "border-color": "lightgrey",
    67. "border-radius": 10,
    68. "text": "%data-station-name, %data-station-elevation moh"
    69. }
    70. }
    71. },
    72. "series": [{
    73. "barWidth": 25,
    74. "url": "http://www.google.com",
    75. "target": "_blank",
    76. "data-box": [
    77. [69, 2, 3, 3.8, 4, 4.2],
    78. [297, 1, 2.2, 2.4, 3.1, 3.8],
    79. [391, 0.4, 0.766666651, 1.4, 1.73333335, 2.3],
    80. [481, 2.1, 2.7, 3.2, 3.7, 4.5],
    81. [484, -4.3, -3.8, -3.1, -2.26666665, -1],
    82. [540, 1.6, 2.5, 3.05, 3.6, 5.2]
    83. ]
    84. }]
    85. }]
    86. };
    87.  
    88. // render chart
    89. zingchart.render({
    90. id: 'myChart',
    91. data: chartConfig,
    92. width: '100%',
    93. });
    94. });