• 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"]; /*Sets whether monotone interpolation is used for charts using the "spline" aspect. When monotone is set to true the curve of a spline chart is reduced. This allows for more accuracy when ploting lines which are near 0.*/
    16.  
    17. var myConfig = {
    18. type: "line",
    19. plot: {
    20. aspect: "spline",
    21. //monotone:true
    22. //set monotone in series:[{},{}] to better show the difference between the true false values.
    23. },
    24. legend: {
    25. adjustLayout: true,
    26. align: "right",
    27. verticalAlign: "middle"
    28. },
    29. scaleY: {
    30. refLine: {
    31. lineColor: "red"
    32. }
    33. },
    34. series: [{
    35. values: [100, 0, 25, -1, 25, 0, 100],
    36. monotone: true,
    37. text: "monotone: true" //can also be set in plot:{} to apply to all lines in a chart
    38. },
    39. {
    40. values: [100, 0, 25, -1, 25, 0, 100],
    41. monotone: false,
    42. text: "monotone: false" //can also be set in plot:{} to apply to all lines in a chart
    43. }
    44. ]
    45. }
    46.  
    47. zingchart.render({
    48. id: 'myChart',
    49. data: myConfig,
    50. height: 400,
    51. width: '100%'
    52. });
    53. </script>
    54. </body>
    55.  
    56. </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. /*Sets whether monotone interpolation is used for charts using the "spline" aspect. When monotone is set to true the curve of a spline chart is reduced. This allows for more accuracy when ploting lines which are near 0.*/
    2.  
    3. var myConfig = {
    4. type: "line",
    5. plot: {
    6. aspect: "spline",
    7. //monotone:true
    8. //set monotone in series:[{},{}] to better show the difference between the true false values.
    9. },
    10. legend: {
    11. adjustLayout: true,
    12. align: "right",
    13. verticalAlign: "middle"
    14. },
    15. scaleY: {
    16. refLine: {
    17. lineColor: "red"
    18. }
    19. },
    20. series: [{
    21. values: [100, 0, 25, -1, 25, 0, 100],
    22. monotone: true,
    23. text: "monotone: true" //can also be set in plot:{} to apply to all lines in a chart
    24. },
    25. {
    26. values: [100, 0, 25, -1, 25, 0, 100],
    27. monotone: false,
    28. text: "monotone: false" //can also be set in plot:{} to apply to all lines in a chart
    29. }
    30. ]
    31. }
    32.  
    33. zingchart.render({
    34. id: 'myChart',
    35. data: myConfig,
    36. height: 400,
    37. width: '100%'
    38. });