Launch Week Day 5: Introducing Reachability for PHP.Learn More
Socket
Book a DemoSign in
Socket

@mui/x-charts-vendor

Package Overview
Dependencies
Maintainers
16
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mui/x-charts-vendor

Vendored dependencies for MUI X Charts.

latest
Source
npmnpm
Version
9.0.0
Version published
Weekly downloads
575K
-17.15%
Maintainers
16
Weekly downloads
 
Created
Source

Charts Vendor

Vendored dependencies for @mui/x-charts.

An adaptation of the victory-vendor

Background

D3 has released most of its libraries as ESM-only. This means that consumers in Node.js applications can no longer just require() anything with a d3 transitive dependency, including much of @mui/x-charts.

To help provide an easy path to folks still using CommonJS in their Node.js applications that consume @mui/x-charts, we now provide this package to vendor in various d3-related packages.

Main difference with victory-vendor

Victory is using the d3-voronoi which is an archived project.

Packages

We presently provide the following top-level libraries:

  • d3-color
  • d3-interpolate
  • d3-sankey
  • d3-scale
  • d3-shape
  • d3-time
  • d3-timer

This is the total list of top and transitive libraries we vendor:

  • d3-array
  • d3-color
  • d3-format
  • d3-interpolate
  • d3-path
  • d3-sankey
  • d3-scale
  • d3-shape
  • d3-time
  • d3-time-format
  • d3-timer
  • internmap

How to add a new package

To add a new package, simply install it as a dependency in this package, and then run the build script.

If your package is not built, you may need to adjust the parameters on ./scripts/build.js, then run the build script again.

How it works

We provide two alternate paths and behaviors -- for ESM and CommonJS

ESM

If you do a Node.js import like:

import { interpolate } from '@mui/x-charts-vendor/d3-interpolate';

under the hood it's going to just re-export and pass you through to node_modules/d3-interpolate, the real ESM library from D3.

CommonJS

If you do a Node.js import like:

const { interpolate } = require('@mui/x-charts-vendor/d3-interpolate');

under the hood, it will go to an alternate path that contains the transpiled version of the underlying d3 library found at x-charts-vendor/lib-vendor/d3-interpolate/**/*.js. This further has internally consistent import references to other x-charts-vendor/lib-vendor/<pkg-name> paths.

Note that for some tooling (like Jest) that doesn't play well with package.json:exports routing to this CommonJS path, we also output a root file in the form of x-charts-vendor/d3-interpolate.js.

Licenses

This project is released under the MIT license, but the vendored in libraries include other licenses (for example ISC) that we enumerate in our package.json:license field.

Keywords

data visualization

FAQs

Package last updated on 08 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts