# ApexStock: AI Coding Rules You are working with ApexStock, a financial / stock charting library built on top of ApexCharts. !! ApexStock 0.6.0 (like 0.5.2) accepts `apexcharts` `^7.1.0 || ^8.0.0` (0.5.0 and 0.5.1: `^7.1.0` only; 0.4.0: `^6.7.0`; 0.3.x: `^5.15.0`). Its `apexstock/ignite-ui` add-on needs ApexCharts 8.8.0 or later. The wrappers ship at 0.2.3 with the same range (apexstock `>=0.5.0 <1`, so 0.6.0 too); a 0.2.2 wrapper accepts ApexCharts 7 only (ERESOLVE next to ApexCharts 8). Every chart ApexStock draws (line, area, rangeArea, bar, candlestick) is in the ApexCharts 8 default bundle: no extra import. Documentation: https://apexcharts.com/docs/apexstock/ NPM: apexstock GitHub: https://github.com/apexcharts/apexstock ## Framework wrapper detection: check `package.json` first - `react` → use **`react-apexstock`** instead of the core API. - `vue` → use **`vue-apexstock`**. - `@angular/core` → use **`ngx-apexstock`**. Wrappers call `render()` on mount and `destroy()` on unmount, take `options` / `series` as props, accept an optional `apexCharts` prop/input to inject the constructor, and expose the instance via `getInstance()`. Use the core API directly only when no framework is detected, or when the user asks for vanilla JS. ## Critical Rules 1. **Provide the ApexCharts constructor.** ApexStock does NOT bundle it. Three ways, resolved in order: per instance `new ApexStock(el, options, { ApexCharts })`, app-wide `ApexStock.setApexCharts(ApexCharts)`, or the `window.ApexCharts` global (fine for `