• 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. let chartConfig = {
    17. type: 'line',
    18. crosshairX: {
    19. plotLabel: {
    20. multiple: true,
    21. borderRadius: 3,
    22. fontFamily: 'Georgia',
    23. padding: '5 10'
    24. }
    25. },
    26. series: [{
    27. values: [22, 34, 55, 71, 5, 19, 50, 95],
    28. lineColor: '#00BCD4',
    29. marker: {
    30. backgroundColor: '#00BCD4'
    31. },
    32.  
    33. guideLabel: {
    34. text: 'Alpha: %v',
    35. backgroundColor: '#E0F7FA',
    36. borderColor: '#006064',
    37. fontColor: '#006064',
    38. lineStyle: 'dotted',
    39. mediaRules: [{
    40. maxWidth: 400,
    41. backgroundColor: 'red',
    42. }]
    43. }
    44. },
    45. {
    46. values: [35, 42, 67, 89, 25, 34, 67, 85],
    47. lineColor: '#8BC34A',
    48. marker: {
    49. backgroundColor: '#8BC34A'
    50. },
    51.  
    52. guideLabel: {
    53. text: 'Beta: %v',
    54. backgroundColor: '#F1F8E9',
    55. borderColor: '#33691E',
    56. fontColor: '#33691E',
    57. lineStyle: 'dashed',
    58. mediaRules: [{
    59. maxWidth: 400,
    60. backgroundColor: 'red',
    61. }]
    62. }
    63. },
    64. {
    65. values: [50, 21, 45, 75, 60, 59, 37, 64],
    66. lineColor: '#FFC107',
    67. marker: {
    68. backgroundColor: '#FFC107'
    69. },
    70.  
    71. guideLabel: {
    72. text: 'Gamma: %v',
    73. backgroundColor: '#FFF8E1',
    74. borderColor: '#FF6F00',
    75. fontColor: '#FF6F00',
    76. lineStyle: 'dashdot',
    77. mediaRules: [{
    78. maxWidth: 400,
    79. backgroundColor: 'red',
    80. }]
    81. }
    82. }
    83. ],
    84.  
    85. plot: {
    86. aspect: 'spline',
    87. tooltip: {
    88. visible: false
    89. }
    90. }
    91. };
    92.  
    93. zingchart.render({
    94. id: 'myChart',
    95. data: chartConfig,
    96. height: 400,
    97. width: '100%'
    98. });
    99. </script>
    100. </body>
    101.  
    102. </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. let chartConfig = {
    2. type: 'line',
    3. crosshairX: {
    4. plotLabel: {
    5. multiple: true,
    6. borderRadius: 3,
    7. fontFamily: 'Georgia',
    8. padding: '5 10'
    9. }
    10. },
    11. series: [{
    12. values: [22, 34, 55, 71, 5, 19, 50, 95],
    13. lineColor: '#00BCD4',
    14. marker: {
    15. backgroundColor: '#00BCD4'
    16. },
    17.  
    18. guideLabel: {
    19. text: 'Alpha: %v',
    20. backgroundColor: '#E0F7FA',
    21. borderColor: '#006064',
    22. fontColor: '#006064',
    23. lineStyle: 'dotted',
    24. mediaRules: [{
    25. maxWidth: 400,
    26. backgroundColor: 'red',
    27. }]
    28. }
    29. },
    30. {
    31. values: [35, 42, 67, 89, 25, 34, 67, 85],
    32. lineColor: '#8BC34A',
    33. marker: {
    34. backgroundColor: '#8BC34A'
    35. },
    36.  
    37. guideLabel: {
    38. text: 'Beta: %v',
    39. backgroundColor: '#F1F8E9',
    40. borderColor: '#33691E',
    41. fontColor: '#33691E',
    42. lineStyle: 'dashed',
    43. mediaRules: [{
    44. maxWidth: 400,
    45. backgroundColor: 'red',
    46. }]
    47. }
    48. },
    49. {
    50. values: [50, 21, 45, 75, 60, 59, 37, 64],
    51. lineColor: '#FFC107',
    52. marker: {
    53. backgroundColor: '#FFC107'
    54. },
    55.  
    56. guideLabel: {
    57. text: 'Gamma: %v',
    58. backgroundColor: '#FFF8E1',
    59. borderColor: '#FF6F00',
    60. fontColor: '#FF6F00',
    61. lineStyle: 'dashdot',
    62. mediaRules: [{
    63. maxWidth: 400,
    64. backgroundColor: 'red',
    65. }]
    66. }
    67. }
    68. ],
    69.  
    70. plot: {
    71. aspect: 'spline',
    72. tooltip: {
    73. visible: false
    74. }
    75. }
    76. };
    77.  
    78. zingchart.render({
    79. id: 'myChart',
    80. data: chartConfig,
    81. height: 400,
    82. width: '100%'
    83. });