版本號 "@antv/g2": "^5.1.20", HTML代碼 div id="profitChart" class="profitChart"/div Css代碼 .profitChart { height: 500px; } JS代碼 import { Chart } from '@antv/g2'; // console.log(data); let
安裝依賴 @antv/l7-maps @antv/l7 div id="map"/div import { Scene } from "@antv/l7"; import { GaodeMapV1 } from "@antv/l7-maps"; scene = new Scene({ id: "map", map: new GaodeMapV1({
前言 什麼? 你不瞭解G2Plot? 沒關係, 今天咱們要分享的內容和G2Plot的關係, 就像雷鋒和雷峯塔的關係. 因此, 不必擔心聽不懂. 我一直覺得, 如果我寫的文章有人看不懂, 那一定是我寫的不夠好. 而不是讀者的問題. 業務背景 最近在使用G2Plot的雙軸圖開發業務. 大概長下面這個樣子. 既然要開發雙軸圖, 那麼先看一遍文檔是正常操作. 於是我就打開了他的官網, 看到了這樣的一段話