• 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>
        html,
        body,
        #myChart {
          height: 100%;
          width: 100%;
        }
      </style>
    </head>
    
    <body>
      <div id='myChart'></div>
      <script>
        ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
        var myConfig = {
          "graphset": [{
            "type": "line",
            "background-color": "#fff",
            "title": {
              "text": "Marker Size & Guide Lines",
              "background-color": "#fff",
              "font-color": "#333"
            },
            "plot": {
              "marker": {
                "rules": [{
                    "rule": "%v < -15",
                    "size": "4"
                  },
                  {
                    "rule": "%v >= -15 && %v < 20",
                    "size": "5"
                  },
                  {
                    "rule": "%v > 20",
                    "size": "7"
                  }
                ]
              }
            },
            "scale-x": {
              "line-color": "#333"
            },
            "scale-y": {
              "line-color": "#333",
              "guide": {
                "rules": [{
                  "rule": "%v < 0",
                  "line-color": "red",
                  "alpha": "0.7"
                }]
              }
            },
            "series": [{
                "values": [50, 20, 48, -45, -5, 98, 35, -10, -30, -55, 15, -90, 49, 72, 81, 32],
                "line-color": "#c03",
                "marker": {
                  "background-color": "#c03",
                  "border-color": "#c03"
                }
              },
              {
                "values": [20, 2, -20, -15, -45, -5, 5, 30, 2, -28, -10, 15, 35, 40, 11, -2, -15],
                "line-color": "#9cc",
                "marker": {
                  "background-color": "#9cc",
                  "border-color": "#9cc"
                }
              }
            ]
          }]
        };
    
        zingchart.render({
          id: 'myChart',
          data: myConfig,
          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 myConfig = {
        "graphset":[
            {
                "type":"line",
                "background-color":"#fff",
                "title":{
                    "text":"Marker Size & Guide Lines",
                    "background-color":"#fff",
                    "font-color":"#333"
                },
                "plot":{
                    "marker":{
                        "rules":[
                            {
                                "rule":"%v < -15",
                                "size":"4"
                            },
                            {
                                "rule":"%v >= -15 && %v < 20",
                                "size":"5"
                            },
                            {
                                "rule":"%v > 20",
                                "size":"7"
                            }
                        ]
                    }
                },
                "scale-x":{
                    "line-color":"#333"
                },
                "scale-y":{
                    "line-color":"#333",
                    "guide":{
                        "rules":[
                            {
                                "rule":"%v < 0",
                                "line-color":"red",
                                "alpha":"0.7"
                            }
                        ]
                    }
                },
                "series":[
                    {
                        "values":[50,20,48,-45,-5,98,35,-10,-30,-55,15,-90,49,72,81,32],
                        "line-color":"#c03",
                        "marker":{
                            "background-color":"#c03",
                            "border-color":"#c03"
                        }
                    },
                    {
                        "values":[20,2,-20,-15,-45,-5,5,30,2,-28,-10,15,35,40,11,-2,-15],
                        "line-color":"#9cc",
                        "marker":{
                            "background-color":"#9cc",
                            "border-color":"#9cc"
                        }
                    }
                ]
            }
        ]
    };
    
    zingchart.render({ 
    	id : 'myChart', 
    	data : myConfig, 
    	height: "100%", 
    	width: "100%"
    });