• Edit
  • Download
  • <!DOCTYPE html>
    <html>
    
    <head>
      <meta charset="utf-8">
      <title>ZingSoft Demo</title>
    
      <script 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": "line",
          "top-layer": "legend", // "guide" (default) or "legend"
          "crosshair-x": {
            "line-width": 2,
            "line-color": "red"
          },
          "legend": { //Legend
            "border-width": 2,
            "border-color": "red",
            "width": "20%",
            "x": "70%",
            "header": {
              "text": "Legend",
            },
            "marker": {
              "type": "circle"
            }
          },
          "title": {
            "text": "Hover the crosshairs beneath the legend to see the change.",
            "font-size": 12,
            "text-align": "left",
            "x": "7%",
            "y": "5%"
          },
          "scale-x": { //X-Axis
            "labels": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
            "item": { //Scale Items (scale values or labels)
              "font-size": 10,
            },
            "tick": { //Tick Marks
    
            },
            "guide": { //Guides
              "visible": true,
              "line-style": "solid", //"solid", "dotted", "dashed", "dashdot"
              "alpha": 1
            }
          },
          "scale-y": { //Y-Axis
            "values": "0:200:50",
            "item": {
              "font-size": 10
            },
            "tick": { //Tick Marks
    
            },
            "guide": { //Guides
              "line-style": "solid", //"solid", "dotted", "dashed", "dashdot"
              "alpha": 1
            }
          },
          "plot": { //Pertaining to Nodes
            "tooltip": { //Tooltips
              "visible": false
            }
          },
          "series": [{
              "values": [30, 34, 59, 31, 64, 65, 81, 85, 101, 75, 159, 164],
              "legend-text": "Series 1 - Blue"
            },
            {
              "values": [64, 16, 29, 40, 35, 88, 49, 77, 121, 164, 112, 100],
              "legend-text": "Series 2 - Red"
            }
          ]
        };
    
        zingchart.render({
          id: 'myChart',
          data: myConfig,
          height: 300,
          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": "line",
      "top-layer": "legend", // "guide" (default) or "legend"
      "crosshair-x": {
        "line-width": 2,
        "line-color": "red"
      },
      "legend": { //Legend
        "border-width": 2,
        "border-color": "red",
        "width": "20%",
        "x": "70%",
        "header": {
          "text": "Legend",
        },
        "marker": {
          "type": "circle"
        }
      },
      "title": {
        "text": "Hover the crosshairs beneath the legend to see the change.",
        "font-size": 12,
        "text-align": "left",
        "x": "7%",
        "y": "5%"
      },
      "scale-x": { //X-Axis
        "labels": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
        "item": { //Scale Items (scale values or labels)
          "font-size": 10,
        },
        "tick": { //Tick Marks
    
        },
        "guide": { //Guides
          "visible": true,
          "line-style": "solid", //"solid", "dotted", "dashed", "dashdot"
          "alpha": 1
        }
      },
      "scale-y": { //Y-Axis
        "values": "0:200:50",
        "item": {
          "font-size": 10
        },
        "tick": { //Tick Marks
    
        },
        "guide": { //Guides
          "line-style": "solid", //"solid", "dotted", "dashed", "dashdot"
          "alpha": 1
        }
      },
      "plot": { //Pertaining to Nodes
        "tooltip": { //Tooltips
          "visible": false
        }
      },
      "series": [{
          "values": [30, 34, 59, 31, 64, 65, 81, 85, 101, 75, 159, 164],
          "legend-text": "Series 1 - Blue"
        },
        {
          "values": [64, 16, 29, 40, 35, 88, 49, 77, 121, 164, 112, 100],
          "legend-text": "Series 2 - Red"
        }
      ]
    };
    
    zingchart.render({
      id: 'myChart',
      data: myConfig,
      height: 300,
      width: "100%"
    });