首页 > 其他分享 >ZingChart折线图

ZingChart折线图

时间:2024-05-22 16:32:18浏览次数:15  
标签:lineColor backgroundColor ZingChart 333 4caee7 cb8670 折线图 fff

<!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>
    .chart--container {
      min-height: 530px;
      width: 650px;
      height: 350px;
    }

    .zc-ref {
      display: none;
    }
  </style>
</head>

<body>
  <div id="myChart" class="chart--container">
    <a class="zc-ref" href="https://www.zingchart.com/">Powered by ZingChart</a>
  </div>
  <script>
    ZC.LICENSE = ["xxx", "xxx"];
    let chartConfig = {
      type: 'area',
      title: {
        text: '标题',
        fontColor: '#4caee7',
      },
      subtitle: {
        text: '副标题',
        fontColor: '#cb8670',
      },
      plot: {
        activeArea: true,
        animation: {
          delay: 50,
          effect: 'ANIMATION_SLIDE_LEFT',
          method: 'ANIMATION_REGULAR_EASE_OUT',
          sequence: 'ANIMATION_NO_SEQUENCE',
          speed: 1500,
        },
        hoverMarker: {
          size: '8px',
        },
        stacked: true,
      },
      plotarea: {
        backgroundColor: '#fff',
      },
      scaleX: {                       // x轴
        labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
        // lineColor: '#333',
        // maxItems: 6,
        // minValue: 1274313600000,
        // step: 600000,
        // tick: {
        //   lineColor: '#333',
        // },
        // transform: {
        //   type: 'date',
        //   all: '%D, %d %M<br>%h:%i %A',
        //   item: {
        //     visible: false,
        //   },
        // },
      },
      scaleY: {
        item: {
          padding: '4px',
        },
        lineColor: '#333',
        tick: {
          lineColor: '#333',
        },
      },
      series: [{          // y轴
          values: [11, 36, 7, 44, 11, 28, 42],
          backgroundColor: '#cb8670',
          lineColor: '#cb8670',
          marker: {
            backgroundColor: '#cb8670',
            borderColor: '#fff',
            borderWidth: '2px',
          },
        },
        // {
        //   values: [21, 29, 14, 16, 28, 35, 21, 18, 11, 7, 4, 9, 25, 15, 33, 13],
        //   backgroundColor: '#4caee7',
        //   lineColor: '#4caee7',
        //   marker: {
        //     backgroundColor: '#4caee7',
        //     borderColor: '#fff',
        //     borderWidth: '2px',
        //   },
        // },
      ],
    };

    zingchart.render({
      id: 'myChart',
      data: chartConfig,
      height: '100%',
      width: '100%',
    });
  </script>
</body>

</html>
  • 效果图
点击查看详情

标签:lineColor,backgroundColor,ZingChart,333,4caee7,cb8670,折线图,fff
From: https://www.cnblogs.com/dogleftover/p/18206563

相关文章

  • amCharts折线图
    代码案例,参考<!DOCTYPEhtml><html><head><scriptsrc="https://cdn.amcharts.com/lib/5/index.js"></script><scriptsrc="https://cdn.amcharts.com/lib/5/xy.js"></script><scriptsrc=......
  • python折线图包括设置横纵坐标字体大小刻度间隔等
    直径上代码#!usr/bin/envpython#-*-coding:utf-8-*-"""@author:Suyue@file:dryzhexian.py@time:2024/05/16@desc:"""importpandasaspdimportmatplotlibimportmatplotlib.pyplotaspltimportmatplotlib.tickerasticker......
  • echarts显示双y轴:折线图+柱状图
    先验知识:yAxis. positiony轴的位置。可选:'left''right'默认grid中的第一个y轴在grid的左侧('left'),第二个y轴视第一个y轴的位置放在另一侧。注:若未将 yAxis.axisLine.onZero 设为 false ,则该项无法生效series-bar. yAxisIndex number使用的 y轴的......
  • Echarts多条折线图line显示数值和真实数值不一致
    问题图: 折线图数据显示不匹配原因:在line的配置项中加了"stack"这一项配置,stack为‘Total’或‘总量’的情况下,y轴不是真实的value的值,而是value的总量值。既后续折现的数值在前数值的基础上相加.       官网对stack的描述:数据堆叠,同个类目轴上系列配置相同的st......
  • Chartist.js折线图(四)
    线插值/平滑代码如下<!DOCTYPEhtml><html><head><linkrel="stylesheet"href="./chartist.min.css"><scriptsrc="./chartist.min.js"></script></head><body><div......
  • Chartist.js折线图(三)
    事件替换图形代码如下<!DOCTYPEhtml><html><head><linkrel="stylesheet"href="./chartist.min.css"><scriptsrc="./chartist.min.js"></script></head><body><div......
  • Chartist.js折线图(二)
    折线散点图代码如下<!DOCTYPEhtml><html><head><linkrel="stylesheet"href="./chartist.min.css"><scriptsrc="./chartist.min.js"></script></head><body><divc......
  • Chartist.js折线图
    数据漏洞代码案例<!DOCTYPEhtml><html><head><linkrel="stylesheet"href="./chartist.min.css"><scriptsrc="./chartist.min.js"></script></head><body><divcl......
  • echarts折线图使用dataZoom,切换数据时渲染异常,出现竖线bug
     今天做项目遇到一个省份过多时,要加滚动条的需求。但是切换数据的时候,出现上图所出现的问题。经查资料,发现可以设置一个属性来解决这个问题。    filterMode:'empty' dataZoom:{     show:this.xiaonengXData.length>12?true:false,//为true滚动条......
  • vis.js分组多图折线图
    代码案例<!doctypehtml><html><head><title>Timeline</title><scripttype="text/javascript"src="https://unpkg.com/vis-timeline@latest/standalone/umd/vis-timeline-graph2d.min.js"></script>......