👨💻 Local Development
Introduction
If you see this, you may be interested in improving the KLineChart core. Thank you @fish2016 This document was written.
Notice
File directory description
- dist// Store compiled files
- docs// Docs directory
- scripts// Built script directory
- src// Source code directory
- common// Store some public basic files
- utils// Util directory
- component// Component directory
- extension// Some module directory that can be extended
- figure// Basic drawing directory
- i18n// International directory
- indicator// Indicator directory
- overlay// Overlay directory
- styles// Style directory
- x-axis// X-axis directory
- y-axis// Y-axis directory
- pane// Panel directory
- view// Draw module directory
- widget// Draw module collection directory
- tests// Test module directory
Module dependencies

The above diagram shows the hierarchy of chart modules from top to bottom, with the lower layer serving as the upper layer container.
FigureBasic shapes, such as circle, polygon, rect, text, etc.ViewRetrieve data fromChartStoreand perform single business plotting, such as candlesticks, area, grid line, crosshair, indicator, etcWidgetCreate canvas and assemble the relevantViewtogether.PaneCreate dom container and assemble theWidgettogether.ChartManage the Panes, such as deleting and adding operations, to form the final chart. In addition, event distribution is also carried out to manipulate the data inChartStoreand notify subordinate components to update as needed.
Development
Installation dependencies
Project mandatory use of [pnpm](https://pnpm.io)As a package manager, it is necessary to use pnpm to install dependencies.
bash
# Root dir run
pnpm installExecute command description
code-lint: Runpnpm run code-lintverify code rules.clean: Runpnpm run cleanclean up the built files.build-esm: Runpnpm run build-esmbuilt esm module.build-cjs: Runpnpm run build-cjsbuilt commonjs module.build-umd:dev: Runpnpm run build-umd:devbuilt umd development module.build-umd:prod: Runpnpm run build-umd:prodbuilt umd production module.build-umd: Runpnpm run build-umdbuilt umd development and production module。build-core: Runpnpm run build-corebuilt esm, commonjs umd development and umd production module.build-dts: Runpnpm run build-dtsgenerate typescript dependency files.build: Runpnpm run buildbuilt esm, commonjs umd development and umd production module and generate typescript dependency files.
Debug
This project does not have a debugging project and requires the creation of a new project, use npm link import,or import index.ts debug. You can use vite create a project.