If you prefer Yarn, use the following command instead:
yarn add -D @carbon/charts-svelte
The required styles should be imported from @carbon/charts-svelte/styles.css.
A release in the near future will move components to runes mode for Svelte 5 and beyond. As this would be a breaking change because event handlers will change to component properties, this version will be published with the distribution tag next. Please check here to see if a version for latest has been published.
SvelteKit
While this component library can be used with any build environments for Svelte,
SvelteKit is the official framework for building Svelte apps supporting
client-side and server-side rendering (SSR). SvelteKit is powered by Vite.
The module @carbon/charts should not be externalized for SSR when building for production.
Dynamically import a chart and instantiate it using the
svelte:component API. By importing
@carbon/charts within onMount(), you avoid problems with server-side rendering.
Use the ComponentProps utility type from svelte to extract the props for chart components.
You can then use an
indexed access type to
extract types for individual properties.
import { typeComponentProps } from'svelte'import { BarChartSimple } from'@carbon/charts-svelte'typeChartProps = ComponentProps<BarChartSimple>
// Indexed access type to access the type of the `chart` propertyletchart: ChartProps['chart'] = null
IBM Telemetry
This package uses IBM Telemetry to collect de-identified and anonymized metrics
data. By installing this package as a dependency you are agreeing to telemetry
collection. To opt out, see
Opting out of IBM Telemetry data collection.
For more information on the data being collected, please see the
IBM Telemetry documentation.
1.22.18 (2025-02-18)
Note: Version bump only for package @carbon/charts-monorepo
Change Log
All notable changes to this project will be documented in this file. See
Conventional Commits for commit guidelines.
The npm package @carbon/charts-svelte receives a total of 2,469 weekly downloads. As such, @carbon/charts-svelte popularity was classified as popular.
We found that @carbon/charts-svelte demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.It has 0 open source maintainers collaborating on the project.
Package last updated on 18 Feb 2025
Did you know?
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.
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.
TC39 met in Seattle and advanced 9 JavaScript proposals, including three to Stage 4, introducing new features and enhancements for a future ECMAScript release.