Socket
Socket
Sign inDemoInstall

react-apexcharts

Package Overview
Dependencies
Maintainers
2
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-apexcharts

React.js wrapper for ApexCharts


Version published
Weekly downloads
434K
decreased by-4.57%
Maintainers
2
Weekly downloads
 
Created

What is react-apexcharts?

The react-apexcharts package is a React wrapper for ApexCharts, a modern charting library that helps developers create interactive and responsive charts. It supports a wide range of chart types and provides extensive customization options.

What are react-apexcharts's main functionalities?

Line Chart

This code demonstrates how to create a basic line chart using react-apexcharts. The chart displays data points over a series of years.

import React from 'react';
import Chart from 'react-apexcharts';

const LineChart = () => {
  const options = {
    chart: {
      id: 'basic-line'
    },
    xaxis: {
      categories: [1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999]
    }
  };
  const series = [
    {
      name: 'series-1',
      data: [30, 40, 35, 50, 49, 60, 70, 91, 125]
    }
  ];

  return <Chart options={options} series={series} type="line" height={350} />;
};

export default LineChart;

Bar Chart

This code demonstrates how to create a basic bar chart using react-apexcharts. The chart displays data points for each month.

import React from 'react';
import Chart from 'react-apexcharts';

const BarChart = () => {
  const options = {
    chart: {
      id: 'basic-bar'
    },
    xaxis: {
      categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep']
    }
  };
  const series = [
    {
      name: 'series-1',
      data: [30, 40, 45, 50, 49, 60, 70, 91, 125]
    }
  ];

  return <Chart options={options} series={series} type="bar" height={350} />;
};

export default BarChart;

Pie Chart

This code demonstrates how to create a basic pie chart using react-apexcharts. The chart displays the distribution of data among different teams.

import React from 'react';
import Chart from 'react-apexcharts';

const PieChart = () => {
  const options = {
    labels: ['Team A', 'Team B', 'Team C', 'Team D', 'Team E']
  };
  const series = [44, 55, 13, 43, 22];

  return <Chart options={options} series={series} type="pie" height={350} />;
};

export default PieChart;

Other packages similar to react-apexcharts

Keywords

FAQs

Package last updated on 13 Jul 2023

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