• Edit
  • Download
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingSoft Demo</title>
    7.  
    8. <script nonce="undefined" src="https://cdn.zingchart.com/zingchart.min.js"></script>
    9. <style>
    10. html,
    11. body {
    12. height: 100%;
    13. width: 100%;
    14. margin: 0;
    15. padding: 0;
    16. }
    17.  
    18. #myChart {
    19. height: 100%;
    20. width: 100%;
    21. min-height: 150px;
    22. }
    23. </style>
    24. </head>
    25.  
    26. <body>
    27. <div id='myChart'></div>
    28. <script>
    29. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    30. var myConfig = {
    31. "graphset": [{
    32. "type": "mixed",
    33. "title": {
    34. "text": "Stock & Volume Chart (January)"
    35. },
    36. "scale-y": {
    37. "offset-start": "35%",
    38. "values": "29:33:2",
    39. "format": "$%v",
    40. "label": {
    41. "text": "Prices"
    42. }
    43. },
    44. "scale-y-2": {
    45. "blended": true,
    46. "offset-end": "75%",
    47. "placement": "default",
    48. "values": "0:3:3",
    49. "format": "%vM",
    50. "label": {
    51. "text": "Volume"
    52. }
    53. },
    54. "crosshairX": {
    55. "plotLabel": {
    56. "multiple": true,
    57. "headerText": "Day %kv<br><hr>",
    58. "fontSize": 16
    59. }
    60. },
    61. "arrows": [{
    62. "backgroundColor": "#f90",
    63. "length": 15,
    64. "size": 2,
    65. "alpha": 1,
    66. "offsetY": -30,
    67. "borderWidth": 2,
    68. "borderColor": "#f60",
    69. "border-radius": 5,
    70. "padding": 5,
    71. "to": {
    72. "hook": "node:plot=0, index=12"
    73. },
    74. "label": {
    75. "text": "Some Event Happend",
    76. "offsetY": -55
    77. }
    78. }],
    79. "labels": [{
    80. "hook": "node:plot=2,index=13",
    81. "text": "Highest Sum Volume",
    82. "padding": 10,
    83. "backgroundColor": "#f90",
    84. "borderWidth": 2,
    85. "borderColor": "#f60",
    86. "shadow": true,
    87. "callout": true,
    88. "calloutWidth": 12,
    89. "callout-height": 15,
    90. "border-radius": 5,
    91. "calloutPosition": "bottom",
    92. "offset-y": -35,
    93. "calloutTip": {
    94. "type": "circle",
    95. "background-color": "#fff",
    96. "border-width": 2,
    97. "border-color": "#f60",
    98. "size": 4,
    99. "shadow": true
    100. }
    101. }],
    102. "series": [{
    103. "type": "stock",
    104. "scales": "scale-x,scale-y",
    105. "guideLabel": {
    106. "text": "Open: %open<br>High: %high<br>Low: %low<br>Close: %close"
    107. },
    108. "values": [
    109. [31.34, 31.46, 30.87, 31.06],
    110. [31.8, 32.25, 31.52, 32.05],
    111. [32.05, 32.57, 31.93, 32.3],
    112. [32.21, 32.39, 31.98, 32.08],
    113. [32.32, 32.38, 32.13, 32.37],
    114. [32.52, 32.53, 31.95, 32.03],
    115. [32.07, 32.14, 31.77, 31.98],
    116. [32.26, 32.33, 31.61, 31.86],
    117. [31.65, 31.85, 31.41, 31.78],
    118. [31.86, 31.97, 31.56, 31.58],
    119. [31.51, 31.65, 31.45, 31.59],
    120. [31.84, 31.87, 31.55, 31.85],
    121. [31.83, 32.08, 31.71, 32.04],
    122. [32.3, 32.36, 31.96, 32.28],
    123. [32.43, 32.88, 32.29, 32.48],
    124. [32.72, 32.74, 32.4, 32.6],
    125. [32.39, 32.46, 32.2, 32.38],
    126. [32.47, 32.49, 31.81, 31.84],
    127. [31.84, 32.2, 31.78, 32.08],
    128. [31.88, 32.11, 31.82, 31.89]
    129. ]
    130. },
    131. {
    132. "type": "bar",
    133. "scales": "scale-x,scale-y-2",
    134. "stacked": true,
    135. "text": "volume 1",
    136. "values": [1.3, 1.5, 2.1, 2.2, 1.9, 1.7, 1.8, 1.9, 1.9, 2, 1.4, 2.1, 2.3, 2.6, 2.5, 2.3, 1.5, 2.4, 1.6, 1.4]
    137. },
    138. {
    139. "type": "bar",
    140. "scales": "scale-x,scale-y-2",
    141. "stacked": true,
    142. "text": "volume 2",
    143. "values": [1.3, 1.5, 2.1, 2.2, 1.9, 1.7, 1.8, 1.9, 1.9, 2, 1.4, 2.1, 2.3, 2.6, 2.5, 2.3, 1.5, 2.4, 1.6, 1.4]
    144. }
    145. ]
    146. }]
    147. };
    148.  
    149. zingchart.render({
    150. id: 'myChart',
    151. data: myConfig,
    152. height: '100%',
    153. width: "100%"
    154. });
    155. </script>
    156. </body>
    157.  
    158. </html>
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingSoft Demo</title>
    7.  
    8. <script src="https://cdn.zingchart.com/zingchart.min.js"></script>
    9. </head>
    10.  
    11. <body>
    12. <div id='myChart'></div>
    13. </body>
    14.  
    15. </html>
    1. html,
    2. body {
    3. height: 100%;
    4. width: 100%;
    5. margin: 0;
    6. padding: 0;
    7. }
    8.  
    9. #myChart {
    10. height: 100%;
    11. width: 100%;
    12. min-height: 150px;
    13. }
    1. var myConfig = {
    2. "graphset": [{
    3. "type": "mixed",
    4. "title": {
    5. "text": "Stock & Volume Chart (January)"
    6. },
    7. "scale-y": {
    8. "offset-start": "35%",
    9. "values": "29:33:2",
    10. "format": "$%v",
    11. "label": {
    12. "text": "Prices"
    13. }
    14. },
    15. "scale-y-2": {
    16. "blended": true,
    17. "offset-end": "75%",
    18. "placement": "default",
    19. "values": "0:3:3",
    20. "format": "%vM",
    21. "label": {
    22. "text": "Volume"
    23. }
    24. },
    25. "crosshairX": {
    26. "plotLabel": {
    27. "multiple": true,
    28. "headerText": "Day %kv<br><hr>",
    29. "fontSize": 16
    30. }
    31. },
    32. "arrows": [{
    33. "backgroundColor": "#f90",
    34. "length": 15,
    35. "size": 2,
    36. "alpha": 1,
    37. "offsetY": -30,
    38. "borderWidth": 2,
    39. "borderColor": "#f60",
    40. "border-radius": 5,
    41. "padding": 5,
    42. "to": {
    43. "hook": "node:plot=0, index=12"
    44. },
    45. "label": {
    46. "text": "Some Event Happend",
    47. "offsetY": -55
    48. }
    49. }],
    50. "labels": [{
    51. "hook": "node:plot=2,index=13",
    52. "text": "Highest Sum Volume",
    53. "padding": 10,
    54. "backgroundColor": "#f90",
    55. "borderWidth": 2,
    56. "borderColor": "#f60",
    57. "shadow": true,
    58. "callout": true,
    59. "calloutWidth": 12,
    60. "callout-height": 15,
    61. "border-radius": 5,
    62. "calloutPosition": "bottom",
    63. "offset-y": -35,
    64. "calloutTip": {
    65. "type": "circle",
    66. "background-color": "#fff",
    67. "border-width": 2,
    68. "border-color": "#f60",
    69. "size": 4,
    70. "shadow": true
    71. }
    72. }],
    73. "series": [{
    74. "type": "stock",
    75. "scales": "scale-x,scale-y",
    76. "guideLabel": {
    77. "text": "Open: %open<br>High: %high<br>Low: %low<br>Close: %close"
    78. },
    79. "values": [
    80. [31.34, 31.46, 30.87, 31.06],
    81. [31.8, 32.25, 31.52, 32.05],
    82. [32.05, 32.57, 31.93, 32.3],
    83. [32.21, 32.39, 31.98, 32.08],
    84. [32.32, 32.38, 32.13, 32.37],
    85. [32.52, 32.53, 31.95, 32.03],
    86. [32.07, 32.14, 31.77, 31.98],
    87. [32.26, 32.33, 31.61, 31.86],
    88. [31.65, 31.85, 31.41, 31.78],
    89. [31.86, 31.97, 31.56, 31.58],
    90. [31.51, 31.65, 31.45, 31.59],
    91. [31.84, 31.87, 31.55, 31.85],
    92. [31.83, 32.08, 31.71, 32.04],
    93. [32.3, 32.36, 31.96, 32.28],
    94. [32.43, 32.88, 32.29, 32.48],
    95. [32.72, 32.74, 32.4, 32.6],
    96. [32.39, 32.46, 32.2, 32.38],
    97. [32.47, 32.49, 31.81, 31.84],
    98. [31.84, 32.2, 31.78, 32.08],
    99. [31.88, 32.11, 31.82, 31.89]
    100. ]
    101. },
    102. {
    103. "type": "bar",
    104. "scales": "scale-x,scale-y-2",
    105. "stacked": true,
    106. "text": "volume 1",
    107. "values": [1.3, 1.5, 2.1, 2.2, 1.9, 1.7, 1.8, 1.9, 1.9, 2, 1.4, 2.1, 2.3, 2.6, 2.5, 2.3, 1.5, 2.4, 1.6, 1.4]
    108. },
    109. {
    110. "type": "bar",
    111. "scales": "scale-x,scale-y-2",
    112. "stacked": true,
    113. "text": "volume 2",
    114. "values": [1.3, 1.5, 2.1, 2.2, 1.9, 1.7, 1.8, 1.9, 1.9, 2, 1.4, 2.1, 2.3, 2.6, 2.5, 2.3, 1.5, 2.4, 1.6, 1.4]
    115. }
    116. ]
    117. }]
    118. };
    119.  
    120. zingchart.render({
    121. id: 'myChart',
    122. data: myConfig,
    123. height: '100%',
    124. width: "100%"
    125. });