dolphindb 2.0.527 → 2.0.528

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
@@ -126,8 +126,8 @@ export interface DdbChartValue {
126
126
  x_axis: string;
127
127
  y_axis: string;
128
128
  };
129
- extras: {
130
- multi_y_axis: boolean;
129
+ extras?: {
130
+ multi_y_axes: boolean;
131
131
  };
132
132
  data: DdbObj<DdbMatrixValue>;
133
133
  }
package/browser.js CHANGED
@@ -269,7 +269,6 @@ export class DdbObj {
269
269
  else {
270
270
  const { chartType: type, stacking, title: titles, extras, data, ...others } = dict.to_dict();
271
271
  const [chart, x_axis, y_axis] = titles.value;
272
- const { multiYAxes: multi_y_axis, ...extras_others } = extras.to_dict({ strip: true });
273
272
  dict.form = DdbForm.chart;
274
273
  dict.value = {
275
274
  type: type.value,
@@ -279,10 +278,15 @@ export class DdbObj {
279
278
  x_axis,
280
279
  y_axis,
281
280
  },
282
- extras: {
283
- multi_y_axis,
284
- ...extras_others,
285
- },
281
+ ...extras ? (() => {
282
+ const { multiYAxes: multi_y_axes = false, ...extras_others } = extras.to_dict({ strip: true });
283
+ return {
284
+ extras: {
285
+ multi_y_axes,
286
+ ...extras_others,
287
+ }
288
+ };
289
+ })() : {},
286
290
  data,
287
291
  ...others,
288
292
  };
@@ -858,15 +862,20 @@ export class DdbObj {
858
862
  value[1].pack(),
859
863
  ];
860
864
  case DdbForm.chart: {
861
- const { type, stacking, titles: { chart, x_axis, y_axis, }, extras: { multi_y_axis, ...extras_other }, data } = this.value;
865
+ const { type, stacking, titles: { chart, x_axis, y_axis, }, extras, data } = this.value;
862
866
  const { value: [keys, values] } = new DdbDict({
863
867
  chartType: new DdbInt(type),
864
868
  stacking,
865
869
  title: new DdbVectorString([chart, x_axis, y_axis]),
866
- extras: new DdbDict({
867
- multiYAxis: multi_y_axis,
868
- ...extras_other
869
- }),
870
+ ...extras ? (() => {
871
+ const { multi_y_axes, ...extras_other } = extras;
872
+ return {
873
+ extras: new DdbDict({
874
+ multiYAxes: multi_y_axes,
875
+ ...extras_other
876
+ })
877
+ };
878
+ })() : {},
870
879
  data,
871
880
  });
872
881
  return [