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.
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 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.19.2 (2024-07-15)
Bug Fixes
docs: media breakpoints for PageHeaderTitle
(#1869)
(6cdb564)
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,870 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 15 Jul 2024
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.
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.