• 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. title: {
    19. text: 'Zooming Labels',
    20. fontFamily: 'Georgia'
    21. },
    22. zoom: {
    23. label: { //Zooming Labels
    24. visible: true,
    25. fontColor: '#333399',
    26. fontFamily: 'Georgia',
    27. fontSize: 10,
    28. fontStyle: 'normal', //'italic' or 'normal'
    29. fontWeight: 'normal', //bold' or 'normal'
    30. backgroundColor: '#e6f7ff',
    31. borderWidth: 1,
    32. borderColor: '#66ccff',
    33. alpha: 0.7,
    34. padding: '5%',
    35.  
    36. mediaRules: [{
    37. maxWidth: 400,
    38. backgroundColor: 'red',
    39. fontColor: 'white'
    40. }]
    41. },
    42. },
    43. scaleX: {
    44. zooming: true,
    45. item: {
    46. fontSize: 10
    47. }
    48. },
    49. scaleY: {
    50. zooming: true,
    51. values: '50:350:50',
    52. guide: {
    53. lineStyle: 'dotted'
    54. },
    55. item: {
    56. fontSize: 10
    57. }
    58. },
    59. plot: {
    60. aspect: 'spline',
    61. lineWidth: 1,
    62. lineColor: '#333399',
    63. marker: {
    64. size: 3,
    65. backgroundColor: '#9999ff #66ccff',
    66. borderWidth: 1,
    67. borderColor: '#333399'
    68. }
    69. },
    70. series: [{
    71. values: [
    72. 138.2, 196.3, 153.6, 127.4, 114.1, 181.4, 131.1, 170.9, 154.4, 105.2,
    73. 136.3, 180.4, 150.5, 135.3, 130.5, 164.3, 110.5, 127.2, 183.9, 191.3,
    74. 184.8, 165.7, 102.4, 196.2, 179.1, 116.8, 175.2, 137.8, 100.9, 177.3,
    75. 122.5, 123.1, 131.7, 109.4, 167.2, 142.7, 140.7, 165.5, 148.6, 181.2,
    76. 108.7, 132.9, 161.9, 192.1, 134.5, 149.4, 183.9, 124.4, 114.4, 121.7,
    77. 249.6, 224.3, 199.3, 151.4, 112.4, 213.5, 265.3, 239.5, 294.6, 284.4,
    78. 279.2, 273.7, 233.7, 290.1, 228.2, 269.3, 208.4, 224.6, 235.1, 222.5,
    79. 225.7, 257.2, 238.1, 262.5, 229.6, 269.7, 283.9, 236.2, 260.8, 255.2,
    80. 258.1, 219.5, 292.4, 264.8, 251.7, 225.9, 206.5, 203.3, 258.2, 200.7,
    81. 237.2, 208.1, 262.7, 292.8, 249.2, 242.6, 284.4, 246.7, 275.9, 274.5,
    82. 234.2
    83. ]
    84. }]
    85. };
    86.  
    87. zingchart.render({
    88. id: 'myChart',
    89. data: chartConfig,
    90. height: 400,
    91. width: '100%'
    92. });
    93. </script>
    94. </body>
    95.  
    96. </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. title: {
    4. text: 'Zooming Labels',
    5. fontFamily: 'Georgia'
    6. },
    7. zoom: {
    8. label: { //Zooming Labels
    9. visible: true,
    10. fontColor: '#333399',
    11. fontFamily: 'Georgia',
    12. fontSize: 10,
    13. fontStyle: 'normal', //'italic' or 'normal'
    14. fontWeight: 'normal', //bold' or 'normal'
    15. backgroundColor: '#e6f7ff',
    16. borderWidth: 1,
    17. borderColor: '#66ccff',
    18. alpha: 0.7,
    19. padding: '5%',
    20.  
    21. mediaRules: [{
    22. maxWidth: 400,
    23. backgroundColor: 'red',
    24. fontColor: 'white'
    25. }]
    26. },
    27. },
    28. scaleX: {
    29. zooming: true,
    30. item: {
    31. fontSize: 10
    32. }
    33. },
    34. scaleY: {
    35. zooming: true,
    36. values: '50:350:50',
    37. guide: {
    38. lineStyle: 'dotted'
    39. },
    40. item: {
    41. fontSize: 10
    42. }
    43. },
    44. plot: {
    45. aspect: 'spline',
    46. lineWidth: 1,
    47. lineColor: '#333399',
    48. marker: {
    49. size: 3,
    50. backgroundColor: '#9999ff #66ccff',
    51. borderWidth: 1,
    52. borderColor: '#333399'
    53. }
    54. },
    55. series: [{
    56. values: [
    57. 138.2, 196.3, 153.6, 127.4, 114.1, 181.4, 131.1, 170.9, 154.4, 105.2,
    58. 136.3, 180.4, 150.5, 135.3, 130.5, 164.3, 110.5, 127.2, 183.9, 191.3,
    59. 184.8, 165.7, 102.4, 196.2, 179.1, 116.8, 175.2, 137.8, 100.9, 177.3,
    60. 122.5, 123.1, 131.7, 109.4, 167.2, 142.7, 140.7, 165.5, 148.6, 181.2,
    61. 108.7, 132.9, 161.9, 192.1, 134.5, 149.4, 183.9, 124.4, 114.4, 121.7,
    62. 249.6, 224.3, 199.3, 151.4, 112.4, 213.5, 265.3, 239.5, 294.6, 284.4,
    63. 279.2, 273.7, 233.7, 290.1, 228.2, 269.3, 208.4, 224.6, 235.1, 222.5,
    64. 225.7, 257.2, 238.1, 262.5, 229.6, 269.7, 283.9, 236.2, 260.8, 255.2,
    65. 258.1, 219.5, 292.4, 264.8, 251.7, 225.9, 206.5, 203.3, 258.2, 200.7,
    66. 237.2, 208.1, 262.7, 292.8, 249.2, 242.6, 284.4, 246.7, 275.9, 274.5,
    67. 234.2
    68. ]
    69. }]
    70. };
    71.  
    72. zingchart.render({
    73. id: 'myChart',
    74. data: chartConfig,
    75. height: 400,
    76. width: '100%'
    77. });