Global
TheGlobal object provides access to global Recharts configuration and runtime information.
Properties
devToolsEnabled
Indicates whether development tools are enabled.true- Whenprocess.env.NODE_ENV !== 'production'false- In production builds
isSsr
Indicates whether the code is running in a server-side rendering (SSR) environment.true- When running on the server (nowindowobject available)false- When running in the browser
Usage notes
Server-side rendering
When using Recharts with SSR frameworks (Next.js, Gatsby, etc.), checkGlobal.isSsr before accessing browser-only APIs:
Development tools
UseGlobal.devToolsEnabled to conditionally enable debugging features:
TypeScript
TheGlobal object is typed and can be imported from recharts: