uzairrizwan1 7 ay önce
ebeveyn
işleme
169da97c29
4 değiştirilmiş dosya ile 123 ekleme ve 45 silme
  1. 91 0
      myapp/package-lock.json
  2. 2 0
      myapp/package.json
  3. 2 27
      myapp/public/index.html
  4. 28 18
      myapp/src/App.js

+ 91 - 0
myapp/package-lock.json

@@ -12,7 +12,9 @@
12 12
         "@testing-library/jest-dom": "^6.6.3",
13 13
         "@testing-library/react": "^16.3.0",
14 14
         "@testing-library/user-event": "^13.5.0",
15
+        "apexcharts": "^4.7.0",
15 16
         "react": "^19.1.0",
17
+        "react-apexcharts": "^1.7.0",
16 18
         "react-dom": "^19.1.0",
17 19
         "react-scripts": "5.0.1",
18 20
         "web-vitals": "^2.1.4"
@@ -3203,6 +3205,62 @@
3203 3205
         "string.prototype.matchall": "^4.0.6"
3204 3206
       }
3205 3207
     },
3208
+    "node_modules/@svgdotjs/svg.draggable.js": {
3209
+      "version": "3.0.6",
3210
+      "resolved": "https://registry.npmjs.org/@svgdotjs/svg.draggable.js/-/svg.draggable.js-3.0.6.tgz",
3211
+      "integrity": "sha512-7iJFm9lL3C40HQcqzEfezK2l+dW2CpoVY3b77KQGqc8GXWa6LhhmX5Ckv7alQfUXBuZbjpICZ+Dvq1czlGx7gA==",
3212
+      "license": "MIT",
3213
+      "peerDependencies": {
3214
+        "@svgdotjs/svg.js": "^3.2.4"
3215
+      }
3216
+    },
3217
+    "node_modules/@svgdotjs/svg.filter.js": {
3218
+      "version": "3.0.9",
3219
+      "resolved": "https://registry.npmjs.org/@svgdotjs/svg.filter.js/-/svg.filter.js-3.0.9.tgz",
3220
+      "integrity": "sha512-/69XMRCDoam2HgC4ldHIaDgeQf1ViHIsa0Ld4uWgiXtZ+E24DWHe/9Ib6kbNiZ7WRIdlVokUDR1Fg0kjIpkfbw==",
3221
+      "license": "MIT",
3222
+      "dependencies": {
3223
+        "@svgdotjs/svg.js": "^3.2.4"
3224
+      },
3225
+      "engines": {
3226
+        "node": ">= 0.8.0"
3227
+      }
3228
+    },
3229
+    "node_modules/@svgdotjs/svg.js": {
3230
+      "version": "3.2.4",
3231
+      "resolved": "https://registry.npmjs.org/@svgdotjs/svg.js/-/svg.js-3.2.4.tgz",
3232
+      "integrity": "sha512-BjJ/7vWNowlX3Z8O4ywT58DqbNRyYlkk6Yz/D13aB7hGmfQTvGX4Tkgtm/ApYlu9M7lCQi15xUEidqMUmdMYwg==",
3233
+      "license": "MIT",
3234
+      "funding": {
3235
+        "type": "github",
3236
+        "url": "https://github.com/sponsors/Fuzzyma"
3237
+      }
3238
+    },
3239
+    "node_modules/@svgdotjs/svg.resize.js": {
3240
+      "version": "2.0.5",
3241
+      "resolved": "https://registry.npmjs.org/@svgdotjs/svg.resize.js/-/svg.resize.js-2.0.5.tgz",
3242
+      "integrity": "sha512-4heRW4B1QrJeENfi7326lUPYBCevj78FJs8kfeDxn5st0IYPIRXoTtOSYvTzFWgaWWXd3YCDE6ao4fmv91RthA==",
3243
+      "license": "MIT",
3244
+      "engines": {
3245
+        "node": ">= 14.18"
3246
+      },
3247
+      "peerDependencies": {
3248
+        "@svgdotjs/svg.js": "^3.2.4",
3249
+        "@svgdotjs/svg.select.js": "^4.0.1"
3250
+      }
3251
+    },
3252
+    "node_modules/@svgdotjs/svg.select.js": {
3253
+      "version": "4.0.3",
3254
+      "resolved": "https://registry.npmjs.org/@svgdotjs/svg.select.js/-/svg.select.js-4.0.3.tgz",
3255
+      "integrity": "sha512-qkMgso1sd2hXKd1FZ1weO7ANq12sNmQJeGDjs46QwDVsxSRcHmvWKL2NDF7Yimpwf3sl5esOLkPqtV2bQ3v/Jg==",
3256
+      "license": "MIT",
3257
+      "engines": {
3258
+        "node": ">= 14.18"
3259
+      },
3260
+      "peerDependencies": {
3261
+        "@svgdotjs/svg.js": "^3.2.4"
3262
+      }
3263
+    },
3206 3264
     "node_modules/@svgr/babel-plugin-add-jsx-attribute": {
3207 3265
       "version": "5.4.0",
3208 3266
       "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-5.4.0.tgz",
@@ -4308,6 +4366,12 @@
4308 4366
       "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==",
4309 4367
       "license": "Apache-2.0"
4310 4368
     },
4369
+    "node_modules/@yr/monotone-cubic-spline": {
4370
+      "version": "1.0.3",
4371
+      "resolved": "https://registry.npmjs.org/@yr/monotone-cubic-spline/-/monotone-cubic-spline-1.0.3.tgz",
4372
+      "integrity": "sha512-FQXkOta0XBSUPHndIKON2Y9JeQz5ZeMqLYZVVK93FliNBFm7LNMIZmY6FrMEB9XPcDbE2bekMbZD6kzDkxwYjA==",
4373
+      "license": "MIT"
4374
+    },
4311 4375
     "node_modules/abab": {
4312 4376
       "version": "2.0.6",
4313 4377
       "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz",
@@ -4569,6 +4633,20 @@
4569 4633
         "node": ">= 8"
4570 4634
       }
4571 4635
     },
4636
+    "node_modules/apexcharts": {
4637
+      "version": "4.7.0",
4638
+      "resolved": "https://registry.npmjs.org/apexcharts/-/apexcharts-4.7.0.tgz",
4639
+      "integrity": "sha512-iZSrrBGvVlL+nt2B1NpqfDuBZ9jX61X9I2+XV0hlYXHtTwhwLTHDKGXjNXAgFBDLuvSYCB/rq2nPWVPRv2DrGA==",
4640
+      "license": "MIT",
4641
+      "dependencies": {
4642
+        "@svgdotjs/svg.draggable.js": "^3.0.4",
4643
+        "@svgdotjs/svg.filter.js": "^3.0.8",
4644
+        "@svgdotjs/svg.js": "^3.2.4",
4645
+        "@svgdotjs/svg.resize.js": "^2.0.2",
4646
+        "@svgdotjs/svg.select.js": "^4.0.1",
4647
+        "@yr/monotone-cubic-spline": "^1.0.3"
4648
+      }
4649
+    },
4572 4650
     "node_modules/arg": {
4573 4651
       "version": "5.0.2",
4574 4652
       "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz",
@@ -13768,6 +13846,19 @@
13768 13846
         "node": ">=0.10.0"
13769 13847
       }
13770 13848
     },
13849
+    "node_modules/react-apexcharts": {
13850
+      "version": "1.7.0",
13851
+      "resolved": "https://registry.npmjs.org/react-apexcharts/-/react-apexcharts-1.7.0.tgz",
13852
+      "integrity": "sha512-03oScKJyNLRf0Oe+ihJxFZliBQM9vW3UWwomVn4YVRTN1jsIR58dLWt0v1sb8RwJVHDMbeHiKQueM0KGpn7nOA==",
13853
+      "license": "MIT",
13854
+      "dependencies": {
13855
+        "prop-types": "^15.8.1"
13856
+      },
13857
+      "peerDependencies": {
13858
+        "apexcharts": ">=4.0.0",
13859
+        "react": ">=0.13"
13860
+      }
13861
+    },
13771 13862
     "node_modules/react-app-polyfill": {
13772 13863
       "version": "3.0.0",
13773 13864
       "resolved": "https://registry.npmjs.org/react-app-polyfill/-/react-app-polyfill-3.0.0.tgz",

+ 2 - 0
myapp/package.json

@@ -7,7 +7,9 @@
7 7
     "@testing-library/jest-dom": "^6.6.3",
8 8
     "@testing-library/react": "^16.3.0",
9 9
     "@testing-library/user-event": "^13.5.0",
10
+    "apexcharts": "^4.7.0",
10 11
     "react": "^19.1.0",
12
+    "react-apexcharts": "^1.7.0",
11 13
     "react-dom": "^19.1.0",
12 14
     "react-scripts": "5.0.1",
13 15
     "web-vitals": "^2.1.4"

+ 2 - 27
myapp/public/index.html

@@ -1,3 +1,4 @@
1
+<!-- public/index.html -->
1 2
 <!DOCTYPE html>
2 3
 <html lang="en">
3 4
   <head>
@@ -5,39 +6,13 @@
5 6
     <link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
6 7
     <meta name="viewport" content="width=device-width, initial-scale=1" />
7 8
     <meta name="theme-color" content="#000000" />
8
-    <meta
9
-      name="description"
10
-      content="Web site created using create-react-app"
11
-    />
9
+    <meta name="description" content="Web site created using create-react-app" />
12 10
     <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
13
-    <!--
14
-      manifest.json provides metadata used when your web app is installed on a
15
-      user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
16
-    -->
17 11
     <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
18
-    <!--
19
-      Notice the use of %PUBLIC_URL% in the tags above.
20
-      It will be replaced with the URL of the `public` folder during the build.
21
-      Only files inside the `public` folder can be referenced from the HTML.
22
-
23
-      Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
24
-      work correctly both with client-side routing and a non-root public URL.
25
-      Learn how to configure a non-root public URL by running `npm run build`.
26
-    -->
27 12
     <title>React App</title>
28 13
   </head>
29 14
   <body>
30 15
     <noscript>You need to enable JavaScript to run this app.</noscript>
31 16
     <div id="root"></div>
32
-    <!--
33
-      This HTML file is a template.
34
-      If you open it directly in the browser, you will see an empty page.
35
-
36
-      You can add webfonts, meta tags, or analytics to this file.
37
-      The build step will place the bundled scripts into the <body> tag.
38
-
39
-      To begin the development, run `npm start` or `yarn start`.
40
-      To create a production bundle, use `npm run build` or `yarn build`.
41
-    -->
42 17
   </body>
43 18
 </html>

+ 28 - 18
myapp/src/App.js

@@ -1,25 +1,35 @@
1
-import logo from './logo.svg';
2
-import './App.css';
1
+// src/App.js
2
+import React from "react";
3
+import Chart from "react-apexcharts";
4
+
5
+const App = () => {
6
+  const chartOptions = {
7
+    chart: {
8
+      id: "basic-bar"
9
+    },
10
+    xaxis: {
11
+      categories: [1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998]
12
+    }
13
+  };
14
+
15
+  const chartSeries = [
16
+    {
17
+      name: "series-1",
18
+      data: [30, 40, 45, 50, 49, 60, 70, 91]
19
+    }
20
+  ];
3 21
 
4
-function App() {
5 22
   return (
6 23
     <div className="App">
7
-      <header className="App-header">
8
-        <img src={logo} className="App-logo" alt="logo" />
9
-        <p>
10
-          Edit <code>src/App.js</code> and save to reload.
11
-        </p>
12
-        <a
13
-          className="App-link"
14
-          href="https://reactjs.org"
15
-          target="_blank"
16
-          rel="noopener noreferrer"
17
-        >
18
-          Learn React
19
-        </a>
20
-      </header>
24
+      <h2>ApexCharts Example</h2>
25
+      <Chart
26
+        options={chartOptions}
27
+        series={chartSeries}
28
+        type="bar"
29
+        width="600"
30
+      />
21 31
     </div>
22 32
   );
23
-}
33
+};
24 34
 
25 35
 export default App;