• Edit
  • Download
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingSoft Demo</title>
    7. <link href="https://fonts.googleapis.com/css?family=Inconsolata" rel="stylesheet">
    8.  
    9. <script nonce="undefined" src="https://cdn.zingchart.com/zingchart.min.js"></script>
    10. <style>
    11. html,
    12. body {
    13. height: 100%;
    14. width: 100%;
    15. margin: 0;
    16. padding: 0;
    17. }
    18.  
    19. #myChart {
    20. height: 100%;
    21. width: 100%;
    22. min-height: 150px;
    23. }
    24.  
    25. .zc-ref {
    26. display: none;
    27. }
    28. </style>
    29. </head>
    30.  
    31. <body>
    32. <div id="myChart"><a class="zc-ref" href="https://www.zingchart.com">Powered by ZingChart</a></div>
    33. <script>
    34. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    35. let chartConfig = {
    36. globals: {
    37. tooltip: {
    38. border: '3px solid red',
    39. padding: 15,
    40.  
    41. backgroundColor: '#f90',
    42. borderColor: '#f60',
    43. borderRadius: -5,
    44. borderWidth: 2,
    45. callout: true,
    46. calloutHeight: 30,
    47. calloutPosition: 'bottom',
    48. calloutWidth: 0,
    49. padding: 10,
    50. shadow: true,
    51. calloutTip: {
    52. type: 'circle',
    53. backgroundColor: '#fff',
    54. borderWidth: 2,
    55. borderColor: '#f60',
    56. size: 5,
    57. }
    58. },
    59. },
    60. graphset: [{
    61. type: 'area',
    62. title: {
    63. text: 'Area Chart',
    64. fontSize: 20,
    65. },
    66. legend: {},
    67. crosshairX: {},
    68. scaleX: {},
    69. scaleY: {
    70. guide: {
    71. visible: false
    72. }
    73. },
    74. plot: {
    75. valueBox: {}
    76. },
    77. series: [{
    78. values: [35, 42, 67, 89, 25, 34, 67, 85],
    79. backgroundColor: '#212121'
    80. },
    81. {
    82. values: [25, 59, 30, 16, 51, 99, 31, 39],
    83. backgroundColor: '#616161'
    84. }
    85. ]
    86. }]
    87. };
    88.  
    89. zingchart.render({
    90. id: 'myChart',
    91. data: chartConfig,
    92. height: 400,
    93. width: '100%'
    94. });
    95. </script>
    96. </body>
    97.  
    98. </html>
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingSoft Demo</title>
    7. <link href="https://fonts.googleapis.com/css?family=Inconsolata" rel="stylesheet">
    8.  
    9. <script src="https://cdn.zingchart.com/zingchart.min.js"></script>
    10. </head>
    11.  
    12. <body>
    13. <div id="myChart"><a class="zc-ref" href="https://www.zingchart.com">Powered by ZingChart</a></div>
    14. </body>
    15.  
    16. </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. }
    14.  
    15. .zc-ref {
    16. display: none;
    17. }
    1. let chartConfig = {
    2. globals: {
    3. tooltip: {
    4. border: '3px solid red',
    5. padding: 15,
    6.  
    7. backgroundColor: '#f90',
    8. borderColor: '#f60',
    9. borderRadius: -5,
    10. borderWidth: 2,
    11. callout: true,
    12. calloutHeight: 30,
    13. calloutPosition: 'bottom',
    14. calloutWidth: 0,
    15. padding: 10,
    16. shadow: true,
    17. calloutTip: {
    18. type: 'circle',
    19. backgroundColor: '#fff',
    20. borderWidth: 2,
    21. borderColor: '#f60',
    22. size: 5,
    23. }
    24. },
    25. },
    26. graphset: [{
    27. type: 'area',
    28. title: {
    29. text: 'Area Chart',
    30. fontSize: 20,
    31. },
    32. legend: {},
    33. crosshairX: {},
    34. scaleX: {},
    35. scaleY: {
    36. guide: {
    37. visible: false
    38. }
    39. },
    40. plot: {
    41. valueBox: {}
    42. },
    43. series: [{
    44. values: [35, 42, 67, 89, 25, 34, 67, 85],
    45. backgroundColor: '#212121'
    46. },
    47. {
    48. values: [25, 59, 30, 16, 51, 99, 31, 39],
    49. backgroundColor: '#616161'
    50. }
    51. ]
    52. }]
    53. };
    54.  
    55. zingchart.render({
    56. id: 'myChart',
    57. data: chartConfig,
    58. height: 400,
    59. width: '100%'
    60. });