• Edit
  • Download
    1. <!doctype html>
    2. <html class="zc-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. @import url('https://fonts.googleapis.com/css?family=Roboto&display=swap');
    10.  
    11. .chart--container {
    12. height: 100%;
    13. width: 100%;
    14. min-height: 530px;
    15. }
    16.  
    17. .zc-ref {
    18. display: none;
    19. }
    20. </style>
    21. </head>
    22.  
    23. <body class="zc-body">
    24.  
    25. <div id="myChart" class="chart--container">
    26. <a href="https://www.zingchart.com/" rel="noopener" class="zc-ref">Powered by ZingChart</a>
    27. </div>
    28.  
    29. <script>
    30. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"]; // CHART CONFIG
    31. // -----------------------------
    32. let chartConfig = {
    33. globals: {
    34. fontFamily: 'Roboto',
    35. },
    36. graphset: [{
    37. type: 'piano',
    38. theme: 'classic',
    39. backgroundColor: '#fff',
    40. title: {
    41. text: 'Surf Height',
    42. adjustLayout: true,
    43. paddingBottom: '25px',
    44. backgroundColor: 'none',
    45. fontColor: '#05636c',
    46. fontSize: '24px',
    47. },
    48. subtitle: {
    49. text: "Black's Beach - La Jolla",
    50. backgroundColor: 'none',
    51. fontColor: '#05636c',
    52. fontSize: '14px',
    53. height: '25px',
    54. x: '-9.5px',
    55. y: '38.5px',
    56. },
    57. legend: {
    58. align: 'center',
    59. borderWidth: '0px',
    60. footer: {
    61. backgroundColor: 'none',
    62. borderColor: 'none',
    63. fontColor: '#05636c',
    64. fontSize: '14px',
    65. textAlign: 'center',
    66. },
    67. item: {
    68. borderColor: 'none',
    69. fontColor: '#05636c',
    70. size: '13px',
    71. },
    72. layout: 'x6',
    73. marker: {
    74. type: 'square',
    75. borderColor: 'none',
    76. borderRadius: '8px',
    77. size: '13px',
    78. },
    79. shadow: false,
    80. toggleAction: 'none',
    81. verticalAlign: 'bottom',
    82. width: '80%',
    83. },
    84. plot: {
    85. tooltip: {
    86. text: ' The surf will be about %v feet.',
    87. fontColor: 'white',
    88. fontSize: '14px',
    89. textAlign: 'left',
    90. },
    91. aspect: 'none',
    92. borderColor: '#eeeeee',
    93. borderRadius: '7px',
    94. borderWidth: '2px',
    95. rules: [{
    96. backgroundColor: '#081D58',
    97. fontColor: '#05636c',
    98. rule: '%node-value > 6',
    99. },
    100. {
    101. backgroundColor: '#253494',
    102. fontColor: '#05636c',
    103. rule: '%node-value > 4 && %node-value <= 5',
    104. },
    105. {
    106. backgroundColor: '#225EA8',
    107. fontColor: '#05636c',
    108. rule: '%node-value > 3 && %node-value <= 4',
    109. },
    110. {
    111. backgroundColor: '#1D91C0',
    112. fontColor: '#05636c',
    113. rule: '%node-value > 2 && %node-value <= 3',
    114. },
    115. {
    116. backgroundColor: '#41B6C4',
    117. fontColor: '#05636c',
    118. rule: '%node-value > 1 && %node-value <= 2',
    119. },
    120. {
    121. backgroundColor: '#7FCDBB',
    122. fontColor: '#05636c',
    123. rule: '%node-value > 0 && %node-value <= 1',
    124. },
    125. ],
    126. },
    127. plotarea: {
    128. margin: 'dynamic',
    129. },
    130. scaleX: {
    131. values: [
    132. '2a',
    133. '3a',
    134. '4a',
    135. '5a',
    136. '6a',
    137. '7a',
    138. '8a',
    139. '9a',
    140. '10a',
    141. '11a',
    142. '12a',
    143. '1p',
    144. '2p',
    145. '3p',
    146. '4p',
    147. '5p',
    148. '6p',
    149. '7p',
    150. '8p',
    151. '9p',
    152. '10p',
    153. '11p',
    154. ],
    155. guide: {
    156. visible: false,
    157. },
    158. item: {
    159. borderColor: 'none',
    160. fontColor: '#05636c',
    161. size: '13px',
    162. },
    163. lineWidth: '0px',
    164. placement: 'opposite',
    165. tick: {
    166. visible: false,
    167. },
    168. zooming: true,
    169. zoomSnap: true,
    170. },
    171. scaleY: {
    172. values: ['Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su'],
    173. guide: {
    174. visible: false,
    175. },
    176. item: {
    177. borderColor: 'none',
    178. fontColor: '#05636c',
    179. size: '13px',
    180. },
    181. lineWidth: '0px',
    182. mirrored: true,
    183. tick: {
    184. visible: false,
    185. },
    186. zooming: true,
    187. },
    188. zoom: {
    189. alpha: 0.75,
    190. backgroundColor: '#e5e8ea',
    191. borderColor: '#009',
    192. borderWidth: '2px',
    193. preserveZoom: true,
    194. },
    195. scrollX: {
    196. bar: {
    197. alpha: 0.5,
    198. backgroundColor: '#01579B',
    199. borderRadius: '3px',
    200. },
    201. handle: {
    202. backgroundColor: '#01579B',
    203. borderRadius: '5px',
    204. borderTop: 'none',
    205. borderRight: 'none',
    206. borderBottom: 'none',
    207. borderLeft: 'none',
    208. },
    209. },
    210. scrollY: {
    211. bar: {
    212. alpha: 0.5,
    213. backgroundColor: '#01579B',
    214. borderRadius: '3px',
    215. },
    216. handle: {
    217. backgroundColor: '#01579B',
    218. borderRadius: '5px',
    219. borderTop: 'none',
    220. borderRight: 'none',
    221. borderBottom: 'none',
    222. borderLeft: 'none',
    223. },
    224. },
    225. series: [{
    226. text: '2-3 Ft',
    227. values: [
    228. 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 1, 2,
    229. ],
    230. legendMarker: {
    231. backgroundColor: '#7FCDBB',
    232. },
    233. },
    234. {
    235. text: '3-4 Ft',
    236. values: [
    237. 2, 2, 2, 2, 2, 2, 3, 3, 3, 2, 2, 3, 3, 3, 3, 2, 2, 2, 2, 1, 2, 3,
    238. ],
    239. legendMarker: {
    240. backgroundColor: '#41B6C4',
    241. },
    242. },
    243. {
    244. text: '4-5 Ft',
    245. values: [
    246. 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 2,
    247. ],
    248. legendMarker: {
    249. backgroundColor: '#1D91C0',
    250. },
    251. },
    252. {
    253. text: '5-6 Ft',
    254. values: [
    255. 2, 3, 3, 2, 3, 3, 3, 4, 5, 4, 4, 5, 4, 4, 5, 4, 4, 3, 3, 3, 3, 3,
    256. ],
    257. legendMarker: {
    258. backgroundColor: '#225EA8',
    259. },
    260. },
    261. {
    262. text: '6-7 Ft',
    263. values: [
    264. 3, 2, 3, 2, 3, 3, 4, 4, 4, 5, 5, 5, 5, 4, 4, 5, 4, 3, 2, 3, 4, 4,
    265. ],
    266. legendMarker: {
    267. backgroundColor: '#253494',
    268. },
    269. },
    270. {
    271. text: '7-8 Ft',
    272. values: [
    273. 2, 3, 5, 6, 5, 6, 5, 6, 5, 6, 6, 6, 6, 5, 6, 5, 6, 4, 5, 4, 4, 4,
    274. ],
    275. legendMarker: {
    276. backgroundColor: '#081D58',
    277. },
    278. },
    279. {
    280. text: '1-2 Ft',
    281. values: [
    282. 3, 2, 3, 2, 3, 3, 4, 4, 4, 5, 5, 5, 5, 4, 4, 5, 4, 3, 2, 3, 4, 4,
    283. ],
    284. legendMarker: {
    285. backgroundColor: '#fff',
    286. },
    287. legendItem: {
    288. visible: false,
    289. },
    290. },
    291. ],
    292. }, ],
    293. };
    294.  
    295. // RENDER CHARTS
    296. // -----------------------------
    297. zingchart.render({
    298. id: 'myChart',
    299. data: chartConfig,
    300. });
    301. </script>
    302. </body>
    303.  
    304. </html>
    1. <!doctype html>
    2. <html class="zc-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 class="zc-body">
    11.  
    12. <div id="myChart" class="chart--container">
    13. <a href="https://www.zingchart.com/" rel="noopener" class="zc-ref">Powered by ZingChart</a>
    14. </div>
    15.  
    16. </body>
    17.  
    18. </html>
    1. @import url('https://fonts.googleapis.com/css?family=Roboto&display=swap');
    2.  
    3. .chart--container {
    4. height: 100%;
    5. width: 100%;
    6. min-height: 530px;
    7. }
    8.  
    9. .zc-ref {
    10. display: none;
    11. }
    1. // CHART CONFIG
    2. // -----------------------------
    3. let chartConfig = {
    4. globals: {
    5. fontFamily: 'Roboto',
    6. },
    7. graphset: [{
    8. type: 'piano',
    9. theme: 'classic',
    10. backgroundColor: '#fff',
    11. title: {
    12. text: 'Surf Height',
    13. adjustLayout: true,
    14. paddingBottom: '25px',
    15. backgroundColor: 'none',
    16. fontColor: '#05636c',
    17. fontSize: '24px',
    18. },
    19. subtitle: {
    20. text: "Black's Beach - La Jolla",
    21. backgroundColor: 'none',
    22. fontColor: '#05636c',
    23. fontSize: '14px',
    24. height: '25px',
    25. x: '-9.5px',
    26. y: '38.5px',
    27. },
    28. legend: {
    29. align: 'center',
    30. borderWidth: '0px',
    31. footer: {
    32. backgroundColor: 'none',
    33. borderColor: 'none',
    34. fontColor: '#05636c',
    35. fontSize: '14px',
    36. textAlign: 'center',
    37. },
    38. item: {
    39. borderColor: 'none',
    40. fontColor: '#05636c',
    41. size: '13px',
    42. },
    43. layout: 'x6',
    44. marker: {
    45. type: 'square',
    46. borderColor: 'none',
    47. borderRadius: '8px',
    48. size: '13px',
    49. },
    50. shadow: false,
    51. toggleAction: 'none',
    52. verticalAlign: 'bottom',
    53. width: '80%',
    54. },
    55. plot: {
    56. tooltip: {
    57. text: ' The surf will be about %v feet.',
    58. fontColor: 'white',
    59. fontSize: '14px',
    60. textAlign: 'left',
    61. },
    62. aspect: 'none',
    63. borderColor: '#eeeeee',
    64. borderRadius: '7px',
    65. borderWidth: '2px',
    66. rules: [{
    67. backgroundColor: '#081D58',
    68. fontColor: '#05636c',
    69. rule: '%node-value > 6',
    70. },
    71. {
    72. backgroundColor: '#253494',
    73. fontColor: '#05636c',
    74. rule: '%node-value > 4 && %node-value <= 5',
    75. },
    76. {
    77. backgroundColor: '#225EA8',
    78. fontColor: '#05636c',
    79. rule: '%node-value > 3 && %node-value <= 4',
    80. },
    81. {
    82. backgroundColor: '#1D91C0',
    83. fontColor: '#05636c',
    84. rule: '%node-value > 2 && %node-value <= 3',
    85. },
    86. {
    87. backgroundColor: '#41B6C4',
    88. fontColor: '#05636c',
    89. rule: '%node-value > 1 && %node-value <= 2',
    90. },
    91. {
    92. backgroundColor: '#7FCDBB',
    93. fontColor: '#05636c',
    94. rule: '%node-value > 0 && %node-value <= 1',
    95. },
    96. ],
    97. },
    98. plotarea: {
    99. margin: 'dynamic',
    100. },
    101. scaleX: {
    102. values: [
    103. '2a',
    104. '3a',
    105. '4a',
    106. '5a',
    107. '6a',
    108. '7a',
    109. '8a',
    110. '9a',
    111. '10a',
    112. '11a',
    113. '12a',
    114. '1p',
    115. '2p',
    116. '3p',
    117. '4p',
    118. '5p',
    119. '6p',
    120. '7p',
    121. '8p',
    122. '9p',
    123. '10p',
    124. '11p',
    125. ],
    126. guide: {
    127. visible: false,
    128. },
    129. item: {
    130. borderColor: 'none',
    131. fontColor: '#05636c',
    132. size: '13px',
    133. },
    134. lineWidth: '0px',
    135. placement: 'opposite',
    136. tick: {
    137. visible: false,
    138. },
    139. zooming: true,
    140. zoomSnap: true,
    141. },
    142. scaleY: {
    143. values: ['Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su'],
    144. guide: {
    145. visible: false,
    146. },
    147. item: {
    148. borderColor: 'none',
    149. fontColor: '#05636c',
    150. size: '13px',
    151. },
    152. lineWidth: '0px',
    153. mirrored: true,
    154. tick: {
    155. visible: false,
    156. },
    157. zooming: true,
    158. },
    159. zoom: {
    160. alpha: 0.75,
    161. backgroundColor: '#e5e8ea',
    162. borderColor: '#009',
    163. borderWidth: '2px',
    164. preserveZoom: true,
    165. },
    166. scrollX: {
    167. bar: {
    168. alpha: 0.5,
    169. backgroundColor: '#01579B',
    170. borderRadius: '3px',
    171. },
    172. handle: {
    173. backgroundColor: '#01579B',
    174. borderRadius: '5px',
    175. borderTop: 'none',
    176. borderRight: 'none',
    177. borderBottom: 'none',
    178. borderLeft: 'none',
    179. },
    180. },
    181. scrollY: {
    182. bar: {
    183. alpha: 0.5,
    184. backgroundColor: '#01579B',
    185. borderRadius: '3px',
    186. },
    187. handle: {
    188. backgroundColor: '#01579B',
    189. borderRadius: '5px',
    190. borderTop: 'none',
    191. borderRight: 'none',
    192. borderBottom: 'none',
    193. borderLeft: 'none',
    194. },
    195. },
    196. series: [{
    197. text: '2-3 Ft',
    198. values: [
    199. 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 1, 2,
    200. ],
    201. legendMarker: {
    202. backgroundColor: '#7FCDBB',
    203. },
    204. },
    205. {
    206. text: '3-4 Ft',
    207. values: [
    208. 2, 2, 2, 2, 2, 2, 3, 3, 3, 2, 2, 3, 3, 3, 3, 2, 2, 2, 2, 1, 2, 3,
    209. ],
    210. legendMarker: {
    211. backgroundColor: '#41B6C4',
    212. },
    213. },
    214. {
    215. text: '4-5 Ft',
    216. values: [
    217. 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 2,
    218. ],
    219. legendMarker: {
    220. backgroundColor: '#1D91C0',
    221. },
    222. },
    223. {
    224. text: '5-6 Ft',
    225. values: [
    226. 2, 3, 3, 2, 3, 3, 3, 4, 5, 4, 4, 5, 4, 4, 5, 4, 4, 3, 3, 3, 3, 3,
    227. ],
    228. legendMarker: {
    229. backgroundColor: '#225EA8',
    230. },
    231. },
    232. {
    233. text: '6-7 Ft',
    234. values: [
    235. 3, 2, 3, 2, 3, 3, 4, 4, 4, 5, 5, 5, 5, 4, 4, 5, 4, 3, 2, 3, 4, 4,
    236. ],
    237. legendMarker: {
    238. backgroundColor: '#253494',
    239. },
    240. },
    241. {
    242. text: '7-8 Ft',
    243. values: [
    244. 2, 3, 5, 6, 5, 6, 5, 6, 5, 6, 6, 6, 6, 5, 6, 5, 6, 4, 5, 4, 4, 4,
    245. ],
    246. legendMarker: {
    247. backgroundColor: '#081D58',
    248. },
    249. },
    250. {
    251. text: '1-2 Ft',
    252. values: [
    253. 3, 2, 3, 2, 3, 3, 4, 4, 4, 5, 5, 5, 5, 4, 4, 5, 4, 3, 2, 3, 4, 4,
    254. ],
    255. legendMarker: {
    256. backgroundColor: '#fff',
    257. },
    258. legendItem: {
    259. visible: false,
    260. },
    261. },
    262. ],
    263. }, ],
    264. };
    265.  
    266. // RENDER CHARTS
    267. // -----------------------------
    268. zingchart.render({
    269. id: 'myChart',
    270. data: chartConfig,
    271. });