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/browser.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/browser.js CHANGED
@@ -158,7 +158,7 @@ export class DdbObj {
158
158
  if (form === DdbForm.dict)
159
159
  return dict;
160
160
  else {
161
- const { chartType: type, stacking, binStart: bin_start, binEnd: bin_end, binCount: bin_count, title: titles, extras, data, ...others } = dict.to_dict();
161
+ const { chartType: type, stacking, binStart: bin_start, binEnd: bin_end, binCount: bin_count, title: titles, extras, data, outliers, ...others } = dict.to_dict();
162
162
  const [chart, x_axis, y_axis, z_axis] = titles.value;
163
163
  dict.form = DdbForm.chart;
164
164
  dict.value = {
@@ -174,6 +174,7 @@ export class DdbObj {
174
174
  ...bin_count ? { bin_count } : {},
175
175
  ...extras ? { extras: map_keys(extras.data()) } : {},
176
176
  data,
177
+ ...outliers ? { outliers } : {},
177
178
  ...others,
178
179
  };
179
180
  return dict;
@@ -941,7 +942,7 @@ export class DdbObj {
941
942
  case DdbForm.dict:
942
943
  return [value[0].pack(), value[1].pack()];
943
944
  case DdbForm.chart: {
944
- const { type, stacking, bin_start, bin_end, bin_count, titles: { chart, x_axis, y_axis, z_axis }, extras, data } = this.value;
945
+ const { type, stacking, bin_start, bin_end, bin_count, titles: { chart, x_axis, y_axis, z_axis }, extras, data, outliers } = this.value;
945
946
  const { value: [keys, values] } = new DdbDict({
946
947
  chartType: new DdbInt(type),
947
948
  stacking,
@@ -950,6 +951,7 @@ export class DdbObj {
950
951
  title: new DdbVectorString([chart, x_axis, y_axis, z_axis]),
951
952
  ...extras ? { extras: new DdbDict(map_keys(extras, to_lower_camel_case)) } : {},
952
953
  data,
954
+ ...outliers ? { outliers } : {},
953
955
  });
954
956
  return [keys.pack(), values.pack()];
955
957
  }