• 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>
        html,
        body,
        #myChart {
          height: 100%;
          width: 100%;
        }
      </style>
    </head>
    
    <body>
      <div id='myChart'></div>
      <script>
        ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
        var myConfig16 = {
          "graphset": [{ //Chart 1
              "type": "bullet",
              "height": "100%",
              "width": "33.33%",
              "x": "0%",
              "y": "0%",
              "scale-x": {
                "labels": ["California"],
                "guide": {
                  "visible": false
                },
                "tick": {
                  "visible": false
                }
              },
              "scale-y": {
                "markers": [ //Scale Markers to create multiple ranges on bullet charts.
                  {
                    "type": "area",
                    "range": [0, 7],
                    "background-color": "red"
                  },
                  {
                    "type": "area",
                    "range": [7, 21],
                    "background-color": "orange"
                  },
                  {
                    "type": "area",
                    "range": [21, 30],
                    "background-color": "yellow"
                  },
                ],
                "guide": {
                  "visible": false
                }
              },
              "series": [{
                "values": [20],
                "goals": [23],
                "background-color": "black",
                "bar-width": "80%"
              }]
            },
            { //Chart 2
              "type": "bullet",
              "height": "100%",
              "width": "33.33%",
              "x": "33.33%",
              "y": "0%",
              "scale-x": {
                "labels": ["Oregon"],
                "guide": {
                  "visible": false
                },
                "tick": {
                  "visible": false
                }
              },
              "scale-y": {
                "markers": [{
                    "type": "area",
                    "range": [0, 10],
                    "background-color": "blue",
                    "alpha": 1
                  },
                  {
                    "type": "area",
                    "range": [10, 20],
                    "background-color": "green",
                    "alpha": 1
                  },
                  {
                    "type": "area",
                    "range": [20, 30],
                    "background-color": "orange",
                    "alpha": 1
                  }
                ],
                "guide": {
                  "visible": false
                }
              },
              "scale-y-2": {
                "values": "0:30:10",
                "guide": {
                  "visible": false
                }
              },
              "series": [{
                "values": [9],
                "goals": [21],
                "background-color": "white"
              }]
            },
            { //Chart 3
              "type": "bullet",
              "height": "100%",
              "width": "33.33%",
              "x": "66.66%",
              "y": "0%",
              "scale-x": {
                "labels": ["Washington"],
                "guide": {
                  "visible": false
                },
                "tick": {
                  "visible": false
                }
              },
              "scale-y": {
                "placement": "opposite",
                "markers": [{
                    "type": "area",
                    "range": [0, 13],
                    "background-color": "yellow",
                    "alpha": 1
                  },
                  {
                    "type": "area",
                    "range": [13, 18],
                    "background-color": "purple",
                    "alpha": 1
                  },
                  {
                    "type": "area",
                    "range": [18, 30],
                    "background-color": "green",
                    "alpha": 1
                  }
                ],
                "guide": {
                  "visible": false
                }
              },
              "series": [{
                "values": [15],
                "goals": [25],
                "background-color": "gray",
                "bar-width": "80%"
              }]
            }
          ]
        };
    
        zingchart.render({
          id: 'myChart',
          data: myConfig16,
          height: "100%",
          width: "100%"
        });
      </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>
    html,
    body,
    #myChart {
      height: 100%;
      width: 100%;
    }
    var myConfig16 = {
      "graphset": [{ //Chart 1
          "type": "bullet",
          "height": "100%",
          "width": "33.33%",
          "x": "0%",
          "y": "0%",
          "scale-x": {
            "labels": ["California"],
            "guide": {
              "visible": false
            },
            "tick": {
              "visible": false
            }
          },
          "scale-y": {
            "markers": [ //Scale Markers to create multiple ranges on bullet charts.
              {
                "type": "area",
                "range": [0, 7],
                "background-color": "red"
              },
              {
                "type": "area",
                "range": [7, 21],
                "background-color": "orange"
              },
              {
                "type": "area",
                "range": [21, 30],
                "background-color": "yellow"
              },
            ],
            "guide": {
              "visible": false
            }
          },
          "series": [{
            "values": [20],
            "goals": [23],
            "background-color": "black",
            "bar-width": "80%"
          }]
        },
        { //Chart 2
          "type": "bullet",
          "height": "100%",
          "width": "33.33%",
          "x": "33.33%",
          "y": "0%",
          "scale-x": {
            "labels": ["Oregon"],
            "guide": {
              "visible": false
            },
            "tick": {
              "visible": false
            }
          },
          "scale-y": {
            "markers": [{
                "type": "area",
                "range": [0, 10],
                "background-color": "blue",
                "alpha": 1
              },
              {
                "type": "area",
                "range": [10, 20],
                "background-color": "green",
                "alpha": 1
              },
              {
                "type": "area",
                "range": [20, 30],
                "background-color": "orange",
                "alpha": 1
              }
            ],
            "guide": {
              "visible": false
            }
          },
          "scale-y-2": {
            "values": "0:30:10",
            "guide": {
              "visible": false
            }
          },
          "series": [{
            "values": [9],
            "goals": [21],
            "background-color": "white"
          }]
        },
        { //Chart 3
          "type": "bullet",
          "height": "100%",
          "width": "33.33%",
          "x": "66.66%",
          "y": "0%",
          "scale-x": {
            "labels": ["Washington"],
            "guide": {
              "visible": false
            },
            "tick": {
              "visible": false
            }
          },
          "scale-y": {
            "placement": "opposite",
            "markers": [{
                "type": "area",
                "range": [0, 13],
                "background-color": "yellow",
                "alpha": 1
              },
              {
                "type": "area",
                "range": [13, 18],
                "background-color": "purple",
                "alpha": 1
              },
              {
                "type": "area",
                "range": [18, 30],
                "background-color": "green",
                "alpha": 1
              }
            ],
            "guide": {
              "visible": false
            }
          },
          "series": [{
            "values": [15],
            "goals": [25],
            "background-color": "gray",
            "bar-width": "80%"
          }]
        }
      ]
    };
    
    zingchart.render({
      id: 'myChart',
      data: myConfig16,
      height: "100%",
      width: "100%"
    });