d3 vs echarts vs plotly.js
Choosing visualization primitives or a configured chart system
d3echartsplotly.jsSimilar Packages:

Choosing visualization primitives or a configured chart system

D3 provides low-level visualization building blocks, while ECharts and Plotly.js configure higher-level charts and interactions. The main tradeoff is how much of the rendering, data mapping and interaction system the application should own.

Npm Package Weekly Downloads Trend

3 Years

Github Stars Ranking

Stat Detail

Package
Downloads
Stars
Size
Issues
Publish
License
d335,652,287113,974882 kB2717 days agoISC
echarts11,175,17067,75660.3 MB1,4746 months agoApache-2.0
plotly.js983,27718,38498.6 MB80922 days agoMIT

How much visualization code should the application own?

D3 is a toolbox: combine scales, shapes, layouts and interaction utilities into the desired visualization. That is useful when the visual encoding is the product rather than a conventional chart inside it. The application must also implement the surrounding chart behavior it needs.

ECharts and Plotly.js provide higher-level configuration models. They can reduce custom infrastructure when established chart types and interactions fit the analytical task. These are architectural alternatives, not interchangeable function calls.

Rendering choices

D3 is not inherently SVG-only; its utilities can support different rendering approaches. Decide which layer owns rendered elements when integrating with a component framework.

ECharts offers Canvas or SVG. Plotly uses rendering paths that depend on the trace type, including SVG and WebGL; do not describe every Plotly chart as WebGL. Test visual fidelity, interactions and export on the actual supported browsers and devices.

Data and interaction design

With D3, the implementation composes data mapping and marks directly. ECharts uses its option, series and dataset conventions. Plotly figures organize traces and layout attributes. Review how the chosen model handles updates, selections and linked views, rather than translating only the initial data arrays.

Current plotly.js metadata declares Node22 or newer. This concerns the relevant toolchain or execution environment, not a requirement for end users to install Node in their browsers. Check package entry points and bundling for the selected version.

Choosing and migrating

Build one representative analysis with empty states, repeated updates and teardown. Prefer D3 when bespoke behavior earns the extra implementation work; prefer a higher-level system when it covers the required plots with less custom code. A migration changes data structures, events and rendering ownership. No package name or rendering backend proves a universal performance winner.

How to Choose: d3 vs echarts vs plotly.js

  • d3:

    Choose D3 when custom encodings or interactions justify composing scales, shapes, layouts and rendering. It is not a ready-made chart catalog, and it is not restricted to an SVG-only implementation.

  • echarts:

    Choose ECharts when its chart types and option-driven interaction model fit the design. Canvas and SVG are available, but renderer and series choices should be tested against the feature.

  • plotly.js:

    Choose Plotly.js when its figure, trace and layout model covers the analytical or scientific plots required. Rendering depends on trace type; current package metadata requires Node22 or newer for the applicable build or execution environment.

README for d3

D3: Data-Driven Documents

D3 (or D3.js) is a free, open-source JavaScript library for visualizing data. Its low-level approach built on web standards offers unparalleled flexibility in authoring dynamic, data-driven graphics. For more than a decade D3 has powered groundbreaking and award-winning visualizations, become a foundational building block of higher-level chart libraries, and fostered a vibrant community of data practitioners around the world.

Daily downloads of D3

Daily downloads of D3 · oss-analytics

Resources