• 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 = {
          "type": "pie",
          "title": {
            "text": "Pie Chart with Tooltips"
          },
          "legend": {
            "layout": "2x4",
            "margin-bottom": "5%",
            "border-width": 1,
            "border-radius": "5px",
            "marker": {
              "type": "circle"
            }
          },
          "plotarea": {
            "margin-bottom": "25%"
          },
          "plot": {
            "tooltip": {
              "text": "I spent $%v on %t in 2015. %plot-description",
              "placement": "node:out",
              "offset-r": -50,
              "thousands-separator": ",",
              "wrap-text": true,
              "font-family": "Georgia",
              "font-size": 11,
              "alpha": 0.7,
              "border-radius": "5px",
              "padding": "20%",
              "height": "20%",
              "width": "25%"
            },
            "value-box": {
              "visible": false,
              "placement": "out",
              "font-color": "gray",
              "font-family": "Georgia",
              "font-size": 12,
              "font-weight": "normal"
            }
          },
          "scale": {
            "size-factor": 0.7
          },
          "series": [{
              "values": [15300],
              "offset-r": "15%",
              "text": "Housing",
              "description": "This was below my expected budget of $16,000."
            },
            {
              "values": [6700],
              "text": "Food",
              "description": "This was above my expected budget of $6,000."
            },
            {
              "values": [6400],
              "text": "Transportation",
              "description": "This was above my expected budget of $6,000."
            },
            {
              "values": [6350],
              "text": "Contributions",
              "description": "This was below my expected contribution goal of $7,000."
            },
            {
              "values": [5900],
              "text": "Apparel and Services",
              "description": "This was below my expected budget of $7,000."
            },
            {
              "values": [4600],
              "text": "Entertainment",
              "description": "This is below my expected budget of $5,000."
            },
            {
              "values": [3600],
              "text": "Healthcare",
              "description": "This was above my expected budget of $3,000."
            },
    
            {
              "values": [3400],
              "text": "Other Expenses",
              "description": "This was below my expected budget of $4,500."
            }
          ]
        };
    
        zingchart.render({
          id: 'myChart',
          data: myConfig,
          height: 400,
          width: 600
        });
      </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 = {
      "type": "pie",
      "title": {
        "text": "Pie Chart with Tooltips"
      },
      "legend": {
        "layout": "2x4",
        "margin-bottom": "5%",
        "border-width": 1,
        "border-radius": "5px",
        "marker": {
          "type": "circle"
        }
      },
      "plotarea": {
        "margin-bottom": "25%"
      },
      "plot": {
        "tooltip": {
          "text": "I spent $%v on %t in 2015. %plot-description",
          "placement": "node:out",
          "offset-r": -50,
          "thousands-separator": ",",
          "wrap-text": true,
          "font-family": "Georgia",
          "font-size": 11,
          "alpha": 0.7,
          "border-radius": "5px",
          "padding": "20%",
          "height": "20%",
          "width": "25%"
        },
        "value-box": {
          "visible": false,
          "placement": "out",
          "font-color": "gray",
          "font-family": "Georgia",
          "font-size": 12,
          "font-weight": "normal"
        }
      },
      "scale": {
        "size-factor": 0.7
      },
      "series": [{
          "values": [15300],
          "offset-r": "15%",
          "text": "Housing",
          "description": "This was below my expected budget of $16,000."
        },
        {
          "values": [6700],
          "text": "Food",
          "description": "This was above my expected budget of $6,000."
        },
        {
          "values": [6400],
          "text": "Transportation",
          "description": "This was above my expected budget of $6,000."
        },
        {
          "values": [6350],
          "text": "Contributions",
          "description": "This was below my expected contribution goal of $7,000."
        },
        {
          "values": [5900],
          "text": "Apparel and Services",
          "description": "This was below my expected budget of $7,000."
        },
        {
          "values": [4600],
          "text": "Entertainment",
          "description": "This is below my expected budget of $5,000."
        },
        {
          "values": [3600],
          "text": "Healthcare",
          "description": "This was above my expected budget of $3,000."
        },
    
        {
          "values": [3400],
          "text": "Other Expenses",
          "description": "This was below my expected budget of $4,500."
        }
      ]
    };
    
    zingchart.render({
      id: 'myChart',
      data: myConfig,
      height: 400,
      width: 600
    });