dolphindb 3.1.33 → 3.1.35
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/browser.d.ts +2 -1
- package/browser.js +4 -3
- package/browser.js.map +1 -1
- package/common.d.ts +2 -1
- package/common.js +1 -0
- package/common.js.map +1 -1
- package/example.html +18 -0
- package/index.d.ts +2 -1
- package/index.js +10 -3
- package/index.js.map +1 -1
- package/language.d.ts +1 -1
- package/language.js +1 -0
- package/language.js.map +1 -1
- package/package.json +1 -1
package/browser.d.ts
CHANGED
|
@@ -44,6 +44,7 @@ export interface DdbChartValue {
|
|
|
44
44
|
chart: string;
|
|
45
45
|
x_axis: string;
|
|
46
46
|
y_axis: string;
|
|
47
|
+
z_axis?: string;
|
|
47
48
|
};
|
|
48
49
|
extras?: {
|
|
49
50
|
multi_y_axes: boolean;
|
|
@@ -184,7 +185,7 @@ export interface InspectOptions {
|
|
|
184
185
|
export declare function format(type: DdbType, value: DdbValue, le: boolean, options?: InspectOptions): string;
|
|
185
186
|
/** 格式化向量、集合中的第 index 项为字符串,空值返回 'null' 字符串 formatted vector, the index-th item in the collection is a string, a null value returns a 'null' string */
|
|
186
187
|
export declare function formati(obj: DdbVectorObj, index: number, options?: InspectOptions): string;
|
|
187
|
-
export declare function convert(type: DdbType, value: DdbValue, le: boolean, { blob, char, timestamp }?: ConvertOptions): string | number | bigint | boolean | number[] |
|
|
188
|
+
export declare function convert(type: DdbType, value: DdbValue, le: boolean, { blob, char, timestamp }?: ConvertOptions): string | number | bigint | boolean | number[] | DdbFunctionDefValue | DdbDurationValue | DdbDecimal32Value | DdbDecimal64Value | DdbDecimal32VectorValue | DdbDecimal64VectorValue | DdbSymbolExtendedValue | string[] | DdbExtObjValue | DdbTensorValue | Uint8Array<ArrayBufferLike> | DdbDecimal128VectorValue | BigInt128Array | Int8Array<ArrayBufferLike> | Int16Array<ArrayBufferLike> | Int32Array<ArrayBufferLike> | Float32Array<ArrayBufferLike> | Float64Array<ArrayBufferLike> | BigInt64Array<ArrayBufferLike> | IotVectorItemValue | DdbArrayVectorValue | DdbDurationVectorValue | Uint8Array<ArrayBufferLike>[] | DdbObj<DdbValue>[] | DdbMatrixValue | DdbChartValue;
|
|
188
189
|
/** 转换一个向量到 js 原生数组 */
|
|
189
190
|
export declare function converts(type: DdbType, value: DdbVectorValue, rows: number, le: boolean, options?: ConvertOptions): any[] | Uint8Array;
|
|
190
191
|
/** 构造 void 类型,默认为 `DdbVoidType.undefined` */
|
package/browser.js
CHANGED
|
@@ -159,7 +159,7 @@ export class DdbObj {
|
|
|
159
159
|
return dict;
|
|
160
160
|
else {
|
|
161
161
|
const { chartType: type, stacking, binStart: bin_start, binEnd: bin_end, binCount: bin_count, title: titles, extras, data, ...others } = dict.to_dict();
|
|
162
|
-
const [chart, x_axis, y_axis] = titles.value;
|
|
162
|
+
const [chart, x_axis, y_axis, z_axis] = titles.value;
|
|
163
163
|
dict.form = DdbForm.chart;
|
|
164
164
|
dict.value = {
|
|
165
165
|
type: type.value,
|
|
@@ -168,6 +168,7 @@ export class DdbObj {
|
|
|
168
168
|
chart,
|
|
169
169
|
x_axis,
|
|
170
170
|
y_axis,
|
|
171
|
+
z_axis
|
|
171
172
|
},
|
|
172
173
|
...bin_start ? { bin_start, bin_end, } : {},
|
|
173
174
|
...bin_count ? { bin_count } : {},
|
|
@@ -948,13 +949,13 @@ export class DdbObj {
|
|
|
948
949
|
case DdbForm.dict:
|
|
949
950
|
return [value[0].pack(), value[1].pack()];
|
|
950
951
|
case DdbForm.chart: {
|
|
951
|
-
const { type, stacking, bin_start, bin_end, bin_count, titles: { chart, x_axis, y_axis }, extras, data } = this.value;
|
|
952
|
+
const { type, stacking, bin_start, bin_end, bin_count, titles: { chart, x_axis, y_axis, z_axis }, extras, data } = this.value;
|
|
952
953
|
const { value: [keys, values] } = new DdbDict({
|
|
953
954
|
chartType: new DdbInt(type),
|
|
954
955
|
stacking,
|
|
955
956
|
...bin_start ? { binStart: bin_start, binEnd: bin_end } : {},
|
|
956
957
|
...bin_count ? { binCount: bin_count } : {},
|
|
957
|
-
title: new DdbVectorString([chart, x_axis, y_axis]),
|
|
958
|
+
title: new DdbVectorString([chart, x_axis, y_axis, z_axis]),
|
|
958
959
|
...extras ? (() => {
|
|
959
960
|
const { multi_y_axes, ...extras_other } = extras;
|
|
960
961
|
return { extras: new DdbDict({ multiYAxes: multi_y_axes, ...extras_other }) };
|