图形语法学
TLDR 本文深入探讨了 Leland Wilkinson 的《图形语法》理论,该理论将可视化设计从图表降维到更底层的图形元素。文章首先介绍了图形语法的核心思想、及其规范(数据、变换、度量、坐标、元素、引导)、组装和展示三个步骤。接着,通过对比 ECharts 和 AntV G2 的实现,阐释了基于图表类型和基于图形语法的不同设计哲学及其优劣。最后,文章进一步反思了当前可视化领域的核心挑战在于设计本身,而非工具,并通过极值处理、班级成绩单等具体案例,强调了在复杂场景下专业可视化设计知识和思辨能力的重要性。

前言
图形语法学是 Leland Wilkinson 编写的,将可视化的设计粒度从图表降维到图形,提供了一种更加底层的,由下向上的设计指导及方法论。该书脱离有限的图表类型范围,转而面向无限的图形语法陈述。其重点在于指导人们构建图形的数学规则,然后以美学的方式将其组织为图表。
在书中的前言中有一段描述可以快速的让读者获取到其设计思想:
For one thing, charts are usually instances of much more general objects. Once we understand that a pie is a divided bar in polar coordinates, we can construct other polar graphics that are less well known. We will also come to realize why a histogram is not a bar chart and why many other graphics that look similar nevertheless have different grammars.
There is also a practical reason for shunning chart typology. If we endeavor to develop a charting instead of a graphing program, we will accomplish two things. First, we inevitably will offer fewer charts than people want. Second, our package will have no deep structure. Our computer program will be unnecessarily complex, because we will fail to reuse objects or routines that function similarly in different charts. And we will have no way to add new charts to our system without generating complex new code.
饼图本质上是极坐标系下的柱状图;雷达图本质上是极坐标系下的折线图;直方图并不算作柱状图。作者通过这些案例引发人们对于现有图表库的思考。 Leland Wilkinson 是一位统计学家,他在构建图表库 SYSTAT 的过程中意识到,部分图表的功能存在重复,随着图表库的扩张,各个组件和图表之间的功能相互耦合,且存在重复,即使很多组件/图表的设计思想仅存在细微差别,但开发者仍然不得不重新编写代码,相似的代码片段无法得到有效复用。