Skip to main content
Global configuration and utility object.

Global

The Global object provides access to global Recharts configuration and runtime information.

Properties

devToolsEnabled

Indicates whether development tools are enabled.
Value:
  • true - When process.env.NODE_ENV !== 'production'
  • false - In production builds
Example:

isSsr

Indicates whether the code is running in a server-side rendering (SSR) environment.
Value:
  • true - When running on the server (no window object available)
  • false - When running in the browser
Detection logic:
Example:

Usage notes

Server-side rendering

When using Recharts with SSR frameworks (Next.js, Gatsby, etc.), check Global.isSsr before accessing browser-only APIs:

Development tools

Use Global.devToolsEnabled to conditionally enable debugging features:

TypeScript

The Global object is typed and can be imported from recharts: