hqchart 1.1.13381 → 1.1.13389

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.
@@ -6632,6 +6632,8 @@ var JSCHART_MENU_ID=
6632
6632
 
6633
6633
  CMD_CHANGE_BASELINE_ID:35, //分时图切换基准线
6634
6634
  CMD_ADD_OVERLAY_INDEX_ID:36, //添加叠加指标
6635
+
6636
+ CMD_CHANGE_LANGUAGE_ID:37, //语言切换
6635
6637
  }
6636
6638
 
6637
6639
 
@@ -7305,6 +7307,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7305
7307
 
7306
7308
  if (this.TryClickButton(x,y,e))
7307
7309
  {
7310
+ this.IsOnTouch=false;
7308
7311
  return;
7309
7312
  }
7310
7313
 
@@ -7337,11 +7340,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7337
7340
 
7338
7341
  if (this.TryClickCrossCursor(x,y, e))
7339
7342
  {
7343
+ this.IsOnTouch=false;
7340
7344
  return;
7341
7345
  }
7342
7346
 
7343
7347
  if (this.TryClickChartTooltipData && this.TryClickChartTooltipData(x,y,e)) //预留给外部点击图标什么用的
7344
7348
  {
7349
+ this.IsOnTouch=false;
7345
7350
  return;
7346
7351
  }
7347
7352
 
@@ -11728,6 +11733,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
11728
11733
 
11729
11734
  if (this.Frame && this.Frame.SetLanguage) this.Frame.SetLanguage(this.LanguageID);
11730
11735
 
11736
+ //this.Frame.ClearYCoordinateMaxMin();
11737
+ this.ResetFrameXYSplit();
11731
11738
  this.Frame.SetSizeChage(true);
11732
11739
  this.Draw();
11733
11740
  }
@@ -13417,6 +13424,10 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
13417
13424
  obj.WindowIndex=param;
13418
13425
  this.AddOverlayIndex(obj);
13419
13426
  break;
13427
+
13428
+ case JSCHART_MENU_ID.CMD_CHANGE_LANGUAGE_ID:
13429
+ if (srcParam) this.SetLanguage(srcParam);
13430
+ break;
13420
13431
  }
13421
13432
  }
13422
13433
 
@@ -27409,6 +27420,7 @@ function ChartKLine()
27409
27420
  // 15=HLC Area
27410
27421
  // 16=kagi
27411
27422
  // 17=订单流样式4
27423
+ // 18=订单流样式5
27412
27424
 
27413
27425
  this.CloseLineColor=g_JSChartResource.CloseLineColor;
27414
27426
  this.CloseLineAreaColor=g_JSChartResource.CloseLineAreaColor;
@@ -29071,200 +29083,7 @@ function ChartKLine()
29071
29083
  }
29072
29084
  }
29073
29085
 
29074
- /*
29075
- this.DrawKBarV2=function(data, colorData, dataWidth, x, y, left, right, yLow, yHigh, yOpen, yClose, isHScreen)
29076
- {
29077
- var isDrawBorder=false;
29078
- var isEmptyBar=false;
29079
- if (colorData.border) isDrawBorder=true;
29080
- if (colorData.Type===0) isEmptyBar=true;
29081
-
29082
- if (dataWidth>=4)
29083
- {
29084
- if (isDrawBorder)
29085
- {
29086
- if ((dataWidth%2)!=0) dataWidth-=1;
29087
- }
29088
-
29089
- if (data.High>data.Close) //上影线
29090
- {
29091
- if (colorData.Line)
29092
- {
29093
- this.Canvas.strokeStyle=colorData.Line.Color;
29094
- this.Canvas.beginPath();
29095
- if (isHScreen)
29096
- {
29097
- this.Canvas.moveTo(ToFixedPoint(y),ToFixedPoint(x));
29098
- this.Canvas.lineTo(ToFixedPoint(Math.max(yClose,yOpen)),ToFixedPoint(x));
29099
- }
29100
- else
29101
- {
29102
- if (isDrawBorder)
29103
- {
29104
- var xFixed=left+dataWidth/2;
29105
- this.Canvas.moveTo(ToFixedPoint(xFixed),ToFixedPoint(y));
29106
- this.Canvas.lineTo(ToFixedPoint(xFixed),ToFixedPoint(Math.min(yClose,yOpen)));
29107
- }
29108
- else
29109
- {
29110
- this.Canvas.moveTo(ToFixedPoint(x),ToFixedPoint(y));
29111
- this.Canvas.lineTo(ToFixedPoint(x),ToFixedPoint(Math.min(yClose,yOpen)));
29112
- }
29113
- }
29114
- this.Canvas.stroke();
29115
- }
29116
-
29117
- y=yClose;
29118
- }
29119
- else
29120
- {
29121
- y=yClose;
29122
- }
29123
-
29124
- if (isHScreen)
29125
- {
29126
- //实心
29127
- if (!isEmptyBar && colorData.BarColor)
29128
- {
29129
- this.Canvas.fillStyle=colorData.BarColor;
29130
- if (Math.abs(yOpen-y)<1)
29131
- {
29132
- this.Canvas.fillRect(ToFixedRect(y),ToFixedRect(left),1,ToFixedRect(dataWidth)); //高度小于1,统一使用高度1
29133
- }
29134
- else
29135
- {
29136
- this.Canvas.fillRect(ToFixedRect(y),ToFixedRect(left),ToFixedRect(yOpen-y),ToFixedRect(dataWidth));
29137
- }
29138
- }
29139
-
29140
- if (colorData.Border) //空心
29141
- {
29142
- if (Math.abs(yOpen-y)<1)
29143
- {
29144
- this.Canvas.fillStyle=colorData.Border.Color;
29145
- this.Canvas.fillRect(ToFixedRect(y),ToFixedRect(left),1,ToFixedRect(dataWidth)); //高度小于1,统一使用高度1
29146
- }
29147
- else
29148
- {
29149
- this.Canvas.strokeStyle=colorData.Border.Color;
29150
- this.Canvas.beginPath();
29151
- this.Canvas.rect(ToFixedPoint(y),ToFixedPoint(left),ToFixedRect(yOpen-y),ToFixedRect(dataWidth));
29152
- this.Canvas.stroke();
29153
- }
29154
- }
29155
- }
29156
- else
29157
- {
29158
-
29159
- //实心
29160
- if (!isEmptyBar && colorData.BarColor)
29161
- {
29162
- this.Canvas.fillStyle=colorData.BarColor;
29163
- if (Math.abs(yOpen-y)<1)
29164
- {
29165
- this.Canvas.fillRect(ToFixedRect(left),ToFixedRect(y),ToFixedRect(dataWidth),1); //高度小于1,统一使用高度1
29166
- }
29167
- else
29168
- {
29169
- this.Canvas.fillRect(ToFixedRect(left),ToFixedRect(Math.min(y,yOpen)),ToFixedRect(dataWidth),ToFixedRect(Math.abs(yOpen-y)));
29170
- }
29171
- }
29172
-
29173
- if (colorData.Border) //空心
29174
- {
29175
- if (Math.abs(yOpen-y)<1)
29176
- {
29177
- this.Canvas.fillStyle=colorData.Border.Color;
29178
- this.Canvas.fillRect(ToFixedRect(left),ToFixedRect(y),ToFixedRect(dataWidth),1); //高度小于1,统一使用高度1
29179
- }
29180
- else
29181
- {
29182
- this.Canvas.strokeStyle=colorData.Border.Color;
29183
- this.Canvas.beginPath();
29184
- this.Canvas.rect(ToFixedPoint(left),ToFixedPoint(y),ToFixedRect(dataWidth),ToFixedRect(yOpen-y));
29185
- this.Canvas.stroke();
29186
- }
29187
- }
29188
- }
29189
-
29190
- if (data.Open>data.Low) //下影线
29191
- {
29192
- if (colorData.Line)
29193
- {
29194
- this.Canvas.strokeStyle=colorData.Line.Color;
29195
- this.Canvas.beginPath();
29196
- if (isHScreen)
29197
- {
29198
- this.Canvas.moveTo(ToFixedPoint(Math.min(yClose,yOpen)),ToFixedPoint(x));
29199
- this.Canvas.lineTo(ToFixedPoint(yLow),ToFixedPoint(x));
29200
- }
29201
- else
29202
- {
29203
- if (isDrawBorder)
29204
- {
29205
- var xFixed=left+dataWidth/2;
29206
- this.Canvas.moveTo(ToFixedPoint(xFixed),ToFixedPoint(Math.max(yClose,yOpen)));
29207
- this.Canvas.lineTo(ToFixedPoint(xFixed),ToFixedPoint(yLow));
29208
- }
29209
- else
29210
- {
29211
- this.Canvas.moveTo(ToFixedPoint(x),ToFixedPoint(Math.max(yClose,yOpen)));
29212
- this.Canvas.lineTo(ToFixedPoint(x),ToFixedPoint(yLow));
29213
- }
29214
- }
29215
- this.Canvas.stroke();
29216
- }
29217
- }
29218
- }
29219
- else
29220
- {
29221
- var lineColor;
29222
- if (isEmptyBar && colorData.Border)
29223
- {
29224
- lineColor=colorData.Border.Color;
29225
- }
29226
- else if (!isEmptyBar && colorData.BarColor)
29227
- {
29228
- lineColor=colorData.BarColor;
29229
- }
29230
-
29231
- if (lineColor)
29232
- {
29233
- this.Canvas.strokeStyle=lineColor;
29234
- this.Canvas.beginPath();
29235
- if (isHScreen)
29236
- {
29237
- if (data.High==data.Low)
29238
- {
29239
- this.Canvas.moveTo(yHigh,ToFixedPoint(x));
29240
- this.Canvas.lineTo(yLow-1,ToFixedPoint(x));
29241
- }
29242
- else
29243
- {
29244
- this.Canvas.moveTo(yHigh,ToFixedPoint(x));
29245
- this.Canvas.lineTo(yLow,ToFixedPoint(x));
29246
- }
29247
- }
29248
- else
29249
- {
29250
- if (data.High==data.Low)
29251
- {
29252
- this.Canvas.moveTo(ToFixedPoint(x),yHigh);
29253
- this.Canvas.lineTo(ToFixedPoint(x),yLow+1);
29254
- }
29255
- else
29256
- {
29257
- this.Canvas.moveTo(ToFixedPoint(x),yHigh);
29258
- this.Canvas.lineTo(ToFixedPoint(x),yLow);
29259
- }
29260
-
29261
- }
29262
- this.Canvas.stroke();
29263
- }
29264
- }
29265
- }
29266
- */
29267
-
29086
+
29268
29087
  this.DrawVirtualBar=function(data, dataWidth, x, y, left, right, yLow, yHigh, yOpen, yClose, isHScreen)
29269
29088
  {
29270
29089
  var yTop=Math.min(yHigh,yLow), yBottom=Math.max(yHigh,yLow);
@@ -30220,6 +30039,10 @@ function ChartKLine()
30220
30039
  {
30221
30040
  this.DrawOrderFlow_Style4();
30222
30041
  }
30042
+ else if (this.DrawType==18)
30043
+ {
30044
+ this.DrawOrderFlow_Style5();
30045
+ }
30223
30046
  else
30224
30047
  {
30225
30048
  this.DrawKBar();
@@ -31899,6 +31722,13 @@ function ChartKLine()
31899
31722
  }
31900
31723
  }
31901
31724
 
31725
+ ////////////////////////////////////////////////////////////////////////////////
31726
+ //订单流样式5
31727
+ this.DrawOrderFlow_Style5=function()
31728
+ {
31729
+
31730
+ }
31731
+
31902
31732
  //////////////////////////////////////////////////////////////
31903
31733
  // high low bar
31904
31734
  //
@@ -73638,7 +73468,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
73638
73468
 
73639
73469
  var frame=g_ChartFrameFactory.Create("KLineFrame", { ID:i });
73640
73470
  frame.Canvas=this.Canvas;
73641
- frame.GetExtraCanvas=(name)=>{ this.GetExtraCanvas(name); };
73471
+ frame.GetExtraCanvas=(name)=>{ return this.GetExtraCanvas(name); };
73642
73472
  frame.ChartBorder=border;
73643
73473
  frame.Identify=i; //窗口序号
73644
73474
  frame.RightSpaceCount=this.RightSpaceCount; //右边
@@ -73724,7 +73554,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
73724
73554
  var frame=g_ChartFrameFactory.Create(frameClassName, { ID:id });
73725
73555
 
73726
73556
  frame.Canvas=this.Canvas;
73727
- frame.GetExtraCanvas=(name)=>{ this.GetExtraCanvas(name); };
73557
+ frame.GetExtraCanvas=(name)=>{ return this.GetExtraCanvas(name); };
73728
73558
  frame.ChartBorder=border;
73729
73559
  frame.Identify=id; //窗口序号
73730
73560
  frame.GetEventCallback=(id)=> { return this.GetEventCallback(id); };
@@ -78312,7 +78142,16 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
78312
78142
  { Name:"默认", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DEFAULTCURSOR_ID, Args:["default"]}, Checked:this.DefaultCursor=="default" },
78313
78143
  { Name:"十字线", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DEFAULTCURSOR_ID, Args:["crosshair"]}, Checked:this.DefaultCursor=="crosshair" },
78314
78144
  ]
78315
- }
78145
+ },
78146
+ {
78147
+ Name:"语言设置",
78148
+ SubMenu:
78149
+ [
78150
+ { Name:"中文", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_LANGUAGE_ID, Args:["CN"]}, Checked:this.LanguageID==JSCHART_LANGUAGE_ID.LANGUAGE_CHINESE_ID },
78151
+ { Name:"英语", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_LANGUAGE_ID, Args:["EN"]}, Checked:this.LanguageID==JSCHART_LANGUAGE_ID.LANGUAGE_ENGLISH_ID },
78152
+ { Name:"繁体", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_LANGUAGE_ID, Args:["TC"]}, Checked:this.LanguageID==JSCHART_LANGUAGE_ID.LANGUAGE_TRADITIONAL_CHINESE_ID },
78153
+ ]
78154
+ },
78316
78155
  ]
78317
78156
  }
78318
78157
  ];
@@ -87662,7 +87501,7 @@ function KLineChartHScreenContainer(uielement)
87662
87501
 
87663
87502
  var frame=g_ChartFrameFactory.Create("KLineHScreenFrame", { ID:i });
87664
87503
  frame.Canvas=this.Canvas;
87665
- frame.GetExtraCanvas=(name)=>{ this.GetExtraCanvas(name); };
87504
+ frame.GetExtraCanvas=(name)=>{ return this.GetExtraCanvas(name); };
87666
87505
  frame.ChartBorder=border;
87667
87506
  frame.Identify=i; //窗口序号
87668
87507
  frame.RightSpaceCount=this.RightSpaceCount; //右边
@@ -137552,7 +137391,7 @@ function HQChartScriptWorker()
137552
137391
 
137553
137392
 
137554
137393
 
137555
- var HQCHART_VERSION="1.1.13380";
137394
+ var HQCHART_VERSION="1.1.13388";
137556
137395
 
137557
137396
  function PrintHQChartVersion()
137558
137397
  {