hqchart 1.1.11289 → 1.1.11297

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.
@@ -1656,10 +1656,12 @@ if(!this.BorderDrag){var dragY=this.TryYDrag(x,y);if(dragY){this.UIElement.style
1656
1656
  };drag.Click.X=e.clientX;drag.Click.Y=e.clientY;drag.Click.IsInFrameBottom=this.Frame.PtInFrameBottom(x,y);//是否点击在X轴上
1657
1657
  drag.LastMove.X=e.clientX;drag.LastMove.Y=e.clientY;this.MouseDrag=drag;var drawPictureActive=this.GetActiveDrawPicture();//上一次选中的
1658
1658
  var selectedChart={Chart:this.SelectedChart.Selected.Chart,Identify:this.SelectedChart.Selected.Identify};//上一次选中的图形
1659
- this.SelectChartDrawPicture=null;if(this.BorderDrag){}else if(this.YDrag||this.UpDownDrag||this.RectSelectDrag){}else if(this.CurrentChartDrawPicture)//画图工具模式
1660
- {var drawPicture=this.CurrentChartDrawPicture;if(drawPicture.Status==2)this.SetChartDrawPictureThirdPoint(drag.Click.X,drag.Click.Y);else{this.SetChartDrawPictureFirstPoint(drag.Click.X,drag.Click.Y);//只有1个点 直接完成
1659
+ this.SelectChartDrawPicture=null;if(this.BorderDrag){}else if(this.YDrag||this.RectSelectDrag){}else if(this.CurrentChartDrawPicture)//画图工具模式
1660
+ {this.UpDownDrag=null;//画图优先
1661
+ var drawPicture=this.CurrentChartDrawPicture;if(drawPicture.Status==2)this.SetChartDrawPictureThirdPoint(drag.Click.X,drag.Click.Y);else{this.SetChartDrawPictureFirstPoint(drag.Click.X,drag.Click.Y);//只有1个点 直接完成
1661
1662
  if(this.FinishChartDrawPicturePoint())this.DrawDynamicInfo();}if(drawPictureActive.Select.Guid&&(!this.CurrentChartDrawPicture||drawPictureActive.Select.Guid!=this.CurrentChartDrawPicture.Guid)){if(drawPictureActive.Select.Chart.IsDrawMain)this.Draw();}}else//是否在画图工具上
1662
- {var drawPictrueData={};drawPictrueData.X=(e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;drawPictrueData.Y=(e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;if(this.GetChartDrawPictureByPoint(drawPictrueData)){if(drawPictrueData.ChartDrawPicture.EnableMove==true){this.CurrentChartDrawPicture=drawPictrueData.ChartDrawPicture;this.SelectChartDrawPicture=drawPictrueData.ChartDrawPicture;//当前已有选中的,需要刷下
1663
+ {var drawPictrueData={};drawPictrueData.X=(e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;drawPictrueData.Y=(e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;if(this.GetChartDrawPictureByPoint(drawPictrueData)){if(drawPictrueData.ChartDrawPicture.EnableMove==true){this.UpDownDrag=null;//画图优先
1664
+ this.CurrentChartDrawPicture=drawPictrueData.ChartDrawPicture;this.SelectChartDrawPicture=drawPictrueData.ChartDrawPicture;//当前已有选中的,需要刷下
1663
1665
  var bDraw=false;if(drawPictureActive.Select.Guid&&drawPictureActive.Select.Chart&&drawPictureActive.Select.Chart.IsDrawMain)bDraw=true;else if(drawPictrueData.ChartDrawPicture.IsDrawMain)bDraw=true;if(bDraw)this.Draw();drawPictrueData.ChartDrawPicture.Status=20;drawPictrueData.ChartDrawPicture.ValueToPoint();drawPictrueData.ChartDrawPicture.MovePointIndex=drawPictrueData.PointIndex;//this.CurrentChartDrawPicture=drawPictrueData.ChartDrawPicture;
1664
1666
  //this.SelectChartDrawPicture=drawPictrueData.ChartDrawPicture;
1665
1667
  this.SelectChartDrawPicture.DragInfo={Click:{X:e.clientX,Y:e.clientY}};}else{this.CurrentChartDrawPicture=null;this.SelectChartDrawPicture=null;}var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_DRAWPICTURE);//选中画图工具事件
@@ -1941,6 +1943,7 @@ this.Font=g_JSChartResource.FrameSplitTextFont;//字体
1941
1943
  this.LineColor=g_JSChartResource.FrameSplitPen;//线段颜色
1942
1944
  this.LineDash=null;//当线段类型==2时 可以设置虚线样式
1943
1945
  this.LineType=1;//线段类型 -1 不画线段 2 虚线 8,9=集合竞价坐标
1946
+ this.LineWidth;//线段宽度
1944
1947
  this.ExtendData;//扩展属性
1945
1948
  //百分比 { PriceColor:, PercentageColor:, SplitColor:, Font: }
1946
1949
  //自定义刻度 { Custom:{ Position: 1=强制内部 }}
@@ -2042,11 +2045,12 @@ this.GetYFromData=function(value,isLimit){if(this.Logarithmic&&this.GetYLogarith
2042
2045
  this.DrawHorizontal=function(){this.RightTextMaxWidth=0;if(!IFrameSplitOperator.IsNonEmptyArray(this.HorizontalInfo))return;var border=this.ChartBorder.GetBorder();var left=border.Left;var right=border.Right;var bottom=border.Bottom;var top=this.ChartBorder.GetTopTitle();var borderRight=this.ChartBorder.Right;var borderLeft=this.ChartBorder.Left;var isDrawLeft=borderLeft>10&&this.IsShowYText[0]===true&&this.YTextPosition[0]!=2;var isDrawRight=borderRight>10&&this.IsShowYText[1]===true&&this.YTextPosition[1]!=2;var yPrev=null;//上一个坐标y的值
2043
2046
  var pixelRatio=GetDevicePixelRatio();var itemHeight=(border.BottomEx-border.TopEx)/this.HorizontalInfo.length;var aryMultiText=[];for(var i=this.HorizontalInfo.length-1;i>=0;--i)//从上往下画分割线
2044
2047
  {var item=this.HorizontalInfo[i];var y=this.GetYFromData(item.Value);if(y!=null&&yPrev!=null&&Math.abs(y-yPrev)<this.MinYDistance)continue;//两个坐标在近了 就不画了
2045
- var yFixed=ToFixedPoint(y);if(y!=bottom&&this.IsShowYLine){this.Canvas.strokeStyle=item.LineColor;if(item.LineType==2){this.Canvas.save();if(item.LineDash)this.Canvas.setLineDash(item.LineDash);else this.Canvas.setLineDash([5*pixelRatio,5*pixelRatio]);//虚线
2046
- this.Canvas.beginPath();this.Canvas.moveTo(left,yFixed);this.Canvas.lineTo(right,yFixed);this.Canvas.stroke();this.Canvas.restore();}else if(item.LineType==3)//只在刻度边上画一个短横线
2048
+ var yFixed=ToFixedPoint(y);if(y!=bottom&&this.IsShowYLine){var bChangeLineWidth=false;if(IFrameSplitOperator.IsPlusNumber(item.LineWidth))//刻度线宽度
2049
+ {this.Canvas.lineWidth=item.LineWidth*pixelRatio;bChangeLineWidth=true;}this.Canvas.strokeStyle=item.LineColor;if(item.LineType==2){if(item.LineDash)this.Canvas.setLineDash(item.LineDash);else this.Canvas.setLineDash([5*pixelRatio,5*pixelRatio]);//虚线
2050
+ this.Canvas.beginPath();this.Canvas.moveTo(left,yFixed);this.Canvas.lineTo(right,yFixed);this.Canvas.stroke();this.Canvas.setLineDash([]);}else if(item.LineType==3)//只在刻度边上画一个短横线
2047
2051
  {}else if(item.LineType==8||item.LineType==9)//集合竞价不画线
2048
2052
  {}else if(item.LineType>0){if(g_JSChartResource.FrameYLineDash){this.Canvas.setLineDash(g_JSChartResource.FrameYLineDash);//虚线
2049
- this.Canvas.beginPath();this.Canvas.moveTo(left,yFixed);this.Canvas.lineTo(right,yFixed);this.Canvas.stroke();this.Canvas.setLineDash([]);}else{this.Canvas.beginPath();this.Canvas.moveTo(left,yFixed);this.Canvas.lineTo(right,yFixed);this.Canvas.stroke();}}}var yText=y;if(y>=bottom-2){this.Canvas.textBaseline='bottom';}else if(y<=top+2){this.Canvas.textBaseline='top';yText+=this.YTextTopOffset;}else{this.Canvas.textBaseline="middle";}//坐标信息 左边 间距小于10 不画坐标
2053
+ this.Canvas.beginPath();this.Canvas.moveTo(left,yFixed);this.Canvas.lineTo(right,yFixed);this.Canvas.stroke();this.Canvas.setLineDash([]);}else{this.Canvas.beginPath();this.Canvas.moveTo(left,yFixed);this.Canvas.lineTo(right,yFixed);this.Canvas.stroke();}}if(bChangeLineWidth){this.Canvas.lineWidth=pixelRatio;}}var yText=y;if(y>=bottom-2){this.Canvas.textBaseline='bottom';}else if(y<=top+2){this.Canvas.textBaseline='top';yText+=this.YTextTopOffset;}else{this.Canvas.textBaseline="middle";}//坐标信息 左边 间距小于10 不画坐标
2050
2054
  this.Canvas.strokeStyle=item.TextColor;this.Canvas.fillStyle=item.TextColor;if(item.Message[0]!=null&&isDrawLeft){if(item.Font!=null)this.Canvas.font=item.Font;this.Canvas.textAlign="right";this.Canvas.fillText(item.Message[0],left-this.YTextPadding[0],yText);}//坐标信息 右边 间距小于10 不画坐标
2051
2055
  if(item.Message[1]!=null&&isDrawRight){if(item.Font!=null)this.Canvas.font=item.Font;var xText=right;if(item.LineType==3){var lineLength=this.ShortYLineLength*GetDevicePixelRatio();this.Canvas.beginPath();this.Canvas.moveTo(xText,yFixed);this.Canvas.lineTo(xText+lineLength,yFixed);this.Canvas.stroke();xText+=lineLength;}this.Canvas.textAlign="left";if(Array.isArray(item.Message[1])){if(this.MultiTextFormat==1)//显示1行 格式:价格/百分比
2052
2056
  {if(item.ExtendData){if(item.ExtendData.Font)this.Canvas.font=item.ExtendData.Font;}var textData={Text:[{Text:item.Message[1][0],Width:this.Canvas.measureText(item.Message[1][0]).width},{Text:item.Message[1][1],Width:this.Canvas.measureText(item.Message[1][1]).width}],X:xText+2,Y:yText,TextBaseline:this.Canvas.textBaseline,Item:item};aryMultiText.push(textData);}else if(this.MultiTextFormat==2)//显示2行
@@ -2913,7 +2917,7 @@ else if(data.Open>data.Close)this.Canvas.strokeStyle=this.DownColor;//阳线
2913
2917
  else this.Canvas.strokeStyle=this.UnchagneColor;//平线
2914
2918
  if(this.ColorData)///五彩K线颜色设置
2915
2919
  {if(i<this.ColorData.length)upColor=downColor=unchagneColor=this.ColorData[i]>0?this.UpColor:this.DownColor;else upColor=downColor=unchagneColor=this.DownColor;}this.Canvas.beginPath();//最高-最低
2916
- if(isHScreen){this.Canvas.moveTo(yHigh,ToFixedPoint(x));this.Canvas.lineTo(yLow,ToFixedPoint(x));}else{this.Canvas.moveTo(ToFixedPoint(x),yHigh);this.Canvas.lineTo(ToFixedPoint(x),yLow);}this.Canvas.stroke();if(dataWidth>=4){this.Canvas.beginPath();//开盘
2920
+ if(isHScreen){if(data.High==data.Low&&dataWidth<4){this.Canvas.moveTo(yHigh,ToFixedPoint(x));this.Canvas.lineTo(yLow-1,ToFixedPoint(x));}else{this.Canvas.moveTo(yHigh,ToFixedPoint(x));this.Canvas.lineTo(yLow,ToFixedPoint(x));}}else{if(data.High==data.Low&&dataWidth<4){this.Canvas.moveTo(ToFixedPoint(x),yHigh);this.Canvas.lineTo(ToFixedPoint(x),yLow+1);}else{this.Canvas.moveTo(ToFixedPoint(x),yHigh);this.Canvas.lineTo(ToFixedPoint(x),yLow);}}this.Canvas.stroke();if(dataWidth>=4){this.Canvas.beginPath();//开盘
2917
2921
  if(isHScreen){this.Canvas.moveTo(ToFixedPoint(yOpen),left);this.Canvas.lineTo(ToFixedPoint(yOpen),x);}else{this.Canvas.moveTo(left,ToFixedPoint(yOpen));this.Canvas.lineTo(x,ToFixedPoint(yOpen));}this.Canvas.stroke();this.Canvas.beginPath();//收盘
2918
2922
  if(isHScreen){this.Canvas.moveTo(ToFixedPoint(yClose),right);this.Canvas.lineTo(ToFixedPoint(yClose),x);}else{this.Canvas.moveTo(right,ToFixedPoint(yClose));this.Canvas.lineTo(x,ToFixedPoint(yClose));}this.Canvas.stroke();}if(this.Data.DataType==0){var infoItem={Xleft:left,XRight:right,YMax:yHigh,XCenter:x,YMin:yLow,DayData:data,Index:j};this.DrawInfo(infoItem);}}this.PtMax=ptMax;this.PtMin=ptMin;};this.DrawCloseArea=function()//收盘价面积图
2919
2923
  {var isHScreen=this.ChartFrame.IsHScreen===true;var dataWidth=this.ChartFrame.DataWidth;var distanceWidth=this.ChartFrame.DistanceWidth;var xPointCount=this.ChartFrame.XPointCount;if(isHScreen){var border=this.ChartBorder.GetHScreenBorder();var xOffset=border.TopEx+distanceWidth/2.0+g_JSChartResource.FrameLeftMargin;var chartright=border.BottomEx;var borderLeft=border.TopEx;}else{var border=this.ChartBorder.GetBorder();var xOffset=border.LeftEx+distanceWidth/2.0+g_JSChartResource.FrameLeftMargin;var chartright=border.RightEx;var borderLeft=border.LeftEx;}var bFirstPoint=true;var firstPoint=null;this.Canvas.beginPath();this.Canvas.strokeStyle=this.CloseLineColor;if(IFrameSplitOperator.IsNumber(this.CloseLineWidth))this.Canvas.lineWidth=this.CloseLineWidth;var ptLast=null;if(this.Data.DataOffset>0)//把最左边的一个点连上
@@ -2948,7 +2952,7 @@ else this.Canvas.fillRect(ToFixedRect(y),ToFixedRect(left),ToFixedRect(yClose-y)
2948
2952
  {this.Canvas.beginPath();if(isHScreen){this.Canvas.moveTo(ToFixedPoint(y),ToFixedPoint(x));this.Canvas.lineTo(ToFixedPoint(yLow),ToFixedPoint(x));}else{if(isEmptyBar){var xFixed=left+dataWidth/2;this.Canvas.moveTo(ToFixedPoint(xFixed),ToFixedPoint(Math.max(yClose,yOpen)));this.Canvas.lineTo(ToFixedPoint(xFixed),ToFixedPoint(yLow));}else{this.Canvas.moveTo(ToFixedPoint(x),ToFixedPoint(y));this.Canvas.lineTo(ToFixedPoint(x),ToFixedPoint(yLow));}}this.Canvas.stroke();}}else{this.Canvas.beginPath();if(isHScreen){this.Canvas.moveTo(yHigh,ToFixedPoint(x));this.Canvas.lineTo(yLow,ToFixedPoint(x));}else{this.Canvas.moveTo(ToFixedPoint(x),yHigh);this.Canvas.lineTo(ToFixedPoint(x),yLow);}this.Canvas.strokeStyle=downColor;this.Canvas.stroke();}};this.DrawKBar_Unchagne=function(data,dataWidth,unchagneColor,drawType,x,y,left,right,yLow,yHigh,yOpen,yClose,isHScreen)//平线
2949
2953
  {if(dataWidth>=4){if(dataWidth%2!=0)dataWidth-=1;this.Canvas.strokeStyle=unchagneColor;this.Canvas.beginPath();if(data.High>data.Close)//上影线
2950
2954
  {if(isHScreen){this.Canvas.moveTo(y,ToFixedPoint(x));this.Canvas.lineTo(yOpen,ToFixedPoint(x));}else{var xFixed=ToFixedPoint(left+dataWidth/2);this.Canvas.moveTo(xFixed,y);this.Canvas.lineTo(xFixed,yOpen);}y=yOpen;}else{y=yOpen;}if(isHScreen){this.Canvas.moveTo(ToFixedPoint(y),ToFixedPoint(left));this.Canvas.lineTo(ToFixedPoint(y),ToFixedPoint(right));}else{this.Canvas.moveTo(ToFixedPoint(left),ToFixedPoint(y));this.Canvas.lineTo(ToFixedPoint(left+dataWidth),ToFixedPoint(y));}if(data.Open>data.Low)//下影线
2951
- {if(isHScreen){this.Canvas.moveTo(ToFixedPoint(y),ToFixedPoint(x));this.Canvas.lineTo(ToFixedPoint(yLow),ToFixedPoint(x));}else{var xFixed=ToFixedPoint(left+dataWidth/2);this.Canvas.moveTo(xFixed,ToFixedPoint(y));this.Canvas.lineTo(xFixed,ToFixedPoint(yLow));}}this.Canvas.stroke();}else{this.Canvas.beginPath();if(isHScreen){this.Canvas.moveTo(yHigh,ToFixedPoint(x));this.Canvas.lineTo(yLow,ToFixedPoint(x));}else{this.Canvas.moveTo(ToFixedPoint(x),yHigh);this.Canvas.lineTo(ToFixedPoint(x),yLow);}this.Canvas.strokeStyle=unchagneColor;this.Canvas.stroke();}};this.DrawKBar_Custom=function(data,dataWidth,barColor,drawType,option,x,y,left,right,yLow,yHigh,yOpen,yClose,border,isHScreen){if(option.BGColor)//画背景色
2955
+ {if(isHScreen){this.Canvas.moveTo(ToFixedPoint(y),ToFixedPoint(x));this.Canvas.lineTo(ToFixedPoint(yLow),ToFixedPoint(x));}else{var xFixed=ToFixedPoint(left+dataWidth/2);this.Canvas.moveTo(xFixed,ToFixedPoint(y));this.Canvas.lineTo(xFixed,ToFixedPoint(yLow));}}this.Canvas.stroke();}else{this.Canvas.beginPath();if(isHScreen){if(data.High==data.Low){this.Canvas.moveTo(yHigh,ToFixedPoint(x));this.Canvas.lineTo(yLow-1,ToFixedPoint(x));}else{this.Canvas.moveTo(yHigh,ToFixedPoint(x));this.Canvas.lineTo(yLow,ToFixedPoint(x));}}else{if(data.High==data.Low){this.Canvas.moveTo(ToFixedPoint(x),yHigh);this.Canvas.lineTo(ToFixedPoint(x),yLow+1);}else{this.Canvas.moveTo(ToFixedPoint(x),yHigh);this.Canvas.lineTo(ToFixedPoint(x),yLow);}}this.Canvas.strokeStyle=unchagneColor;this.Canvas.stroke();}};this.DrawKBar_Custom=function(data,dataWidth,barColor,drawType,option,x,y,left,right,yLow,yHigh,yOpen,yClose,border,isHScreen){if(option.BGColor)//画背景色
2952
2956
  {this.Canvas.fillStyle=option.BGColor;var distanceWidth=this.ChartFrame.DistanceWidth;if(isHScreen){var yLeft=left-distanceWidth/2;var yRight=right+distanceWidth/2;var xTop=border.RightEx;var xBottom=border.LeftEx;this.Canvas.fillRect(ToFixedRect(xBottom),ToFixedRect(yLeft),ToFixedRect(xTop-xBottom),ToFixedRect(yRight-yLeft));}else{var xLeft=left-distanceWidth/2;var xRight=right+distanceWidth/2;var yTop=border.TopEx;var yBottom=border.BottomEx;this.Canvas.fillRect(ToFixedRect(xLeft),ToFixedRect(yTop),ToFixedRect(xRight-xLeft),ToFixedRect(yBottom-yTop));}}if(dataWidth>=4){this.Canvas.strokeStyle=barColor;if(data.High>data.Close)//上影线
2953
2957
  {this.Canvas.beginPath();if(isHScreen){this.Canvas.moveTo(ToFixedPoint(y),ToFixedPoint(x));this.Canvas.lineTo(ToFixedPoint(drawType==3?Math.max(yClose,yOpen):yClose),ToFixedPoint(x));}else{this.Canvas.moveTo(ToFixedPoint(x),ToFixedPoint(y));this.Canvas.lineTo(ToFixedPoint(x),ToFixedPoint(drawType==3?Math.min(yClose,yOpen):yClose));}this.Canvas.stroke();y=yClose;}else{y=yClose;}this.Canvas.fillStyle=barColor;if(isHScreen){if(Math.abs(yOpen-y)<1){this.Canvas.fillRect(ToFixedRect(y),ToFixedRect(left),1,ToFixedRect(dataWidth));//高度小于1,统一使用高度1
2954
2958
  }else{if(drawType==3)//空心柱
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "hqchart",
3
3
  "description": "stock chart",
4
4
  "author": "jones2000",
5
- "version": "1.1.11289",
5
+ "version": "1.1.11297",
6
6
  "main": "lib/main.js",
7
7
  "private": false,
8
8
  "license": "Apache License 2.0",
@@ -6789,12 +6789,13 @@ function JSChartContainer(uielement, OffscreenElement)
6789
6789
  {
6790
6790
 
6791
6791
  }
6792
- else if (this.YDrag || this.UpDownDrag || this.RectSelectDrag)
6792
+ else if (this.YDrag || this.RectSelectDrag)
6793
6793
  {
6794
6794
 
6795
6795
  }
6796
6796
  else if (this.CurrentChartDrawPicture) //画图工具模式
6797
6797
  {
6798
+ this.UpDownDrag=null; //画图优先
6798
6799
  var drawPicture=this.CurrentChartDrawPicture;
6799
6800
  if (drawPicture.Status==2)
6800
6801
  this.SetChartDrawPictureThirdPoint(drag.Click.X,drag.Click.Y);
@@ -6819,6 +6820,7 @@ function JSChartContainer(uielement, OffscreenElement)
6819
6820
  {
6820
6821
  if (drawPictrueData.ChartDrawPicture.EnableMove==true)
6821
6822
  {
6823
+ this.UpDownDrag=null; //画图优先
6822
6824
  this.CurrentChartDrawPicture=drawPictrueData.ChartDrawPicture;
6823
6825
  this.SelectChartDrawPicture=drawPictrueData.ChartDrawPicture;
6824
6826
 
@@ -11236,6 +11238,7 @@ function CoordinateInfo()
11236
11238
  this.LineColor=g_JSChartResource.FrameSplitPen; //线段颜色
11237
11239
  this.LineDash=null; //当线段类型==2时 可以设置虚线样式
11238
11240
  this.LineType=1; //线段类型 -1 不画线段 2 虚线 8,9=集合竞价坐标
11241
+ this.LineWidth; //线段宽度
11239
11242
  this.ExtendData; //扩展属性
11240
11243
  //百分比 { PriceColor:, PercentageColor:, SplitColor:, Font: }
11241
11244
  //自定义刻度 { Custom:{ Position: 1=强制内部 }}
@@ -12037,17 +12040,23 @@ function AverageWidthFrame()
12037
12040
  var yFixed=ToFixedPoint(y);
12038
12041
  if (y!=bottom && this.IsShowYLine)
12039
12042
  {
12043
+ var bChangeLineWidth=false;
12044
+ if (IFrameSplitOperator.IsPlusNumber(item.LineWidth)) //刻度线宽度
12045
+ {
12046
+ this.Canvas.lineWidth=item.LineWidth*pixelRatio;
12047
+ bChangeLineWidth=true;
12048
+ }
12049
+
12040
12050
  this.Canvas.strokeStyle=item.LineColor;
12041
12051
  if (item.LineType==2)
12042
12052
  {
12043
- this.Canvas.save();
12044
12053
  if (item.LineDash) this.Canvas.setLineDash(item.LineDash);
12045
12054
  else this.Canvas.setLineDash([5*pixelRatio,5*pixelRatio]); //虚线
12046
12055
  this.Canvas.beginPath();
12047
12056
  this.Canvas.moveTo(left,yFixed);
12048
12057
  this.Canvas.lineTo(right,yFixed);
12049
12058
  this.Canvas.stroke();
12050
- this.Canvas.restore();
12059
+ this.Canvas.setLineDash([]);
12051
12060
  }
12052
12061
  else if (item.LineType==3) //只在刻度边上画一个短横线
12053
12062
  {
@@ -12076,6 +12085,11 @@ function AverageWidthFrame()
12076
12085
  this.Canvas.stroke();
12077
12086
  }
12078
12087
  }
12088
+
12089
+ if (bChangeLineWidth)
12090
+ {
12091
+ this.Canvas.lineWidth=pixelRatio;
12092
+ }
12079
12093
  }
12080
12094
 
12081
12095
  var yText=y;
@@ -22345,13 +22359,29 @@ function ChartKLine()
22345
22359
  this.Canvas.beginPath(); //最高-最低
22346
22360
  if (isHScreen)
22347
22361
  {
22348
- this.Canvas.moveTo(yHigh,ToFixedPoint(x));
22349
- this.Canvas.lineTo(yLow,ToFixedPoint(x));
22362
+ if (data.High==data.Low && dataWidth<4)
22363
+ {
22364
+ this.Canvas.moveTo(yHigh,ToFixedPoint(x));
22365
+ this.Canvas.lineTo(yLow-1,ToFixedPoint(x));
22366
+ }
22367
+ else
22368
+ {
22369
+ this.Canvas.moveTo(yHigh,ToFixedPoint(x));
22370
+ this.Canvas.lineTo(yLow,ToFixedPoint(x));
22371
+ }
22350
22372
  }
22351
22373
  else
22352
22374
  {
22353
- this.Canvas.moveTo(ToFixedPoint(x),yHigh);
22354
- this.Canvas.lineTo(ToFixedPoint(x),yLow);
22375
+ if (data.High==data.Low && dataWidth<4)
22376
+ {
22377
+ this.Canvas.moveTo(ToFixedPoint(x),yHigh);
22378
+ this.Canvas.lineTo(ToFixedPoint(x),yLow+1);
22379
+ }
22380
+ else
22381
+ {
22382
+ this.Canvas.moveTo(ToFixedPoint(x),yHigh);
22383
+ this.Canvas.lineTo(ToFixedPoint(x),yLow);
22384
+ }
22355
22385
  }
22356
22386
 
22357
22387
  this.Canvas.stroke();
@@ -23030,13 +23060,29 @@ function ChartKLine()
23030
23060
  this.Canvas.beginPath();
23031
23061
  if (isHScreen)
23032
23062
  {
23033
- this.Canvas.moveTo(yHigh,ToFixedPoint(x));
23034
- this.Canvas.lineTo(yLow,ToFixedPoint(x));
23063
+ if (data.High==data.Low)
23064
+ {
23065
+ this.Canvas.moveTo(yHigh,ToFixedPoint(x));
23066
+ this.Canvas.lineTo(yLow-1,ToFixedPoint(x));
23067
+ }
23068
+ else
23069
+ {
23070
+ this.Canvas.moveTo(yHigh,ToFixedPoint(x));
23071
+ this.Canvas.lineTo(yLow,ToFixedPoint(x));
23072
+ }
23035
23073
  }
23036
23074
  else
23037
23075
  {
23038
- this.Canvas.moveTo(ToFixedPoint(x),yHigh);
23039
- this.Canvas.lineTo(ToFixedPoint(x),yLow);
23076
+ if (data.High==data.Low)
23077
+ {
23078
+ this.Canvas.moveTo(ToFixedPoint(x),yHigh);
23079
+ this.Canvas.lineTo(ToFixedPoint(x),yLow+1);
23080
+ }
23081
+ else
23082
+ {
23083
+ this.Canvas.moveTo(ToFixedPoint(x),yHigh);
23084
+ this.Canvas.lineTo(ToFixedPoint(x),yLow);
23085
+ }
23040
23086
  }
23041
23087
  this.Canvas.strokeStyle=unchagneColor;
23042
23088
  this.Canvas.stroke();
@@ -6833,12 +6833,13 @@ function JSChartContainer(uielement, OffscreenElement)
6833
6833
  {
6834
6834
 
6835
6835
  }
6836
- else if (this.YDrag || this.UpDownDrag || this.RectSelectDrag)
6836
+ else if (this.YDrag || this.RectSelectDrag)
6837
6837
  {
6838
6838
 
6839
6839
  }
6840
6840
  else if (this.CurrentChartDrawPicture) //画图工具模式
6841
6841
  {
6842
+ this.UpDownDrag=null; //画图优先
6842
6843
  var drawPicture=this.CurrentChartDrawPicture;
6843
6844
  if (drawPicture.Status==2)
6844
6845
  this.SetChartDrawPictureThirdPoint(drag.Click.X,drag.Click.Y);
@@ -6863,6 +6864,7 @@ function JSChartContainer(uielement, OffscreenElement)
6863
6864
  {
6864
6865
  if (drawPictrueData.ChartDrawPicture.EnableMove==true)
6865
6866
  {
6867
+ this.UpDownDrag=null; //画图优先
6866
6868
  this.CurrentChartDrawPicture=drawPictrueData.ChartDrawPicture;
6867
6869
  this.SelectChartDrawPicture=drawPictrueData.ChartDrawPicture;
6868
6870
 
@@ -11280,6 +11282,7 @@ function CoordinateInfo()
11280
11282
  this.LineColor=g_JSChartResource.FrameSplitPen; //线段颜色
11281
11283
  this.LineDash=null; //当线段类型==2时 可以设置虚线样式
11282
11284
  this.LineType=1; //线段类型 -1 不画线段 2 虚线 8,9=集合竞价坐标
11285
+ this.LineWidth; //线段宽度
11283
11286
  this.ExtendData; //扩展属性
11284
11287
  //百分比 { PriceColor:, PercentageColor:, SplitColor:, Font: }
11285
11288
  //自定义刻度 { Custom:{ Position: 1=强制内部 }}
@@ -12081,17 +12084,23 @@ function AverageWidthFrame()
12081
12084
  var yFixed=ToFixedPoint(y);
12082
12085
  if (y!=bottom && this.IsShowYLine)
12083
12086
  {
12087
+ var bChangeLineWidth=false;
12088
+ if (IFrameSplitOperator.IsPlusNumber(item.LineWidth)) //刻度线宽度
12089
+ {
12090
+ this.Canvas.lineWidth=item.LineWidth*pixelRatio;
12091
+ bChangeLineWidth=true;
12092
+ }
12093
+
12084
12094
  this.Canvas.strokeStyle=item.LineColor;
12085
12095
  if (item.LineType==2)
12086
12096
  {
12087
- this.Canvas.save();
12088
12097
  if (item.LineDash) this.Canvas.setLineDash(item.LineDash);
12089
12098
  else this.Canvas.setLineDash([5*pixelRatio,5*pixelRatio]); //虚线
12090
12099
  this.Canvas.beginPath();
12091
12100
  this.Canvas.moveTo(left,yFixed);
12092
12101
  this.Canvas.lineTo(right,yFixed);
12093
12102
  this.Canvas.stroke();
12094
- this.Canvas.restore();
12103
+ this.Canvas.setLineDash([]);
12095
12104
  }
12096
12105
  else if (item.LineType==3) //只在刻度边上画一个短横线
12097
12106
  {
@@ -12120,6 +12129,11 @@ function AverageWidthFrame()
12120
12129
  this.Canvas.stroke();
12121
12130
  }
12122
12131
  }
12132
+
12133
+ if (bChangeLineWidth)
12134
+ {
12135
+ this.Canvas.lineWidth=pixelRatio;
12136
+ }
12123
12137
  }
12124
12138
 
12125
12139
  var yText=y;
@@ -22389,13 +22403,29 @@ function ChartKLine()
22389
22403
  this.Canvas.beginPath(); //最高-最低
22390
22404
  if (isHScreen)
22391
22405
  {
22392
- this.Canvas.moveTo(yHigh,ToFixedPoint(x));
22393
- this.Canvas.lineTo(yLow,ToFixedPoint(x));
22406
+ if (data.High==data.Low && dataWidth<4)
22407
+ {
22408
+ this.Canvas.moveTo(yHigh,ToFixedPoint(x));
22409
+ this.Canvas.lineTo(yLow-1,ToFixedPoint(x));
22410
+ }
22411
+ else
22412
+ {
22413
+ this.Canvas.moveTo(yHigh,ToFixedPoint(x));
22414
+ this.Canvas.lineTo(yLow,ToFixedPoint(x));
22415
+ }
22394
22416
  }
22395
22417
  else
22396
22418
  {
22397
- this.Canvas.moveTo(ToFixedPoint(x),yHigh);
22398
- this.Canvas.lineTo(ToFixedPoint(x),yLow);
22419
+ if (data.High==data.Low && dataWidth<4)
22420
+ {
22421
+ this.Canvas.moveTo(ToFixedPoint(x),yHigh);
22422
+ this.Canvas.lineTo(ToFixedPoint(x),yLow+1);
22423
+ }
22424
+ else
22425
+ {
22426
+ this.Canvas.moveTo(ToFixedPoint(x),yHigh);
22427
+ this.Canvas.lineTo(ToFixedPoint(x),yLow);
22428
+ }
22399
22429
  }
22400
22430
 
22401
22431
  this.Canvas.stroke();
@@ -23074,13 +23104,29 @@ function ChartKLine()
23074
23104
  this.Canvas.beginPath();
23075
23105
  if (isHScreen)
23076
23106
  {
23077
- this.Canvas.moveTo(yHigh,ToFixedPoint(x));
23078
- this.Canvas.lineTo(yLow,ToFixedPoint(x));
23107
+ if (data.High==data.Low)
23108
+ {
23109
+ this.Canvas.moveTo(yHigh,ToFixedPoint(x));
23110
+ this.Canvas.lineTo(yLow-1,ToFixedPoint(x));
23111
+ }
23112
+ else
23113
+ {
23114
+ this.Canvas.moveTo(yHigh,ToFixedPoint(x));
23115
+ this.Canvas.lineTo(yLow,ToFixedPoint(x));
23116
+ }
23079
23117
  }
23080
23118
  else
23081
23119
  {
23082
- this.Canvas.moveTo(ToFixedPoint(x),yHigh);
23083
- this.Canvas.lineTo(ToFixedPoint(x),yLow);
23120
+ if (data.High==data.Low)
23121
+ {
23122
+ this.Canvas.moveTo(ToFixedPoint(x),yHigh);
23123
+ this.Canvas.lineTo(ToFixedPoint(x),yLow+1);
23124
+ }
23125
+ else
23126
+ {
23127
+ this.Canvas.moveTo(ToFixedPoint(x),yHigh);
23128
+ this.Canvas.lineTo(ToFixedPoint(x),yLow);
23129
+ }
23084
23130
  }
23085
23131
  this.Canvas.strokeStyle=unchagneColor;
23086
23132
  this.Canvas.stroke();