d3最新是V5版的,比起V2的API变动了不少,写下我实现过程

效果图:

面积图:

使用d3.v5实现折线图与面积图

折线图:

使用d3.v5实现折线图与面积图

 

目录结构:

 使用d3.v5实现折线图与面积图

 

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link href="css/style.css" media="screen" rel="stylesheet" type="text/css"/>
    <title>Linechart1</title>
</head>
<body>
    <div ></div>

    <script src="https://d3js.org/d3.v5.min.js"></script>
    <script src="js/index.js"></script>
</body>
</html>
index.html

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-04-06
  • 2021-10-04
  • 2022-12-23
  • 2022-01-22
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-18
  • 2022-12-23
  • 2022-01-19
  • 2021-06-03
  • 2021-12-10
  • 2022-12-23
  • 2022-01-15
相关资源
相似解决方案