
Security News
How Enterprise Security Is Adapting to AI-Accelerated Threats
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.
@highcharts/svelte
Advanced tools
A lightweight Svelte wrapper for Highcharts, making it easy to integrate Highcharts into your Svelte applications. This package allows you to utilize all the powerful features of Highcharts with the minimalistic approach of Svelte.
chart, stockChart, mapChart, and ganttChart.You can install @highcharts/svelte using npm:
npm install @highcharts/svelte highcharts --save
Highcharts is a peer dependency of this package, and you need to install it separately.
The package exports the Chart, StockChart, MapChart, GanttChart components which accepts 6 props:
| Prop | Type | Default | Description |
|---|---|---|---|
options | Highcharts.Options | None | The configuration options for the chart. This is a required prop that defines the Highcharts chart options. |
updateArgs | boolean | Partial<Highcharts.AnimationOptionsObject> | true | Determines how the chart updates when the options object changes. Can be a boolean or an animation settings object to enable/disable animation during update. |
highcharts | typeof Highcharts | Highcharts | Allows passing a custom instance of Highcharts, which is useful if you want to use a specific version of Highcharts or need to load modules that are not included by default. |
callback | (chart: Highcharts.Chart) => void | () => {} | A callback function that is executed after the chart is instantiated. It receives the chart instance as a parameter. |
chart | Highcharts.Chart | null | null | If you'd like to have access to the chart instance, you can bind your chart object with Svelte's two-way binding here. |
<script lang="ts">
import Highcharts from 'highcharts';
import ExportingModule from 'highcharts/modules/exporting';
import { Chart } from '@highcharts/svelte'; // Chart is also exported by default
// Applying a certain Highcharts module
ExportingModule(Highcharts);
let options = {
chart: {
type: 'line'
},
title: {
text: 'My Chart'
},
series: [{
data: [1, 2, 3, 4, 5]
}]
};
</script>
<Chart options={options} highcharts={Highcharts}/>
Contributions are always welcome! Whether it's submitting a bug report, a pull request, or even suggesting a new feature, all contributions are appreciated. Before contributing, please read the project's contribution guidelines.
If you have any issues with @highcharts/svelte, please open an issue on the GitHub repository. If you have a Highcharts-related question, feel free to contact our support team: https://www.highcharts.com/blog/support/
[25.10.2024] 1.1.1
FAQs
A simple & intuitive Svelte wrapper for Highcharts
The npm package @highcharts/svelte receives a total of 834 weekly downloads. As such, @highcharts/svelte popularity was classified as not popular.
We found that @highcharts/svelte demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 9 open source maintainers collaborating on the project.
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.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.