Skip to main content

Data Visualization with Apache ECharts

Apache ECharts is a production-grade charting library with rich interaction and animation support. Enable it per post with echarts: true.

Citation Activity Heatmap

A GitHub-style calendar heatmap showing citation activity across two years (fictional data):

Physics Topics — Treemap

Research output by topic area (proportional to paper count):

Ohm’s Law — Scatter Plot with Trend

Voltage (V) vs current (A) measurements showing V=IRV = IR linearity:

Collaborator Contributions — Stacked Bar

Papers per collaborator across four years:

Usage

---
title: My Post With ECharts
echarts: true
---

Initialize charts using the polling pattern to wait for ECharts to load:

(function poll() {
  if (typeof echarts === 'undefined') { setTimeout(poll, 50); return; }
  const chart = echarts.init(document.getElementById('myChart'));
  chart.setOption(spec);
})();

Pass 'dark' as the second argument to echarts.init() when the current theme is dark to get automatic colour palette switching.