Skip to content

Commit

Permalink
ver 11464
Browse files Browse the repository at this point in the history
11463 修正PtInFrameY()叠加指标报错
11461 分钟异动修正横屏模式无法设置颜色
11460 小程序分时异动支持2.0数据格式
11456 叠加指标支持UPDOWNDOT
  • Loading branch information
jones2000 committed Oct 19, 2022
1 parent 8714d0b commit 8e3784e
Show file tree
Hide file tree
Showing 10 changed files with 99 additions and 25 deletions.
17 changes: 13 additions & 4 deletions umychart_uniapp_h5/umychart.uniapp.h5.js
Original file line number Diff line number Diff line change
Expand Up @@ -18769,6 +18769,7 @@ function HQTradeFrame()
for(var j=0;j<item.OverlayIndex.length;++j)
{
var overlayItem=item.OverlayIndex[j];
if (!overlayItem.RightWidth || !IFrameSplitOperator.IsNumber(overlayItem.RightWidth.Width)) continue;
var overlayWidth=overlayItem.RightWidth.Width;

item.Frame.Canvas.beginPath();
Expand Down Expand Up @@ -28600,8 +28601,6 @@ function ChartPointDot()
else this.Canvas.arc(x, y, this.Radius, 0, Math.PI*2, true);
this.Canvas.closePath();
this.Canvas.fill();

preValue=value;
}

this.Canvas.restore();
Expand Down Expand Up @@ -31632,6 +31631,10 @@ function ChartMinuteInfo()

this.FixHScreenTextRect(rtBorder,xData);
var InfoDrawItem={ Border:rtBorder, Start:{X:x,Y:y}, IsLeft:isDrawLeft, Title:showItem.Title };
if (showItem.Content) InfoDrawItem.Content=showItem.Content;
if (showItem.Link) InfoDrawItem.Link=showItem.Link;
if (showItem.Color) InfoDrawItem.Color=showItem.Color;
if (showItem.BGColor) InfoDrawItem.BGColor=showItem.BGColor;

this.InfoDrawCache.push(InfoDrawItem);
this.TextRectCache.push(rtBorder);
Expand Down Expand Up @@ -99881,7 +99884,7 @@ function OverlayScriptIndex(name,script,args,option)
}
else if (item.Type==3)
{
this.CreatePointDot(hqChart,windowIndex,item,i);
this.CreatePointDot(hqChart,windowIndex,item,i, hisData);
}
else if (item.Type==4)
{
Expand Down Expand Up @@ -100058,7 +100061,7 @@ function OverlayScriptIndex(name,script,args,option)
frame.ChartPaint.push(chart);
}

this.CreatePointDot=function(hqChart,windowIndex,varItem,id)
this.CreatePointDot=function(hqChart,windowIndex,varItem,id,hisData)
{
var overlayIndex=this.OverlayIndex;
var frame=overlayIndex.Frame;
Expand All @@ -100079,6 +100082,12 @@ function OverlayScriptIndex(name,script,args,option)
if (!isNaN(width) && width>0) chart.Radius=width;
}

if (IFrameSplitOperator.IsBool(varItem.UpDownDot))
{
chart.EnableUpDownColor=varItem.UpDownDot;
chart.HistoryData=hisData;
}

let titleIndex=windowIndex+1;
chart.Data.Data=varItem.Data;
var titlePaint=hqChart.TitlePaint[titleIndex];
Expand Down
10 changes: 8 additions & 2 deletions vuehqchart/src/jscommon/umychart.complier.js
Original file line number Diff line number Diff line change
Expand Up @@ -19797,7 +19797,7 @@ function OverlayScriptIndex(name,script,args,option)
}
else if (item.Type==3)
{
this.CreatePointDot(hqChart,windowIndex,item,i);
this.CreatePointDot(hqChart,windowIndex,item,i, hisData);
}
else if (item.Type==4)
{
Expand Down Expand Up @@ -19974,7 +19974,7 @@ function OverlayScriptIndex(name,script,args,option)
frame.ChartPaint.push(chart);
}

this.CreatePointDot=function(hqChart,windowIndex,varItem,id)
this.CreatePointDot=function(hqChart,windowIndex,varItem,id,hisData)
{
var overlayIndex=this.OverlayIndex;
var frame=overlayIndex.Frame;
Expand All @@ -19995,6 +19995,12 @@ function OverlayScriptIndex(name,script,args,option)
if (!isNaN(width) && width>0) chart.Radius=width;
}

if (IFrameSplitOperator.IsBool(varItem.UpDownDot))
{
chart.EnableUpDownColor=varItem.UpDownDot;
chart.HistoryData=hisData;
}

let titleIndex=windowIndex+1;
chart.Data.Data=varItem.Data;
var titlePaint=hqChart.TitlePaint[titleIndex];
Expand Down
7 changes: 5 additions & 2 deletions vuehqchart/src/jscommon/umychart.js
Original file line number Diff line number Diff line change
Expand Up @@ -14707,6 +14707,7 @@ function HQTradeFrame()
for(var j=0;j<item.OverlayIndex.length;++j)
{
var overlayItem=item.OverlayIndex[j];
if (!overlayItem.RightWidth || !IFrameSplitOperator.IsNumber(overlayItem.RightWidth.Width)) continue;
var overlayWidth=overlayItem.RightWidth.Width;

item.Frame.Canvas.beginPath();
Expand Down Expand Up @@ -24538,8 +24539,6 @@ function ChartPointDot()
else this.Canvas.arc(x, y, this.Radius, 0, Math.PI*2, true);
this.Canvas.closePath();
this.Canvas.fill();

preValue=value;
}

this.Canvas.restore();
Expand Down Expand Up @@ -27570,6 +27569,10 @@ function ChartMinuteInfo()

this.FixHScreenTextRect(rtBorder,xData);
var InfoDrawItem={ Border:rtBorder, Start:{X:x,Y:y}, IsLeft:isDrawLeft, Title:showItem.Title };
if (showItem.Content) InfoDrawItem.Content=showItem.Content;
if (showItem.Link) InfoDrawItem.Link=showItem.Link;
if (showItem.Color) InfoDrawItem.Color=showItem.Color;
if (showItem.BGColor) InfoDrawItem.BGColor=showItem.BGColor;

this.InfoDrawCache.push(InfoDrawItem);
this.TextRectCache.push(rtBorder);
Expand Down
17 changes: 13 additions & 4 deletions vuehqchart/src/jscommon/umychart.vue/umychart.vue.js
Original file line number Diff line number Diff line change
Expand Up @@ -18813,6 +18813,7 @@ function HQTradeFrame()
for(var j=0;j<item.OverlayIndex.length;++j)
{
var overlayItem=item.OverlayIndex[j];
if (!overlayItem.RightWidth || !IFrameSplitOperator.IsNumber(overlayItem.RightWidth.Width)) continue;
var overlayWidth=overlayItem.RightWidth.Width;

item.Frame.Canvas.beginPath();
Expand Down Expand Up @@ -28644,8 +28645,6 @@ function ChartPointDot()
else this.Canvas.arc(x, y, this.Radius, 0, Math.PI*2, true);
this.Canvas.closePath();
this.Canvas.fill();

preValue=value;
}

this.Canvas.restore();
Expand Down Expand Up @@ -31676,6 +31675,10 @@ function ChartMinuteInfo()

this.FixHScreenTextRect(rtBorder,xData);
var InfoDrawItem={ Border:rtBorder, Start:{X:x,Y:y}, IsLeft:isDrawLeft, Title:showItem.Title };
if (showItem.Content) InfoDrawItem.Content=showItem.Content;
if (showItem.Link) InfoDrawItem.Link=showItem.Link;
if (showItem.Color) InfoDrawItem.Color=showItem.Color;
if (showItem.BGColor) InfoDrawItem.BGColor=showItem.BGColor;

this.InfoDrawCache.push(InfoDrawItem);
this.TextRectCache.push(rtBorder);
Expand Down Expand Up @@ -99925,7 +99928,7 @@ function OverlayScriptIndex(name,script,args,option)
}
else if (item.Type==3)
{
this.CreatePointDot(hqChart,windowIndex,item,i);
this.CreatePointDot(hqChart,windowIndex,item,i, hisData);
}
else if (item.Type==4)
{
Expand Down Expand Up @@ -100102,7 +100105,7 @@ function OverlayScriptIndex(name,script,args,option)
frame.ChartPaint.push(chart);
}

this.CreatePointDot=function(hqChart,windowIndex,varItem,id)
this.CreatePointDot=function(hqChart,windowIndex,varItem,id,hisData)
{
var overlayIndex=this.OverlayIndex;
var frame=overlayIndex.Frame;
Expand All @@ -100123,6 +100126,12 @@ function OverlayScriptIndex(name,script,args,option)
if (!isNaN(width) && width>0) chart.Radius=width;
}

if (IFrameSplitOperator.IsBool(varItem.UpDownDot))
{
chart.EnableUpDownColor=varItem.UpDownDot;
chart.HistoryData=hisData;
}

let titleIndex=windowIndex+1;
chart.Data.Data=varItem.Data;
var titlePaint=hqChart.TitlePaint[titleIndex];
Expand Down
10 changes: 8 additions & 2 deletions webhqchart.demo/jscommon/umychart.complier.js
Original file line number Diff line number Diff line change
Expand Up @@ -19797,7 +19797,7 @@ function OverlayScriptIndex(name,script,args,option)
}
else if (item.Type==3)
{
this.CreatePointDot(hqChart,windowIndex,item,i);
this.CreatePointDot(hqChart,windowIndex,item,i, hisData);
}
else if (item.Type==4)
{
Expand Down Expand Up @@ -19974,7 +19974,7 @@ function OverlayScriptIndex(name,script,args,option)
frame.ChartPaint.push(chart);
}

this.CreatePointDot=function(hqChart,windowIndex,varItem,id)
this.CreatePointDot=function(hqChart,windowIndex,varItem,id,hisData)
{
var overlayIndex=this.OverlayIndex;
var frame=overlayIndex.Frame;
Expand All @@ -19995,6 +19995,12 @@ function OverlayScriptIndex(name,script,args,option)
if (!isNaN(width) && width>0) chart.Radius=width;
}

if (IFrameSplitOperator.IsBool(varItem.UpDownDot))
{
chart.EnableUpDownColor=varItem.UpDownDot;
chart.HistoryData=hisData;
}

let titleIndex=windowIndex+1;
chart.Data.Data=varItem.Data;
var titlePaint=hqChart.TitlePaint[titleIndex];
Expand Down
7 changes: 5 additions & 2 deletions webhqchart.demo/jscommon/umychart.js
Original file line number Diff line number Diff line change
Expand Up @@ -14707,6 +14707,7 @@ function HQTradeFrame()
for(var j=0;j<item.OverlayIndex.length;++j)
{
var overlayItem=item.OverlayIndex[j];
if (!overlayItem.RightWidth || !IFrameSplitOperator.IsNumber(overlayItem.RightWidth.Width)) continue;
var overlayWidth=overlayItem.RightWidth.Width;

item.Frame.Canvas.beginPath();
Expand Down Expand Up @@ -24538,8 +24539,6 @@ function ChartPointDot()
else this.Canvas.arc(x, y, this.Radius, 0, Math.PI*2, true);
this.Canvas.closePath();
this.Canvas.fill();

preValue=value;
}

this.Canvas.restore();
Expand Down Expand Up @@ -27570,6 +27569,10 @@ function ChartMinuteInfo()

this.FixHScreenTextRect(rtBorder,xData);
var InfoDrawItem={ Border:rtBorder, Start:{X:x,Y:y}, IsLeft:isDrawLeft, Title:showItem.Title };
if (showItem.Content) InfoDrawItem.Content=showItem.Content;
if (showItem.Link) InfoDrawItem.Link=showItem.Link;
if (showItem.Color) InfoDrawItem.Color=showItem.Color;
if (showItem.BGColor) InfoDrawItem.BGColor=showItem.BGColor;

this.InfoDrawCache.push(InfoDrawItem);
this.TextRectCache.push(rtBorder);
Expand Down
10 changes: 8 additions & 2 deletions webhqchart/umychart.complier.js
Original file line number Diff line number Diff line change
Expand Up @@ -19797,7 +19797,7 @@ function OverlayScriptIndex(name,script,args,option)
}
else if (item.Type==3)
{
this.CreatePointDot(hqChart,windowIndex,item,i);
this.CreatePointDot(hqChart,windowIndex,item,i, hisData);
}
else if (item.Type==4)
{
Expand Down Expand Up @@ -19974,7 +19974,7 @@ function OverlayScriptIndex(name,script,args,option)
frame.ChartPaint.push(chart);
}

this.CreatePointDot=function(hqChart,windowIndex,varItem,id)
this.CreatePointDot=function(hqChart,windowIndex,varItem,id,hisData)
{
var overlayIndex=this.OverlayIndex;
var frame=overlayIndex.Frame;
Expand All @@ -19995,6 +19995,12 @@ function OverlayScriptIndex(name,script,args,option)
if (!isNaN(width) && width>0) chart.Radius=width;
}

if (IFrameSplitOperator.IsBool(varItem.UpDownDot))
{
chart.EnableUpDownColor=varItem.UpDownDot;
chart.HistoryData=hisData;
}

let titleIndex=windowIndex+1;
chart.Data.Data=varItem.Data;
var titlePaint=hqChart.TitlePaint[titleIndex];
Expand Down
7 changes: 5 additions & 2 deletions webhqchart/umychart.js
Original file line number Diff line number Diff line change
Expand Up @@ -14707,6 +14707,7 @@ function HQTradeFrame()
for(var j=0;j<item.OverlayIndex.length;++j)
{
var overlayItem=item.OverlayIndex[j];
if (!overlayItem.RightWidth || !IFrameSplitOperator.IsNumber(overlayItem.RightWidth.Width)) continue;
var overlayWidth=overlayItem.RightWidth.Width;

item.Frame.Canvas.beginPath();
Expand Down Expand Up @@ -24538,8 +24539,6 @@ function ChartPointDot()
else this.Canvas.arc(x, y, this.Radius, 0, Math.PI*2, true);
this.Canvas.closePath();
this.Canvas.fill();

preValue=value;
}

this.Canvas.restore();
Expand Down Expand Up @@ -27570,6 +27569,10 @@ function ChartMinuteInfo()

this.FixHScreenTextRect(rtBorder,xData);
var InfoDrawItem={ Border:rtBorder, Start:{X:x,Y:y}, IsLeft:isDrawLeft, Title:showItem.Title };
if (showItem.Content) InfoDrawItem.Content=showItem.Content;
if (showItem.Link) InfoDrawItem.Link=showItem.Link;
if (showItem.Color) InfoDrawItem.Color=showItem.Color;
if (showItem.BGColor) InfoDrawItem.BGColor=showItem.BGColor;

this.InfoDrawCache.push(InfoDrawItem);
this.TextRectCache.push(rtBorder);
Expand Down
14 changes: 12 additions & 2 deletions wechathqchart/umychart.chartpaint.wechat.js
Original file line number Diff line number Diff line change
Expand Up @@ -4925,6 +4925,10 @@ function ChartMinuteInfo()

this.FixTextRect(rtBorder, yData);
var InfoDrawItem = { Border: rtBorder, Start: { X: x, Y: y }, IsLeft: isDrawLeft, Title: showItem.Title };
if (showItem.Content) InfoDrawItem.Content=showItem.Content;
if (showItem.Link) InfoDrawItem.Link=showItem.Link;
if (showItem.Color) InfoDrawItem.Color=showItem.Color;
if (showItem.BGColor) InfoDrawItem.BGColor=showItem.BGColor;

this.InfoDrawCache.push(InfoDrawItem);
this.TextRectCache.push(rtBorder);
Expand Down Expand Up @@ -4963,6 +4967,10 @@ function ChartMinuteInfo()

this.FixHScreenTextRect(rtBorder, xData);
var InfoDrawItem = { Border: rtBorder, Start: { X: x, Y: y }, IsLeft: isDrawLeft, Title: showItem.Title };
if (showItem.Content) InfoDrawItem.Content=showItem.Content;
if (showItem.Link) InfoDrawItem.Link=showItem.Link;
if (showItem.Color) InfoDrawItem.Color=showItem.Color;
if (showItem.BGColor) InfoDrawItem.BGColor=showItem.BGColor;

this.InfoDrawCache.push(InfoDrawItem);
this.TextRectCache.push(rtBorder);
Expand Down Expand Up @@ -4997,7 +5005,8 @@ function ChartMinuteInfo()
{
var rtBorder = item.Border;
var x = rtBorder.X, y = rtBorder.Y;
this.Canvas.fillStyle = this.TextBGColor;
if (item.BGColor) this.Canvas.fillStyle=item.BGColor
else this.Canvas.fillStyle = this.TextBGColor;
this.Canvas.fillRect(x, y, rtBorder.Width, rtBorder.Height);

this.Canvas.strokeStyle = this.LineColor;
Expand All @@ -5015,7 +5024,8 @@ function ChartMinuteInfo()

this.Canvas.textAlign = 'left'
this.Canvas.textBaseline = 'middle';
this.Canvas.fillStyle = this.TextColor;
if (item.Color) this.Canvas.fillStyle=item.Color;
else this.Canvas.fillStyle = this.TextColor;
this.Canvas.font = this.Font;
if (this.IsHScreen) this.Canvas.fillText(item.Title, x + 2, y - rtBorder.Width / 2);
else this.Canvas.fillText(item.Title, x+2, y + rtBorder.Height / 2);
Expand Down
25 changes: 22 additions & 3 deletions wechathqchart/umychart.klineinfo.wechat.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ import {
g_JSChartResource,
} from './umychart.resource.wechat.js'

import
{
IFrameSplitOperator,
} from './umychart.framesplit.wechat.js'

var KLINE_INFO_TYPE=
{
INVESTOR:1, //互动易
Expand Down Expand Up @@ -759,9 +764,23 @@ function MarketEventInfo()
for (var j in event.data)
{
var item = event.data[j];
if (item.length < 2) continue;
var info = { Date: event.date, Time: item[0], Title: item[1], Type: 0 };
this.Data.push(info);
if (Array.isArray(item))
{
if (item.length < 2) continue;
var info = { Date: event.date, Time: item[0], Title: item[1], Type: 0 };
this.Data.push(info);
}
else //2.0 格式
{
if (!IFrameSplitOperator.IsNumber(item.Date) || !IFrameSplitOperator.IsNumber(item.Time) || !item.Title) continue;
var info={ Date:item.Date, Time:item.Time, Title:item.Title, Type:0 };
if (item.Color) info.Color=item.Color;
if (item.BGColor) info.BGColor=item.BGColor;
if (IFrameSplitOperator.IsNumber(item.Price)) info.Price=item.Price;
if (item.Content) info.Content=item.Content;
if (item.Link) info.Link=item.Link;
this.Data.push(info);
}
}
}

Expand Down

0 comments on commit 8e3784e

Please sign in to comment.