• 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',
          scaleX: {
            item: {
              borderRadius: 3,
              borderWidth: 1,
              fontFamily: 'Georgia',
              fontSize: 12,
              padding: '1px 5px',
              rules: [{
                  rule: '%v >= 0 && %v < 3',
                  backgroundColor: '#ffe6e6',
                  borderColor: 'red',
                  fontColor: 'red'
                },
                {
                  rule: '%v >= 3 && %v < 6',
                  backgroundColor: '#fff6e6',
                  borderColor: 'orange',
                  fontColor: 'orange'
                },
                {
                  rule: '%v >= 6 && %v < 9',
                  backgroundColor: '#ffffe6',
                  borderColor: 'brown',
                  fontColor: 'brown'
                },
                {
                  rule: '%v >= 9 && %v < 12',
                  backgroundColor: '#e6ffe6',
                  borderColor: 'green',
                  fontColor: 'green'
                },
                {
                  rule: '%v >= 12 && %v < 15',
                  backgroundColor: '#e6e6ff',
                  borderColor: 'blue',
                  fontColor: 'blue'
                },
                {
                  rule: '%v >= 15 && %v < 18',
                  backgroundColor: '#ffe6ff',
                  borderColor: 'purple',
                  fontColor: 'purple'
                },
              ]
            },
            tick: {
              lineWidth: 2,
              rules: [{
                  rule: '%v >= 0 && %v < 3',
                  lineColor: 'red'
                },
                {
                  rule: '%v >= 3 && %v < 6',
                  lineColor: 'orange'
                },
                {
                  rule: '%v >= 6 && %v < 9',
                  lineColor: 'brown'
                },
                {
                  rule: '%v >= 9 && %v < 12',
                  lineColor: 'green'
                },
                {
                  rule: '%v >= 12 && %v < 15',
                  lineColor: 'blue'
                },
                {
                  rule: '%v >= 15 && %v < 18',
                  lineColor: 'purple'
                }
              ]
            },
            guide: {
              visible: true,
    
              lineStyle: 'solid',
              lineWidth: 1,
              rules: [{
                  rule: '%v >= 0 && %v < 3',
                  lineColor: 'red'
                },
                {
                  rule: '%v >= 3 && %v < 6',
                  lineColor: 'orange'
                },
                {
                  rule: '%v >= 6 && %v < 9',
                  lineColor: 'brown'
                },
                {
                  rule: '%v >= 9 && %v < 12',
                  lineColor: 'green'
                },
                {
                  rule: '%v >= 12 && %v < 15',
                  lineColor: 'blue'
                },
                {
                  rule: '%v >= 15 && %v < 18',
                  lineColor: 'purple'
                },
              ]
            },
            minorTicks: 3,
            minorTick: {
              lineWidth: 1,
              size: 10,
              rules: [{
                  rule: '%v >= 0 && %v < 3',
                  lineColor: 'red'
                },
                {
                  rule: '%v >= 3 && %v < 6',
                  lineColor: 'orange'
                },
                {
                  rule: '%v >= 6 && %v < 9',
                  lineColor: 'brown'
                },
                {
                  rule: '%v >= 9 && %v < 12',
                  lineColor: 'green'
                },
                {
                  rule: '%v >= 12 && %v < 15',
                  lineColor: 'blue'
                },
                {
                  rule: '%v >= 15 && %v < 18',
                  lineColor: 'purple'
                }
              ]
            },
            minorGuide: {
              alpha: 1,
              lineStyle: 'dotted',
              lineWidth: 1,
              rules: [{
                  rule: '%v >= 0 && %v < 3',
                  lineColor: 'red'
                },
                {
                  rule: '%v >= 3 && %v < 6',
                  lineColor: 'orange'
                },
                {
                  rule: '%v >= 6 && %v < 9',
                  lineColor: 'brown'
                },
                {
                  rule: '%v >= 9 && %v < 12',
                  lineColor: 'green'
                },
                {
                  rule: '%v >= 12 && %v < 15',
                  lineColor: 'blue'
                },
                {
                  rule: '%v >= 15 && %v < 18',
                  lineColor: 'purple'
                }
              ]
            }
          },
          scaleY: {
            visible: false
          },
          plot: {
            aspect: 'spline',
            backgroundColor: 'black',
            lineColor: 'black',
            marker: {
              backgroundColor: 'black'
            }
          },
          series: [{
            values: [38.2, 96.3, 53.6, 27.4, 14.1, 81.4, 31.1, 70.9, 54.4, 5.2, 36.3, 80.4, 50.5, 35.3, 30.5, 64.3, 10.5, 27.2]
          }]
        };
    
        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',
      scaleX: {
        item: {
          borderRadius: 3,
          borderWidth: 1,
          fontFamily: 'Georgia',
          fontSize: 12,
          padding: '1px 5px',
          rules: [{
              rule: '%v >= 0 && %v < 3',
              backgroundColor: '#ffe6e6',
              borderColor: 'red',
              fontColor: 'red'
            },
            {
              rule: '%v >= 3 && %v < 6',
              backgroundColor: '#fff6e6',
              borderColor: 'orange',
              fontColor: 'orange'
            },
            {
              rule: '%v >= 6 && %v < 9',
              backgroundColor: '#ffffe6',
              borderColor: 'brown',
              fontColor: 'brown'
            },
            {
              rule: '%v >= 9 && %v < 12',
              backgroundColor: '#e6ffe6',
              borderColor: 'green',
              fontColor: 'green'
            },
            {
              rule: '%v >= 12 && %v < 15',
              backgroundColor: '#e6e6ff',
              borderColor: 'blue',
              fontColor: 'blue'
            },
            {
              rule: '%v >= 15 && %v < 18',
              backgroundColor: '#ffe6ff',
              borderColor: 'purple',
              fontColor: 'purple'
            },
          ]
        },
        tick: {
          lineWidth: 2,
          rules: [{
              rule: '%v >= 0 && %v < 3',
              lineColor: 'red'
            },
            {
              rule: '%v >= 3 && %v < 6',
              lineColor: 'orange'
            },
            {
              rule: '%v >= 6 && %v < 9',
              lineColor: 'brown'
            },
            {
              rule: '%v >= 9 && %v < 12',
              lineColor: 'green'
            },
            {
              rule: '%v >= 12 && %v < 15',
              lineColor: 'blue'
            },
            {
              rule: '%v >= 15 && %v < 18',
              lineColor: 'purple'
            }
          ]
        },
        guide: {
          visible: true,
    
          lineStyle: 'solid',
          lineWidth: 1,
          rules: [{
              rule: '%v >= 0 && %v < 3',
              lineColor: 'red'
            },
            {
              rule: '%v >= 3 && %v < 6',
              lineColor: 'orange'
            },
            {
              rule: '%v >= 6 && %v < 9',
              lineColor: 'brown'
            },
            {
              rule: '%v >= 9 && %v < 12',
              lineColor: 'green'
            },
            {
              rule: '%v >= 12 && %v < 15',
              lineColor: 'blue'
            },
            {
              rule: '%v >= 15 && %v < 18',
              lineColor: 'purple'
            },
          ]
        },
        minorTicks: 3,
        minorTick: {
          lineWidth: 1,
          size: 10,
          rules: [{
              rule: '%v >= 0 && %v < 3',
              lineColor: 'red'
            },
            {
              rule: '%v >= 3 && %v < 6',
              lineColor: 'orange'
            },
            {
              rule: '%v >= 6 && %v < 9',
              lineColor: 'brown'
            },
            {
              rule: '%v >= 9 && %v < 12',
              lineColor: 'green'
            },
            {
              rule: '%v >= 12 && %v < 15',
              lineColor: 'blue'
            },
            {
              rule: '%v >= 15 && %v < 18',
              lineColor: 'purple'
            }
          ]
        },
        minorGuide: {
          alpha: 1,
          lineStyle: 'dotted',
          lineWidth: 1,
          rules: [{
              rule: '%v >= 0 && %v < 3',
              lineColor: 'red'
            },
            {
              rule: '%v >= 3 && %v < 6',
              lineColor: 'orange'
            },
            {
              rule: '%v >= 6 && %v < 9',
              lineColor: 'brown'
            },
            {
              rule: '%v >= 9 && %v < 12',
              lineColor: 'green'
            },
            {
              rule: '%v >= 12 && %v < 15',
              lineColor: 'blue'
            },
            {
              rule: '%v >= 15 && %v < 18',
              lineColor: 'purple'
            }
          ]
        }
      },
      scaleY: {
        visible: false
      },
      plot: {
        aspect: 'spline',
        backgroundColor: 'black',
        lineColor: 'black',
        marker: {
          backgroundColor: 'black'
        }
      },
      series: [{
        values: [38.2, 96.3, 53.6, 27.4, 14.1, 81.4, 31.1, 70.9, 54.4, 5.2, 36.3, 80.4, 50.5, 35.3, 30.5, 64.3, 10.5, 27.2]
      }]
    };
    
    zingchart.render({
      id: 'myChart',
      data: myConfig,
      height: 400,
      width: '100%'
    });