diff --git a/src/special/london/chart.ts b/src/special/london/chart.ts index 1caf6f3..4d2298d 100644 --- a/src/special/london/chart.ts +++ b/src/special/london/chart.ts @@ -28,6 +28,17 @@ export const options: ChartOptions = { callback: (v) => `${v} Gwei`, }, }, + yBaseFee: { + position: "right", + beginAtZero: true, + title: { + display: true, + text: "Base fee", + }, + grid: { + drawOnChartArea: false + } + }, }, }; @@ -44,5 +55,12 @@ export const toChartData = (blocks: ExtendedBlock[]): ChartData => ({ borderColor: "#F97316", tension: 0.2, }, + { + label: "Base fee (Gwei)", + data: blocks.map(b => b.baseFeePerGas!.toNumber()).reverse(), + yAxisID: "yBaseFee", + borderColor: "#FCA5A5", + tension: 0.2 + } ], });