hqchart 1.1.13409 → 1.1.13441
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/lib/umychart.NetworkFilterTest.vue.js +3 -2
- package/lib/umychart.vue.js +31 -17
- package/package.json +1 -1
- package/src/jscommon/umychart.NetworkFilterTest.js +34 -0
- package/src/jscommon/umychart.complier.js +54 -0
- package/src/jscommon/umychart.index.data.js +16 -0
- package/src/jscommon/umychart.js +104 -5
- package/src/jscommon/umychart.testdata/000001.sh.day.kline.js +79866 -0
- package/src/jscommon/umychart.testdata/399001.sz.day.kline.js +78515 -0
- package/src/jscommon/umychart.testdata.js +34 -0
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +185 -9
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.NetworkFilterTest.vue.js +34 -0
- package/src/jscommon/umychart.vue/umychart.vue.js +175 -6
package/src/jscommon/umychart.js
CHANGED
|
@@ -2579,7 +2579,7 @@ var JSCHART_EVENT_ID=
|
|
|
2579
2579
|
|
|
2580
2580
|
|
|
2581
2581
|
ON_CHANGE_INDEX:150, //切换指标
|
|
2582
|
-
ON_MENU_COMMAND:151,
|
|
2582
|
+
ON_MENU_COMMAND:151, //菜单事件回调
|
|
2583
2583
|
ON_CREATE_RIGHT_MENU:152, //创建右键菜单
|
|
2584
2584
|
|
|
2585
2585
|
ON_FORMAT_CALL_AUCTION_INDEX_TITLE:153, //集合竞价指标窗口标题内容
|
|
@@ -11215,7 +11215,19 @@ function AverageWidthFrame()
|
|
|
11215
11215
|
}
|
|
11216
11216
|
else //显示第1行
|
|
11217
11217
|
{
|
|
11218
|
-
|
|
11218
|
+
var text=item.Message[1][0];
|
|
11219
|
+
|
|
11220
|
+
if (item.TextColor2) this.Canvas.fillStyle=item.TextColor2;
|
|
11221
|
+
if (rightExtendText && rightExtendText.Align===2 && this.YRightTextInfo) //右对齐
|
|
11222
|
+
{
|
|
11223
|
+
this.Canvas.textAlign="right";
|
|
11224
|
+
var xRight=this.YRightTextInfo.MainTextWidth+right-this.YTextPadding[1];
|
|
11225
|
+
this.Canvas.fillText(text,xRight,yText);
|
|
11226
|
+
}
|
|
11227
|
+
else
|
|
11228
|
+
{
|
|
11229
|
+
this.Canvas.fillText(text,xText+this.YTextPadding[1],yText);
|
|
11230
|
+
}
|
|
11219
11231
|
}
|
|
11220
11232
|
}
|
|
11221
11233
|
else
|
|
@@ -11225,7 +11237,7 @@ function AverageWidthFrame()
|
|
|
11225
11237
|
if (!rtPreRight || (rtRight && !this.IsTextTopBottomOverlap(rtRight,rtPreRight)))
|
|
11226
11238
|
{
|
|
11227
11239
|
if (item.TextColor2) this.Canvas.fillStyle=item.TextColor2;
|
|
11228
|
-
if (rightExtendText && rightExtendText.Align===2 && this.YRightTextInfo)
|
|
11240
|
+
if (rightExtendText && rightExtendText.Align===2 && this.YRightTextInfo) //右对齐
|
|
11229
11241
|
{
|
|
11230
11242
|
this.Canvas.textAlign="right";
|
|
11231
11243
|
var xRight=this.YRightTextInfo.MainTextWidth+right-this.YTextPadding[1];
|
|
@@ -20755,6 +20767,7 @@ function ChartData()
|
|
|
20755
20767
|
var yClose=this.Data[index].YClose;
|
|
20756
20768
|
|
|
20757
20769
|
result[index]=HistoryData.Copy(this.Data[index]);
|
|
20770
|
+
result[index].RightSeed=seed;
|
|
20758
20771
|
|
|
20759
20772
|
for(--index; index>=0; --index)
|
|
20760
20773
|
{
|
|
@@ -20785,6 +20798,7 @@ function ChartData()
|
|
|
20785
20798
|
var seed=1;
|
|
20786
20799
|
var close=this.Data[index].Close;
|
|
20787
20800
|
result[index]=HistoryData.Copy(this.Data[index]);
|
|
20801
|
+
result[index].RightSeed=seed;
|
|
20788
20802
|
|
|
20789
20803
|
for(++index;index<this.Data.length;++index)
|
|
20790
20804
|
{
|
|
@@ -31114,6 +31128,86 @@ function ChartOverlayLine()
|
|
|
31114
31128
|
}
|
|
31115
31129
|
}
|
|
31116
31130
|
|
|
31131
|
+
//独立线段
|
|
31132
|
+
function ChartSingleLine()
|
|
31133
|
+
{
|
|
31134
|
+
this.newMethod=ChartLine; //派生
|
|
31135
|
+
this.newMethod();
|
|
31136
|
+
delete this.newMethod;
|
|
31137
|
+
|
|
31138
|
+
this.ClassName='ChartSingleLine'; //类名
|
|
31139
|
+
this.MaxMin=null; //当前的显示范围
|
|
31140
|
+
|
|
31141
|
+
this.Draw=function()
|
|
31142
|
+
{
|
|
31143
|
+
this.MaxMin=null;
|
|
31144
|
+
if (!this.IsShow || this.ChartFrame.IsMinSize || !this.IsVisible) return;
|
|
31145
|
+
if (this.IsShowIndexTitleOnly()) return;
|
|
31146
|
+
if (this.IsHideScriptIndex()) return;
|
|
31147
|
+
|
|
31148
|
+
if (!this.Data || !this.Data.Data) return;
|
|
31149
|
+
|
|
31150
|
+
this.MaxMin=this.GetCurrentMaxMin();
|
|
31151
|
+
if (!this.MaxMin) return;
|
|
31152
|
+
if (!IFrameSplitOperator.IsNumber(this.MaxMin.Max) || !IFrameSplitOperator.IsNumber(this.MaxMin.Min)) return;
|
|
31153
|
+
|
|
31154
|
+
switch(this.DrawType)
|
|
31155
|
+
{
|
|
31156
|
+
|
|
31157
|
+
default:
|
|
31158
|
+
return this.DrawStraightLine();
|
|
31159
|
+
}
|
|
31160
|
+
}
|
|
31161
|
+
|
|
31162
|
+
//获取当前页的最大最小值
|
|
31163
|
+
this.GetCurrentMaxMin=function()
|
|
31164
|
+
{
|
|
31165
|
+
var xPointCount=this.ChartFrame.XPointCount;
|
|
31166
|
+
var range={ Max:null, Min:null };
|
|
31167
|
+
|
|
31168
|
+
for(var i=this.Data.DataOffset,j=0;i<this.Data.Data.length && j<xPointCount;++i,++j)
|
|
31169
|
+
{
|
|
31170
|
+
var value=this.Data.Data[i];
|
|
31171
|
+
if (!IFrameSplitOperator.IsNumber(value)) continue;
|
|
31172
|
+
|
|
31173
|
+
if (range.Max==null) range.Max=value;
|
|
31174
|
+
if (range.Min==null) range.Min=value;
|
|
31175
|
+
|
|
31176
|
+
if (range.Max<value) range.Max=value;
|
|
31177
|
+
if (range.Min>value) range.Min=value;
|
|
31178
|
+
}
|
|
31179
|
+
|
|
31180
|
+
return range;
|
|
31181
|
+
}
|
|
31182
|
+
|
|
31183
|
+
this.GetMaxMin=function()
|
|
31184
|
+
{
|
|
31185
|
+
return { Max:null, Min:null };
|
|
31186
|
+
}
|
|
31187
|
+
|
|
31188
|
+
this.GetYFromData=function(value)
|
|
31189
|
+
{
|
|
31190
|
+
var bHScreen = (this.ChartFrame.IsHScreen === true);
|
|
31191
|
+
|
|
31192
|
+
if (bHScreen)
|
|
31193
|
+
{
|
|
31194
|
+
if (value <= this.MaxMin.Min) return this.ChartBorder.GetLeftEx();
|
|
31195
|
+
if (value >= this.MaxMin.Max) return this.ChartBorder.GetRightEx();
|
|
31196
|
+
|
|
31197
|
+
var width = this.ChartBorder.GetWidthEx() * (value - this.MaxMin.Min) / (this.MaxMin.Max - this.MaxMin.Min);
|
|
31198
|
+
return this.ChartBorder.GetLeftEx() + width;
|
|
31199
|
+
}
|
|
31200
|
+
else
|
|
31201
|
+
{
|
|
31202
|
+
if(value<=this.MaxMin.Min) return this.ChartBorder.GetBottomEx();
|
|
31203
|
+
if(value>=this.MaxMin.Max) return this.ChartBorder.GetTopEx();
|
|
31204
|
+
|
|
31205
|
+
var height=this.ChartBorder.GetHeightEx()*(value-this.MaxMin.Min)/(this.MaxMin.Max-this.MaxMin.Min);
|
|
31206
|
+
return this.ChartBorder.GetBottomEx()-height;
|
|
31207
|
+
}
|
|
31208
|
+
}
|
|
31209
|
+
}
|
|
31210
|
+
|
|
31117
31211
|
//彩色线段
|
|
31118
31212
|
function ChartPartLine()
|
|
31119
31213
|
{
|
|
@@ -31884,6 +31978,8 @@ function ChartVolStick()
|
|
|
31884
31978
|
|
|
31885
31979
|
var yBottom=this.ChartFrame.GetYFromData(0);
|
|
31886
31980
|
|
|
31981
|
+
this.Canvas.save();
|
|
31982
|
+
|
|
31887
31983
|
if (dataWidth>=4 && !(this.BarWidth===1))
|
|
31888
31984
|
{
|
|
31889
31985
|
yBottom=ToFixedRect(yBottom);
|
|
@@ -31925,6 +32021,7 @@ function ChartVolStick()
|
|
|
31925
32021
|
{
|
|
31926
32022
|
var preKItem=null;
|
|
31927
32023
|
var barColor=null;
|
|
32024
|
+
this.Canvas.linewidth=1*GetDevicePixelRatio();
|
|
31928
32025
|
for(var i=this.Data.DataOffset,j=0;i<this.Data.Data.length && j<xPointCount;++i,++j,xOffset+=(dataWidth+distanceWidth))
|
|
31929
32026
|
{
|
|
31930
32027
|
var value=this.Data.Data[i];
|
|
@@ -31959,6 +32056,8 @@ function ChartVolStick()
|
|
|
31959
32056
|
preKItem=kItem;
|
|
31960
32057
|
}
|
|
31961
32058
|
}
|
|
32059
|
+
|
|
32060
|
+
this.Canvas.restore();
|
|
31962
32061
|
}
|
|
31963
32062
|
|
|
31964
32063
|
this.HScreenDraw=function() //横屏画法
|
|
@@ -34034,8 +34133,8 @@ function ChartMinutePriceLine()
|
|
|
34034
34133
|
if (isHScreen===true) chartright=this.ChartBorder.GetBottom();
|
|
34035
34134
|
var xPointCount=this.ChartFrame.XPointCount;
|
|
34036
34135
|
var minuteCount=this.ChartFrame.MinuteCount;
|
|
34037
|
-
var bottom=this.ChartBorder.
|
|
34038
|
-
var left=this.ChartBorder.
|
|
34136
|
+
var bottom=this.ChartBorder.GetBottom();
|
|
34137
|
+
var left=this.ChartBorder.GetLeft();
|
|
34039
34138
|
var data=this.Data;
|
|
34040
34139
|
|
|
34041
34140
|
this.DrawBeforeOpen(); //盘前
|