Skip to content

Commit

Permalink
ver 13760
Browse files Browse the repository at this point in the history
13759 修改ChartDrawHLine右侧标签页显示样式
13756 ChartDrawHLine 代码重构,增加限制只显示在对应的窗口范围内
13752 小程序指标脚本增加函数LINEDASH()
13751 指标脚本增加函数LINEDASH()
13750 修改DOTLINE代码逻辑
13749 小程序增加DOTLINE虚线设置
13748 小程序修正黑色风格下指标数值箭头颜色配置错误
13747 ChartClipColorStick修正没有获取当前屏第1个数据的,上一条数据。
13745 ChartClipColorStick上下增加数值显示
13744 ChartClipColorStick增加差值同向显示
  • Loading branch information
jones2000 committed Aug 26, 2024
1 parent 3e91f05 commit cba8c1c
Show file tree
Hide file tree
Showing 18 changed files with 2,042 additions and 634 deletions.
523 changes: 397 additions & 126 deletions umychart_uniapp_h5/umychart.uniapp.h5.js

Large diffs are not rendered by default.

28 changes: 27 additions & 1 deletion vuehqchart/src/jscommon/umychart.complier.js
Original file line number Diff line number Diff line change
Expand Up @@ -10528,6 +10528,12 @@ function JSDraw(errorHandler,symbolData)
return offset;
}

this.LINEDASH=function(aryData)
{
if (IFrameSplitOperator.IsNonEmptyArray(aryData)) return aryData.slice();
return [];
}

this.KLINETYPE=function(type)
{
return type;
Expand Down Expand Up @@ -17399,6 +17405,7 @@ function JSExecute(ast,option)
var isFirstDraw=null;
let xOffset=null, yOffset=null;
var klineType=null;
var lineDash=null;
for(let j=0; j<item.Expression.Expression.length; ++j)
{
let itemExpression=item.Expression.Expression[j];
Expand Down Expand Up @@ -17527,6 +17534,11 @@ function JSExecute(ast,option)
{
yOffset=itemExpression.Out;
}
else if (itemExpression.Callee.Name=="LINEDASH")
{
if (IFrameSplitOperator.IsNonEmptyArray(itemExpression.Out))
lineDash=itemExpression.Out.slice();
}
else if (itemExpression.Callee.Name=="FIRSTDRAW")
{
if (itemExpression.Out===0) isFirstDraw=false;
Expand Down Expand Up @@ -17691,6 +17703,7 @@ function JSExecute(ast,option)
if (isShow == false) value.IsShow = false;
if (isExData==true) value.IsExData = true;
if (isDotLine==true) value.IsDotLine=true;
if (IFrameSplitOperator.IsNonEmptyArray(lineDash)) value.LineDash=lineDash;
if (isOverlayLine==true) value.IsOverlayLine=true;
if (isSingleLine==true) value.IsSingleLine=true;
if (isNoneName==true) value.NoneName=true;
Expand All @@ -17703,6 +17716,7 @@ function JSExecute(ast,option)
var outVar={Name:draw.Name, Draw:draw, Type:1};
if (color) outVar.Color=color;
if (isDotLine==true) outVar.IsDotLine=true;
if (IFrameSplitOperator.IsNonEmptyArray(lineDash)) outVar.LineDash=lineDash;
if (lineWidth) outVar.LineWidth=lineWidth;
if (isDrawAbove) outVar.IsDrawAbove=true;
if (isDrawCenter) outVar.IsDrawCenter=true;
Expand All @@ -17727,6 +17741,7 @@ function JSExecute(ast,option)
if (isShow==false) value.IsShow=false;
if (isExData==true) value.IsExData = true;
if (isDotLine==true) value.IsDotLine=true;
if (IFrameSplitOperator.IsNonEmptyArray(lineDash)) value.LineDash=lineDash;
if (isOverlayLine==true) value.IsOverlayLine=true;
if (isSingleLine==true) value.IsSingleLine=true;
if (isShowTitle==false) value.IsShowTitle=false;
Expand Down Expand Up @@ -18214,6 +18229,9 @@ function JSExecute(ast,option)
case "YMOVE":
node.Out=this.Draw.YMOVE(args[0]);
break;
case "LINEDASH":
node.Out=this.Draw.LINEDASH(args);
break;
case "FIRSTDRAW":
node.Out=this.Draw.FIRSTDRAW(args[0]);
break;
Expand Down Expand Up @@ -20473,7 +20491,15 @@ function ScriptIndex(name,script,args,option)
if (!isNaN(width) && width>0) line.LineWidth=width;
}

if (varItem.IsDotLine) line.IsDotLine=true; //虚线
if (varItem.IsDotLine)
{
line.IsDotLine=true; //虚线
line.LineDash=g_JSChartResource.DOTLINE.LineDash.slice();
}

//虚线设置
if (IFrameSplitOperator.IsNonEmptyArray(varItem.LineDash)) line.LineDash=varItem.LineDash;

if (varItem.IsShow==false) line.IsShow=false;

let titleIndex=windowIndex+1;
Expand Down
Loading

0 comments on commit cba8c1c

Please sign in to comment.