katucharts.js 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -25
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
D3.js charting library with a declarative configuration interface.
|
|
4
4
|
|
|
5
|
-
 
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -40,10 +40,10 @@ D3.js charting library with a declarative configuration interface.
|
|
|
40
40
|
## Install
|
|
41
41
|
|
|
42
42
|
```bash
|
|
43
|
-
npm install katucharts
|
|
44
|
-
yarn add katucharts
|
|
45
|
-
pnpm add katucharts
|
|
46
|
-
bun add katucharts
|
|
43
|
+
npm install katucharts.js
|
|
44
|
+
yarn add katucharts.js
|
|
45
|
+
pnpm add katucharts.js
|
|
46
|
+
bun add katucharts.js
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
Optional peer dependencies:
|
|
@@ -65,7 +65,7 @@ pnpm add react react-dom
|
|
|
65
65
|
**ESM**
|
|
66
66
|
|
|
67
67
|
```js
|
|
68
|
-
import KatuCharts from 'katucharts';
|
|
68
|
+
import KatuCharts from 'katucharts.js';
|
|
69
69
|
|
|
70
70
|
KatuCharts.chart('container', {
|
|
71
71
|
title: { text: 'Monthly Sales' },
|
|
@@ -81,7 +81,7 @@ KatuCharts.chart('container', {
|
|
|
81
81
|
**UMD (CDN)**
|
|
82
82
|
|
|
83
83
|
```html
|
|
84
|
-
<script src="https://unpkg.com/katucharts/dist/katucharts.umd.js"></script>
|
|
84
|
+
<script src="https://unpkg.com/katucharts.js/dist/katucharts.umd.js"></script>
|
|
85
85
|
<script>
|
|
86
86
|
KatuCharts.chart('container', { series: [{ type: 'line', data: [1, 2, 3] }] });
|
|
87
87
|
</script>
|
|
@@ -90,9 +90,9 @@ KatuCharts.chart('container', {
|
|
|
90
90
|
**With modules**
|
|
91
91
|
|
|
92
92
|
```js
|
|
93
|
-
import KatuCharts from 'katucharts';
|
|
94
|
-
import { BioModule } from 'katucharts/bio';
|
|
95
|
-
import { FinanceModule } from 'katucharts/finance';
|
|
93
|
+
import KatuCharts from 'katucharts.js';
|
|
94
|
+
import { BioModule } from 'katucharts.js/bio';
|
|
95
|
+
import { FinanceModule } from 'katucharts.js/finance';
|
|
96
96
|
|
|
97
97
|
KatuCharts.use(BioModule);
|
|
98
98
|
KatuCharts.use(FinanceModule);
|
|
@@ -232,7 +232,7 @@ Returns the current global options object.
|
|
|
232
232
|
Registers a plugin module.
|
|
233
233
|
|
|
234
234
|
```js
|
|
235
|
-
import { FinanceModule } from 'katucharts/finance';
|
|
235
|
+
import { FinanceModule } from 'katucharts.js/finance';
|
|
236
236
|
KatuCharts.use(FinanceModule);
|
|
237
237
|
```
|
|
238
238
|
|
|
@@ -721,8 +721,8 @@ chart: {
|
|
|
721
721
|
### Finance Module
|
|
722
722
|
|
|
723
723
|
```js
|
|
724
|
-
import KatuCharts from 'katucharts';
|
|
725
|
-
import { FinanceModule } from 'katucharts/finance';
|
|
724
|
+
import KatuCharts from 'katucharts.js';
|
|
725
|
+
import { FinanceModule } from 'katucharts.js/finance';
|
|
726
726
|
|
|
727
727
|
KatuCharts.use(FinanceModule);
|
|
728
728
|
```
|
|
@@ -750,7 +750,7 @@ Indicators are computed from OHLCV data and rendered as overlay series.
|
|
|
750
750
|
All indicators expose `.calculate()` and `.getResult()` and return data in `[x, y]` series format.
|
|
751
751
|
|
|
752
752
|
```js
|
|
753
|
-
import { FinanceModule, EMA } from 'katucharts/finance';
|
|
753
|
+
import { FinanceModule, EMA } from 'katucharts.js/finance';
|
|
754
754
|
|
|
755
755
|
KatuCharts.use(FinanceModule);
|
|
756
756
|
|
|
@@ -769,8 +769,8 @@ KatuCharts.chart('container', {
|
|
|
769
769
|
### Bio Module
|
|
770
770
|
|
|
771
771
|
```js
|
|
772
|
-
import KatuCharts from 'katucharts';
|
|
773
|
-
import { BioModule } from 'katucharts/bio';
|
|
772
|
+
import KatuCharts from 'katucharts.js';
|
|
773
|
+
import { BioModule } from 'katucharts.js/bio';
|
|
774
774
|
|
|
775
775
|
KatuCharts.use(BioModule);
|
|
776
776
|
```
|
|
@@ -790,8 +790,8 @@ KatuCharts.chart('container', {
|
|
|
790
790
|
### DataTable Module
|
|
791
791
|
|
|
792
792
|
```js
|
|
793
|
-
import KatuCharts from 'katucharts';
|
|
794
|
-
import { DataTableModule, DataTable } from 'katucharts/datatable';
|
|
793
|
+
import KatuCharts from 'katucharts.js';
|
|
794
|
+
import { DataTableModule, DataTable } from 'katucharts.js/datatable';
|
|
795
795
|
|
|
796
796
|
KatuCharts.use(DataTableModule);
|
|
797
797
|
```
|
|
@@ -848,8 +848,8 @@ const table = new DataTable('container', {
|
|
|
848
848
|
### React Wrapper
|
|
849
849
|
|
|
850
850
|
```js
|
|
851
|
-
import KatuCharts from 'katucharts';
|
|
852
|
-
import { KatuChartsReact } from 'katucharts/react';
|
|
851
|
+
import KatuCharts from 'katucharts.js';
|
|
852
|
+
import { KatuChartsReact } from 'katucharts.js/react';
|
|
853
853
|
|
|
854
854
|
function SalesChart() {
|
|
855
855
|
return (
|
|
@@ -883,7 +883,7 @@ function SalesChart() {
|
|
|
883
883
|
### StreamAdapter
|
|
884
884
|
|
|
885
885
|
```js
|
|
886
|
-
import { StreamAdapter } from 'katucharts';
|
|
886
|
+
import { StreamAdapter } from 'katucharts.js';
|
|
887
887
|
|
|
888
888
|
const chart = KatuCharts.chart('container', {
|
|
889
889
|
series: [{ type: 'line', name: 'Live', data: [] }]
|
|
@@ -939,7 +939,7 @@ All three return a `{ unsubscribe() }` handle.
|
|
|
939
939
|
Batch multiple data operations into one redraw.
|
|
940
940
|
|
|
941
941
|
```js
|
|
942
|
-
import { UpdateScheduler } from 'katucharts';
|
|
942
|
+
import { UpdateScheduler } from 'katucharts.js';
|
|
943
943
|
|
|
944
944
|
const scheduler = new UpdateScheduler();
|
|
945
945
|
|
|
@@ -965,7 +965,7 @@ scheduler.batch(() => {
|
|
|
965
965
|
Fixed-size FIFO buffer for rolling windows.
|
|
966
966
|
|
|
967
967
|
```js
|
|
968
|
-
import { CircularBuffer } from 'katucharts';
|
|
968
|
+
import { CircularBuffer } from 'katucharts.js';
|
|
969
969
|
|
|
970
970
|
const buffer = new CircularBuffer(100);
|
|
971
971
|
buffer.push({ x: Date.now(), y: 42 });
|
|
@@ -1039,7 +1039,7 @@ series: [{
|
|
|
1039
1039
|
The `ExportModule` functions can be used directly when the built-in export button is insufficient.
|
|
1040
1040
|
|
|
1041
1041
|
```js
|
|
1042
|
-
import { ExportModule } from 'katucharts';
|
|
1042
|
+
import { ExportModule } from 'katucharts.js';
|
|
1043
1043
|
|
|
1044
1044
|
const svg = ExportModule.inlineStyles(chart.getSVG());
|
|
1045
1045
|
|
|
@@ -1070,7 +1070,7 @@ ExportModule.print(svg, 800);
|
|
|
1070
1070
|
Any module must implement `{ name: string, init(katucharts): void }`.
|
|
1071
1071
|
|
|
1072
1072
|
```js
|
|
1073
|
-
import { BaseSeries } from 'katucharts';
|
|
1073
|
+
import { BaseSeries } from 'katucharts.js';
|
|
1074
1074
|
|
|
1075
1075
|
class RidglineChart extends BaseSeries {
|
|
1076
1076
|
render() {
|