Plotly.js vs visx
Which should you use? A side-by-side look at what each one does, who it suits, what it costs, how hard it is to set up, and where each falls short.
Open source · MIT
A JavaScript library for drawing interactive charts in web pages, also the engine behind Plotly in Python and
Open source · MIT
A set of reusable React building blocks for drawing custom charts, built on d3 math.
The short answer
Choose Plotly.js if you need…
- Web developers who want interactive charts in their own site or app
- Data analysts who already use Python or R Plotly and want to understand the JavaScript side
- Teams building dashboards that need 3D or scientific chart types
- People comfortable with basic HTML and JSON who want charts without much code
Choose visx if you need…
- React developers who want full control over how a chart looks and behaves
- Teams building their own reusable chart library on top of shared components
- Developers who already know d3 and want its math without its DOM update style
- Projects that want to keep bundle size small by importing only needed packages
Side-by-side
| Plotly.js | visx | |
|---|---|---|
| Type | Library | Library |
| Price | Free and open source | Free and open source |
| Licence | MIT | MIT |
| GitHub stars | 18.4k | 21.1k |
| Setup difficulty | Beginner | Intermediate |
| How you get it | Install with a package manager | Install with a package manager |
| Main language | JavaScript | TypeScript |
| Last code update | 7 days ago | 5 months ago |
What each one is
Plotly.js
Plotly.js is a JavaScript library that draws interactive data visualizations such as statistical charts, 3D graphs, scientific charts, map charts and financial charts. You describe your data and layout as a JSON-like object, and the library renders the chart in a web page. The same library also powers the Python and R packages named plotly.
visx
visx is a collection of low-level visualization components for React. It uses d3 for the calculations and math, while React handles updating the page, so developers can build charts without writing d3 selection code by hand. You install only the small packages you need, such as shapes or scales, and combine them into your own charts.
Best for
Plotly.js
- Web developers who want interactive charts in their own site or app
- Data analysts who already use Python or R Plotly and want to understand the JavaScript side
- Teams building dashboards that need 3D or scientific chart types
- People comfortable with basic HTML and JSON who want charts without much code
visx
- React developers who want full control over how a chart looks and behaves
- Teams building their own reusable chart library on top of shared components
- Developers who already know d3 and want its math without its DOM update style
- Projects that want to keep bundle size small by importing only needed packages
Strengths
Plotly.js
- Supports dozens of chart types, including 3D, scientific, map and financial charts
- Can be used with no build step by loading it from a CDN, or installed through npm
- Actively maintained by Plotly, with an MIT license
visx
- Components are low-level and unopinionated, so you control the final look
- Lets you use d3 math without managing d3 selections or enter/exit/update logic
- Modular packages mean you only include what you use
Not ideal for
Plotly.js
- Users who only need a simple static chart image; a lighter charting library may be enough
- Projects with strict bundle size limits unless they choose a custom or partial bundle, since the full build is large
- Anyone needing WebGL 2 features, since the README only mentions a WebGL 1 workaround for multiple graphs
visx
- People who want ready-made charts with no coding, since visx provides building blocks rather than finished charts
- Projects that need built-in animation, because the README says visx deliberately does not include animation and suggests using existing React animation libraries instead
- Projects not using React, since the components are built for React 18 or 19
Trade-offs
Plotly.js
- The full bundle is large, so you may need to build a custom bundle to keep pages light
- Advanced setup such as custom builds or bundling requires reading additional guides
- Some features like MathJax rendering need separate loading and extra configuration
visx
- Because it is low-level, you write more code than with a turnkey charting library
- No built-in animation; you must add a React animation library yourself if you want it
- Requires React 18 or 19 for the current v4 release, so older React projects need migration (see the migration guide)
Getting started
Plotly.js
Install the ready-to-use distributed bundle
npm i --save plotly.js-dist-minvisx
Install the packages used in the README example
npm install --save @visx/mock-data @visx/group @visx/shape @visx/scaleFrequently asked questions
What is the difference between Plotly.js and visx?
Plotly.js: A JavaScript library for drawing interactive charts in web pages, also the engine behind Plotly in Python and . visx: A set of reusable React building blocks for drawing custom charts, built on d3 math. Plotly.js suits web developers who want interactive charts in their own site or app, while visx suits react developers who want full control over how a chart looks and behaves.
Are Plotly.js and visx free?
Plotly.js: Free and open source. visx: Free and open source.
Which is easier to set up, Plotly.js or visx?
Plotly.js is easier to get started with (rated beginner); visx is rated intermediate and usually needs more setup.
Is Plotly.js or visx more popular?
visx has more GitHub stars (21.1k) than Plotly.js (18.4k). Popularity isn't the same as fit — check which one matches your use case above.
What are other alternatives to Plotly.js and visx?
Other options people compare them with include Chart.js, plotly.py, deck.gl, Recharts, uPlot.
Keep comparing
Built from our catalogue entries for both products: open-source details come from each project's README (AI-assisted, refreshed weekly) and GitHub data; AI-tool details are editorial. Spotted something wrong? Let us know from either product's page.