Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

apexcharts

Package Overview
Dependencies
Maintainers
2
Versions
223
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apexcharts

A JavaScript Chart Library

  • 3.53.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created

What is apexcharts?

ApexCharts is a modern charting library that helps developers create beautiful and interactive visualizations for web applications. It supports a wide range of chart types and is highly customizable, making it suitable for various data visualization needs.

What are apexcharts's main functionalities?

Line Chart

This code creates a simple line chart to visualize sales data over a period of months. The `series` array contains the data points, and the `xaxis` object defines the categories for the x-axis.

const options = { chart: { type: 'line' }, series: [{ name: 'sales', data: [30, 40, 35, 50, 49, 60, 70, 91, 125] }], xaxis: { categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep'] } }; const chart = new ApexCharts(document.querySelector('#chart'), options); chart.render();

Bar Chart

This code creates a bar chart to visualize revenue data across different quarters. The `series` array contains the data points, and the `xaxis` object defines the categories for the x-axis.

const options = { chart: { type: 'bar' }, series: [{ name: 'revenue', data: [10, 15, 25, 30, 40, 45, 50, 55, 60] }], xaxis: { categories: ['Q1', 'Q2', 'Q3', 'Q4', 'Q5', 'Q6', 'Q7', 'Q8', 'Q9'] } }; const chart = new ApexCharts(document.querySelector('#chart'), options); chart.render();

Pie Chart

This code creates a pie chart to visualize the distribution of data among different teams. The `series` array contains the data points, and the `labels` array defines the labels for each slice of the pie.

const options = { chart: { type: 'pie' }, series: [44, 55, 13, 43, 22], labels: ['Team A', 'Team B', 'Team C', 'Team D', 'Team E'] }; const chart = new ApexCharts(document.querySelector('#chart'), options); chart.render();

Area Chart

This code creates an area chart to visualize temperature data over a week. The `series` array contains the data points, and the `xaxis` object defines the categories for the x-axis.

const options = { chart: { type: 'area' }, series: [{ name: 'temperature', data: [31, 40, 28, 51, 42, 109, 100] }], xaxis: { categories: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] } }; const chart = new ApexCharts(document.querySelector('#chart'), options); chart.render();

Scatter Plot

This code creates a scatter plot to visualize two sets of sample data. The `series` array contains the data points for each sample, and the `xaxis` and `yaxis` objects define the tick amounts for the axes.

const options = { chart: { type: 'scatter' }, series: [{ name: 'Sample A', data: [[16.4, 5.4], [21.7, 2], [25.4, 3], [19, 2], [10.9, 1]] }, { name: 'Sample B', data: [[36.4, 13.4], [1.7, 11], [5.4, 8], [9, 17], [1.9, 4]] }], xaxis: { tickAmount: 10 }, yaxis: { tickAmount: 7 } }; const chart = new ApexCharts(document.querySelector('#chart'), options); chart.render();

Other packages similar to apexcharts

Keywords

FAQs

Package last updated on 30 Aug 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc