• 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": "area",
          "title": {
            "text": "Legend Items"
          },
          "subtitle": {
            "text": "legend-item object in plot/series",
            "font-weight": "normal"
          },
          "legend": {
            "layout": "5x1",
            "x": "82%",
            "y": "25%",
          },
          "plot": {
            "aspect": "spline",
            "stacked": true,
            "marker": {
              "visible": false
            },
            "legend-item": {
              "font-family": "Georgia"
            }
          },
          "plotarea": {
            "margin-right": "25%",
          },
          "scale-y": {
            "values": "0:1000:200",
            "guide": {
              "line-style": "dotted"
            }
          },
          "series": [{
              "values": [138.6, 196.3, 153.6, 127.4, 114.1, 181.4, 131.5, 170.9],
              "text": "Test 1",
              "legend-item": {
                "font-color": "#29A2CC",
                "background-color": "#eaf7fb"
              }
            },
            {
              "values": [84.8, 65.8, 122.4, 96.6, 279.1, 56.4, 275.9, 237.8],
              "text": "Test 2",
              "legend-item": {
                "font-color": "#D31E1E",
                "background-color": "#fce9e9"
              }
            },
            {
              "values": [108.7, 132.9, 61.6, 192.1, 134.5, 349.4, 183.9, 224.4],
              "text": "Test 3",
              "legend-item": {
                "font-color": "#7CA82B",
                "background-color": "#f5faeb"
              }
            },
            {
              "values": [213.2, 65.6, 139.5, 194.6, 184.4, 79.2, 73.1, 33.7],
              "text": "Test 4",
              "legend-item": {
                "font-color": "#EF8535",
                "background-color": "#fdf1e7"
              }
            },
            {
              "values": [236.6, 260.8, 155.2, 58.7, 119.1, 192.4, 164.8, 51.4],
              "text": "Test 5",
              "legend-item": {
                "font-color": "#A14BC9",
                "background-color": "#f5ebf9"
              }
            }
          ]
        };
    
        zingchart.render({
          id: 'myChart',
          data: myConfig,
          height: 400,
          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>
    
          
    var myConfig = {
      "type": "area",
      "title": {
        "text": "Legend Items"
      },
      "subtitle": {
        "text": "legend-item object in plot/series",
        "font-weight": "normal"
      },
      "legend": {
        "layout": "5x1",
        "x": "82%",
        "y": "25%",
      },
      "plot": {
        "aspect": "spline",
        "stacked": true,
        "marker": {
          "visible": false
        },
        "legend-item": {
          "font-family": "Georgia"
        }
      },
      "plotarea": {
        "margin-right": "25%",
      },
      "scale-y": {
        "values": "0:1000:200",
        "guide": {
          "line-style": "dotted"
        }
      },
      "series": [{
          "values": [138.6, 196.3, 153.6, 127.4, 114.1, 181.4, 131.5, 170.9],
          "text": "Test 1",
          "legend-item": {
            "font-color": "#29A2CC",
            "background-color": "#eaf7fb"
          }
        },
        {
          "values": [84.8, 65.8, 122.4, 96.6, 279.1, 56.4, 275.9, 237.8],
          "text": "Test 2",
          "legend-item": {
            "font-color": "#D31E1E",
            "background-color": "#fce9e9"
          }
        },
        {
          "values": [108.7, 132.9, 61.6, 192.1, 134.5, 349.4, 183.9, 224.4],
          "text": "Test 3",
          "legend-item": {
            "font-color": "#7CA82B",
            "background-color": "#f5faeb"
          }
        },
        {
          "values": [213.2, 65.6, 139.5, 194.6, 184.4, 79.2, 73.1, 33.7],
          "text": "Test 4",
          "legend-item": {
            "font-color": "#EF8535",
            "background-color": "#fdf1e7"
          }
        },
        {
          "values": [236.6, 260.8, 155.2, 58.7, 119.1, 192.4, 164.8, 51.4],
          "text": "Test 5",
          "legend-item": {
            "font-color": "#A14BC9",
            "background-color": "#f5ebf9"
          }
        }
      ]
    };
    
    zingchart.render({
      id: 'myChart',
      data: myConfig,
      height: 400,
      width: "100%"
    });