• 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": "line",
    18. "title": {
    19. "text": "Logarithmic Scale"
    20. },
    21. "crosshair-x": {
    22. "plot-label": {
    23. "text": "<strong>%t:</strong> %v m/s",
    24. "thousands-separator": ",",
    25. "background-color": "white",
    26. "border-width": 1,
    27. "border-color": "gray",
    28. "border-radius": "5px",
    29. "multiple": true
    30. },
    31. "scale-label": {
    32. "text": "%v seconds",
    33. "font-color": "black",
    34. "background-color": "white",
    35. "border-width": 1,
    36. "border-color": "gray",
    37. "border-radius": "5px",
    38. },
    39. "line-color": "black",
    40. "line-width": 1
    41. },
    42. "scale-x": {
    43. "values": "0:16:2",
    44. "label": {
    45. "text": "Time (s)"
    46. },
    47. "item": {
    48. "font-size": 10
    49. },
    50. "guide": {
    51. "visible": true,
    52. "line-color": "black",
    53. "line-style": "dotted",
    54. "alpha": 1
    55. }
    56. },
    57. "scale-y": {
    58. "progression": "log",
    59. "log-base": 10,
    60. "thousands-separator": ",",
    61. "label": {
    62. "text": "Velocity (m/s)"
    63. },
    64. "item": {
    65. "font-size": 10
    66. },
    67. "guide": {
    68. "line-style": "solid",
    69. "line-width": 2,
    70. "line-color": "gray",
    71. "alpha": 0.9
    72. },
    73. "minor-ticks": 4,
    74. "minor-guide": {
    75. "line-style": "solid",
    76. "line-width": 1,
    77. "line-color": "gray",
    78. "alpha": 0.9
    79. }
    80. },
    81. "plot": {
    82. "aspect": "spline",
    83. "tooltip": {
    84. "visible": false
    85. }
    86. },
    87. "plotarea": {
    88. "margin-left": "dynamic",
    89. "margin-bottom": "dynamic"
    90. },
    91. "series": [{
    92. "values": [
    93. [0, 0],
    94. [2, 5],
    95. [4, 66],
    96. [6, 230],
    97. [8, 590],
    98. [10, 1500],
    99. [12, 9000],
    100. [14, 40000],
    101. [16, 660000]
    102. ],
    103. "text": "Rocket A",
    104. "line-color": "#0066cc",
    105. "marker": {
    106. "type": "square",
    107. "background-color": "#0066cc"
    108. },
    109. "guide-label": {
    110. "font-color": "#0066cc"
    111. }
    112. },
    113. {
    114. "values": [
    115. [0, 0],
    116. [2, 3],
    117. [4, 30],
    118. [6, 200],
    119. [8, 1100],
    120. [10, 5000],
    121. [12, 31000],
    122. [14, 99000],
    123. [16, 350000]
    124. ],
    125. "text": "Rocket B",
    126. "line-color": "#cc0000",
    127. "marker": {
    128. "type": "diamond",
    129. "background-color": "#cc0000"
    130. },
    131. "guide-label": {
    132. "font-color": "#cc0000"
    133. }
    134. },
    135. {
    136. "values": [
    137. [0, 0],
    138. [2, 4],
    139. [4, 14],
    140. [6, 102],
    141. [8, 3200],
    142. [10, 32200],
    143. [12, 111000],
    144. [14, 311000],
    145. [16, 500000]
    146. ],
    147. "text": "Rocket B",
    148. "line-color": "#009933",
    149. "marker": {
    150. "type": "triangle",
    151. "background-color": "#009933"
    152. },
    153. "guide-label": {
    154. "font-color": "#009933"
    155. }
    156. }
    157. ]
    158. };
    159.  
    160. zingchart.render({
    161. id: 'myChart',
    162. data: myConfig,
    163. height: 400,
    164. width: "100%"
    165. });
    166. </script>
    167. </body>
    168.  
    169. </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": "line",
    3. "title": {
    4. "text": "Logarithmic Scale"
    5. },
    6. "crosshair-x": {
    7. "plot-label": {
    8. "text": "<strong>%t:</strong> %v m/s",
    9. "thousands-separator": ",",
    10. "background-color": "white",
    11. "border-width": 1,
    12. "border-color": "gray",
    13. "border-radius": "5px",
    14. "multiple": true
    15. },
    16. "scale-label": {
    17. "text": "%v seconds",
    18. "font-color": "black",
    19. "background-color": "white",
    20. "border-width": 1,
    21. "border-color": "gray",
    22. "border-radius": "5px",
    23. },
    24. "line-color": "black",
    25. "line-width": 1
    26. },
    27. "scale-x": {
    28. "values": "0:16:2",
    29. "label": {
    30. "text": "Time (s)"
    31. },
    32. "item": {
    33. "font-size": 10
    34. },
    35. "guide": {
    36. "visible": true,
    37. "line-color": "black",
    38. "line-style": "dotted",
    39. "alpha": 1
    40. }
    41. },
    42. "scale-y": {
    43. "progression": "log",
    44. "log-base": 10,
    45. "thousands-separator": ",",
    46. "label": {
    47. "text": "Velocity (m/s)"
    48. },
    49. "item": {
    50. "font-size": 10
    51. },
    52. "guide": {
    53. "line-style": "solid",
    54. "line-width": 2,
    55. "line-color": "gray",
    56. "alpha": 0.9
    57. },
    58. "minor-ticks": 4,
    59. "minor-guide": {
    60. "line-style": "solid",
    61. "line-width": 1,
    62. "line-color": "gray",
    63. "alpha": 0.9
    64. }
    65. },
    66. "plot": {
    67. "aspect": "spline",
    68. "tooltip": {
    69. "visible": false
    70. }
    71. },
    72. "plotarea": {
    73. "margin-left": "dynamic",
    74. "margin-bottom": "dynamic"
    75. },
    76. "series": [{
    77. "values": [
    78. [0, 0],
    79. [2, 5],
    80. [4, 66],
    81. [6, 230],
    82. [8, 590],
    83. [10, 1500],
    84. [12, 9000],
    85. [14, 40000],
    86. [16, 660000]
    87. ],
    88. "text": "Rocket A",
    89. "line-color": "#0066cc",
    90. "marker": {
    91. "type": "square",
    92. "background-color": "#0066cc"
    93. },
    94. "guide-label": {
    95. "font-color": "#0066cc"
    96. }
    97. },
    98. {
    99. "values": [
    100. [0, 0],
    101. [2, 3],
    102. [4, 30],
    103. [6, 200],
    104. [8, 1100],
    105. [10, 5000],
    106. [12, 31000],
    107. [14, 99000],
    108. [16, 350000]
    109. ],
    110. "text": "Rocket B",
    111. "line-color": "#cc0000",
    112. "marker": {
    113. "type": "diamond",
    114. "background-color": "#cc0000"
    115. },
    116. "guide-label": {
    117. "font-color": "#cc0000"
    118. }
    119. },
    120. {
    121. "values": [
    122. [0, 0],
    123. [2, 4],
    124. [4, 14],
    125. [6, 102],
    126. [8, 3200],
    127. [10, 32200],
    128. [12, 111000],
    129. [14, 311000],
    130. [16, 500000]
    131. ],
    132. "text": "Rocket B",
    133. "line-color": "#009933",
    134. "marker": {
    135. "type": "triangle",
    136. "background-color": "#009933"
    137. },
    138. "guide-label": {
    139. "font-color": "#009933"
    140. }
    141. }
    142. ]
    143. };
    144.  
    145. zingchart.render({
    146. id: 'myChart',
    147. data: myConfig,
    148. height: 400,
    149. width: "100%"
    150. });