inital commit

This commit is contained in:
2026-01-01 15:25:19 +05:30
commit f0ae49465a
36361 changed files with 4894111 additions and 0 deletions

80
node_modules/react-apexcharts/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,80 @@
## 📄 License Options for ApexCharts
ApexCharts is offered under a **dual-license model** to support individuals, startups, and commercial products of all sizes.
---
### 🔓 Community License (Free)
For individuals, non-profits, educators, and small businesses with **less than $2 million USD in annual revenue**.
✅ Whats allowed:
- Personal, educational, or non-profit use
- Commercial use by small orgs (< $2M annual revenue)
- Modifications and redistribution (with attribution)
🚫 Not allowed:
- Use by companies or entities over $2M/year revenue
- Use in competing charting products
- Sublicensing under different terms
➡ By using ApexCharts under this license, you confirm that **you qualify as a Small Organization**.
---
### 💼 Commercial License (Paid)
Required if **you or your affiliated organization earns $2 million USD or more per year**.
✅ What's included:
- Use in internal tools and commercial applications
- Modifications and app-level distribution
- 12-month subscription with updates & support
🚫 Not allowed:
- Redistribution in toolkits, SDKs, or platforms
- Use by unlicensed developers
- Competing charting products
---
### 🔄 OEM / Redistribution License (Paid)
Required if you are **embedding ApexCharts into a product or platform used by other people**, such as:
- No-code dashboards
- Developer platforms
- Embedded BI tools
- White-labeled apps or SDKs
✅ What's included:
- Redistribution rights for 1 application or product
- 12-month subscription with updates & support
✅ OEM **not required** if your app simply renders static charts and users **cannot** configure or interact with them.
---
### ⚠️ License Acceptance
By installing ApexCharts (e.g., via `npm install apexcharts`), you are agreeing to the applicable license based on your usage:
- Community License (if under $2M revenue)
- Commercial License (if over $2M revenue)
- OEM License (if redistributing to third-party users)
---
### 🛠 Need a License or Have Questions?
📧 Contact us at [sales@apexcharts.com](mailto:sales@apexcharts.com)
📚 Read full license agreements here: [https://apexcharts.com/license](https://apexcharts.com/license)
---
Thank you for supporting ApexCharts! Your licensing helps keep it free and open for individuals and small teams.

171
node_modules/react-apexcharts/README.md generated vendored Normal file
View File

@@ -0,0 +1,171 @@
<p align="center"><img src="https://apexcharts.com/media/react-apexcharts.png"></p>
<p align="center">
<a href="https://travis-ci.com/apexcharts/react-apexcharts"><img src="https://api.travis-ci.com/apexcharts/react-apexcharts.svg?branch=master" alt="build" /></a>
<a href="https://www.npmjs.com/package/react-apexcharts"><img src="https://img.shields.io/npm/v/react-apexcharts.svg" alt="ver"></a>
</p>
<p align="center">
<a href="https://twitter.com/intent/tweet?text=React-ApexCharts%20A%20React.js%20Chart%20library%20built%20on%20ApexCharts.js&url=https://www.apexcharts.com&hashtags=javascript,charts,react.js,react,apexcharts"><img src="https://img.shields.io/twitter/url/http/shields.io.svg?style=social"> </a>
</p>
<p align="center">React.js wrapper for <a href="https://github.com/apexcharts/apexcharts.js">ApexCharts</a> to build interactive visualizations in react.</p>
<p align="center"><a href="https://apexcharts.com/react-chart-demos/"><img src="https://apexcharts.com/media/apexcharts-banner.png"></a></p>
## Download and Installation
##### Installing via npm
```bash
npm install react-apexcharts apexcharts
```
## Usage
```js
import Chart from 'react-apexcharts'
```
To create a basic bar chart with minimal configuration, write as follows:
```javascript
class App extends Component {
constructor(props) {
super(props);
this.state = {
options: {
chart: {
id: 'apexchart-example'
},
xaxis: {
categories: [1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999]
}
},
series: [{
name: 'series-1',
data: [30, 40, 35, 50, 49, 60, 70, 91, 125]
}]
}
}
render() {
return (
<Chart options={this.state.options} series={this.state.series} type="bar" width={500} height={320} />
)
}
}
```
This will render the following chart
<p align="center"><a href="https://apexcharts.com/javascript-chart-demos/column-charts/"><img src="https://apexcharts.com/media/first-bar-chart.svg"></a></p>
### How do I update the chart?
Simple! Just change the `series` or any `option` and it will automatically re-render the chart.
<p align="center"><a href="https://codesandbox.io/s/mzzq3yqjqj"><img src="https://apexcharts.com/media/react-chart-updation.gif"></a></p>
View this example on <a href="https://codesandbox.io/s/mzzq3yqjqj">codesandbox</a>
**Important:** While updating the options, make sure to update the outermost property even when you need to update the nested property.
✅ Do this
```javascript
this.setState({
options: {
...this.state.options,
xaxis: {
...this.state.options.xaxis,
categories: ['X1', 'X2', 'X3']
}
}
})
```
❌ Not this
```javascript
this.setState({
options.xaxis.categories: ['X1', 'X2', 'X3']
})
```
## Props
| Prop | Type | Description |
| ------------- |-------------| -----|
| **series** | `Array` | The series is a set of data. To know more about the format of the data, checkout [Series docs](https://apexcharts.com/docs/series/) on the website. |
| **type** | `String` | `line`, `area`, `bar`, `pie`, `donut`, `scatter`, `bubble`, `heatmap`, `radialBar` |
| **width** | `Number or String` | Possible values for width can be `100%`, `400px` or `400` (by default is `100%`) |
| **height** | `Number or String` | Possible values for height can be `100%`, `300px` or `300` (by default is `auto`) |
| **options** | `Object` | The configuration object, see options on [API (Reference)](https://apexcharts.com/docs/options/chart/type/) |
## How to call methods of ApexCharts programmatically?
Sometimes, you may want to call other methods of the core ApexCharts library, and you can do so on `ApexCharts` global variable directly
Example
```js
ApexCharts.exec('reactchart-example', 'updateSeries', [{
data: [40, 55, 65, 11, 23, 44, 54, 33]
}])
```
More info on the `.exec()` method can be found <a href="https://apexcharts.com/docs/methods/#exec">here</a>
All other methods of ApexCharts can be called this way
## What's included
The repository includes the following files and directories.
```
react-apexcharts/
├── dist/
│ ├── react-apexcharts.min.js
│ └── react-apexcharts.js
└── example/
│ ├── src/
│ ├── public/
│ ├── package.json
│ └── README.md
└── src/
└── react-apexcharts.jsx
```
## Development
#### Install dependencies
```bash
npm install
```
## Running the example
Basic example including update is included to show how to get started using ApexCharts with React easily.
To run the examples,
```bash
cd example
npm install
npm run start
```
#### Bundling
##### To build for Development
```bash
npm run dev-build
```
##### To build for Production
```bash
npm run build
```
## License
ApexCharts is offered under a **dual-license model** to support individuals, startups, and commercial products of all sizes.
Read full license agreements here: [https://apexcharts.com/license](https://apexcharts.com/license)

View File

@@ -0,0 +1 @@
"use strict";var e=require("react"),r=require("apexcharts"),t=require("prop-types");function n(e,r,t){return(r=function(e){var r=function(e,r){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,r||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==typeof r?r:r+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function i(){return i=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},i.apply(null,arguments)}function o(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function u(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?o(Object(t),!0).forEach((function(r){n(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):o(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}var f=["type","width","height","series","options","chartRef"];function s(e){return e&&"object"===c(e)&&!Array.isArray(e)}function a(e,r){var t=u({},e);return s(e)&&s(r)&&Object.keys(r).forEach((function(n){s(r[n])?t[n]=n in e?a(e[n],r[n]):r[n]:t[n]=r[n]})),t}function l(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new WeakSet;if(e===r)return!0;if("object"!==c(e)||null===e||"object"!==c(r)||null===r)return!1;if(t.has(e)||t.has(r))return!0;t.add(e),t.add(r);var n=Object.keys(e),i=Object.keys(r);if(n.length!==i.length)return!1;for(var o=0,u=n;o<u.length;o++){var f=u[o];if(!i.includes(f)||!l(e[f],r[f],t))return!1}return!0}var p=["type","series","options","width","height","chartRef"];function y(t){var n=t.type,o=void 0===n?"line":n,c=t.width,s=void 0===c?"100%":c,y=t.height,b=void 0===y?"auto":y,h=t.series,v=t.options,d=t.chartRef,O=function(e,r){if(null==e)return{};var t,n,i=function(e,r){if(null==e)return{};var t={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(r.includes(n))continue;t[n]=e[n]}return t}(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)t=o[n],r.includes(t)||{}.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(t,f),g=e.useRef(null),j=e.useRef(null),m=e.useRef(null),w=d||m,P=function(){return a(v,{chart:{type:o,height:b,width:s},series:h})};e.useEffect((function(){return w.current=new r(g.current,P()),w.current.render(),j.current=v,function(){w.current&&"function"==typeof w.current.destroy&&w.current.destroy()}}),[]),e.useEffect((function(){if(w.current&&w.current.w){var e=!l(w.current.w.config.series,h),r=!l(j.current,v)||b!==w.current.opts.chart.height||s!==w.current.opts.chart.width;(e||r)&&(e?r?w.current.updateOptions(P()):w.current.updateSeries(h):w.current.updateOptions(P())),j.current=v}}),[v,h,b,s]);var S,R,E=(S=p,R=u({},O),S.forEach((function(e){delete R[e]})),R);return e.createElement("div",i({ref:g},E))}y.propTypes={type:t.string.isRequired,series:t.array.isRequired,options:t.object.isRequired,width:t.oneOfType([t.string,t.number]),height:t.oneOfType([t.string,t.number]),chartRef:t.shape({current:t.any})},module.exports=y;

View File

@@ -0,0 +1,34 @@
/// <reference types="react"/>
import ApexCharts, { ApexOptions } from "apexcharts";
import React from "react";
/**
* Basic type definitions from https://apexcharts.com/docs/react-charts/#props
*/
declare module "react-apexcharts" {
export interface Props {
type?:
| "line"
| "area"
| "bar"
| "pie"
| "donut"
| "radialBar"
| "scatter"
| "bubble"
| "heatmap"
| "candlestick"
| "boxPlot"
| "radar"
| "polarArea"
| "rangeBar"
| "rangeArea"
| "treemap";
series?: ApexOptions["series"];
width?: string | number;
height?: string | number;
options?: ApexOptions;
chartRef?: React.RefObject<ApexCharts | null>;
[key: string]: any;
}
export default class ReactApexChart extends React.Component<Props> {}
}

View File

@@ -0,0 +1 @@
import r,{useRef as e,useEffect as t}from"react";import n from"apexcharts";import o from"prop-types";function i(r,e,t){return(e=function(r){var e=function(r,e){if("object"!=typeof r||!r)return r;var t=r[Symbol.toPrimitive];if(void 0!==t){var n=t.call(r,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}(r,"string");return"symbol"==typeof e?e:e+""}(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function u(){return u=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},u.apply(null,arguments)}function c(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function f(r){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?c(Object(t),!0).forEach((function(e){i(r,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):c(Object(t)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))}))}return r}function a(r){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},a(r)}var s=["type","width","height","series","options","chartRef"];function p(r){return r&&"object"===a(r)&&!Array.isArray(r)}function l(r,e){var t=f({},r);return p(r)&&p(e)&&Object.keys(e).forEach((function(n){p(e[n])?t[n]=n in r?l(r[n],e[n]):e[n]:t[n]=e[n]})),t}function y(r,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new WeakSet;if(r===e)return!0;if("object"!==a(r)||null===r||"object"!==a(e)||null===e)return!1;if(t.has(r)||t.has(e))return!0;t.add(r),t.add(e);var n=Object.keys(r),o=Object.keys(e);if(n.length!==o.length)return!1;for(var i=0,u=n;i<u.length;i++){var c=u[i];if(!o.includes(c)||!y(r[c],e[c],t))return!1}return!0}var b=["type","series","options","width","height","chartRef"];function h(o){var i=o.type,c=void 0===i?"line":i,a=o.width,p=void 0===a?"100%":a,h=o.height,d=void 0===h?"auto":h,v=o.series,O=o.options,g=o.chartRef,m=function(r,e){if(null==r)return{};var t,n,o=function(r,e){if(null==r)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(e.includes(n))continue;t[n]=r[n]}return t}(r,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(n=0;n<i.length;n++)t=i[n],e.includes(t)||{}.propertyIsEnumerable.call(r,t)&&(o[t]=r[t])}return o}(o,s),j=e(null),w=e(null),P=e(null),S=g||P,E=function(){return l(O,{chart:{type:c,height:d,width:p},series:v})};t((function(){return S.current=new n(j.current,E()),S.current.render(),w.current=O,function(){S.current&&"function"==typeof S.current.destroy&&S.current.destroy()}}),[]),t((function(){if(S.current&&S.current.w){var r=!y(S.current.w.config.series,v),e=!y(w.current,O)||d!==S.current.opts.chart.height||p!==S.current.opts.chart.width;(r||e)&&(r?e?S.current.updateOptions(E()):S.current.updateSeries(v):S.current.updateOptions(E())),w.current=O}}),[O,v,d,p]);var R,k,D=(R=b,k=f({},m),R.forEach((function(r){delete k[r]})),k);return r.createElement("div",u({ref:j},D))}h.propTypes={type:o.string.isRequired,series:o.array.isRequired,options:o.object.isRequired,width:o.oneOfType([o.string,o.number]),height:o.oneOfType([o.string,o.number]),chartRef:o.shape({current:o.any})};export{h as default};

View File

@@ -0,0 +1 @@
var ReactApexChart=function(e,r,t){"use strict";function n(e,r,t){return(r=function(e){var r=function(e,r){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,r||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==typeof r?r:r+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function i(){return i=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},i.apply(null,arguments)}function o(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function u(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?o(Object(t),!0).forEach((function(r){n(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):o(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}var f=["type","width","height","series","options","chartRef"];function a(e){return e&&"object"===c(e)&&!Array.isArray(e)}function s(e,r){var t=u({},e);return a(e)&&a(r)&&Object.keys(r).forEach((function(n){a(r[n])?t[n]=n in e?s(e[n],r[n]):r[n]:t[n]=r[n]})),t}function l(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new WeakSet;if(e===r)return!0;if("object"!==c(e)||null===e||"object"!==c(r)||null===r)return!1;if(t.has(e)||t.has(r))return!0;t.add(e),t.add(r);var n=Object.keys(e),i=Object.keys(r);if(n.length!==i.length)return!1;for(var o=0,u=n;o<u.length;o++){var f=u[o];if(!i.includes(f)||!l(e[f],r[f],t))return!1}return!0}var p=["type","series","options","width","height","chartRef"];function y(t){var n=t.type,o=void 0===n?"line":n,c=t.width,a=void 0===c?"100%":c,y=t.height,b=void 0===y?"auto":y,h=t.series,v=t.options,d=t.chartRef,O=function(e,r){if(null==e)return{};var t,n,i=function(e,r){if(null==e)return{};var t={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(r.includes(n))continue;t[n]=e[n]}return t}(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)t=o[n],r.includes(t)||{}.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(t,f),g=e.useRef(null),j=e.useRef(null),m=e.useRef(null),w=d||m,P=function(){return s(v,{chart:{type:o,height:b,width:a},series:h})};e.useEffect((function(){return w.current=new r(g.current,P()),w.current.render(),j.current=v,function(){w.current&&"function"==typeof w.current.destroy&&w.current.destroy()}}),[]),e.useEffect((function(){if(w.current&&w.current.w){var e=!l(w.current.w.config.series,h),r=!l(j.current,v)||b!==w.current.opts.chart.height||a!==w.current.opts.chart.width;(e||r)&&(e?r?w.current.updateOptions(P()):w.current.updateSeries(h):w.current.updateOptions(P())),j.current=v}}),[v,h,b,a]);var S,R,E=(S=p,R=u({},O),S.forEach((function(e){delete R[e]})),R);return e.createElement("div",i({ref:g},E))}return y.propTypes={type:t.string.isRequired,series:t.array.isRequired,options:t.object.isRequired,width:t.oneOfType([t.string,t.number]),height:t.oneOfType([t.string,t.number]),chartRef:t.shape({current:t.any})},y}(React,ApexCharts,PropTypes);

View File

@@ -0,0 +1 @@
"use strict";var e=require("react"),r=require("apexcharts"),t=require("prop-types");function n(e,r,t){return(r=function(e){var r=function(e,r){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,r||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==typeof r?r:r+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function i(){return i=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},i.apply(null,arguments)}function o(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function u(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?o(Object(t),!0).forEach((function(r){n(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):o(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}var f=["type","width","height","series","options","chartRef"];function s(e){return e&&"object"===c(e)&&!Array.isArray(e)}function a(e,r){var t=u({},e);return s(e)&&s(r)&&Object.keys(r).forEach((function(n){s(r[n])?t[n]=n in e?a(e[n],r[n]):r[n]:t[n]=r[n]})),t}function l(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new WeakSet;if(e===r)return!0;if("object"!==c(e)||null===e||"object"!==c(r)||null===r)return!1;if(t.has(e)||t.has(r))return!0;t.add(e),t.add(r);var n=Object.keys(e),i=Object.keys(r);if(n.length!==i.length)return!1;for(var o=0,u=n;o<u.length;o++){var f=u[o];if(!i.includes(f)||!l(e[f],r[f],t))return!1}return!0}var p=["type","series","options","width","height","chartRef"];function y(t){var n=t.type,o=void 0===n?"line":n,c=t.width,s=void 0===c?"100%":c,y=t.height,b=void 0===y?"auto":y,h=t.series,v=t.options,d=t.chartRef,O=function(e,r){if(null==e)return{};var t,n,i=function(e,r){if(null==e)return{};var t={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(r.includes(n))continue;t[n]=e[n]}return t}(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)t=o[n],r.includes(t)||{}.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(t,f),g=e.useRef(null),j=e.useRef(null),m=e.useRef(null),w=d||m,P=function(){return a(v,{chart:{type:o,height:b,width:s},series:h})};e.useEffect((function(){return w.current=new r(g.current,P()),w.current.render(),j.current=v,function(){w.current&&"function"==typeof w.current.destroy&&w.current.destroy()}}),[]),e.useEffect((function(){if(w.current&&w.current.w){var e=!l(w.current.w.config.series,h),r=!l(j.current,v)||b!==w.current.opts.chart.height||s!==w.current.opts.chart.width;(e||r)&&(e?r?w.current.updateOptions(P()):w.current.updateSeries(h):w.current.updateOptions(P())),j.current=v}}),[v,h,b,s]);var S,R,E=(S=p,R=u({},O),S.forEach((function(e){delete R[e]})),R);return e.createElement("div",i({ref:g},E))}y.propTypes={type:t.string.isRequired,series:t.array.isRequired,options:t.object.isRequired,width:t.oneOfType([t.string,t.number]),height:t.oneOfType([t.string,t.number]),chartRef:t.shape({current:t.any})},module.exports=y;

69
node_modules/react-apexcharts/package.json generated vendored Normal file
View File

@@ -0,0 +1,69 @@
{
"name": "react-apexcharts",
"version": "1.9.0",
"description": "React.js wrapper for ApexCharts",
"main": "dist/react-apexcharts.cjs.js",
"module": "dist/react-apexcharts.esm.js",
"browser": "dist/react-apexcharts.iife.min.js",
"types": "types/react-apexcharts.d.ts",
"exports": {
".": {
"import": "./dist/react-apexcharts.esm.js",
"require": "./dist/react-apexcharts.cjs.js",
"types": "./types/react-apexcharts.d.ts"
}
},
"files": [
"dist",
"types"
],
"scripts": {
"build": "rollup -c rollup.config.js",
"test": "jest"
},
"keywords": [
"react-charts",
"react",
"charts",
"graphs",
"apexcharts",
"data-visualization"
],
"author": {
"name": "Juned Chhipa",
"email": "juned.chhipa@gmail.com"
},
"bugs": {
"url": "https://github.com/apexcharts/react-apexcharts/issues"
},
"license": "SEE LICENSE IN LICENSE",
"dependencies": {
"prop-types": "^15.8.1"
},
"peerDependencies": {
"apexcharts": ">=4.0.0",
"react": ">=16.8.0"
},
"devDependencies": {
"@babel/core": "^7.25.8",
"@babel/plugin-proposal-object-rest-spread": "^7.20.7",
"@babel/preset-env": "^7.25.8",
"@babel/preset-react": "^7.25.7",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-node-resolve": "^15.3.0",
"@rollup/plugin-terser": "^0.4.4",
"@types/react": "^18.3.11",
"eslint": "^9.12.0",
"eslint-plugin-react": "^7.37.1",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-test-renderer": "^18.3.1",
"rollup": "4.24.0"
},
"repository": {
"type": "git",
"url": "https://github.com/apexcharts/react-apexcharts.git"
}
}

View File

@@ -0,0 +1,34 @@
/// <reference types="react"/>
import ApexCharts, { ApexOptions } from "apexcharts";
import React from "react";
/**
* Basic type definitions from https://apexcharts.com/docs/react-charts/#props
*/
declare module "react-apexcharts" {
export interface Props {
type?:
| "line"
| "area"
| "bar"
| "pie"
| "donut"
| "radialBar"
| "scatter"
| "bubble"
| "heatmap"
| "candlestick"
| "boxPlot"
| "radar"
| "polarArea"
| "rangeBar"
| "rangeArea"
| "treemap";
series?: ApexOptions["series"];
width?: string | number;
height?: string | number;
options?: ApexOptions;
chartRef?: React.RefObject<ApexCharts | null>;
[key: string]: any;
}
export default class ReactApexChart extends React.Component<Props> {}
}