You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
按需加载
通过打包工具 Tree shaking 实现按需加载。
思路
提供不同的 lib 给 runtime。
开始使用
使用 G2 所有的能力:包含高级统计 mark(Sankey),地理,关系和智能可视化(除了 3d)。
按需使用 G2 某个 Mark:
Chart
和Runtime
(名字可以商量)区别主要是:Chart 可以不指定 lib,默认使用 stdlib,但是 Runtime 必须要指定 lib。所以对于 ChartLite 来说,绘制任何的图都需要显示地 import 对应的 Mark。当然,也可以批量使用某个合集的能力。按需使用某个系列的 mark:
按需使用多个系列的 Mark:
UMD
上面是在有包管理器的时候使用方式,下面是针对 legacy browser 的 umd 方案。
目录结构
不同的 lib:
TODO
Beta Was this translation helpful? Give feedback.
All reactions