• 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></style>
    10. </head>
    11.  
    12. <body>
    13. <div id='myChart'></div>
    14. <script>
    15. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    16. var myConfig = {
    17. type: 'area',
    18. title: {
    19. text: 'Fixed Crosshairs',
    20. fontFamily: 'Georgia'
    21. },
    22. crosshairX: {
    23. plotLabel: {
    24. text: 'Stock price was<br>$%v<br>at %kv.',
    25. decimals: 2,
    26. transform: {
    27. type: 'date',
    28. all: '%g:%i %a'
    29. },
    30. textAlpha: 1,
    31. textAlign: 'center',
    32. fontFamily: 'Georgia',
    33. fontSize: 12,
    34. fontColor: '#666699',
    35. padding: '10%',
    36. borderRadius: '5px',
    37. callout: true,
    38. placement: 'node-top', //set to 'node-top' to set the crosshairs above the nodes
    39. multiple: true, //set to true to fix the crosshairs
    40. offsetY: -5, //use as needed
    41. backgroundColor: 'white',
    42. alpha: 0.7
    43. },
    44. scaleLabel: {
    45. visible: false
    46. },
    47. marker: {
    48. type: 'circle',
    49. size: 5,
    50. backgroundColor: 'white',
    51. borderColor: '#666699',
    52. borderWidth: 1
    53. },
    54. lineColor: 'white',
    55. lineWidth: 2
    56. },
    57. utc: true,
    58. timezone: -5, //EST time
    59. scaleX: {
    60. offsetStart: 3,
    61. offsetEnd: 3,
    62. minValue: '1457101800000',
    63. maxValue: '1457125200000',
    64. step: '30minute',
    65. transform: {
    66. type: 'date',
    67. all: '%g:%i'
    68. },
    69. label: {
    70. text: 'Trading Day'
    71. },
    72. item: {
    73. fontSize: 10
    74. },
    75. maxItems: 14
    76. },
    77. scaleY: {
    78. values: '30:36:2',
    79. format: '$%v',
    80. label: {
    81. text: 'Price'
    82. },
    83. item: {
    84. fontSize: 10
    85. },
    86. guide: {
    87. lineStyle: 'solid'
    88. }
    89. },
    90. plot: {
    91. tooltip: {
    92. visible: false
    93. },
    94. lineColor: '#666699',
    95. backgroundColor: '#666699',
    96. marker: {
    97. backgroundColor: '#666699'
    98. }
    99. },
    100. series: [{
    101. values: [
    102. [1457101800000, 30.34], //03/04/2016 at 9:30 a.m. EST (which is 14:30 in GMT)
    103. [1457103600000, 31.30], //10:00 a.m.
    104. [1457105400000, 30.95], //10:30 a.m.
    105. [1457107200000, 30.99], //11:00 a.m.
    106. [1457109000000, 32.33], //11:30 a.m.
    107. [1457110800000, 33.34], //12:00 p.m.
    108. [1457112600000, 33.01], //12:30 p.m.
    109. [1457114400000, 34], //1:00 p.m.
    110. [1457116200000, 33.64], //1:30 p.m.
    111. [1457118000000, 32.59], //2:00 p.m.
    112. [1457119800000, 32.60], //2:30 p.m.
    113. [1457121600000, 31.99], //3:00 p.m.
    114. [1457123400000, 31.14], //3:30 p.m.
    115. [1457125200000, 32.34], //at 4:00 p.m. EST (which is 21:00 GMT)
    116. ]
    117. }]
    118. };
    119. zingchart.render({
    120. id: 'myChart',
    121. data: myConfig,
    122. height: 400,
    123. width: '100%'
    124. });
    125. </script>
    126. </body>
    127.  
    128. </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.  
    1. var myConfig = {
    2. type: 'area',
    3. title: {
    4. text: 'Fixed Crosshairs',
    5. fontFamily: 'Georgia'
    6. },
    7. crosshairX: {
    8. plotLabel: {
    9. text: 'Stock price was<br>$%v<br>at %kv.',
    10. decimals: 2,
    11. transform: {
    12. type: 'date',
    13. all: '%g:%i %a'
    14. },
    15. textAlpha: 1,
    16. textAlign: 'center',
    17. fontFamily: 'Georgia',
    18. fontSize: 12,
    19. fontColor: '#666699',
    20. padding: '10%',
    21. borderRadius: '5px',
    22. callout: true,
    23. placement: 'node-top', //set to 'node-top' to set the crosshairs above the nodes
    24. multiple: true, //set to true to fix the crosshairs
    25. offsetY: -5, //use as needed
    26. backgroundColor: 'white',
    27. alpha: 0.7
    28. },
    29. scaleLabel: {
    30. visible: false
    31. },
    32. marker: {
    33. type: 'circle',
    34. size: 5,
    35. backgroundColor: 'white',
    36. borderColor: '#666699',
    37. borderWidth: 1
    38. },
    39. lineColor: 'white',
    40. lineWidth: 2
    41. },
    42. utc: true,
    43. timezone: -5, //EST time
    44. scaleX: {
    45. offsetStart: 3,
    46. offsetEnd: 3,
    47. minValue: '1457101800000',
    48. maxValue: '1457125200000',
    49. step: '30minute',
    50. transform: {
    51. type: 'date',
    52. all: '%g:%i'
    53. },
    54. label: {
    55. text: 'Trading Day'
    56. },
    57. item: {
    58. fontSize: 10
    59. },
    60. maxItems: 14
    61. },
    62. scaleY: {
    63. values: '30:36:2',
    64. format: '$%v',
    65. label: {
    66. text: 'Price'
    67. },
    68. item: {
    69. fontSize: 10
    70. },
    71. guide: {
    72. lineStyle: 'solid'
    73. }
    74. },
    75. plot: {
    76. tooltip: {
    77. visible: false
    78. },
    79. lineColor: '#666699',
    80. backgroundColor: '#666699',
    81. marker: {
    82. backgroundColor: '#666699'
    83. }
    84. },
    85. series: [{
    86. values: [
    87. [1457101800000, 30.34], //03/04/2016 at 9:30 a.m. EST (which is 14:30 in GMT)
    88. [1457103600000, 31.30], //10:00 a.m.
    89. [1457105400000, 30.95], //10:30 a.m.
    90. [1457107200000, 30.99], //11:00 a.m.
    91. [1457109000000, 32.33], //11:30 a.m.
    92. [1457110800000, 33.34], //12:00 p.m.
    93. [1457112600000, 33.01], //12:30 p.m.
    94. [1457114400000, 34], //1:00 p.m.
    95. [1457116200000, 33.64], //1:30 p.m.
    96. [1457118000000, 32.59], //2:00 p.m.
    97. [1457119800000, 32.60], //2:30 p.m.
    98. [1457121600000, 31.99], //3:00 p.m.
    99. [1457123400000, 31.14], //3:30 p.m.
    100. [1457125200000, 32.34], //at 4:00 p.m. EST (which is 21:00 GMT)
    101. ]
    102. }]
    103. };
    104. zingchart.render({
    105. id: 'myChart',
    106. data: myConfig,
    107. height: 400,
    108. width: '100%'
    109. });