dolphindb 3.1.57 → 3.1.58

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/index.d.ts CHANGED
@@ -52,6 +52,12 @@ export interface DdbChartValue {
52
52
  auto_scale_y_axes?: boolean;
53
53
  };
54
54
  data: DdbMatrixObj;
55
+ /** 箱线图 (Boxplot) 的离群点,服务端 plot(chartType = BOXPLOT) 返回的 chart 可能具有该属性
56
+ 原属性 outliers
57
+ N×2 矩阵,每行为 [序列编号, 离群点值],序列编号从 0 开始,对应 data 的行号
58
+ data 每行为一个箱子的 [下须, Q1, median, Q3, 上须],首尾值为须端点 (服务端按 whis = 1.5 计算)
59
+ 无离群点时为 0×2 矩阵 */
60
+ outliers?: DdbMatrixObj;
55
61
  }
56
62
  export type DdbValue = DdbScalarValue | DdbVectorValue | DdbMatrixValue | DdbDictValue | DdbChartValue | DdbTensorValue | DdbExtObjValue;
57
63
  export type DdbStringObj = DdbObj<string>;
package/index.js CHANGED
@@ -155,7 +155,7 @@ export class DdbObj {
155
155
  if (form === DdbForm.dict)
156
156
  return dict;
157
157
  else {
158
- const { chartType: type, stacking, binStart: bin_start, binEnd: bin_end, binCount: bin_count, title: titles, extras, data, ...others } = dict.to_dict();
158
+ const { chartType: type, stacking, binStart: bin_start, binEnd: bin_end, binCount: bin_count, title: titles, extras, data, outliers, ...others } = dict.to_dict();
159
159
  const [chart, x_axis, y_axis, z_axis] = titles.value;
160
160
  dict.form = DdbForm.chart;
161
161
  dict.value = {
@@ -171,6 +171,7 @@ export class DdbObj {
171
171
  ...bin_count ? { bin_count } : {},
172
172
  ...extras ? { extras: map_keys(extras.data()) } : {},
173
173
  data,
174
+ ...outliers ? { outliers } : {},
174
175
  ...others,
175
176
  };
176
177
  return dict;
@@ -938,7 +939,7 @@ export class DdbObj {
938
939
  case DdbForm.dict:
939
940
  return [value[0].pack(), value[1].pack()];
940
941
  case DdbForm.chart: {
941
- const { type, stacking, bin_start, bin_end, bin_count, titles: { chart, x_axis, y_axis, z_axis }, extras, data } = this.value;
942
+ const { type, stacking, bin_start, bin_end, bin_count, titles: { chart, x_axis, y_axis, z_axis }, extras, data, outliers } = this.value;
942
943
  let titles = [];
943
944
  for (const title of [chart, x_axis, y_axis, z_axis])
944
945
  if (empty(title))
@@ -955,6 +956,7 @@ export class DdbObj {
955
956
  extras: new DdbDict(map_keys(extras, to_lower_camel_case))
956
957
  } : {},
957
958
  data,
959
+ ...outliers ? { outliers } : {},
958
960
  });
959
961
  return [keys.pack(), values.pack()];
960
962
  }