aliencharts 0.2.0 → 0.3.1
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 +153 -59
- package/dist/aliencharts.css +1 -1
- package/dist/aliencharts.global.js +3327 -0
- package/dist/aliencharts.global.js.map +7 -0
- package/dist/aliencharts.global.min.js +159 -0
- package/dist/aliencharts.global.min.js.map +7 -0
- package/dist/index.js +26 -3
- package/dist/index.js.map +2 -2
- package/dist/react.js +1717 -889
- package/dist/react.js.map +4 -4
- package/dist/vanilla.js +1717 -889
- package/dist/vanilla.js.map +4 -4
- package/index.d.ts +39 -1
- package/package.json +3 -1
package/index.d.ts
CHANGED
|
@@ -33,6 +33,34 @@ export class LineSeries {
|
|
|
33
33
|
name: string;
|
|
34
34
|
color: string;
|
|
35
35
|
maxLevels: number;
|
|
36
|
+
readonly type: "line";
|
|
37
|
+
readonly length: number;
|
|
38
|
+
rawX: Float64Array;
|
|
39
|
+
rawY: Float32Array;
|
|
40
|
+
|
|
41
|
+
append(xValues: NumericArray, yValues: NumericArray): void;
|
|
42
|
+
getVisiblePoints(
|
|
43
|
+
xMin: number,
|
|
44
|
+
xMax: number,
|
|
45
|
+
pixelWidth: number,
|
|
46
|
+
): VisibleSeriesPoints;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export type BarOrientation = "vertical" | "horizontal";
|
|
50
|
+
|
|
51
|
+
export interface BarSeriesOptions extends SeriesOptions {
|
|
52
|
+
orientation?: BarOrientation;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export class BarSeries {
|
|
56
|
+
constructor(options: BarSeriesOptions);
|
|
57
|
+
|
|
58
|
+
id: string;
|
|
59
|
+
name: string;
|
|
60
|
+
color: string;
|
|
61
|
+
maxLevels: number;
|
|
62
|
+
readonly type: "bar";
|
|
63
|
+
readonly orientation: BarOrientation;
|
|
36
64
|
readonly length: number;
|
|
37
65
|
rawX: Float64Array;
|
|
38
66
|
rawY: Float32Array;
|
|
@@ -48,7 +76,9 @@ export class LineSeries {
|
|
|
48
76
|
export interface Chart {
|
|
49
77
|
id: string;
|
|
50
78
|
title: string;
|
|
51
|
-
series: LineSeries[];
|
|
79
|
+
series: LineSeries[] | BarSeries[];
|
|
80
|
+
categories?: Array<string | ChartCategory>;
|
|
81
|
+
xAxisLabel?: string;
|
|
52
82
|
pinned?: boolean;
|
|
53
83
|
yRange?: {
|
|
54
84
|
min: number;
|
|
@@ -57,6 +87,11 @@ export interface Chart {
|
|
|
57
87
|
[key: string]: unknown;
|
|
58
88
|
}
|
|
59
89
|
|
|
90
|
+
export interface ChartCategory {
|
|
91
|
+
value: number;
|
|
92
|
+
label: string;
|
|
93
|
+
}
|
|
94
|
+
|
|
60
95
|
export interface DataPoint {
|
|
61
96
|
x: number;
|
|
62
97
|
y: number;
|
|
@@ -160,5 +195,8 @@ export interface MockChartsOptions {
|
|
|
160
195
|
pointCount?: number;
|
|
161
196
|
}
|
|
162
197
|
|
|
198
|
+
export function createLineSeries(options: SeriesOptions): LineSeries;
|
|
199
|
+
/** @deprecated Use createLineSeries for explicit line-series naming. */
|
|
163
200
|
export function createSeries(options: SeriesOptions): LineSeries;
|
|
201
|
+
export function createBarSeries(options: BarSeriesOptions): BarSeries;
|
|
164
202
|
export function createMockCharts(options?: MockChartsOptions): Chart[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aliencharts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "WebGL chart renderer for multi-metric dashboards, built for ease of use and high performance.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
"url": "https://github.com/FarangLab/aliencharts/issues"
|
|
24
24
|
},
|
|
25
25
|
"module": "./dist/index.js",
|
|
26
|
+
"jsdelivr": "./dist/aliencharts.global.min.js",
|
|
27
|
+
"style": "./dist/aliencharts.css",
|
|
26
28
|
"types": "./index.d.ts",
|
|
27
29
|
"exports": {
|
|
28
30
|
".": {
|