• 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. var myConfig = {
    17. layout: "h",
    18. graphset: [{ //this is your reference graph
    19. type: "bar",
    20. width: "17%",
    21. x: 0,
    22. y: 0,
    23. plotarea: {
    24. marginRight: 0
    25. /* If you reduce the margin on the right so the graph
    26. * is closer to the one on the right you will have
    27. * to adjust other graph properties like width & x */
    28. },
    29. scaleY: {
    30. label: {
    31. text: "can have label here"
    32. },
    33. values: "0:90:10" //min:max:step
    34. },
    35. scaleX: {
    36. visible: false
    37. },
    38. title: {
    39. text: "Ref",
    40. textAlign: "right",
    41. position: "right"
    42. },
    43. series: [{
    44. values: [75]
    45. }]
    46. },
    47. {
    48. type: "bar",
    49. width: "85%",
    50. x: "17%",
    51. y: 0,
    52. marginLeft: "0px",
    53. scaleY: {
    54. label: {
    55. text: "or here"
    56. },
    57. guide: {
    58. visible: false
    59. },
    60. item: {
    61. visible: false
    62. },
    63. tick: {
    64. visible: false
    65. }
    66. },
    67. scaleX: {
    68. label: {
    69. text: "x-axis label"
    70. }
    71. },
    72. title: {
    73. text: "This is your real graph"
    74. },
    75. series: [{
    76. values: [35, 42, 67, 89, 25, 34, 67, 25]
    77. }]
    78. },
    79. ]
    80.  
    81. };
    82.  
    83. zingchart.render({
    84. id: 'myChart',
    85. data: myConfig,
    86. height: 400,
    87. width: 700
    88. });
    89. </script>
    90. </body>
    91.  
    92. </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. var myConfig = {
    2. layout: "h",
    3. graphset: [{ //this is your reference graph
    4. type: "bar",
    5. width: "17%",
    6. x: 0,
    7. y: 0,
    8. plotarea: {
    9. marginRight: 0
    10. /* If you reduce the margin on the right so the graph
    11. * is closer to the one on the right you will have
    12. * to adjust other graph properties like width & x */
    13. },
    14. scaleY: {
    15. label: {
    16. text: "can have label here"
    17. },
    18. values: "0:90:10" //min:max:step
    19. },
    20. scaleX: {
    21. visible: false
    22. },
    23. title: {
    24. text: "Ref",
    25. textAlign: "right",
    26. position: "right"
    27. },
    28. series: [{
    29. values: [75]
    30. }]
    31. },
    32. {
    33. type: "bar",
    34. width: "85%",
    35. x: "17%",
    36. y: 0,
    37. marginLeft: "0px",
    38. scaleY: {
    39. label: {
    40. text: "or here"
    41. },
    42. guide: {
    43. visible: false
    44. },
    45. item: {
    46. visible: false
    47. },
    48. tick: {
    49. visible: false
    50. }
    51. },
    52. scaleX: {
    53. label: {
    54. text: "x-axis label"
    55. }
    56. },
    57. title: {
    58. text: "This is your real graph"
    59. },
    60. series: [{
    61. values: [35, 42, 67, 89, 25, 34, 67, 25]
    62. }]
    63. },
    64. ]
    65.  
    66. };
    67.  
    68. zingchart.render({
    69. id: 'myChart',
    70. data: myConfig,
    71. height: 400,
    72. width: 700
    73. });