|
| 1 | +--- |
| 2 | +name: lightningchart-js |
| 3 | +description: > |
| 4 | + Use LightningChart JS to build accurate high-performance charts, graphs, |
| 5 | + dashboards, and data visualizations in JavaScript or TypeScript. Activate |
| 6 | + when working with LightningChart, LCJS, real-time data, large datasets, |
| 7 | + financial charts, scientific visualization, WebGL charting, or any task that |
| 8 | + adds or modifies charting/data visualization code. |
| 9 | +license: MIT |
| 10 | +compatibility: Requires internet access or locally cached copies of the LightningChart JS LLM documentation indexes. |
| 11 | +metadata: |
| 12 | + author: LightningChart Ltd |
| 13 | + version: "1.0" |
| 14 | + docs: https://lightningchart.com/js-charts/docs/ |
| 15 | +--- |
| 16 | + |
| 17 | +## Purpose |
| 18 | + |
| 19 | +Use this skill to work with LightningChart JS without relying on stale model |
| 20 | +training data. LightningChart JS is a WebGL-accelerated JavaScript charting |
| 21 | +library for high-performance rendering of large datasets, real-time streams, |
| 22 | +financial charts, dashboards, and scientific visualization. |
| 23 | + |
| 24 | +## Mandatory Source Of Truth |
| 25 | + |
| 26 | +Always use these two LLM index files as the source of truth for |
| 27 | +LightningChart JS usage: |
| 28 | + |
| 29 | +- Documentation index: https://lightningchart.com/js-charts/docs/llms.txt |
| 30 | +- API index: https://lightningchart.com/js-charts/api-documentation/v8.3.1/llms.txt |
| 31 | + |
| 32 | +These files are indexes. Read them to find the exact task-specific |
| 33 | +documentation or API reference URL, then read that specific referenced page |
| 34 | +before making assumptions how LCJS API works. |
| 35 | + |
| 36 | +NEVER guess LCJS APIs, method names, constructor options, enum names, |
| 37 | +configuration objects, import paths, or documentation URLs from memory. |
| 38 | + |
| 39 | +## Common Errors |
| 40 | + |
| 41 | +- Version matters. Prefer the URLs and API entries discovered from the supplied |
| 42 | + v8.3.1 API index unless the user or project explicitly targets another LCJS |
| 43 | + version. |
| 44 | +- The correct NPM package is `@lightningchart/lcjs`, NOT `@arction/lcjs`. |
| 45 | + Always install using the latest tag with `npm i @lightningchart/lcjs@latest` |
| 46 | + unless specified otherwise, but do not leave `latest` in `package.json`. |
| 47 | +- License key MUST be supplied to the `lightningChart()` function. Load it from |
| 48 | + an environment variable according to practices utilized in the local |
| 49 | + repository. Setup trial license information in advance like this: |
| 50 | + |
| 51 | +```ts |
| 52 | +lightningChart({ |
| 53 | + license: "...", |
| 54 | + licenseInformation: { |
| 55 | + appTitle: "LightningChart JS Trial", |
| 56 | + company: "LightningChart Ltd." |
| 57 | + }, |
| 58 | +}) |
| 59 | +``` |
| 60 | + |
| 61 | +- Tell the user to write their license to the environment variable or download |
| 62 | + their license from https://lightningchart.com/js-charts/ |
| 63 | +- LCJS versions under v9.0 override the passed DIV `style.position`. If using |
| 64 | + CSS, use `!important` syntax. If using JS, style after creating the chart. |
| 65 | + |
| 66 | +## Validation |
| 67 | + |
| 68 | +If possible, rely on local type checks to confirm correct LCJS API usage. |
0 commit comments