avances en plantillas
This commit is contained in:
parent
0f84beacf1
commit
da0530d79b
2062 changed files with 598814 additions and 22 deletions
97
storage/public/dist/libs/apexcharts/LICENSE
vendored
Normal file
97
storage/public/dist/libs/apexcharts/LICENSE
vendored
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
## 📄 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**.
|
||||
|
||||
✅ What’s 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)
|
||||
|
||||
The Commercial License applies to all paid SKUs (Pro, Premium, and OEM/Embedded).
|
||||
|
||||
The **Community License** is available at no cost **only** to organizations with **annual revenue under \$2M USD**.
|
||||
If your organization earns \$2M USD or more annually, you must purchase one of our paid licenses.
|
||||
|
||||
✅ 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
|
||||
|
||||
---
|
||||
|
||||
### 🏛 Non-Profit Tiers
|
||||
|
||||
Non-Profits are treated like commercial entities:
|
||||
|
||||
- Annual operating budget **less than \$2 million USD**
|
||||
- _Eligible for Community licenses_
|
||||
|
||||
or
|
||||
|
||||
- Annual operating budget **greater than \$2 million USD**
|
||||
- _Commerical license with possible discounts for Community, Pro, Premium and OEM 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
|
||||
- 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.
|
||||
283
storage/public/dist/libs/apexcharts/README.md
vendored
Normal file
283
storage/public/dist/libs/apexcharts/README.md
vendored
Normal file
|
|
@ -0,0 +1,283 @@
|
|||
<p align="center"><img src="https://apexcharts.com/media/apexcharts-logo.png"></p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://travis-ci.com/apexcharts/apexcharts.js"><img src="https://api.travis-ci.com/apexcharts/apexcharts.js.svg?branch=master" alt="build" /></a>
|
||||
<img alt="downloads" src="https://img.shields.io/npm/dm/apexcharts.svg"/>
|
||||
<a href="https://www.npmjs.com/package/apexcharts"><img src="https://img.shields.io/npm/v/apexcharts.svg" alt="ver"></a>
|
||||
<img alt="size" src="https://badgen.net/bundlephobia/min/apexcharts?label=size">
|
||||
<a href="https://cdn.jsdelivr.net/npm/apexcharts@3.12.0/types/apexcharts.d.ts"><img src="https://badgen.net/npm/types/apexcharts"/></a>
|
||||
<a href="https://github.com/prettier/prettier"><img src="https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square" alt="prettier"></a>
|
||||
<a href="https://www.jsdelivr.com/package/npm/apexcharts"><img src="https://data.jsdelivr.com/v1/package/npm/apexcharts/badge" alt="jsdelivr" /></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://twitter.com/intent/tweet?text=Create%20visualizations%20with%20this%20free%20and%20open-source%20JavaScript%20Chart%20library&url=https://www.apexcharts.com&hashtags=javascript,charts,visualizations,developers,apexcharts"><img src="https://img.shields.io/twitter/url/http/shields.io.svg?style=social"> </a>
|
||||
</p>
|
||||
|
||||
<p align="center">A modern JavaScript charting library that allows you to build interactive data visualizations with simple API and 100+ ready-to-use samples. Packed with the features that you expect, ApexCharts includes over a dozen chart types that deliver beautiful, responsive visualizations in your apps and dashboards.</p>
|
||||
|
||||
<p align="center"><a href="https://apexcharts.com/javascript-chart-demos/"><img
|
||||
src="https://apexcharts.com/media/apexcharts-banner.png"></a></p>
|
||||
|
||||
<br />
|
||||
|
||||
## Download and Installation
|
||||
|
||||
##### Installing via npm
|
||||
|
||||
```bash
|
||||
npm install apexcharts --save
|
||||
```
|
||||
|
||||
##### Direct <script> include
|
||||
|
||||
```html
|
||||
<script src="https://cdn.jsdelivr.net/npm/apexcharts"></script>
|
||||
```
|
||||
|
||||
## Wrappers for Vue/React/Angular/Stencil
|
||||
|
||||
Integrate easily with 3rd party frameworks
|
||||
|
||||
- [vue-apexcharts](https://github.com/apexcharts/vue-apexcharts)
|
||||
- [react-apexcharts](https://github.com/apexcharts/react-apexcharts)
|
||||
- [ng-apexcharts](https://github.com/apexcharts/ng-apexcharts) - Plugin by [Morris Janatzek](https://morrisj.net/)
|
||||
- [stencil-apexcharts](https://github.com/apexcharts/stencil-apexcharts)
|
||||
|
||||
### Unofficial Wrappers
|
||||
|
||||
Useful links to wrappers other than the popular frameworks mentioned above
|
||||
|
||||
- [apexcharter](https://github.com/dreamRs/apexcharter) - Htmlwidget for ApexCharts
|
||||
- [apexcharts.rb](https://github.com/styd/apexcharts.rb) - Ruby wrapper for ApexCharts
|
||||
- [larapex-charts](https://github.com/ArielMejiaDev/larapex-charts) - Laravel wrapper for ApexCharts
|
||||
- [blazor-apexcharts](https://github.com/apexcharts/Blazor-ApexCharts) - Blazor wrapper for ApexCharts [demo](https://apexcharts.github.io/Blazor-ApexCharts/)
|
||||
- [svelte-apexcharts](https://github.com/galkatz373/svelte-apexcharts) - Svelte wrapper for ApexCharts
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
### Client-Side (Browser)
|
||||
|
||||
```js
|
||||
import ApexCharts from 'apexcharts'
|
||||
```
|
||||
|
||||
To create a basic bar chart with minimal configuration, write as follows:
|
||||
|
||||
```js
|
||||
var options = {
|
||||
chart: {
|
||||
type: 'bar'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: 'sales',
|
||||
data: [30, 40, 35, 50, 49, 60, 70, 91, 125]
|
||||
}
|
||||
],
|
||||
xaxis: {
|
||||
categories: [1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999]
|
||||
}
|
||||
}
|
||||
|
||||
var chart = new ApexCharts(document.querySelector('#chart'), options)
|
||||
chart.render()
|
||||
```
|
||||
|
||||
### Server-Side Rendering (SSR)
|
||||
|
||||
ApexCharts now supports SSR for Next.js, Nuxt, SvelteKit, Astro, and other meta-frameworks:
|
||||
|
||||
```js
|
||||
import ApexCharts from 'apexcharts/ssr'
|
||||
|
||||
const chartHTML = await ApexCharts.renderToHTML({
|
||||
series: [{ data: [30, 40, 35, 50, 49, 60, 70, 91, 125] }],
|
||||
chart: { type: 'bar' },
|
||||
xaxis: {
|
||||
categories: [1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999]
|
||||
}
|
||||
}, {
|
||||
width: 500,
|
||||
height: 300
|
||||
})
|
||||
|
||||
// Returns hydration-ready HTML with embedded SVG
|
||||
```
|
||||
|
||||
```js
|
||||
// Client-side hydration (makes chart interactive)
|
||||
import ApexCharts from 'apexcharts/client'
|
||||
|
||||
// Hydrate specific chart
|
||||
ApexCharts.hydrate(document.getElementById('my-chart'))
|
||||
|
||||
// Or hydrate all charts on the page
|
||||
ApexCharts.hydrateAll()
|
||||
```
|
||||
|
||||
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>
|
||||
|
||||
### Tree-shaking — ship only what you use
|
||||
|
||||
By default `import ApexCharts from 'apexcharts'` includes everything. If you want a smaller bundle, import from `apexcharts/core` and add only the chart types and features you need:
|
||||
|
||||
```js
|
||||
import ApexCharts from 'apexcharts/core' // bare class — no chart types, no features
|
||||
|
||||
// Import by the exact chart type name you use in { chart: { type: '...' } }
|
||||
import 'apexcharts/line'
|
||||
import 'apexcharts/bar'
|
||||
// import 'apexcharts/area'
|
||||
// import 'apexcharts/scatter'
|
||||
|
||||
// Optional features
|
||||
import 'apexcharts/features/legend'
|
||||
import 'apexcharts/features/toolbar' // zoom/pan toolbar
|
||||
// import 'apexcharts/features/exports' // SVG/PNG/CSV download
|
||||
// import 'apexcharts/features/annotations'
|
||||
// import 'apexcharts/features/keyboard' // keyboard navigation
|
||||
```
|
||||
|
||||
**Vite users:** Vite's dependency pre-bundler can create two separate copies of ApexCharts, causing `"chart type X is not registered"` errors even when the import is present. Fix this by listing all apexcharts sub-entries in `optimizeDeps.include`:
|
||||
|
||||
```js
|
||||
// vite.config.js
|
||||
export default {
|
||||
optimizeDeps: {
|
||||
include: [
|
||||
'apexcharts/core',
|
||||
'apexcharts/line', // add only the ones you import
|
||||
'apexcharts/bar',
|
||||
'apexcharts/features/legend',
|
||||
'apexcharts/features/toolbar',
|
||||
// ...
|
||||
],
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
See [tree-shaking](https://apexcharts.com/docs/tree-shaking/) for the full guide.
|
||||
|
||||
### A little more than the basic
|
||||
|
||||
You can create a combination of different charts, sync them and give your desired look with unlimited possibilities.
|
||||
Below is an example of synchronized charts with github style.
|
||||
|
||||
<p align="center"><a href="https://apexcharts.com/javascript-chart-demos/area-charts/github-style/"><img src="https://apexcharts.com/media/github-charts.gif"></a></p>
|
||||
|
||||
## Interactivity
|
||||
|
||||
Zoom, Pan, and Scroll through data. Make selections and load other charts using those selections.
|
||||
An example showing some interactivity
|
||||
|
||||
<p align="center"><a href="https://codepen.io/apexcharts/pen/QrbEQg" target="_blank"><img src="https://apexcharts.com/media/interactivity.gif" alt="interactive chart"></a></p>
|
||||
|
||||
## Dynamic Series Update
|
||||
|
||||
Another approach is to Drill down charts where one selection updates the data of other charts.
|
||||
An example of loading dynamic series into charts is shown below
|
||||
|
||||
<p align="center"><a href="https://apexcharts.com/javascript-chart-demos/column-charts/dynamic-loaded-chart/"><img src="https://apexcharts.com/media/dynamic-selection.gif" alt="dynamic-loading-chart" /></a></p>
|
||||
|
||||
## Annotations
|
||||
|
||||
Annotations allow you to write custom text on specific values or on axes values. Valuable to expand the visual appeal of your chart and make it more informative.
|
||||
|
||||
<p align="center"><a href="https://apexcharts.com/docs/annotations/"><img src="https://apexcharts.com/media/annotations.png" alt="annotations" /></a></p>
|
||||
|
||||
## Mixed Charts
|
||||
|
||||
You can combine more than one chart type to create a combo/mixed chart. Possible combinations can be line/area/column together in a single chart. Each chart type can have its own y-axis.
|
||||
|
||||
<p align="center"><a href="https://apexcharts.com/javascript-chart-demos/mixed-charts/"><img src="https://apexcharts.com/wp-content/uploads/2018/05/line-column-area-mixed-chart.svg" alt="annotations" width="490" /></a></p>
|
||||
|
||||
## Candlestick
|
||||
|
||||
Use a candlestick chart (a common financial chart) to describe price changes of a security, derivative, or currency. The below image shows how you can use another chart as a brush/preview pane which acts as a handle to browse the main candlestick chart.
|
||||
|
||||
<p align="center"><a href="https://apexcharts.com/javascript-chart-demos/candlestick-charts/"><img src="https://apexcharts.com/media/candlestick.png" alt="candlestick" width="490" /></a></p>
|
||||
|
||||
## Heatmaps
|
||||
|
||||
Use Heatmaps to represent data through colors and shades. Frequently used with bigger data collections, they are valuable for recognizing patterns and areas of focus.
|
||||
|
||||
<p align="center"><a href="https://apexcharts.com/javascript-chart-demos/heatmap-charts/"><img src="https://apexcharts.com/media/heatmap-charts.png" alt="heatmap" /></a></p>
|
||||
|
||||
## Gauges
|
||||
|
||||
The tiny gauges are an important part of a dashboard and are useful in displaying single-series data. A demo of these gauges:
|
||||
|
||||
<p align="center"><a href="https://apexcharts.com/javascript-chart-demos/radialbar-charts/"><img src="https://apexcharts.com/media/radialbars-gauges.png" width="490" alt="radialbar-chart" /></a></p>
|
||||
|
||||
## Sparklines
|
||||
|
||||
Utilize sparklines to indicate trends in data, for example, occasional increments or declines, monetary cycles, or to feature the most extreme and least values:
|
||||
|
||||
<p align="center"><a href="https://apexcharts.com/javascript-chart-demos/sparklines/"><img src="https://apexcharts.com/media/sparklines.png" alt="sparkline-chart" /></a></p>
|
||||
|
||||
|
||||
## Need Advanced Data Grid for your next project?
|
||||
We partnered with Infragistics, creators of the fastest data grids on the planet! Ignite UI Grids can handle unlimited rows and columns of data while providing access to custom templates and real-time data updates.
|
||||
|
||||
<p align="center"><a href="https://www.infragistics.com/products/ignite-ui-angular/angular/components/grid/grid" target="_blank"><img src="https://apexcharts.com/media/infragistics-data-grid.png" /></a></p>
|
||||
|
||||
Featuring an intuitive API for easy theming and branding, you can quickly bind to data with minimal hand-on coding. The grid is available in most of your favorite frameworks:
|
||||
|
||||
<a target="_blank" href="https://www.infragistics.com/products/ignite-ui-angular/angular/components/grid/grid">Angular Data Grid</a> | <a target="_blank" href="https://www.infragistics.com/products/ignite-ui-react/react/components/grids">React Data Grid</a> | <a target="_blank" href="https://www.infragistics.com/products/ignite-ui-blazor/blazor/components/data-grid">Blazor Data Grid</a> | <a target="_blank" href="https://www.infragistics.com/products/ignite-ui-web-components/web-components/components/data-grid">Web Components DataGrid</a> | <a target="_blank" href="https://www.igniteui.com/grid/overview">jQuery Data Grid </a>
|
||||
|
||||
## What's included
|
||||
|
||||
The download bundle includes the following files and directories providing a minified single file in the dist folder. Every asset including icon/css is bundled in the js itself to avoid loading multiple files.
|
||||
|
||||
```
|
||||
apexcharts/
|
||||
├── dist/
|
||||
│ └── apexcharts.min.js
|
||||
├── src/
|
||||
│ ├── assets/
|
||||
│ ├── charts/
|
||||
│ ├── modules/
|
||||
│ ├── utils/
|
||||
│ └── apexcharts.js
|
||||
└── samples/
|
||||
```
|
||||
|
||||
## Development
|
||||
|
||||
#### Install dependencies and run the project
|
||||
|
||||
```bash
|
||||
npm install
|
||||
npm run dev
|
||||
```
|
||||
|
||||
This will start the webpack watch and any changes you make to `src` folder will auto-compile and output will be produced in the `dist` folder.
|
||||
|
||||
More details in [Contributing Guidelines](CONTRIBUTING.md).
|
||||
|
||||
#### Minifying the src
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
|
||||
## Where do I go next?
|
||||
|
||||
Head over to the <a href="https://apexcharts.com/docs/">documentation</a> section to read more about how to use different kinds of charts and explore all options.
|
||||
|
||||
## Contacts
|
||||
|
||||
Email: <a href="info@apexcharts.com">info@apexcharts.com</a>
|
||||
|
||||
Twitter: <a href="https://twitter.com/apexcharts">@apexcharts</a>
|
||||
|
||||
Facebook: <a href="https://facebook.com/apexcharts">fb.com/apexcharts</a>
|
||||
|
||||
## 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)
|
||||
74
storage/public/dist/libs/apexcharts/dist/apexcharts-legend.css
vendored
Normal file
74
storage/public/dist/libs/apexcharts/dist/apexcharts-legend.css
vendored
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
.apexcharts-flip-y {
|
||||
transform: scaleY(-1) translateY(-100%);
|
||||
transform-origin: top;
|
||||
transform-box: fill-box;
|
||||
}
|
||||
.apexcharts-flip-x {
|
||||
transform: scaleX(-1);
|
||||
transform-origin: center;
|
||||
transform-box: fill-box;
|
||||
}
|
||||
.apexcharts-legend {
|
||||
display: flex;
|
||||
overflow: auto;
|
||||
padding: 0 10px;
|
||||
}
|
||||
.apexcharts-legend.apexcharts-legend-group-horizontal {
|
||||
flex-direction: column;
|
||||
}
|
||||
.apexcharts-legend-group {
|
||||
display: flex;
|
||||
}
|
||||
.apexcharts-legend-group-vertical {
|
||||
flex-direction: column-reverse;
|
||||
}
|
||||
.apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {
|
||||
flex-wrap: wrap
|
||||
}
|
||||
.apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {
|
||||
flex-direction: column;
|
||||
bottom: 0;
|
||||
}
|
||||
.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {
|
||||
justify-content: flex-start;
|
||||
align-items: flex-start;
|
||||
}
|
||||
.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {
|
||||
justify-content: flex-end;
|
||||
align-items: flex-end;
|
||||
}
|
||||
.apexcharts-legend-series {
|
||||
cursor: pointer;
|
||||
line-height: normal;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.apexcharts-legend-text {
|
||||
position: relative;
|
||||
font-size: 14px;
|
||||
}
|
||||
.apexcharts-legend-text *, .apexcharts-legend-marker * {
|
||||
pointer-events: none;
|
||||
}
|
||||
.apexcharts-legend-marker {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
margin-right: 1px;
|
||||
}
|
||||
|
||||
.apexcharts-legend-series.apexcharts-no-click {
|
||||
cursor: auto;
|
||||
}
|
||||
.apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {
|
||||
display: none !important;
|
||||
}
|
||||
.apexcharts-inactive-legend {
|
||||
opacity: 0.45;
|
||||
}
|
||||
5
storage/public/dist/libs/apexcharts/dist/apexcharts.common.js
vendored
Normal file
5
storage/public/dist/libs/apexcharts/dist/apexcharts.common.js
vendored
Normal file
File diff suppressed because one or more lines are too long
804
storage/public/dist/libs/apexcharts/dist/apexcharts.css
vendored
Normal file
804
storage/public/dist/libs/apexcharts/dist/apexcharts.css
vendored
Normal file
|
|
@ -0,0 +1,804 @@
|
|||
@keyframes opaque {
|
||||
0% {
|
||||
opacity: 0
|
||||
}
|
||||
|
||||
to {
|
||||
opacity: 1
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes resizeanim {
|
||||
|
||||
0%,
|
||||
to {
|
||||
opacity: 0
|
||||
}
|
||||
}
|
||||
|
||||
.apexcharts-canvas {
|
||||
position: relative;
|
||||
direction: ltr !important;
|
||||
user-select: none
|
||||
}
|
||||
|
||||
.apexcharts-canvas ::-webkit-scrollbar {
|
||||
-webkit-appearance: none;
|
||||
width: 6px
|
||||
}
|
||||
|
||||
.apexcharts-canvas ::-webkit-scrollbar-thumb {
|
||||
border-radius: 4px;
|
||||
background-color: rgba(0, 0, 0, .5);
|
||||
box-shadow: 0 0 1px rgba(255, 255, 255, .5);
|
||||
-webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5)
|
||||
}
|
||||
|
||||
.apexcharts-inner {
|
||||
position: relative
|
||||
}
|
||||
|
||||
.apexcharts-text tspan {
|
||||
font-family: inherit
|
||||
}
|
||||
|
||||
rect.legend-mouseover-inactive,
|
||||
.legend-mouseover-inactive rect,
|
||||
.legend-mouseover-inactive path,
|
||||
.legend-mouseover-inactive circle,
|
||||
.legend-mouseover-inactive line,
|
||||
.legend-mouseover-inactive text.apexcharts-yaxis-title-text,
|
||||
.legend-mouseover-inactive text.apexcharts-yaxis-label {
|
||||
transition: .15s ease all;
|
||||
opacity: .2
|
||||
}
|
||||
|
||||
.apexcharts-legend-text {
|
||||
padding-left: 15px;
|
||||
margin-left: -15px;
|
||||
}
|
||||
|
||||
.apexcharts-legend-series[role="button"]:focus {
|
||||
outline: 2px solid #008FFB;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.apexcharts-legend-series[role="button"]:focus:not(:focus-visible) {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.apexcharts-legend-series[role="button"]:focus-visible {
|
||||
outline: 2px solid #008FFB;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.apexcharts-series-collapsed {
|
||||
opacity: 0
|
||||
}
|
||||
|
||||
/* Keyboard navigation focus indicator on SVG data elements.
|
||||
SVG elements don't support CSS outline, so we use stroke. */
|
||||
.apexcharts-bar-area.apexcharts-keyboard-focused,
|
||||
.apexcharts-candlestick-area.apexcharts-keyboard-focused,
|
||||
.apexcharts-boxPlot-area.apexcharts-keyboard-focused,
|
||||
.apexcharts-rangebar-area.apexcharts-keyboard-focused,
|
||||
.apexcharts-pie-area.apexcharts-keyboard-focused,
|
||||
.apexcharts-heatmap-rect.apexcharts-keyboard-focused,
|
||||
.apexcharts-treemap-rect.apexcharts-keyboard-focused {
|
||||
stroke: #008FFB;
|
||||
stroke-width: 2;
|
||||
stroke-opacity: 1;
|
||||
}
|
||||
|
||||
.apexcharts-tooltip {
|
||||
border-radius: 5px;
|
||||
box-shadow: 2px 2px 6px -4px #999;
|
||||
cursor: default;
|
||||
font-size: 14px;
|
||||
left: 62px;
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
z-index: 12;
|
||||
transition: .15s ease all
|
||||
}
|
||||
|
||||
.apexcharts-tooltip.apexcharts-active {
|
||||
opacity: 1;
|
||||
transition: .15s ease all
|
||||
}
|
||||
|
||||
.apexcharts-tooltip.apexcharts-theme-light {
|
||||
border: 1px solid #e3e3e3;
|
||||
background: rgba(255, 255, 255, .96)
|
||||
}
|
||||
|
||||
.apexcharts-tooltip.apexcharts-theme-dark {
|
||||
color: #fff;
|
||||
background: rgba(30, 30, 30, .8)
|
||||
}
|
||||
|
||||
.apexcharts-tooltip * {
|
||||
font-family: inherit
|
||||
}
|
||||
|
||||
.apexcharts-tooltip-title {
|
||||
padding: 6px;
|
||||
font-size: 15px;
|
||||
margin-bottom: 4px
|
||||
}
|
||||
|
||||
.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title {
|
||||
background: #eceff1;
|
||||
border-bottom: 1px solid #ddd
|
||||
}
|
||||
|
||||
.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title {
|
||||
background: rgba(0, 0, 0, .7);
|
||||
border-bottom: 1px solid #333
|
||||
}
|
||||
|
||||
.apexcharts-tooltip-text-goals-value,
|
||||
.apexcharts-tooltip-text-y-value,
|
||||
.apexcharts-tooltip-text-z-value {
|
||||
display: inline-block;
|
||||
margin-left: 5px;
|
||||
font-weight: 600
|
||||
}
|
||||
|
||||
.apexcharts-tooltip-text-goals-label:empty,
|
||||
.apexcharts-tooltip-text-goals-value:empty,
|
||||
.apexcharts-tooltip-text-y-label:empty,
|
||||
.apexcharts-tooltip-text-y-value:empty,
|
||||
.apexcharts-tooltip-text-z-value:empty,
|
||||
.apexcharts-tooltip-title:empty {
|
||||
display: none
|
||||
}
|
||||
|
||||
.apexcharts-tooltip-text-goals-label,
|
||||
.apexcharts-tooltip-text-goals-value {
|
||||
padding: 6px 0 5px
|
||||
}
|
||||
|
||||
.apexcharts-tooltip-goals-group,
|
||||
.apexcharts-tooltip-text-goals-label,
|
||||
.apexcharts-tooltip-text-goals-value {
|
||||
display: flex
|
||||
}
|
||||
|
||||
.apexcharts-tooltip-text-goals-label:not(:empty),
|
||||
.apexcharts-tooltip-text-goals-value:not(:empty) {
|
||||
margin-top: -6px
|
||||
}
|
||||
|
||||
.apexcharts-tooltip-marker {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
font-size: 16px;
|
||||
line-height: 16px;
|
||||
margin-right: 4px;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.apexcharts-tooltip-marker::before {
|
||||
content: "";
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
color: currentcolor;
|
||||
text-rendering: optimizeLegibility;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
font-size: 26px;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
line-height: 14px;
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
.apexcharts-tooltip-marker[shape="circle"]::before {
|
||||
content: "\25CF";
|
||||
}
|
||||
|
||||
.apexcharts-tooltip-marker[shape="square"]::before,
|
||||
.apexcharts-tooltip-marker[shape="rect"]::before {
|
||||
content: "\25A0";
|
||||
transform: translate(-1px, -2px);
|
||||
}
|
||||
|
||||
.apexcharts-tooltip-marker[shape="line"]::before {
|
||||
content: "\2500";
|
||||
}
|
||||
|
||||
.apexcharts-tooltip-marker[shape="diamond"]::before {
|
||||
content: "\25C6";
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
.apexcharts-tooltip-marker[shape="triangle"]::before {
|
||||
content: "\25B2";
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
.apexcharts-tooltip-marker[shape="cross"]::before {
|
||||
content: "\2715";
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.apexcharts-tooltip-marker[shape="plus"]::before {
|
||||
content: "\2715";
|
||||
transform: rotate(45deg) translate(-1px, -1px);
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.apexcharts-tooltip-marker[shape="star"]::before {
|
||||
content: "\2605";
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.apexcharts-tooltip-marker[shape="sparkle"]::before {
|
||||
content: "\2726";
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.apexcharts-tooltip-series-group {
|
||||
padding: 0 10px;
|
||||
display: none;
|
||||
text-align: left;
|
||||
justify-content: left;
|
||||
align-items: center
|
||||
}
|
||||
|
||||
.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker {
|
||||
opacity: 1
|
||||
}
|
||||
|
||||
.apexcharts-tooltip-series-group.apexcharts-active,
|
||||
.apexcharts-tooltip-series-group:last-child {
|
||||
padding-bottom: 4px
|
||||
}
|
||||
|
||||
.apexcharts-tooltip-y-group {
|
||||
padding: 6px 0 5px
|
||||
}
|
||||
|
||||
.apexcharts-custom-tooltip,
|
||||
.apexcharts-tooltip-box {
|
||||
padding: 4px 8px
|
||||
}
|
||||
|
||||
.apexcharts-tooltip-boxPlot {
|
||||
display: flex;
|
||||
flex-direction: column-reverse
|
||||
}
|
||||
|
||||
.apexcharts-tooltip-box>div {
|
||||
margin: 4px 0
|
||||
}
|
||||
|
||||
.apexcharts-tooltip-box span.value {
|
||||
font-weight: 700
|
||||
}
|
||||
|
||||
.apexcharts-tooltip-rangebar {
|
||||
padding: 5px 8px
|
||||
}
|
||||
|
||||
.apexcharts-tooltip-rangebar .category {
|
||||
font-weight: 600;
|
||||
color: #777
|
||||
}
|
||||
|
||||
.apexcharts-tooltip-rangebar .series-name {
|
||||
font-weight: 700;
|
||||
display: block;
|
||||
margin-bottom: 5px
|
||||
}
|
||||
|
||||
.apexcharts-xaxistooltip,
|
||||
.apexcharts-yaxistooltip {
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
color: #373d3f;
|
||||
font-size: 13px;
|
||||
text-align: center;
|
||||
border-radius: 2px;
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
background: #eceff1;
|
||||
border: 1px solid #90a4ae
|
||||
}
|
||||
|
||||
.apexcharts-xaxistooltip {
|
||||
padding: 9px 10px;
|
||||
transition: .15s ease all
|
||||
}
|
||||
|
||||
.apexcharts-xaxistooltip.apexcharts-theme-dark {
|
||||
background: rgba(0, 0, 0, .7);
|
||||
border: 1px solid rgba(0, 0, 0, .5);
|
||||
color: #fff
|
||||
}
|
||||
|
||||
.apexcharts-xaxistooltip:after,
|
||||
.apexcharts-xaxistooltip:before {
|
||||
left: 50%;
|
||||
border: solid transparent;
|
||||
content: " ";
|
||||
height: 0;
|
||||
width: 0;
|
||||
position: absolute;
|
||||
pointer-events: none
|
||||
}
|
||||
|
||||
.apexcharts-xaxistooltip:after {
|
||||
border-color: transparent;
|
||||
border-width: 6px;
|
||||
margin-left: -6px
|
||||
}
|
||||
|
||||
.apexcharts-xaxistooltip:before {
|
||||
border-color: transparent;
|
||||
border-width: 7px;
|
||||
margin-left: -7px
|
||||
}
|
||||
|
||||
.apexcharts-xaxistooltip-bottom:after,
|
||||
.apexcharts-xaxistooltip-bottom:before {
|
||||
bottom: 100%
|
||||
}
|
||||
|
||||
.apexcharts-xaxistooltip-top:after,
|
||||
.apexcharts-xaxistooltip-top:before {
|
||||
top: 100%
|
||||
}
|
||||
|
||||
.apexcharts-xaxistooltip-bottom:after {
|
||||
border-bottom-color: #eceff1
|
||||
}
|
||||
|
||||
.apexcharts-xaxistooltip-bottom:before {
|
||||
border-bottom-color: #90a4ae
|
||||
}
|
||||
|
||||
.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after,
|
||||
.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before {
|
||||
border-bottom-color: rgba(0, 0, 0, .5)
|
||||
}
|
||||
|
||||
.apexcharts-xaxistooltip-top:after {
|
||||
border-top-color: #eceff1
|
||||
}
|
||||
|
||||
.apexcharts-xaxistooltip-top:before {
|
||||
border-top-color: #90a4ae
|
||||
}
|
||||
|
||||
.apexcharts-xaxistooltip-top.apexcharts-theme-dark:after,
|
||||
.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before {
|
||||
border-top-color: rgba(0, 0, 0, .5)
|
||||
}
|
||||
|
||||
.apexcharts-xaxistooltip.apexcharts-active {
|
||||
opacity: 1;
|
||||
transition: .15s ease all
|
||||
}
|
||||
|
||||
.apexcharts-yaxistooltip {
|
||||
padding: 4px 10px
|
||||
}
|
||||
|
||||
.apexcharts-yaxistooltip.apexcharts-theme-dark {
|
||||
background: rgba(0, 0, 0, .7);
|
||||
border: 1px solid rgba(0, 0, 0, .5);
|
||||
color: #fff
|
||||
}
|
||||
|
||||
.apexcharts-yaxistooltip:after,
|
||||
.apexcharts-yaxistooltip:before {
|
||||
top: 50%;
|
||||
border: solid transparent;
|
||||
content: " ";
|
||||
height: 0;
|
||||
width: 0;
|
||||
position: absolute;
|
||||
pointer-events: none
|
||||
}
|
||||
|
||||
.apexcharts-yaxistooltip:after {
|
||||
border-color: transparent;
|
||||
border-width: 6px;
|
||||
margin-top: -6px
|
||||
}
|
||||
|
||||
.apexcharts-yaxistooltip:before {
|
||||
border-color: transparent;
|
||||
border-width: 7px;
|
||||
margin-top: -7px
|
||||
}
|
||||
|
||||
.apexcharts-yaxistooltip-left:after,
|
||||
.apexcharts-yaxistooltip-left:before {
|
||||
left: 100%
|
||||
}
|
||||
|
||||
.apexcharts-yaxistooltip-right:after,
|
||||
.apexcharts-yaxistooltip-right:before {
|
||||
right: 100%
|
||||
}
|
||||
|
||||
.apexcharts-yaxistooltip-left:after {
|
||||
border-left-color: #eceff1
|
||||
}
|
||||
|
||||
.apexcharts-yaxistooltip-left:before {
|
||||
border-left-color: #90a4ae
|
||||
}
|
||||
|
||||
.apexcharts-yaxistooltip-left.apexcharts-theme-dark:after,
|
||||
.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before {
|
||||
border-left-color: rgba(0, 0, 0, .5)
|
||||
}
|
||||
|
||||
.apexcharts-yaxistooltip-right:after {
|
||||
border-right-color: #eceff1
|
||||
}
|
||||
|
||||
.apexcharts-yaxistooltip-right:before {
|
||||
border-right-color: #90a4ae
|
||||
}
|
||||
|
||||
.apexcharts-yaxistooltip-right.apexcharts-theme-dark:after,
|
||||
.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before {
|
||||
border-right-color: rgba(0, 0, 0, .5)
|
||||
}
|
||||
|
||||
.apexcharts-yaxistooltip.apexcharts-active {
|
||||
opacity: 1
|
||||
}
|
||||
|
||||
.apexcharts-yaxistooltip-hidden {
|
||||
display: none
|
||||
}
|
||||
|
||||
.apexcharts-xcrosshairs,
|
||||
.apexcharts-ycrosshairs {
|
||||
pointer-events: none;
|
||||
opacity: 0;
|
||||
transition: .15s ease all
|
||||
}
|
||||
|
||||
.apexcharts-xcrosshairs.apexcharts-active,
|
||||
.apexcharts-ycrosshairs.apexcharts-active {
|
||||
opacity: 1;
|
||||
transition: .15s ease all
|
||||
}
|
||||
|
||||
.apexcharts-ycrosshairs-hidden {
|
||||
opacity: 0
|
||||
}
|
||||
|
||||
.apexcharts-selection-rect {
|
||||
cursor: move
|
||||
}
|
||||
|
||||
.svg_select_shape {
|
||||
stroke-width: 1;
|
||||
stroke-dasharray: 10 10;
|
||||
stroke: black;
|
||||
stroke-opacity: 0.1;
|
||||
pointer-events: none;
|
||||
fill: none;
|
||||
}
|
||||
|
||||
.svg_select_handle {
|
||||
stroke-width: 3;
|
||||
stroke: black;
|
||||
fill: none;
|
||||
}
|
||||
|
||||
.svg_select_handle_r {
|
||||
cursor: e-resize;
|
||||
}
|
||||
|
||||
.svg_select_handle_l {
|
||||
cursor: w-resize;
|
||||
}
|
||||
|
||||
.apexcharts-svg.apexcharts-zoomable.hovering-zoom {
|
||||
cursor: crosshair
|
||||
}
|
||||
|
||||
.apexcharts-svg.apexcharts-zoomable.hovering-pan {
|
||||
cursor: move
|
||||
}
|
||||
|
||||
.apexcharts-menu-icon,
|
||||
.apexcharts-pan-icon,
|
||||
.apexcharts-reset-icon,
|
||||
.apexcharts-selection-icon,
|
||||
.apexcharts-toolbar-custom-icon,
|
||||
.apexcharts-zoom-icon,
|
||||
.apexcharts-zoomin-icon,
|
||||
.apexcharts-zoomout-icon {
|
||||
cursor: pointer;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
line-height: 24px;
|
||||
color: #6e8192;
|
||||
text-align: center
|
||||
}
|
||||
|
||||
.apexcharts-menu-icon svg,
|
||||
.apexcharts-reset-icon svg,
|
||||
.apexcharts-zoom-icon svg,
|
||||
.apexcharts-zoomin-icon svg,
|
||||
.apexcharts-zoomout-icon svg {
|
||||
fill: #6e8192
|
||||
}
|
||||
|
||||
.apexcharts-selection-icon svg {
|
||||
fill: #444;
|
||||
transform: scale(.76)
|
||||
}
|
||||
|
||||
.apexcharts-theme-dark .apexcharts-menu-icon svg,
|
||||
.apexcharts-theme-dark .apexcharts-pan-icon svg,
|
||||
.apexcharts-theme-dark .apexcharts-reset-icon svg,
|
||||
.apexcharts-theme-dark .apexcharts-selection-icon svg,
|
||||
.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg,
|
||||
.apexcharts-theme-dark .apexcharts-zoom-icon svg,
|
||||
.apexcharts-theme-dark .apexcharts-zoomin-icon svg,
|
||||
.apexcharts-theme-dark .apexcharts-zoomout-icon svg {
|
||||
fill: #f3f4f5
|
||||
}
|
||||
|
||||
.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg,
|
||||
.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg,
|
||||
.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg {
|
||||
fill: #008ffb
|
||||
}
|
||||
|
||||
.apexcharts-theme-light .apexcharts-menu-icon:hover svg,
|
||||
.apexcharts-theme-light .apexcharts-reset-icon:hover svg,
|
||||
.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg,
|
||||
.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg,
|
||||
.apexcharts-theme-light .apexcharts-zoomin-icon:hover svg,
|
||||
.apexcharts-theme-light .apexcharts-zoomout-icon:hover svg {
|
||||
fill: #333
|
||||
}
|
||||
|
||||
.apexcharts-menu-icon,
|
||||
.apexcharts-selection-icon {
|
||||
position: relative
|
||||
}
|
||||
|
||||
.apexcharts-reset-icon {
|
||||
margin-left: 5px
|
||||
}
|
||||
|
||||
.apexcharts-menu-icon,
|
||||
.apexcharts-reset-icon,
|
||||
.apexcharts-zoom-icon {
|
||||
transform: scale(.85)
|
||||
}
|
||||
|
||||
.apexcharts-zoomin-icon,
|
||||
.apexcharts-zoomout-icon {
|
||||
transform: scale(.7)
|
||||
}
|
||||
|
||||
.apexcharts-zoomout-icon {
|
||||
margin-right: 3px
|
||||
}
|
||||
|
||||
.apexcharts-pan-icon {
|
||||
transform: scale(.62);
|
||||
position: relative;
|
||||
left: 1px;
|
||||
top: 0
|
||||
}
|
||||
|
||||
.apexcharts-pan-icon svg {
|
||||
fill: #fff;
|
||||
stroke: #6e8192;
|
||||
stroke-width: 2
|
||||
}
|
||||
|
||||
.apexcharts-pan-icon.apexcharts-selected svg {
|
||||
stroke: #008ffb
|
||||
}
|
||||
|
||||
.apexcharts-pan-icon:not(.apexcharts-selected):hover svg {
|
||||
stroke: #333
|
||||
}
|
||||
|
||||
.apexcharts-toolbar {
|
||||
position: absolute;
|
||||
z-index: 11;
|
||||
max-width: 176px;
|
||||
text-align: right;
|
||||
border-radius: 3px;
|
||||
padding: 0 6px 2px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center
|
||||
}
|
||||
|
||||
.apexcharts-menu {
|
||||
background: #fff;
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 3px;
|
||||
padding: 3px;
|
||||
right: 10px;
|
||||
opacity: 0;
|
||||
min-width: 110px;
|
||||
transition: .15s ease all;
|
||||
pointer-events: none
|
||||
}
|
||||
|
||||
.apexcharts-menu.apexcharts-menu-open {
|
||||
opacity: 1;
|
||||
pointer-events: all;
|
||||
transition: .15s ease all
|
||||
}
|
||||
|
||||
.apexcharts-menu-item {
|
||||
padding: 6px 7px;
|
||||
font-size: 12px;
|
||||
cursor: pointer
|
||||
}
|
||||
|
||||
.apexcharts-theme-light .apexcharts-menu-item:hover {
|
||||
background: #eee
|
||||
}
|
||||
|
||||
.apexcharts-theme-dark .apexcharts-menu {
|
||||
background: rgba(0, 0, 0, .7);
|
||||
color: #fff
|
||||
}
|
||||
|
||||
@media screen and (min-width:768px) {
|
||||
.apexcharts-canvas:hover .apexcharts-toolbar {
|
||||
opacity: 1
|
||||
}
|
||||
}
|
||||
|
||||
/* Toolbar keyboard accessibility: show toolbar when any button inside it is focused */
|
||||
.apexcharts-toolbar:focus-within {
|
||||
opacity: 1
|
||||
}
|
||||
|
||||
/* Focus indicator for toolbar icon buttons */
|
||||
.apexcharts-menu-icon:focus-visible,
|
||||
.apexcharts-pan-icon:focus-visible,
|
||||
.apexcharts-reset-icon:focus-visible,
|
||||
.apexcharts-selection-icon:focus-visible,
|
||||
.apexcharts-toolbar-custom-icon:focus-visible,
|
||||
.apexcharts-zoom-icon:focus-visible,
|
||||
.apexcharts-zoomin-icon:focus-visible,
|
||||
.apexcharts-zoomout-icon:focus-visible {
|
||||
outline: 2px solid #008FFB;
|
||||
outline-offset: 2px;
|
||||
border-radius: 2px
|
||||
}
|
||||
|
||||
/* Focus indicator for hamburger menu items */
|
||||
.apexcharts-menu-item:focus-visible {
|
||||
outline: 2px solid #008FFB;
|
||||
outline-offset: -2px;
|
||||
background: #eee
|
||||
}
|
||||
|
||||
.apexcharts-canvas .apexcharts-element-hidden,
|
||||
.apexcharts-datalabel.apexcharts-element-hidden,
|
||||
.apexcharts-hide .apexcharts-series-points {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.apexcharts-hidden-element-shown {
|
||||
opacity: 1;
|
||||
transition: 0.25s ease all;
|
||||
}
|
||||
|
||||
.apexcharts-datalabel,
|
||||
.apexcharts-datalabel-label,
|
||||
.apexcharts-datalabel-value,
|
||||
.apexcharts-datalabels,
|
||||
.apexcharts-pie-label {
|
||||
cursor: default;
|
||||
pointer-events: none
|
||||
}
|
||||
|
||||
.apexcharts-pie-label-delay {
|
||||
opacity: 0;
|
||||
animation-name: opaque;
|
||||
animation-duration: .3s;
|
||||
animation-fill-mode: forwards;
|
||||
animation-timing-function: ease
|
||||
}
|
||||
|
||||
.apexcharts-radialbar-label {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.apexcharts-annotation-rect,
|
||||
.apexcharts-area-series .apexcharts-area,
|
||||
.apexcharts-gridline,
|
||||
.apexcharts-line,
|
||||
.apexcharts-point-annotation-label,
|
||||
.apexcharts-radar-series path:not(.apexcharts-marker),
|
||||
.apexcharts-radar-series polygon,
|
||||
.apexcharts-toolbar svg,
|
||||
.apexcharts-tooltip .apexcharts-marker,
|
||||
.apexcharts-xaxis-annotation-label,
|
||||
.apexcharts-yaxis-annotation-label,
|
||||
.apexcharts-zoom-rect,
|
||||
.no-pointer-events {
|
||||
pointer-events: none
|
||||
}
|
||||
|
||||
.apexcharts-tooltip-active .apexcharts-marker {
|
||||
transition: .15s ease all
|
||||
}
|
||||
|
||||
.apexcharts-radar-series .apexcharts-yaxis {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.resize-triggers {
|
||||
animation: 1ms resizeanim;
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
overflow: hidden
|
||||
}
|
||||
|
||||
.contract-trigger:before,
|
||||
.resize-triggers,
|
||||
.resize-triggers>div {
|
||||
content: " ";
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0
|
||||
}
|
||||
|
||||
.resize-triggers>div {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background: #eee;
|
||||
overflow: auto
|
||||
}
|
||||
|
||||
.contract-trigger:before {
|
||||
overflow: hidden;
|
||||
width: 200%;
|
||||
height: 200%
|
||||
}
|
||||
|
||||
.apexcharts-bar-goals-markers {
|
||||
pointer-events: none
|
||||
}
|
||||
|
||||
.apexcharts-bar-shadows {
|
||||
pointer-events: none
|
||||
}
|
||||
|
||||
.apexcharts-rangebar-goals-markers {
|
||||
pointer-events: none
|
||||
}
|
||||
|
||||
.apexcharts-disable-transitions * {
|
||||
transition: none !important;
|
||||
}
|
||||
33265
storage/public/dist/libs/apexcharts/dist/apexcharts.esm.js
vendored
Normal file
33265
storage/public/dist/libs/apexcharts/dist/apexcharts.esm.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
33268
storage/public/dist/libs/apexcharts/dist/apexcharts.js
vendored
Normal file
33268
storage/public/dist/libs/apexcharts/dist/apexcharts.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
5
storage/public/dist/libs/apexcharts/dist/apexcharts.min.js
vendored
Normal file
5
storage/public/dist/libs/apexcharts/dist/apexcharts.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
storage/public/dist/libs/apexcharts/dist/apexcharts.ssr.common.js
vendored
Normal file
5
storage/public/dist/libs/apexcharts/dist/apexcharts.ssr.common.js
vendored
Normal file
File diff suppressed because one or more lines are too long
33712
storage/public/dist/libs/apexcharts/dist/apexcharts.ssr.esm.js
vendored
Normal file
33712
storage/public/dist/libs/apexcharts/dist/apexcharts.ssr.esm.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
5
storage/public/dist/libs/apexcharts/dist/area.common.js
vendored
Normal file
5
storage/public/dist/libs/apexcharts/dist/area.common.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1197
storage/public/dist/libs/apexcharts/dist/area.esm.js
vendored
Normal file
1197
storage/public/dist/libs/apexcharts/dist/area.esm.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
5
storage/public/dist/libs/apexcharts/dist/bar.common.js
vendored
Normal file
5
storage/public/dist/libs/apexcharts/dist/bar.common.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2716
storage/public/dist/libs/apexcharts/dist/bar.esm.js
vendored
Normal file
2716
storage/public/dist/libs/apexcharts/dist/bar.esm.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
5
storage/public/dist/libs/apexcharts/dist/boxPlot.common.js
vendored
Normal file
5
storage/public/dist/libs/apexcharts/dist/boxPlot.common.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2196
storage/public/dist/libs/apexcharts/dist/boxPlot.esm.js
vendored
Normal file
2196
storage/public/dist/libs/apexcharts/dist/boxPlot.esm.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
5
storage/public/dist/libs/apexcharts/dist/bubble.common.js
vendored
Normal file
5
storage/public/dist/libs/apexcharts/dist/bubble.common.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1197
storage/public/dist/libs/apexcharts/dist/bubble.esm.js
vendored
Normal file
1197
storage/public/dist/libs/apexcharts/dist/bubble.esm.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
5
storage/public/dist/libs/apexcharts/dist/candlestick.common.js
vendored
Normal file
5
storage/public/dist/libs/apexcharts/dist/candlestick.common.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2196
storage/public/dist/libs/apexcharts/dist/candlestick.esm.js
vendored
Normal file
2196
storage/public/dist/libs/apexcharts/dist/candlestick.esm.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
5
storage/public/dist/libs/apexcharts/dist/column.common.js
vendored
Normal file
5
storage/public/dist/libs/apexcharts/dist/column.common.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2716
storage/public/dist/libs/apexcharts/dist/column.esm.js
vendored
Normal file
2716
storage/public/dist/libs/apexcharts/dist/column.esm.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
5
storage/public/dist/libs/apexcharts/dist/core.common.js
vendored
Normal file
5
storage/public/dist/libs/apexcharts/dist/core.common.js
vendored
Normal file
File diff suppressed because one or more lines are too long
22560
storage/public/dist/libs/apexcharts/dist/core.esm.js
vendored
Normal file
22560
storage/public/dist/libs/apexcharts/dist/core.esm.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
5
storage/public/dist/libs/apexcharts/dist/donut.common.js
vendored
Normal file
5
storage/public/dist/libs/apexcharts/dist/donut.common.js
vendored
Normal file
File diff suppressed because one or more lines are too long
861
storage/public/dist/libs/apexcharts/dist/donut.esm.js
vendored
Normal file
861
storage/public/dist/libs/apexcharts/dist/donut.esm.js
vendored
Normal file
|
|
@ -0,0 +1,861 @@
|
|||
/*!
|
||||
* ApexCharts v5.10.4
|
||||
* (c) 2018-2026 ApexCharts
|
||||
*/
|
||||
import * as _core from "apexcharts/core";
|
||||
import _core__default from "apexcharts/core";
|
||||
import { default as default2 } from "apexcharts/core";
|
||||
const Animations = _core.__apex_Animations;
|
||||
const Fill = _core.__apex_Fill;
|
||||
const Utils = _core.__apex_Utils;
|
||||
const Graphics = _core.__apex_Graphics;
|
||||
const Filters = _core.__apex_Filters;
|
||||
const Scales = _core.__apex_Scales;
|
||||
class CircularChartsHelpers {
|
||||
/**
|
||||
* @param {import('../../../types/internal').ChartStateW} w
|
||||
*/
|
||||
constructor(w) {
|
||||
this.w = w;
|
||||
}
|
||||
/**
|
||||
* @param {number} x
|
||||
* @param {number} y
|
||||
* @param {number} i
|
||||
* @param {string | number} text
|
||||
*/
|
||||
drawYAxisTexts(x, y, i, text) {
|
||||
const w = this.w;
|
||||
const yaxisConfig = w.config.yaxis[0];
|
||||
const formatter = w.formatters.yLabelFormatters[0];
|
||||
const graphics = new Graphics(this.w);
|
||||
const yaxisLabel = graphics.drawText({
|
||||
x: x + yaxisConfig.labels.offsetX,
|
||||
y: y + yaxisConfig.labels.offsetY,
|
||||
text: formatter(text, i),
|
||||
textAnchor: "middle",
|
||||
fontSize: yaxisConfig.labels.style.fontSize,
|
||||
fontFamily: yaxisConfig.labels.style.fontFamily,
|
||||
foreColor: Array.isArray(yaxisConfig.labels.style.colors) ? yaxisConfig.labels.style.colors[i] : yaxisConfig.labels.style.colors
|
||||
});
|
||||
return yaxisLabel;
|
||||
}
|
||||
}
|
||||
class Pie {
|
||||
/**
|
||||
* @param {import('../types/internal').ChartStateW} w
|
||||
* @param {import('../types/internal').ChartContext} ctx
|
||||
*/
|
||||
constructor(w, ctx) {
|
||||
this.ctx = ctx;
|
||||
this.w = w;
|
||||
this.chartType = this.w.config.chart.type;
|
||||
this.initialAnim = this.w.config.chart.animations.enabled;
|
||||
this.dynamicAnim = this.initialAnim && this.w.config.chart.animations.dynamicAnimation.enabled;
|
||||
this.animBeginArr = [0];
|
||||
this.animDur = 0;
|
||||
this.donutDataLabels = this.w.config.plotOptions.pie.donut.labels;
|
||||
this.lineColorArr = w.globals.stroke.colors !== void 0 ? w.globals.stroke.colors : w.globals.colors;
|
||||
this.defaultSize = Math.min(w.layout.gridWidth, w.layout.gridHeight);
|
||||
this.centerY = this.defaultSize / 2;
|
||||
this.centerX = w.layout.gridWidth / 2;
|
||||
if (w.config.chart.type === "radialBar") {
|
||||
this.fullAngle = 360;
|
||||
} else {
|
||||
this.fullAngle = Math.abs(
|
||||
w.config.plotOptions.pie.endAngle - w.config.plotOptions.pie.startAngle
|
||||
);
|
||||
}
|
||||
this.initialAngle = w.config.plotOptions.pie.startAngle % this.fullAngle;
|
||||
w.globals.radialSize = this.defaultSize / 2.05 - w.config.stroke.width - (!w.config.chart.sparkline.enabled ? w.config.chart.dropShadow.blur : 0);
|
||||
this.donutSize = w.globals.radialSize * parseInt(w.config.plotOptions.pie.donut.size, 10) / 100;
|
||||
const scaleSize = w.config.plotOptions.pie.customScale;
|
||||
const halfW = w.layout.gridWidth / 2;
|
||||
const halfH = w.layout.gridHeight / 2;
|
||||
this.translateX = halfW - halfW * scaleSize;
|
||||
this.translateY = halfH - halfH * scaleSize;
|
||||
this.dataLabelsGroup = new Graphics(this.w).group({
|
||||
class: "apexcharts-datalabels-group",
|
||||
transform: `translate(${this.translateX}, ${this.translateY}) scale(${scaleSize})`
|
||||
});
|
||||
this.maxY = 0;
|
||||
this.sliceLabels = [];
|
||||
this.sliceSizes = [];
|
||||
this.prevSectorAngleArr = [];
|
||||
}
|
||||
/**
|
||||
* @param {any[]} series
|
||||
*/
|
||||
draw(series) {
|
||||
const self = this;
|
||||
const w = this.w;
|
||||
const graphics = new Graphics(this.w);
|
||||
const elPie = graphics.group({
|
||||
class: "apexcharts-pie"
|
||||
});
|
||||
if (w.globals.noData) return elPie;
|
||||
let total = 0;
|
||||
for (let k = 0; k < series.length; k++) {
|
||||
total += Utils.negToZero(series[k]);
|
||||
}
|
||||
const sectorAngleArr = [];
|
||||
const elSeries = graphics.group();
|
||||
if (total === 0) {
|
||||
total = 1e-5;
|
||||
}
|
||||
series.forEach((m) => {
|
||||
this.maxY = Math.max(this.maxY, m);
|
||||
});
|
||||
if (w.config.yaxis[0].max) {
|
||||
this.maxY = w.config.yaxis[0].max;
|
||||
}
|
||||
if (w.config.grid.position === "back" && this.chartType === "polarArea") {
|
||||
this.drawPolarElements(elPie);
|
||||
}
|
||||
for (let i = 0; i < series.length; i++) {
|
||||
const angle = this.fullAngle * Utils.negToZero(series[i]) / total;
|
||||
sectorAngleArr.push(angle);
|
||||
if (this.chartType === "polarArea") {
|
||||
sectorAngleArr[i] = this.fullAngle / series.length;
|
||||
this.sliceSizes.push(w.globals.radialSize * series[i] / this.maxY);
|
||||
} else {
|
||||
this.sliceSizes.push(w.globals.radialSize);
|
||||
}
|
||||
}
|
||||
if (w.globals.dataChanged) {
|
||||
let prevTotal = 0;
|
||||
for (let k = 0; k < w.globals.previousPaths.length; k++) {
|
||||
prevTotal += Utils.negToZero(w.globals.previousPaths[k]);
|
||||
}
|
||||
let previousAngle;
|
||||
for (let i = 0; i < w.globals.previousPaths.length; i++) {
|
||||
previousAngle = this.fullAngle * Utils.negToZero(w.globals.previousPaths[i]) / prevTotal;
|
||||
this.prevSectorAngleArr.push(previousAngle);
|
||||
}
|
||||
}
|
||||
if (this.donutSize < 0) {
|
||||
this.donutSize = 0;
|
||||
}
|
||||
if (this.chartType === "donut") {
|
||||
const circle = graphics.drawCircle(this.donutSize);
|
||||
circle.attr({
|
||||
cx: this.centerX,
|
||||
cy: this.centerY,
|
||||
fill: w.config.plotOptions.pie.donut.background ? w.config.plotOptions.pie.donut.background : "transparent"
|
||||
});
|
||||
elSeries.add(circle);
|
||||
}
|
||||
const elG = self.drawArcs(sectorAngleArr, series);
|
||||
this.sliceLabels.forEach((s) => {
|
||||
elG.add(s);
|
||||
});
|
||||
elSeries.attr({
|
||||
transform: `translate(${this.translateX}, ${this.translateY}) scale(${w.config.plotOptions.pie.customScale})`
|
||||
});
|
||||
elSeries.add(elG);
|
||||
elPie.add(elSeries);
|
||||
if (this.donutDataLabels.show) {
|
||||
const dataLabels = this.renderInnerDataLabels(
|
||||
this.dataLabelsGroup,
|
||||
this.donutDataLabels,
|
||||
{
|
||||
hollowSize: this.donutSize,
|
||||
centerX: this.centerX,
|
||||
centerY: this.centerY,
|
||||
opacity: this.donutDataLabels.show
|
||||
}
|
||||
);
|
||||
elPie.add(dataLabels);
|
||||
}
|
||||
if (w.config.grid.position === "front" && this.chartType === "polarArea") {
|
||||
this.drawPolarElements(elPie);
|
||||
}
|
||||
return elPie;
|
||||
}
|
||||
// core function for drawing pie arcs
|
||||
/**
|
||||
* @param {any[]} sectorAngleArr
|
||||
* @param {any[]} series
|
||||
*/
|
||||
drawArcs(sectorAngleArr, series) {
|
||||
const w = this.w;
|
||||
const filters = new Filters(this.w);
|
||||
const graphics = new Graphics(this.w);
|
||||
const fill = new Fill(this.w);
|
||||
const g = graphics.group({
|
||||
class: "apexcharts-slices"
|
||||
});
|
||||
let startAngle = this.initialAngle;
|
||||
let prevStartAngle = this.initialAngle;
|
||||
let endAngle = this.initialAngle;
|
||||
let prevEndAngle = this.initialAngle;
|
||||
this.strokeWidth = w.config.stroke.show ? w.config.stroke.width : 0;
|
||||
for (let i = 0; i < sectorAngleArr.length; i++) {
|
||||
const elPieArc = graphics.group({
|
||||
class: `apexcharts-series apexcharts-pie-series`,
|
||||
seriesName: Utils.escapeString(w.seriesData.seriesNames[i]),
|
||||
rel: i + 1,
|
||||
"data:realIndex": i
|
||||
});
|
||||
g.add(elPieArc);
|
||||
startAngle = endAngle;
|
||||
prevStartAngle = prevEndAngle;
|
||||
endAngle = startAngle + sectorAngleArr[i];
|
||||
prevEndAngle = prevStartAngle + this.prevSectorAngleArr[i];
|
||||
const angle = endAngle < startAngle ? this.fullAngle + endAngle - startAngle : endAngle - startAngle;
|
||||
const pathFill = fill.fillPath({
|
||||
seriesNumber: i,
|
||||
size: this.sliceSizes[i],
|
||||
value: series[i]
|
||||
});
|
||||
const path = this.getChangedPath(prevStartAngle, prevEndAngle);
|
||||
const elPath = graphics.drawPath({
|
||||
d: path,
|
||||
stroke: Array.isArray(this.lineColorArr) ? this.lineColorArr[i] : this.lineColorArr,
|
||||
strokeWidth: 0,
|
||||
fill: pathFill,
|
||||
fillOpacity: w.config.fill.opacity,
|
||||
classes: `apexcharts-pie-area apexcharts-${this.chartType.toLowerCase()}-slice-${i}`
|
||||
});
|
||||
elPath.attr({
|
||||
index: 0,
|
||||
j: i
|
||||
});
|
||||
filters.setSelectionFilter(elPath, 0, i);
|
||||
if (w.config.chart.dropShadow.enabled) {
|
||||
const shadow = w.config.chart.dropShadow;
|
||||
filters.dropShadow(elPath, shadow, i);
|
||||
}
|
||||
this.addListeners(elPath, this.donutDataLabels);
|
||||
let labelPosition = {
|
||||
x: 0,
|
||||
y: 0
|
||||
};
|
||||
const midAngle = (startAngle + angle / 2) % this.fullAngle;
|
||||
let arcCenter = { x: this.centerX, y: this.centerY };
|
||||
if (this.chartType === "pie" || this.chartType === "polarArea") {
|
||||
labelPosition = Utils.polarToCartesian(
|
||||
this.centerX,
|
||||
this.centerY,
|
||||
w.globals.radialSize / 1.25 + w.config.plotOptions.pie.dataLabels.offset,
|
||||
midAngle
|
||||
);
|
||||
arcCenter = Utils.polarToCartesian(
|
||||
this.centerX,
|
||||
this.centerY,
|
||||
w.globals.radialSize / 2,
|
||||
midAngle
|
||||
);
|
||||
} else if (this.chartType === "donut") {
|
||||
labelPosition = Utils.polarToCartesian(
|
||||
this.centerX,
|
||||
this.centerY,
|
||||
(w.globals.radialSize + this.donutSize) / 2 + w.config.plotOptions.pie.dataLabels.offset,
|
||||
midAngle
|
||||
);
|
||||
arcCenter = Utils.polarToCartesian(
|
||||
this.centerX,
|
||||
this.centerY,
|
||||
(w.globals.radialSize + this.donutSize) / 2,
|
||||
midAngle
|
||||
);
|
||||
}
|
||||
Graphics.setAttrs(elPath.node, {
|
||||
"data:angle": angle,
|
||||
"data:startAngle": startAngle,
|
||||
"data:strokeWidth": this.strokeWidth,
|
||||
"data:value": series[i],
|
||||
"data:cx": arcCenter.x,
|
||||
"data:cy": arcCenter.y
|
||||
});
|
||||
elPieArc.add(elPath);
|
||||
let dur = 0;
|
||||
if (this.initialAnim && !w.globals.resized && !w.globals.dataChanged) {
|
||||
dur = angle / this.fullAngle * w.config.chart.animations.speed;
|
||||
if (dur === 0) dur = 1;
|
||||
this.animDur = dur + this.animDur;
|
||||
this.animBeginArr.push(this.animDur);
|
||||
} else {
|
||||
this.animBeginArr.push(0);
|
||||
}
|
||||
if (this.dynamicAnim && w.globals.dataChanged) {
|
||||
this.animatePaths(elPath, {
|
||||
size: this.sliceSizes[i],
|
||||
endAngle,
|
||||
startAngle,
|
||||
prevStartAngle,
|
||||
prevEndAngle,
|
||||
animateStartingPos: true,
|
||||
i,
|
||||
animBeginArr: this.animBeginArr,
|
||||
shouldSetPrevPaths: true,
|
||||
dur: w.config.chart.animations.dynamicAnimation.speed
|
||||
});
|
||||
} else {
|
||||
this.animatePaths(elPath, {
|
||||
size: this.sliceSizes[i],
|
||||
endAngle,
|
||||
startAngle,
|
||||
i,
|
||||
totalItems: sectorAngleArr.length - 1,
|
||||
animBeginArr: this.animBeginArr,
|
||||
dur
|
||||
});
|
||||
}
|
||||
if (w.config.plotOptions.pie.expandOnClick && this.chartType !== "polarArea") {
|
||||
elPath.node.addEventListener("mouseup", this.pieClicked.bind(this, i));
|
||||
}
|
||||
if (typeof w.interact.selectedDataPoints[0] !== "undefined" && w.interact.selectedDataPoints[0].indexOf(i) > -1) {
|
||||
this.pieClicked(i);
|
||||
}
|
||||
if (w.config.dataLabels.enabled) {
|
||||
const xPos = labelPosition.x;
|
||||
const yPos = labelPosition.y;
|
||||
let text = 100 * angle / this.fullAngle + "%";
|
||||
if (angle !== 0 && w.config.plotOptions.pie.dataLabels.minAngleToShowLabel < sectorAngleArr[i]) {
|
||||
const formatter = w.config.dataLabels.formatter;
|
||||
if (formatter !== void 0) {
|
||||
text = formatter(w.globals.seriesPercent[i][0], {
|
||||
seriesIndex: i,
|
||||
w
|
||||
});
|
||||
}
|
||||
const foreColor = w.globals.dataLabels.style.colors[i];
|
||||
const elPieLabelWrap = graphics.group({
|
||||
class: `apexcharts-datalabels`
|
||||
});
|
||||
const elPieLabel = graphics.drawText({
|
||||
x: xPos,
|
||||
y: yPos,
|
||||
text,
|
||||
textAnchor: "middle",
|
||||
fontSize: w.config.dataLabels.style.fontSize,
|
||||
fontFamily: w.config.dataLabels.style.fontFamily,
|
||||
fontWeight: w.config.dataLabels.style.fontWeight,
|
||||
foreColor
|
||||
});
|
||||
elPieLabelWrap.add(elPieLabel);
|
||||
if (w.config.dataLabels.dropShadow.enabled) {
|
||||
const textShadow = w.config.dataLabels.dropShadow;
|
||||
filters.dropShadow(elPieLabel, textShadow);
|
||||
}
|
||||
elPieLabel.node.classList.add("apexcharts-pie-label");
|
||||
if (w.config.chart.animations.animate && w.globals.resized === false) {
|
||||
elPieLabel.node.classList.add("apexcharts-pie-label-delay");
|
||||
elPieLabel.node.style.animationDelay = w.config.chart.animations.speed / 940 + "s";
|
||||
}
|
||||
this.sliceLabels.push(elPieLabelWrap);
|
||||
}
|
||||
}
|
||||
}
|
||||
return g;
|
||||
}
|
||||
/**
|
||||
* @param {any} elPath
|
||||
* @param {Record<string, any>} dataLabels
|
||||
*/
|
||||
addListeners(elPath, dataLabels) {
|
||||
const graphics = new Graphics(this.w);
|
||||
elPath.node.addEventListener(
|
||||
"mouseenter",
|
||||
graphics.pathMouseEnter.bind(this, elPath)
|
||||
);
|
||||
elPath.node.addEventListener(
|
||||
"mouseleave",
|
||||
graphics.pathMouseLeave.bind(this, elPath)
|
||||
);
|
||||
elPath.node.addEventListener(
|
||||
"mouseleave",
|
||||
this.revertDataLabelsInner.bind(this)
|
||||
);
|
||||
elPath.node.addEventListener(
|
||||
"mousedown",
|
||||
graphics.pathMouseDown.bind(this, elPath)
|
||||
);
|
||||
if (!this.donutDataLabels.total.showAlways) {
|
||||
elPath.node.addEventListener(
|
||||
"mouseenter",
|
||||
this.printDataLabelsInner.bind(this, elPath.node, dataLabels)
|
||||
);
|
||||
elPath.node.addEventListener(
|
||||
"mousedown",
|
||||
this.printDataLabelsInner.bind(this, elPath.node, dataLabels)
|
||||
);
|
||||
}
|
||||
}
|
||||
// This function can be used for other circle charts too
|
||||
/**
|
||||
* @param {any} el
|
||||
* @param {Record<string, any>} opts
|
||||
*/
|
||||
animatePaths(el, opts) {
|
||||
const w = this.w;
|
||||
const me = this;
|
||||
let angle = opts.endAngle < opts.startAngle ? this.fullAngle + opts.endAngle - opts.startAngle : opts.endAngle - opts.startAngle;
|
||||
let prevAngle = angle;
|
||||
let fromStartAngle = opts.startAngle;
|
||||
const toStartAngle = opts.startAngle;
|
||||
if (opts.prevStartAngle !== void 0 && opts.prevEndAngle !== void 0) {
|
||||
fromStartAngle = opts.prevEndAngle;
|
||||
prevAngle = opts.prevEndAngle < opts.prevStartAngle ? this.fullAngle + opts.prevEndAngle - opts.prevStartAngle : opts.prevEndAngle - opts.prevStartAngle;
|
||||
}
|
||||
if (opts.i === w.config.series.length - 1) {
|
||||
if (angle + toStartAngle > this.fullAngle) {
|
||||
opts.endAngle = opts.endAngle - (angle + toStartAngle);
|
||||
} else if (angle + toStartAngle < this.fullAngle) {
|
||||
opts.endAngle = opts.endAngle + (this.fullAngle - (angle + toStartAngle));
|
||||
}
|
||||
}
|
||||
if (angle === this.fullAngle) angle = this.fullAngle - 0.01;
|
||||
me.animateArc(el, fromStartAngle, toStartAngle, angle, prevAngle, opts);
|
||||
}
|
||||
/**
|
||||
* @param {any} el
|
||||
* @param {number} fromStartAngle
|
||||
* @param {number} toStartAngle
|
||||
* @param {number} angle
|
||||
* @param {number} prevAngle
|
||||
* @param {Record<string, any>} opts
|
||||
*/
|
||||
animateArc(el, fromStartAngle, toStartAngle, angle, prevAngle, opts) {
|
||||
const me = this;
|
||||
const w = this.w;
|
||||
const animations = new Animations(this.w);
|
||||
const size = opts.size;
|
||||
let path;
|
||||
if (isNaN(fromStartAngle) || isNaN(prevAngle)) {
|
||||
fromStartAngle = toStartAngle;
|
||||
prevAngle = angle;
|
||||
opts.dur = 0;
|
||||
}
|
||||
let currAngle = angle;
|
||||
let startAngle = toStartAngle;
|
||||
const fromAngle = fromStartAngle < toStartAngle ? this.fullAngle + fromStartAngle - toStartAngle : fromStartAngle - toStartAngle;
|
||||
if (w.globals.dataChanged && opts.shouldSetPrevPaths) {
|
||||
if (opts.prevEndAngle) {
|
||||
path = me.getPiePath({
|
||||
me,
|
||||
startAngle: opts.prevStartAngle,
|
||||
angle: opts.prevEndAngle < opts.prevStartAngle ? this.fullAngle + opts.prevEndAngle - opts.prevStartAngle : opts.prevEndAngle - opts.prevStartAngle,
|
||||
size
|
||||
});
|
||||
el.attr({ d: path });
|
||||
}
|
||||
}
|
||||
if (opts.dur !== 0) {
|
||||
el.animate(opts.dur, opts.animBeginArr[opts.i]).after(
|
||||
/** @this {any} */
|
||||
function() {
|
||||
if (me.chartType === "pie" || me.chartType === "donut" || me.chartType === "polarArea") {
|
||||
this.animate(
|
||||
w.config.chart.animations.dynamicAnimation.speed
|
||||
).attr({
|
||||
"stroke-width": me.strokeWidth
|
||||
});
|
||||
}
|
||||
if (opts.i === w.config.series.length - 1) {
|
||||
animations.animationCompleted(el);
|
||||
}
|
||||
}
|
||||
).during((pos) => {
|
||||
currAngle = fromAngle + (angle - fromAngle) * pos;
|
||||
if (opts.animateStartingPos) {
|
||||
currAngle = prevAngle + (angle - prevAngle) * pos;
|
||||
startAngle = fromStartAngle - prevAngle + (toStartAngle - (fromStartAngle - prevAngle)) * pos;
|
||||
}
|
||||
path = me.getPiePath({
|
||||
me,
|
||||
startAngle,
|
||||
angle: currAngle,
|
||||
size
|
||||
});
|
||||
el.node.setAttribute("data:pathOrig", path);
|
||||
el.attr({
|
||||
d: path
|
||||
});
|
||||
});
|
||||
} else {
|
||||
path = me.getPiePath({
|
||||
me,
|
||||
startAngle,
|
||||
angle,
|
||||
size
|
||||
});
|
||||
if (!opts.isTrack) {
|
||||
w.globals.animationEnded = true;
|
||||
}
|
||||
el.node.setAttribute("data:pathOrig", path);
|
||||
el.attr({
|
||||
d: path,
|
||||
"stroke-width": me.strokeWidth
|
||||
});
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param {number} i
|
||||
*/
|
||||
pieClicked(i) {
|
||||
const w = this.w;
|
||||
const me = this;
|
||||
const size = me.sliceSizes[i] + (w.config.plotOptions.pie.expandOnClick ? 4 : 0);
|
||||
const elPath = w.dom.Paper.findOne(
|
||||
`.apexcharts-${me.chartType.toLowerCase()}-slice-${i}`
|
||||
);
|
||||
if (elPath.attr("data:pieClicked") === "true") {
|
||||
elPath.attr({
|
||||
"data:pieClicked": "false"
|
||||
});
|
||||
this.revertDataLabelsInner();
|
||||
const origPath = elPath.attr("data:pathOrig");
|
||||
elPath.attr({
|
||||
d: origPath
|
||||
});
|
||||
return;
|
||||
} else {
|
||||
const allEls = w.dom.baseEl.getElementsByClassName("apexcharts-pie-area");
|
||||
Array.prototype.forEach.call(allEls, (pieSlice) => {
|
||||
pieSlice.setAttribute("data:pieClicked", "false");
|
||||
const origPath = pieSlice.getAttribute("data:pathOrig");
|
||||
if (origPath) {
|
||||
pieSlice.setAttribute("d", origPath);
|
||||
}
|
||||
});
|
||||
w.interact.capturedDataPointIndex = i;
|
||||
elPath.attr("data:pieClicked", "true");
|
||||
}
|
||||
const startAngle = parseInt(elPath.attr("data:startAngle"), 10);
|
||||
const angle = parseInt(elPath.attr("data:angle"), 10);
|
||||
const path = me.getPiePath({
|
||||
me,
|
||||
startAngle,
|
||||
angle,
|
||||
size
|
||||
});
|
||||
if (angle === 360) return;
|
||||
elPath.plot(path);
|
||||
}
|
||||
/**
|
||||
* @param {number} prevStartAngle
|
||||
* @param {number} prevEndAngle
|
||||
*/
|
||||
getChangedPath(prevStartAngle, prevEndAngle) {
|
||||
let path = "";
|
||||
if (this.dynamicAnim && this.w.globals.dataChanged) {
|
||||
path = this.getPiePath({
|
||||
me: this,
|
||||
startAngle: prevStartAngle,
|
||||
angle: prevEndAngle - prevStartAngle,
|
||||
// @ts-ignore — size is set dynamically during draw()
|
||||
size: this.size
|
||||
});
|
||||
}
|
||||
return path;
|
||||
}
|
||||
/** @param {{me: any, startAngle: any, angle: any, size: any}} opts */
|
||||
getPiePath({ me, startAngle, angle, size }) {
|
||||
let path;
|
||||
const graphics = new Graphics(this.w);
|
||||
const startDeg = startAngle;
|
||||
const startRadians = Math.PI * (startDeg - 90) / 180;
|
||||
let endDeg = angle + startAngle;
|
||||
if (Math.ceil(endDeg) >= this.fullAngle + this.w.config.plotOptions.pie.startAngle % this.fullAngle) {
|
||||
endDeg = this.fullAngle + this.w.config.plotOptions.pie.startAngle % this.fullAngle - 0.01;
|
||||
}
|
||||
if (Math.ceil(endDeg) > this.fullAngle) endDeg -= this.fullAngle;
|
||||
const endRadians = Math.PI * (endDeg - 90) / 180;
|
||||
const x1 = me.centerX + size * Math.cos(startRadians);
|
||||
const y1 = me.centerY + size * Math.sin(startRadians);
|
||||
const x2 = me.centerX + size * Math.cos(endRadians);
|
||||
const y2 = me.centerY + size * Math.sin(endRadians);
|
||||
const startInner = Utils.polarToCartesian(
|
||||
me.centerX,
|
||||
me.centerY,
|
||||
me.donutSize,
|
||||
endDeg
|
||||
);
|
||||
const endInner = Utils.polarToCartesian(
|
||||
me.centerX,
|
||||
me.centerY,
|
||||
me.donutSize,
|
||||
startDeg
|
||||
);
|
||||
const largeArc = angle > 180 ? 1 : 0;
|
||||
const pathBeginning = ["M", x1, y1, "A", size, size, 0, largeArc, 1, x2, y2];
|
||||
if (me.chartType === "donut") {
|
||||
path = [
|
||||
...pathBeginning,
|
||||
"L",
|
||||
startInner.x,
|
||||
startInner.y,
|
||||
"A",
|
||||
me.donutSize,
|
||||
me.donutSize,
|
||||
0,
|
||||
largeArc,
|
||||
0,
|
||||
endInner.x,
|
||||
endInner.y,
|
||||
"L",
|
||||
x1,
|
||||
y1,
|
||||
"z"
|
||||
].join(" ");
|
||||
} else if (me.chartType === "pie" || me.chartType === "polarArea") {
|
||||
path = [...pathBeginning, "L", me.centerX, me.centerY, "L", x1, y1].join(
|
||||
" "
|
||||
);
|
||||
} else {
|
||||
path = [...pathBeginning].join(" ");
|
||||
}
|
||||
return graphics.roundPathCorners(path, this.strokeWidth * 2);
|
||||
}
|
||||
/**
|
||||
* @param {any} parent
|
||||
*/
|
||||
drawPolarElements(parent) {
|
||||
const w = this.w;
|
||||
const scale = new Scales(this.w);
|
||||
const graphics = new Graphics(this.w);
|
||||
const helpers = new CircularChartsHelpers(this.w);
|
||||
const gCircles = graphics.group();
|
||||
const gYAxis = graphics.group();
|
||||
const yScale = scale.niceScale(0, Math.ceil(this.maxY), 0);
|
||||
const yTexts = yScale.result.reverse();
|
||||
const len = yScale.result.length;
|
||||
this.maxY = yScale.niceMax;
|
||||
let circleSize = w.globals.radialSize;
|
||||
const diff = circleSize / (len - 1);
|
||||
for (let i = 0; i < len - 1; i++) {
|
||||
const circle = graphics.drawCircle(circleSize);
|
||||
circle.attr({
|
||||
cx: this.centerX,
|
||||
cy: this.centerY,
|
||||
fill: "none",
|
||||
"stroke-width": w.config.plotOptions.polarArea.rings.strokeWidth,
|
||||
stroke: w.config.plotOptions.polarArea.rings.strokeColor
|
||||
});
|
||||
if (w.config.yaxis[0].show) {
|
||||
const yLabel = helpers.drawYAxisTexts(
|
||||
this.centerX,
|
||||
this.centerY - circleSize + parseInt(w.config.yaxis[0].labels.style.fontSize, 10) / 2,
|
||||
i,
|
||||
yTexts[i]
|
||||
);
|
||||
gYAxis.add(yLabel);
|
||||
}
|
||||
gCircles.add(circle);
|
||||
circleSize = circleSize - diff;
|
||||
}
|
||||
this.drawSpokes(parent);
|
||||
parent.add(gCircles);
|
||||
parent.add(gYAxis);
|
||||
}
|
||||
/**
|
||||
* @param {any} dataLabelsGroup
|
||||
* @param {Record<string, any>} dataLabelsConfig
|
||||
* @param {Record<string, any>} opts
|
||||
*/
|
||||
renderInnerDataLabels(dataLabelsGroup, dataLabelsConfig, opts) {
|
||||
const w = this.w;
|
||||
const graphics = new Graphics(this.w);
|
||||
const showTotal = dataLabelsConfig.total.show;
|
||||
dataLabelsGroup.node.innerHTML = "";
|
||||
dataLabelsGroup.node.style.opacity = opts.opacity;
|
||||
const x = opts.centerX;
|
||||
const y = !this.donutDataLabels.total.label ? opts.centerY - opts.centerY / 6 : opts.centerY;
|
||||
let labelColor, valueColor;
|
||||
if (dataLabelsConfig.name.color === void 0) {
|
||||
labelColor = w.globals.colors[0];
|
||||
} else {
|
||||
labelColor = dataLabelsConfig.name.color;
|
||||
}
|
||||
let labelFontSize = dataLabelsConfig.name.fontSize;
|
||||
let labelFontFamily = dataLabelsConfig.name.fontFamily;
|
||||
let labelFontWeight = dataLabelsConfig.name.fontWeight;
|
||||
if (dataLabelsConfig.value.color === void 0) {
|
||||
valueColor = w.config.chart.foreColor;
|
||||
} else {
|
||||
valueColor = dataLabelsConfig.value.color;
|
||||
}
|
||||
const lbFormatter = dataLabelsConfig.value.formatter;
|
||||
let val = "";
|
||||
let name = "";
|
||||
if (showTotal) {
|
||||
labelColor = dataLabelsConfig.total.color;
|
||||
labelFontSize = dataLabelsConfig.total.fontSize;
|
||||
labelFontFamily = dataLabelsConfig.total.fontFamily;
|
||||
labelFontWeight = dataLabelsConfig.total.fontWeight;
|
||||
name = !this.donutDataLabels.total.label ? "" : dataLabelsConfig.total.label;
|
||||
val = dataLabelsConfig.total.formatter(w);
|
||||
} else {
|
||||
if (w.seriesData.series.length === 1) {
|
||||
val = lbFormatter(w.seriesData.series[0], w);
|
||||
name = w.seriesData.seriesNames[0];
|
||||
}
|
||||
}
|
||||
if (name) {
|
||||
name = dataLabelsConfig.name.formatter(
|
||||
name,
|
||||
dataLabelsConfig.total.show,
|
||||
w
|
||||
);
|
||||
}
|
||||
if (dataLabelsConfig.name.show) {
|
||||
const elLabel = graphics.drawText({
|
||||
x,
|
||||
y: y + parseFloat(dataLabelsConfig.name.offsetY),
|
||||
text: name,
|
||||
textAnchor: "middle",
|
||||
foreColor: labelColor,
|
||||
fontSize: labelFontSize,
|
||||
fontWeight: labelFontWeight,
|
||||
fontFamily: labelFontFamily
|
||||
});
|
||||
elLabel.node.classList.add("apexcharts-datalabel-label");
|
||||
dataLabelsGroup.add(elLabel);
|
||||
}
|
||||
if (dataLabelsConfig.value.show) {
|
||||
const valOffset = dataLabelsConfig.name.show ? parseFloat(dataLabelsConfig.value.offsetY) + 16 : dataLabelsConfig.value.offsetY;
|
||||
const elValue = graphics.drawText({
|
||||
x,
|
||||
y: y + valOffset,
|
||||
text: val,
|
||||
textAnchor: "middle",
|
||||
foreColor: valueColor,
|
||||
fontWeight: dataLabelsConfig.value.fontWeight,
|
||||
fontSize: dataLabelsConfig.value.fontSize,
|
||||
fontFamily: dataLabelsConfig.value.fontFamily
|
||||
});
|
||||
elValue.node.classList.add("apexcharts-datalabel-value");
|
||||
dataLabelsGroup.add(elValue);
|
||||
}
|
||||
return dataLabelsGroup;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param {string} name - The name of the series
|
||||
* @param {string} val - The value of that series
|
||||
* @param {any} el - Optional el (indicates which series was hovered/clicked). If this param is not present, means we need to show total
|
||||
* @param {Record<string, any>} labelsConfig
|
||||
*/
|
||||
printInnerLabels(labelsConfig, name, val, el) {
|
||||
const w = this.w;
|
||||
let labelColor;
|
||||
if (el) {
|
||||
if (labelsConfig.name.color === void 0) {
|
||||
labelColor = w.globals.colors[parseInt(el.parentNode.getAttribute("rel"), 10) - 1];
|
||||
} else {
|
||||
labelColor = labelsConfig.name.color;
|
||||
}
|
||||
} else {
|
||||
if (w.seriesData.series.length > 1 && labelsConfig.total.show) {
|
||||
labelColor = labelsConfig.total.color;
|
||||
}
|
||||
}
|
||||
const elLabel = w.dom.baseEl.querySelector(".apexcharts-datalabel-label");
|
||||
const elValue = w.dom.baseEl.querySelector(".apexcharts-datalabel-value");
|
||||
const lbFormatter = labelsConfig.value.formatter;
|
||||
val = lbFormatter(val, w);
|
||||
if (!el && typeof labelsConfig.total.formatter === "function") {
|
||||
val = labelsConfig.total.formatter(w);
|
||||
}
|
||||
const isTotal = name === labelsConfig.total.label;
|
||||
name = !this.donutDataLabels.total.label ? "" : labelsConfig.name.formatter(name, isTotal, w);
|
||||
if (elLabel !== null) {
|
||||
elLabel.textContent = name;
|
||||
}
|
||||
if (elValue !== null) {
|
||||
elValue.textContent = val;
|
||||
}
|
||||
if (elLabel !== null) {
|
||||
const elLabelEl = (
|
||||
/** @type {HTMLElement} */
|
||||
elLabel
|
||||
);
|
||||
elLabelEl.style.fill = labelColor;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param {any} el
|
||||
* @param {Record<string, any>} dataLabelsConfig
|
||||
*/
|
||||
printDataLabelsInner(el, dataLabelsConfig) {
|
||||
const w = this.w;
|
||||
const val = el.getAttribute("data:value");
|
||||
const name = w.seriesData.seriesNames[parseInt(el.parentNode.getAttribute("rel"), 10) - 1];
|
||||
if (w.seriesData.series.length > 1) {
|
||||
this.printInnerLabels(dataLabelsConfig, name, val, el);
|
||||
}
|
||||
const dataLabelsGroup = w.dom.baseEl.querySelector(
|
||||
".apexcharts-datalabels-group"
|
||||
);
|
||||
if (dataLabelsGroup !== null) {
|
||||
const dataLabelsGroupEl = (
|
||||
/** @type {HTMLElement} */
|
||||
dataLabelsGroup
|
||||
);
|
||||
dataLabelsGroupEl.style.opacity = "1";
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param {any} parent
|
||||
*/
|
||||
drawSpokes(parent) {
|
||||
const w = this.w;
|
||||
const graphics = new Graphics(this.w);
|
||||
const spokeConfig = w.config.plotOptions.polarArea.spokes;
|
||||
if (spokeConfig.strokeWidth === 0) return;
|
||||
const spokes = [];
|
||||
const angleDivision = 360 / w.seriesData.series.length;
|
||||
for (let i = 0; i < w.seriesData.series.length; i++) {
|
||||
spokes.push(
|
||||
Utils.polarToCartesian(
|
||||
this.centerX,
|
||||
this.centerY,
|
||||
w.globals.radialSize,
|
||||
w.config.plotOptions.pie.startAngle + angleDivision * i
|
||||
)
|
||||
);
|
||||
}
|
||||
spokes.forEach((p, i) => {
|
||||
const line = graphics.drawLine(
|
||||
p.x,
|
||||
p.y,
|
||||
this.centerX,
|
||||
this.centerY,
|
||||
Array.isArray(spokeConfig.connectorColors) ? spokeConfig.connectorColors[i] : spokeConfig.connectorColors
|
||||
);
|
||||
parent.add(line);
|
||||
});
|
||||
}
|
||||
revertDataLabelsInner() {
|
||||
const w = this.w;
|
||||
if (this.donutDataLabels.show) {
|
||||
const dataLabelsGroup = w.dom.Paper.findOne(
|
||||
`.apexcharts-datalabels-group`
|
||||
);
|
||||
const dataLabels = this.renderInnerDataLabels(
|
||||
dataLabelsGroup,
|
||||
this.donutDataLabels,
|
||||
{
|
||||
hollowSize: this.donutSize,
|
||||
centerX: this.centerX,
|
||||
centerY: this.centerY,
|
||||
opacity: this.donutDataLabels.show
|
||||
}
|
||||
);
|
||||
const elPie = w.dom.Paper.findOne(
|
||||
".apexcharts-radialbar, .apexcharts-pie"
|
||||
);
|
||||
elPie.add(dataLabels);
|
||||
}
|
||||
}
|
||||
}
|
||||
_core__default.use({
|
||||
pie: Pie,
|
||||
donut: Pie,
|
||||
polarArea: Pie
|
||||
});
|
||||
export {
|
||||
default2 as default
|
||||
};
|
||||
5
storage/public/dist/libs/apexcharts/dist/features/all.common.js
vendored
Normal file
5
storage/public/dist/libs/apexcharts/dist/features/all.common.js
vendored
Normal file
File diff suppressed because one or more lines are too long
4085
storage/public/dist/libs/apexcharts/dist/features/all.esm.js
vendored
Normal file
4085
storage/public/dist/libs/apexcharts/dist/features/all.esm.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
5
storage/public/dist/libs/apexcharts/dist/features/annotations.common.js
vendored
Normal file
5
storage/public/dist/libs/apexcharts/dist/features/annotations.common.js
vendored
Normal file
File diff suppressed because one or more lines are too long
923
storage/public/dist/libs/apexcharts/dist/features/annotations.esm.js
vendored
Normal file
923
storage/public/dist/libs/apexcharts/dist/features/annotations.esm.js
vendored
Normal file
|
|
@ -0,0 +1,923 @@
|
|||
/*!
|
||||
* ApexCharts v5.10.4
|
||||
* (c) 2018-2026 ApexCharts
|
||||
*/
|
||||
import * as _core from "apexcharts/core";
|
||||
import _core__default from "apexcharts/core";
|
||||
import { default as default2 } from "apexcharts/core";
|
||||
const Graphics = _core.__apex_Graphics;
|
||||
const Utils = _core.__apex_Utils;
|
||||
const CoreUtils = _core.__apex_CoreUtils;
|
||||
class Helpers {
|
||||
/**
|
||||
* @param {import('./Annotations').default} annoCtx
|
||||
*/
|
||||
constructor(annoCtx) {
|
||||
this.w = annoCtx.w;
|
||||
this.annoCtx = annoCtx;
|
||||
}
|
||||
/**
|
||||
* @param {Record<string, any>} anno
|
||||
* @param {number | null} [annoIndex]
|
||||
*/
|
||||
setOrientations(anno, annoIndex = null) {
|
||||
var _a, _b;
|
||||
const w = this.w;
|
||||
if (anno.label.orientation === "vertical") {
|
||||
const i = annoIndex !== null ? annoIndex : 0;
|
||||
const xAnno = w.dom.baseEl.querySelector(
|
||||
`.apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='${i}']`
|
||||
);
|
||||
if (xAnno !== null) {
|
||||
const xAnnoCoord = (
|
||||
/** @type {SVGGraphicsElement} */
|
||||
xAnno.getBBox()
|
||||
);
|
||||
xAnno.setAttribute(
|
||||
"x",
|
||||
String(
|
||||
parseFloat((_a = xAnno.getAttribute("x")) != null ? _a : "0") - xAnnoCoord.height + 4
|
||||
)
|
||||
);
|
||||
const yOffset = anno.label.position === "top" ? xAnnoCoord.width : -xAnnoCoord.width;
|
||||
xAnno.setAttribute(
|
||||
"y",
|
||||
String(parseFloat((_b = xAnno.getAttribute("y")) != null ? _b : "0") + yOffset)
|
||||
);
|
||||
const { x, y } = this.annoCtx.graphics.rotateAroundCenter(xAnno);
|
||||
xAnno.setAttribute("transform", `rotate(-90 ${x} ${y})`);
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param {any} annoEl
|
||||
* @param {Record<string, any>} anno
|
||||
*/
|
||||
addBackgroundToAnno(annoEl, anno) {
|
||||
const w = this.w;
|
||||
if (!annoEl || !anno.label.text || !String(anno.label.text).trim()) {
|
||||
return null;
|
||||
}
|
||||
const gridEl = w.dom.baseEl.querySelector(".apexcharts-grid");
|
||||
if (!gridEl) return null;
|
||||
const elGridRect = gridEl.getBoundingClientRect();
|
||||
const gridBBox = (
|
||||
/** @type {SVGGraphicsElement} */
|
||||
gridEl.getBBox()
|
||||
);
|
||||
const zoom = elGridRect.width / gridBBox.width || 1;
|
||||
const coords = annoEl.getBoundingClientRect();
|
||||
let {
|
||||
left: pleft,
|
||||
right: pright,
|
||||
top: ptop,
|
||||
bottom: pbottom
|
||||
} = anno.label.style.padding;
|
||||
if (anno.label.orientation === "vertical") {
|
||||
[ptop, pbottom, pleft, pright] = [pleft, pright, ptop, pbottom];
|
||||
}
|
||||
const x1 = (coords.left - elGridRect.left) / zoom - pleft;
|
||||
const y1 = (coords.top - elGridRect.top) / zoom - ptop;
|
||||
const elRect = this.annoCtx.graphics.drawRect(
|
||||
x1 - w.globals.barPadForNumericAxis,
|
||||
y1,
|
||||
coords.width / zoom + pleft + pright,
|
||||
coords.height / zoom + ptop + pbottom,
|
||||
anno.label.borderRadius,
|
||||
anno.label.style.background,
|
||||
1,
|
||||
anno.label.borderWidth,
|
||||
anno.label.borderColor,
|
||||
0
|
||||
);
|
||||
if (anno.id) {
|
||||
elRect.node.classList.add(anno.id);
|
||||
}
|
||||
return elRect;
|
||||
}
|
||||
annotationsBackground() {
|
||||
const w = this.w;
|
||||
const add = (anno, i, type) => {
|
||||
const annoLabel = w.dom.baseEl.querySelector(
|
||||
`.apexcharts-${type}-annotations .apexcharts-${type}-annotation-label[rel='${i}']`
|
||||
);
|
||||
if (annoLabel) {
|
||||
const parent = annoLabel.parentNode;
|
||||
const elRect = this.addBackgroundToAnno(annoLabel, anno);
|
||||
if (elRect) {
|
||||
parent == null ? void 0 : parent.insertBefore(elRect.node, annoLabel);
|
||||
if (anno.label.mouseEnter) {
|
||||
elRect.node.addEventListener(
|
||||
"mouseenter",
|
||||
anno.label.mouseEnter.bind(this, anno)
|
||||
);
|
||||
}
|
||||
if (anno.label.mouseLeave) {
|
||||
elRect.node.addEventListener(
|
||||
"mouseleave",
|
||||
anno.label.mouseLeave.bind(this, anno)
|
||||
);
|
||||
}
|
||||
if (anno.label.click) {
|
||||
elRect.node.addEventListener(
|
||||
"click",
|
||||
anno.label.click.bind(this, anno)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
w.config.annotations.xaxis.forEach(
|
||||
(anno, i) => add(anno, i, "xaxis")
|
||||
);
|
||||
w.config.annotations.yaxis.forEach(
|
||||
(anno, i) => add(anno, i, "yaxis")
|
||||
);
|
||||
w.config.annotations.points.forEach(
|
||||
(anno, i) => add(anno, i, "point")
|
||||
);
|
||||
}
|
||||
/**
|
||||
* @param {string} type
|
||||
* @param {Record<string, any>} anno
|
||||
*/
|
||||
getY1Y2(type, anno) {
|
||||
var _a, _b;
|
||||
const w = this.w;
|
||||
const y = type === "y1" ? anno.y : anno.y2;
|
||||
let yP;
|
||||
let clipped = false;
|
||||
if (this.annoCtx.invertAxis) {
|
||||
const labels = w.config.xaxis.convertedCatToNumeric ? w.labelData.categoryLabels : w.labelData.labels;
|
||||
const catIndex = labels.indexOf(y);
|
||||
const xLabel = w.dom.baseEl.querySelector(
|
||||
`.apexcharts-yaxis-texts-g text:nth-child(${catIndex + 1})`
|
||||
);
|
||||
yP = xLabel ? parseFloat((_a = xLabel.getAttribute("y")) != null ? _a : "0") : (w.layout.gridHeight / labels.length - 1) * (catIndex + 1) - w.globals.barHeight;
|
||||
if (anno.seriesIndex !== void 0 && w.globals.barHeight) {
|
||||
yP -= w.globals.barHeight / 2 * (w.seriesData.series.length - 1) - w.globals.barHeight * anno.seriesIndex;
|
||||
}
|
||||
} else {
|
||||
const seriesIndex = w.globals.seriesYAxisMap[anno.yAxisIndex][0];
|
||||
const yPos = w.config.yaxis[anno.yAxisIndex].logarithmic ? new CoreUtils(this.w).getLogVal(
|
||||
w.config.yaxis[anno.yAxisIndex].logBase,
|
||||
y,
|
||||
seriesIndex
|
||||
) / /** @type {any} */
|
||||
w.globals.yLogRatio[seriesIndex] : (y - w.globals.minYArr[seriesIndex]) / (w.globals.yRange[seriesIndex] / w.layout.gridHeight);
|
||||
yP = w.layout.gridHeight - Math.min(Math.max(yPos, 0), w.layout.gridHeight);
|
||||
clipped = yPos > w.layout.gridHeight || yPos < 0;
|
||||
if (anno.marker && (anno.y === void 0 || anno.y === null)) {
|
||||
yP = 0;
|
||||
}
|
||||
if ((_b = w.config.yaxis[anno.yAxisIndex]) == null ? void 0 : _b.reversed) {
|
||||
yP = yPos;
|
||||
}
|
||||
}
|
||||
if (typeof y === "string" && y.includes("px")) {
|
||||
yP = parseFloat(y);
|
||||
}
|
||||
return { yP, clipped };
|
||||
}
|
||||
/**
|
||||
* @param {string} type
|
||||
* @param {Record<string, any>} anno
|
||||
*/
|
||||
getX1X2(type, anno) {
|
||||
const w = this.w;
|
||||
const x = type === "x1" ? anno.x : anno.x2;
|
||||
const min = this.annoCtx.invertAxis ? w.globals.minY : w.globals.minX;
|
||||
const max = this.annoCtx.invertAxis ? w.globals.maxY : w.globals.maxX;
|
||||
const range = this.annoCtx.invertAxis ? w.globals.yRange[0] : w.globals.xRange;
|
||||
let clipped = false;
|
||||
let xP = this.annoCtx.inversedReversedAxis ? (max - x) / (range / w.layout.gridWidth) : (x - min) / (range / w.layout.gridWidth);
|
||||
if ((w.config.xaxis.type === "category" || w.config.xaxis.convertedCatToNumeric) && !this.annoCtx.invertAxis && !w.axisFlags.dataFormatXNumeric) {
|
||||
if (!w.config.chart.sparkline.enabled) {
|
||||
xP = this.getStringX(x);
|
||||
}
|
||||
}
|
||||
if (typeof x === "string" && x.includes("px")) {
|
||||
xP = parseFloat(x);
|
||||
}
|
||||
if ((x === void 0 || x === null) && anno.marker) {
|
||||
xP = w.layout.gridWidth;
|
||||
}
|
||||
if (anno.seriesIndex !== void 0 && w.globals.barWidth && !this.annoCtx.invertAxis) {
|
||||
xP -= w.globals.barWidth / 2 * (w.seriesData.series.length - 1) - w.globals.barWidth * anno.seriesIndex;
|
||||
}
|
||||
if (typeof xP !== "number") {
|
||||
xP = 0;
|
||||
clipped = true;
|
||||
}
|
||||
if (parseFloat(xP.toFixed(10)) > parseFloat(w.layout.gridWidth.toFixed(10))) {
|
||||
xP = w.layout.gridWidth;
|
||||
clipped = true;
|
||||
} else if (xP < 0) {
|
||||
xP = 0;
|
||||
clipped = true;
|
||||
}
|
||||
return { x: xP, clipped };
|
||||
}
|
||||
/**
|
||||
* @param {number} x
|
||||
*/
|
||||
getStringX(x) {
|
||||
var _a;
|
||||
const w = this.w;
|
||||
let rX = x;
|
||||
if (w.config.xaxis.convertedCatToNumeric && w.labelData.categoryLabels.length) {
|
||||
x = w.labelData.categoryLabels.indexOf(String(x)) + 1;
|
||||
}
|
||||
const catIndex = w.labelData.labels.map(
|
||||
(item) => Array.isArray(item) ? item.join(" ") : item
|
||||
).indexOf(x);
|
||||
const xLabel = w.dom.baseEl.querySelector(
|
||||
`.apexcharts-xaxis-texts-g text:nth-child(${catIndex + 1})`
|
||||
);
|
||||
if (xLabel) {
|
||||
rX = parseFloat((_a = xLabel.getAttribute("x")) != null ? _a : "0");
|
||||
}
|
||||
return rX;
|
||||
}
|
||||
}
|
||||
class XAnnotations {
|
||||
/**
|
||||
* @param {import('./Annotations').default} annoCtx
|
||||
*/
|
||||
constructor(annoCtx) {
|
||||
this.w = annoCtx.w;
|
||||
this.annoCtx = annoCtx;
|
||||
this.invertAxis = this.annoCtx.invertAxis;
|
||||
this.helpers = new Helpers(this.annoCtx);
|
||||
}
|
||||
/**
|
||||
* @param {XAxisAnnotations} anno
|
||||
* @param {Element} parent
|
||||
* @param {number} index
|
||||
*/
|
||||
addXaxisAnnotation(anno, parent, index) {
|
||||
const w = this.w;
|
||||
const result = this.helpers.getX1X2("x1", anno);
|
||||
let x1 = result.x;
|
||||
const clipX1 = result.clipped;
|
||||
let clipX2 = true;
|
||||
let x2;
|
||||
const text = anno.label.text;
|
||||
const strokeDashArray = anno.strokeDashArray;
|
||||
if (!Utils.isNumber(x1)) return;
|
||||
if (anno.x2 === null || typeof anno.x2 === "undefined") {
|
||||
if (!clipX1) {
|
||||
const line = this.annoCtx.graphics.drawLine(
|
||||
x1 + anno.offsetX,
|
||||
// x1
|
||||
0 + anno.offsetY,
|
||||
// y1
|
||||
x1 + anno.offsetX,
|
||||
// x2
|
||||
w.layout.gridHeight + anno.offsetY,
|
||||
// y2
|
||||
anno.borderColor,
|
||||
// lineColor
|
||||
strokeDashArray,
|
||||
//dashArray
|
||||
anno.borderWidth
|
||||
);
|
||||
parent.appendChild(line.node);
|
||||
if (anno.id) {
|
||||
line.node.classList.add(anno.id);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
const result2 = this.helpers.getX1X2("x2", anno);
|
||||
x2 = result2.x;
|
||||
clipX2 = result2.clipped;
|
||||
if (x2 < x1) {
|
||||
const temp = x1;
|
||||
x1 = x2;
|
||||
x2 = temp;
|
||||
}
|
||||
const rect = this.annoCtx.graphics.drawRect(
|
||||
x1 + anno.offsetX,
|
||||
// x1
|
||||
0 + anno.offsetY,
|
||||
// y1
|
||||
x2 - x1,
|
||||
// x2
|
||||
w.layout.gridHeight + anno.offsetY,
|
||||
// y2
|
||||
0,
|
||||
// radius
|
||||
anno.fillColor,
|
||||
// color
|
||||
anno.opacity,
|
||||
// opacity,
|
||||
1,
|
||||
// strokeWidth
|
||||
anno.borderColor,
|
||||
// strokeColor
|
||||
strokeDashArray
|
||||
// stokeDashArray
|
||||
);
|
||||
rect.node.classList.add("apexcharts-annotation-rect");
|
||||
rect.attr("clip-path", `url(#gridRectMask${w.globals.cuid})`);
|
||||
parent.appendChild(rect.node);
|
||||
if (anno.id) {
|
||||
rect.node.classList.add(anno.id);
|
||||
}
|
||||
}
|
||||
if (!(clipX1 && clipX2)) {
|
||||
const textRects = this.annoCtx.graphics.getTextRects(
|
||||
text,
|
||||
anno.label.style.fontSize
|
||||
);
|
||||
const textY = anno.label.position === "top" ? 4 : anno.label.position === "center" ? w.layout.gridHeight / 2 + (anno.label.orientation === "vertical" ? textRects.width / 2 : 0) : w.layout.gridHeight;
|
||||
const elText = this.annoCtx.graphics.drawText({
|
||||
x: x1 + anno.label.offsetX,
|
||||
y: textY + anno.label.offsetY - (anno.label.orientation === "vertical" ? anno.label.position === "top" ? textRects.width / 2 - 12 : -textRects.width / 2 : 0),
|
||||
text,
|
||||
textAnchor: anno.label.textAnchor,
|
||||
fontSize: anno.label.style.fontSize,
|
||||
fontFamily: anno.label.style.fontFamily,
|
||||
fontWeight: anno.label.style.fontWeight,
|
||||
foreColor: anno.label.style.color,
|
||||
cssClass: `apexcharts-xaxis-annotation-label ${anno.label.style.cssClass} ${anno.id ? anno.id : ""}`
|
||||
});
|
||||
elText.attr({
|
||||
rel: index
|
||||
});
|
||||
parent.appendChild(elText.node);
|
||||
this.annoCtx.helpers.setOrientations(anno, index);
|
||||
}
|
||||
}
|
||||
drawXAxisAnnotations() {
|
||||
const w = this.w;
|
||||
const elg = this.annoCtx.graphics.group({
|
||||
class: "apexcharts-xaxis-annotations"
|
||||
});
|
||||
w.config.annotations.xaxis.map(
|
||||
(anno, index) => {
|
||||
this.addXaxisAnnotation(anno, elg.node, index);
|
||||
}
|
||||
);
|
||||
return elg;
|
||||
}
|
||||
}
|
||||
const AxesUtils = _core.__apex_axes_AxesUtils;
|
||||
class YAnnotations {
|
||||
/**
|
||||
* @param {import('./Annotations').default} annoCtx
|
||||
*/
|
||||
constructor(annoCtx) {
|
||||
this.w = annoCtx.w;
|
||||
this.annoCtx = annoCtx;
|
||||
this.helpers = new Helpers(this.annoCtx);
|
||||
this.axesUtils = new AxesUtils(this.annoCtx.w, {
|
||||
theme: this.annoCtx.theme,
|
||||
timeScale: this.annoCtx.timeScale
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {YAxisAnnotations} anno
|
||||
* @param {Element} parent
|
||||
* @param {number} index
|
||||
*/
|
||||
addYaxisAnnotation(anno, parent, index) {
|
||||
const w = this.w;
|
||||
const strokeDashArray = anno.strokeDashArray;
|
||||
let result = this.helpers.getY1Y2("y1", anno);
|
||||
let y1 = result.yP;
|
||||
const clipY1 = result.clipped;
|
||||
let y2;
|
||||
let clipY2 = true;
|
||||
let drawn = false;
|
||||
const text = anno.label.text;
|
||||
if (anno.y2 === null || typeof anno.y2 === "undefined") {
|
||||
if (!clipY1) {
|
||||
drawn = true;
|
||||
const line = this.annoCtx.graphics.drawLine(
|
||||
0 + anno.offsetX,
|
||||
// x1
|
||||
y1 + anno.offsetY,
|
||||
// y1
|
||||
this._getYAxisAnnotationWidth(anno),
|
||||
// x2
|
||||
y1 + anno.offsetY,
|
||||
// y2
|
||||
anno.borderColor,
|
||||
// lineColor
|
||||
strokeDashArray,
|
||||
// dashArray
|
||||
anno.borderWidth
|
||||
);
|
||||
parent.appendChild(line.node);
|
||||
if (anno.id) {
|
||||
line.node.classList.add(anno.id);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
result = this.helpers.getY1Y2("y2", anno);
|
||||
y2 = result.yP;
|
||||
clipY2 = result.clipped;
|
||||
if (y2 > y1) {
|
||||
const temp = y1;
|
||||
y1 = y2;
|
||||
y2 = temp;
|
||||
}
|
||||
if (!(clipY1 && clipY2)) {
|
||||
drawn = true;
|
||||
const rect = this.annoCtx.graphics.drawRect(
|
||||
0 + anno.offsetX,
|
||||
// x1
|
||||
y2 + anno.offsetY,
|
||||
// y1
|
||||
this._getYAxisAnnotationWidth(anno),
|
||||
// x2
|
||||
y1 - y2,
|
||||
// y2
|
||||
0,
|
||||
// radius
|
||||
anno.fillColor,
|
||||
// color
|
||||
anno.opacity,
|
||||
// opacity,
|
||||
1,
|
||||
// strokeWidth
|
||||
anno.borderColor,
|
||||
// strokeColor
|
||||
strokeDashArray
|
||||
// stokeDashArray
|
||||
);
|
||||
rect.node.classList.add("apexcharts-annotation-rect");
|
||||
rect.attr("clip-path", `url(#gridRectMask${w.globals.cuid})`);
|
||||
parent.appendChild(rect.node);
|
||||
if (anno.id) {
|
||||
rect.node.classList.add(anno.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (drawn) {
|
||||
const textX = anno.label.position === "right" ? w.layout.gridWidth : anno.label.position === "center" ? w.layout.gridWidth / 2 : 0;
|
||||
const elText = this.annoCtx.graphics.drawText({
|
||||
x: textX + anno.label.offsetX,
|
||||
y: (y2 != null ? y2 : y1) + anno.label.offsetY - 3,
|
||||
text,
|
||||
textAnchor: anno.label.textAnchor,
|
||||
fontSize: anno.label.style.fontSize,
|
||||
fontFamily: anno.label.style.fontFamily,
|
||||
fontWeight: anno.label.style.fontWeight,
|
||||
foreColor: anno.label.style.color,
|
||||
cssClass: `apexcharts-yaxis-annotation-label ${anno.label.style.cssClass} ${anno.id ? anno.id : ""}`
|
||||
});
|
||||
elText.attr({
|
||||
rel: index
|
||||
});
|
||||
parent.appendChild(elText.node);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param {YAxisAnnotations} anno
|
||||
*/
|
||||
_getYAxisAnnotationWidth(anno) {
|
||||
const w = this.w;
|
||||
let width = w.layout.gridWidth;
|
||||
if (anno.width.indexOf("%") > -1) {
|
||||
width = w.layout.gridWidth * parseInt(anno.width, 10) / 100;
|
||||
} else {
|
||||
width = parseInt(anno.width, 10);
|
||||
}
|
||||
return width + anno.offsetX;
|
||||
}
|
||||
drawYAxisAnnotations() {
|
||||
const w = this.w;
|
||||
const elg = this.annoCtx.graphics.group({
|
||||
class: "apexcharts-yaxis-annotations"
|
||||
});
|
||||
w.config.annotations.yaxis.forEach(
|
||||
(anno, index) => {
|
||||
anno.yAxisIndex = this.axesUtils.translateYAxisIndex(anno.yAxisIndex);
|
||||
if (!(this.axesUtils.isYAxisHidden(anno.yAxisIndex) && this.axesUtils.yAxisAllSeriesCollapsed(anno.yAxisIndex))) {
|
||||
this.addYaxisAnnotation(anno, elg.node, index);
|
||||
}
|
||||
}
|
||||
);
|
||||
return elg;
|
||||
}
|
||||
}
|
||||
class PointAnnotations {
|
||||
/**
|
||||
* @param {import('./Annotations').default} annoCtx
|
||||
*/
|
||||
constructor(annoCtx) {
|
||||
this.w = annoCtx.w;
|
||||
this.annoCtx = annoCtx;
|
||||
this.helpers = new Helpers(this.annoCtx);
|
||||
}
|
||||
/**
|
||||
* @param {Record<string, any>} anno
|
||||
* @param {Element} parent
|
||||
* @param {number} index
|
||||
*/
|
||||
addPointAnnotation(anno, parent, index) {
|
||||
const w = this.w;
|
||||
if (w.globals.collapsedSeriesIndices.indexOf(anno.seriesIndex) > -1) {
|
||||
return;
|
||||
}
|
||||
const resultX = this.helpers.getX1X2("x1", anno);
|
||||
const x = resultX.x;
|
||||
const clipX = resultX.clipped;
|
||||
const resultY = this.helpers.getY1Y2("y1", anno);
|
||||
const y = resultY.yP;
|
||||
const clipY = resultY.clipped;
|
||||
if (!Utils.isNumber(x)) return;
|
||||
if (!(clipY || clipX)) {
|
||||
const optsPoints = {
|
||||
pSize: anno.marker.size,
|
||||
pointStrokeWidth: anno.marker.strokeWidth,
|
||||
pointFillColor: anno.marker.fillColor,
|
||||
pointStrokeColor: anno.marker.strokeColor,
|
||||
shape: anno.marker.shape,
|
||||
pRadius: anno.marker.radius,
|
||||
class: `apexcharts-point-annotation-marker ${anno.marker.cssClass} ${anno.id ? anno.id : ""}`
|
||||
};
|
||||
let point = this.annoCtx.graphics.drawMarker(
|
||||
x + anno.marker.offsetX,
|
||||
y + anno.marker.offsetY,
|
||||
optsPoints
|
||||
);
|
||||
parent.appendChild(point.node);
|
||||
const text = anno.label.text ? anno.label.text : "";
|
||||
const elText = this.annoCtx.graphics.drawText({
|
||||
x: x + anno.label.offsetX,
|
||||
y: y + anno.label.offsetY - anno.marker.size - parseFloat(anno.label.style.fontSize) / 1.6,
|
||||
text,
|
||||
textAnchor: anno.label.textAnchor,
|
||||
fontSize: anno.label.style.fontSize,
|
||||
fontFamily: anno.label.style.fontFamily,
|
||||
fontWeight: anno.label.style.fontWeight,
|
||||
foreColor: anno.label.style.color,
|
||||
cssClass: `apexcharts-point-annotation-label ${anno.label.style.cssClass} ${anno.id ? anno.id : ""}`
|
||||
});
|
||||
elText.attr({
|
||||
rel: index
|
||||
});
|
||||
parent.appendChild(elText.node);
|
||||
if (anno.customSVG.SVG) {
|
||||
const g = this.annoCtx.graphics.group({
|
||||
class: "apexcharts-point-annotations-custom-svg " + anno.customSVG.cssClass
|
||||
});
|
||||
g.attr({
|
||||
transform: `translate(${x + anno.customSVG.offsetX}, ${y + anno.customSVG.offsetY})`
|
||||
});
|
||||
g.node.innerHTML = anno.customSVG.SVG;
|
||||
parent.appendChild(g.node);
|
||||
}
|
||||
if (anno.image.path) {
|
||||
const imgWidth = anno.image.width ? anno.image.width : 20;
|
||||
const imgHeight = anno.image.height ? anno.image.height : 20;
|
||||
point = this.annoCtx.addImage({
|
||||
x: x + anno.image.offsetX - imgWidth / 2,
|
||||
y: y + anno.image.offsetY - imgHeight / 2,
|
||||
width: imgWidth,
|
||||
height: imgHeight,
|
||||
path: anno.image.path,
|
||||
appendTo: ".apexcharts-point-annotations"
|
||||
});
|
||||
}
|
||||
if (anno.mouseEnter) {
|
||||
point.node.addEventListener(
|
||||
"mouseenter",
|
||||
anno.mouseEnter.bind(this, anno)
|
||||
);
|
||||
}
|
||||
if (anno.mouseLeave) {
|
||||
point.node.addEventListener(
|
||||
"mouseleave",
|
||||
anno.mouseLeave.bind(this, anno)
|
||||
);
|
||||
}
|
||||
if (anno.click) {
|
||||
point.node.addEventListener("click", anno.click.bind(this, anno));
|
||||
}
|
||||
}
|
||||
}
|
||||
drawPointAnnotations() {
|
||||
const w = this.w;
|
||||
const elg = this.annoCtx.graphics.group({
|
||||
class: "apexcharts-point-annotations"
|
||||
});
|
||||
w.config.annotations.points.map(
|
||||
(anno, index) => {
|
||||
this.addPointAnnotation(anno, elg.node, index);
|
||||
}
|
||||
);
|
||||
return elg;
|
||||
}
|
||||
}
|
||||
const Options = _core.__apex_Options;
|
||||
class Annotations {
|
||||
/**
|
||||
* @param {import('../../types/internal').ChartStateW} w
|
||||
*/
|
||||
constructor(w, { theme = null, timeScale = null } = {}) {
|
||||
this.w = w;
|
||||
this.theme = theme;
|
||||
this.timeScale = timeScale;
|
||||
this.invertAxis = void 0;
|
||||
this.inversedReversedAxis = void 0;
|
||||
this.graphics = new Graphics(this.w);
|
||||
if (this.w.globals.isBarHorizontal) {
|
||||
this.invertAxis = true;
|
||||
}
|
||||
this.helpers = new Helpers(this);
|
||||
this.xAxisAnnotations = new XAnnotations(this);
|
||||
this.yAxisAnnotations = new YAnnotations(this);
|
||||
this.pointsAnnotations = new PointAnnotations(this);
|
||||
if (this.w.globals.isBarHorizontal && this.w.config.yaxis[0].reversed) {
|
||||
this.inversedReversedAxis = true;
|
||||
}
|
||||
this.xDivision = this.w.layout.gridWidth / this.w.globals.dataPoints;
|
||||
}
|
||||
drawAxesAnnotations() {
|
||||
const w = this.w;
|
||||
if (w.globals.axisCharts && w.globals.dataPoints) {
|
||||
const yAnnotations = this.yAxisAnnotations.drawYAxisAnnotations();
|
||||
const xAnnotations = this.xAxisAnnotations.drawXAxisAnnotations();
|
||||
const pointAnnotations = this.pointsAnnotations.drawPointAnnotations();
|
||||
const initialAnim = w.config.chart.animations.enabled;
|
||||
const annoArray = [yAnnotations, xAnnotations, pointAnnotations];
|
||||
const annoElArray = [
|
||||
xAnnotations.node,
|
||||
yAnnotations.node,
|
||||
pointAnnotations.node
|
||||
];
|
||||
for (let i = 0; i < 3; i++) {
|
||||
w.dom.elGraphical.add(annoArray[i]);
|
||||
if (initialAnim && !w.globals.resized && !w.globals.dataChanged) {
|
||||
if (w.config.chart.type !== "scatter" && w.config.chart.type !== "bubble" && w.globals.dataPoints > 1) {
|
||||
annoElArray[i].classList.add("apexcharts-element-hidden");
|
||||
}
|
||||
}
|
||||
w.globals.delayedElements.push({ el: annoElArray[i], index: 0 });
|
||||
}
|
||||
this.helpers.annotationsBackground();
|
||||
}
|
||||
}
|
||||
drawImageAnnos() {
|
||||
const w = this.w;
|
||||
w.config.annotations.images.map((s) => {
|
||||
this.addImage(s);
|
||||
});
|
||||
}
|
||||
drawTextAnnos() {
|
||||
const w = this.w;
|
||||
w.config.annotations.texts.map((t) => {
|
||||
this.addText(t);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {Record<string, any>} anno
|
||||
* @param {Element} parent
|
||||
* @param {number} index
|
||||
*/
|
||||
addXaxisAnnotation(anno, parent, index) {
|
||||
this.xAxisAnnotations.addXaxisAnnotation(anno, parent, index);
|
||||
}
|
||||
/**
|
||||
* @param {Record<string, any>} anno
|
||||
* @param {Element} parent
|
||||
* @param {number} index
|
||||
*/
|
||||
addYaxisAnnotation(anno, parent, index) {
|
||||
this.yAxisAnnotations.addYaxisAnnotation(anno, parent, index);
|
||||
}
|
||||
/**
|
||||
* @param {Record<string, any>} anno
|
||||
* @param {Element} parent
|
||||
* @param {number} index
|
||||
*/
|
||||
addPointAnnotation(anno, parent, index) {
|
||||
this.pointsAnnotations.addPointAnnotation(anno, parent, index);
|
||||
}
|
||||
/**
|
||||
* @param {Record<string, any>} params
|
||||
*/
|
||||
addText(params) {
|
||||
const {
|
||||
x,
|
||||
y,
|
||||
text,
|
||||
textAnchor,
|
||||
foreColor,
|
||||
fontSize,
|
||||
fontFamily,
|
||||
fontWeight,
|
||||
cssClass,
|
||||
backgroundColor,
|
||||
borderWidth,
|
||||
strokeDashArray,
|
||||
borderRadius,
|
||||
borderColor,
|
||||
appendTo = ".apexcharts-svg",
|
||||
paddingLeft = 4,
|
||||
paddingRight = 4,
|
||||
paddingBottom = 2,
|
||||
paddingTop = 2
|
||||
} = params;
|
||||
const w = this.w;
|
||||
const elText = this.graphics.drawText({
|
||||
x,
|
||||
y,
|
||||
text,
|
||||
textAnchor: textAnchor || "start",
|
||||
fontSize: fontSize || "12px",
|
||||
fontWeight: fontWeight || "regular",
|
||||
fontFamily: fontFamily || w.config.chart.fontFamily,
|
||||
foreColor: foreColor || w.config.chart.foreColor,
|
||||
cssClass: "apexcharts-text " + cssClass ? cssClass : ""
|
||||
});
|
||||
const parent = w.dom.baseEl.querySelector(appendTo);
|
||||
if (parent) {
|
||||
parent.appendChild(elText.node);
|
||||
}
|
||||
const textRect = elText.bbox();
|
||||
if (text) {
|
||||
const elRect = this.graphics.drawRect(
|
||||
textRect.x - paddingLeft,
|
||||
textRect.y - paddingTop,
|
||||
textRect.width + paddingLeft + paddingRight,
|
||||
textRect.height + paddingBottom + paddingTop,
|
||||
borderRadius,
|
||||
backgroundColor ? backgroundColor : "transparent",
|
||||
1,
|
||||
borderWidth,
|
||||
borderColor,
|
||||
strokeDashArray
|
||||
);
|
||||
parent.insertBefore(elRect.node, elText.node);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param {Record<string, any>} params
|
||||
*/
|
||||
addImage(params) {
|
||||
const w = this.w;
|
||||
const {
|
||||
path,
|
||||
x = 0,
|
||||
y = 0,
|
||||
width = 20,
|
||||
height = 20,
|
||||
appendTo = ".apexcharts-svg"
|
||||
} = params;
|
||||
const img = w.dom.Paper.image(path);
|
||||
img.size(width, height).move(x, y);
|
||||
const parent = w.dom.baseEl.querySelector(appendTo);
|
||||
if (parent) {
|
||||
parent.appendChild(img.node);
|
||||
}
|
||||
return img;
|
||||
}
|
||||
// The addXaxisAnnotation method requires a parent class, and user calling this method externally on the chart instance may not specify parent, hence a different method
|
||||
/**
|
||||
* @param {Record<string, any>} params
|
||||
* @param {boolean} pushToMemory
|
||||
* @param {any} context
|
||||
*/
|
||||
addXaxisAnnotationExternal(params, pushToMemory, context) {
|
||||
this.addAnnotationExternal({
|
||||
params,
|
||||
pushToMemory,
|
||||
context,
|
||||
type: "xaxis",
|
||||
contextMethod: context.addXaxisAnnotation
|
||||
});
|
||||
return context;
|
||||
}
|
||||
/**
|
||||
* @param {Record<string, any>} params
|
||||
* @param {boolean} pushToMemory
|
||||
* @param {any} context
|
||||
*/
|
||||
addYaxisAnnotationExternal(params, pushToMemory, context) {
|
||||
this.addAnnotationExternal({
|
||||
params,
|
||||
pushToMemory,
|
||||
context,
|
||||
type: "yaxis",
|
||||
contextMethod: context.addYaxisAnnotation
|
||||
});
|
||||
return context;
|
||||
}
|
||||
/**
|
||||
* @param {Record<string, any>} params
|
||||
* @param {boolean} pushToMemory
|
||||
* @param {any} context
|
||||
*/
|
||||
addPointAnnotationExternal(params, pushToMemory, context) {
|
||||
if (typeof this.invertAxis === "undefined") {
|
||||
this.invertAxis = context.w.globals.isBarHorizontal;
|
||||
}
|
||||
this.addAnnotationExternal({
|
||||
params,
|
||||
pushToMemory,
|
||||
context,
|
||||
type: "point",
|
||||
contextMethod: context.addPointAnnotation
|
||||
});
|
||||
return context;
|
||||
}
|
||||
/** @param {{params: any, pushToMemory: any, context: any, type: any, contextMethod: any}} opts */
|
||||
addAnnotationExternal({
|
||||
params,
|
||||
pushToMemory,
|
||||
context,
|
||||
type,
|
||||
contextMethod
|
||||
}) {
|
||||
const me = context;
|
||||
const w = me.w;
|
||||
const parent = w.dom.baseEl.querySelector(`.apexcharts-${type}-annotations`);
|
||||
const index = parent.childNodes.length + 1;
|
||||
const options = new Options();
|
||||
const axesAnno = Object.assign(
|
||||
{},
|
||||
type === "xaxis" ? options.xAxisAnnotation : type === "yaxis" ? options.yAxisAnnotation : options.pointAnnotation
|
||||
);
|
||||
const anno = Utils.extend(axesAnno, params);
|
||||
switch (type) {
|
||||
case "xaxis":
|
||||
this.addXaxisAnnotation(anno, parent, index);
|
||||
break;
|
||||
case "yaxis":
|
||||
this.addYaxisAnnotation(anno, parent, index);
|
||||
break;
|
||||
case "point":
|
||||
this.addPointAnnotation(anno, parent, index);
|
||||
break;
|
||||
}
|
||||
const axesAnnoLabel = w.dom.baseEl.querySelector(
|
||||
`.apexcharts-${type}-annotations .apexcharts-${type}-annotation-label[rel='${index}']`
|
||||
);
|
||||
const elRect = this.helpers.addBackgroundToAnno(axesAnnoLabel, anno);
|
||||
if (elRect) {
|
||||
parent.insertBefore(elRect.node, axesAnnoLabel);
|
||||
}
|
||||
if (pushToMemory) {
|
||||
w.globals.memory.methodsToExec.push({
|
||||
context: me,
|
||||
id: anno.id ? anno.id : Utils.randomId(),
|
||||
method: contextMethod,
|
||||
label: "addAnnotation",
|
||||
params
|
||||
});
|
||||
}
|
||||
return context;
|
||||
}
|
||||
/**
|
||||
* @param {import('../../types/internal').ChartContext} ctx
|
||||
*/
|
||||
clearAnnotations(ctx) {
|
||||
const w = ctx.w;
|
||||
const annos = w.dom.baseEl.querySelectorAll(
|
||||
".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations"
|
||||
);
|
||||
for (let i = w.globals.memory.methodsToExec.length - 1; i >= 0; i--) {
|
||||
if (w.globals.memory.methodsToExec[i].label === "addText" || w.globals.memory.methodsToExec[i].label === "addAnnotation") {
|
||||
w.globals.memory.methodsToExec.splice(i, 1);
|
||||
}
|
||||
}
|
||||
Array.prototype.forEach.call(annos, (a) => {
|
||||
while (a.firstChild) {
|
||||
a.removeChild(a.firstChild);
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {import('../../types/internal').ChartContext} ctx
|
||||
* @param {string} id
|
||||
*/
|
||||
removeAnnotation(ctx, id) {
|
||||
const w = ctx.w;
|
||||
const annos = w.dom.baseEl.querySelectorAll(`.${id}`);
|
||||
if (annos) {
|
||||
w.globals.memory.methodsToExec.map((m, i) => {
|
||||
if (m.id === id) {
|
||||
w.globals.memory.methodsToExec.splice(i, 1);
|
||||
}
|
||||
});
|
||||
Object.keys(w.config.annotations).forEach((key) => {
|
||||
const annotationArray = w.config.annotations[key];
|
||||
if (Array.isArray(annotationArray)) {
|
||||
w.config.annotations[key] = annotationArray.filter((m) => m.id !== id);
|
||||
}
|
||||
});
|
||||
Array.prototype.forEach.call(annos, (a) => {
|
||||
a.parentElement.removeChild(a);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
_core__default.registerFeatures({ annotations: Annotations });
|
||||
export {
|
||||
default2 as default
|
||||
};
|
||||
5
storage/public/dist/libs/apexcharts/dist/features/exports.common.js
vendored
Normal file
5
storage/public/dist/libs/apexcharts/dist/features/exports.common.js
vendored
Normal file
File diff suppressed because one or more lines are too long
440
storage/public/dist/libs/apexcharts/dist/features/exports.esm.js
vendored
Normal file
440
storage/public/dist/libs/apexcharts/dist/features/exports.esm.js
vendored
Normal file
|
|
@ -0,0 +1,440 @@
|
|||
/*!
|
||||
* ApexCharts v5.10.4
|
||||
* (c) 2018-2026 ApexCharts
|
||||
*/
|
||||
import * as _core from "apexcharts/core";
|
||||
import _core__default from "apexcharts/core";
|
||||
import { default as default2 } from "apexcharts/core";
|
||||
const apexchartsLegendCSS = ".apexcharts-flip-y {\n transform: scaleY(-1) translateY(-100%);\n transform-origin: top;\n transform-box: fill-box;\n}\n.apexcharts-flip-x {\n transform: scaleX(-1);\n transform-origin: center;\n transform-box: fill-box;\n}\n.apexcharts-legend {\n display: flex;\n overflow: auto;\n padding: 0 10px;\n}\n.apexcharts-legend.apexcharts-legend-group-horizontal {\n flex-direction: column;\n}\n.apexcharts-legend-group {\n display: flex;\n}\n.apexcharts-legend-group-vertical {\n flex-direction: column-reverse;\n}\n.apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {\n flex-wrap: wrap\n}\n.apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\n flex-direction: column;\n bottom: 0;\n}\n.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\n justify-content: flex-start;\n align-items: flex-start;\n}\n.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {\n justify-content: center;\n align-items: center;\n}\n.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {\n justify-content: flex-end;\n align-items: flex-end;\n}\n.apexcharts-legend-series {\n cursor: pointer;\n line-height: normal;\n display: flex;\n align-items: center;\n}\n.apexcharts-legend-text {\n position: relative;\n font-size: 14px;\n}\n.apexcharts-legend-text *, .apexcharts-legend-marker * {\n pointer-events: none;\n}\n.apexcharts-legend-marker {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n margin-right: 1px;\n}\n\n.apexcharts-legend-series.apexcharts-no-click {\n cursor: auto;\n}\n.apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {\n display: none !important;\n}\n.apexcharts-inactive-legend {\n opacity: 0.45;\n} ";
|
||||
const AxesUtils = _core.__apex_axes_AxesUtils;
|
||||
const Data = _core.__apex_Data;
|
||||
const Series = _core.__apex_Series;
|
||||
const Utils = _core.__apex_Utils;
|
||||
const Environment = _core.__apex_Environment_Environment;
|
||||
class Exports {
|
||||
/**
|
||||
* @param {import('../types/internal').ChartStateW} w
|
||||
* @param {import('../types/internal').ChartContext} ctx
|
||||
*/
|
||||
constructor(w, ctx) {
|
||||
this.w = w;
|
||||
this.ctx = ctx;
|
||||
}
|
||||
/**
|
||||
* @param {string} svgString
|
||||
*/
|
||||
svgStringToNode(svgString) {
|
||||
const parser = new DOMParser();
|
||||
const svgDoc = parser.parseFromString(svgString, "image/svg+xml");
|
||||
return svgDoc.documentElement;
|
||||
}
|
||||
/**
|
||||
* @param {any} svg
|
||||
* @param {number} scale
|
||||
*/
|
||||
scaleSvgNode(svg, scale) {
|
||||
const svgWidth = parseFloat(svg.getAttributeNS(null, "width"));
|
||||
const svgHeight = parseFloat(svg.getAttributeNS(null, "height"));
|
||||
svg.setAttributeNS(null, "width", svgWidth * scale);
|
||||
svg.setAttributeNS(null, "height", svgHeight * scale);
|
||||
svg.setAttributeNS(null, "viewBox", "0 0 " + svgWidth + " " + svgHeight);
|
||||
}
|
||||
/**
|
||||
* @param {number} [_scale]
|
||||
*/
|
||||
getSvgString(_scale) {
|
||||
return new Promise((resolve) => {
|
||||
const w = this.w;
|
||||
let scale = _scale || w.config.chart.toolbar.export.scale || w.config.chart.toolbar.export.width / w.globals.svgWidth;
|
||||
if (!scale) {
|
||||
scale = 1;
|
||||
}
|
||||
const width = w.globals.svgWidth * scale;
|
||||
const height = w.globals.svgHeight * scale;
|
||||
const clonedNode = (
|
||||
/** @type {HTMLElement} */
|
||||
w.dom.elWrap.cloneNode(true)
|
||||
);
|
||||
clonedNode.style.width = width + "px";
|
||||
clonedNode.style.height = height + "px";
|
||||
const serializedNode = new XMLSerializer().serializeToString(clonedNode);
|
||||
const shouldIncludeLegendStyles = w.config.legend.show && w.dom.elLegendWrap && w.dom.elLegendWrap.children.length > 0;
|
||||
let exportStyles = `
|
||||
.apexcharts-tooltip, .apexcharts-toolbar, .apexcharts-xaxistooltip, .apexcharts-yaxistooltip, .apexcharts-xcrosshairs, .apexcharts-ycrosshairs, .apexcharts-zoom-rect, .apexcharts-selection-rect {
|
||||
display: none;
|
||||
}
|
||||
`;
|
||||
if (shouldIncludeLegendStyles) {
|
||||
exportStyles += apexchartsLegendCSS;
|
||||
}
|
||||
let svgString = `
|
||||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
version="1.1"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
class="apexcharts-svg"
|
||||
xmlns:data="ApexChartsNS"
|
||||
transform="translate(0, 0)"
|
||||
width="${w.globals.svgWidth}px" height="${w.globals.svgHeight}px">
|
||||
<foreignObject width="100%" height="100%">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="width:${width}px; height:${height}px;">
|
||||
<style type="text/css">
|
||||
${exportStyles}
|
||||
</style>
|
||||
${serializedNode}
|
||||
</div>
|
||||
</foreignObject>
|
||||
</svg>
|
||||
`;
|
||||
const svgNode = this.svgStringToNode(svgString);
|
||||
if (scale !== 1) {
|
||||
this.scaleSvgNode(svgNode, scale);
|
||||
}
|
||||
this.convertImagesToBase64(svgNode).then(() => {
|
||||
svgString = new XMLSerializer().serializeToString(svgNode);
|
||||
resolve(svgString.replace(/ /g, " "));
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {any} svgNode
|
||||
*/
|
||||
convertImagesToBase64(svgNode) {
|
||||
const images = svgNode.getElementsByTagName("image");
|
||||
const promises = Array.from(images).map((img) => {
|
||||
const href = img.getAttributeNS("http://www.w3.org/1999/xlink", "href");
|
||||
if (href && !href.startsWith("data:")) {
|
||||
return this.getBase64FromUrl(href).then((base64) => {
|
||||
img.setAttributeNS("http://www.w3.org/1999/xlink", "href", base64);
|
||||
}).catch((error) => {
|
||||
console.error("Error converting image to base64:", error);
|
||||
});
|
||||
}
|
||||
return Promise.resolve();
|
||||
});
|
||||
return Promise.all(promises);
|
||||
}
|
||||
/**
|
||||
* @param {string} url
|
||||
*/
|
||||
getBase64FromUrl(url) {
|
||||
if (Environment.isSSR()) return Promise.resolve(url);
|
||||
return new Promise((resolve, reject) => {
|
||||
const img = new Image();
|
||||
img.crossOrigin = "Anonymous";
|
||||
img.onload = () => {
|
||||
const canvas = document.createElement("canvas");
|
||||
canvas.width = img.width;
|
||||
canvas.height = img.height;
|
||||
const ctx = canvas.getContext("2d");
|
||||
if (ctx) ctx.drawImage(img, 0, 0);
|
||||
resolve(canvas.toDataURL());
|
||||
};
|
||||
img.onerror = reject;
|
||||
img.src = url;
|
||||
});
|
||||
}
|
||||
svgUrl() {
|
||||
return new Promise((resolve) => {
|
||||
this.getSvgString().then((svgData) => {
|
||||
const svgBlob = new Blob([svgData], {
|
||||
type: "image/svg+xml;charset=utf-8"
|
||||
});
|
||||
resolve(URL.createObjectURL(svgBlob));
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {Record<string, any> | undefined} options
|
||||
*/
|
||||
dataURI(options) {
|
||||
if (Environment.isSSR()) return Promise.resolve({ imgURI: "" });
|
||||
return new Promise((resolve) => {
|
||||
const w = this.w;
|
||||
const scale = options ? options.scale || options.width / w.globals.svgWidth : 1;
|
||||
const canvas = document.createElement("canvas");
|
||||
canvas.width = w.globals.svgWidth * scale;
|
||||
canvas.height = parseInt(w.dom.elWrap.style.height, 10) * scale;
|
||||
const canvasBg = w.config.chart.background === "transparent" || !w.config.chart.background ? "#fff" : w.config.chart.background;
|
||||
const ctx = canvas.getContext("2d");
|
||||
if (!ctx) return;
|
||||
ctx.fillStyle = canvasBg;
|
||||
ctx.fillRect(0, 0, canvas.width * scale, canvas.height * scale);
|
||||
this.getSvgString(scale).then((svgData) => {
|
||||
const svgUrl = "data:image/svg+xml," + encodeURIComponent(svgData);
|
||||
const img = new Image();
|
||||
img.crossOrigin = "anonymous";
|
||||
img.onload = () => {
|
||||
ctx.drawImage(img, 0, 0);
|
||||
const edgeCanvas = canvas;
|
||||
if (edgeCanvas.msToBlob) {
|
||||
const blob = edgeCanvas.msToBlob();
|
||||
resolve({ blob });
|
||||
} else {
|
||||
const imgURI = canvas.toDataURL("image/png");
|
||||
resolve({ imgURI });
|
||||
}
|
||||
};
|
||||
img.src = svgUrl;
|
||||
});
|
||||
});
|
||||
}
|
||||
exportToSVG() {
|
||||
this.svgUrl().then((url) => {
|
||||
this.triggerDownload(
|
||||
url,
|
||||
this.w.config.chart.toolbar.export.svg.filename,
|
||||
".svg"
|
||||
);
|
||||
});
|
||||
}
|
||||
exportToPng() {
|
||||
const scale = this.w.config.chart.toolbar.export.scale;
|
||||
const width = this.w.config.chart.toolbar.export.width;
|
||||
const option = scale ? { scale } : width ? { width } : void 0;
|
||||
this.dataURI(option).then(({ imgURI, blob }) => {
|
||||
if (blob) {
|
||||
navigator.msSaveOrOpenBlob(blob, this.w.globals.chartID + ".png");
|
||||
} else {
|
||||
this.triggerDownload(
|
||||
imgURI,
|
||||
this.w.config.chart.toolbar.export.png.filename,
|
||||
".png"
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
/** @param {{ series?: any, fileName?: any, columnDelimiter?: string, lineDelimiter?: string }} opts */
|
||||
exportToCSV({
|
||||
series,
|
||||
fileName,
|
||||
columnDelimiter = ",",
|
||||
lineDelimiter = "\n"
|
||||
}) {
|
||||
const w = this.w;
|
||||
if (!series) series = w.config.series;
|
||||
let columns = [];
|
||||
const rows = [];
|
||||
let result = "";
|
||||
const universalBOM = "\uFEFF";
|
||||
const gSeries = w.seriesData.series.map((s, i) => {
|
||||
return w.globals.collapsedSeriesIndices.indexOf(i) === -1 ? s : [];
|
||||
});
|
||||
const getFormattedCategory = (cat) => {
|
||||
if (typeof w.config.chart.toolbar.export.csv.categoryFormatter === "function") {
|
||||
return w.config.chart.toolbar.export.csv.categoryFormatter(cat);
|
||||
}
|
||||
if (w.config.xaxis.type === "datetime" && String(cat).length >= 10) {
|
||||
return new Date(cat).toDateString();
|
||||
}
|
||||
return Utils.isNumber(cat) ? cat : cat.split(columnDelimiter).join("");
|
||||
};
|
||||
const getFormattedValue = (value) => {
|
||||
return typeof w.config.chart.toolbar.export.csv.valueFormatter === "function" ? w.config.chart.toolbar.export.csv.valueFormatter(value) : value;
|
||||
};
|
||||
const seriesMaxDataLength = Math.max(
|
||||
...series.map((s) => {
|
||||
return s.data ? s.data.length : 0;
|
||||
})
|
||||
);
|
||||
const dataFormat = new Data(this.w);
|
||||
const axesUtils = new AxesUtils(this.w, {
|
||||
theme: this.ctx.theme,
|
||||
timeScale: this.ctx.timeScale
|
||||
});
|
||||
const getCat = (i) => {
|
||||
let cat = "";
|
||||
if (!w.globals.axisCharts) {
|
||||
cat = w.config.labels[i];
|
||||
} else {
|
||||
if (w.config.xaxis.type === "category" || w.config.xaxis.convertedCatToNumeric) {
|
||||
if (w.globals.isBarHorizontal) {
|
||||
const lbFormatter = w.formatters.yLabelFormatters[0];
|
||||
const sr = new Series(this.ctx.w);
|
||||
const activeSeries = sr.getActiveConfigSeriesIndex();
|
||||
cat = lbFormatter(w.labelData.labels[i], {
|
||||
seriesIndex: activeSeries,
|
||||
dataPointIndex: i,
|
||||
w
|
||||
});
|
||||
} else {
|
||||
cat = axesUtils.getLabel(
|
||||
w.labelData.labels,
|
||||
w.labelData.timescaleLabels,
|
||||
0,
|
||||
i
|
||||
).text;
|
||||
}
|
||||
}
|
||||
if (w.config.xaxis.type === "datetime") {
|
||||
if (w.config.xaxis.categories.length) {
|
||||
cat = w.config.xaxis.categories[i];
|
||||
} else if (w.config.labels.length) {
|
||||
cat = w.config.labels[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
if (cat === null) return "nullvalue";
|
||||
if (Array.isArray(cat)) {
|
||||
cat = cat.join(" ");
|
||||
}
|
||||
return Utils.isNumber(cat) ? cat : cat.split(columnDelimiter).join("");
|
||||
};
|
||||
const getEmptyDataForCsvColumn = () => {
|
||||
return [...Array(seriesMaxDataLength)].map(() => "");
|
||||
};
|
||||
const handleAxisRowsColumns = (s, sI) => {
|
||||
var _a;
|
||||
if (columns.length && sI === 0) {
|
||||
rows.push(columns.join(columnDelimiter));
|
||||
}
|
||||
if (s.data) {
|
||||
s.data = s.data.length && s.data || getEmptyDataForCsvColumn();
|
||||
for (let i = 0; i < s.data.length; i++) {
|
||||
columns = [];
|
||||
let cat = getCat(i);
|
||||
if (cat === "nullvalue") continue;
|
||||
if (!cat) {
|
||||
if (dataFormat.isFormatXY()) {
|
||||
cat = series[sI].data[i].x;
|
||||
} else if (dataFormat.isFormat2DArray()) {
|
||||
cat = series[sI].data[i] ? series[sI].data[i][0] : "";
|
||||
}
|
||||
}
|
||||
if (sI === 0) {
|
||||
columns.push(getFormattedCategory(cat));
|
||||
for (let ci = 0; ci < w.seriesData.series.length; ci++) {
|
||||
const value = dataFormat.isFormatXY() ? (_a = series[ci].data[i]) == null ? void 0 : _a.y : gSeries[ci][i];
|
||||
columns.push(getFormattedValue(value));
|
||||
}
|
||||
}
|
||||
if (w.config.chart.type === "candlestick" || s.type && s.type === "candlestick") {
|
||||
columns.pop();
|
||||
columns.push(w.candleData.seriesCandleO[sI][i]);
|
||||
columns.push(w.candleData.seriesCandleH[sI][i]);
|
||||
columns.push(w.candleData.seriesCandleL[sI][i]);
|
||||
columns.push(w.candleData.seriesCandleC[sI][i]);
|
||||
}
|
||||
if (w.config.chart.type === "boxPlot" || s.type && s.type === "boxPlot") {
|
||||
columns.pop();
|
||||
columns.push(w.candleData.seriesCandleO[sI][i]);
|
||||
columns.push(w.candleData.seriesCandleH[sI][i]);
|
||||
columns.push(w.candleData.seriesCandleM[sI][i]);
|
||||
columns.push(w.candleData.seriesCandleL[sI][i]);
|
||||
columns.push(w.candleData.seriesCandleC[sI][i]);
|
||||
}
|
||||
if (w.config.chart.type === "rangeBar") {
|
||||
columns.pop();
|
||||
columns.push(w.rangeData.seriesRangeStart[sI][i]);
|
||||
columns.push(w.rangeData.seriesRangeEnd[sI][i]);
|
||||
}
|
||||
if (columns.length) {
|
||||
rows.push(columns.join(columnDelimiter));
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
const handleUnequalXValues = () => {
|
||||
const categories = /* @__PURE__ */ new Set();
|
||||
const data = {};
|
||||
series.forEach((s, sI) => {
|
||||
s == null ? void 0 : s.data.forEach((dataItem) => {
|
||||
let cat, value;
|
||||
if (dataFormat.isFormatXY()) {
|
||||
cat = dataItem.x;
|
||||
value = dataItem.y;
|
||||
} else if (dataFormat.isFormat2DArray()) {
|
||||
cat = dataItem[0];
|
||||
value = dataItem[1];
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
if (!/** @type {Record<string,any>} */
|
||||
data[cat]) {
|
||||
data[cat] = Array(
|
||||
series.length
|
||||
).fill("");
|
||||
}
|
||||
data[cat][sI] = getFormattedValue(value);
|
||||
categories.add(cat);
|
||||
});
|
||||
});
|
||||
if (columns.length) {
|
||||
rows.push(columns.join(columnDelimiter));
|
||||
}
|
||||
Array.from(categories).sort().forEach((cat) => {
|
||||
rows.push([
|
||||
getFormattedCategory(cat),
|
||||
/** @type {Record<string,any>} */
|
||||
data[cat].join(columnDelimiter)
|
||||
]);
|
||||
});
|
||||
};
|
||||
columns.push(w.config.chart.toolbar.export.csv.headerCategory);
|
||||
if (w.config.chart.type === "boxPlot") {
|
||||
columns.push("minimum");
|
||||
columns.push("q1");
|
||||
columns.push("median");
|
||||
columns.push("q3");
|
||||
columns.push("maximum");
|
||||
} else if (w.config.chart.type === "candlestick") {
|
||||
columns.push("open");
|
||||
columns.push("high");
|
||||
columns.push("low");
|
||||
columns.push("close");
|
||||
} else if (w.config.chart.type === "rangeBar") {
|
||||
columns.push("minimum");
|
||||
columns.push("maximum");
|
||||
} else {
|
||||
series.map((s, sI) => {
|
||||
const sname = (s.name ? s.name : `series-${sI}`) + "";
|
||||
if (w.globals.axisCharts) {
|
||||
columns.push(
|
||||
sname.split(columnDelimiter).join("") ? sname.split(columnDelimiter).join("") : `series-${sI}`
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
if (!w.globals.axisCharts) {
|
||||
columns.push(w.config.chart.toolbar.export.csv.headerValue);
|
||||
rows.push(columns.join(columnDelimiter));
|
||||
}
|
||||
if (!w.globals.allSeriesHasEqualX && w.globals.axisCharts && !w.config.xaxis.categories.length && !w.config.labels.length) {
|
||||
handleUnequalXValues();
|
||||
} else {
|
||||
series.map((s, sI) => {
|
||||
if (w.globals.axisCharts) {
|
||||
handleAxisRowsColumns(s, sI);
|
||||
} else {
|
||||
columns = [];
|
||||
columns.push(getFormattedCategory(w.labelData.labels[sI]));
|
||||
columns.push(getFormattedValue(gSeries[sI]));
|
||||
rows.push(columns.join(columnDelimiter));
|
||||
}
|
||||
});
|
||||
}
|
||||
result += rows.join(lineDelimiter);
|
||||
this.triggerDownload(
|
||||
"data:text/csv; charset=utf-8," + encodeURIComponent(universalBOM + result),
|
||||
fileName ? fileName : w.config.chart.toolbar.export.csv.filename,
|
||||
".csv"
|
||||
);
|
||||
}
|
||||
/**
|
||||
* @param {string} href
|
||||
* @param {string} filename
|
||||
* @param {string} ext
|
||||
*/
|
||||
triggerDownload(href, filename, ext) {
|
||||
if (Environment.isSSR()) return;
|
||||
const downloadLink = document.createElement("a");
|
||||
downloadLink.href = href;
|
||||
downloadLink.download = (filename ? filename : this.w.globals.chartID) + ext;
|
||||
document.body.appendChild(downloadLink);
|
||||
downloadLink.click();
|
||||
document.body.removeChild(downloadLink);
|
||||
}
|
||||
}
|
||||
_core__default.registerFeatures({ exports: Exports });
|
||||
export {
|
||||
default2 as default
|
||||
};
|
||||
5
storage/public/dist/libs/apexcharts/dist/features/keyboard.common.js
vendored
Normal file
5
storage/public/dist/libs/apexcharts/dist/features/keyboard.common.js
vendored
Normal file
File diff suppressed because one or more lines are too long
777
storage/public/dist/libs/apexcharts/dist/features/keyboard.esm.js
vendored
Normal file
777
storage/public/dist/libs/apexcharts/dist/features/keyboard.esm.js
vendored
Normal file
|
|
@ -0,0 +1,777 @@
|
|||
var __defProp = Object.defineProperty;
|
||||
var __defProps = Object.defineProperties;
|
||||
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
||||
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
||||
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
||||
var __spreadValues = (a, b) => {
|
||||
for (var prop in b || (b = {}))
|
||||
if (__hasOwnProp.call(b, prop))
|
||||
__defNormalProp(a, prop, b[prop]);
|
||||
if (__getOwnPropSymbols)
|
||||
for (var prop of __getOwnPropSymbols(b)) {
|
||||
if (__propIsEnum.call(b, prop))
|
||||
__defNormalProp(a, prop, b[prop]);
|
||||
}
|
||||
return a;
|
||||
};
|
||||
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
||||
/*!
|
||||
* ApexCharts v5.10.4
|
||||
* (c) 2018-2026 ApexCharts
|
||||
*/
|
||||
import * as _core from "apexcharts/core";
|
||||
import _core__default from "apexcharts/core";
|
||||
import { default as default2 } from "apexcharts/core";
|
||||
const Graphics = _core.__apex_Graphics;
|
||||
const Utils = _core.__apex_Utils;
|
||||
class KeyboardNavigation {
|
||||
/**
|
||||
* @param {import('../../types/internal').ChartStateW} w
|
||||
* @param {import('../../types/internal').ChartContext} ctx
|
||||
*/
|
||||
constructor(w, ctx) {
|
||||
this.w = w;
|
||||
this.ctx = ctx;
|
||||
this.seriesIndex = 0;
|
||||
this.dataPointIndex = 0;
|
||||
this.active = false;
|
||||
this._focusedEl = null;
|
||||
this._hoveredBarEl = null;
|
||||
this._enlargedScatterMarker = null;
|
||||
this._onKeyDown = this._onKeyDown.bind(this);
|
||||
this._onFocus = this._onFocus.bind(this);
|
||||
this._onBlur = this._onBlur.bind(this);
|
||||
this._onLegendClick = this._onLegendClick.bind(this);
|
||||
}
|
||||
// ─── Public API ───────────────────────────────────────────────────────────
|
||||
/**
|
||||
* Called after the chart and tooltip have been fully rendered.
|
||||
* Attaches event listeners and makes the SVG keyboard-focusable.
|
||||
*/
|
||||
init() {
|
||||
const w = this.w;
|
||||
const svgEl = w.dom.Paper.node;
|
||||
if (!svgEl) return;
|
||||
svgEl.setAttribute("tabindex", "0");
|
||||
svgEl.addEventListener("focus", this._onFocus);
|
||||
svgEl.addEventListener("blur", this._onBlur);
|
||||
svgEl.addEventListener("keydown", this._onKeyDown, { passive: false });
|
||||
this.ctx.events.addEventListener("legendClick", this._onLegendClick);
|
||||
}
|
||||
/**
|
||||
* Removes all event listeners. Called from chart.destroy().
|
||||
*/
|
||||
destroy() {
|
||||
const w = this.w;
|
||||
const svgEl = w.dom.Paper && w.dom.Paper.node;
|
||||
if (!svgEl) return;
|
||||
svgEl.removeEventListener("focus", this._onFocus);
|
||||
svgEl.removeEventListener("blur", this._onBlur);
|
||||
svgEl.removeEventListener("keydown", this._onKeyDown);
|
||||
this.ctx.events.removeEventListener("legendClick", this._onLegendClick);
|
||||
}
|
||||
/**
|
||||
* Called from Events.js keydown handler. Navigation keys are already handled
|
||||
* by the direct SVG listener (which can call preventDefault). This entry
|
||||
* point is intentionally a no-op — Events.js still fires the public keyDown
|
||||
* callback and fireEvent('keydown') independently.
|
||||
* @param {Event} _e
|
||||
*/
|
||||
handleKey(_e) {
|
||||
}
|
||||
// ─── Focus / blur ─────────────────────────────────────────────────────────
|
||||
_onFocus() {
|
||||
if (!this._isNavEnabled()) return;
|
||||
this.active = true;
|
||||
this._clampCursor();
|
||||
this._snapToVisibleRange();
|
||||
this._showCurrentPoint();
|
||||
}
|
||||
_onBlur() {
|
||||
this.active = false;
|
||||
this._hideFocus();
|
||||
}
|
||||
// Called when the user clicks a legend item (collapse/expand a series).
|
||||
// Hide the keyboard-nav tooltip — the chart is about to re-render and the
|
||||
// current position may no longer be valid.
|
||||
_onLegendClick() {
|
||||
if (!this.active) return;
|
||||
this.active = false;
|
||||
this._hideFocus();
|
||||
}
|
||||
// ─── Key handler ──────────────────────────────────────────────────────────
|
||||
/**
|
||||
* @param {KeyboardEvent} e
|
||||
*/
|
||||
_onKeyDown(e) {
|
||||
if (!this._isNavEnabled() || !this.active) return;
|
||||
switch (e.key) {
|
||||
case "ArrowRight":
|
||||
e.preventDefault();
|
||||
this._move(0, 1);
|
||||
break;
|
||||
case "ArrowLeft":
|
||||
e.preventDefault();
|
||||
this._move(0, -1);
|
||||
break;
|
||||
case "ArrowUp":
|
||||
e.preventDefault();
|
||||
this._move(-1, 0);
|
||||
break;
|
||||
case "ArrowDown":
|
||||
e.preventDefault();
|
||||
this._move(1, 0);
|
||||
break;
|
||||
case "Home":
|
||||
e.preventDefault();
|
||||
this.dataPointIndex = 0;
|
||||
this._skipNullForward();
|
||||
this._showCurrentPoint();
|
||||
break;
|
||||
case "End":
|
||||
e.preventDefault();
|
||||
this.dataPointIndex = this._getDataPointCount(this.seriesIndex) - 1;
|
||||
this._skipNullBackward();
|
||||
this._showCurrentPoint();
|
||||
break;
|
||||
case "Enter":
|
||||
case " ":
|
||||
e.preventDefault();
|
||||
this._fireClick();
|
||||
break;
|
||||
case "Escape":
|
||||
e.preventDefault();
|
||||
this.active = false;
|
||||
this._hideFocus();
|
||||
break;
|
||||
}
|
||||
}
|
||||
// ─── Navigation ───────────────────────────────────────────────────────────
|
||||
/**
|
||||
* @param {number} dSeries
|
||||
* @param {number} dPoint
|
||||
*/
|
||||
_move(dSeries, dPoint) {
|
||||
const w = this.w;
|
||||
const wrapAround = w.config.chart.accessibility.keyboard.navigation.wrapAround;
|
||||
if (dSeries !== 0) {
|
||||
const ttCtx = this.w.globals.tooltip;
|
||||
if (ttCtx && ttCtx.tConfig && ttCtx.tConfig.shared) {
|
||||
const j = this.dataPointIndex;
|
||||
const isActuallyShared = ttCtx.tooltipUtil && ttCtx.tooltipUtil.isXoverlap(j) && ttCtx.tooltipUtil.isInitialSeriesSameLen();
|
||||
if (isActuallyShared) return;
|
||||
}
|
||||
const total = this._getSeriesCount();
|
||||
let si = this.seriesIndex + dSeries;
|
||||
let attempts = 0;
|
||||
while (attempts < total) {
|
||||
if (si < 0) si = wrapAround ? total - 1 : 0;
|
||||
if (si >= total) si = wrapAround ? 0 : total - 1;
|
||||
if (!w.globals.collapsedSeriesIndices.includes(si)) break;
|
||||
si += dSeries;
|
||||
attempts++;
|
||||
}
|
||||
this.seriesIndex = si;
|
||||
const dpCount = this._getDataPointCount(si);
|
||||
if (this.dataPointIndex >= dpCount) {
|
||||
this.dataPointIndex = dpCount - 1;
|
||||
}
|
||||
}
|
||||
if (dPoint !== 0) {
|
||||
const dpCount = this._getDataPointCount(this.seriesIndex);
|
||||
let di = this.dataPointIndex + dPoint;
|
||||
if (di < 0) di = wrapAround ? dpCount - 1 : 0;
|
||||
if (di >= dpCount) di = wrapAround ? 0 : dpCount - 1;
|
||||
this.dataPointIndex = di;
|
||||
if (dPoint > 0) {
|
||||
this._skipNullForward();
|
||||
} else {
|
||||
this._skipNullBackward();
|
||||
}
|
||||
if (!this._isDataPointVisible(this.seriesIndex, this.dataPointIndex)) {
|
||||
this._snapToVisibleRangeInDirection(dPoint);
|
||||
}
|
||||
}
|
||||
this._showCurrentPoint();
|
||||
}
|
||||
/** Advance dataPointIndex forward past any nulls */
|
||||
_skipNullForward() {
|
||||
const w = this.w;
|
||||
const si = this.seriesIndex;
|
||||
const dpCount = this._getDataPointCount(si);
|
||||
let di = this.dataPointIndex;
|
||||
let attempts = 0;
|
||||
if (!Array.isArray(w.seriesData.series[si])) return;
|
||||
while (attempts < dpCount && w.seriesData.series[si][di] === null) {
|
||||
di = (di + 1) % dpCount;
|
||||
attempts++;
|
||||
}
|
||||
this.dataPointIndex = di;
|
||||
}
|
||||
/** Retreat dataPointIndex backward past any nulls */
|
||||
_skipNullBackward() {
|
||||
const w = this.w;
|
||||
const si = this.seriesIndex;
|
||||
const dpCount = this._getDataPointCount(si);
|
||||
let di = this.dataPointIndex;
|
||||
let attempts = 0;
|
||||
if (!Array.isArray(w.seriesData.series[si])) return;
|
||||
while (attempts < dpCount && w.seriesData.series[si][di] === null) {
|
||||
di = (di - 1 + dpCount) % dpCount;
|
||||
attempts++;
|
||||
}
|
||||
this.dataPointIndex = di;
|
||||
}
|
||||
// ─── Display ──────────────────────────────────────────────────────────────
|
||||
_showCurrentPoint() {
|
||||
const { seriesIndex: i, dataPointIndex: j } = this;
|
||||
const w = this.w;
|
||||
const ttCtx = w.globals.tooltip;
|
||||
if (!ttCtx || !ttCtx.ttItems) return;
|
||||
w.interact.capturedSeriesIndex = i;
|
||||
w.interact.capturedDataPointIndex = j;
|
||||
this._applyFocusClass(i, j);
|
||||
this._showTooltip(
|
||||
i,
|
||||
j,
|
||||
/** @type {any} */
|
||||
ttCtx
|
||||
);
|
||||
}
|
||||
_hideFocus() {
|
||||
const w = this.w;
|
||||
const ttCtx = (
|
||||
/** @type {any} */
|
||||
w.globals.tooltip
|
||||
);
|
||||
this._removeFocusClass();
|
||||
this._leaveHoveredBar();
|
||||
if (!ttCtx) return;
|
||||
if (ttCtx.marker) {
|
||||
ttCtx.marker.resetPointsSize();
|
||||
}
|
||||
this._enlargedScatterMarker = null;
|
||||
const tooltipEl = ttCtx.getElTooltip();
|
||||
if (tooltipEl) {
|
||||
tooltipEl.classList.remove("apexcharts-active");
|
||||
if (w.config.chart.accessibility.enabled && w.config.chart.accessibility.announcements.enabled) {
|
||||
tooltipEl.setAttribute("aria-hidden", "true");
|
||||
}
|
||||
}
|
||||
w.dom.baseEl.classList.remove("apexcharts-tooltip-active");
|
||||
const xcrosshairs = ttCtx.getElXCrosshairs();
|
||||
if (xcrosshairs) xcrosshairs.classList.remove("apexcharts-active");
|
||||
}
|
||||
// ─── Tooltip display per chart type ───────────────────────────────────────
|
||||
/**
|
||||
* @param {number} i
|
||||
* @param {number} j
|
||||
* @param {import('../tooltip/Tooltip').default} ttCtx
|
||||
*/
|
||||
_showTooltip(i, j, ttCtx) {
|
||||
const w = this.w;
|
||||
const type = w.config.chart.type;
|
||||
const tooltipEl = ttCtx.getElTooltip();
|
||||
if (!tooltipEl) return;
|
||||
const cachedDims = ttCtx.getCachedDimensions();
|
||||
ttCtx.tooltipRect = {
|
||||
x: 0,
|
||||
y: 0,
|
||||
ttWidth: cachedDims.ttWidth || 0,
|
||||
ttHeight: cachedDims.ttHeight || 0
|
||||
};
|
||||
this._setSyntheticEvent(i, j, ttCtx);
|
||||
w.dom.baseEl.classList.add("apexcharts-tooltip-active");
|
||||
tooltipEl.classList.add("apexcharts-active");
|
||||
if (w.config.chart.accessibility.enabled && w.config.chart.accessibility.announcements.enabled) {
|
||||
tooltipEl.removeAttribute("aria-hidden");
|
||||
}
|
||||
if (type === "pie" || type === "donut" || type === "polarArea") {
|
||||
this._showTooltipNonAxis(i, j, ttCtx, tooltipEl);
|
||||
} else if (type === "radialBar") {
|
||||
this._showTooltipRadialBar(i, j, ttCtx, tooltipEl);
|
||||
} else if (type === "heatmap" || type === "treemap") {
|
||||
this._showTooltipHeatTree(i, j, ttCtx, tooltipEl, type);
|
||||
} else if (type === "bar" || type === "candlestick" || type === "boxPlot" || type === "rangeBar") {
|
||||
this._showTooltipBar(i, j, ttCtx);
|
||||
} else {
|
||||
this._showTooltipAxisLine(i, j, ttCtx);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Set ttCtx.e to a synthetic mouse-event-like object whose clientX/Y point
|
||||
* to the centre of the current data-point element. This ensures that any
|
||||
* positioning helper that reads ttCtx.e (followCursor path in moveTooltip,
|
||||
* moveStickyTooltipOverBars, moveDynamicPointsOnHover, etc.) gets valid
|
||||
* coordinates rather than crashing on undefined.
|
||||
*
|
||||
* For chart types that don't have a concrete SVG element per data point
|
||||
* (pie, radialBar) we fall back to the SVG centre.
|
||||
* @param {number} i
|
||||
* @param {number} j
|
||||
* @param {import('../tooltip/Tooltip').default} ttCtx
|
||||
*/
|
||||
_setSyntheticEvent(i, j, ttCtx) {
|
||||
const w = this.w;
|
||||
const type = w.config.chart.type;
|
||||
let clientX = 0;
|
||||
let clientY = 0;
|
||||
const el = this._getFocusableElement(i, j);
|
||||
if (el) {
|
||||
const rect = el.getBoundingClientRect();
|
||||
clientX = rect.left + rect.width / 2;
|
||||
clientY = rect.top + rect.height / 2;
|
||||
} else if (w.globals.pointsArray && w.globals.pointsArray[i] && w.globals.pointsArray[i][j]) {
|
||||
const pt = w.globals.pointsArray[i][j];
|
||||
const elGrid = ttCtx.getElGrid && ttCtx.getElGrid();
|
||||
if (elGrid) {
|
||||
const gridRect = elGrid.getBoundingClientRect();
|
||||
clientX = gridRect.left + (pt[0] || 0);
|
||||
clientY = gridRect.top + (pt[1] || 0);
|
||||
}
|
||||
} else {
|
||||
const svgEl = w.dom.Paper && w.dom.Paper.node;
|
||||
if (svgEl) {
|
||||
const svgRect = svgEl.getBoundingClientRect();
|
||||
clientX = svgRect.left + svgRect.width / 2;
|
||||
clientY = svgRect.top + svgRect.height / 2;
|
||||
}
|
||||
}
|
||||
if (type === "line" || type === "area" || type === "rangeArea" || type === "scatter" || type === "bubble" || type === "radar") {
|
||||
if (w.globals.pointsArray && w.globals.pointsArray[i] && w.globals.pointsArray[i][j]) {
|
||||
const pt = w.globals.pointsArray[i][j];
|
||||
const elGrid = ttCtx.getElGrid && ttCtx.getElGrid();
|
||||
if (elGrid) {
|
||||
const gridRect = elGrid.getBoundingClientRect();
|
||||
clientX = gridRect.left + (pt[0] || 0);
|
||||
clientY = gridRect.top + (pt[1] || 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
ttCtx.e = { type: "mousemove", clientX, clientY };
|
||||
}
|
||||
/**
|
||||
* bar / column / candlestick / boxPlot / rangeBar
|
||||
* @param {number} i
|
||||
* @param {number} j
|
||||
* @param {import('../tooltip/Tooltip').default} ttCtx
|
||||
*/
|
||||
_showTooltipBar(i, j, ttCtx) {
|
||||
var _a, _b, _c, _d;
|
||||
const w = this.w;
|
||||
const shared = ttCtx.tConfig.shared && (ttCtx.tooltipUtil.isXoverlap(j) || w.globals.isBarHorizontal) && ttCtx.tooltipUtil.isInitialSeriesSameLen();
|
||||
const rangeData = (
|
||||
/** @type {any} */
|
||||
(_d = (_c = (_b = (_a = w.rangeData.seriesRange) == null ? void 0 : _a[i]) == null ? void 0 : _b[j]) == null ? void 0 : _c.y) == null ? void 0 : _d[0]
|
||||
);
|
||||
ttCtx.tooltipLabels.drawSeriesTexts(__spreadProps(__spreadValues(__spreadValues({
|
||||
ttItems: ttCtx.ttItems,
|
||||
i,
|
||||
j
|
||||
}, (rangeData == null ? void 0 : rangeData.y1) !== void 0 && { y1: rangeData.y1 }), (rangeData == null ? void 0 : rangeData.y2) !== void 0 && { y2: rangeData.y2 }), {
|
||||
shared
|
||||
}));
|
||||
const parent = `.apexcharts-series[data\\:realIndex='${i}']`;
|
||||
const elPath = w.dom.Paper.findOne(
|
||||
`${parent} path[j='${j}'], ${parent} circle[j='${j}'], ${parent} rect[j='${j}']`
|
||||
);
|
||||
if (elPath) {
|
||||
this._leaveHoveredBar();
|
||||
const graphics = new Graphics(this.w, this.ctx);
|
||||
graphics.pathMouseEnter(elPath, null);
|
||||
this._hoveredBarEl = elPath;
|
||||
}
|
||||
if (w.globals.isBarHorizontal) {
|
||||
const barDomEl = elPath && elPath.node;
|
||||
if (barDomEl) {
|
||||
const wrapRect = w.dom.elWrap.getBoundingClientRect();
|
||||
const barRect = barDomEl.getBoundingClientRect();
|
||||
const barCx = barRect.left - wrapRect.left;
|
||||
const barCy = barRect.top - wrapRect.top;
|
||||
const bh = barRect.height;
|
||||
const bw = barRect.width;
|
||||
const ttWidth = ttCtx.tooltipRect.ttWidth || 0;
|
||||
const ttHeight = ttCtx.tooltipRect.ttHeight || 0;
|
||||
const y = barCy + bh / 2 - ttHeight / 2;
|
||||
let x = barCx + bw;
|
||||
const baselineX = ttCtx.xyRatios && ttCtx.xyRatios.baseLineInvertedY != null ? ttCtx.xyRatios.baseLineInvertedY : wrapRect.width / 2;
|
||||
if (barCx < baselineX) {
|
||||
x = barCx - ttWidth;
|
||||
}
|
||||
const tooltipEl = ttCtx.getElTooltip();
|
||||
if (tooltipEl) {
|
||||
tooltipEl.style.left = x + "px";
|
||||
tooltipEl.style.top = y + "px";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ttCtx.tooltipPosition.moveStickyTooltipOverBars(j, i);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* line / area / scatter / bubble / radar / rangeArea
|
||||
* @param {number} i
|
||||
* @param {number} j
|
||||
* @param {import('../tooltip/Tooltip').default} ttCtx
|
||||
*/
|
||||
_showTooltipAxisLine(i, j, ttCtx) {
|
||||
const w = this.w;
|
||||
const type = w.config.chart.type;
|
||||
const sharedConfigured = ttCtx.tConfig.shared;
|
||||
const shared = sharedConfigured && ttCtx.tooltipUtil.isXoverlap(j) && ttCtx.tooltipUtil.isInitialSeriesSameLen();
|
||||
ttCtx.tooltipLabels.drawSeriesTexts({
|
||||
ttItems: ttCtx.ttItems,
|
||||
i,
|
||||
j,
|
||||
shared
|
||||
});
|
||||
const isScatterLike = type === "scatter" || type === "bubble";
|
||||
const hasVisibleMarkers = w.globals.markers.largestSize > 0;
|
||||
if (isScatterLike) {
|
||||
this._showScatterBubblePoint(i, j, ttCtx);
|
||||
} else if (hasVisibleMarkers) {
|
||||
if (shared) {
|
||||
ttCtx.marker.enlargePoints(j);
|
||||
} else {
|
||||
ttCtx.tooltipPosition.moveDynamicPointOnHover(j, i);
|
||||
}
|
||||
} else if (shared) {
|
||||
ttCtx.tooltipPosition.moveDynamicPointsOnHover(j);
|
||||
} else {
|
||||
ttCtx.tooltipPosition.moveDynamicPointOnHover(j, i);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Scatter / bubble: find the specific marker element for (seriesIndex i,
|
||||
* dataPointIndex j), resize only that element, and position the tooltip at
|
||||
* its coordinates — mirroring what Position.moveMarkers does for mouse hover.
|
||||
*
|
||||
* Unlike enlargePoints(j) which queries ALL series for rel===j (causing
|
||||
* multiple bubbles to enlarge and tooltip to land on the wrong one), this
|
||||
* method queries by both series index AND data-point index for precision.
|
||||
* @param {number} i
|
||||
* @param {number} j
|
||||
* @param {import('../tooltip/Tooltip').default} ttCtx
|
||||
*/
|
||||
_showScatterBubblePoint(i, j, ttCtx) {
|
||||
const baseEl = this.w.dom.baseEl;
|
||||
if (this._enlargedScatterMarker) {
|
||||
ttCtx.marker.oldPointSize(this._enlargedScatterMarker);
|
||||
this._enlargedScatterMarker = null;
|
||||
}
|
||||
const seriesEl = baseEl.querySelector(
|
||||
`.apexcharts-series[data\\:realIndex='${i}']`
|
||||
);
|
||||
if (!seriesEl) return;
|
||||
const markerEl = seriesEl.querySelector(`.apexcharts-marker[rel='${j}']`);
|
||||
if (!markerEl) return;
|
||||
ttCtx.marker.enlargeCurrentPoint(j, markerEl);
|
||||
this._enlargedScatterMarker = markerEl;
|
||||
}
|
||||
/**
|
||||
* pie / donut / polarArea
|
||||
* @param {number} i
|
||||
* @param {number} j
|
||||
* @param {import('../tooltip/Tooltip').default} ttCtx
|
||||
* @param {HTMLElement} tooltipEl
|
||||
*/
|
||||
_showTooltipNonAxis(i, j, ttCtx, tooltipEl) {
|
||||
var _a, _b;
|
||||
const w = this.w;
|
||||
ttCtx.tooltipLabels.drawSeriesTexts({
|
||||
ttItems: ttCtx.ttItems,
|
||||
i: j,
|
||||
shared: false
|
||||
});
|
||||
const tooltipBound = tooltipEl.getBoundingClientRect();
|
||||
const ttWidth = tooltipBound.width || ttCtx.tooltipRect.ttWidth || 0;
|
||||
const ttHeight = tooltipBound.height || ttCtx.tooltipRect.ttHeight || 0;
|
||||
const sliceEl = w.dom.baseEl.querySelector(`.apexcharts-pie-area[j='${j}']`);
|
||||
if (sliceEl) {
|
||||
const cx = parseFloat((_a = sliceEl.getAttribute("data:cx")) != null ? _a : "");
|
||||
const cy = parseFloat((_b = sliceEl.getAttribute("data:cy")) != null ? _b : "");
|
||||
if (!isNaN(cx) && !isNaN(cy)) {
|
||||
const svgBound = w.dom.Paper.node.getBoundingClientRect();
|
||||
const wrapBound = w.dom.elWrap.getBoundingClientRect();
|
||||
const offsetX = svgBound.left - wrapBound.left;
|
||||
const offsetY = svgBound.top - wrapBound.top;
|
||||
tooltipEl.style.left = offsetX + cx - ttWidth / 2 + "px";
|
||||
tooltipEl.style.top = offsetY + cy - ttHeight - 10 + "px";
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* radialBar — one ring per series, single value each
|
||||
* @param {number} i
|
||||
* @param {any} _j
|
||||
* @param {import('../tooltip/Tooltip').default} ttCtx
|
||||
* @param {HTMLElement} tooltipEl
|
||||
*/
|
||||
_showTooltipRadialBar(i, _j, ttCtx, tooltipEl) {
|
||||
var _a;
|
||||
const w = this.w;
|
||||
ttCtx.tooltipLabels.drawSeriesTexts({
|
||||
ttItems: ttCtx.ttItems,
|
||||
i,
|
||||
shared: false
|
||||
});
|
||||
const { ttWidth = 0, ttHeight = 0 } = ttCtx.getCachedDimensions();
|
||||
const arcEl = w.dom.baseEl.querySelector(
|
||||
`.apexcharts-radialbar-series[data\\:realIndex='${i}'] path`
|
||||
);
|
||||
if (arcEl) {
|
||||
const angle = parseFloat((_a = arcEl.getAttribute("data:angle")) != null ? _a : "") || 0;
|
||||
const initialAngle = w.config.plotOptions.radialBar.startAngle || 0;
|
||||
const midAngle = initialAngle + angle / 2;
|
||||
const centerX = w.layout.gridWidth / 2;
|
||||
const centerY = w.layout.gridHeight / 2;
|
||||
const radialSize = w.globals.radialSize || Math.min(w.layout.gridWidth, w.layout.gridHeight) / 2;
|
||||
const seriesCount = w.seriesData.series.length;
|
||||
const trackSize = radialSize / Math.max(seriesCount, 1);
|
||||
const outerRadius = radialSize - i * trackSize;
|
||||
const innerRadius = outerRadius - trackSize;
|
||||
const ringRadius = (outerRadius + innerRadius) / 2;
|
||||
const centroid = Utils.polarToCartesian(
|
||||
centerX,
|
||||
centerY,
|
||||
ringRadius,
|
||||
midAngle
|
||||
);
|
||||
const x = centroid.x + (w.layout.translateX || 0);
|
||||
const y = centroid.y + (w.layout.translateY || 0);
|
||||
tooltipEl.style.left = x - ttWidth / 2 + "px";
|
||||
tooltipEl.style.top = y - ttHeight - 10 + "px";
|
||||
}
|
||||
}
|
||||
/**
|
||||
* heatmap / treemap — position tooltip using element bounding rect
|
||||
* @param {number} i
|
||||
* @param {number} j
|
||||
* @param {import('../tooltip/Tooltip').default} ttCtx
|
||||
* @param {HTMLElement} tooltipEl
|
||||
* @param {string} type
|
||||
*/
|
||||
_showTooltipHeatTree(i, j, ttCtx, tooltipEl, type) {
|
||||
var _a, _b;
|
||||
const w = this.w;
|
||||
ttCtx.tooltipLabels.drawSeriesTexts({
|
||||
ttItems: ttCtx.ttItems,
|
||||
i,
|
||||
j,
|
||||
shared: false
|
||||
});
|
||||
const tooltipRect = tooltipEl.getBoundingClientRect();
|
||||
const ttWidth = tooltipRect.width || ttCtx.tooltipRect.ttWidth || 0;
|
||||
const ttHeight = tooltipRect.height || ttCtx.tooltipRect.ttHeight || 0;
|
||||
const rectClass = type === "heatmap" ? "apexcharts-heatmap-rect" : "apexcharts-treemap-rect";
|
||||
const cell = w.dom.baseEl.querySelector(`.${rectClass}[i='${i}'][j='${j}']`);
|
||||
if (cell) {
|
||||
const wrapRect = w.dom.elWrap.getBoundingClientRect();
|
||||
const cellRect = cell.getBoundingClientRect();
|
||||
const cellCx = cellRect.left - wrapRect.left;
|
||||
const cellCy = cellRect.top - wrapRect.top;
|
||||
const cellWidth = cellRect.width;
|
||||
const cellHeight = cellRect.height;
|
||||
const cx = parseFloat((_a = cell.getAttribute("cx")) != null ? _a : "");
|
||||
const cellWidthAttr = parseFloat((_b = cell.getAttribute("width")) != null ? _b : "");
|
||||
ttCtx.tooltipPosition.moveXCrosshairs(cx + cellWidthAttr / 2);
|
||||
let x = cellCx + cellWidth + ttWidth / 2;
|
||||
const y = cellCy + cellHeight / 2 - ttHeight / 2;
|
||||
if (cellCx + cellWidth > w.layout.gridWidth / 2) {
|
||||
x = cellCx - ttWidth / 2;
|
||||
}
|
||||
tooltipEl.style.left = x + "px";
|
||||
tooltipEl.style.top = y + "px";
|
||||
}
|
||||
}
|
||||
// ─── Focus class management ───────────────────────────────────────────────
|
||||
/**
|
||||
* @param {number} i
|
||||
* @param {number} j
|
||||
*/
|
||||
_applyFocusClass(i, j) {
|
||||
this._removeFocusClass();
|
||||
const el = this._getFocusableElement(i, j);
|
||||
if (el) {
|
||||
el.classList.add("apexcharts-keyboard-focused");
|
||||
this._focusedEl = el;
|
||||
}
|
||||
}
|
||||
_removeFocusClass() {
|
||||
if (this._focusedEl) {
|
||||
this._focusedEl.classList.remove("apexcharts-keyboard-focused");
|
||||
this._focusedEl = null;
|
||||
}
|
||||
}
|
||||
_leaveHoveredBar() {
|
||||
if (this._hoveredBarEl) {
|
||||
const graphics = new Graphics(this.w, this.ctx);
|
||||
graphics.pathMouseLeave(this._hoveredBarEl, null);
|
||||
this._hoveredBarEl = null;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param {number} i
|
||||
* @param {number} j
|
||||
*/
|
||||
_getFocusableElement(i, j) {
|
||||
const w = this.w;
|
||||
const type = w.config.chart.type;
|
||||
const baseEl = w.dom.baseEl;
|
||||
if (type === "pie" || type === "donut" || type === "polarArea") {
|
||||
return baseEl.querySelector(`.apexcharts-pie-area[j='${j}']`);
|
||||
}
|
||||
if (type === "heatmap") {
|
||||
return baseEl.querySelector(
|
||||
`.apexcharts-heatmap-rect[i='${i}'][j='${j}']`
|
||||
);
|
||||
}
|
||||
if (type === "treemap") {
|
||||
return baseEl.querySelector(
|
||||
`.apexcharts-treemap-rect[i='${i}'][j='${j}']`
|
||||
);
|
||||
}
|
||||
if (type === "radialBar") {
|
||||
return baseEl.querySelector(
|
||||
`.apexcharts-radialbar-series[data\\:realIndex='${i}'] path`
|
||||
);
|
||||
}
|
||||
if (type === "bar" || type === "candlestick" || type === "boxPlot" || type === "rangeBar") {
|
||||
return baseEl.querySelector(
|
||||
`.apexcharts-series[data\\:realIndex='${i}'] path[j='${j}']`
|
||||
);
|
||||
}
|
||||
const marker = baseEl.querySelector(
|
||||
`.apexcharts-series[data\\:realIndex='${i}'] .apexcharts-marker[rel='${j}']`
|
||||
);
|
||||
return marker || null;
|
||||
}
|
||||
// ─── Click / Enter ────────────────────────────────────────────────────────
|
||||
_fireClick() {
|
||||
const w = this.w;
|
||||
const ttCtx = w.globals.tooltip;
|
||||
if (!ttCtx) return;
|
||||
const syntheticEvent = {
|
||||
type: "mouseup",
|
||||
clientX: 0,
|
||||
clientY: 0
|
||||
};
|
||||
ttCtx.markerClick(syntheticEvent, this.seriesIndex, this.dataPointIndex);
|
||||
}
|
||||
// ─── Helpers ──────────────────────────────────────────────────────────────
|
||||
_isNavEnabled() {
|
||||
const a11y = this.w.config.chart.accessibility;
|
||||
return a11y.enabled && a11y.keyboard.enabled && a11y.keyboard.navigation.enabled;
|
||||
}
|
||||
_getSeriesCount() {
|
||||
const w = this.w;
|
||||
const type = w.config.chart.type;
|
||||
if (type === "pie" || type === "donut" || type === "polarArea") {
|
||||
return 1;
|
||||
}
|
||||
return w.seriesData.series.length;
|
||||
}
|
||||
/**
|
||||
* @param {number} si
|
||||
*/
|
||||
_getDataPointCount(si) {
|
||||
const w = this.w;
|
||||
const type = w.config.chart.type;
|
||||
if (type === "pie" || type === "donut" || type === "polarArea") {
|
||||
return w.seriesData.series.length;
|
||||
}
|
||||
const series = w.seriesData.series;
|
||||
return series[si] && Array.isArray(series[si]) ? series[si].length : 0;
|
||||
}
|
||||
_clampCursor() {
|
||||
const seriesCount = this._getSeriesCount();
|
||||
if (this.seriesIndex >= seriesCount) this.seriesIndex = seriesCount - 1;
|
||||
if (this.seriesIndex < 0) this.seriesIndex = 0;
|
||||
const dpCount = this._getDataPointCount(this.seriesIndex);
|
||||
if (this.dataPointIndex >= dpCount) this.dataPointIndex = dpCount - 1;
|
||||
if (this.dataPointIndex < 0) this.dataPointIndex = 0;
|
||||
}
|
||||
/**
|
||||
* When the chart is zoomed in, the current dataPointIndex may point to a
|
||||
* data point that is outside the visible viewport. Snap the cursor to the
|
||||
* first data point whose x-value falls within [minX, maxX].
|
||||
*
|
||||
* Only adjusts when w.seriesData.seriesX is populated (numeric/datetime axes).
|
||||
* Category-only charts (seriesX entries are strings or auto-indices) are
|
||||
* unaffected — all points are always visible.
|
||||
*/
|
||||
_snapToVisibleRange() {
|
||||
const w = this.w;
|
||||
const gl = w.globals;
|
||||
const si = this.seriesIndex;
|
||||
if (!w.interact.zoomed) return;
|
||||
const seriesX = w.seriesData.seriesX && w.seriesData.seriesX[si];
|
||||
if (!seriesX || !seriesX.length) return;
|
||||
const minX = gl.minX;
|
||||
const maxX = gl.maxX;
|
||||
if (minX === void 0 || maxX === void 0) return;
|
||||
const currentX = seriesX[this.dataPointIndex];
|
||||
if (currentX >= minX && currentX <= maxX) return;
|
||||
const dpCount = seriesX.length;
|
||||
for (let di = 0; di < dpCount; di++) {
|
||||
if (seriesX[di] >= minX && seriesX[di] <= maxX) {
|
||||
this.dataPointIndex = di;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Snap to the nearest visible data point in the given navigation direction.
|
||||
* direction > 0 → find the first visible point (left boundary of zoomed range)
|
||||
* direction < 0 → find the last visible point (right boundary of zoomed range)
|
||||
* @param {number} direction
|
||||
*/
|
||||
_snapToVisibleRangeInDirection(direction) {
|
||||
const w = this.w;
|
||||
const gl = w.globals;
|
||||
const si = this.seriesIndex;
|
||||
const seriesX = w.seriesData.seriesX && w.seriesData.seriesX[si];
|
||||
if (!seriesX || !seriesX.length) return;
|
||||
const minX = gl.minX;
|
||||
const maxX = gl.maxX;
|
||||
if (minX === void 0 || maxX === void 0) return;
|
||||
const dpCount = seriesX.length;
|
||||
if (direction >= 0) {
|
||||
for (let di = 0; di < dpCount; di++) {
|
||||
if (seriesX[di] >= minX && seriesX[di] <= maxX) {
|
||||
this.dataPointIndex = di;
|
||||
return;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (let di = dpCount - 1; di >= 0; di--) {
|
||||
if (seriesX[di] >= minX && seriesX[di] <= maxX) {
|
||||
this.dataPointIndex = di;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Check whether the data point at (si, di) is within the current visible
|
||||
* x-axis range. Used to skip out-of-viewport points during keyboard nav.
|
||||
* @param {number} si
|
||||
* @param {number} di
|
||||
*/
|
||||
_isDataPointVisible(si, di) {
|
||||
const w = this.w;
|
||||
const gl = w.globals;
|
||||
if (!w.interact.zoomed) return true;
|
||||
const seriesX = w.seriesData.seriesX && w.seriesData.seriesX[si];
|
||||
if (!seriesX) return true;
|
||||
const x = seriesX[di];
|
||||
if (x === void 0) return true;
|
||||
return x >= gl.minX && x <= gl.maxX;
|
||||
}
|
||||
}
|
||||
_core__default.registerFeatures({ keyboardNavigation: KeyboardNavigation });
|
||||
export {
|
||||
default2 as default
|
||||
};
|
||||
5
storage/public/dist/libs/apexcharts/dist/features/legend.common.js
vendored
Normal file
5
storage/public/dist/libs/apexcharts/dist/features/legend.common.js
vendored
Normal file
File diff suppressed because one or more lines are too long
723
storage/public/dist/libs/apexcharts/dist/features/legend.esm.js
vendored
Normal file
723
storage/public/dist/libs/apexcharts/dist/features/legend.esm.js
vendored
Normal file
|
|
@ -0,0 +1,723 @@
|
|||
var __defProp = Object.defineProperty;
|
||||
var __defProps = Object.defineProperties;
|
||||
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
||||
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
||||
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
||||
var __spreadValues = (a, b) => {
|
||||
for (var prop in b || (b = {}))
|
||||
if (__hasOwnProp.call(b, prop))
|
||||
__defNormalProp(a, prop, b[prop]);
|
||||
if (__getOwnPropSymbols)
|
||||
for (var prop of __getOwnPropSymbols(b)) {
|
||||
if (__propIsEnum.call(b, prop))
|
||||
__defNormalProp(a, prop, b[prop]);
|
||||
}
|
||||
return a;
|
||||
};
|
||||
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
||||
/*!
|
||||
* ApexCharts v5.10.4
|
||||
* (c) 2018-2026 ApexCharts
|
||||
*/
|
||||
import * as _core from "apexcharts/core";
|
||||
import _core__default from "apexcharts/core";
|
||||
import { default as default2 } from "apexcharts/core";
|
||||
const CoreUtils = _core.__apex_CoreUtils;
|
||||
const Dimensions = _core.__apex_dimensions_Dimensions;
|
||||
const Graphics = _core.__apex_Graphics;
|
||||
const Series = _core.__apex_Series;
|
||||
const Utils = _core.__apex_Utils;
|
||||
const apexchartsLegendCSS = ".apexcharts-flip-y {\n transform: scaleY(-1) translateY(-100%);\n transform-origin: top;\n transform-box: fill-box;\n}\n.apexcharts-flip-x {\n transform: scaleX(-1);\n transform-origin: center;\n transform-box: fill-box;\n}\n.apexcharts-legend {\n display: flex;\n overflow: auto;\n padding: 0 10px;\n}\n.apexcharts-legend.apexcharts-legend-group-horizontal {\n flex-direction: column;\n}\n.apexcharts-legend-group {\n display: flex;\n}\n.apexcharts-legend-group-vertical {\n flex-direction: column-reverse;\n}\n.apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {\n flex-wrap: wrap\n}\n.apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\n flex-direction: column;\n bottom: 0;\n}\n.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\n justify-content: flex-start;\n align-items: flex-start;\n}\n.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {\n justify-content: center;\n align-items: center;\n}\n.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {\n justify-content: flex-end;\n align-items: flex-end;\n}\n.apexcharts-legend-series {\n cursor: pointer;\n line-height: normal;\n display: flex;\n align-items: center;\n}\n.apexcharts-legend-text {\n position: relative;\n font-size: 14px;\n}\n.apexcharts-legend-text *, .apexcharts-legend-marker * {\n pointer-events: none;\n}\n.apexcharts-legend-marker {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n margin-right: 1px;\n}\n\n.apexcharts-legend-series.apexcharts-no-click {\n cursor: auto;\n}\n.apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {\n display: none !important;\n}\n.apexcharts-inactive-legend {\n opacity: 0.45;\n} ";
|
||||
const Environment = _core.__apex_Environment_Environment;
|
||||
class Helpers {
|
||||
/**
|
||||
* @param {import('./Legend').default} lgCtx
|
||||
*/
|
||||
constructor(lgCtx) {
|
||||
this.w = lgCtx.w;
|
||||
this.lgCtx = lgCtx;
|
||||
}
|
||||
getLegendStyles() {
|
||||
if (Environment.isSSR()) return null;
|
||||
const stylesheet = document.createElement("style");
|
||||
stylesheet.setAttribute("type", "text/css");
|
||||
const nonce = this.w.config.chart.nonce;
|
||||
if (nonce) {
|
||||
stylesheet.setAttribute("nonce", nonce);
|
||||
}
|
||||
const rule = document.createTextNode(apexchartsLegendCSS);
|
||||
stylesheet.appendChild(rule);
|
||||
return stylesheet;
|
||||
}
|
||||
getLegendDimensions() {
|
||||
const w = this.w;
|
||||
const currLegendsWrap = w.dom.baseEl.querySelector(".apexcharts-legend");
|
||||
if (!currLegendsWrap) {
|
||||
return { clwh: 0, clww: 0 };
|
||||
}
|
||||
const { width: currLegendsWrapWidth, height: currLegendsWrapHeight } = currLegendsWrap.getBoundingClientRect();
|
||||
return {
|
||||
clwh: currLegendsWrapHeight,
|
||||
clww: currLegendsWrapWidth
|
||||
};
|
||||
}
|
||||
appendToForeignObject() {
|
||||
var _a;
|
||||
const legendStyles = this.getLegendStyles();
|
||||
if (this.w.config.chart.injectStyleSheet !== false && legendStyles) {
|
||||
(_a = this.w.dom.elLegendForeign) == null ? void 0 : _a.appendChild(legendStyles);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param {number} seriesCnt
|
||||
* @param {boolean} isHidden
|
||||
*/
|
||||
toggleDataSeries(seriesCnt, isHidden) {
|
||||
var _a, _b;
|
||||
const w = this.w;
|
||||
if (w.globals.axisCharts || w.config.chart.type === "radialBar") {
|
||||
w.globals.resized = true;
|
||||
let seriesEl = null;
|
||||
let realIndex = null;
|
||||
w.globals.risingSeries = [];
|
||||
if (w.globals.axisCharts) {
|
||||
seriesEl = w.dom.baseEl.querySelector(
|
||||
`.apexcharts-series[data\\:realIndex='${seriesCnt}']`
|
||||
);
|
||||
if (!seriesEl) return;
|
||||
realIndex = parseInt((_a = seriesEl.getAttribute("data:realIndex")) != null ? _a : "", 10);
|
||||
} else {
|
||||
seriesEl = w.dom.baseEl.querySelector(
|
||||
`.apexcharts-series[rel='${seriesCnt + 1}']`
|
||||
);
|
||||
if (!seriesEl) return;
|
||||
realIndex = parseInt((_b = seriesEl.getAttribute("rel")) != null ? _b : "", 10) - 1;
|
||||
}
|
||||
if (isHidden) {
|
||||
const seriesToMakeVisible = [
|
||||
{
|
||||
cs: w.globals.collapsedSeries,
|
||||
csi: w.globals.collapsedSeriesIndices
|
||||
},
|
||||
{
|
||||
cs: w.globals.ancillaryCollapsedSeries,
|
||||
csi: w.globals.ancillaryCollapsedSeriesIndices
|
||||
}
|
||||
];
|
||||
seriesToMakeVisible.forEach((r) => {
|
||||
const cs = (
|
||||
/** @type {any} */
|
||||
r.cs
|
||||
);
|
||||
const csi = (
|
||||
/** @type {any} */
|
||||
r.csi
|
||||
);
|
||||
this.riseCollapsedSeries(
|
||||
cs,
|
||||
csi,
|
||||
/** @type {number} */
|
||||
realIndex
|
||||
);
|
||||
});
|
||||
} else {
|
||||
this.hideSeries({ seriesEl, realIndex });
|
||||
}
|
||||
if (w.config.chart.accessibility.enabled) {
|
||||
const legendItem = w.dom.baseEl.querySelector(
|
||||
`.apexcharts-legend-series[rel="${seriesCnt + 1}"]`
|
||||
);
|
||||
if (legendItem) {
|
||||
const isCollapsed = w.globals.collapsedSeriesIndices.includes(realIndex) || w.globals.ancillaryCollapsedSeriesIndices.includes(realIndex);
|
||||
legendItem.setAttribute(
|
||||
"aria-pressed",
|
||||
isCollapsed ? "true" : "false"
|
||||
);
|
||||
const legendTextEl = legendItem.querySelector(
|
||||
".apexcharts-legend-text"
|
||||
);
|
||||
const seriesName = legendTextEl ? legendTextEl.textContent : w.seriesData.seriesNames[seriesCnt];
|
||||
const statusText = isCollapsed ? "hidden" : "visible";
|
||||
legendItem.setAttribute(
|
||||
"aria-label",
|
||||
`${seriesName}, ${statusText}. Press Enter or Space to toggle.`
|
||||
);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
const seriesEl = w.dom.Paper.findOne(
|
||||
` .apexcharts-series[rel='${seriesCnt + 1}'] path`
|
||||
);
|
||||
const type = w.config.chart.type;
|
||||
if (type === "pie" || type === "polarArea" || type === "donut") {
|
||||
const dataLabels = w.config.plotOptions.pie.donut.labels;
|
||||
const graphics = new Graphics(this.w);
|
||||
graphics.pathMouseDown(seriesEl, null);
|
||||
this.lgCtx.printDataLabelsInner(seriesEl.node, dataLabels);
|
||||
}
|
||||
if (w.config.chart.accessibility.enabled) {
|
||||
const legendItem = w.dom.baseEl.querySelector(
|
||||
`.apexcharts-legend-series[rel="${seriesCnt + 1}"]`
|
||||
);
|
||||
if (legendItem) {
|
||||
const isCollapsed = w.globals.collapsedSeriesIndices.includes(seriesCnt);
|
||||
legendItem.setAttribute(
|
||||
"aria-pressed",
|
||||
isCollapsed ? "true" : "false"
|
||||
);
|
||||
const legendTextEl = legendItem.querySelector(
|
||||
".apexcharts-legend-text"
|
||||
);
|
||||
const seriesName = legendTextEl ? legendTextEl.textContent : w.seriesData.seriesNames[seriesCnt];
|
||||
const statusText = isCollapsed ? "hidden" : "visible";
|
||||
legendItem.setAttribute(
|
||||
"aria-label",
|
||||
`${seriesName}, ${statusText}. Press Enter or Space to toggle.`
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/** @param {{realIndex: any}} opts */
|
||||
getSeriesAfterCollapsing({ realIndex }) {
|
||||
var _a;
|
||||
const w = this.w;
|
||||
const gl = w.globals;
|
||||
const series = Utils.clone(w.config.series);
|
||||
if (gl.axisCharts) {
|
||||
const yaxis = w.config.yaxis[gl.seriesYAxisReverseMap[realIndex]];
|
||||
const collapseData = {
|
||||
index: realIndex,
|
||||
data: series[realIndex].data.slice(),
|
||||
type: series[realIndex].type || w.config.chart.type
|
||||
};
|
||||
if (yaxis && yaxis.show && yaxis.showAlways) {
|
||||
if (gl.ancillaryCollapsedSeriesIndices.indexOf(realIndex) < 0) {
|
||||
gl.ancillaryCollapsedSeries.push(collapseData);
|
||||
gl.ancillaryCollapsedSeriesIndices.push(realIndex);
|
||||
}
|
||||
} else {
|
||||
if (gl.collapsedSeriesIndices.indexOf(realIndex) < 0) {
|
||||
gl.collapsedSeries.push(collapseData);
|
||||
gl.collapsedSeriesIndices.push(realIndex);
|
||||
const removeIndexOfRising = gl.risingSeries.indexOf(realIndex);
|
||||
gl.risingSeries.splice(removeIndexOfRising, 1);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
gl.collapsedSeries.push({
|
||||
index: realIndex,
|
||||
data: series[realIndex],
|
||||
type: (
|
||||
/** @type {any} */
|
||||
(_a = w.config.series[realIndex].type) != null ? _a : "line"
|
||||
)
|
||||
});
|
||||
gl.collapsedSeriesIndices.push(realIndex);
|
||||
}
|
||||
gl.allSeriesCollapsed = gl.collapsedSeries.length + gl.ancillaryCollapsedSeries.length === w.config.series.length;
|
||||
return this._getSeriesBasedOnCollapsedState(series);
|
||||
}
|
||||
/** @param {{seriesEl: any, realIndex: any}} opts */
|
||||
hideSeries({ seriesEl, realIndex }) {
|
||||
const w = this.w;
|
||||
const series = this.getSeriesAfterCollapsing({
|
||||
realIndex
|
||||
});
|
||||
const seriesChildren = seriesEl.childNodes;
|
||||
for (let sc = 0; sc < seriesChildren.length; sc++) {
|
||||
if (seriesChildren[sc].classList.contains("apexcharts-series-markers-wrap")) {
|
||||
if (seriesChildren[sc].classList.contains("apexcharts-hide")) {
|
||||
seriesChildren[sc].classList.remove("apexcharts-hide");
|
||||
} else {
|
||||
seriesChildren[sc].classList.add("apexcharts-hide");
|
||||
}
|
||||
}
|
||||
}
|
||||
this.lgCtx.updateSeries(
|
||||
series,
|
||||
w.config.chart.animations.dynamicAnimation.enabled
|
||||
);
|
||||
}
|
||||
/**
|
||||
* @param {any[]} collapsedSeries
|
||||
* @param {number[]} seriesIndices
|
||||
* @param {number} realIndex
|
||||
*/
|
||||
riseCollapsedSeries(collapsedSeries, seriesIndices, realIndex) {
|
||||
const w = this.w;
|
||||
let series = Utils.clone(w.config.series);
|
||||
if (collapsedSeries.length > 0) {
|
||||
for (let c = 0; c < collapsedSeries.length; c++) {
|
||||
if (collapsedSeries[c].index === realIndex) {
|
||||
if (w.globals.axisCharts) {
|
||||
series[realIndex].data = collapsedSeries[c].data.slice();
|
||||
} else {
|
||||
series[realIndex] = collapsedSeries[c].data;
|
||||
}
|
||||
if (typeof series[realIndex] !== "number") {
|
||||
series[realIndex].hidden = false;
|
||||
}
|
||||
collapsedSeries.splice(c, 1);
|
||||
seriesIndices.splice(c, 1);
|
||||
w.globals.risingSeries.push(realIndex);
|
||||
c--;
|
||||
}
|
||||
}
|
||||
series = this._getSeriesBasedOnCollapsedState(series);
|
||||
this.lgCtx.updateSeries(
|
||||
series,
|
||||
w.config.chart.animations.dynamicAnimation.enabled
|
||||
);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param {any[]} series
|
||||
*/
|
||||
_getSeriesBasedOnCollapsedState(series) {
|
||||
const w = this.w;
|
||||
let collapsed = 0;
|
||||
if (w.globals.axisCharts) {
|
||||
series.forEach((s, sI) => {
|
||||
if (!(w.globals.collapsedSeriesIndices.indexOf(sI) < 0 && w.globals.ancillaryCollapsedSeriesIndices.indexOf(sI) < 0)) {
|
||||
series[sI].data = [];
|
||||
collapsed++;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
series.forEach((s, sI) => {
|
||||
if (!(w.globals.collapsedSeriesIndices.indexOf(sI) < 0)) {
|
||||
series[sI] = 0;
|
||||
collapsed++;
|
||||
}
|
||||
});
|
||||
}
|
||||
w.globals.allSeriesCollapsed = collapsed === series.length;
|
||||
return series;
|
||||
}
|
||||
}
|
||||
const Markers = _core.__apex_Markers;
|
||||
const BrowserAPIs = _core.__apex_BrowserAPIs_BrowserAPIs;
|
||||
class Legend {
|
||||
/**
|
||||
* @param {import('../../types/internal').ChartStateW} w
|
||||
* @param {import('../../types/internal').ChartContext} ctx
|
||||
*/
|
||||
constructor(w, ctx) {
|
||||
this.w = w;
|
||||
this.ctx = ctx;
|
||||
this.printDataLabelsInner = (...a) => {
|
||||
var _a;
|
||||
return (_a = ctx.pie) == null ? void 0 : _a.printDataLabelsInner(...a);
|
||||
};
|
||||
this.updateSeries = (...a) => ctx.updateHelpers._updateSeries(...a);
|
||||
this.onLegendClick = this.onLegendClick.bind(this);
|
||||
this.onLegendHovered = this.onLegendHovered.bind(this);
|
||||
this.isBarsDistributed = this.w.config.chart.type === "bar" && this.w.config.plotOptions.bar.distributed && this.w.config.series.length === 1;
|
||||
this.legendHelpers = new Helpers(this);
|
||||
}
|
||||
init() {
|
||||
const w = this.w;
|
||||
const gl = w.globals;
|
||||
const cnf = w.config;
|
||||
const showLegendAlways = cnf.legend.showForSingleSeries && this.w.seriesData.series.length === 1 || this.isBarsDistributed || this.w.seriesData.series.length > 1;
|
||||
this.legendHelpers.appendToForeignObject();
|
||||
if ((showLegendAlways || !gl.axisCharts) && cnf.legend.show) {
|
||||
const elLegendWrap = (
|
||||
/** @type {HTMLElement} */
|
||||
w.dom.elLegendWrap
|
||||
);
|
||||
while (elLegendWrap.firstChild) {
|
||||
elLegendWrap.removeChild(elLegendWrap.firstChild);
|
||||
}
|
||||
this.drawLegends();
|
||||
if (cnf.legend.position === "bottom" || cnf.legend.position === "top") {
|
||||
this.legendAlignHorizontal();
|
||||
} else if (cnf.legend.position === "right" || cnf.legend.position === "left") {
|
||||
this.legendAlignVertical();
|
||||
}
|
||||
}
|
||||
}
|
||||
createLegendMarker({ i, fillcolor }) {
|
||||
const w = this.w;
|
||||
const elMarker = BrowserAPIs.createElement("span");
|
||||
elMarker.classList.add("apexcharts-legend-marker");
|
||||
const mShape = w.config.legend.markers.shape || w.config.markers.shape;
|
||||
let shape = mShape;
|
||||
if (Array.isArray(mShape)) {
|
||||
shape = mShape[i];
|
||||
}
|
||||
const mSize = Array.isArray(w.config.legend.markers.size) ? parseFloat(w.config.legend.markers.size[i]) : parseFloat(w.config.legend.markers.size);
|
||||
const mOffsetX = Array.isArray(w.config.legend.markers.offsetX) ? parseFloat(w.config.legend.markers.offsetX[i]) : parseFloat(w.config.legend.markers.offsetX);
|
||||
const mOffsetY = Array.isArray(w.config.legend.markers.offsetY) ? parseFloat(w.config.legend.markers.offsetY[i]) : parseFloat(w.config.legend.markers.offsetY);
|
||||
const mBorderWidth = Array.isArray(w.config.legend.markers.strokeWidth) ? parseFloat(w.config.legend.markers.strokeWidth[i]) : parseFloat(w.config.legend.markers.strokeWidth);
|
||||
const mStyle = elMarker.style;
|
||||
mStyle.height = (mSize + mBorderWidth) * 2 + "px";
|
||||
mStyle.width = (mSize + mBorderWidth) * 2 + "px";
|
||||
mStyle.left = mOffsetX + "px";
|
||||
mStyle.top = mOffsetY + "px";
|
||||
if (w.config.legend.markers.customHTML) {
|
||||
mStyle.background = "transparent";
|
||||
mStyle.color = fillcolor[i];
|
||||
if (Array.isArray(w.config.legend.markers.customHTML)) {
|
||||
if (w.config.legend.markers.customHTML[i]) {
|
||||
elMarker.innerHTML = w.config.legend.markers.customHTML[i]();
|
||||
}
|
||||
} else {
|
||||
elMarker.innerHTML = w.config.legend.markers.customHTML();
|
||||
}
|
||||
} else {
|
||||
const markers = new Markers(this.ctx.w, this.ctx);
|
||||
const markerConfig = markers.getMarkerConfig({
|
||||
cssClass: `apexcharts-legend-marker apexcharts-marker apexcharts-marker-${shape}`,
|
||||
seriesIndex: i,
|
||||
strokeWidth: mBorderWidth,
|
||||
size: mSize
|
||||
});
|
||||
const SVGLib = Environment.isBrowser() ? (
|
||||
/** @type {any} */
|
||||
window.SVG
|
||||
) : (
|
||||
/** @type {any} */
|
||||
global.SVG
|
||||
);
|
||||
const SVGMarker = SVGLib().addTo(elMarker).size("100%", "100%");
|
||||
const marker = new Graphics(this.w).drawMarker(0, 0, __spreadProps(__spreadValues({}, markerConfig), {
|
||||
pointFillColor: Array.isArray(fillcolor) ? fillcolor[i] : markerConfig.pointFillColor,
|
||||
shape
|
||||
}));
|
||||
const shapesEls = w.dom.Paper.find(
|
||||
".apexcharts-legend-marker.apexcharts-marker"
|
||||
);
|
||||
shapesEls.forEach((shapeEl) => {
|
||||
if (shapeEl.node.classList.contains("apexcharts-marker-triangle")) {
|
||||
shapeEl.node.style.transform = "translate(50%, 45%)";
|
||||
} else {
|
||||
shapeEl.node.style.transform = "translate(50%, 50%)";
|
||||
}
|
||||
});
|
||||
SVGMarker.add(marker);
|
||||
}
|
||||
return elMarker;
|
||||
}
|
||||
drawLegends() {
|
||||
var _a;
|
||||
const me = this;
|
||||
const w = this.w;
|
||||
const elLegendWrap = (
|
||||
/** @type {HTMLElement} */
|
||||
w.dom.elLegendWrap
|
||||
);
|
||||
const fontFamily = w.config.legend.fontFamily;
|
||||
let legendNames = w.seriesData.seriesNames;
|
||||
let fillcolor = w.config.legend.markers.fillColors ? w.config.legend.markers.fillColors.slice() : w.globals.colors.slice();
|
||||
if (w.config.chart.type === "heatmap") {
|
||||
const ranges = w.config.plotOptions.heatmap.colorScale.ranges;
|
||||
legendNames = ranges.map((colorScale) => {
|
||||
return colorScale.name ? colorScale.name : colorScale.from + " - " + colorScale.to;
|
||||
});
|
||||
fillcolor = ranges.map((color) => color.color);
|
||||
} else if (this.isBarsDistributed) {
|
||||
legendNames = w.labelData.labels.slice();
|
||||
}
|
||||
if (w.config.legend.customLegendItems.length) {
|
||||
legendNames = w.config.legend.customLegendItems;
|
||||
}
|
||||
const legendFormatter = w.formatters.legendFormatter;
|
||||
const isLegendInversed = w.config.legend.inverseOrder;
|
||||
const legendGroups = [];
|
||||
if (w.labelData.seriesGroups.length > 1 && w.config.legend.clusterGroupedSeries) {
|
||||
w.labelData.seriesGroups.forEach((_, gi) => {
|
||||
legendGroups[gi] = BrowserAPIs.createElement("div");
|
||||
legendGroups[gi].classList.add(
|
||||
"apexcharts-legend-group",
|
||||
`apexcharts-legend-group-${gi}`
|
||||
);
|
||||
if (w.config.legend.clusterGroupedSeriesOrientation === "horizontal") {
|
||||
elLegendWrap.classList.add("apexcharts-legend-group-horizontal");
|
||||
} else {
|
||||
legendGroups[gi].classList.add("apexcharts-legend-group-vertical");
|
||||
}
|
||||
});
|
||||
}
|
||||
for (let i = isLegendInversed ? legendNames.length - 1 : 0; isLegendInversed ? i >= 0 : i <= legendNames.length - 1; isLegendInversed ? i-- : i++) {
|
||||
const text = legendFormatter(legendNames[i], { seriesIndex: i, w });
|
||||
let collapsedSeries = false;
|
||||
let ancillaryCollapsedSeries = false;
|
||||
if (w.globals.collapsedSeries.length > 0) {
|
||||
for (let c = 0; c < w.globals.collapsedSeries.length; c++) {
|
||||
if (w.globals.collapsedSeries[c].index === i) {
|
||||
collapsedSeries = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (w.globals.ancillaryCollapsedSeriesIndices.length > 0) {
|
||||
for (let c = 0; c < w.globals.ancillaryCollapsedSeriesIndices.length; c++) {
|
||||
if (w.globals.ancillaryCollapsedSeriesIndices[c] === i) {
|
||||
ancillaryCollapsedSeries = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
const elMarker = this.createLegendMarker({ i, fillcolor });
|
||||
Graphics.setAttrs(elMarker, {
|
||||
rel: i + 1,
|
||||
"data:collapsed": collapsedSeries || ancillaryCollapsedSeries
|
||||
});
|
||||
if (collapsedSeries || ancillaryCollapsedSeries) {
|
||||
elMarker.classList.add("apexcharts-inactive-legend");
|
||||
}
|
||||
const elLegend = BrowserAPIs.createElement("div");
|
||||
if (w.config.chart.accessibility.enabled && w.config.chart.accessibility.keyboard.enabled) {
|
||||
elLegend.setAttribute("role", "button");
|
||||
elLegend.setAttribute("tabindex", "0");
|
||||
const seriesName = Array.isArray(text) ? text.join(" ") : text;
|
||||
const isCollapsed = collapsedSeries || ancillaryCollapsedSeries;
|
||||
const statusText = isCollapsed ? "hidden" : "visible";
|
||||
elLegend.setAttribute(
|
||||
"aria-label",
|
||||
`${seriesName}, ${statusText}. Press Enter or Space to toggle.`
|
||||
);
|
||||
elLegend.setAttribute("aria-pressed", isCollapsed ? "true" : "false");
|
||||
}
|
||||
const elLegendText = BrowserAPIs.createElement("span");
|
||||
elLegendText.classList.add("apexcharts-legend-text");
|
||||
elLegendText.innerHTML = Array.isArray(text) ? text.join(" ") : text;
|
||||
let textColor = w.config.legend.labels.useSeriesColors ? w.globals.colors[i] : Array.isArray(w.config.legend.labels.colors) ? (_a = w.config.legend.labels.colors) == null ? void 0 : _a[i] : w.config.legend.labels.colors;
|
||||
if (!textColor) {
|
||||
textColor = w.config.chart.foreColor;
|
||||
}
|
||||
elLegendText.style.color = textColor;
|
||||
elLegendText.style.fontSize = w.config.legend.fontSize;
|
||||
elLegendText.style.fontWeight = w.config.legend.fontWeight;
|
||||
elLegendText.style.fontFamily = fontFamily || w.config.chart.fontFamily;
|
||||
Graphics.setAttrs(elLegendText, {
|
||||
rel: i + 1,
|
||||
i,
|
||||
"data:default-text": encodeURIComponent(text),
|
||||
"data:collapsed": collapsedSeries || ancillaryCollapsedSeries
|
||||
});
|
||||
elLegend.appendChild(elMarker);
|
||||
elLegend.appendChild(elLegendText);
|
||||
const coreUtils = new CoreUtils(this.w);
|
||||
if (!w.config.legend.showForZeroSeries) {
|
||||
const total = coreUtils.getSeriesTotalByIndex(i);
|
||||
if (total === 0 && coreUtils.seriesHaveSameValues(i) && !coreUtils.isSeriesNull(i) && w.globals.collapsedSeriesIndices.indexOf(i) === -1 && w.globals.ancillaryCollapsedSeriesIndices.indexOf(i) === -1) {
|
||||
elLegend.classList.add("apexcharts-hidden-zero-series");
|
||||
}
|
||||
}
|
||||
if (!w.config.legend.showForNullSeries) {
|
||||
if (coreUtils.isSeriesNull(i) && w.globals.collapsedSeriesIndices.indexOf(i) === -1 && w.globals.ancillaryCollapsedSeriesIndices.indexOf(i) === -1) {
|
||||
elLegend.classList.add("apexcharts-hidden-null-series");
|
||||
}
|
||||
}
|
||||
if (legendGroups.length) {
|
||||
w.labelData.seriesGroups.forEach((group, gi) => {
|
||||
var _a2, _b;
|
||||
if (group.includes(
|
||||
/** @type {Record<string,any>} */
|
||||
(_b = (_a2 = w.config.series[i]) == null ? void 0 : _a2.name) != null ? _b : ""
|
||||
)) {
|
||||
elLegendWrap.appendChild(legendGroups[gi]);
|
||||
legendGroups[gi].appendChild(elLegend);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
elLegendWrap.appendChild(elLegend);
|
||||
}
|
||||
elLegendWrap.classList.add(
|
||||
`apexcharts-align-${w.config.legend.horizontalAlign}`
|
||||
);
|
||||
elLegendWrap.classList.add(
|
||||
"apx-legend-position-" + w.config.legend.position
|
||||
);
|
||||
elLegend.classList.add("apexcharts-legend-series");
|
||||
elLegend.style.margin = `${w.config.legend.itemMargin.vertical}px ${w.config.legend.itemMargin.horizontal}px`;
|
||||
elLegendWrap.style.width = w.config.legend.width ? w.config.legend.width + "px" : "";
|
||||
elLegendWrap.style.height = w.config.legend.height ? w.config.legend.height + "px" : "";
|
||||
Graphics.setAttrs(elLegend, {
|
||||
rel: i + 1,
|
||||
seriesName: Utils.escapeString(legendNames[i]),
|
||||
"data:collapsed": collapsedSeries || ancillaryCollapsedSeries
|
||||
});
|
||||
if (collapsedSeries || ancillaryCollapsedSeries) {
|
||||
elLegend.classList.add("apexcharts-inactive-legend");
|
||||
}
|
||||
if (!w.config.legend.onItemClick.toggleDataSeries) {
|
||||
elLegend.classList.add("apexcharts-no-click");
|
||||
}
|
||||
}
|
||||
w.dom.elWrap.addEventListener("click", me.onLegendClick, true);
|
||||
if (w.config.legend.onItemHover.highlightDataSeries && w.config.legend.customLegendItems.length === 0) {
|
||||
w.dom.elWrap.addEventListener("mousemove", me.onLegendHovered, true);
|
||||
w.dom.elWrap.addEventListener("mouseout", me.onLegendHovered, true);
|
||||
}
|
||||
if (w.config.chart.accessibility.enabled && w.config.chart.accessibility.keyboard.enabled) {
|
||||
w.dom.elWrap.addEventListener(
|
||||
"keydown",
|
||||
me.onLegendKeyDown.bind(me),
|
||||
true
|
||||
);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param {number} offsetX
|
||||
* @param {number} offsetY
|
||||
*/
|
||||
setLegendWrapXY(offsetX, offsetY) {
|
||||
const w = this.w;
|
||||
const elLegendWrap = (
|
||||
/** @type {HTMLElement} */
|
||||
w.dom.elLegendWrap
|
||||
);
|
||||
const legendHeight = elLegendWrap.clientHeight;
|
||||
let x = 0;
|
||||
let y = 0;
|
||||
if (w.config.legend.position === "bottom") {
|
||||
y = w.globals.svgHeight - Math.min(legendHeight, w.globals.svgHeight / 2) - 5;
|
||||
} else if (w.config.legend.position === "top") {
|
||||
const dim = new Dimensions(this.w, this.ctx);
|
||||
const titleH = dim.dimHelpers.getTitleSubtitleCoords("title").height;
|
||||
const subtitleH = dim.dimHelpers.getTitleSubtitleCoords("subtitle").height;
|
||||
y = (titleH > 0 ? titleH - 10 : 0) + (subtitleH > 0 ? subtitleH - 10 : 0);
|
||||
}
|
||||
elLegendWrap.style.position = "absolute";
|
||||
x = x + offsetX + w.config.legend.offsetX;
|
||||
y = y + offsetY + w.config.legend.offsetY;
|
||||
elLegendWrap.style.left = x + "px";
|
||||
elLegendWrap.style.top = y + "px";
|
||||
if (w.config.legend.position === "right") {
|
||||
elLegendWrap.style.left = "auto";
|
||||
elLegendWrap.style.right = 25 + w.config.legend.offsetX + "px";
|
||||
}
|
||||
const fixedHeigthWidth = (
|
||||
/** @type {const} */
|
||||
["width", "height"]
|
||||
);
|
||||
fixedHeigthWidth.forEach((hw) => {
|
||||
if (elLegendWrap && elLegendWrap.style[hw]) {
|
||||
elLegendWrap.style[hw] = parseInt(String(w.config.legend[hw]), 10) + "px";
|
||||
}
|
||||
});
|
||||
}
|
||||
legendAlignHorizontal() {
|
||||
const w = this.w;
|
||||
const elLegendWrap = (
|
||||
/** @type {HTMLElement} */
|
||||
w.dom.elLegendWrap
|
||||
);
|
||||
elLegendWrap.style.right = "0";
|
||||
const dimensions = new Dimensions(this.w, this.ctx);
|
||||
const titleRect = dimensions.dimHelpers.getTitleSubtitleCoords("title");
|
||||
const subtitleRect = dimensions.dimHelpers.getTitleSubtitleCoords("subtitle");
|
||||
const offsetX = 20;
|
||||
let offsetY = 0;
|
||||
if (w.config.legend.position === "top") {
|
||||
offsetY = titleRect.height + subtitleRect.height + w.config.title.margin + w.config.subtitle.margin - 10;
|
||||
}
|
||||
this.setLegendWrapXY(offsetX, offsetY);
|
||||
}
|
||||
legendAlignVertical() {
|
||||
const w = this.w;
|
||||
const lRect = this.legendHelpers.getLegendDimensions();
|
||||
const offsetY = 20;
|
||||
let offsetX = 0;
|
||||
if (w.config.legend.position === "left") {
|
||||
offsetX = 20;
|
||||
}
|
||||
if (w.config.legend.position === "right") {
|
||||
offsetX = w.globals.svgWidth - lRect.clww - 10;
|
||||
}
|
||||
this.setLegendWrapXY(offsetX, offsetY);
|
||||
}
|
||||
/**
|
||||
* @param {MouseEvent} e
|
||||
*/
|
||||
onLegendHovered(e) {
|
||||
var _a;
|
||||
const w = this.w;
|
||||
const target = (
|
||||
/** @type {Element} */
|
||||
e.target
|
||||
);
|
||||
const hoverOverLegend = target.classList.contains("apexcharts-legend-series") || target.classList.contains("apexcharts-legend-text") || target.classList.contains("apexcharts-legend-marker");
|
||||
if (w.config.chart.type !== "heatmap" && !this.isBarsDistributed) {
|
||||
if (!target.classList.contains("apexcharts-inactive-legend") && hoverOverLegend) {
|
||||
const series = new Series(this.ctx.w);
|
||||
series.toggleSeriesOnHover(e, target);
|
||||
}
|
||||
} else {
|
||||
if (hoverOverLegend) {
|
||||
const seriesCnt = parseInt((_a = target.getAttribute("rel")) != null ? _a : "0", 10) - 1;
|
||||
this.ctx.events.fireEvent("legendHover", [this.ctx, seriesCnt, this.w]);
|
||||
const series = new Series(this.ctx.w);
|
||||
series.highlightRangeInSeries(e, target);
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param {KeyboardEvent} e
|
||||
*/
|
||||
onLegendKeyDown(e) {
|
||||
const me = this;
|
||||
const w = this.w;
|
||||
const target = (
|
||||
/** @type {Element} */
|
||||
e.target
|
||||
);
|
||||
const isLegendItem = target.classList.contains("apexcharts-legend-series") || target.classList.contains("apexcharts-legend-text") || target.classList.contains("apexcharts-legend-marker");
|
||||
if (!isLegendItem) return;
|
||||
if (e.key === "Enter" || e.key === " ") {
|
||||
e.preventDefault();
|
||||
const rel = target.getAttribute("rel");
|
||||
me.onLegendClick(e);
|
||||
if (rel !== null && w.config.legend.onItemClick.toggleDataSeries) {
|
||||
requestAnimationFrame(() => {
|
||||
const restored = w.dom.baseEl.querySelector(
|
||||
`.apexcharts-legend-series[rel="${rel}"]`
|
||||
);
|
||||
if (restored) restored.focus();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param {Event} e
|
||||
*/
|
||||
onLegendClick(e) {
|
||||
var _a;
|
||||
const w = this.w;
|
||||
const target = (
|
||||
/** @type {Element} */
|
||||
e.target
|
||||
);
|
||||
if (w.config.legend.customLegendItems.length) return;
|
||||
if (target.classList.contains("apexcharts-legend-series") || target.classList.contains("apexcharts-legend-text") || target.classList.contains("apexcharts-legend-marker")) {
|
||||
const seriesCnt = parseInt((_a = target.getAttribute("rel")) != null ? _a : "0", 10) - 1;
|
||||
const isHidden = target.getAttribute("data:collapsed") === "true";
|
||||
const legendClick = this.w.config.chart.events.legendClick;
|
||||
if (typeof legendClick === "function") {
|
||||
legendClick(this.ctx, seriesCnt, this.w);
|
||||
}
|
||||
this.ctx.events.fireEvent("legendClick", [this.ctx, seriesCnt, this.w]);
|
||||
const markerClick = this.w.config.legend.markers.onClick;
|
||||
if (typeof markerClick === "function" && target.classList.contains("apexcharts-legend-marker")) {
|
||||
markerClick(this.ctx, seriesCnt, this.w);
|
||||
this.ctx.events.fireEvent("legendMarkerClick", [
|
||||
this.ctx,
|
||||
seriesCnt,
|
||||
this.w
|
||||
]);
|
||||
}
|
||||
const clickAllowed = w.config.chart.type !== "treemap" && w.config.chart.type !== "heatmap" && !this.isBarsDistributed;
|
||||
if (clickAllowed && w.config.legend.onItemClick.toggleDataSeries) {
|
||||
this.legendHelpers.toggleDataSeries(seriesCnt, isHidden);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
_core__default.registerFeatures({ legend: Legend });
|
||||
export {
|
||||
default2 as default
|
||||
};
|
||||
5
storage/public/dist/libs/apexcharts/dist/features/toolbar.common.js
vendored
Normal file
5
storage/public/dist/libs/apexcharts/dist/features/toolbar.common.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1745
storage/public/dist/libs/apexcharts/dist/features/toolbar.esm.js
vendored
Normal file
1745
storage/public/dist/libs/apexcharts/dist/features/toolbar.esm.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
5
storage/public/dist/libs/apexcharts/dist/heatmap.common.js
vendored
Normal file
5
storage/public/dist/libs/apexcharts/dist/heatmap.common.js
vendored
Normal file
File diff suppressed because one or more lines are too long
377
storage/public/dist/libs/apexcharts/dist/heatmap.esm.js
vendored
Normal file
377
storage/public/dist/libs/apexcharts/dist/heatmap.esm.js
vendored
Normal file
|
|
@ -0,0 +1,377 @@
|
|||
/*!
|
||||
* ApexCharts v5.10.4
|
||||
* (c) 2018-2026 ApexCharts
|
||||
*/
|
||||
import * as _core from "apexcharts/core";
|
||||
import _core__default from "apexcharts/core";
|
||||
import { default as default2 } from "apexcharts/core";
|
||||
const Animations = _core.__apex_Animations;
|
||||
const Graphics = _core.__apex_Graphics;
|
||||
const Fill = _core.__apex_Fill;
|
||||
const Series = _core.__apex_Series;
|
||||
const Utils = _core.__apex_Utils;
|
||||
const DataLabels = _core.__apex_DataLabels;
|
||||
class TreemapHelpers {
|
||||
/**
|
||||
* @param {import('../../../types/internal').ChartStateW} w
|
||||
* @param {import('../../../types/internal').ChartContext} ctx
|
||||
*/
|
||||
constructor(w, ctx) {
|
||||
this.ctx = ctx;
|
||||
this.w = w;
|
||||
}
|
||||
checkColorRange() {
|
||||
const w = this.w;
|
||||
let negRange = false;
|
||||
const chartOpts = w.config.plotOptions[w.config.chart.type];
|
||||
if (chartOpts.colorScale.ranges.length > 0) {
|
||||
chartOpts.colorScale.ranges.map((range) => {
|
||||
if (range.from <= 0) {
|
||||
negRange = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
return negRange;
|
||||
}
|
||||
/**
|
||||
* @param {string} chartType
|
||||
* @param {number} i
|
||||
* @param {number} j
|
||||
* @param {any} negRange
|
||||
*/
|
||||
getShadeColor(chartType, i, j, negRange) {
|
||||
const w = this.w;
|
||||
let colorShadePercent = 1;
|
||||
const shadeIntensity = w.config.plotOptions[chartType].shadeIntensity;
|
||||
const colorProps = this.determineColor(chartType, i, j);
|
||||
if (
|
||||
/** @type {any} */
|
||||
w.globals.hasNegs || negRange
|
||||
) {
|
||||
if (w.config.plotOptions[chartType].reverseNegativeShade) {
|
||||
if (colorProps.percent < 0) {
|
||||
colorShadePercent = colorProps.percent / 100 * (shadeIntensity * 1.25);
|
||||
} else {
|
||||
colorShadePercent = (1 - colorProps.percent / 100) * (shadeIntensity * 1.25);
|
||||
}
|
||||
} else {
|
||||
if (colorProps.percent <= 0) {
|
||||
colorShadePercent = 1 - (1 + colorProps.percent / 100) * shadeIntensity;
|
||||
} else {
|
||||
colorShadePercent = (1 - colorProps.percent / 100) * shadeIntensity;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
colorShadePercent = 1 - colorProps.percent / 100;
|
||||
if (chartType === "treemap") {
|
||||
colorShadePercent = (1 - colorProps.percent / 100) * (shadeIntensity * 1.25);
|
||||
}
|
||||
}
|
||||
let color = colorProps.color;
|
||||
const utils = new Utils();
|
||||
if (w.config.plotOptions[chartType].enableShades) {
|
||||
if (this.w.config.theme.mode === "dark") {
|
||||
const shadeColor = utils.shadeColor(
|
||||
colorShadePercent * -1,
|
||||
colorProps.color
|
||||
);
|
||||
color = Utils.hexToRgba(
|
||||
Utils.isColorHex(shadeColor) ? shadeColor : Utils.rgb2hex(shadeColor),
|
||||
w.config.fill.opacity
|
||||
);
|
||||
} else {
|
||||
const shadeColor = utils.shadeColor(colorShadePercent, colorProps.color);
|
||||
color = Utils.hexToRgba(
|
||||
Utils.isColorHex(shadeColor) ? shadeColor : Utils.rgb2hex(shadeColor),
|
||||
w.config.fill.opacity
|
||||
);
|
||||
}
|
||||
}
|
||||
return { color, colorProps };
|
||||
}
|
||||
/**
|
||||
* @param {string} chartType
|
||||
* @param {number} i
|
||||
* @param {number} j
|
||||
*/
|
||||
determineColor(chartType, i, j) {
|
||||
const w = this.w;
|
||||
const val = w.seriesData.series[i][j];
|
||||
const chartOpts = w.config.plotOptions[chartType];
|
||||
let seriesNumber = chartOpts.colorScale.inverse ? j : i;
|
||||
if (chartOpts.distributed && w.config.chart.type === "treemap") {
|
||||
seriesNumber = j;
|
||||
}
|
||||
let color = w.globals.colors[seriesNumber];
|
||||
let foreColor = null;
|
||||
let min = Math.min(...w.seriesData.series[i]);
|
||||
let max = Math.max(...w.seriesData.series[i]);
|
||||
if (!chartOpts.distributed && chartType === "heatmap") {
|
||||
min = w.globals.minY;
|
||||
max = w.globals.maxY;
|
||||
}
|
||||
if (typeof chartOpts.colorScale.min !== "undefined") {
|
||||
min = chartOpts.colorScale.min < w.globals.minY ? chartOpts.colorScale.min : w.globals.minY;
|
||||
max = chartOpts.colorScale.max > w.globals.maxY ? chartOpts.colorScale.max : w.globals.maxY;
|
||||
}
|
||||
const total = Math.abs(max) + Math.abs(min);
|
||||
let percent = 100 * val / (total === 0 ? total - 1e-6 : total);
|
||||
if (chartOpts.colorScale.ranges.length > 0) {
|
||||
const colorRange = chartOpts.colorScale.ranges;
|
||||
colorRange.map((range) => {
|
||||
if (val >= range.from && val <= range.to) {
|
||||
color = range.color;
|
||||
foreColor = range.foreColor ? range.foreColor : null;
|
||||
min = range.from;
|
||||
max = range.to;
|
||||
const rTotal = Math.abs(max) + Math.abs(min);
|
||||
percent = 100 * val / (rTotal === 0 ? rTotal - 1e-6 : rTotal);
|
||||
}
|
||||
});
|
||||
}
|
||||
return {
|
||||
color,
|
||||
foreColor,
|
||||
percent
|
||||
};
|
||||
}
|
||||
/** @param {{ text?: any, x?: any, y?: any, i?: any, j?: any, colorProps?: any, fontSize?: any, series?: any }} opts */
|
||||
calculateDataLabels({ text, x, y, i, j, colorProps, fontSize }) {
|
||||
const w = this.w;
|
||||
const dataLabelsConfig = w.config.dataLabels;
|
||||
const graphics = new Graphics(this.w);
|
||||
const dataLabels = new DataLabels(this.w, this.ctx);
|
||||
let elDataLabelsWrap = null;
|
||||
if (dataLabelsConfig.enabled) {
|
||||
elDataLabelsWrap = graphics.group({
|
||||
class: "apexcharts-data-labels"
|
||||
});
|
||||
const offX = dataLabelsConfig.offsetX;
|
||||
const offY = dataLabelsConfig.offsetY;
|
||||
const dataLabelsX = x + offX;
|
||||
const dataLabelsY = y + parseFloat(dataLabelsConfig.style.fontSize) / 3 + offY;
|
||||
dataLabels.plotDataLabelsText({
|
||||
x: dataLabelsX,
|
||||
y: dataLabelsY,
|
||||
text,
|
||||
i,
|
||||
j,
|
||||
color: colorProps.foreColor,
|
||||
parent: elDataLabelsWrap,
|
||||
fontSize,
|
||||
dataLabelsConfig
|
||||
});
|
||||
}
|
||||
return elDataLabelsWrap;
|
||||
}
|
||||
}
|
||||
const Filters = _core.__apex_Filters;
|
||||
class HeatMap {
|
||||
/**
|
||||
* @param {import('../types/internal').ChartStateW} w
|
||||
* @param {import('../types/internal').ChartContext} ctx
|
||||
* @param {import('../types/internal').XYRatios} xyRatios
|
||||
*/
|
||||
constructor(w, ctx, xyRatios) {
|
||||
this.ctx = ctx;
|
||||
this.w = w;
|
||||
this.xRatio = xyRatios.xRatio;
|
||||
this.yRatio = xyRatios.yRatio;
|
||||
this.dynamicAnim = this.w.config.chart.animations.dynamicAnimation;
|
||||
this.helpers = new TreemapHelpers(w, ctx);
|
||||
this.rectRadius = this.w.config.plotOptions.heatmap.radius;
|
||||
this.strokeWidth = this.w.config.stroke.show ? this.w.config.stroke.width : 0;
|
||||
}
|
||||
/**
|
||||
* @param {any[]} series
|
||||
*/
|
||||
draw(series) {
|
||||
const w = this.w;
|
||||
const graphics = new Graphics(this.w, this.ctx);
|
||||
const ret = graphics.group({
|
||||
class: "apexcharts-heatmap"
|
||||
});
|
||||
ret.attr("clip-path", `url(#gridRectMask${w.globals.cuid})`);
|
||||
const xDivision = w.layout.gridWidth / w.globals.dataPoints;
|
||||
const yDivision = w.layout.gridHeight / w.seriesData.series.length;
|
||||
let y1 = 0;
|
||||
let rev = false;
|
||||
this.negRange = this.helpers.checkColorRange();
|
||||
const heatSeries = series.slice();
|
||||
if (w.config.yaxis[0].reversed) {
|
||||
rev = true;
|
||||
heatSeries.reverse();
|
||||
}
|
||||
for (let i = rev ? 0 : heatSeries.length - 1; rev ? i < heatSeries.length : i >= 0; rev ? i++ : i--) {
|
||||
const elSeries = graphics.group({
|
||||
class: `apexcharts-series apexcharts-heatmap-series`,
|
||||
seriesName: Utils.escapeString(w.seriesData.seriesNames[i]),
|
||||
rel: i + 1,
|
||||
"data:realIndex": i
|
||||
});
|
||||
Series.addCollapsedClassToSeries(this.w, elSeries, i);
|
||||
graphics.setupEventDelegation(elSeries, ".apexcharts-heatmap-rect");
|
||||
if (w.config.chart.dropShadow.enabled) {
|
||||
const shadow = w.config.chart.dropShadow;
|
||||
const filters = new Filters(this.w);
|
||||
filters.dropShadow(elSeries, shadow, i);
|
||||
}
|
||||
let x1 = 0;
|
||||
const shadeIntensity = w.config.plotOptions.heatmap.shadeIntensity;
|
||||
let j = 0;
|
||||
for (let dIndex = 0; dIndex < w.globals.dataPoints; dIndex++) {
|
||||
if (w.seriesData.seriesX.length && !w.globals.allSeriesHasEqualX) {
|
||||
if (w.globals.minX + w.globals.minXDiff * dIndex < w.seriesData.seriesX[i][j]) {
|
||||
x1 = x1 + xDivision;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (j >= heatSeries[i].length) break;
|
||||
const heatColor = this.helpers.getShadeColor(
|
||||
w.config.chart.type,
|
||||
i,
|
||||
j,
|
||||
this.negRange
|
||||
);
|
||||
let color = heatColor.color;
|
||||
const heatColorProps = heatColor.colorProps;
|
||||
if (w.config.fill.type === "image") {
|
||||
const fill = new Fill(this.w);
|
||||
color = fill.fillPath({
|
||||
seriesNumber: i,
|
||||
dataPointIndex: j,
|
||||
opacity: (
|
||||
/** @type {any} */
|
||||
w.globals.hasNegs ? heatColorProps.percent < 0 ? 1 - (1 + heatColorProps.percent / 100) : shadeIntensity + heatColorProps.percent / 100 : heatColorProps.percent / 100
|
||||
),
|
||||
patternID: Utils.randomId(),
|
||||
width: w.config.fill.image.width ? w.config.fill.image.width : xDivision,
|
||||
height: w.config.fill.image.height ? w.config.fill.image.height : yDivision
|
||||
});
|
||||
}
|
||||
const radius = this.rectRadius;
|
||||
const rect = graphics.drawRect(x1, y1, xDivision, yDivision, radius);
|
||||
rect.attr({
|
||||
cx: x1,
|
||||
cy: y1
|
||||
});
|
||||
rect.node.classList.add("apexcharts-heatmap-rect");
|
||||
elSeries.add(rect);
|
||||
rect.attr({
|
||||
fill: color,
|
||||
i,
|
||||
index: i,
|
||||
j,
|
||||
val: series[i][j],
|
||||
"stroke-width": this.strokeWidth,
|
||||
stroke: w.config.plotOptions.heatmap.useFillColorAsStroke ? color : w.globals.stroke.colors[0],
|
||||
color
|
||||
});
|
||||
if (w.config.chart.animations.enabled && !w.globals.dataChanged) {
|
||||
let speed = 1;
|
||||
if (!w.globals.resized) {
|
||||
speed = w.config.chart.animations.speed;
|
||||
}
|
||||
this.animateHeatMap(rect, x1, y1, xDivision, yDivision, speed);
|
||||
}
|
||||
if (w.globals.dataChanged) {
|
||||
let speed = 1;
|
||||
if (this.dynamicAnim.enabled && w.globals.shouldAnimate) {
|
||||
speed = this.dynamicAnim.speed;
|
||||
let colorFrom = w.globals.previousPaths[i] && w.globals.previousPaths[i][j] && w.globals.previousPaths[i][j].color;
|
||||
if (!colorFrom) colorFrom = "rgba(255, 255, 255, 0)";
|
||||
this.animateHeatColor(
|
||||
rect,
|
||||
Utils.isColorHex(colorFrom) ? colorFrom : Utils.rgb2hex(colorFrom),
|
||||
Utils.isColorHex(color) ? color : Utils.rgb2hex(color),
|
||||
speed
|
||||
);
|
||||
}
|
||||
}
|
||||
const formatter = w.config.dataLabels.formatter;
|
||||
const formattedText = formatter(w.seriesData.series[i][j], {
|
||||
value: w.seriesData.series[i][j],
|
||||
seriesIndex: i,
|
||||
dataPointIndex: j,
|
||||
w
|
||||
});
|
||||
const dataLabels = this.helpers.calculateDataLabels({
|
||||
text: formattedText,
|
||||
x: x1 + xDivision / 2,
|
||||
y: y1 + yDivision / 2,
|
||||
i,
|
||||
j,
|
||||
colorProps: heatColorProps,
|
||||
series: heatSeries
|
||||
});
|
||||
if (dataLabels !== null) {
|
||||
elSeries.add(dataLabels);
|
||||
}
|
||||
x1 = x1 + xDivision;
|
||||
j++;
|
||||
}
|
||||
y1 = y1 + yDivision;
|
||||
ret.add(elSeries);
|
||||
}
|
||||
const yAxisScale = (
|
||||
/** @type {any[]} */
|
||||
w.globals.yAxisScale[0].result.slice()
|
||||
);
|
||||
if (w.config.yaxis[0].reversed) {
|
||||
yAxisScale.unshift("");
|
||||
} else {
|
||||
yAxisScale.push("");
|
||||
}
|
||||
w.globals.yAxisScale[0].result = yAxisScale;
|
||||
return ret;
|
||||
}
|
||||
/**
|
||||
* @param {any} el
|
||||
* @param {number} x
|
||||
* @param {number} y
|
||||
* @param {number} width
|
||||
* @param {number} height
|
||||
* @param {number} speed
|
||||
*/
|
||||
animateHeatMap(el, x, y, width, height, speed) {
|
||||
const animations = new Animations(this.w);
|
||||
animations.animateRect(
|
||||
el,
|
||||
{
|
||||
x: x + width / 2,
|
||||
y: y + height / 2,
|
||||
width: 0,
|
||||
height: 0
|
||||
},
|
||||
{
|
||||
x,
|
||||
y,
|
||||
width,
|
||||
height
|
||||
},
|
||||
speed,
|
||||
() => {
|
||||
animations.animationCompleted(el);
|
||||
}
|
||||
);
|
||||
}
|
||||
/**
|
||||
* @param {any} el
|
||||
* @param {string} colorFrom
|
||||
* @param {string} colorTo
|
||||
* @param {number} speed
|
||||
*/
|
||||
animateHeatColor(el, colorFrom, colorTo, speed) {
|
||||
el.attr({
|
||||
fill: colorFrom
|
||||
}).animate(speed).attr({
|
||||
fill: colorTo
|
||||
});
|
||||
}
|
||||
}
|
||||
_core__default.use({
|
||||
heatmap: HeatMap
|
||||
});
|
||||
export {
|
||||
default2 as default
|
||||
};
|
||||
5
storage/public/dist/libs/apexcharts/dist/line.common.js
vendored
Normal file
5
storage/public/dist/libs/apexcharts/dist/line.common.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1197
storage/public/dist/libs/apexcharts/dist/line.esm.js
vendored
Normal file
1197
storage/public/dist/libs/apexcharts/dist/line.esm.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
63
storage/public/dist/libs/apexcharts/dist/locales/ar.json
vendored
Normal file
63
storage/public/dist/libs/apexcharts/dist/locales/ar.json
vendored
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
{
|
||||
"name": "ar",
|
||||
"options": {
|
||||
"months": [
|
||||
"يناير",
|
||||
"فبراير",
|
||||
"مارس",
|
||||
"أبريل",
|
||||
"مايو",
|
||||
"يونيو",
|
||||
"يوليو",
|
||||
"أغسطس",
|
||||
"سبتمبر",
|
||||
"أكتوبر",
|
||||
"نوفمبر",
|
||||
"ديسمبر"
|
||||
],
|
||||
"shortMonths": [
|
||||
"يناير",
|
||||
"فبراير",
|
||||
"مارس",
|
||||
"أبريل",
|
||||
"مايو",
|
||||
"يونيو",
|
||||
"يوليو",
|
||||
"أغسطس",
|
||||
"سبتمبر",
|
||||
"أكتوبر",
|
||||
"نوفمبر",
|
||||
"ديسمبر"
|
||||
],
|
||||
"days": [
|
||||
"الأحد",
|
||||
"الإثنين",
|
||||
"الثلاثاء",
|
||||
"الأربعاء",
|
||||
"الخميس",
|
||||
"الجمعة",
|
||||
"السبت"
|
||||
],
|
||||
"shortDays": [
|
||||
"أحد",
|
||||
"إثنين",
|
||||
"ثلاثاء",
|
||||
"أربعاء",
|
||||
"خميس",
|
||||
"جمعة",
|
||||
"سبت"
|
||||
],
|
||||
"toolbar": {
|
||||
"exportToSVG": "تحميل بصيغة SVG",
|
||||
"exportToPNG": "تحميل بصيغة PNG",
|
||||
"exportToCSV": "تحميل بصيغة CSV",
|
||||
"menu": "القائمة",
|
||||
"selection": "تحديد",
|
||||
"selectionZoom": "تكبير التحديد",
|
||||
"zoomIn": "تكبير",
|
||||
"zoomOut": "تصغير",
|
||||
"pan": "تحريك",
|
||||
"reset": "إعادة التعيين"
|
||||
}
|
||||
}
|
||||
}
|
||||
55
storage/public/dist/libs/apexcharts/dist/locales/be-cyrl.json
vendored
Normal file
55
storage/public/dist/libs/apexcharts/dist/locales/be-cyrl.json
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"name": "be-cyrl",
|
||||
"options": {
|
||||
"months": [
|
||||
"Студзень",
|
||||
"Люты",
|
||||
"Сакавік",
|
||||
"Красавік",
|
||||
"Травень",
|
||||
"Чэрвень",
|
||||
"Ліпень",
|
||||
"Жнівень",
|
||||
"Верасень",
|
||||
"Кастрычнік",
|
||||
"Лістапад",
|
||||
"Сьнежань"
|
||||
],
|
||||
"shortMonths": [
|
||||
"Сту",
|
||||
"Лют",
|
||||
"Сак",
|
||||
"Кра",
|
||||
"Тра",
|
||||
"Чэр",
|
||||
"Ліп",
|
||||
"Жні",
|
||||
"Вер",
|
||||
"Кас",
|
||||
"Ліс",
|
||||
"Сьн"
|
||||
],
|
||||
"days": [
|
||||
"Нядзеля",
|
||||
"Панядзелак",
|
||||
"Аўторак",
|
||||
"Серада",
|
||||
"Чацьвер",
|
||||
"Пятніца",
|
||||
"Субота"
|
||||
],
|
||||
"shortDays": ["Нд", "Пн", "Аў", "Ср", "Чц", "Пт", "Сб"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Спампаваць SVG",
|
||||
"exportToPNG": "Спампаваць PNG",
|
||||
"exportToCSV": "Спампаваць CSV",
|
||||
"menu": "Мэню",
|
||||
"selection": "Вылучэньне",
|
||||
"selectionZoom": "Вылучэньне з маштабаваньнем",
|
||||
"zoomIn": "Наблізіць",
|
||||
"zoomOut": "Аддаліць",
|
||||
"pan": "Ссоўваньне",
|
||||
"reset": "Скінуць маштабаваньне"
|
||||
}
|
||||
}
|
||||
}
|
||||
55
storage/public/dist/libs/apexcharts/dist/locales/be-latn.json
vendored
Normal file
55
storage/public/dist/libs/apexcharts/dist/locales/be-latn.json
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"name": "be-latn",
|
||||
"options": {
|
||||
"months": [
|
||||
"Studzień",
|
||||
"Luty",
|
||||
"Sakavik",
|
||||
"Krasavik",
|
||||
"Travień",
|
||||
"Červień",
|
||||
"Lipień",
|
||||
"Žnivień",
|
||||
"Vierasień",
|
||||
"Kastryčnik",
|
||||
"Listapad",
|
||||
"Śniežań"
|
||||
],
|
||||
"shortMonths": [
|
||||
"Stu",
|
||||
"Lut",
|
||||
"Sak",
|
||||
"Kra",
|
||||
"Tra",
|
||||
"Čer",
|
||||
"Lip",
|
||||
"Žni",
|
||||
"Vie",
|
||||
"Kas",
|
||||
"Lis",
|
||||
"Śni"
|
||||
],
|
||||
"days": [
|
||||
"Niadziela",
|
||||
"Paniadziełak",
|
||||
"Aŭtorak",
|
||||
"Sierada",
|
||||
"Čaćvier",
|
||||
"Piatnica",
|
||||
"Subota"
|
||||
],
|
||||
"shortDays": ["Nd", "Pn", "Aŭ", "Sr", "Čć", "Pt", "Sb"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Spampavać SVG",
|
||||
"exportToPNG": "Spampavać PNG",
|
||||
"exportToCSV": "Spampavać CSV",
|
||||
"menu": "Meniu",
|
||||
"selection": "Vyłučeńnie",
|
||||
"selectionZoom": "Vyłučeńnie z maštabavańniem",
|
||||
"zoomIn": "Nablizić",
|
||||
"zoomOut": "Addalić",
|
||||
"pan": "Ssoŭvańnie",
|
||||
"reset": "Skinuć maštabavańnie"
|
||||
}
|
||||
}
|
||||
}
|
||||
55
storage/public/dist/libs/apexcharts/dist/locales/bg.json
vendored
Normal file
55
storage/public/dist/libs/apexcharts/dist/locales/bg.json
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"name": "bg",
|
||||
"options": {
|
||||
"months": [
|
||||
"Януари",
|
||||
"Февруари",
|
||||
"Март",
|
||||
"Април",
|
||||
"Май",
|
||||
"Юни",
|
||||
"Юли",
|
||||
"Август",
|
||||
"Септември",
|
||||
"Октомври",
|
||||
"Ноември",
|
||||
"Декември"
|
||||
],
|
||||
"shortMonths": [
|
||||
"Яну",
|
||||
"Фев",
|
||||
"Мар",
|
||||
"Апр",
|
||||
"Май",
|
||||
"Юни",
|
||||
"Юли",
|
||||
"Авг",
|
||||
"Сеп",
|
||||
"Окт",
|
||||
"Ное",
|
||||
"Дек"
|
||||
],
|
||||
"days": [
|
||||
"Неделя",
|
||||
"Понеделник",
|
||||
"Вторник",
|
||||
"Сряда",
|
||||
"Четвъртък",
|
||||
"Петък",
|
||||
"Събота"
|
||||
],
|
||||
"shortDays": ["Нед", "Пон", "Вто", "Сря", "Чет", "Пет", "Съб"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Изтегли SVG",
|
||||
"exportToPNG": "Изтегли PNG",
|
||||
"exportToCSV": "Изтегли CSV",
|
||||
"menu": "Меню",
|
||||
"selection": "Избор",
|
||||
"selectionZoom": "Мащабиране на избора",
|
||||
"zoomIn": "Увеличаване",
|
||||
"zoomOut": "Намаляване",
|
||||
"pan": "Панориране",
|
||||
"reset": "Нулиране на мащаба"
|
||||
}
|
||||
}
|
||||
}
|
||||
55
storage/public/dist/libs/apexcharts/dist/locales/ca.json
vendored
Normal file
55
storage/public/dist/libs/apexcharts/dist/locales/ca.json
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"name": "ca",
|
||||
"options": {
|
||||
"months": [
|
||||
"Gener",
|
||||
"Febrer",
|
||||
"Març",
|
||||
"Abril",
|
||||
"Maig",
|
||||
"Juny",
|
||||
"Juliol",
|
||||
"Agost",
|
||||
"Setembre",
|
||||
"Octubre",
|
||||
"Novembre",
|
||||
"Desembre"
|
||||
],
|
||||
"shortMonths": [
|
||||
"Gen.",
|
||||
"Febr.",
|
||||
"Març",
|
||||
"Abr.",
|
||||
"Maig",
|
||||
"Juny",
|
||||
"Jul.",
|
||||
"Ag.",
|
||||
"Set.",
|
||||
"Oct.",
|
||||
"Nov.",
|
||||
"Des."
|
||||
],
|
||||
"days": [
|
||||
"Diumenge",
|
||||
"Dilluns",
|
||||
"Dimarts",
|
||||
"Dimecres",
|
||||
"Dijous",
|
||||
"Divendres",
|
||||
"Dissabte"
|
||||
],
|
||||
"shortDays": ["Dg", "Dl", "Dt", "Dc", "Dj", "Dv", "Ds"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Descarregar SVG",
|
||||
"exportToPNG": "Descarregar PNG",
|
||||
"exportToCSV": "Descarregar CSV",
|
||||
"menu": "Menú",
|
||||
"selection": "Seleccionar",
|
||||
"selectionZoom": "Seleccionar Zoom",
|
||||
"zoomIn": "Augmentar",
|
||||
"zoomOut": "Disminuir",
|
||||
"pan": "Navegació",
|
||||
"reset": "Reiniciar Zoom"
|
||||
}
|
||||
}
|
||||
}
|
||||
55
storage/public/dist/libs/apexcharts/dist/locales/cs.json
vendored
Normal file
55
storage/public/dist/libs/apexcharts/dist/locales/cs.json
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"name": "cs",
|
||||
"options": {
|
||||
"months": [
|
||||
"Leden",
|
||||
"Únor",
|
||||
"Březen",
|
||||
"Duben",
|
||||
"Květen",
|
||||
"Červen",
|
||||
"Červenec",
|
||||
"Srpen",
|
||||
"Září",
|
||||
"Říjen",
|
||||
"Listopad",
|
||||
"Prosinec"
|
||||
],
|
||||
"shortMonths": [
|
||||
"Led",
|
||||
"Úno",
|
||||
"Bře",
|
||||
"Dub",
|
||||
"Kvě",
|
||||
"Čvn",
|
||||
"Čvc",
|
||||
"Srp",
|
||||
"Zář",
|
||||
"Říj",
|
||||
"Lis",
|
||||
"Pro"
|
||||
],
|
||||
"days": [
|
||||
"Neděle",
|
||||
"Pondělí",
|
||||
"Úterý",
|
||||
"Středa",
|
||||
"Čtvrtek",
|
||||
"Pátek",
|
||||
"Sobota"
|
||||
],
|
||||
"shortDays": ["Ne", "Po", "Út", "St", "Čt", "Pá", "So"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Stáhnout SVG",
|
||||
"exportToPNG": "Stáhnout PNG",
|
||||
"exportToCSV": "Stáhnout CSV",
|
||||
"menu": "Menu",
|
||||
"selection": "Vybrat",
|
||||
"selectionZoom": "Zoom: Vybrat",
|
||||
"zoomIn": "Zoom: Přiblížit",
|
||||
"zoomOut": "Zoom: Oddálit",
|
||||
"pan": "Přesouvat",
|
||||
"reset": "Resetovat"
|
||||
}
|
||||
}
|
||||
}
|
||||
55
storage/public/dist/libs/apexcharts/dist/locales/da.json
vendored
Normal file
55
storage/public/dist/libs/apexcharts/dist/locales/da.json
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"name": "da",
|
||||
"options": {
|
||||
"months": [
|
||||
"januar",
|
||||
"februar",
|
||||
"marts",
|
||||
"april",
|
||||
"maj",
|
||||
"juni",
|
||||
"juli",
|
||||
"august",
|
||||
"september",
|
||||
"oktober",
|
||||
"november",
|
||||
"december"
|
||||
],
|
||||
"shortMonths": [
|
||||
"jan",
|
||||
"feb",
|
||||
"mar",
|
||||
"apr",
|
||||
"maj",
|
||||
"jun",
|
||||
"jul",
|
||||
"aug",
|
||||
"sep",
|
||||
"okt",
|
||||
"nov",
|
||||
"dec"
|
||||
],
|
||||
"days": [
|
||||
"Søndag",
|
||||
"Mandag",
|
||||
"Tirsdag",
|
||||
"Onsdag",
|
||||
"Torsdag",
|
||||
"Fredag",
|
||||
"Lørdag"
|
||||
],
|
||||
"shortDays": ["Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Download SVG",
|
||||
"exportToPNG": "Download PNG",
|
||||
"exportToCSV": "Download CSV",
|
||||
"menu": "Menu",
|
||||
"selection": "Valg",
|
||||
"selectionZoom": "Zoom til valg",
|
||||
"zoomIn": "Zoom ind",
|
||||
"zoomOut": "Zoom ud",
|
||||
"pan": "Panorér",
|
||||
"reset": "Nulstil zoom"
|
||||
}
|
||||
}
|
||||
}
|
||||
55
storage/public/dist/libs/apexcharts/dist/locales/de.json
vendored
Normal file
55
storage/public/dist/libs/apexcharts/dist/locales/de.json
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"name": "de",
|
||||
"options": {
|
||||
"months": [
|
||||
"Januar",
|
||||
"Februar",
|
||||
"März",
|
||||
"April",
|
||||
"Mai",
|
||||
"Juni",
|
||||
"Juli",
|
||||
"August",
|
||||
"September",
|
||||
"Oktober",
|
||||
"November",
|
||||
"Dezember"
|
||||
],
|
||||
"shortMonths": [
|
||||
"Jan",
|
||||
"Feb",
|
||||
"Mär",
|
||||
"Apr",
|
||||
"Mai",
|
||||
"Jun",
|
||||
"Jul",
|
||||
"Aug",
|
||||
"Sep",
|
||||
"Okt",
|
||||
"Nov",
|
||||
"Dez"
|
||||
],
|
||||
"days": [
|
||||
"Sonntag",
|
||||
"Montag",
|
||||
"Dienstag",
|
||||
"Mittwoch",
|
||||
"Donnerstag",
|
||||
"Freitag",
|
||||
"Samstag"
|
||||
],
|
||||
"shortDays": ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "SVG speichern",
|
||||
"exportToPNG": "PNG speichern",
|
||||
"exportToCSV": "CSV speichern",
|
||||
"menu": "Menü",
|
||||
"selection": "Auswahl",
|
||||
"selectionZoom": "Auswahl vergrößern",
|
||||
"zoomIn": "Vergrößern",
|
||||
"zoomOut": "Verkleinern",
|
||||
"pan": "Verschieben",
|
||||
"reset": "Zoom zurücksetzen"
|
||||
}
|
||||
}
|
||||
}
|
||||
55
storage/public/dist/libs/apexcharts/dist/locales/el.json
vendored
Normal file
55
storage/public/dist/libs/apexcharts/dist/locales/el.json
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"name": "el",
|
||||
"options": {
|
||||
"months": [
|
||||
"Ιανουάριος",
|
||||
"Φεβρουάριος",
|
||||
"Μάρτιος",
|
||||
"Απρίλιος",
|
||||
"Μάιος",
|
||||
"Ιούνιος",
|
||||
"Ιούλιος",
|
||||
"Αύγουστος",
|
||||
"Σεπτέμβριος",
|
||||
"Οκτώβριος",
|
||||
"Νοέμβριος",
|
||||
"Δεκέμβριος"
|
||||
],
|
||||
"shortMonths": [
|
||||
"Ιαν",
|
||||
"Φεβ",
|
||||
"Μαρ",
|
||||
"Απρ",
|
||||
"Μάι",
|
||||
"Ιουν",
|
||||
"Ιουλ",
|
||||
"Αυγ",
|
||||
"Σεπ",
|
||||
"Οκτ",
|
||||
"Νοε",
|
||||
"Δεκ"
|
||||
],
|
||||
"days": [
|
||||
"Κυριακή",
|
||||
"Δευτέρα",
|
||||
"Τρίτη",
|
||||
"Τετάρτη",
|
||||
"Πέμπτη",
|
||||
"Παρασκευή",
|
||||
"Σάββατο"
|
||||
],
|
||||
"shortDays": ["Κυρ", "Δευ", "Τρι", "Τετ", "Πεμ", "Παρ", "Σαβ"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Λήψη SVG",
|
||||
"exportToPNG": "Λήψη PNG",
|
||||
"exportToCSV": "Λήψη CSV",
|
||||
"menu": "Menu",
|
||||
"selection": "Επιλογή",
|
||||
"selectionZoom": "Μεγέθυνση βάση επιλογής",
|
||||
"zoomIn": "Μεγέθυνση",
|
||||
"zoomOut": "Σμίκρυνση",
|
||||
"pan": "Μετατόπιση",
|
||||
"reset": "Επαναφορά μεγέθυνσης"
|
||||
}
|
||||
}
|
||||
}
|
||||
55
storage/public/dist/libs/apexcharts/dist/locales/en.json
vendored
Normal file
55
storage/public/dist/libs/apexcharts/dist/locales/en.json
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"name": "en",
|
||||
"options": {
|
||||
"months": [
|
||||
"January",
|
||||
"February",
|
||||
"March",
|
||||
"April",
|
||||
"May",
|
||||
"June",
|
||||
"July",
|
||||
"August",
|
||||
"September",
|
||||
"October",
|
||||
"November",
|
||||
"December"
|
||||
],
|
||||
"shortMonths": [
|
||||
"Jan",
|
||||
"Feb",
|
||||
"Mar",
|
||||
"Apr",
|
||||
"May",
|
||||
"Jun",
|
||||
"Jul",
|
||||
"Aug",
|
||||
"Sep",
|
||||
"Oct",
|
||||
"Nov",
|
||||
"Dec"
|
||||
],
|
||||
"days": [
|
||||
"Sunday",
|
||||
"Monday",
|
||||
"Tuesday",
|
||||
"Wednesday",
|
||||
"Thursday",
|
||||
"Friday",
|
||||
"Saturday"
|
||||
],
|
||||
"shortDays": ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Download SVG",
|
||||
"exportToPNG": "Download PNG",
|
||||
"exportToCSV": "Download CSV",
|
||||
"menu": "Menu",
|
||||
"selection": "Selection",
|
||||
"selectionZoom": "Selection Zoom",
|
||||
"zoomIn": "Zoom In",
|
||||
"zoomOut": "Zoom Out",
|
||||
"pan": "Panning",
|
||||
"reset": "Reset Zoom"
|
||||
}
|
||||
}
|
||||
}
|
||||
55
storage/public/dist/libs/apexcharts/dist/locales/es.json
vendored
Normal file
55
storage/public/dist/libs/apexcharts/dist/locales/es.json
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"name": "es",
|
||||
"options": {
|
||||
"months": [
|
||||
"Enero",
|
||||
"Febrero",
|
||||
"Marzo",
|
||||
"Abril",
|
||||
"Mayo",
|
||||
"Junio",
|
||||
"Julio",
|
||||
"Agosto",
|
||||
"Septiembre",
|
||||
"Octubre",
|
||||
"Noviembre",
|
||||
"Diciembre"
|
||||
],
|
||||
"shortMonths": [
|
||||
"Ene",
|
||||
"Feb",
|
||||
"Mar",
|
||||
"Abr",
|
||||
"May",
|
||||
"Jun",
|
||||
"Jul",
|
||||
"Ago",
|
||||
"Sep",
|
||||
"Oct",
|
||||
"Nov",
|
||||
"Dic"
|
||||
],
|
||||
"days": [
|
||||
"Domingo",
|
||||
"Lunes",
|
||||
"Martes",
|
||||
"Miércoles",
|
||||
"Jueves",
|
||||
"Viernes",
|
||||
"Sábado"
|
||||
],
|
||||
"shortDays": ["Dom", "Lun", "Mar", "Mie", "Jue", "Vie", "Sab"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Descargar SVG",
|
||||
"exportToPNG": "Descargar PNG",
|
||||
"exportToCSV": "Descargar CSV",
|
||||
"menu": "Menu",
|
||||
"selection": "Seleccionar",
|
||||
"selectionZoom": "Seleccionar Zoom",
|
||||
"zoomIn": "Aumentar",
|
||||
"zoomOut": "Disminuir",
|
||||
"pan": "Navegación",
|
||||
"reset": "Reiniciar Zoom"
|
||||
}
|
||||
}
|
||||
}
|
||||
63
storage/public/dist/libs/apexcharts/dist/locales/et.json
vendored
Normal file
63
storage/public/dist/libs/apexcharts/dist/locales/et.json
vendored
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
{
|
||||
"name": "et",
|
||||
"options": {
|
||||
"months": [
|
||||
"jaanuar",
|
||||
"veebruar",
|
||||
"märts",
|
||||
"aprill",
|
||||
"mai",
|
||||
"juuni",
|
||||
"juuli",
|
||||
"august",
|
||||
"september",
|
||||
"oktoober",
|
||||
"november",
|
||||
"detsember"
|
||||
],
|
||||
"shortMonths": [
|
||||
"jaan",
|
||||
"veebr",
|
||||
"märts",
|
||||
"apr",
|
||||
"mai",
|
||||
"juuni",
|
||||
"juuli",
|
||||
"aug",
|
||||
"sept",
|
||||
"okt",
|
||||
"nov",
|
||||
"dets"
|
||||
],
|
||||
"days": [
|
||||
"pühapäev",
|
||||
"esmaspäev",
|
||||
"teisipäev",
|
||||
"kolmapäev",
|
||||
"neljapäev",
|
||||
"reede",
|
||||
"laupäev"
|
||||
],
|
||||
"shortDays": [
|
||||
"P",
|
||||
"E",
|
||||
"T",
|
||||
"K",
|
||||
"N",
|
||||
"R",
|
||||
"L"
|
||||
],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Lae alla SVG",
|
||||
"exportToPNG": "Lae alla PNG",
|
||||
"exportToCSV": "Lae alla CSV",
|
||||
"menu": "Menüü",
|
||||
"selection": "Valik",
|
||||
"selectionZoom": "Valiku suum",
|
||||
"zoomIn": "Suurenda",
|
||||
"zoomOut": "Vähenda",
|
||||
"pan": "Panoraamimine",
|
||||
"reset": "Lähtesta suum"
|
||||
}
|
||||
}
|
||||
}
|
||||
55
storage/public/dist/libs/apexcharts/dist/locales/fa.json
vendored
Normal file
55
storage/public/dist/libs/apexcharts/dist/locales/fa.json
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"name": "fa",
|
||||
"options": {
|
||||
"months": [
|
||||
"فروردین",
|
||||
"اردیبهشت",
|
||||
"خرداد",
|
||||
"تیر",
|
||||
"مرداد",
|
||||
"شهریور",
|
||||
"مهر",
|
||||
"آبان",
|
||||
"آذر",
|
||||
"دی",
|
||||
"بهمن",
|
||||
"اسفند"
|
||||
],
|
||||
"shortMonths": [
|
||||
"فرو",
|
||||
"ارد",
|
||||
"خرد",
|
||||
"تیر",
|
||||
"مرد",
|
||||
"شهر",
|
||||
"مهر",
|
||||
"آبا",
|
||||
"آذر",
|
||||
"دی",
|
||||
"بهمـ",
|
||||
"اسفـ"
|
||||
],
|
||||
"days": [
|
||||
"یکشنبه",
|
||||
"دوشنبه",
|
||||
"سه شنبه",
|
||||
"چهارشنبه",
|
||||
"پنجشنبه",
|
||||
"جمعه",
|
||||
"شنبه"
|
||||
],
|
||||
"shortDays": ["ی", "د", "س", "چ", "پ", "ج", "ش"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "دانلود SVG",
|
||||
"exportToPNG": "دانلود PNG",
|
||||
"exportToCSV": "دانلود CSV",
|
||||
"menu": "منو",
|
||||
"selection": "انتخاب",
|
||||
"selectionZoom": "بزرگنمایی انتخابی",
|
||||
"zoomIn": "بزرگنمایی",
|
||||
"zoomOut": "کوچکنمایی",
|
||||
"pan": "پیمایش",
|
||||
"reset": "بازنشانی بزرگنمایی"
|
||||
}
|
||||
}
|
||||
}
|
||||
55
storage/public/dist/libs/apexcharts/dist/locales/fi.json
vendored
Normal file
55
storage/public/dist/libs/apexcharts/dist/locales/fi.json
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"name": "fi",
|
||||
"options": {
|
||||
"months": [
|
||||
"Tammikuu",
|
||||
"Helmikuu",
|
||||
"Maaliskuu",
|
||||
"Huhtikuu",
|
||||
"Toukokuu",
|
||||
"Kesäkuu",
|
||||
"Heinäkuu",
|
||||
"Elokuu",
|
||||
"Syyskuu",
|
||||
"Lokakuu",
|
||||
"Marraskuu",
|
||||
"Joulukuu"
|
||||
],
|
||||
"shortMonths": [
|
||||
"Tammi",
|
||||
"Helmi",
|
||||
"Maalis",
|
||||
"Huhti",
|
||||
"Touko",
|
||||
"Kesä",
|
||||
"Heinä",
|
||||
"Elo",
|
||||
"Syys",
|
||||
"Loka",
|
||||
"Marras",
|
||||
"Joulu"
|
||||
],
|
||||
"days": [
|
||||
"Sunnuntai",
|
||||
"Maanantai",
|
||||
"Tiistai",
|
||||
"Keskiviikko",
|
||||
"Torstai",
|
||||
"Perjantai",
|
||||
"Lauantai"
|
||||
],
|
||||
"shortDays": ["Su", "Ma", "Ti", "Ke", "To", "Pe", "La"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Lataa SVG",
|
||||
"exportToPNG": "Lataa PNG",
|
||||
"exportToCSV": "Lataa CSV",
|
||||
"menu": "Valikko",
|
||||
"selection": "Valinta",
|
||||
"selectionZoom": "Valinnan zoomaus",
|
||||
"zoomIn": "Lähennä",
|
||||
"zoomOut": "Loitonna",
|
||||
"pan": "Panoroi",
|
||||
"reset": "Nollaa zoomaus"
|
||||
}
|
||||
}
|
||||
}
|
||||
55
storage/public/dist/libs/apexcharts/dist/locales/fr.json
vendored
Normal file
55
storage/public/dist/libs/apexcharts/dist/locales/fr.json
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"name": "fr",
|
||||
"options": {
|
||||
"months": [
|
||||
"janvier",
|
||||
"février",
|
||||
"mars",
|
||||
"avril",
|
||||
"mai",
|
||||
"juin",
|
||||
"juillet",
|
||||
"août",
|
||||
"septembre",
|
||||
"octobre",
|
||||
"novembre",
|
||||
"décembre"
|
||||
],
|
||||
"shortMonths": [
|
||||
"janv.",
|
||||
"févr.",
|
||||
"mars",
|
||||
"avr.",
|
||||
"mai",
|
||||
"juin",
|
||||
"juill.",
|
||||
"août",
|
||||
"sept.",
|
||||
"oct.",
|
||||
"nov.",
|
||||
"déc."
|
||||
],
|
||||
"days": [
|
||||
"dimanche",
|
||||
"lundi",
|
||||
"mardi",
|
||||
"mercredi",
|
||||
"jeudi",
|
||||
"vendredi",
|
||||
"samedi"
|
||||
],
|
||||
"shortDays": ["dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Télécharger au format SVG",
|
||||
"exportToPNG": "Télécharger au format PNG",
|
||||
"exportToCSV": "Télécharger au format CSV",
|
||||
"menu": "Menu",
|
||||
"selection": "Sélection",
|
||||
"selectionZoom": "Sélection et zoom",
|
||||
"zoomIn": "Zoomer",
|
||||
"zoomOut": "Dézoomer",
|
||||
"pan": "Navigation",
|
||||
"reset": "Réinitialiser le zoom"
|
||||
}
|
||||
}
|
||||
}
|
||||
63
storage/public/dist/libs/apexcharts/dist/locales/gl.json
vendored
Normal file
63
storage/public/dist/libs/apexcharts/dist/locales/gl.json
vendored
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
{
|
||||
"name": "gl",
|
||||
"options": {
|
||||
"months": [
|
||||
"Xaneiro",
|
||||
"Febreiro",
|
||||
"Marzo",
|
||||
"Abril",
|
||||
"Maio",
|
||||
"Xuño",
|
||||
"Xullo",
|
||||
"Agosto",
|
||||
"Setembro",
|
||||
"Outubro",
|
||||
"Novembro",
|
||||
"Decembro"
|
||||
],
|
||||
"shortMonths": [
|
||||
"Xan",
|
||||
"Feb",
|
||||
"Mar",
|
||||
"Abr",
|
||||
"Mai",
|
||||
"Xuñ",
|
||||
"Xul",
|
||||
"Ago",
|
||||
"Set",
|
||||
"Out",
|
||||
"Nov",
|
||||
"Dec"
|
||||
],
|
||||
"days": [
|
||||
"Domingo",
|
||||
"Luns",
|
||||
"Martes",
|
||||
"Mércores",
|
||||
"Xoves",
|
||||
"Venres",
|
||||
"Sábado"
|
||||
],
|
||||
"shortDays": [
|
||||
"Dom",
|
||||
"Lun",
|
||||
"Mar",
|
||||
"Mér",
|
||||
"Xov",
|
||||
"Ven",
|
||||
"Sáb"
|
||||
],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Descargar SVG",
|
||||
"exportToPNG": "Descargar PNG",
|
||||
"exportToCSV": "Descargar CSV",
|
||||
"menu": "Menu",
|
||||
"selection": "Seleccionar",
|
||||
"selectionZoom": "Seleccionar Zoom",
|
||||
"zoomIn": "Aumentar",
|
||||
"zoomOut": "Disminuír",
|
||||
"pan": "Navegación",
|
||||
"reset": "Reiniciar Zoom"
|
||||
}
|
||||
}
|
||||
}
|
||||
55
storage/public/dist/libs/apexcharts/dist/locales/he.json
vendored
Normal file
55
storage/public/dist/libs/apexcharts/dist/locales/he.json
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"name": "he",
|
||||
"options": {
|
||||
"months": [
|
||||
"ינואר",
|
||||
"פברואר",
|
||||
"מרץ",
|
||||
"אפריל",
|
||||
"מאי",
|
||||
"יוני",
|
||||
"יולי",
|
||||
"אוגוסט",
|
||||
"ספטמבר",
|
||||
"אוקטובר",
|
||||
"נובמבר",
|
||||
"דצמבר"
|
||||
],
|
||||
"shortMonths": [
|
||||
"ינו׳",
|
||||
"פבר׳",
|
||||
"מרץ",
|
||||
"אפר׳",
|
||||
"מאי",
|
||||
"יוני",
|
||||
"יולי",
|
||||
"אוג׳",
|
||||
"ספט׳",
|
||||
"אוק׳",
|
||||
"נוב׳",
|
||||
"דצמ׳"
|
||||
],
|
||||
"days": [
|
||||
"ראשון",
|
||||
"שני",
|
||||
"שלישי",
|
||||
"רביעי",
|
||||
"חמישי",
|
||||
"שישי",
|
||||
"שבת"
|
||||
],
|
||||
"shortDays": ["א׳", "ב׳", "ג׳", "ד׳", "ה׳", "ו׳", "ש׳"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "הורד SVG",
|
||||
"exportToPNG": "הורד PNG",
|
||||
"exportToCSV": "הורד CSV",
|
||||
"menu": "תפריט",
|
||||
"selection": "בחירה",
|
||||
"selectionZoom": "זום בחירה",
|
||||
"zoomIn": "הגדלה",
|
||||
"zoomOut": "הקטנה",
|
||||
"pan": "הזזה",
|
||||
"reset": "איפוס תצוגה"
|
||||
}
|
||||
}
|
||||
}
|
||||
55
storage/public/dist/libs/apexcharts/dist/locales/hi.json
vendored
Normal file
55
storage/public/dist/libs/apexcharts/dist/locales/hi.json
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"name": "hi",
|
||||
"options": {
|
||||
"months": [
|
||||
"जनवरी",
|
||||
"फ़रवरी",
|
||||
"मार्च",
|
||||
"अप्रैल",
|
||||
"मई",
|
||||
"जून",
|
||||
"जुलाई",
|
||||
"अगस्त",
|
||||
"सितंबर",
|
||||
"अक्टूबर",
|
||||
"नवंबर",
|
||||
"दिसंबर"
|
||||
],
|
||||
"shortMonths": [
|
||||
"जनवरी",
|
||||
"फ़रवरी",
|
||||
"मार्च",
|
||||
"अप्रैल",
|
||||
"मई",
|
||||
"जून",
|
||||
"जुलाई",
|
||||
"अगस्त",
|
||||
"सितंबर",
|
||||
"अक्टूबर",
|
||||
"नवंबर",
|
||||
"दिसंबर"
|
||||
],
|
||||
"days": [
|
||||
"रविवार",
|
||||
"सोमवार",
|
||||
"मंगलवार",
|
||||
"बुधवार",
|
||||
"गुरुवार",
|
||||
"शुक्रवार",
|
||||
"शनिवार"
|
||||
],
|
||||
"shortDays": ["रवि", "सोम", "मंगल", "बुध", "गुरु", "शुक्र", "शनि"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "निर्यात SVG",
|
||||
"exportToPNG": "निर्यात PNG",
|
||||
"exportToCSV": "निर्यात CSV",
|
||||
"menu": "सूची",
|
||||
"selection": "चयन",
|
||||
"selectionZoom": "ज़ूम करना",
|
||||
"zoomIn": "ज़ूम इन",
|
||||
"zoomOut": "ज़ूम आउट",
|
||||
"pan": "पैनिंग",
|
||||
"reset": "फिर से कायम करना"
|
||||
}
|
||||
}
|
||||
}
|
||||
55
storage/public/dist/libs/apexcharts/dist/locales/hr.json
vendored
Normal file
55
storage/public/dist/libs/apexcharts/dist/locales/hr.json
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"name": "hr",
|
||||
"options": {
|
||||
"months": [
|
||||
"Siječanj",
|
||||
"Veljača",
|
||||
"Ožujak",
|
||||
"Travanj",
|
||||
"Svibanj",
|
||||
"Lipanj",
|
||||
"Srpanj",
|
||||
"Kolovoz",
|
||||
"Rujan",
|
||||
"Listopad",
|
||||
"Studeni",
|
||||
"Prosinac"
|
||||
],
|
||||
"shortMonths": [
|
||||
"Sij",
|
||||
"Velj",
|
||||
"Ožu",
|
||||
"Tra",
|
||||
"Svi",
|
||||
"Lip",
|
||||
"Srp",
|
||||
"Kol",
|
||||
"Ruj",
|
||||
"Lis",
|
||||
"Stu",
|
||||
"Pro"
|
||||
],
|
||||
"days": [
|
||||
"Nedjelja",
|
||||
"Ponedjeljak",
|
||||
"Utorak",
|
||||
"Srijeda",
|
||||
"Četvrtak",
|
||||
"Petak",
|
||||
"Subota"
|
||||
],
|
||||
"shortDays": ["Ned", "Pon", "Uto", "Sri", "Čet", "Pet", "Sub"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Preuzmi SVG",
|
||||
"exportToPNG": "Preuzmi PNG",
|
||||
"exportToCSV": "Preuzmi CSV",
|
||||
"menu": "Izbornik",
|
||||
"selection": "Odabir",
|
||||
"selectionZoom": "Odabirno povećanje",
|
||||
"zoomIn": "Uvećajte prikaz",
|
||||
"zoomOut": "Umanjite prikaz",
|
||||
"pan": "Pomicanje",
|
||||
"reset": "Povratak na zadani prikaz"
|
||||
}
|
||||
}
|
||||
}
|
||||
64
storage/public/dist/libs/apexcharts/dist/locales/hu.json
vendored
Normal file
64
storage/public/dist/libs/apexcharts/dist/locales/hu.json
vendored
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
{
|
||||
"name": "hu",
|
||||
"options": {
|
||||
"months": [
|
||||
"január",
|
||||
"február",
|
||||
"március",
|
||||
"április",
|
||||
"május",
|
||||
"június",
|
||||
"július",
|
||||
"augusztus",
|
||||
"szeptember",
|
||||
"október",
|
||||
"november",
|
||||
"december"
|
||||
],
|
||||
"shortMonths": [
|
||||
"jan",
|
||||
"feb",
|
||||
"mar",
|
||||
"ápr",
|
||||
"máj",
|
||||
"jún",
|
||||
"júl",
|
||||
"aug",
|
||||
"szept",
|
||||
"okt",
|
||||
"nov",
|
||||
"dec"
|
||||
],
|
||||
"days": [
|
||||
"hétfő",
|
||||
"kedd",
|
||||
"szerda",
|
||||
"csütörtök",
|
||||
"péntek",
|
||||
"szombat",
|
||||
"vasárnap"
|
||||
],
|
||||
"shortDays": [
|
||||
"H",
|
||||
"K",
|
||||
"Sze",
|
||||
"Cs",
|
||||
"P",
|
||||
"Szo",
|
||||
"V"
|
||||
],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Exportálás SVG-be",
|
||||
"exportToPNG": "Exportálás PNG-be",
|
||||
"exportToCSV": "Exportálás CSV-be",
|
||||
"menu": "Fő ajánlat",
|
||||
"download": "SVG letöltése",
|
||||
"selection": "Kiválasztás",
|
||||
"selectionZoom": "Nagyító kiválasztása",
|
||||
"zoomIn": "Nagyítás",
|
||||
"zoomOut": "Kicsinyítés",
|
||||
"pan": "Képcsúsztatás",
|
||||
"reset": "Nagyító visszaállítása"
|
||||
}
|
||||
}
|
||||
}
|
||||
55
storage/public/dist/libs/apexcharts/dist/locales/hy.json
vendored
Normal file
55
storage/public/dist/libs/apexcharts/dist/locales/hy.json
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"name": "hy",
|
||||
"options": {
|
||||
"months": [
|
||||
"Հունվար",
|
||||
"Փետրվար",
|
||||
"Մարտ",
|
||||
"Ապրիլ",
|
||||
"Մայիս",
|
||||
"Հունիս",
|
||||
"Հուլիս",
|
||||
"Օգոստոս",
|
||||
"Սեպտեմբեր",
|
||||
"Հոկտեմբեր",
|
||||
"Նոյեմբեր",
|
||||
"Դեկտեմբեր"
|
||||
],
|
||||
"shortMonths": [
|
||||
"Հնվ",
|
||||
"Փտվ",
|
||||
"Մրտ",
|
||||
"Ապր",
|
||||
"Մյս",
|
||||
"Հնս",
|
||||
"Հլիս",
|
||||
"Օգս",
|
||||
"Սեպ",
|
||||
"Հոկ",
|
||||
"Նոյ",
|
||||
"Դեկ"
|
||||
],
|
||||
"days": [
|
||||
"Կիրակի",
|
||||
"Երկուշաբթի",
|
||||
"Երեքշաբթի",
|
||||
"Չորեքշաբթի",
|
||||
"Հինգշաբթի",
|
||||
"Ուրբաթ",
|
||||
"Շաբաթ"
|
||||
],
|
||||
"shortDays": ["Կիր", "Երկ", "Երք", "Չրք", "Հնգ", "Ուրբ", "Շբթ"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Բեռնել SVG",
|
||||
"exportToPNG": "Բեռնել PNG",
|
||||
"exportToCSV": "Բեռնել CSV",
|
||||
"menu": "Մենյու",
|
||||
"selection": "Ընտրված",
|
||||
"selectionZoom": "Ընտրված հատվածի խոշորացում",
|
||||
"zoomIn": "Խոշորացնել",
|
||||
"zoomOut": "Մանրացնել",
|
||||
"pan": "Տեղափոխում",
|
||||
"reset": "Բերել սկզբնական վիճակի"
|
||||
}
|
||||
}
|
||||
}
|
||||
47
storage/public/dist/libs/apexcharts/dist/locales/id.json
vendored
Normal file
47
storage/public/dist/libs/apexcharts/dist/locales/id.json
vendored
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
"name": "id",
|
||||
"options": {
|
||||
"months": [
|
||||
"Januari",
|
||||
"Februari",
|
||||
"Maret",
|
||||
"April",
|
||||
"Mei",
|
||||
"Juni",
|
||||
"Juli",
|
||||
"Agustus",
|
||||
"September",
|
||||
"Oktober",
|
||||
"November",
|
||||
"Desember"
|
||||
],
|
||||
"shortMonths": [
|
||||
"Jan",
|
||||
"Feb",
|
||||
"Mar",
|
||||
"Apr",
|
||||
"Mei",
|
||||
"Jun",
|
||||
"Jul",
|
||||
"Agu",
|
||||
"Sep",
|
||||
"Okt",
|
||||
"Nov",
|
||||
"Des"
|
||||
],
|
||||
"days": ["Minggu", "Senin", "Selasa", "Rabu", "kamis", "Jumat", "Sabtu"],
|
||||
"shortDays": ["Min", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Unduh SVG",
|
||||
"exportToPNG": "Unduh PNG",
|
||||
"exportToCSV": "Unduh CSV",
|
||||
"menu": "Menu",
|
||||
"selection": "Pilihan",
|
||||
"selectionZoom": "Perbesar Pilihan",
|
||||
"zoomIn": "Perbesar",
|
||||
"zoomOut": "Perkecil",
|
||||
"pan": "Geser",
|
||||
"reset": "Atur Ulang Zoom"
|
||||
}
|
||||
}
|
||||
}
|
||||
55
storage/public/dist/libs/apexcharts/dist/locales/it.json
vendored
Normal file
55
storage/public/dist/libs/apexcharts/dist/locales/it.json
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"name": "it",
|
||||
"options": {
|
||||
"months": [
|
||||
"Gennaio",
|
||||
"Febbraio",
|
||||
"Marzo",
|
||||
"Aprile",
|
||||
"Maggio",
|
||||
"Giugno",
|
||||
"Luglio",
|
||||
"Agosto",
|
||||
"Settembre",
|
||||
"Ottobre",
|
||||
"Novembre",
|
||||
"Dicembre"
|
||||
],
|
||||
"shortMonths": [
|
||||
"Gen",
|
||||
"Feb",
|
||||
"Mar",
|
||||
"Apr",
|
||||
"Mag",
|
||||
"Giu",
|
||||
"Lug",
|
||||
"Ago",
|
||||
"Set",
|
||||
"Ott",
|
||||
"Nov",
|
||||
"Dic"
|
||||
],
|
||||
"days": [
|
||||
"Domenica",
|
||||
"Lunedì",
|
||||
"Martedì",
|
||||
"Mercoledì",
|
||||
"Giovedì",
|
||||
"Venerdì",
|
||||
"Sabato"
|
||||
],
|
||||
"shortDays": ["Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Scarica SVG",
|
||||
"exportToPNG": "Scarica PNG",
|
||||
"exportToCSV": "Scarica CSV",
|
||||
"menu": "Menu",
|
||||
"selection": "Selezione",
|
||||
"selectionZoom": "Seleziona Zoom",
|
||||
"zoomIn": "Zoom In",
|
||||
"zoomOut": "Zoom Out",
|
||||
"pan": "Sposta",
|
||||
"reset": "Reimposta Zoom"
|
||||
}
|
||||
}
|
||||
}
|
||||
55
storage/public/dist/libs/apexcharts/dist/locales/ja.json
vendored
Normal file
55
storage/public/dist/libs/apexcharts/dist/locales/ja.json
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"name": "ja",
|
||||
"options": {
|
||||
"months": [
|
||||
"1月",
|
||||
"2月",
|
||||
"3月",
|
||||
"4月",
|
||||
"5月",
|
||||
"6月",
|
||||
"7月",
|
||||
"8月",
|
||||
"9月",
|
||||
"10月",
|
||||
"11月",
|
||||
"12月"
|
||||
],
|
||||
"shortMonths": [
|
||||
"1月",
|
||||
"2月",
|
||||
"3月",
|
||||
"4月",
|
||||
"5月",
|
||||
"6月",
|
||||
"7月",
|
||||
"8月",
|
||||
"9月",
|
||||
"10月",
|
||||
"11月",
|
||||
"12月"
|
||||
],
|
||||
"days": [
|
||||
"日曜日",
|
||||
"月曜日",
|
||||
"火曜日",
|
||||
"水曜日",
|
||||
"木曜日",
|
||||
"金曜日",
|
||||
"土曜日"
|
||||
],
|
||||
"shortDays": ["日", "月", "火", "水", "木", "金", "土"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "SVGダウンロード",
|
||||
"exportToPNG": "PNGダウンロード",
|
||||
"exportToCSV": "CSVダウンロード",
|
||||
"menu": "メニュー",
|
||||
"selection": "選択",
|
||||
"selectionZoom": "選択ズーム",
|
||||
"zoomIn": "拡大",
|
||||
"zoomOut": "縮小",
|
||||
"pan": "パン",
|
||||
"reset": "ズームリセット"
|
||||
}
|
||||
}
|
||||
}
|
||||
55
storage/public/dist/libs/apexcharts/dist/locales/ka.json
vendored
Normal file
55
storage/public/dist/libs/apexcharts/dist/locales/ka.json
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"name": "ka",
|
||||
"options": {
|
||||
"months": [
|
||||
"იანვარი",
|
||||
"თებერვალი",
|
||||
"მარტი",
|
||||
"აპრილი",
|
||||
"მაისი",
|
||||
"ივნისი",
|
||||
"ივლისი",
|
||||
"აგვისტო",
|
||||
"სექტემბერი",
|
||||
"ოქტომბერი",
|
||||
"ნოემბერი",
|
||||
"დეკემბერი"
|
||||
],
|
||||
"shortMonths": [
|
||||
"იან",
|
||||
"თებ",
|
||||
"მარ",
|
||||
"აპრ",
|
||||
"მაი",
|
||||
"ივნ",
|
||||
"ივლ",
|
||||
"აგვ",
|
||||
"სექ",
|
||||
"ოქტ",
|
||||
"ნოე",
|
||||
"დეკ"
|
||||
],
|
||||
"days": [
|
||||
"კვირა",
|
||||
"ორშაბათი",
|
||||
"სამშაბათი",
|
||||
"ოთხშაბათი",
|
||||
"ხუთშაბათი",
|
||||
"პარასკევი",
|
||||
"შაბათი"
|
||||
],
|
||||
"shortDays": ["კვი", "ორშ", "სამ", "ოთხ", "ხუთ", "პარ", "შაბ"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "გადმოქაჩე SVG",
|
||||
"exportToPNG": "გადმოქაჩე PNG",
|
||||
"exportToCSV": "გადმოქაჩე CSV",
|
||||
"menu": "მენიუ",
|
||||
"selection": "არჩევა",
|
||||
"selectionZoom": "არჩეულის გადიდება",
|
||||
"zoomIn": "გადიდება",
|
||||
"zoomOut": "დაპატარაება",
|
||||
"pan": "გადაჩოჩება",
|
||||
"reset": "გადიდების გაუქმება"
|
||||
}
|
||||
}
|
||||
}
|
||||
55
storage/public/dist/libs/apexcharts/dist/locales/ko.json
vendored
Normal file
55
storage/public/dist/libs/apexcharts/dist/locales/ko.json
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"name": "ko",
|
||||
"options": {
|
||||
"months": [
|
||||
"1월",
|
||||
"2월",
|
||||
"3월",
|
||||
"4월",
|
||||
"5월",
|
||||
"6월",
|
||||
"7월",
|
||||
"8월",
|
||||
"9월",
|
||||
"10월",
|
||||
"11월",
|
||||
"12월"
|
||||
],
|
||||
"shortMonths": [
|
||||
"1월",
|
||||
"2월",
|
||||
"3월",
|
||||
"4월",
|
||||
"5월",
|
||||
"6월",
|
||||
"7월",
|
||||
"8월",
|
||||
"9월",
|
||||
"10월",
|
||||
"11월",
|
||||
"12월"
|
||||
],
|
||||
"days": [
|
||||
"일요일",
|
||||
"월요일",
|
||||
"화요일",
|
||||
"수요일",
|
||||
"목요일",
|
||||
"금요일",
|
||||
"토요일"
|
||||
],
|
||||
"shortDays": ["일", "월", "화", "수", "목", "금", "토"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "SVG 다운로드",
|
||||
"exportToPNG": "PNG 다운로드",
|
||||
"exportToCSV": "CSV 다운로드",
|
||||
"menu": "메뉴",
|
||||
"selection": "선택",
|
||||
"selectionZoom": "선택영역 확대",
|
||||
"zoomIn": "확대",
|
||||
"zoomOut": "축소",
|
||||
"pan": "패닝",
|
||||
"reset": "원래대로"
|
||||
}
|
||||
}
|
||||
}
|
||||
55
storage/public/dist/libs/apexcharts/dist/locales/lt.json
vendored
Normal file
55
storage/public/dist/libs/apexcharts/dist/locales/lt.json
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"name": "lt",
|
||||
"options": {
|
||||
"months": [
|
||||
"Sausis",
|
||||
"Vasaris",
|
||||
"Kovas",
|
||||
"Balandis",
|
||||
"Gegužė",
|
||||
"Birželis",
|
||||
"Liepa",
|
||||
"Rugpjūtis",
|
||||
"Rugsėjis",
|
||||
"Spalis",
|
||||
"Lapkritis",
|
||||
"Gruodis"
|
||||
],
|
||||
"shortMonths": [
|
||||
"Sau",
|
||||
"Vas",
|
||||
"Kov",
|
||||
"Bal",
|
||||
"Geg",
|
||||
"Bir",
|
||||
"Lie",
|
||||
"Rgp",
|
||||
"Rgs",
|
||||
"Spl",
|
||||
"Lap",
|
||||
"Grd"
|
||||
],
|
||||
"days": [
|
||||
"Sekmadienis",
|
||||
"Pirmadienis",
|
||||
"Antradienis",
|
||||
"Trečiadienis",
|
||||
"Ketvirtadienis",
|
||||
"Penktadienis",
|
||||
"Šeštadienis"
|
||||
],
|
||||
"shortDays": ["Sk", "Per", "An", "Tr", "Kt", "Pn", "Št"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Atsisiųsti SVG",
|
||||
"exportToPNG": "Atsisiųsti PNG",
|
||||
"exportToCSV": "Atsisiųsti CSV",
|
||||
"menu": "Menu",
|
||||
"selection": "Pasirinkimas",
|
||||
"selectionZoom": "Zoom: Pasirinkimas",
|
||||
"zoomIn": "Zoom: Priartinti",
|
||||
"zoomOut": "Zoom: Atitolinti",
|
||||
"pan": "Perkėlimas",
|
||||
"reset": "Atstatyti"
|
||||
}
|
||||
}
|
||||
}
|
||||
64
storage/public/dist/libs/apexcharts/dist/locales/lv.json
vendored
Normal file
64
storage/public/dist/libs/apexcharts/dist/locales/lv.json
vendored
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
{
|
||||
"name": "lv",
|
||||
"options": {
|
||||
"months": [
|
||||
"janvāris",
|
||||
"februāris",
|
||||
"marts",
|
||||
"aprīlis",
|
||||
"maijs",
|
||||
"jūnijs",
|
||||
"jūlijs",
|
||||
"augusts",
|
||||
"septembris",
|
||||
"oktobris",
|
||||
"novembris",
|
||||
"decembris"
|
||||
],
|
||||
"shortMonths": [
|
||||
"janv",
|
||||
"febr",
|
||||
"marts",
|
||||
"apr",
|
||||
"maijs",
|
||||
"jūn",
|
||||
"jūl",
|
||||
"aug",
|
||||
"sept",
|
||||
"okt",
|
||||
"nov",
|
||||
"dec"
|
||||
],
|
||||
"days": [
|
||||
"svētdiena",
|
||||
"pirmdiena",
|
||||
"otrdiena",
|
||||
"trešdiena",
|
||||
"ceturtdiena",
|
||||
"piektdiena",
|
||||
"sestdiena"
|
||||
],
|
||||
"shortDays": [
|
||||
"Sv",
|
||||
"P",
|
||||
"O",
|
||||
"T",
|
||||
"C",
|
||||
"P",
|
||||
"S"
|
||||
],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Lejuplādēt SVG",
|
||||
"exportToPNG": "Lejuplādēt PNG",
|
||||
"exportToCSV": "Lejuplādēt CSV",
|
||||
"menu": "Izvēlne",
|
||||
"selection": "Atlase",
|
||||
"selectionZoom": "Pietuvināt atlasi",
|
||||
"zoomIn": "Pietuvināt",
|
||||
"zoomOut": "Attālināt",
|
||||
"pan": "Pārvietoties diagrammā",
|
||||
"reset": "Atiestatīt pietuvinājumu"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
63
storage/public/dist/libs/apexcharts/dist/locales/ms.json
vendored
Normal file
63
storage/public/dist/libs/apexcharts/dist/locales/ms.json
vendored
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
{
|
||||
"name": "ms",
|
||||
"options": {
|
||||
"months": [
|
||||
"Januari",
|
||||
"Februari",
|
||||
"Mac",
|
||||
"April",
|
||||
"Mei",
|
||||
"Jun",
|
||||
"Julai",
|
||||
"Ogos",
|
||||
"September",
|
||||
"Oktober",
|
||||
"November",
|
||||
"Disember"
|
||||
],
|
||||
"shortMonths": [
|
||||
"Jan",
|
||||
"Feb",
|
||||
"Mac",
|
||||
"Apr",
|
||||
"Mei",
|
||||
"Jun",
|
||||
"Jul",
|
||||
"Ogos",
|
||||
"Sep",
|
||||
"Okt",
|
||||
"Nov",
|
||||
"Dis"
|
||||
],
|
||||
"days": [
|
||||
"Ahad",
|
||||
"Isnin",
|
||||
"Selasa",
|
||||
"Rabu",
|
||||
"Khamis",
|
||||
"Jumaat",
|
||||
"Sabtu"
|
||||
],
|
||||
"shortDays": [
|
||||
"Ahd",
|
||||
"Isn",
|
||||
"Sel",
|
||||
"Rab",
|
||||
"Kha",
|
||||
"Jum",
|
||||
"Sab"
|
||||
],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Muat turun SVG",
|
||||
"exportToPNG": "Muat turun PNG",
|
||||
"exportToCSV": "Muat turun CSV",
|
||||
"menu": "Menu",
|
||||
"selection": "Pilihan",
|
||||
"selectionZoom": "Zum Pilihan",
|
||||
"zoomIn": "Zoom Masuk",
|
||||
"zoomOut": "Zoom Keluar",
|
||||
"pan": "Pemusingan",
|
||||
"reset": "Tetapkan Semula Zum"
|
||||
}
|
||||
}
|
||||
}
|
||||
55
storage/public/dist/libs/apexcharts/dist/locales/nb.json
vendored
Normal file
55
storage/public/dist/libs/apexcharts/dist/locales/nb.json
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"name": "nb",
|
||||
"options": {
|
||||
"months": [
|
||||
"Januar",
|
||||
"Februar",
|
||||
"Mars",
|
||||
"April",
|
||||
"Mai",
|
||||
"Juni",
|
||||
"Juli",
|
||||
"August",
|
||||
"September",
|
||||
"Oktober",
|
||||
"November",
|
||||
"Desember"
|
||||
],
|
||||
"shortMonths": [
|
||||
"Jan",
|
||||
"Feb",
|
||||
"Mar",
|
||||
"Apr",
|
||||
"Mai",
|
||||
"Jun",
|
||||
"Jul",
|
||||
"Aug",
|
||||
"Sep",
|
||||
"Okt",
|
||||
"Nov",
|
||||
"Des"
|
||||
],
|
||||
"days": [
|
||||
"Søndag",
|
||||
"Mandag",
|
||||
"Tirsdag",
|
||||
"Onsdag",
|
||||
"Torsdag",
|
||||
"Fredag",
|
||||
"Lørdag"
|
||||
],
|
||||
"shortDays": ["Sø", "Ma", "Ti", "On", "To", "Fr", "Lø"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Last ned SVG",
|
||||
"exportToPNG": "Last ned PNG",
|
||||
"exportToCSV": "Last ned CSV",
|
||||
"menu": "Menu",
|
||||
"selection": "Velg",
|
||||
"selectionZoom": "Zoom: Velg",
|
||||
"zoomIn": "Zoome inn",
|
||||
"zoomOut": "Zoome ut",
|
||||
"pan": "Skyving",
|
||||
"reset": "Start på nytt"
|
||||
}
|
||||
}
|
||||
}
|
||||
63
storage/public/dist/libs/apexcharts/dist/locales/nl.json
vendored
Normal file
63
storage/public/dist/libs/apexcharts/dist/locales/nl.json
vendored
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
{
|
||||
"name": "nl",
|
||||
"options": {
|
||||
"months": [
|
||||
"januari",
|
||||
"februari",
|
||||
"maart",
|
||||
"april",
|
||||
"mei",
|
||||
"juni",
|
||||
"juli",
|
||||
"augustus",
|
||||
"september",
|
||||
"oktober",
|
||||
"november",
|
||||
"december"
|
||||
],
|
||||
"shortMonths": [
|
||||
"jan.",
|
||||
"feb.",
|
||||
"mrt.",
|
||||
"apr.",
|
||||
"mei.",
|
||||
"jun.",
|
||||
"jul.",
|
||||
"aug.",
|
||||
"sep.",
|
||||
"okt.",
|
||||
"nov.",
|
||||
"dec."
|
||||
],
|
||||
"days": [
|
||||
"zondag",
|
||||
"maandag",
|
||||
"dinsdag",
|
||||
"woensdag",
|
||||
"donderdag",
|
||||
"vrijdag",
|
||||
"zaterdag"
|
||||
],
|
||||
"shortDays": [
|
||||
"zo.",
|
||||
"ma.",
|
||||
"di.",
|
||||
"wo.",
|
||||
"do.",
|
||||
"vr.",
|
||||
"za."
|
||||
],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Download SVG",
|
||||
"exportToPNG": "Download PNG",
|
||||
"exportToCSV": "Download CSV",
|
||||
"menu": "Menu",
|
||||
"selection": "Selectie",
|
||||
"selectionZoom": "Zoom selectie",
|
||||
"zoomIn": "Zoom in",
|
||||
"zoomOut": "Zoom out",
|
||||
"pan": "Verplaatsen",
|
||||
"reset": "Standaardwaarden"
|
||||
}
|
||||
}
|
||||
}
|
||||
55
storage/public/dist/libs/apexcharts/dist/locales/pl.json
vendored
Normal file
55
storage/public/dist/libs/apexcharts/dist/locales/pl.json
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"name": "pl",
|
||||
"options": {
|
||||
"months": [
|
||||
"Styczeń",
|
||||
"Luty",
|
||||
"Marzec",
|
||||
"Kwiecień",
|
||||
"Maj",
|
||||
"Czerwiec",
|
||||
"Lipiec",
|
||||
"Sierpień",
|
||||
"Wrzesień",
|
||||
"Październik",
|
||||
"Listopad",
|
||||
"Grudzień"
|
||||
],
|
||||
"shortMonths": [
|
||||
"Sty",
|
||||
"Lut",
|
||||
"Mar",
|
||||
"Kwi",
|
||||
"Maj",
|
||||
"Cze",
|
||||
"Lip",
|
||||
"Sie",
|
||||
"Wrz",
|
||||
"Paź",
|
||||
"Lis",
|
||||
"Gru"
|
||||
],
|
||||
"days": [
|
||||
"Niedziela",
|
||||
"Poniedziałek",
|
||||
"Wtorek",
|
||||
"Środa",
|
||||
"Czwartek",
|
||||
"Piątek",
|
||||
"Sobota"
|
||||
],
|
||||
"shortDays": ["Nd", "Pn", "Wt", "Śr", "Cz", "Pt", "Sb"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Pobierz SVG",
|
||||
"exportToPNG": "Pobierz PNG",
|
||||
"exportToCSV": "Pobierz CSV",
|
||||
"menu": "Menu",
|
||||
"selection": "Wybieranie",
|
||||
"selectionZoom": "Zoom: Wybieranie",
|
||||
"zoomIn": "Zoom: Przybliż",
|
||||
"zoomOut": "Zoom: Oddal",
|
||||
"pan": "Przesuwanie",
|
||||
"reset": "Resetuj"
|
||||
}
|
||||
}
|
||||
}
|
||||
55
storage/public/dist/libs/apexcharts/dist/locales/pt-br.json
vendored
Normal file
55
storage/public/dist/libs/apexcharts/dist/locales/pt-br.json
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"name": "pt-br",
|
||||
"options": {
|
||||
"months": [
|
||||
"Janeiro",
|
||||
"Fevereiro",
|
||||
"Março",
|
||||
"Abril",
|
||||
"Maio",
|
||||
"Junho",
|
||||
"Julho",
|
||||
"Agosto",
|
||||
"Setembro",
|
||||
"Outubro",
|
||||
"Novembro",
|
||||
"Dezembro"
|
||||
],
|
||||
"shortMonths": [
|
||||
"Jan",
|
||||
"Fev",
|
||||
"Mar",
|
||||
"Abr",
|
||||
"Mai",
|
||||
"Jun",
|
||||
"Jul",
|
||||
"Ago",
|
||||
"Set",
|
||||
"Out",
|
||||
"Nov",
|
||||
"Dez"
|
||||
],
|
||||
"days": [
|
||||
"Domingo",
|
||||
"Segunda",
|
||||
"Terça",
|
||||
"Quarta",
|
||||
"Quinta",
|
||||
"Sexta",
|
||||
"Sábado"
|
||||
],
|
||||
"shortDays": ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sab"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Baixar SVG",
|
||||
"exportToPNG": "Baixar PNG",
|
||||
"exportToCSV": "Baixar CSV",
|
||||
"menu": "Menu",
|
||||
"selection": "Selecionar",
|
||||
"selectionZoom": "Selecionar Zoom",
|
||||
"zoomIn": "Aumentar",
|
||||
"zoomOut": "Diminuir",
|
||||
"pan": "Navegação",
|
||||
"reset": "Reiniciar Zoom"
|
||||
}
|
||||
}
|
||||
}
|
||||
55
storage/public/dist/libs/apexcharts/dist/locales/pt.json
vendored
Normal file
55
storage/public/dist/libs/apexcharts/dist/locales/pt.json
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"name": "pt",
|
||||
"options": {
|
||||
"months": [
|
||||
"Janeiro",
|
||||
"Fevereiro",
|
||||
"Março",
|
||||
"Abril",
|
||||
"Maio",
|
||||
"Junho",
|
||||
"Julho",
|
||||
"Agosto",
|
||||
"Setembro",
|
||||
"Outubro",
|
||||
"Novembro",
|
||||
"Dezembro"
|
||||
],
|
||||
"shortMonths": [
|
||||
"Jan",
|
||||
"Fev",
|
||||
"Mar",
|
||||
"Abr",
|
||||
"Mai",
|
||||
"Jun",
|
||||
"Jul",
|
||||
"Ag",
|
||||
"Set",
|
||||
"Out",
|
||||
"Nov",
|
||||
"Dez"
|
||||
],
|
||||
"days": [
|
||||
"Domingo",
|
||||
"Segunda-feira",
|
||||
"Terça-feira",
|
||||
"Quarta-feira",
|
||||
"Quinta-feira",
|
||||
"Sexta-feira",
|
||||
"Sábado"
|
||||
],
|
||||
"shortDays": ["Do", "Se", "Te", "Qa", "Qi", "Sx", "Sa"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Transferir SVG",
|
||||
"exportToPNG": "Transferir PNG",
|
||||
"exportToCSV": "Transferir CSV",
|
||||
"menu": "Menu",
|
||||
"selection": "Selecionar",
|
||||
"selectionZoom": "Zoom: Selecionar",
|
||||
"zoomIn": "Zoom: Aumentar",
|
||||
"zoomOut": "Zoom: Diminuir",
|
||||
"pan": "Deslocamento",
|
||||
"reset": "Redefinir"
|
||||
}
|
||||
}
|
||||
}
|
||||
55
storage/public/dist/libs/apexcharts/dist/locales/ro.json
vendored
Normal file
55
storage/public/dist/libs/apexcharts/dist/locales/ro.json
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"name": "ro",
|
||||
"options": {
|
||||
"months": [
|
||||
"Ianuarie",
|
||||
"Februarie",
|
||||
"Martie",
|
||||
"Aprilie",
|
||||
"Mai",
|
||||
"Iunie",
|
||||
"Iulie",
|
||||
"August",
|
||||
"Septembrie",
|
||||
"Octombrie",
|
||||
"Noiembrie",
|
||||
"Decembrie"
|
||||
],
|
||||
"shortMonths": [
|
||||
"Ian",
|
||||
"Feb",
|
||||
"Mar",
|
||||
"Apr",
|
||||
"Mai",
|
||||
"Iun",
|
||||
"Iul",
|
||||
"Aug",
|
||||
"Sep",
|
||||
"Oct",
|
||||
"Nov",
|
||||
"Dec"
|
||||
],
|
||||
"days": [
|
||||
"Duminică",
|
||||
"Luni",
|
||||
"Marți",
|
||||
"Miercuri",
|
||||
"Joi",
|
||||
"Vineri",
|
||||
"Sâmbătă"
|
||||
],
|
||||
"shortDays": ["Dum", "Lun", "Mar", "Mie", "Joi", "Vin", "Sâm"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Descarcă SVG",
|
||||
"exportToPNG": "Descarcă PNG",
|
||||
"exportToCSV": "Descarcă CSV",
|
||||
"menu": "Meniu",
|
||||
"selection": "Selecție",
|
||||
"selectionZoom": "Zoom selecție",
|
||||
"zoomIn": "Mărire",
|
||||
"zoomOut": "Micșorare",
|
||||
"pan": "Panoramare",
|
||||
"reset": "Resetare zoom"
|
||||
}
|
||||
}
|
||||
}
|
||||
55
storage/public/dist/libs/apexcharts/dist/locales/ru.json
vendored
Normal file
55
storage/public/dist/libs/apexcharts/dist/locales/ru.json
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"name": "ru",
|
||||
"options": {
|
||||
"months": [
|
||||
"Январь",
|
||||
"Февраль",
|
||||
"Март",
|
||||
"Апрель",
|
||||
"Май",
|
||||
"Июнь",
|
||||
"Июль",
|
||||
"Август",
|
||||
"Сентябрь",
|
||||
"Октябрь",
|
||||
"Ноябрь",
|
||||
"Декабрь"
|
||||
],
|
||||
"shortMonths": [
|
||||
"Янв",
|
||||
"Фев",
|
||||
"Мар",
|
||||
"Апр",
|
||||
"Май",
|
||||
"Июн",
|
||||
"Июл",
|
||||
"Авг",
|
||||
"Сен",
|
||||
"Окт",
|
||||
"Ноя",
|
||||
"Дек"
|
||||
],
|
||||
"days": [
|
||||
"Воскресенье",
|
||||
"Понедельник",
|
||||
"Вторник",
|
||||
"Среда",
|
||||
"Четверг",
|
||||
"Пятница",
|
||||
"Суббота"
|
||||
],
|
||||
"shortDays": ["Вс", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Сохранить SVG",
|
||||
"exportToPNG": "Сохранить PNG",
|
||||
"exportToCSV": "Сохранить CSV",
|
||||
"menu": "Меню",
|
||||
"selection": "Выбор",
|
||||
"selectionZoom": "Выбор с увеличением",
|
||||
"zoomIn": "Увеличить",
|
||||
"zoomOut": "Уменьшить",
|
||||
"pan": "Перемещение",
|
||||
"reset": "Сбросить увеличение"
|
||||
}
|
||||
}
|
||||
}
|
||||
55
storage/public/dist/libs/apexcharts/dist/locales/sk.json
vendored
Normal file
55
storage/public/dist/libs/apexcharts/dist/locales/sk.json
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"name": "sk",
|
||||
"options": {
|
||||
"months": [
|
||||
"Január",
|
||||
"Február",
|
||||
"Marec",
|
||||
"Apríl",
|
||||
"Máj",
|
||||
"Jún",
|
||||
"Júl",
|
||||
"August",
|
||||
"September",
|
||||
"Október",
|
||||
"November",
|
||||
"December"
|
||||
],
|
||||
"shortMonths": [
|
||||
"Jan",
|
||||
"Feb",
|
||||
"Mar",
|
||||
"Apr",
|
||||
"Máj",
|
||||
"Jún",
|
||||
"Júl",
|
||||
"Aug",
|
||||
"Sep",
|
||||
"Okt",
|
||||
"Nov",
|
||||
"Dec"
|
||||
],
|
||||
"days": [
|
||||
"Nedeľa",
|
||||
"Pondelok",
|
||||
"Utorok",
|
||||
"Streda",
|
||||
"Štvrtok",
|
||||
"Piatok",
|
||||
"Sobota"
|
||||
],
|
||||
"shortDays": ["Ne", "Po", "Ut", "St", "Št", "Pi", "So"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Stiahnuť SVG",
|
||||
"exportToPNG": "Stiahnuť PNG",
|
||||
"exportToCSV": "Stiahnuť CSV",
|
||||
"menu": "Menu",
|
||||
"selection": "Vyberanie",
|
||||
"selectionZoom": "Zoom: Vyberanie",
|
||||
"zoomIn": "Zoom: Priblížiť",
|
||||
"zoomOut": "Zoom: Vzdialiť",
|
||||
"pan": "Presúvanie",
|
||||
"reset": "Resetovať"
|
||||
}
|
||||
}
|
||||
}
|
||||
55
storage/public/dist/libs/apexcharts/dist/locales/sl.json
vendored
Normal file
55
storage/public/dist/libs/apexcharts/dist/locales/sl.json
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"name": "sl",
|
||||
"options": {
|
||||
"months": [
|
||||
"Januar",
|
||||
"Februar",
|
||||
"Marec",
|
||||
"April",
|
||||
"Maj",
|
||||
"Junij",
|
||||
"Julij",
|
||||
"Avgust",
|
||||
"Septemer",
|
||||
"Oktober",
|
||||
"November",
|
||||
"December"
|
||||
],
|
||||
"shortMonths": [
|
||||
"Jan",
|
||||
"Feb",
|
||||
"Mar",
|
||||
"Apr",
|
||||
"Maj",
|
||||
"Jun",
|
||||
"Jul",
|
||||
"Avg",
|
||||
"Sep",
|
||||
"Okt",
|
||||
"Nov",
|
||||
"Dec"
|
||||
],
|
||||
"days": [
|
||||
"Nedelja",
|
||||
"Ponedeljek",
|
||||
"Torek",
|
||||
"Sreda",
|
||||
"Četrtek",
|
||||
"Petek",
|
||||
"Sobota"
|
||||
],
|
||||
"shortDays": ["Ne", "Po", "To", "Sr", "Če", "Pe", "So"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Prenesi SVG",
|
||||
"exportToPNG": "Prenesi PNG",
|
||||
"exportToCSV": "Prenesi CSV",
|
||||
"menu": "Menu",
|
||||
"selection": "Izbiranje",
|
||||
"selectionZoom": "Zoom: Izbira",
|
||||
"zoomIn": "Zoom: Približaj",
|
||||
"zoomOut": "Zoom: Oddalji",
|
||||
"pan": "Pomikanje",
|
||||
"reset": "Resetiraj"
|
||||
}
|
||||
}
|
||||
}
|
||||
55
storage/public/dist/libs/apexcharts/dist/locales/sq.json
vendored
Normal file
55
storage/public/dist/libs/apexcharts/dist/locales/sq.json
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"name": "sq",
|
||||
"options": {
|
||||
"months": [
|
||||
"Janar",
|
||||
"Shkurt",
|
||||
"Mars",
|
||||
"Prill",
|
||||
"Maj",
|
||||
"Qershor",
|
||||
"Korrik",
|
||||
"Gusht",
|
||||
"Shtator",
|
||||
"Tetor",
|
||||
"Nëntor",
|
||||
"Dhjetor"
|
||||
],
|
||||
"shortMonths": [
|
||||
"Jan",
|
||||
"Shk",
|
||||
"Mar",
|
||||
"Pr",
|
||||
"Maj",
|
||||
"Qer",
|
||||
"Korr",
|
||||
"Gush",
|
||||
"Sht",
|
||||
"Tet",
|
||||
"Nën",
|
||||
"Dhj"
|
||||
],
|
||||
"days": [
|
||||
"e Dielë",
|
||||
"e Hënë",
|
||||
"e Martë",
|
||||
"e Mërkurë",
|
||||
"e Enjte",
|
||||
"e Premte",
|
||||
"e Shtunë"
|
||||
],
|
||||
"shortDays": ["Die", "Hën", "Mar", "Mër", "Enj", "Pre", "Sht"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Shkarko SVG",
|
||||
"exportToPNG": "Shkarko PNG",
|
||||
"exportToCSV": "Shkarko CSV",
|
||||
"menu": "Menu",
|
||||
"selection": "Seleksiono",
|
||||
"selectionZoom": "Seleksiono Zmadhim",
|
||||
"zoomIn": "Zmadho",
|
||||
"zoomOut": "Zvogëlo",
|
||||
"pan": "Spostoje",
|
||||
"reset": "Rikthe dimensionin"
|
||||
}
|
||||
}
|
||||
}
|
||||
55
storage/public/dist/libs/apexcharts/dist/locales/sr.json
vendored
Normal file
55
storage/public/dist/libs/apexcharts/dist/locales/sr.json
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"name": "rs",
|
||||
"options": {
|
||||
"months": [
|
||||
"Januar",
|
||||
"Februar",
|
||||
"Mart",
|
||||
"April",
|
||||
"Maj",
|
||||
"Jun",
|
||||
"Jul",
|
||||
"Avgust",
|
||||
"Septembar",
|
||||
"Oktobar",
|
||||
"Novembar",
|
||||
"Decembar"
|
||||
],
|
||||
"shortMonths": [
|
||||
"Jan",
|
||||
"Feb",
|
||||
"Mar",
|
||||
"Apr",
|
||||
"Maj",
|
||||
"Jun",
|
||||
"Jul",
|
||||
"Avg",
|
||||
"Sep",
|
||||
"Okt",
|
||||
"Nov",
|
||||
"Dec"
|
||||
],
|
||||
"days": [
|
||||
"Nedelja",
|
||||
"Ponedeljak",
|
||||
"Utorak",
|
||||
"Sreda",
|
||||
"Četvrtak",
|
||||
"Petak",
|
||||
"Subota"
|
||||
],
|
||||
"shortDays": ["Ned", "Pon", "Uto", "Sre", "Čet", "Pet", "Sub"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Preuzmi SVG",
|
||||
"exportToPNG": "Preuzmi PNG",
|
||||
"exportToCSV": "Preuzmi CSV",
|
||||
"menu": "Meni",
|
||||
"selection": "Odabir",
|
||||
"selectionZoom": "Odabirno povećanje",
|
||||
"zoomIn": "Uvećajte prikaz",
|
||||
"zoomOut": "Umanjite prikaz",
|
||||
"pan": "Pomeranje",
|
||||
"reset": "Resetuj prikaz"
|
||||
}
|
||||
}
|
||||
}
|
||||
55
storage/public/dist/libs/apexcharts/dist/locales/sv.json
vendored
Normal file
55
storage/public/dist/libs/apexcharts/dist/locales/sv.json
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"name": "se",
|
||||
"options": {
|
||||
"months": [
|
||||
"Januari",
|
||||
"Februari",
|
||||
"Mars",
|
||||
"April",
|
||||
"Maj",
|
||||
"Juni",
|
||||
"Juli",
|
||||
"Augusti",
|
||||
"September",
|
||||
"Oktober",
|
||||
"November",
|
||||
"December"
|
||||
],
|
||||
"shortMonths": [
|
||||
"Jan",
|
||||
"Feb",
|
||||
"Mar",
|
||||
"Apr",
|
||||
"Maj",
|
||||
"Juni",
|
||||
"Juli",
|
||||
"Aug",
|
||||
"Sep",
|
||||
"Okt",
|
||||
"Nov",
|
||||
"Dec"
|
||||
],
|
||||
"days": [
|
||||
"Söndag",
|
||||
"Måndag",
|
||||
"Tisdag",
|
||||
"Onsdag",
|
||||
"Torsdag",
|
||||
"Fredag",
|
||||
"Lördag"
|
||||
],
|
||||
"shortDays": ["Sön", "Mån", "Tis", "Ons", "Tor", "Fre", "Lör"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Ladda SVG",
|
||||
"exportToPNG": "Ladda PNG",
|
||||
"exportToCSV": "Ladda CSV",
|
||||
"menu": "Meny",
|
||||
"selection": "Selektion",
|
||||
"selectionZoom": "Val av zoom",
|
||||
"zoomIn": "Zooma in",
|
||||
"zoomOut": "Zooma ut",
|
||||
"pan": "Panorering",
|
||||
"reset": "Återställ zoomning"
|
||||
}
|
||||
}
|
||||
}
|
||||
55
storage/public/dist/libs/apexcharts/dist/locales/th.json
vendored
Normal file
55
storage/public/dist/libs/apexcharts/dist/locales/th.json
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"name": "th",
|
||||
"options": {
|
||||
"months": [
|
||||
"มกราคม",
|
||||
"กุมภาพันธ์",
|
||||
"มีนาคม",
|
||||
"เมษายน",
|
||||
"พฤษภาคม",
|
||||
"มิถุนายน",
|
||||
"กรกฎาคม",
|
||||
"สิงหาคม",
|
||||
"กันยายน",
|
||||
"ตุลาคม",
|
||||
"พฤศจิกายน",
|
||||
"ธันวาคม"
|
||||
],
|
||||
"shortMonths": [
|
||||
"ม.ค.",
|
||||
"ก.พ.",
|
||||
"มี.ค.",
|
||||
"เม.ย.",
|
||||
"พ.ค.",
|
||||
"มิ.ย.",
|
||||
"ก.ค.",
|
||||
"ส.ค.",
|
||||
"ก.ย.",
|
||||
"ต.ค.",
|
||||
"พ.ย.",
|
||||
"ธ.ค."
|
||||
],
|
||||
"days": [
|
||||
"อาทิตย์",
|
||||
"จันทร์",
|
||||
"อังคาร",
|
||||
"พุธ",
|
||||
"พฤหัสบดี",
|
||||
"ศุกร์",
|
||||
"เสาร์"
|
||||
],
|
||||
"shortDays": ["อา", "จ", "อ", "พ", "พฤ", "ศ", "ส"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "ดาวน์โหลด SVG",
|
||||
"exportToPNG": "ดาวน์โหลด PNG",
|
||||
"exportToCSV": "ดาวน์โหลด CSV",
|
||||
"menu": "เมนู",
|
||||
"selection": "เลือก",
|
||||
"selectionZoom": "เลือกจุดที่จะซูม",
|
||||
"zoomIn": "ซูมเข้า",
|
||||
"zoomOut": "ซูมออก",
|
||||
"pan": "ปรากฎว่า",
|
||||
"reset": "รีเซ็ตการซูม"
|
||||
}
|
||||
}
|
||||
}
|
||||
55
storage/public/dist/libs/apexcharts/dist/locales/tr.json
vendored
Normal file
55
storage/public/dist/libs/apexcharts/dist/locales/tr.json
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"name": "tr",
|
||||
"options": {
|
||||
"months": [
|
||||
"Ocak",
|
||||
"Şubat",
|
||||
"Mart",
|
||||
"Nisan",
|
||||
"Mayıs",
|
||||
"Haziran",
|
||||
"Temmuz",
|
||||
"Ağustos",
|
||||
"Eylül",
|
||||
"Ekim",
|
||||
"Kasım",
|
||||
"Aralık"
|
||||
],
|
||||
"shortMonths": [
|
||||
"Oca",
|
||||
"Şub",
|
||||
"Mar",
|
||||
"Nis",
|
||||
"May",
|
||||
"Haz",
|
||||
"Tem",
|
||||
"Ağu",
|
||||
"Eyl",
|
||||
"Eki",
|
||||
"Kas",
|
||||
"Ara"
|
||||
],
|
||||
"days": [
|
||||
"Pazar",
|
||||
"Pazartesi",
|
||||
"Salı",
|
||||
"Çarşamba",
|
||||
"Perşembe",
|
||||
"Cuma",
|
||||
"Cumartesi"
|
||||
],
|
||||
"shortDays": ["Paz", "Pzt", "Sal", "Çar", "Per", "Cum", "Cmt"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "SVG İndir",
|
||||
"exportToPNG": "PNG İndir",
|
||||
"exportToCSV": "CSV İndir",
|
||||
"menu": "Menü",
|
||||
"selection": "Seçim",
|
||||
"selectionZoom": "Seçim Yakınlaştır",
|
||||
"zoomIn": "Yakınlaştır",
|
||||
"zoomOut": "Uzaklaştır",
|
||||
"pan": "Kaydır",
|
||||
"reset": "Yakınlaştırmayı Sıfırla"
|
||||
}
|
||||
}
|
||||
}
|
||||
55
storage/public/dist/libs/apexcharts/dist/locales/uk.json
vendored
Normal file
55
storage/public/dist/libs/apexcharts/dist/locales/uk.json
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"name": "ua",
|
||||
"options": {
|
||||
"months": [
|
||||
"Січень",
|
||||
"Лютий",
|
||||
"Березень",
|
||||
"Квітень",
|
||||
"Травень",
|
||||
"Червень",
|
||||
"Липень",
|
||||
"Серпень",
|
||||
"Вересень",
|
||||
"Жовтень",
|
||||
"Листопад",
|
||||
"Грудень"
|
||||
],
|
||||
"shortMonths": [
|
||||
"Січ",
|
||||
"Лют",
|
||||
"Бер",
|
||||
"Кві",
|
||||
"Тра",
|
||||
"Чер",
|
||||
"Лип",
|
||||
"Сер",
|
||||
"Вер",
|
||||
"Жов",
|
||||
"Лис",
|
||||
"Гру"
|
||||
],
|
||||
"days": [
|
||||
"Неділя",
|
||||
"Понеділок",
|
||||
"Вівторок",
|
||||
"Середа",
|
||||
"Четвер",
|
||||
"П'ятниця",
|
||||
"Субота"
|
||||
],
|
||||
"shortDays": ["Нд", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Зберегти SVG",
|
||||
"exportToPNG": "Зберегти PNG",
|
||||
"exportToCSV": "Зберегти CSV",
|
||||
"menu": "Меню",
|
||||
"selection": "Вибір",
|
||||
"selectionZoom": "Вибір із збільшенням",
|
||||
"zoomIn": "Збільшити",
|
||||
"zoomOut": "Зменшити",
|
||||
"pan": "Переміщення",
|
||||
"reset": "Скинути збільшення"
|
||||
}
|
||||
}
|
||||
}
|
||||
63
storage/public/dist/libs/apexcharts/dist/locales/vi.json
vendored
Normal file
63
storage/public/dist/libs/apexcharts/dist/locales/vi.json
vendored
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
{
|
||||
"name": "vi",
|
||||
"options": {
|
||||
"months": [
|
||||
"Tháng 01",
|
||||
"Tháng 02",
|
||||
"Tháng 03",
|
||||
"Tháng 04",
|
||||
"Tháng 05",
|
||||
"Tháng 06",
|
||||
"Tháng 07",
|
||||
"Tháng 08",
|
||||
"Tháng 09",
|
||||
"Tháng 10",
|
||||
"Tháng 11",
|
||||
"Tháng 12"
|
||||
],
|
||||
"shortMonths": [
|
||||
"Th01",
|
||||
"Th02",
|
||||
"Th03",
|
||||
"Th04",
|
||||
"Th05",
|
||||
"Th06",
|
||||
"Th07",
|
||||
"Th08",
|
||||
"Th09",
|
||||
"Th10",
|
||||
"Th11",
|
||||
"Th12"
|
||||
],
|
||||
"days": [
|
||||
"Chủ nhật",
|
||||
"Thứ hai",
|
||||
"Thứ ba",
|
||||
"Thứ Tư",
|
||||
"Thứ năm",
|
||||
"Thứ sáu",
|
||||
"Thứ bảy"
|
||||
],
|
||||
"shortDays": [
|
||||
"CN",
|
||||
"T2",
|
||||
"T3",
|
||||
"T4",
|
||||
"T5",
|
||||
"T6",
|
||||
"T7"
|
||||
],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Tải xuống SVG",
|
||||
"exportToPNG": "Tải xuống PNG",
|
||||
"exportToCSV": "Tải xuống CSV",
|
||||
"menu": "Tuỳ chọn",
|
||||
"selection": "Vùng chọn",
|
||||
"selectionZoom": "Vùng chọn phóng to",
|
||||
"zoomIn": "Phóng to",
|
||||
"zoomOut": "Thu nhỏ",
|
||||
"pan": "Di chuyển",
|
||||
"reset": "Đặt lại thu phóng"
|
||||
}
|
||||
}
|
||||
}
|
||||
55
storage/public/dist/libs/apexcharts/dist/locales/zh-cn.json
vendored
Normal file
55
storage/public/dist/libs/apexcharts/dist/locales/zh-cn.json
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"name": "zh-cn",
|
||||
"options": {
|
||||
"months": [
|
||||
"一月",
|
||||
"二月",
|
||||
"三月",
|
||||
"四月",
|
||||
"五月",
|
||||
"六月",
|
||||
"七月",
|
||||
"八月",
|
||||
"九月",
|
||||
"十月",
|
||||
"十一月",
|
||||
"十二月"
|
||||
],
|
||||
"shortMonths": [
|
||||
"一月",
|
||||
"二月",
|
||||
"三月",
|
||||
"四月",
|
||||
"五月",
|
||||
"六月",
|
||||
"七月",
|
||||
"八月",
|
||||
"九月",
|
||||
"十月",
|
||||
"十一月",
|
||||
"十二月"
|
||||
],
|
||||
"days": [
|
||||
"星期天",
|
||||
"星期一",
|
||||
"星期二",
|
||||
"星期三",
|
||||
"星期四",
|
||||
"星期五",
|
||||
"星期六"
|
||||
],
|
||||
"shortDays": ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "下载 SVG",
|
||||
"exportToPNG": "下载 PNG",
|
||||
"exportToCSV": "下载 CSV",
|
||||
"menu": "菜单",
|
||||
"selection": "选择",
|
||||
"selectionZoom": "选择缩放",
|
||||
"zoomIn": "放大",
|
||||
"zoomOut": "缩小",
|
||||
"pan": "平移",
|
||||
"reset": "重置缩放"
|
||||
}
|
||||
}
|
||||
}
|
||||
55
storage/public/dist/libs/apexcharts/dist/locales/zh-tw.json
vendored
Normal file
55
storage/public/dist/libs/apexcharts/dist/locales/zh-tw.json
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"name": "zh-tw",
|
||||
"options": {
|
||||
"months": [
|
||||
"一月",
|
||||
"二月",
|
||||
"三月",
|
||||
"四月",
|
||||
"五月",
|
||||
"六月",
|
||||
"七月",
|
||||
"八月",
|
||||
"九月",
|
||||
"十月",
|
||||
"十一月",
|
||||
"十二月"
|
||||
],
|
||||
"shortMonths": [
|
||||
"一月",
|
||||
"二月",
|
||||
"三月",
|
||||
"四月",
|
||||
"五月",
|
||||
"六月",
|
||||
"七月",
|
||||
"八月",
|
||||
"九月",
|
||||
"十月",
|
||||
"十一月",
|
||||
"十二月"
|
||||
],
|
||||
"days": [
|
||||
"星期日",
|
||||
"星期一",
|
||||
"星期二",
|
||||
"星期三",
|
||||
"星期四",
|
||||
"星期五",
|
||||
"星期六"
|
||||
],
|
||||
"shortDays": ["週日", "週一", "週二", "週三", "週四", "週五", "週六"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "下載 SVG",
|
||||
"exportToPNG": "下載 PNG",
|
||||
"exportToCSV": "下載 CSV",
|
||||
"menu": "選單",
|
||||
"selection": "選擇",
|
||||
"selectionZoom": "選擇縮放",
|
||||
"zoomIn": "放大",
|
||||
"zoomOut": "縮小",
|
||||
"pan": "平移",
|
||||
"reset": "重置縮放"
|
||||
}
|
||||
}
|
||||
}
|
||||
5
storage/public/dist/libs/apexcharts/dist/pie.common.js
vendored
Normal file
5
storage/public/dist/libs/apexcharts/dist/pie.common.js
vendored
Normal file
File diff suppressed because one or more lines are too long
861
storage/public/dist/libs/apexcharts/dist/pie.esm.js
vendored
Normal file
861
storage/public/dist/libs/apexcharts/dist/pie.esm.js
vendored
Normal file
|
|
@ -0,0 +1,861 @@
|
|||
/*!
|
||||
* ApexCharts v5.10.4
|
||||
* (c) 2018-2026 ApexCharts
|
||||
*/
|
||||
import * as _core from "apexcharts/core";
|
||||
import _core__default from "apexcharts/core";
|
||||
import { default as default2 } from "apexcharts/core";
|
||||
const Animations = _core.__apex_Animations;
|
||||
const Fill = _core.__apex_Fill;
|
||||
const Utils = _core.__apex_Utils;
|
||||
const Graphics = _core.__apex_Graphics;
|
||||
const Filters = _core.__apex_Filters;
|
||||
const Scales = _core.__apex_Scales;
|
||||
class CircularChartsHelpers {
|
||||
/**
|
||||
* @param {import('../../../types/internal').ChartStateW} w
|
||||
*/
|
||||
constructor(w) {
|
||||
this.w = w;
|
||||
}
|
||||
/**
|
||||
* @param {number} x
|
||||
* @param {number} y
|
||||
* @param {number} i
|
||||
* @param {string | number} text
|
||||
*/
|
||||
drawYAxisTexts(x, y, i, text) {
|
||||
const w = this.w;
|
||||
const yaxisConfig = w.config.yaxis[0];
|
||||
const formatter = w.formatters.yLabelFormatters[0];
|
||||
const graphics = new Graphics(this.w);
|
||||
const yaxisLabel = graphics.drawText({
|
||||
x: x + yaxisConfig.labels.offsetX,
|
||||
y: y + yaxisConfig.labels.offsetY,
|
||||
text: formatter(text, i),
|
||||
textAnchor: "middle",
|
||||
fontSize: yaxisConfig.labels.style.fontSize,
|
||||
fontFamily: yaxisConfig.labels.style.fontFamily,
|
||||
foreColor: Array.isArray(yaxisConfig.labels.style.colors) ? yaxisConfig.labels.style.colors[i] : yaxisConfig.labels.style.colors
|
||||
});
|
||||
return yaxisLabel;
|
||||
}
|
||||
}
|
||||
class Pie {
|
||||
/**
|
||||
* @param {import('../types/internal').ChartStateW} w
|
||||
* @param {import('../types/internal').ChartContext} ctx
|
||||
*/
|
||||
constructor(w, ctx) {
|
||||
this.ctx = ctx;
|
||||
this.w = w;
|
||||
this.chartType = this.w.config.chart.type;
|
||||
this.initialAnim = this.w.config.chart.animations.enabled;
|
||||
this.dynamicAnim = this.initialAnim && this.w.config.chart.animations.dynamicAnimation.enabled;
|
||||
this.animBeginArr = [0];
|
||||
this.animDur = 0;
|
||||
this.donutDataLabels = this.w.config.plotOptions.pie.donut.labels;
|
||||
this.lineColorArr = w.globals.stroke.colors !== void 0 ? w.globals.stroke.colors : w.globals.colors;
|
||||
this.defaultSize = Math.min(w.layout.gridWidth, w.layout.gridHeight);
|
||||
this.centerY = this.defaultSize / 2;
|
||||
this.centerX = w.layout.gridWidth / 2;
|
||||
if (w.config.chart.type === "radialBar") {
|
||||
this.fullAngle = 360;
|
||||
} else {
|
||||
this.fullAngle = Math.abs(
|
||||
w.config.plotOptions.pie.endAngle - w.config.plotOptions.pie.startAngle
|
||||
);
|
||||
}
|
||||
this.initialAngle = w.config.plotOptions.pie.startAngle % this.fullAngle;
|
||||
w.globals.radialSize = this.defaultSize / 2.05 - w.config.stroke.width - (!w.config.chart.sparkline.enabled ? w.config.chart.dropShadow.blur : 0);
|
||||
this.donutSize = w.globals.radialSize * parseInt(w.config.plotOptions.pie.donut.size, 10) / 100;
|
||||
const scaleSize = w.config.plotOptions.pie.customScale;
|
||||
const halfW = w.layout.gridWidth / 2;
|
||||
const halfH = w.layout.gridHeight / 2;
|
||||
this.translateX = halfW - halfW * scaleSize;
|
||||
this.translateY = halfH - halfH * scaleSize;
|
||||
this.dataLabelsGroup = new Graphics(this.w).group({
|
||||
class: "apexcharts-datalabels-group",
|
||||
transform: `translate(${this.translateX}, ${this.translateY}) scale(${scaleSize})`
|
||||
});
|
||||
this.maxY = 0;
|
||||
this.sliceLabels = [];
|
||||
this.sliceSizes = [];
|
||||
this.prevSectorAngleArr = [];
|
||||
}
|
||||
/**
|
||||
* @param {any[]} series
|
||||
*/
|
||||
draw(series) {
|
||||
const self = this;
|
||||
const w = this.w;
|
||||
const graphics = new Graphics(this.w);
|
||||
const elPie = graphics.group({
|
||||
class: "apexcharts-pie"
|
||||
});
|
||||
if (w.globals.noData) return elPie;
|
||||
let total = 0;
|
||||
for (let k = 0; k < series.length; k++) {
|
||||
total += Utils.negToZero(series[k]);
|
||||
}
|
||||
const sectorAngleArr = [];
|
||||
const elSeries = graphics.group();
|
||||
if (total === 0) {
|
||||
total = 1e-5;
|
||||
}
|
||||
series.forEach((m) => {
|
||||
this.maxY = Math.max(this.maxY, m);
|
||||
});
|
||||
if (w.config.yaxis[0].max) {
|
||||
this.maxY = w.config.yaxis[0].max;
|
||||
}
|
||||
if (w.config.grid.position === "back" && this.chartType === "polarArea") {
|
||||
this.drawPolarElements(elPie);
|
||||
}
|
||||
for (let i = 0; i < series.length; i++) {
|
||||
const angle = this.fullAngle * Utils.negToZero(series[i]) / total;
|
||||
sectorAngleArr.push(angle);
|
||||
if (this.chartType === "polarArea") {
|
||||
sectorAngleArr[i] = this.fullAngle / series.length;
|
||||
this.sliceSizes.push(w.globals.radialSize * series[i] / this.maxY);
|
||||
} else {
|
||||
this.sliceSizes.push(w.globals.radialSize);
|
||||
}
|
||||
}
|
||||
if (w.globals.dataChanged) {
|
||||
let prevTotal = 0;
|
||||
for (let k = 0; k < w.globals.previousPaths.length; k++) {
|
||||
prevTotal += Utils.negToZero(w.globals.previousPaths[k]);
|
||||
}
|
||||
let previousAngle;
|
||||
for (let i = 0; i < w.globals.previousPaths.length; i++) {
|
||||
previousAngle = this.fullAngle * Utils.negToZero(w.globals.previousPaths[i]) / prevTotal;
|
||||
this.prevSectorAngleArr.push(previousAngle);
|
||||
}
|
||||
}
|
||||
if (this.donutSize < 0) {
|
||||
this.donutSize = 0;
|
||||
}
|
||||
if (this.chartType === "donut") {
|
||||
const circle = graphics.drawCircle(this.donutSize);
|
||||
circle.attr({
|
||||
cx: this.centerX,
|
||||
cy: this.centerY,
|
||||
fill: w.config.plotOptions.pie.donut.background ? w.config.plotOptions.pie.donut.background : "transparent"
|
||||
});
|
||||
elSeries.add(circle);
|
||||
}
|
||||
const elG = self.drawArcs(sectorAngleArr, series);
|
||||
this.sliceLabels.forEach((s) => {
|
||||
elG.add(s);
|
||||
});
|
||||
elSeries.attr({
|
||||
transform: `translate(${this.translateX}, ${this.translateY}) scale(${w.config.plotOptions.pie.customScale})`
|
||||
});
|
||||
elSeries.add(elG);
|
||||
elPie.add(elSeries);
|
||||
if (this.donutDataLabels.show) {
|
||||
const dataLabels = this.renderInnerDataLabels(
|
||||
this.dataLabelsGroup,
|
||||
this.donutDataLabels,
|
||||
{
|
||||
hollowSize: this.donutSize,
|
||||
centerX: this.centerX,
|
||||
centerY: this.centerY,
|
||||
opacity: this.donutDataLabels.show
|
||||
}
|
||||
);
|
||||
elPie.add(dataLabels);
|
||||
}
|
||||
if (w.config.grid.position === "front" && this.chartType === "polarArea") {
|
||||
this.drawPolarElements(elPie);
|
||||
}
|
||||
return elPie;
|
||||
}
|
||||
// core function for drawing pie arcs
|
||||
/**
|
||||
* @param {any[]} sectorAngleArr
|
||||
* @param {any[]} series
|
||||
*/
|
||||
drawArcs(sectorAngleArr, series) {
|
||||
const w = this.w;
|
||||
const filters = new Filters(this.w);
|
||||
const graphics = new Graphics(this.w);
|
||||
const fill = new Fill(this.w);
|
||||
const g = graphics.group({
|
||||
class: "apexcharts-slices"
|
||||
});
|
||||
let startAngle = this.initialAngle;
|
||||
let prevStartAngle = this.initialAngle;
|
||||
let endAngle = this.initialAngle;
|
||||
let prevEndAngle = this.initialAngle;
|
||||
this.strokeWidth = w.config.stroke.show ? w.config.stroke.width : 0;
|
||||
for (let i = 0; i < sectorAngleArr.length; i++) {
|
||||
const elPieArc = graphics.group({
|
||||
class: `apexcharts-series apexcharts-pie-series`,
|
||||
seriesName: Utils.escapeString(w.seriesData.seriesNames[i]),
|
||||
rel: i + 1,
|
||||
"data:realIndex": i
|
||||
});
|
||||
g.add(elPieArc);
|
||||
startAngle = endAngle;
|
||||
prevStartAngle = prevEndAngle;
|
||||
endAngle = startAngle + sectorAngleArr[i];
|
||||
prevEndAngle = prevStartAngle + this.prevSectorAngleArr[i];
|
||||
const angle = endAngle < startAngle ? this.fullAngle + endAngle - startAngle : endAngle - startAngle;
|
||||
const pathFill = fill.fillPath({
|
||||
seriesNumber: i,
|
||||
size: this.sliceSizes[i],
|
||||
value: series[i]
|
||||
});
|
||||
const path = this.getChangedPath(prevStartAngle, prevEndAngle);
|
||||
const elPath = graphics.drawPath({
|
||||
d: path,
|
||||
stroke: Array.isArray(this.lineColorArr) ? this.lineColorArr[i] : this.lineColorArr,
|
||||
strokeWidth: 0,
|
||||
fill: pathFill,
|
||||
fillOpacity: w.config.fill.opacity,
|
||||
classes: `apexcharts-pie-area apexcharts-${this.chartType.toLowerCase()}-slice-${i}`
|
||||
});
|
||||
elPath.attr({
|
||||
index: 0,
|
||||
j: i
|
||||
});
|
||||
filters.setSelectionFilter(elPath, 0, i);
|
||||
if (w.config.chart.dropShadow.enabled) {
|
||||
const shadow = w.config.chart.dropShadow;
|
||||
filters.dropShadow(elPath, shadow, i);
|
||||
}
|
||||
this.addListeners(elPath, this.donutDataLabels);
|
||||
let labelPosition = {
|
||||
x: 0,
|
||||
y: 0
|
||||
};
|
||||
const midAngle = (startAngle + angle / 2) % this.fullAngle;
|
||||
let arcCenter = { x: this.centerX, y: this.centerY };
|
||||
if (this.chartType === "pie" || this.chartType === "polarArea") {
|
||||
labelPosition = Utils.polarToCartesian(
|
||||
this.centerX,
|
||||
this.centerY,
|
||||
w.globals.radialSize / 1.25 + w.config.plotOptions.pie.dataLabels.offset,
|
||||
midAngle
|
||||
);
|
||||
arcCenter = Utils.polarToCartesian(
|
||||
this.centerX,
|
||||
this.centerY,
|
||||
w.globals.radialSize / 2,
|
||||
midAngle
|
||||
);
|
||||
} else if (this.chartType === "donut") {
|
||||
labelPosition = Utils.polarToCartesian(
|
||||
this.centerX,
|
||||
this.centerY,
|
||||
(w.globals.radialSize + this.donutSize) / 2 + w.config.plotOptions.pie.dataLabels.offset,
|
||||
midAngle
|
||||
);
|
||||
arcCenter = Utils.polarToCartesian(
|
||||
this.centerX,
|
||||
this.centerY,
|
||||
(w.globals.radialSize + this.donutSize) / 2,
|
||||
midAngle
|
||||
);
|
||||
}
|
||||
Graphics.setAttrs(elPath.node, {
|
||||
"data:angle": angle,
|
||||
"data:startAngle": startAngle,
|
||||
"data:strokeWidth": this.strokeWidth,
|
||||
"data:value": series[i],
|
||||
"data:cx": arcCenter.x,
|
||||
"data:cy": arcCenter.y
|
||||
});
|
||||
elPieArc.add(elPath);
|
||||
let dur = 0;
|
||||
if (this.initialAnim && !w.globals.resized && !w.globals.dataChanged) {
|
||||
dur = angle / this.fullAngle * w.config.chart.animations.speed;
|
||||
if (dur === 0) dur = 1;
|
||||
this.animDur = dur + this.animDur;
|
||||
this.animBeginArr.push(this.animDur);
|
||||
} else {
|
||||
this.animBeginArr.push(0);
|
||||
}
|
||||
if (this.dynamicAnim && w.globals.dataChanged) {
|
||||
this.animatePaths(elPath, {
|
||||
size: this.sliceSizes[i],
|
||||
endAngle,
|
||||
startAngle,
|
||||
prevStartAngle,
|
||||
prevEndAngle,
|
||||
animateStartingPos: true,
|
||||
i,
|
||||
animBeginArr: this.animBeginArr,
|
||||
shouldSetPrevPaths: true,
|
||||
dur: w.config.chart.animations.dynamicAnimation.speed
|
||||
});
|
||||
} else {
|
||||
this.animatePaths(elPath, {
|
||||
size: this.sliceSizes[i],
|
||||
endAngle,
|
||||
startAngle,
|
||||
i,
|
||||
totalItems: sectorAngleArr.length - 1,
|
||||
animBeginArr: this.animBeginArr,
|
||||
dur
|
||||
});
|
||||
}
|
||||
if (w.config.plotOptions.pie.expandOnClick && this.chartType !== "polarArea") {
|
||||
elPath.node.addEventListener("mouseup", this.pieClicked.bind(this, i));
|
||||
}
|
||||
if (typeof w.interact.selectedDataPoints[0] !== "undefined" && w.interact.selectedDataPoints[0].indexOf(i) > -1) {
|
||||
this.pieClicked(i);
|
||||
}
|
||||
if (w.config.dataLabels.enabled) {
|
||||
const xPos = labelPosition.x;
|
||||
const yPos = labelPosition.y;
|
||||
let text = 100 * angle / this.fullAngle + "%";
|
||||
if (angle !== 0 && w.config.plotOptions.pie.dataLabels.minAngleToShowLabel < sectorAngleArr[i]) {
|
||||
const formatter = w.config.dataLabels.formatter;
|
||||
if (formatter !== void 0) {
|
||||
text = formatter(w.globals.seriesPercent[i][0], {
|
||||
seriesIndex: i,
|
||||
w
|
||||
});
|
||||
}
|
||||
const foreColor = w.globals.dataLabels.style.colors[i];
|
||||
const elPieLabelWrap = graphics.group({
|
||||
class: `apexcharts-datalabels`
|
||||
});
|
||||
const elPieLabel = graphics.drawText({
|
||||
x: xPos,
|
||||
y: yPos,
|
||||
text,
|
||||
textAnchor: "middle",
|
||||
fontSize: w.config.dataLabels.style.fontSize,
|
||||
fontFamily: w.config.dataLabels.style.fontFamily,
|
||||
fontWeight: w.config.dataLabels.style.fontWeight,
|
||||
foreColor
|
||||
});
|
||||
elPieLabelWrap.add(elPieLabel);
|
||||
if (w.config.dataLabels.dropShadow.enabled) {
|
||||
const textShadow = w.config.dataLabels.dropShadow;
|
||||
filters.dropShadow(elPieLabel, textShadow);
|
||||
}
|
||||
elPieLabel.node.classList.add("apexcharts-pie-label");
|
||||
if (w.config.chart.animations.animate && w.globals.resized === false) {
|
||||
elPieLabel.node.classList.add("apexcharts-pie-label-delay");
|
||||
elPieLabel.node.style.animationDelay = w.config.chart.animations.speed / 940 + "s";
|
||||
}
|
||||
this.sliceLabels.push(elPieLabelWrap);
|
||||
}
|
||||
}
|
||||
}
|
||||
return g;
|
||||
}
|
||||
/**
|
||||
* @param {any} elPath
|
||||
* @param {Record<string, any>} dataLabels
|
||||
*/
|
||||
addListeners(elPath, dataLabels) {
|
||||
const graphics = new Graphics(this.w);
|
||||
elPath.node.addEventListener(
|
||||
"mouseenter",
|
||||
graphics.pathMouseEnter.bind(this, elPath)
|
||||
);
|
||||
elPath.node.addEventListener(
|
||||
"mouseleave",
|
||||
graphics.pathMouseLeave.bind(this, elPath)
|
||||
);
|
||||
elPath.node.addEventListener(
|
||||
"mouseleave",
|
||||
this.revertDataLabelsInner.bind(this)
|
||||
);
|
||||
elPath.node.addEventListener(
|
||||
"mousedown",
|
||||
graphics.pathMouseDown.bind(this, elPath)
|
||||
);
|
||||
if (!this.donutDataLabels.total.showAlways) {
|
||||
elPath.node.addEventListener(
|
||||
"mouseenter",
|
||||
this.printDataLabelsInner.bind(this, elPath.node, dataLabels)
|
||||
);
|
||||
elPath.node.addEventListener(
|
||||
"mousedown",
|
||||
this.printDataLabelsInner.bind(this, elPath.node, dataLabels)
|
||||
);
|
||||
}
|
||||
}
|
||||
// This function can be used for other circle charts too
|
||||
/**
|
||||
* @param {any} el
|
||||
* @param {Record<string, any>} opts
|
||||
*/
|
||||
animatePaths(el, opts) {
|
||||
const w = this.w;
|
||||
const me = this;
|
||||
let angle = opts.endAngle < opts.startAngle ? this.fullAngle + opts.endAngle - opts.startAngle : opts.endAngle - opts.startAngle;
|
||||
let prevAngle = angle;
|
||||
let fromStartAngle = opts.startAngle;
|
||||
const toStartAngle = opts.startAngle;
|
||||
if (opts.prevStartAngle !== void 0 && opts.prevEndAngle !== void 0) {
|
||||
fromStartAngle = opts.prevEndAngle;
|
||||
prevAngle = opts.prevEndAngle < opts.prevStartAngle ? this.fullAngle + opts.prevEndAngle - opts.prevStartAngle : opts.prevEndAngle - opts.prevStartAngle;
|
||||
}
|
||||
if (opts.i === w.config.series.length - 1) {
|
||||
if (angle + toStartAngle > this.fullAngle) {
|
||||
opts.endAngle = opts.endAngle - (angle + toStartAngle);
|
||||
} else if (angle + toStartAngle < this.fullAngle) {
|
||||
opts.endAngle = opts.endAngle + (this.fullAngle - (angle + toStartAngle));
|
||||
}
|
||||
}
|
||||
if (angle === this.fullAngle) angle = this.fullAngle - 0.01;
|
||||
me.animateArc(el, fromStartAngle, toStartAngle, angle, prevAngle, opts);
|
||||
}
|
||||
/**
|
||||
* @param {any} el
|
||||
* @param {number} fromStartAngle
|
||||
* @param {number} toStartAngle
|
||||
* @param {number} angle
|
||||
* @param {number} prevAngle
|
||||
* @param {Record<string, any>} opts
|
||||
*/
|
||||
animateArc(el, fromStartAngle, toStartAngle, angle, prevAngle, opts) {
|
||||
const me = this;
|
||||
const w = this.w;
|
||||
const animations = new Animations(this.w);
|
||||
const size = opts.size;
|
||||
let path;
|
||||
if (isNaN(fromStartAngle) || isNaN(prevAngle)) {
|
||||
fromStartAngle = toStartAngle;
|
||||
prevAngle = angle;
|
||||
opts.dur = 0;
|
||||
}
|
||||
let currAngle = angle;
|
||||
let startAngle = toStartAngle;
|
||||
const fromAngle = fromStartAngle < toStartAngle ? this.fullAngle + fromStartAngle - toStartAngle : fromStartAngle - toStartAngle;
|
||||
if (w.globals.dataChanged && opts.shouldSetPrevPaths) {
|
||||
if (opts.prevEndAngle) {
|
||||
path = me.getPiePath({
|
||||
me,
|
||||
startAngle: opts.prevStartAngle,
|
||||
angle: opts.prevEndAngle < opts.prevStartAngle ? this.fullAngle + opts.prevEndAngle - opts.prevStartAngle : opts.prevEndAngle - opts.prevStartAngle,
|
||||
size
|
||||
});
|
||||
el.attr({ d: path });
|
||||
}
|
||||
}
|
||||
if (opts.dur !== 0) {
|
||||
el.animate(opts.dur, opts.animBeginArr[opts.i]).after(
|
||||
/** @this {any} */
|
||||
function() {
|
||||
if (me.chartType === "pie" || me.chartType === "donut" || me.chartType === "polarArea") {
|
||||
this.animate(
|
||||
w.config.chart.animations.dynamicAnimation.speed
|
||||
).attr({
|
||||
"stroke-width": me.strokeWidth
|
||||
});
|
||||
}
|
||||
if (opts.i === w.config.series.length - 1) {
|
||||
animations.animationCompleted(el);
|
||||
}
|
||||
}
|
||||
).during((pos) => {
|
||||
currAngle = fromAngle + (angle - fromAngle) * pos;
|
||||
if (opts.animateStartingPos) {
|
||||
currAngle = prevAngle + (angle - prevAngle) * pos;
|
||||
startAngle = fromStartAngle - prevAngle + (toStartAngle - (fromStartAngle - prevAngle)) * pos;
|
||||
}
|
||||
path = me.getPiePath({
|
||||
me,
|
||||
startAngle,
|
||||
angle: currAngle,
|
||||
size
|
||||
});
|
||||
el.node.setAttribute("data:pathOrig", path);
|
||||
el.attr({
|
||||
d: path
|
||||
});
|
||||
});
|
||||
} else {
|
||||
path = me.getPiePath({
|
||||
me,
|
||||
startAngle,
|
||||
angle,
|
||||
size
|
||||
});
|
||||
if (!opts.isTrack) {
|
||||
w.globals.animationEnded = true;
|
||||
}
|
||||
el.node.setAttribute("data:pathOrig", path);
|
||||
el.attr({
|
||||
d: path,
|
||||
"stroke-width": me.strokeWidth
|
||||
});
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param {number} i
|
||||
*/
|
||||
pieClicked(i) {
|
||||
const w = this.w;
|
||||
const me = this;
|
||||
const size = me.sliceSizes[i] + (w.config.plotOptions.pie.expandOnClick ? 4 : 0);
|
||||
const elPath = w.dom.Paper.findOne(
|
||||
`.apexcharts-${me.chartType.toLowerCase()}-slice-${i}`
|
||||
);
|
||||
if (elPath.attr("data:pieClicked") === "true") {
|
||||
elPath.attr({
|
||||
"data:pieClicked": "false"
|
||||
});
|
||||
this.revertDataLabelsInner();
|
||||
const origPath = elPath.attr("data:pathOrig");
|
||||
elPath.attr({
|
||||
d: origPath
|
||||
});
|
||||
return;
|
||||
} else {
|
||||
const allEls = w.dom.baseEl.getElementsByClassName("apexcharts-pie-area");
|
||||
Array.prototype.forEach.call(allEls, (pieSlice) => {
|
||||
pieSlice.setAttribute("data:pieClicked", "false");
|
||||
const origPath = pieSlice.getAttribute("data:pathOrig");
|
||||
if (origPath) {
|
||||
pieSlice.setAttribute("d", origPath);
|
||||
}
|
||||
});
|
||||
w.interact.capturedDataPointIndex = i;
|
||||
elPath.attr("data:pieClicked", "true");
|
||||
}
|
||||
const startAngle = parseInt(elPath.attr("data:startAngle"), 10);
|
||||
const angle = parseInt(elPath.attr("data:angle"), 10);
|
||||
const path = me.getPiePath({
|
||||
me,
|
||||
startAngle,
|
||||
angle,
|
||||
size
|
||||
});
|
||||
if (angle === 360) return;
|
||||
elPath.plot(path);
|
||||
}
|
||||
/**
|
||||
* @param {number} prevStartAngle
|
||||
* @param {number} prevEndAngle
|
||||
*/
|
||||
getChangedPath(prevStartAngle, prevEndAngle) {
|
||||
let path = "";
|
||||
if (this.dynamicAnim && this.w.globals.dataChanged) {
|
||||
path = this.getPiePath({
|
||||
me: this,
|
||||
startAngle: prevStartAngle,
|
||||
angle: prevEndAngle - prevStartAngle,
|
||||
// @ts-ignore — size is set dynamically during draw()
|
||||
size: this.size
|
||||
});
|
||||
}
|
||||
return path;
|
||||
}
|
||||
/** @param {{me: any, startAngle: any, angle: any, size: any}} opts */
|
||||
getPiePath({ me, startAngle, angle, size }) {
|
||||
let path;
|
||||
const graphics = new Graphics(this.w);
|
||||
const startDeg = startAngle;
|
||||
const startRadians = Math.PI * (startDeg - 90) / 180;
|
||||
let endDeg = angle + startAngle;
|
||||
if (Math.ceil(endDeg) >= this.fullAngle + this.w.config.plotOptions.pie.startAngle % this.fullAngle) {
|
||||
endDeg = this.fullAngle + this.w.config.plotOptions.pie.startAngle % this.fullAngle - 0.01;
|
||||
}
|
||||
if (Math.ceil(endDeg) > this.fullAngle) endDeg -= this.fullAngle;
|
||||
const endRadians = Math.PI * (endDeg - 90) / 180;
|
||||
const x1 = me.centerX + size * Math.cos(startRadians);
|
||||
const y1 = me.centerY + size * Math.sin(startRadians);
|
||||
const x2 = me.centerX + size * Math.cos(endRadians);
|
||||
const y2 = me.centerY + size * Math.sin(endRadians);
|
||||
const startInner = Utils.polarToCartesian(
|
||||
me.centerX,
|
||||
me.centerY,
|
||||
me.donutSize,
|
||||
endDeg
|
||||
);
|
||||
const endInner = Utils.polarToCartesian(
|
||||
me.centerX,
|
||||
me.centerY,
|
||||
me.donutSize,
|
||||
startDeg
|
||||
);
|
||||
const largeArc = angle > 180 ? 1 : 0;
|
||||
const pathBeginning = ["M", x1, y1, "A", size, size, 0, largeArc, 1, x2, y2];
|
||||
if (me.chartType === "donut") {
|
||||
path = [
|
||||
...pathBeginning,
|
||||
"L",
|
||||
startInner.x,
|
||||
startInner.y,
|
||||
"A",
|
||||
me.donutSize,
|
||||
me.donutSize,
|
||||
0,
|
||||
largeArc,
|
||||
0,
|
||||
endInner.x,
|
||||
endInner.y,
|
||||
"L",
|
||||
x1,
|
||||
y1,
|
||||
"z"
|
||||
].join(" ");
|
||||
} else if (me.chartType === "pie" || me.chartType === "polarArea") {
|
||||
path = [...pathBeginning, "L", me.centerX, me.centerY, "L", x1, y1].join(
|
||||
" "
|
||||
);
|
||||
} else {
|
||||
path = [...pathBeginning].join(" ");
|
||||
}
|
||||
return graphics.roundPathCorners(path, this.strokeWidth * 2);
|
||||
}
|
||||
/**
|
||||
* @param {any} parent
|
||||
*/
|
||||
drawPolarElements(parent) {
|
||||
const w = this.w;
|
||||
const scale = new Scales(this.w);
|
||||
const graphics = new Graphics(this.w);
|
||||
const helpers = new CircularChartsHelpers(this.w);
|
||||
const gCircles = graphics.group();
|
||||
const gYAxis = graphics.group();
|
||||
const yScale = scale.niceScale(0, Math.ceil(this.maxY), 0);
|
||||
const yTexts = yScale.result.reverse();
|
||||
const len = yScale.result.length;
|
||||
this.maxY = yScale.niceMax;
|
||||
let circleSize = w.globals.radialSize;
|
||||
const diff = circleSize / (len - 1);
|
||||
for (let i = 0; i < len - 1; i++) {
|
||||
const circle = graphics.drawCircle(circleSize);
|
||||
circle.attr({
|
||||
cx: this.centerX,
|
||||
cy: this.centerY,
|
||||
fill: "none",
|
||||
"stroke-width": w.config.plotOptions.polarArea.rings.strokeWidth,
|
||||
stroke: w.config.plotOptions.polarArea.rings.strokeColor
|
||||
});
|
||||
if (w.config.yaxis[0].show) {
|
||||
const yLabel = helpers.drawYAxisTexts(
|
||||
this.centerX,
|
||||
this.centerY - circleSize + parseInt(w.config.yaxis[0].labels.style.fontSize, 10) / 2,
|
||||
i,
|
||||
yTexts[i]
|
||||
);
|
||||
gYAxis.add(yLabel);
|
||||
}
|
||||
gCircles.add(circle);
|
||||
circleSize = circleSize - diff;
|
||||
}
|
||||
this.drawSpokes(parent);
|
||||
parent.add(gCircles);
|
||||
parent.add(gYAxis);
|
||||
}
|
||||
/**
|
||||
* @param {any} dataLabelsGroup
|
||||
* @param {Record<string, any>} dataLabelsConfig
|
||||
* @param {Record<string, any>} opts
|
||||
*/
|
||||
renderInnerDataLabels(dataLabelsGroup, dataLabelsConfig, opts) {
|
||||
const w = this.w;
|
||||
const graphics = new Graphics(this.w);
|
||||
const showTotal = dataLabelsConfig.total.show;
|
||||
dataLabelsGroup.node.innerHTML = "";
|
||||
dataLabelsGroup.node.style.opacity = opts.opacity;
|
||||
const x = opts.centerX;
|
||||
const y = !this.donutDataLabels.total.label ? opts.centerY - opts.centerY / 6 : opts.centerY;
|
||||
let labelColor, valueColor;
|
||||
if (dataLabelsConfig.name.color === void 0) {
|
||||
labelColor = w.globals.colors[0];
|
||||
} else {
|
||||
labelColor = dataLabelsConfig.name.color;
|
||||
}
|
||||
let labelFontSize = dataLabelsConfig.name.fontSize;
|
||||
let labelFontFamily = dataLabelsConfig.name.fontFamily;
|
||||
let labelFontWeight = dataLabelsConfig.name.fontWeight;
|
||||
if (dataLabelsConfig.value.color === void 0) {
|
||||
valueColor = w.config.chart.foreColor;
|
||||
} else {
|
||||
valueColor = dataLabelsConfig.value.color;
|
||||
}
|
||||
const lbFormatter = dataLabelsConfig.value.formatter;
|
||||
let val = "";
|
||||
let name = "";
|
||||
if (showTotal) {
|
||||
labelColor = dataLabelsConfig.total.color;
|
||||
labelFontSize = dataLabelsConfig.total.fontSize;
|
||||
labelFontFamily = dataLabelsConfig.total.fontFamily;
|
||||
labelFontWeight = dataLabelsConfig.total.fontWeight;
|
||||
name = !this.donutDataLabels.total.label ? "" : dataLabelsConfig.total.label;
|
||||
val = dataLabelsConfig.total.formatter(w);
|
||||
} else {
|
||||
if (w.seriesData.series.length === 1) {
|
||||
val = lbFormatter(w.seriesData.series[0], w);
|
||||
name = w.seriesData.seriesNames[0];
|
||||
}
|
||||
}
|
||||
if (name) {
|
||||
name = dataLabelsConfig.name.formatter(
|
||||
name,
|
||||
dataLabelsConfig.total.show,
|
||||
w
|
||||
);
|
||||
}
|
||||
if (dataLabelsConfig.name.show) {
|
||||
const elLabel = graphics.drawText({
|
||||
x,
|
||||
y: y + parseFloat(dataLabelsConfig.name.offsetY),
|
||||
text: name,
|
||||
textAnchor: "middle",
|
||||
foreColor: labelColor,
|
||||
fontSize: labelFontSize,
|
||||
fontWeight: labelFontWeight,
|
||||
fontFamily: labelFontFamily
|
||||
});
|
||||
elLabel.node.classList.add("apexcharts-datalabel-label");
|
||||
dataLabelsGroup.add(elLabel);
|
||||
}
|
||||
if (dataLabelsConfig.value.show) {
|
||||
const valOffset = dataLabelsConfig.name.show ? parseFloat(dataLabelsConfig.value.offsetY) + 16 : dataLabelsConfig.value.offsetY;
|
||||
const elValue = graphics.drawText({
|
||||
x,
|
||||
y: y + valOffset,
|
||||
text: val,
|
||||
textAnchor: "middle",
|
||||
foreColor: valueColor,
|
||||
fontWeight: dataLabelsConfig.value.fontWeight,
|
||||
fontSize: dataLabelsConfig.value.fontSize,
|
||||
fontFamily: dataLabelsConfig.value.fontFamily
|
||||
});
|
||||
elValue.node.classList.add("apexcharts-datalabel-value");
|
||||
dataLabelsGroup.add(elValue);
|
||||
}
|
||||
return dataLabelsGroup;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param {string} name - The name of the series
|
||||
* @param {string} val - The value of that series
|
||||
* @param {any} el - Optional el (indicates which series was hovered/clicked). If this param is not present, means we need to show total
|
||||
* @param {Record<string, any>} labelsConfig
|
||||
*/
|
||||
printInnerLabels(labelsConfig, name, val, el) {
|
||||
const w = this.w;
|
||||
let labelColor;
|
||||
if (el) {
|
||||
if (labelsConfig.name.color === void 0) {
|
||||
labelColor = w.globals.colors[parseInt(el.parentNode.getAttribute("rel"), 10) - 1];
|
||||
} else {
|
||||
labelColor = labelsConfig.name.color;
|
||||
}
|
||||
} else {
|
||||
if (w.seriesData.series.length > 1 && labelsConfig.total.show) {
|
||||
labelColor = labelsConfig.total.color;
|
||||
}
|
||||
}
|
||||
const elLabel = w.dom.baseEl.querySelector(".apexcharts-datalabel-label");
|
||||
const elValue = w.dom.baseEl.querySelector(".apexcharts-datalabel-value");
|
||||
const lbFormatter = labelsConfig.value.formatter;
|
||||
val = lbFormatter(val, w);
|
||||
if (!el && typeof labelsConfig.total.formatter === "function") {
|
||||
val = labelsConfig.total.formatter(w);
|
||||
}
|
||||
const isTotal = name === labelsConfig.total.label;
|
||||
name = !this.donutDataLabels.total.label ? "" : labelsConfig.name.formatter(name, isTotal, w);
|
||||
if (elLabel !== null) {
|
||||
elLabel.textContent = name;
|
||||
}
|
||||
if (elValue !== null) {
|
||||
elValue.textContent = val;
|
||||
}
|
||||
if (elLabel !== null) {
|
||||
const elLabelEl = (
|
||||
/** @type {HTMLElement} */
|
||||
elLabel
|
||||
);
|
||||
elLabelEl.style.fill = labelColor;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param {any} el
|
||||
* @param {Record<string, any>} dataLabelsConfig
|
||||
*/
|
||||
printDataLabelsInner(el, dataLabelsConfig) {
|
||||
const w = this.w;
|
||||
const val = el.getAttribute("data:value");
|
||||
const name = w.seriesData.seriesNames[parseInt(el.parentNode.getAttribute("rel"), 10) - 1];
|
||||
if (w.seriesData.series.length > 1) {
|
||||
this.printInnerLabels(dataLabelsConfig, name, val, el);
|
||||
}
|
||||
const dataLabelsGroup = w.dom.baseEl.querySelector(
|
||||
".apexcharts-datalabels-group"
|
||||
);
|
||||
if (dataLabelsGroup !== null) {
|
||||
const dataLabelsGroupEl = (
|
||||
/** @type {HTMLElement} */
|
||||
dataLabelsGroup
|
||||
);
|
||||
dataLabelsGroupEl.style.opacity = "1";
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param {any} parent
|
||||
*/
|
||||
drawSpokes(parent) {
|
||||
const w = this.w;
|
||||
const graphics = new Graphics(this.w);
|
||||
const spokeConfig = w.config.plotOptions.polarArea.spokes;
|
||||
if (spokeConfig.strokeWidth === 0) return;
|
||||
const spokes = [];
|
||||
const angleDivision = 360 / w.seriesData.series.length;
|
||||
for (let i = 0; i < w.seriesData.series.length; i++) {
|
||||
spokes.push(
|
||||
Utils.polarToCartesian(
|
||||
this.centerX,
|
||||
this.centerY,
|
||||
w.globals.radialSize,
|
||||
w.config.plotOptions.pie.startAngle + angleDivision * i
|
||||
)
|
||||
);
|
||||
}
|
||||
spokes.forEach((p, i) => {
|
||||
const line = graphics.drawLine(
|
||||
p.x,
|
||||
p.y,
|
||||
this.centerX,
|
||||
this.centerY,
|
||||
Array.isArray(spokeConfig.connectorColors) ? spokeConfig.connectorColors[i] : spokeConfig.connectorColors
|
||||
);
|
||||
parent.add(line);
|
||||
});
|
||||
}
|
||||
revertDataLabelsInner() {
|
||||
const w = this.w;
|
||||
if (this.donutDataLabels.show) {
|
||||
const dataLabelsGroup = w.dom.Paper.findOne(
|
||||
`.apexcharts-datalabels-group`
|
||||
);
|
||||
const dataLabels = this.renderInnerDataLabels(
|
||||
dataLabelsGroup,
|
||||
this.donutDataLabels,
|
||||
{
|
||||
hollowSize: this.donutSize,
|
||||
centerX: this.centerX,
|
||||
centerY: this.centerY,
|
||||
opacity: this.donutDataLabels.show
|
||||
}
|
||||
);
|
||||
const elPie = w.dom.Paper.findOne(
|
||||
".apexcharts-radialbar, .apexcharts-pie"
|
||||
);
|
||||
elPie.add(dataLabels);
|
||||
}
|
||||
}
|
||||
}
|
||||
_core__default.use({
|
||||
pie: Pie,
|
||||
donut: Pie,
|
||||
polarArea: Pie
|
||||
});
|
||||
export {
|
||||
default2 as default
|
||||
};
|
||||
5
storage/public/dist/libs/apexcharts/dist/polarArea.common.js
vendored
Normal file
5
storage/public/dist/libs/apexcharts/dist/polarArea.common.js
vendored
Normal file
File diff suppressed because one or more lines are too long
861
storage/public/dist/libs/apexcharts/dist/polarArea.esm.js
vendored
Normal file
861
storage/public/dist/libs/apexcharts/dist/polarArea.esm.js
vendored
Normal file
|
|
@ -0,0 +1,861 @@
|
|||
/*!
|
||||
* ApexCharts v5.10.4
|
||||
* (c) 2018-2026 ApexCharts
|
||||
*/
|
||||
import * as _core from "apexcharts/core";
|
||||
import _core__default from "apexcharts/core";
|
||||
import { default as default2 } from "apexcharts/core";
|
||||
const Animations = _core.__apex_Animations;
|
||||
const Fill = _core.__apex_Fill;
|
||||
const Utils = _core.__apex_Utils;
|
||||
const Graphics = _core.__apex_Graphics;
|
||||
const Filters = _core.__apex_Filters;
|
||||
const Scales = _core.__apex_Scales;
|
||||
class CircularChartsHelpers {
|
||||
/**
|
||||
* @param {import('../../../types/internal').ChartStateW} w
|
||||
*/
|
||||
constructor(w) {
|
||||
this.w = w;
|
||||
}
|
||||
/**
|
||||
* @param {number} x
|
||||
* @param {number} y
|
||||
* @param {number} i
|
||||
* @param {string | number} text
|
||||
*/
|
||||
drawYAxisTexts(x, y, i, text) {
|
||||
const w = this.w;
|
||||
const yaxisConfig = w.config.yaxis[0];
|
||||
const formatter = w.formatters.yLabelFormatters[0];
|
||||
const graphics = new Graphics(this.w);
|
||||
const yaxisLabel = graphics.drawText({
|
||||
x: x + yaxisConfig.labels.offsetX,
|
||||
y: y + yaxisConfig.labels.offsetY,
|
||||
text: formatter(text, i),
|
||||
textAnchor: "middle",
|
||||
fontSize: yaxisConfig.labels.style.fontSize,
|
||||
fontFamily: yaxisConfig.labels.style.fontFamily,
|
||||
foreColor: Array.isArray(yaxisConfig.labels.style.colors) ? yaxisConfig.labels.style.colors[i] : yaxisConfig.labels.style.colors
|
||||
});
|
||||
return yaxisLabel;
|
||||
}
|
||||
}
|
||||
class Pie {
|
||||
/**
|
||||
* @param {import('../types/internal').ChartStateW} w
|
||||
* @param {import('../types/internal').ChartContext} ctx
|
||||
*/
|
||||
constructor(w, ctx) {
|
||||
this.ctx = ctx;
|
||||
this.w = w;
|
||||
this.chartType = this.w.config.chart.type;
|
||||
this.initialAnim = this.w.config.chart.animations.enabled;
|
||||
this.dynamicAnim = this.initialAnim && this.w.config.chart.animations.dynamicAnimation.enabled;
|
||||
this.animBeginArr = [0];
|
||||
this.animDur = 0;
|
||||
this.donutDataLabels = this.w.config.plotOptions.pie.donut.labels;
|
||||
this.lineColorArr = w.globals.stroke.colors !== void 0 ? w.globals.stroke.colors : w.globals.colors;
|
||||
this.defaultSize = Math.min(w.layout.gridWidth, w.layout.gridHeight);
|
||||
this.centerY = this.defaultSize / 2;
|
||||
this.centerX = w.layout.gridWidth / 2;
|
||||
if (w.config.chart.type === "radialBar") {
|
||||
this.fullAngle = 360;
|
||||
} else {
|
||||
this.fullAngle = Math.abs(
|
||||
w.config.plotOptions.pie.endAngle - w.config.plotOptions.pie.startAngle
|
||||
);
|
||||
}
|
||||
this.initialAngle = w.config.plotOptions.pie.startAngle % this.fullAngle;
|
||||
w.globals.radialSize = this.defaultSize / 2.05 - w.config.stroke.width - (!w.config.chart.sparkline.enabled ? w.config.chart.dropShadow.blur : 0);
|
||||
this.donutSize = w.globals.radialSize * parseInt(w.config.plotOptions.pie.donut.size, 10) / 100;
|
||||
const scaleSize = w.config.plotOptions.pie.customScale;
|
||||
const halfW = w.layout.gridWidth / 2;
|
||||
const halfH = w.layout.gridHeight / 2;
|
||||
this.translateX = halfW - halfW * scaleSize;
|
||||
this.translateY = halfH - halfH * scaleSize;
|
||||
this.dataLabelsGroup = new Graphics(this.w).group({
|
||||
class: "apexcharts-datalabels-group",
|
||||
transform: `translate(${this.translateX}, ${this.translateY}) scale(${scaleSize})`
|
||||
});
|
||||
this.maxY = 0;
|
||||
this.sliceLabels = [];
|
||||
this.sliceSizes = [];
|
||||
this.prevSectorAngleArr = [];
|
||||
}
|
||||
/**
|
||||
* @param {any[]} series
|
||||
*/
|
||||
draw(series) {
|
||||
const self = this;
|
||||
const w = this.w;
|
||||
const graphics = new Graphics(this.w);
|
||||
const elPie = graphics.group({
|
||||
class: "apexcharts-pie"
|
||||
});
|
||||
if (w.globals.noData) return elPie;
|
||||
let total = 0;
|
||||
for (let k = 0; k < series.length; k++) {
|
||||
total += Utils.negToZero(series[k]);
|
||||
}
|
||||
const sectorAngleArr = [];
|
||||
const elSeries = graphics.group();
|
||||
if (total === 0) {
|
||||
total = 1e-5;
|
||||
}
|
||||
series.forEach((m) => {
|
||||
this.maxY = Math.max(this.maxY, m);
|
||||
});
|
||||
if (w.config.yaxis[0].max) {
|
||||
this.maxY = w.config.yaxis[0].max;
|
||||
}
|
||||
if (w.config.grid.position === "back" && this.chartType === "polarArea") {
|
||||
this.drawPolarElements(elPie);
|
||||
}
|
||||
for (let i = 0; i < series.length; i++) {
|
||||
const angle = this.fullAngle * Utils.negToZero(series[i]) / total;
|
||||
sectorAngleArr.push(angle);
|
||||
if (this.chartType === "polarArea") {
|
||||
sectorAngleArr[i] = this.fullAngle / series.length;
|
||||
this.sliceSizes.push(w.globals.radialSize * series[i] / this.maxY);
|
||||
} else {
|
||||
this.sliceSizes.push(w.globals.radialSize);
|
||||
}
|
||||
}
|
||||
if (w.globals.dataChanged) {
|
||||
let prevTotal = 0;
|
||||
for (let k = 0; k < w.globals.previousPaths.length; k++) {
|
||||
prevTotal += Utils.negToZero(w.globals.previousPaths[k]);
|
||||
}
|
||||
let previousAngle;
|
||||
for (let i = 0; i < w.globals.previousPaths.length; i++) {
|
||||
previousAngle = this.fullAngle * Utils.negToZero(w.globals.previousPaths[i]) / prevTotal;
|
||||
this.prevSectorAngleArr.push(previousAngle);
|
||||
}
|
||||
}
|
||||
if (this.donutSize < 0) {
|
||||
this.donutSize = 0;
|
||||
}
|
||||
if (this.chartType === "donut") {
|
||||
const circle = graphics.drawCircle(this.donutSize);
|
||||
circle.attr({
|
||||
cx: this.centerX,
|
||||
cy: this.centerY,
|
||||
fill: w.config.plotOptions.pie.donut.background ? w.config.plotOptions.pie.donut.background : "transparent"
|
||||
});
|
||||
elSeries.add(circle);
|
||||
}
|
||||
const elG = self.drawArcs(sectorAngleArr, series);
|
||||
this.sliceLabels.forEach((s) => {
|
||||
elG.add(s);
|
||||
});
|
||||
elSeries.attr({
|
||||
transform: `translate(${this.translateX}, ${this.translateY}) scale(${w.config.plotOptions.pie.customScale})`
|
||||
});
|
||||
elSeries.add(elG);
|
||||
elPie.add(elSeries);
|
||||
if (this.donutDataLabels.show) {
|
||||
const dataLabels = this.renderInnerDataLabels(
|
||||
this.dataLabelsGroup,
|
||||
this.donutDataLabels,
|
||||
{
|
||||
hollowSize: this.donutSize,
|
||||
centerX: this.centerX,
|
||||
centerY: this.centerY,
|
||||
opacity: this.donutDataLabels.show
|
||||
}
|
||||
);
|
||||
elPie.add(dataLabels);
|
||||
}
|
||||
if (w.config.grid.position === "front" && this.chartType === "polarArea") {
|
||||
this.drawPolarElements(elPie);
|
||||
}
|
||||
return elPie;
|
||||
}
|
||||
// core function for drawing pie arcs
|
||||
/**
|
||||
* @param {any[]} sectorAngleArr
|
||||
* @param {any[]} series
|
||||
*/
|
||||
drawArcs(sectorAngleArr, series) {
|
||||
const w = this.w;
|
||||
const filters = new Filters(this.w);
|
||||
const graphics = new Graphics(this.w);
|
||||
const fill = new Fill(this.w);
|
||||
const g = graphics.group({
|
||||
class: "apexcharts-slices"
|
||||
});
|
||||
let startAngle = this.initialAngle;
|
||||
let prevStartAngle = this.initialAngle;
|
||||
let endAngle = this.initialAngle;
|
||||
let prevEndAngle = this.initialAngle;
|
||||
this.strokeWidth = w.config.stroke.show ? w.config.stroke.width : 0;
|
||||
for (let i = 0; i < sectorAngleArr.length; i++) {
|
||||
const elPieArc = graphics.group({
|
||||
class: `apexcharts-series apexcharts-pie-series`,
|
||||
seriesName: Utils.escapeString(w.seriesData.seriesNames[i]),
|
||||
rel: i + 1,
|
||||
"data:realIndex": i
|
||||
});
|
||||
g.add(elPieArc);
|
||||
startAngle = endAngle;
|
||||
prevStartAngle = prevEndAngle;
|
||||
endAngle = startAngle + sectorAngleArr[i];
|
||||
prevEndAngle = prevStartAngle + this.prevSectorAngleArr[i];
|
||||
const angle = endAngle < startAngle ? this.fullAngle + endAngle - startAngle : endAngle - startAngle;
|
||||
const pathFill = fill.fillPath({
|
||||
seriesNumber: i,
|
||||
size: this.sliceSizes[i],
|
||||
value: series[i]
|
||||
});
|
||||
const path = this.getChangedPath(prevStartAngle, prevEndAngle);
|
||||
const elPath = graphics.drawPath({
|
||||
d: path,
|
||||
stroke: Array.isArray(this.lineColorArr) ? this.lineColorArr[i] : this.lineColorArr,
|
||||
strokeWidth: 0,
|
||||
fill: pathFill,
|
||||
fillOpacity: w.config.fill.opacity,
|
||||
classes: `apexcharts-pie-area apexcharts-${this.chartType.toLowerCase()}-slice-${i}`
|
||||
});
|
||||
elPath.attr({
|
||||
index: 0,
|
||||
j: i
|
||||
});
|
||||
filters.setSelectionFilter(elPath, 0, i);
|
||||
if (w.config.chart.dropShadow.enabled) {
|
||||
const shadow = w.config.chart.dropShadow;
|
||||
filters.dropShadow(elPath, shadow, i);
|
||||
}
|
||||
this.addListeners(elPath, this.donutDataLabels);
|
||||
let labelPosition = {
|
||||
x: 0,
|
||||
y: 0
|
||||
};
|
||||
const midAngle = (startAngle + angle / 2) % this.fullAngle;
|
||||
let arcCenter = { x: this.centerX, y: this.centerY };
|
||||
if (this.chartType === "pie" || this.chartType === "polarArea") {
|
||||
labelPosition = Utils.polarToCartesian(
|
||||
this.centerX,
|
||||
this.centerY,
|
||||
w.globals.radialSize / 1.25 + w.config.plotOptions.pie.dataLabels.offset,
|
||||
midAngle
|
||||
);
|
||||
arcCenter = Utils.polarToCartesian(
|
||||
this.centerX,
|
||||
this.centerY,
|
||||
w.globals.radialSize / 2,
|
||||
midAngle
|
||||
);
|
||||
} else if (this.chartType === "donut") {
|
||||
labelPosition = Utils.polarToCartesian(
|
||||
this.centerX,
|
||||
this.centerY,
|
||||
(w.globals.radialSize + this.donutSize) / 2 + w.config.plotOptions.pie.dataLabels.offset,
|
||||
midAngle
|
||||
);
|
||||
arcCenter = Utils.polarToCartesian(
|
||||
this.centerX,
|
||||
this.centerY,
|
||||
(w.globals.radialSize + this.donutSize) / 2,
|
||||
midAngle
|
||||
);
|
||||
}
|
||||
Graphics.setAttrs(elPath.node, {
|
||||
"data:angle": angle,
|
||||
"data:startAngle": startAngle,
|
||||
"data:strokeWidth": this.strokeWidth,
|
||||
"data:value": series[i],
|
||||
"data:cx": arcCenter.x,
|
||||
"data:cy": arcCenter.y
|
||||
});
|
||||
elPieArc.add(elPath);
|
||||
let dur = 0;
|
||||
if (this.initialAnim && !w.globals.resized && !w.globals.dataChanged) {
|
||||
dur = angle / this.fullAngle * w.config.chart.animations.speed;
|
||||
if (dur === 0) dur = 1;
|
||||
this.animDur = dur + this.animDur;
|
||||
this.animBeginArr.push(this.animDur);
|
||||
} else {
|
||||
this.animBeginArr.push(0);
|
||||
}
|
||||
if (this.dynamicAnim && w.globals.dataChanged) {
|
||||
this.animatePaths(elPath, {
|
||||
size: this.sliceSizes[i],
|
||||
endAngle,
|
||||
startAngle,
|
||||
prevStartAngle,
|
||||
prevEndAngle,
|
||||
animateStartingPos: true,
|
||||
i,
|
||||
animBeginArr: this.animBeginArr,
|
||||
shouldSetPrevPaths: true,
|
||||
dur: w.config.chart.animations.dynamicAnimation.speed
|
||||
});
|
||||
} else {
|
||||
this.animatePaths(elPath, {
|
||||
size: this.sliceSizes[i],
|
||||
endAngle,
|
||||
startAngle,
|
||||
i,
|
||||
totalItems: sectorAngleArr.length - 1,
|
||||
animBeginArr: this.animBeginArr,
|
||||
dur
|
||||
});
|
||||
}
|
||||
if (w.config.plotOptions.pie.expandOnClick && this.chartType !== "polarArea") {
|
||||
elPath.node.addEventListener("mouseup", this.pieClicked.bind(this, i));
|
||||
}
|
||||
if (typeof w.interact.selectedDataPoints[0] !== "undefined" && w.interact.selectedDataPoints[0].indexOf(i) > -1) {
|
||||
this.pieClicked(i);
|
||||
}
|
||||
if (w.config.dataLabels.enabled) {
|
||||
const xPos = labelPosition.x;
|
||||
const yPos = labelPosition.y;
|
||||
let text = 100 * angle / this.fullAngle + "%";
|
||||
if (angle !== 0 && w.config.plotOptions.pie.dataLabels.minAngleToShowLabel < sectorAngleArr[i]) {
|
||||
const formatter = w.config.dataLabels.formatter;
|
||||
if (formatter !== void 0) {
|
||||
text = formatter(w.globals.seriesPercent[i][0], {
|
||||
seriesIndex: i,
|
||||
w
|
||||
});
|
||||
}
|
||||
const foreColor = w.globals.dataLabels.style.colors[i];
|
||||
const elPieLabelWrap = graphics.group({
|
||||
class: `apexcharts-datalabels`
|
||||
});
|
||||
const elPieLabel = graphics.drawText({
|
||||
x: xPos,
|
||||
y: yPos,
|
||||
text,
|
||||
textAnchor: "middle",
|
||||
fontSize: w.config.dataLabels.style.fontSize,
|
||||
fontFamily: w.config.dataLabels.style.fontFamily,
|
||||
fontWeight: w.config.dataLabels.style.fontWeight,
|
||||
foreColor
|
||||
});
|
||||
elPieLabelWrap.add(elPieLabel);
|
||||
if (w.config.dataLabels.dropShadow.enabled) {
|
||||
const textShadow = w.config.dataLabels.dropShadow;
|
||||
filters.dropShadow(elPieLabel, textShadow);
|
||||
}
|
||||
elPieLabel.node.classList.add("apexcharts-pie-label");
|
||||
if (w.config.chart.animations.animate && w.globals.resized === false) {
|
||||
elPieLabel.node.classList.add("apexcharts-pie-label-delay");
|
||||
elPieLabel.node.style.animationDelay = w.config.chart.animations.speed / 940 + "s";
|
||||
}
|
||||
this.sliceLabels.push(elPieLabelWrap);
|
||||
}
|
||||
}
|
||||
}
|
||||
return g;
|
||||
}
|
||||
/**
|
||||
* @param {any} elPath
|
||||
* @param {Record<string, any>} dataLabels
|
||||
*/
|
||||
addListeners(elPath, dataLabels) {
|
||||
const graphics = new Graphics(this.w);
|
||||
elPath.node.addEventListener(
|
||||
"mouseenter",
|
||||
graphics.pathMouseEnter.bind(this, elPath)
|
||||
);
|
||||
elPath.node.addEventListener(
|
||||
"mouseleave",
|
||||
graphics.pathMouseLeave.bind(this, elPath)
|
||||
);
|
||||
elPath.node.addEventListener(
|
||||
"mouseleave",
|
||||
this.revertDataLabelsInner.bind(this)
|
||||
);
|
||||
elPath.node.addEventListener(
|
||||
"mousedown",
|
||||
graphics.pathMouseDown.bind(this, elPath)
|
||||
);
|
||||
if (!this.donutDataLabels.total.showAlways) {
|
||||
elPath.node.addEventListener(
|
||||
"mouseenter",
|
||||
this.printDataLabelsInner.bind(this, elPath.node, dataLabels)
|
||||
);
|
||||
elPath.node.addEventListener(
|
||||
"mousedown",
|
||||
this.printDataLabelsInner.bind(this, elPath.node, dataLabels)
|
||||
);
|
||||
}
|
||||
}
|
||||
// This function can be used for other circle charts too
|
||||
/**
|
||||
* @param {any} el
|
||||
* @param {Record<string, any>} opts
|
||||
*/
|
||||
animatePaths(el, opts) {
|
||||
const w = this.w;
|
||||
const me = this;
|
||||
let angle = opts.endAngle < opts.startAngle ? this.fullAngle + opts.endAngle - opts.startAngle : opts.endAngle - opts.startAngle;
|
||||
let prevAngle = angle;
|
||||
let fromStartAngle = opts.startAngle;
|
||||
const toStartAngle = opts.startAngle;
|
||||
if (opts.prevStartAngle !== void 0 && opts.prevEndAngle !== void 0) {
|
||||
fromStartAngle = opts.prevEndAngle;
|
||||
prevAngle = opts.prevEndAngle < opts.prevStartAngle ? this.fullAngle + opts.prevEndAngle - opts.prevStartAngle : opts.prevEndAngle - opts.prevStartAngle;
|
||||
}
|
||||
if (opts.i === w.config.series.length - 1) {
|
||||
if (angle + toStartAngle > this.fullAngle) {
|
||||
opts.endAngle = opts.endAngle - (angle + toStartAngle);
|
||||
} else if (angle + toStartAngle < this.fullAngle) {
|
||||
opts.endAngle = opts.endAngle + (this.fullAngle - (angle + toStartAngle));
|
||||
}
|
||||
}
|
||||
if (angle === this.fullAngle) angle = this.fullAngle - 0.01;
|
||||
me.animateArc(el, fromStartAngle, toStartAngle, angle, prevAngle, opts);
|
||||
}
|
||||
/**
|
||||
* @param {any} el
|
||||
* @param {number} fromStartAngle
|
||||
* @param {number} toStartAngle
|
||||
* @param {number} angle
|
||||
* @param {number} prevAngle
|
||||
* @param {Record<string, any>} opts
|
||||
*/
|
||||
animateArc(el, fromStartAngle, toStartAngle, angle, prevAngle, opts) {
|
||||
const me = this;
|
||||
const w = this.w;
|
||||
const animations = new Animations(this.w);
|
||||
const size = opts.size;
|
||||
let path;
|
||||
if (isNaN(fromStartAngle) || isNaN(prevAngle)) {
|
||||
fromStartAngle = toStartAngle;
|
||||
prevAngle = angle;
|
||||
opts.dur = 0;
|
||||
}
|
||||
let currAngle = angle;
|
||||
let startAngle = toStartAngle;
|
||||
const fromAngle = fromStartAngle < toStartAngle ? this.fullAngle + fromStartAngle - toStartAngle : fromStartAngle - toStartAngle;
|
||||
if (w.globals.dataChanged && opts.shouldSetPrevPaths) {
|
||||
if (opts.prevEndAngle) {
|
||||
path = me.getPiePath({
|
||||
me,
|
||||
startAngle: opts.prevStartAngle,
|
||||
angle: opts.prevEndAngle < opts.prevStartAngle ? this.fullAngle + opts.prevEndAngle - opts.prevStartAngle : opts.prevEndAngle - opts.prevStartAngle,
|
||||
size
|
||||
});
|
||||
el.attr({ d: path });
|
||||
}
|
||||
}
|
||||
if (opts.dur !== 0) {
|
||||
el.animate(opts.dur, opts.animBeginArr[opts.i]).after(
|
||||
/** @this {any} */
|
||||
function() {
|
||||
if (me.chartType === "pie" || me.chartType === "donut" || me.chartType === "polarArea") {
|
||||
this.animate(
|
||||
w.config.chart.animations.dynamicAnimation.speed
|
||||
).attr({
|
||||
"stroke-width": me.strokeWidth
|
||||
});
|
||||
}
|
||||
if (opts.i === w.config.series.length - 1) {
|
||||
animations.animationCompleted(el);
|
||||
}
|
||||
}
|
||||
).during((pos) => {
|
||||
currAngle = fromAngle + (angle - fromAngle) * pos;
|
||||
if (opts.animateStartingPos) {
|
||||
currAngle = prevAngle + (angle - prevAngle) * pos;
|
||||
startAngle = fromStartAngle - prevAngle + (toStartAngle - (fromStartAngle - prevAngle)) * pos;
|
||||
}
|
||||
path = me.getPiePath({
|
||||
me,
|
||||
startAngle,
|
||||
angle: currAngle,
|
||||
size
|
||||
});
|
||||
el.node.setAttribute("data:pathOrig", path);
|
||||
el.attr({
|
||||
d: path
|
||||
});
|
||||
});
|
||||
} else {
|
||||
path = me.getPiePath({
|
||||
me,
|
||||
startAngle,
|
||||
angle,
|
||||
size
|
||||
});
|
||||
if (!opts.isTrack) {
|
||||
w.globals.animationEnded = true;
|
||||
}
|
||||
el.node.setAttribute("data:pathOrig", path);
|
||||
el.attr({
|
||||
d: path,
|
||||
"stroke-width": me.strokeWidth
|
||||
});
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param {number} i
|
||||
*/
|
||||
pieClicked(i) {
|
||||
const w = this.w;
|
||||
const me = this;
|
||||
const size = me.sliceSizes[i] + (w.config.plotOptions.pie.expandOnClick ? 4 : 0);
|
||||
const elPath = w.dom.Paper.findOne(
|
||||
`.apexcharts-${me.chartType.toLowerCase()}-slice-${i}`
|
||||
);
|
||||
if (elPath.attr("data:pieClicked") === "true") {
|
||||
elPath.attr({
|
||||
"data:pieClicked": "false"
|
||||
});
|
||||
this.revertDataLabelsInner();
|
||||
const origPath = elPath.attr("data:pathOrig");
|
||||
elPath.attr({
|
||||
d: origPath
|
||||
});
|
||||
return;
|
||||
} else {
|
||||
const allEls = w.dom.baseEl.getElementsByClassName("apexcharts-pie-area");
|
||||
Array.prototype.forEach.call(allEls, (pieSlice) => {
|
||||
pieSlice.setAttribute("data:pieClicked", "false");
|
||||
const origPath = pieSlice.getAttribute("data:pathOrig");
|
||||
if (origPath) {
|
||||
pieSlice.setAttribute("d", origPath);
|
||||
}
|
||||
});
|
||||
w.interact.capturedDataPointIndex = i;
|
||||
elPath.attr("data:pieClicked", "true");
|
||||
}
|
||||
const startAngle = parseInt(elPath.attr("data:startAngle"), 10);
|
||||
const angle = parseInt(elPath.attr("data:angle"), 10);
|
||||
const path = me.getPiePath({
|
||||
me,
|
||||
startAngle,
|
||||
angle,
|
||||
size
|
||||
});
|
||||
if (angle === 360) return;
|
||||
elPath.plot(path);
|
||||
}
|
||||
/**
|
||||
* @param {number} prevStartAngle
|
||||
* @param {number} prevEndAngle
|
||||
*/
|
||||
getChangedPath(prevStartAngle, prevEndAngle) {
|
||||
let path = "";
|
||||
if (this.dynamicAnim && this.w.globals.dataChanged) {
|
||||
path = this.getPiePath({
|
||||
me: this,
|
||||
startAngle: prevStartAngle,
|
||||
angle: prevEndAngle - prevStartAngle,
|
||||
// @ts-ignore — size is set dynamically during draw()
|
||||
size: this.size
|
||||
});
|
||||
}
|
||||
return path;
|
||||
}
|
||||
/** @param {{me: any, startAngle: any, angle: any, size: any}} opts */
|
||||
getPiePath({ me, startAngle, angle, size }) {
|
||||
let path;
|
||||
const graphics = new Graphics(this.w);
|
||||
const startDeg = startAngle;
|
||||
const startRadians = Math.PI * (startDeg - 90) / 180;
|
||||
let endDeg = angle + startAngle;
|
||||
if (Math.ceil(endDeg) >= this.fullAngle + this.w.config.plotOptions.pie.startAngle % this.fullAngle) {
|
||||
endDeg = this.fullAngle + this.w.config.plotOptions.pie.startAngle % this.fullAngle - 0.01;
|
||||
}
|
||||
if (Math.ceil(endDeg) > this.fullAngle) endDeg -= this.fullAngle;
|
||||
const endRadians = Math.PI * (endDeg - 90) / 180;
|
||||
const x1 = me.centerX + size * Math.cos(startRadians);
|
||||
const y1 = me.centerY + size * Math.sin(startRadians);
|
||||
const x2 = me.centerX + size * Math.cos(endRadians);
|
||||
const y2 = me.centerY + size * Math.sin(endRadians);
|
||||
const startInner = Utils.polarToCartesian(
|
||||
me.centerX,
|
||||
me.centerY,
|
||||
me.donutSize,
|
||||
endDeg
|
||||
);
|
||||
const endInner = Utils.polarToCartesian(
|
||||
me.centerX,
|
||||
me.centerY,
|
||||
me.donutSize,
|
||||
startDeg
|
||||
);
|
||||
const largeArc = angle > 180 ? 1 : 0;
|
||||
const pathBeginning = ["M", x1, y1, "A", size, size, 0, largeArc, 1, x2, y2];
|
||||
if (me.chartType === "donut") {
|
||||
path = [
|
||||
...pathBeginning,
|
||||
"L",
|
||||
startInner.x,
|
||||
startInner.y,
|
||||
"A",
|
||||
me.donutSize,
|
||||
me.donutSize,
|
||||
0,
|
||||
largeArc,
|
||||
0,
|
||||
endInner.x,
|
||||
endInner.y,
|
||||
"L",
|
||||
x1,
|
||||
y1,
|
||||
"z"
|
||||
].join(" ");
|
||||
} else if (me.chartType === "pie" || me.chartType === "polarArea") {
|
||||
path = [...pathBeginning, "L", me.centerX, me.centerY, "L", x1, y1].join(
|
||||
" "
|
||||
);
|
||||
} else {
|
||||
path = [...pathBeginning].join(" ");
|
||||
}
|
||||
return graphics.roundPathCorners(path, this.strokeWidth * 2);
|
||||
}
|
||||
/**
|
||||
* @param {any} parent
|
||||
*/
|
||||
drawPolarElements(parent) {
|
||||
const w = this.w;
|
||||
const scale = new Scales(this.w);
|
||||
const graphics = new Graphics(this.w);
|
||||
const helpers = new CircularChartsHelpers(this.w);
|
||||
const gCircles = graphics.group();
|
||||
const gYAxis = graphics.group();
|
||||
const yScale = scale.niceScale(0, Math.ceil(this.maxY), 0);
|
||||
const yTexts = yScale.result.reverse();
|
||||
const len = yScale.result.length;
|
||||
this.maxY = yScale.niceMax;
|
||||
let circleSize = w.globals.radialSize;
|
||||
const diff = circleSize / (len - 1);
|
||||
for (let i = 0; i < len - 1; i++) {
|
||||
const circle = graphics.drawCircle(circleSize);
|
||||
circle.attr({
|
||||
cx: this.centerX,
|
||||
cy: this.centerY,
|
||||
fill: "none",
|
||||
"stroke-width": w.config.plotOptions.polarArea.rings.strokeWidth,
|
||||
stroke: w.config.plotOptions.polarArea.rings.strokeColor
|
||||
});
|
||||
if (w.config.yaxis[0].show) {
|
||||
const yLabel = helpers.drawYAxisTexts(
|
||||
this.centerX,
|
||||
this.centerY - circleSize + parseInt(w.config.yaxis[0].labels.style.fontSize, 10) / 2,
|
||||
i,
|
||||
yTexts[i]
|
||||
);
|
||||
gYAxis.add(yLabel);
|
||||
}
|
||||
gCircles.add(circle);
|
||||
circleSize = circleSize - diff;
|
||||
}
|
||||
this.drawSpokes(parent);
|
||||
parent.add(gCircles);
|
||||
parent.add(gYAxis);
|
||||
}
|
||||
/**
|
||||
* @param {any} dataLabelsGroup
|
||||
* @param {Record<string, any>} dataLabelsConfig
|
||||
* @param {Record<string, any>} opts
|
||||
*/
|
||||
renderInnerDataLabels(dataLabelsGroup, dataLabelsConfig, opts) {
|
||||
const w = this.w;
|
||||
const graphics = new Graphics(this.w);
|
||||
const showTotal = dataLabelsConfig.total.show;
|
||||
dataLabelsGroup.node.innerHTML = "";
|
||||
dataLabelsGroup.node.style.opacity = opts.opacity;
|
||||
const x = opts.centerX;
|
||||
const y = !this.donutDataLabels.total.label ? opts.centerY - opts.centerY / 6 : opts.centerY;
|
||||
let labelColor, valueColor;
|
||||
if (dataLabelsConfig.name.color === void 0) {
|
||||
labelColor = w.globals.colors[0];
|
||||
} else {
|
||||
labelColor = dataLabelsConfig.name.color;
|
||||
}
|
||||
let labelFontSize = dataLabelsConfig.name.fontSize;
|
||||
let labelFontFamily = dataLabelsConfig.name.fontFamily;
|
||||
let labelFontWeight = dataLabelsConfig.name.fontWeight;
|
||||
if (dataLabelsConfig.value.color === void 0) {
|
||||
valueColor = w.config.chart.foreColor;
|
||||
} else {
|
||||
valueColor = dataLabelsConfig.value.color;
|
||||
}
|
||||
const lbFormatter = dataLabelsConfig.value.formatter;
|
||||
let val = "";
|
||||
let name = "";
|
||||
if (showTotal) {
|
||||
labelColor = dataLabelsConfig.total.color;
|
||||
labelFontSize = dataLabelsConfig.total.fontSize;
|
||||
labelFontFamily = dataLabelsConfig.total.fontFamily;
|
||||
labelFontWeight = dataLabelsConfig.total.fontWeight;
|
||||
name = !this.donutDataLabels.total.label ? "" : dataLabelsConfig.total.label;
|
||||
val = dataLabelsConfig.total.formatter(w);
|
||||
} else {
|
||||
if (w.seriesData.series.length === 1) {
|
||||
val = lbFormatter(w.seriesData.series[0], w);
|
||||
name = w.seriesData.seriesNames[0];
|
||||
}
|
||||
}
|
||||
if (name) {
|
||||
name = dataLabelsConfig.name.formatter(
|
||||
name,
|
||||
dataLabelsConfig.total.show,
|
||||
w
|
||||
);
|
||||
}
|
||||
if (dataLabelsConfig.name.show) {
|
||||
const elLabel = graphics.drawText({
|
||||
x,
|
||||
y: y + parseFloat(dataLabelsConfig.name.offsetY),
|
||||
text: name,
|
||||
textAnchor: "middle",
|
||||
foreColor: labelColor,
|
||||
fontSize: labelFontSize,
|
||||
fontWeight: labelFontWeight,
|
||||
fontFamily: labelFontFamily
|
||||
});
|
||||
elLabel.node.classList.add("apexcharts-datalabel-label");
|
||||
dataLabelsGroup.add(elLabel);
|
||||
}
|
||||
if (dataLabelsConfig.value.show) {
|
||||
const valOffset = dataLabelsConfig.name.show ? parseFloat(dataLabelsConfig.value.offsetY) + 16 : dataLabelsConfig.value.offsetY;
|
||||
const elValue = graphics.drawText({
|
||||
x,
|
||||
y: y + valOffset,
|
||||
text: val,
|
||||
textAnchor: "middle",
|
||||
foreColor: valueColor,
|
||||
fontWeight: dataLabelsConfig.value.fontWeight,
|
||||
fontSize: dataLabelsConfig.value.fontSize,
|
||||
fontFamily: dataLabelsConfig.value.fontFamily
|
||||
});
|
||||
elValue.node.classList.add("apexcharts-datalabel-value");
|
||||
dataLabelsGroup.add(elValue);
|
||||
}
|
||||
return dataLabelsGroup;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param {string} name - The name of the series
|
||||
* @param {string} val - The value of that series
|
||||
* @param {any} el - Optional el (indicates which series was hovered/clicked). If this param is not present, means we need to show total
|
||||
* @param {Record<string, any>} labelsConfig
|
||||
*/
|
||||
printInnerLabels(labelsConfig, name, val, el) {
|
||||
const w = this.w;
|
||||
let labelColor;
|
||||
if (el) {
|
||||
if (labelsConfig.name.color === void 0) {
|
||||
labelColor = w.globals.colors[parseInt(el.parentNode.getAttribute("rel"), 10) - 1];
|
||||
} else {
|
||||
labelColor = labelsConfig.name.color;
|
||||
}
|
||||
} else {
|
||||
if (w.seriesData.series.length > 1 && labelsConfig.total.show) {
|
||||
labelColor = labelsConfig.total.color;
|
||||
}
|
||||
}
|
||||
const elLabel = w.dom.baseEl.querySelector(".apexcharts-datalabel-label");
|
||||
const elValue = w.dom.baseEl.querySelector(".apexcharts-datalabel-value");
|
||||
const lbFormatter = labelsConfig.value.formatter;
|
||||
val = lbFormatter(val, w);
|
||||
if (!el && typeof labelsConfig.total.formatter === "function") {
|
||||
val = labelsConfig.total.formatter(w);
|
||||
}
|
||||
const isTotal = name === labelsConfig.total.label;
|
||||
name = !this.donutDataLabels.total.label ? "" : labelsConfig.name.formatter(name, isTotal, w);
|
||||
if (elLabel !== null) {
|
||||
elLabel.textContent = name;
|
||||
}
|
||||
if (elValue !== null) {
|
||||
elValue.textContent = val;
|
||||
}
|
||||
if (elLabel !== null) {
|
||||
const elLabelEl = (
|
||||
/** @type {HTMLElement} */
|
||||
elLabel
|
||||
);
|
||||
elLabelEl.style.fill = labelColor;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param {any} el
|
||||
* @param {Record<string, any>} dataLabelsConfig
|
||||
*/
|
||||
printDataLabelsInner(el, dataLabelsConfig) {
|
||||
const w = this.w;
|
||||
const val = el.getAttribute("data:value");
|
||||
const name = w.seriesData.seriesNames[parseInt(el.parentNode.getAttribute("rel"), 10) - 1];
|
||||
if (w.seriesData.series.length > 1) {
|
||||
this.printInnerLabels(dataLabelsConfig, name, val, el);
|
||||
}
|
||||
const dataLabelsGroup = w.dom.baseEl.querySelector(
|
||||
".apexcharts-datalabels-group"
|
||||
);
|
||||
if (dataLabelsGroup !== null) {
|
||||
const dataLabelsGroupEl = (
|
||||
/** @type {HTMLElement} */
|
||||
dataLabelsGroup
|
||||
);
|
||||
dataLabelsGroupEl.style.opacity = "1";
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param {any} parent
|
||||
*/
|
||||
drawSpokes(parent) {
|
||||
const w = this.w;
|
||||
const graphics = new Graphics(this.w);
|
||||
const spokeConfig = w.config.plotOptions.polarArea.spokes;
|
||||
if (spokeConfig.strokeWidth === 0) return;
|
||||
const spokes = [];
|
||||
const angleDivision = 360 / w.seriesData.series.length;
|
||||
for (let i = 0; i < w.seriesData.series.length; i++) {
|
||||
spokes.push(
|
||||
Utils.polarToCartesian(
|
||||
this.centerX,
|
||||
this.centerY,
|
||||
w.globals.radialSize,
|
||||
w.config.plotOptions.pie.startAngle + angleDivision * i
|
||||
)
|
||||
);
|
||||
}
|
||||
spokes.forEach((p, i) => {
|
||||
const line = graphics.drawLine(
|
||||
p.x,
|
||||
p.y,
|
||||
this.centerX,
|
||||
this.centerY,
|
||||
Array.isArray(spokeConfig.connectorColors) ? spokeConfig.connectorColors[i] : spokeConfig.connectorColors
|
||||
);
|
||||
parent.add(line);
|
||||
});
|
||||
}
|
||||
revertDataLabelsInner() {
|
||||
const w = this.w;
|
||||
if (this.donutDataLabels.show) {
|
||||
const dataLabelsGroup = w.dom.Paper.findOne(
|
||||
`.apexcharts-datalabels-group`
|
||||
);
|
||||
const dataLabels = this.renderInnerDataLabels(
|
||||
dataLabelsGroup,
|
||||
this.donutDataLabels,
|
||||
{
|
||||
hollowSize: this.donutSize,
|
||||
centerX: this.centerX,
|
||||
centerY: this.centerY,
|
||||
opacity: this.donutDataLabels.show
|
||||
}
|
||||
);
|
||||
const elPie = w.dom.Paper.findOne(
|
||||
".apexcharts-radialbar, .apexcharts-pie"
|
||||
);
|
||||
elPie.add(dataLabels);
|
||||
}
|
||||
}
|
||||
}
|
||||
_core__default.use({
|
||||
pie: Pie,
|
||||
donut: Pie,
|
||||
polarArea: Pie
|
||||
});
|
||||
export {
|
||||
default2 as default
|
||||
};
|
||||
5
storage/public/dist/libs/apexcharts/dist/radar.common.js
vendored
Normal file
5
storage/public/dist/libs/apexcharts/dist/radar.common.js
vendored
Normal file
File diff suppressed because one or more lines are too long
488
storage/public/dist/libs/apexcharts/dist/radar.esm.js
vendored
Normal file
488
storage/public/dist/libs/apexcharts/dist/radar.esm.js
vendored
Normal file
|
|
@ -0,0 +1,488 @@
|
|||
var __defProp = Object.defineProperty;
|
||||
var __defProps = Object.defineProperties;
|
||||
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
||||
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
||||
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
||||
var __spreadValues = (a, b) => {
|
||||
for (var prop in b || (b = {}))
|
||||
if (__hasOwnProp.call(b, prop))
|
||||
__defNormalProp(a, prop, b[prop]);
|
||||
if (__getOwnPropSymbols)
|
||||
for (var prop of __getOwnPropSymbols(b)) {
|
||||
if (__propIsEnum.call(b, prop))
|
||||
__defNormalProp(a, prop, b[prop]);
|
||||
}
|
||||
return a;
|
||||
};
|
||||
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
||||
/*!
|
||||
* ApexCharts v5.10.4
|
||||
* (c) 2018-2026 ApexCharts
|
||||
*/
|
||||
import * as _core from "apexcharts/core";
|
||||
import _core__default from "apexcharts/core";
|
||||
import { default as default2 } from "apexcharts/core";
|
||||
const Fill = _core.__apex_Fill;
|
||||
const Graphics = _core.__apex_Graphics;
|
||||
const Markers = _core.__apex_Markers;
|
||||
const DataLabels = _core.__apex_DataLabels;
|
||||
const Filters = _core.__apex_Filters;
|
||||
const Utils = _core.__apex_Utils;
|
||||
class CircularChartsHelpers {
|
||||
/**
|
||||
* @param {import('../../../types/internal').ChartStateW} w
|
||||
*/
|
||||
constructor(w) {
|
||||
this.w = w;
|
||||
}
|
||||
/**
|
||||
* @param {number} x
|
||||
* @param {number} y
|
||||
* @param {number} i
|
||||
* @param {string | number} text
|
||||
*/
|
||||
drawYAxisTexts(x, y, i, text) {
|
||||
const w = this.w;
|
||||
const yaxisConfig = w.config.yaxis[0];
|
||||
const formatter = w.formatters.yLabelFormatters[0];
|
||||
const graphics = new Graphics(this.w);
|
||||
const yaxisLabel = graphics.drawText({
|
||||
x: x + yaxisConfig.labels.offsetX,
|
||||
y: y + yaxisConfig.labels.offsetY,
|
||||
text: formatter(text, i),
|
||||
textAnchor: "middle",
|
||||
fontSize: yaxisConfig.labels.style.fontSize,
|
||||
fontFamily: yaxisConfig.labels.style.fontFamily,
|
||||
foreColor: Array.isArray(yaxisConfig.labels.style.colors) ? yaxisConfig.labels.style.colors[i] : yaxisConfig.labels.style.colors
|
||||
});
|
||||
return yaxisLabel;
|
||||
}
|
||||
}
|
||||
const CoreUtils = _core.__apex_CoreUtils;
|
||||
class Radar {
|
||||
/**
|
||||
* @param {import('../types/internal').ChartStateW} w
|
||||
* @param {import('../types/internal').ChartContext} ctx
|
||||
*/
|
||||
constructor(w, ctx) {
|
||||
this.ctx = ctx;
|
||||
this.w = w;
|
||||
this.chartType = this.w.config.chart.type;
|
||||
this.initialAnim = this.w.config.chart.animations.enabled;
|
||||
this.dynamicAnim = this.initialAnim && this.w.config.chart.animations.dynamicAnimation.enabled;
|
||||
this.animDur = 0;
|
||||
this.graphics = new Graphics(this.w);
|
||||
this.lineColorArr = w.globals.stroke.colors !== void 0 ? w.globals.stroke.colors : w.globals.colors;
|
||||
this.defaultSize = w.globals.svgHeight < w.globals.svgWidth ? w.layout.gridHeight : w.layout.gridWidth;
|
||||
this.isLog = w.config.yaxis[0].logarithmic;
|
||||
this.logBase = w.config.yaxis[0].logBase;
|
||||
this.coreUtils = new CoreUtils(this.w);
|
||||
this.maxValue = this.isLog ? this.coreUtils.getLogVal(this.logBase, w.globals.maxY, 0) : w.globals.maxY;
|
||||
this.minValue = this.isLog ? this.coreUtils.getLogVal(this.logBase, this.w.globals.minY, 0) : w.globals.minY;
|
||||
this.polygons = w.config.plotOptions.radar.polygons;
|
||||
this.strokeWidth = w.config.stroke.show ? w.config.stroke.width : 0;
|
||||
this.size = this.defaultSize / 2.1 - this.strokeWidth - w.config.chart.dropShadow.blur;
|
||||
if (w.config.xaxis.labels.show) {
|
||||
this.size = this.size - w.layout.xAxisLabelsWidth / 1.75;
|
||||
}
|
||||
if (w.config.plotOptions.radar.size !== void 0) {
|
||||
this.size = w.config.plotOptions.radar.size;
|
||||
}
|
||||
this.dataRadiusOfPercent = /** @type {any} */
|
||||
[];
|
||||
this.dataRadius = /** @type {any} */
|
||||
[];
|
||||
this.angleArr = /** @type {any} */
|
||||
[];
|
||||
this.dataPointsLen = 0;
|
||||
this.disAngle = 0;
|
||||
this.yaxisLabelsTextsPos = [];
|
||||
}
|
||||
/**
|
||||
* @param {any[]} series
|
||||
*/
|
||||
draw(series) {
|
||||
const w = this.w;
|
||||
const fill = new Fill(this.w);
|
||||
const allSeries = [];
|
||||
const dataLabels = new DataLabels(this.w, this.ctx);
|
||||
if (series.length) {
|
||||
this.dataPointsLen = series[w.globals.maxValsInArrayIndex].length;
|
||||
}
|
||||
this.disAngle = Math.PI * 2 / this.dataPointsLen;
|
||||
const halfW = w.layout.gridWidth / 2;
|
||||
const halfH = w.layout.gridHeight / 2;
|
||||
const translateX = halfW + w.config.plotOptions.radar.offsetX;
|
||||
const translateY = halfH + w.config.plotOptions.radar.offsetY;
|
||||
const ret = this.graphics.group({
|
||||
class: "apexcharts-radar-series apexcharts-plot-series",
|
||||
transform: `translate(${translateX || 0}, ${translateY || 0})`
|
||||
});
|
||||
let dataPointsPos = [];
|
||||
let elPointsMain = null;
|
||||
let elDataPointsMain = null;
|
||||
this.yaxisLabels = this.graphics.group({
|
||||
class: "apexcharts-yaxis"
|
||||
});
|
||||
series.forEach((s, i) => {
|
||||
const longestSeries = s.length === w.globals.dataPoints;
|
||||
const elSeries = this.graphics.group().attr({
|
||||
class: `apexcharts-series`,
|
||||
"data:longestSeries": longestSeries,
|
||||
seriesName: Utils.escapeString(w.seriesData.seriesNames[i]),
|
||||
rel: i + 1,
|
||||
"data:realIndex": i
|
||||
});
|
||||
this.dataRadiusOfPercent[i] = [];
|
||||
this.dataRadius[i] = [];
|
||||
this.angleArr[i] = [];
|
||||
s.forEach((dv, j) => {
|
||||
const range = Math.abs(this.maxValue - this.minValue);
|
||||
dv = dv - this.minValue;
|
||||
if (this.isLog) {
|
||||
dv = this.coreUtils.getLogVal(this.logBase, dv, 0);
|
||||
}
|
||||
this.dataRadiusOfPercent[i][j] = dv / range;
|
||||
this.dataRadius[i][j] = this.dataRadiusOfPercent[i][j] * this.size;
|
||||
this.angleArr[i][j] = j * this.disAngle;
|
||||
});
|
||||
dataPointsPos = this.getDataPointsPos(
|
||||
this.dataRadius[i],
|
||||
this.angleArr[i]
|
||||
);
|
||||
const paths = this.createPaths(dataPointsPos, {
|
||||
x: 0,
|
||||
y: 0
|
||||
});
|
||||
elPointsMain = this.graphics.group({
|
||||
class: "apexcharts-series-markers-wrap apexcharts-element-hidden"
|
||||
});
|
||||
elDataPointsMain = this.graphics.group({
|
||||
class: `apexcharts-datalabels`,
|
||||
"data:realIndex": i
|
||||
});
|
||||
w.globals.delayedElements.push({
|
||||
el: elPointsMain.node,
|
||||
index: i
|
||||
});
|
||||
const defaultRenderedPathOptions = {
|
||||
i,
|
||||
realIndex: i,
|
||||
animationDelay: i,
|
||||
initialSpeed: w.config.chart.animations.speed,
|
||||
dataChangeSpeed: w.config.chart.animations.dynamicAnimation.speed,
|
||||
className: `apexcharts-radar`,
|
||||
shouldClipToGrid: false,
|
||||
bindEventsOnPaths: false,
|
||||
stroke: w.globals.stroke.colors[i],
|
||||
strokeLineCap: w.config.stroke.lineCap
|
||||
};
|
||||
let pathFrom = null;
|
||||
if (w.globals.previousPaths.length > 0) {
|
||||
pathFrom = this.getPreviousPath(i);
|
||||
}
|
||||
for (let p = 0; p < paths.linePathsTo.length; p++) {
|
||||
const renderedLinePath = this.graphics.renderPaths(__spreadProps(__spreadValues({}, defaultRenderedPathOptions), {
|
||||
pathFrom: pathFrom === null ? paths.linePathsFrom[p] : pathFrom,
|
||||
pathTo: paths.linePathsTo[p],
|
||||
strokeWidth: Array.isArray(this.strokeWidth) ? this.strokeWidth[i] : this.strokeWidth,
|
||||
fill: "none",
|
||||
drawShadow: false
|
||||
}));
|
||||
elSeries.add(renderedLinePath);
|
||||
const pathFill = fill.fillPath({
|
||||
seriesNumber: i
|
||||
});
|
||||
const renderedAreaPath = this.graphics.renderPaths(__spreadProps(__spreadValues({}, defaultRenderedPathOptions), {
|
||||
pathFrom: pathFrom === null ? paths.areaPathsFrom[p] : pathFrom,
|
||||
pathTo: paths.areaPathsTo[p],
|
||||
strokeWidth: 0,
|
||||
fill: pathFill,
|
||||
drawShadow: false
|
||||
}));
|
||||
if (w.config.chart.dropShadow.enabled) {
|
||||
const filters = new Filters(this.w);
|
||||
const shadow = w.config.chart.dropShadow;
|
||||
filters.dropShadow(
|
||||
renderedAreaPath,
|
||||
Object.assign({}, shadow, { noUserSpaceOnUse: true }),
|
||||
i
|
||||
);
|
||||
}
|
||||
elSeries.add(renderedAreaPath);
|
||||
}
|
||||
s.forEach((sj, j) => {
|
||||
const markers = new Markers(this.w, this.ctx);
|
||||
const opts = markers.getMarkerConfig({
|
||||
cssClass: "apexcharts-marker",
|
||||
seriesIndex: i,
|
||||
dataPointIndex: j
|
||||
});
|
||||
const point = this.graphics.drawMarker(
|
||||
dataPointsPos[j].x,
|
||||
dataPointsPos[j].y,
|
||||
opts
|
||||
);
|
||||
point.attr("rel", j);
|
||||
point.attr("j", j);
|
||||
point.attr("index", i);
|
||||
point.node.setAttribute("default-marker-size", opts.pSize);
|
||||
const elPointsWrap = this.graphics.group({
|
||||
class: "apexcharts-series-markers"
|
||||
});
|
||||
if (elPointsWrap) {
|
||||
elPointsWrap.add(point);
|
||||
}
|
||||
elPointsMain.add(elPointsWrap);
|
||||
elSeries.add(elPointsMain);
|
||||
const dataLabelsConfig = w.config.dataLabels;
|
||||
if (dataLabelsConfig.enabled) {
|
||||
const text = dataLabelsConfig.formatter(w.seriesData.series[i][j], {
|
||||
seriesIndex: i,
|
||||
dataPointIndex: j,
|
||||
w
|
||||
});
|
||||
dataLabels.plotDataLabelsText({
|
||||
x: dataPointsPos[j].x,
|
||||
y: dataPointsPos[j].y,
|
||||
text,
|
||||
textAnchor: "middle",
|
||||
i,
|
||||
j: i,
|
||||
parent: elDataPointsMain,
|
||||
offsetCorrection: false,
|
||||
dataLabelsConfig: __spreadValues({}, dataLabelsConfig)
|
||||
});
|
||||
}
|
||||
elSeries.add(elDataPointsMain);
|
||||
});
|
||||
allSeries.push(elSeries);
|
||||
});
|
||||
this.drawPolygons({
|
||||
parent: ret
|
||||
});
|
||||
if (w.config.xaxis.labels.show) {
|
||||
const xaxisTexts = this.drawXAxisTexts();
|
||||
ret.add(xaxisTexts);
|
||||
}
|
||||
allSeries.forEach((elS) => {
|
||||
ret.add(elS);
|
||||
});
|
||||
ret.add(this.yaxisLabels);
|
||||
return ret;
|
||||
}
|
||||
/**
|
||||
* @param {Record<string, any>} opts
|
||||
*/
|
||||
drawPolygons(opts) {
|
||||
const w = this.w;
|
||||
const { parent } = opts;
|
||||
const helpers = new CircularChartsHelpers(this.w);
|
||||
const yaxisTexts = w.globals.yAxisScale[0].result.reverse();
|
||||
const layers = yaxisTexts.length;
|
||||
const radiusSizes = [];
|
||||
const layerDis = this.size / (layers - 1);
|
||||
for (let i = 0; i < layers; i++) {
|
||||
radiusSizes[i] = layerDis * i;
|
||||
}
|
||||
radiusSizes.reverse();
|
||||
const polygonStrings = [];
|
||||
const lines = [];
|
||||
radiusSizes.forEach((radiusSize, r) => {
|
||||
const polygon = Utils.getPolygonPos(radiusSize, this.dataPointsLen);
|
||||
let string = "";
|
||||
polygon.forEach((p, i) => {
|
||||
if (r === 0) {
|
||||
const line = this.graphics.drawLine(
|
||||
p.x,
|
||||
p.y,
|
||||
0,
|
||||
0,
|
||||
Array.isArray(this.polygons.connectorColors) ? this.polygons.connectorColors[i] : this.polygons.connectorColors
|
||||
);
|
||||
lines.push(line);
|
||||
}
|
||||
if (i === 0) {
|
||||
this.yaxisLabelsTextsPos.push({
|
||||
x: p.x,
|
||||
y: p.y
|
||||
});
|
||||
}
|
||||
string += p.x + "," + p.y + " ";
|
||||
});
|
||||
polygonStrings.push(string);
|
||||
});
|
||||
polygonStrings.forEach((p, i) => {
|
||||
const strokeColors = this.polygons.strokeColors;
|
||||
const strokeWidth = this.polygons.strokeWidth;
|
||||
const polygon = this.graphics.drawPolygon(
|
||||
p,
|
||||
Array.isArray(strokeColors) ? strokeColors[i] : strokeColors,
|
||||
Array.isArray(strokeWidth) ? strokeWidth[i] : strokeWidth,
|
||||
w.globals.radarPolygons.fill.colors[i]
|
||||
);
|
||||
parent.add(polygon);
|
||||
});
|
||||
lines.forEach((l) => {
|
||||
parent.add(l);
|
||||
});
|
||||
if (w.config.yaxis[0].show) {
|
||||
this.yaxisLabelsTextsPos.forEach(
|
||||
(p, i) => {
|
||||
const yText = helpers.drawYAxisTexts(p.x, p.y, i, yaxisTexts[i]);
|
||||
this.yaxisLabels.add(yText);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
drawXAxisTexts() {
|
||||
const w = this.w;
|
||||
const xaxisLabelsConfig = w.config.xaxis.labels;
|
||||
const elXAxisWrap = this.graphics.group({
|
||||
class: "apexcharts-xaxis"
|
||||
});
|
||||
const polygonPos = Utils.getPolygonPos(this.size, this.dataPointsLen);
|
||||
w.labelData.labels.forEach((label, i) => {
|
||||
const formatter = w.config.xaxis.labels.formatter;
|
||||
const dataLabels = new DataLabels(this.w, this.ctx);
|
||||
if (polygonPos[i]) {
|
||||
const textPos = this.getTextPos(polygonPos[i], this.size);
|
||||
const text = formatter(label, {
|
||||
seriesIndex: -1,
|
||||
dataPointIndex: i,
|
||||
w
|
||||
});
|
||||
const dataLabelText = dataLabels.plotDataLabelsText({
|
||||
x: textPos.newX,
|
||||
y: textPos.newY,
|
||||
text,
|
||||
textAnchor: textPos.textAnchor,
|
||||
i,
|
||||
j: i,
|
||||
parent: elXAxisWrap,
|
||||
className: "apexcharts-xaxis-label",
|
||||
color: Array.isArray(xaxisLabelsConfig.style.colors) && xaxisLabelsConfig.style.colors[i] ? xaxisLabelsConfig.style.colors[i] : "#a8a8a8",
|
||||
dataLabelsConfig: __spreadValues({
|
||||
textAnchor: textPos.textAnchor,
|
||||
dropShadow: { enabled: false }
|
||||
}, xaxisLabelsConfig),
|
||||
offsetCorrection: false
|
||||
});
|
||||
dataLabelText.on("click", (e) => {
|
||||
if (typeof w.config.chart.events.xAxisLabelClick === "function") {
|
||||
const opts = Object.assign({}, w, {
|
||||
labelIndex: i
|
||||
});
|
||||
w.config.chart.events.xAxisLabelClick(e, this.ctx, opts);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
return elXAxisWrap;
|
||||
}
|
||||
/**
|
||||
* @param {Array<Record<string, any>>} pos
|
||||
* @param {Record<string, any>} origin
|
||||
*/
|
||||
createPaths(pos, origin) {
|
||||
const linePathsTo = [];
|
||||
let linePathsFrom = [];
|
||||
const areaPathsTo = [];
|
||||
let areaPathsFrom = [];
|
||||
if (pos.length) {
|
||||
linePathsFrom = [this.graphics.move(origin.x, origin.y)];
|
||||
areaPathsFrom = [this.graphics.move(origin.x, origin.y)];
|
||||
let linePathTo = this.graphics.move(pos[0].x, pos[0].y);
|
||||
let areaPathTo = this.graphics.move(pos[0].x, pos[0].y);
|
||||
pos.forEach((p, i) => {
|
||||
linePathTo += this.graphics.line(p.x, p.y);
|
||||
areaPathTo += this.graphics.line(p.x, p.y);
|
||||
if (i === pos.length - 1) {
|
||||
linePathTo += "Z";
|
||||
areaPathTo += "Z";
|
||||
}
|
||||
});
|
||||
linePathsTo.push(linePathTo);
|
||||
areaPathsTo.push(areaPathTo);
|
||||
}
|
||||
return {
|
||||
linePathsFrom,
|
||||
linePathsTo,
|
||||
areaPathsFrom,
|
||||
areaPathsTo
|
||||
};
|
||||
}
|
||||
/**
|
||||
* @param {Record<string, any>} pos
|
||||
* @param {number} polygonSize
|
||||
*/
|
||||
getTextPos(pos, polygonSize) {
|
||||
const limit = 10;
|
||||
let textAnchor = "middle";
|
||||
let newX = pos.x;
|
||||
let newY = pos.y;
|
||||
if (Math.abs(pos.x) >= limit) {
|
||||
if (pos.x > 0) {
|
||||
textAnchor = "start";
|
||||
newX += 10;
|
||||
} else if (pos.x < 0) {
|
||||
textAnchor = "end";
|
||||
newX -= 10;
|
||||
}
|
||||
} else {
|
||||
textAnchor = "middle";
|
||||
}
|
||||
if (Math.abs(pos.y) >= polygonSize - limit) {
|
||||
if (pos.y < 0) {
|
||||
newY -= 10;
|
||||
} else if (pos.y > 0) {
|
||||
newY += 10;
|
||||
}
|
||||
}
|
||||
return {
|
||||
textAnchor,
|
||||
newX,
|
||||
newY
|
||||
};
|
||||
}
|
||||
/**
|
||||
* @param {number} realIndex
|
||||
*/
|
||||
getPreviousPath(realIndex) {
|
||||
const w = this.w;
|
||||
let pathFrom = null;
|
||||
for (let pp = 0; pp < w.globals.previousPaths.length; pp++) {
|
||||
const gpp = w.globals.previousPaths[pp];
|
||||
if (gpp.paths.length > 0 && parseInt(gpp.realIndex, 10) === parseInt(String(realIndex), 10)) {
|
||||
if (typeof w.globals.previousPaths[pp].paths[0] !== "undefined") {
|
||||
pathFrom = w.globals.previousPaths[pp].paths[0].d;
|
||||
}
|
||||
}
|
||||
}
|
||||
return pathFrom;
|
||||
}
|
||||
/**
|
||||
* @param {any[]} dataRadiusArr
|
||||
* @param {any[]} angleArr
|
||||
*/
|
||||
getDataPointsPos(dataRadiusArr, angleArr, dataPointsLen = this.dataPointsLen) {
|
||||
dataRadiusArr = dataRadiusArr || [];
|
||||
angleArr = angleArr || [];
|
||||
const dataPointsPosArray = [];
|
||||
for (let j = 0; j < dataPointsLen; j++) {
|
||||
const curPointPos = {};
|
||||
curPointPos.x = dataRadiusArr[j] * Math.sin(angleArr[j]);
|
||||
curPointPos.y = -dataRadiusArr[j] * Math.cos(angleArr[j]);
|
||||
dataPointsPosArray.push(curPointPos);
|
||||
}
|
||||
return dataPointsPosArray;
|
||||
}
|
||||
}
|
||||
_core__default.use({
|
||||
radar: Radar
|
||||
});
|
||||
export {
|
||||
default2 as default
|
||||
};
|
||||
5
storage/public/dist/libs/apexcharts/dist/radialBar.common.js
vendored
Normal file
5
storage/public/dist/libs/apexcharts/dist/radialBar.common.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1300
storage/public/dist/libs/apexcharts/dist/radialBar.esm.js
vendored
Normal file
1300
storage/public/dist/libs/apexcharts/dist/radialBar.esm.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
5
storage/public/dist/libs/apexcharts/dist/rangeArea.common.js
vendored
Normal file
5
storage/public/dist/libs/apexcharts/dist/rangeArea.common.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1197
storage/public/dist/libs/apexcharts/dist/rangeArea.esm.js
vendored
Normal file
1197
storage/public/dist/libs/apexcharts/dist/rangeArea.esm.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
5
storage/public/dist/libs/apexcharts/dist/rangeBar.common.js
vendored
Normal file
5
storage/public/dist/libs/apexcharts/dist/rangeBar.common.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue