• 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: 'area',
    18. legend: {},
    19. series: [{
    20. values: [
    21. [1, 22],
    22. [1.5, 34],
    23. [2, 55],
    24. [2.5, 71],
    25. [3, 42],
    26. [3.5, 39],
    27. [4, 50],
    28. [4.5, 70]
    29. ],
    30. lineColor: '#E91E63',
    31. backgroundColor: '#7986CB',
    32. marker: {
    33. backgroundColor: '#FCE4EC',
    34. borderColor: '#E91E63',
    35. borderWidth: 1,
    36. size: 5,
    37. type: 'star9',
    38. },
    39.  
    40. legendItem: {
    41. fontColor: '#3F51B5',
    42. fontFamily: 'Georgia',
    43. fontSize: 12
    44. },
    45. legendMarker: {
    46. backgroundColor: '#FCE4EC',
    47. borderColor: '#E91E63',
    48. borderWidth: 1,
    49. size: 6,
    50. type: 'star9',
    51. mediaRules: [{
    52. maxWidth: 400,
    53. backgroundColor: 'red',
    54. }]
    55. }
    56. },
    57. {
    58. values: [
    59. [5.5, 35],
    60. [6, 42],
    61. [6.5, 67],
    62. [7, 89],
    63. [7.5, 25],
    64. [8, 34],
    65. [8.5, 67],
    66. [9, 85]
    67. ],
    68. lineColor: '#9C27B0',
    69. backgroundColor: '#64B5F6',
    70. marker: {
    71. backgroundColor: '#F3E5F5',
    72. borderColor: '#9C27B0',
    73. borderWidth: 1,
    74. size: 4,
    75. type: 'gear9',
    76. },
    77.  
    78. legendItem: {
    79. fontColor: '#2196F3',
    80. fontFamily: 'Georgia',
    81. fontSize: 12
    82. },
    83. legendMarker: {
    84. backgroundColor: '#F3E5F5',
    85. borderColor: '#9C27B0',
    86. borderWidth: 1,
    87. size: 5,
    88. type: 'gear9',
    89. mediaRules: [{
    90. maxWidth: 400,
    91. backgroundColor: 'purple',
    92. }]
    93. }
    94. }
    95. ]
    96. };
    97.  
    98. zingchart.render({
    99. id: 'myChart',
    100. data: chartConfig,
    101. height: 400,
    102. width: '100%'
    103. });
    104. </script>
    105. </body>
    106.  
    107. </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: 'area',
    3. legend: {},
    4. series: [{
    5. values: [
    6. [1, 22],
    7. [1.5, 34],
    8. [2, 55],
    9. [2.5, 71],
    10. [3, 42],
    11. [3.5, 39],
    12. [4, 50],
    13. [4.5, 70]
    14. ],
    15. lineColor: '#E91E63',
    16. backgroundColor: '#7986CB',
    17. marker: {
    18. backgroundColor: '#FCE4EC',
    19. borderColor: '#E91E63',
    20. borderWidth: 1,
    21. size: 5,
    22. type: 'star9',
    23. },
    24.  
    25. legendItem: {
    26. fontColor: '#3F51B5',
    27. fontFamily: 'Georgia',
    28. fontSize: 12
    29. },
    30. legendMarker: {
    31. backgroundColor: '#FCE4EC',
    32. borderColor: '#E91E63',
    33. borderWidth: 1,
    34. size: 6,
    35. type: 'star9',
    36. mediaRules: [{
    37. maxWidth: 400,
    38. backgroundColor: 'red',
    39. }]
    40. }
    41. },
    42. {
    43. values: [
    44. [5.5, 35],
    45. [6, 42],
    46. [6.5, 67],
    47. [7, 89],
    48. [7.5, 25],
    49. [8, 34],
    50. [8.5, 67],
    51. [9, 85]
    52. ],
    53. lineColor: '#9C27B0',
    54. backgroundColor: '#64B5F6',
    55. marker: {
    56. backgroundColor: '#F3E5F5',
    57. borderColor: '#9C27B0',
    58. borderWidth: 1,
    59. size: 4,
    60. type: 'gear9',
    61. },
    62.  
    63. legendItem: {
    64. fontColor: '#2196F3',
    65. fontFamily: 'Georgia',
    66. fontSize: 12
    67. },
    68. legendMarker: {
    69. backgroundColor: '#F3E5F5',
    70. borderColor: '#9C27B0',
    71. borderWidth: 1,
    72. size: 5,
    73. type: 'gear9',
    74. mediaRules: [{
    75. maxWidth: 400,
    76. backgroundColor: 'purple',
    77. }]
    78. }
    79. }
    80. ]
    81. };
    82.  
    83. zingchart.render({
    84. id: 'myChart',
    85. data: chartConfig,
    86. height: 400,
    87. width: '100%'
    88. });