摘要: 对比例尺的温习及第一次实战练习 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> 阅读全文
posted @ 2020-12-02 19:41 麻楠子 阅读(284) 评论(0) 推荐(0)
摘要: 1、d3.scaleTime()时间比例尺 应用场景:常用于折线图时间轴刻度 const myScale = d3.scaleTime() .domain([new Date(2017, 0, 1, 0), new Date(2017, 0, 1, 2)]) .range([0,100]); con 阅读全文
posted @ 2020-12-02 16:55 麻楠子 阅读(963) 评论(0) 推荐(0)
摘要: d3.select(element) // 获取某个元素;element可为:标签、类名、ID、标签+属性,如果是类名和标签则选中第一个 d3.selectAll(element) // 获取某一批元素;element可为:标签、类名。 阅读全文
posted @ 2020-12-02 10:43 麻楠子 阅读(1396) 评论(0) 推荐(0)