• Edit
  • Download
  • <!DOCTYPE html>
    <html>
    
    <head>
      <meta charset="utf-8">
      <title>ZingSoft Demo</title>
    
      <script nonce="undefined" src="https://cdn.zingchart.com/zingchart.min.js"></script>
      <style></style>
    </head>
    
    <body>
      <div id='myChart'></div>
      <script>
        ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
        var myConfig = {
          layout: "h",
          graphset: [{ //this is your reference graph
              type: "bar",
              width: "17%",
              x: 0,
              y: 0,
              plotarea: {
                marginRight: 0
                /* If you reduce the margin on the right so the graph
                 * is closer to the one on the right you will have
                 * to adjust other graph properties like width & x */
              },
              scaleY: {
                label: {
                  text: "can have label here"
                },
                values: "0:90:10" //min:max:step
              },
              scaleX: {
                visible: false
              },
              title: {
                text: "Ref",
                textAlign: "right",
                position: "right"
              },
              series: [{
                values: [75]
              }]
            },
            {
              type: "bar",
              width: "85%",
              x: "17%",
              y: 0,
              marginLeft: "0px",
              scaleY: {
                label: {
                  text: "or here"
                },
                guide: {
                  visible: false
                },
                item: {
                  visible: false
                },
                tick: {
                  visible: false
                }
              },
              scaleX: {
                label: {
                  text: "x-axis label"
                }
              },
              title: {
                text: "This is your real graph"
              },
              series: [{
                values: [35, 42, 67, 89, 25, 34, 67, 25]
              }]
            },
          ]
    
        };
    
        zingchart.render({
          id: 'myChart',
          data: myConfig,
          height: 400,
          width: 700
        });
      </script>
    </body>
    
    </html>
    <!DOCTYPE html>
    <html>
    
    <head>
      <meta charset="utf-8">
      <title>ZingSoft Demo</title>
    
      <script src="https://cdn.zingchart.com/zingchart.min.js"></script>
    </head>
    
    <body>
      <div id='myChart'></div>
    </body>
    
    </html>
    
          
    var myConfig = {
      layout: "h",
      graphset: [{ //this is your reference graph
          type: "bar",
          width: "17%",
          x: 0,
          y: 0,
          plotarea: {
            marginRight: 0
            /* If you reduce the margin on the right so the graph
             * is closer to the one on the right you will have
             * to adjust other graph properties like width & x */
          },
          scaleY: {
            label: {
              text: "can have label here"
            },
            values: "0:90:10" //min:max:step
          },
          scaleX: {
            visible: false
          },
          title: {
            text: "Ref",
            textAlign: "right",
            position: "right"
          },
          series: [{
            values: [75]
          }]
        },
        {
          type: "bar",
          width: "85%",
          x: "17%",
          y: 0,
          marginLeft: "0px",
          scaleY: {
            label: {
              text: "or here"
            },
            guide: {
              visible: false
            },
            item: {
              visible: false
            },
            tick: {
              visible: false
            }
          },
          scaleX: {
            label: {
              text: "x-axis label"
            }
          },
          title: {
            text: "This is your real graph"
          },
          series: [{
            values: [35, 42, 67, 89, 25, 34, 67, 25]
          }]
        },
      ]
    
    };
    
    zingchart.render({
      id: 'myChart',
      data: myConfig,
      height: 400,
      width: 700
    });