Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
bluefrankey
hqchart
提交
f26edb23
hqchart
项目概览
bluefrankey
/
hqchart
与 Fork 源项目一致
从无法访问的项目Fork
通知
5
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
hqchart
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f26edb23
编写于
7月 14, 2019
作者:
J
jones
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ver 6261
上级
2e82d1e1
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
172 addition
and
25 deletion
+172
-25
vuehqchart/src/jscommon/umychart.js
vuehqchart/src/jscommon/umychart.js
+56
-7
vuehqchart/src/jscommon/umychart.vue/umychart.vue.js
vuehqchart/src/jscommon/umychart.vue/umychart.vue.js
+4
-4
webhqchart.demo/jscommon/umychart.js
webhqchart.demo/jscommon/umychart.js
+56
-7
webhqchart/umychart.js
webhqchart/umychart.js
+56
-7
未找到文件。
vuehqchart/src/jscommon/umychart.js
浏览文件 @
f26edb23
...
...
@@ -3514,13 +3514,13 @@ function KLineFrame()
var toolbarHeight=this.ChartBorder.GetTitleHeight();
var left=chartWidth-(this.ChartBorder.Right/pixelTatio)-toolbarWidth;
var top=this.ChartBorder.GetTop()/pixelTatio;
var spanIcon = "<span class='index_param icon iconfont icon-index_param' id='modifyindex' style='cursor:pointer;
' title='调整指标参数'></span>
" +
"<span class='index_change icon iconfont icon-change_index' id='changeindex' style='cursor:pointer;
' title='切换指标'>
</span>" +
"<span class='index_overlay icon iconfont icon-overlay_index' id='overlayindex' style='cursor:pointer;' title='叠加指标'></span>";
var spanIcon = "<span class='index_param icon iconfont icon-index_param' id='modifyindex' style='cursor:pointer;
margin-left:2px;margin-right:2px;' title='调整指标参数'></span>
" +
"<span class='index_change icon iconfont icon-change_index' id='changeindex' style='cursor:pointer;
margin-left:2px;margin-right:2px;' title='切换指标'>
</span>" +
"<span class='index_overlay icon iconfont icon-overlay_index' id='overlayindex' style='cursor:pointer;
margin-left:2px;margin-right:2px;
' title='叠加指标'></span>";
if (this.Identify!==0 && this.CloseIndex) //第1个窗口不能关闭
{
const spanCloseIcon="
<span class='index_close icon iconfont icon-close' id='closeindex' style='cursor:pointer
;' title='关闭指标窗口'></span>";
const spanCloseIcon="
<span class='index_close icon iconfont icon-close' id='closeindex' style='cursor:pointer;margin-left:2px;margin-right:2px
;' title='关闭指标窗口'></span>";
spanIcon+=spanCloseIcon;
}
...
...
@@ -12263,7 +12263,7 @@ function ChartCorssCursor()
this.StringFormatY.Value=yValue;
this.StringFormatY.FrameID=yValueExtend.FrameID;
//
X
轴
//
Y
轴
if (this.IsShowText && this.StringFormatY.Operator() && (this.Frame.ChartBorder.Left>=30 || this.Frame.ChartBorder.Right>=30))
{
var text=this.StringFormatY.Text;
...
...
@@ -12273,7 +12273,7 @@ function ChartCorssCursor()
if (this.Frame.ChartBorder.Left>=30)
{
this.Canvas.fillStyle=this.TextBGColor;
if (left<textWidth) //左边空白的地方太少了画布下
if (left<textWidth
) //左边空白的地方太少了画布下
{
this.Canvas.fillRect(2,y-this.TextHeight/2,textWidth,this.TextHeight);
this.Canvas.textAlign="left";
...
...
@@ -12293,8 +12293,27 @@ function ChartCorssCursor()
if (this.Frame.ChartBorder.Right>=30)
{
var isOverlayIndex=false; //是否有叠加子坐标
var overlayIndexInterval=null; //子坐标间距
if (yValueExtend.FrameID>=0)
{
var frame=this.Frame.SubFrame[yValueExtend.FrameID];
isOverlayIndex=frame.OverlayIndex.length>0;
overlayIndexInterval=frame.Interval;
}
this.Canvas.fillStyle=this.TextBGColor;
if (rightWidth<textWidth) //右边空白显示不下,
if (isOverlayIndex && textWidth>overlayIndexInterval) //大于子坐标宽度
{
var drawRight=right+overlayIndexInterval;
if (drawRight>chartRight) drawRight=chartRight;
this.Canvas.fillRect(drawRight-2-textWidth,y-this.TextHeight/2,textWidth,this.TextHeight);
this.Canvas.textAlign="right";
this.Canvas.textBaseline="middle";
this.Canvas.fillStyle=this.TextColor;
this.Canvas.fillText(text,drawRight-4,y,textWidth);
}
else if (rightWidth<textWidth) //右边空白显示不下,
{
this.Canvas.fillRect(chartRight-2-textWidth,y-this.TextHeight/2,textWidth,this.TextHeight);
this.Canvas.textAlign="right";
...
...
@@ -12313,6 +12332,7 @@ function ChartCorssCursor()
}
}
//X轴
if (this.IsShowText && this.StringFormatX.Operator())
{
var text=this.StringFormatX.Text;
...
...
@@ -12347,6 +12367,35 @@ function ChartCorssCursor()
this.Canvas.fillText(text,x,yCenter,textWidth);
}
}
//子坐标Y轴
if (yValueExtend.FrameID>=0)
{
var frame=this.Frame.SubFrame[yValueExtend.FrameID];
var overlayLeft=right;
this.Canvas.font=this.Font;
for(var i in frame.OverlayIndex)
{
var item=frame.OverlayIndex[i];
overlayLeft+=frame.Interval;
if (overlayLeft+30>chartRight) break;
var yValue=item.Frame.GetYData(y);
for(var i=2;i>=0;--i)
{
var text=IFrameSplitOperator.FormatValueString(yValue,i);
var textWidth=this.Canvas.measureText(text).width+4; //前后各空2个像素
if (textWidth<frame.Interval) break;
}
this.Canvas.fillStyle=this.TextBGColor;
this.Canvas.fillRect(overlayLeft+2,y-this.TextHeight/2,textWidth,this.TextHeight);
this.Canvas.textAlign="left";
this.Canvas.textBaseline="middle";
this.Canvas.fillStyle=this.TextColor;
this.Canvas.fillText(text,overlayLeft+4,y,textWidth);
}
}
}
this.HScreenDraw=function()
...
...
vuehqchart/src/jscommon/umychart.vue/umychart.vue.js
浏览文件 @
f26edb23
...
...
@@ -6740,13 +6740,13 @@ function KLineFrame()
var toolbarHeight=this.ChartBorder.GetTitleHeight();
var left=chartWidth-(this.ChartBorder.Right/pixelTatio)-toolbarWidth;
var top=this.ChartBorder.GetTop()/pixelTatio;
var spanIcon = "<span class='index_param icon iconfont icon-index_param' id='modifyindex' style='cursor:pointer;
' title='调整指标参数'></span>
" +
"<span class='index_change icon iconfont icon-change_index' id='changeindex' style='cursor:pointer;
' title='切换指标'>
</span>" +
"<span class='index_overlay icon iconfont icon-overlay_index' id='overlayindex' style='cursor:pointer;' title='叠加指标'></span>";
var spanIcon = "<span class='index_param icon iconfont icon-index_param' id='modifyindex' style='cursor:pointer;
margin-left:2px;margin-right:2px;' title='调整指标参数'></span>
" +
"<span class='index_change icon iconfont icon-change_index' id='changeindex' style='cursor:pointer;
margin-left:2px;margin-right:2px;' title='切换指标'>
</span>" +
"<span class='index_overlay icon iconfont icon-overlay_index' id='overlayindex' style='cursor:pointer;
margin-left:2px;margin-right:2px;
' title='叠加指标'></span>";
if (this.Identify!==0 && this.CloseIndex) //第1个窗口不能关闭
{
const spanCloseIcon="
<span class='index_close icon iconfont icon-close' id='closeindex' style='cursor:pointer
;' title='关闭指标窗口'></span>";
const spanCloseIcon="
<span class='index_close icon iconfont icon-close' id='closeindex' style='cursor:pointer;margin-left:2px;margin-right:2px
;' title='关闭指标窗口'></span>";
spanIcon+=spanCloseIcon;
}
webhqchart.demo/jscommon/umychart.js
浏览文件 @
f26edb23
...
...
@@ -3514,13 +3514,13 @@ function KLineFrame()
var toolbarHeight=this.ChartBorder.GetTitleHeight();
var left=chartWidth-(this.ChartBorder.Right/pixelTatio)-toolbarWidth;
var top=this.ChartBorder.GetTop()/pixelTatio;
var spanIcon = "<span class='index_param icon iconfont icon-index_param' id='modifyindex' style='cursor:pointer;
' title='调整指标参数'></span>
" +
"<span class='index_change icon iconfont icon-change_index' id='changeindex' style='cursor:pointer;
' title='切换指标'>
</span>" +
"<span class='index_overlay icon iconfont icon-overlay_index' id='overlayindex' style='cursor:pointer;' title='叠加指标'></span>";
var spanIcon = "<span class='index_param icon iconfont icon-index_param' id='modifyindex' style='cursor:pointer;
margin-left:2px;margin-right:2px;' title='调整指标参数'></span>
" +
"<span class='index_change icon iconfont icon-change_index' id='changeindex' style='cursor:pointer;
margin-left:2px;margin-right:2px;' title='切换指标'>
</span>" +
"<span class='index_overlay icon iconfont icon-overlay_index' id='overlayindex' style='cursor:pointer;
margin-left:2px;margin-right:2px;
' title='叠加指标'></span>";
if (this.Identify!==0 && this.CloseIndex) //第1个窗口不能关闭
{
const spanCloseIcon="
<span class='index_close icon iconfont icon-close' id='closeindex' style='cursor:pointer
;' title='关闭指标窗口'></span>";
const spanCloseIcon="
<span class='index_close icon iconfont icon-close' id='closeindex' style='cursor:pointer;margin-left:2px;margin-right:2px
;' title='关闭指标窗口'></span>";
spanIcon+=spanCloseIcon;
}
...
...
@@ -12263,7 +12263,7 @@ function ChartCorssCursor()
this.StringFormatY.Value=yValue;
this.StringFormatY.FrameID=yValueExtend.FrameID;
//
X
轴
//
Y
轴
if (this.IsShowText && this.StringFormatY.Operator() && (this.Frame.ChartBorder.Left>=30 || this.Frame.ChartBorder.Right>=30))
{
var text=this.StringFormatY.Text;
...
...
@@ -12273,7 +12273,7 @@ function ChartCorssCursor()
if (this.Frame.ChartBorder.Left>=30)
{
this.Canvas.fillStyle=this.TextBGColor;
if (left<textWidth) //左边空白的地方太少了画布下
if (left<textWidth
) //左边空白的地方太少了画布下
{
this.Canvas.fillRect(2,y-this.TextHeight/2,textWidth,this.TextHeight);
this.Canvas.textAlign="left";
...
...
@@ -12293,8 +12293,27 @@ function ChartCorssCursor()
if (this.Frame.ChartBorder.Right>=30)
{
var isOverlayIndex=false; //是否有叠加子坐标
var overlayIndexInterval=null; //子坐标间距
if (yValueExtend.FrameID>=0)
{
var frame=this.Frame.SubFrame[yValueExtend.FrameID];
isOverlayIndex=frame.OverlayIndex.length>0;
overlayIndexInterval=frame.Interval;
}
this.Canvas.fillStyle=this.TextBGColor;
if (rightWidth<textWidth) //右边空白显示不下,
if (isOverlayIndex && textWidth>overlayIndexInterval) //大于子坐标宽度
{
var drawRight=right+overlayIndexInterval;
if (drawRight>chartRight) drawRight=chartRight;
this.Canvas.fillRect(drawRight-2-textWidth,y-this.TextHeight/2,textWidth,this.TextHeight);
this.Canvas.textAlign="right";
this.Canvas.textBaseline="middle";
this.Canvas.fillStyle=this.TextColor;
this.Canvas.fillText(text,drawRight-4,y,textWidth);
}
else if (rightWidth<textWidth) //右边空白显示不下,
{
this.Canvas.fillRect(chartRight-2-textWidth,y-this.TextHeight/2,textWidth,this.TextHeight);
this.Canvas.textAlign="right";
...
...
@@ -12313,6 +12332,7 @@ function ChartCorssCursor()
}
}
//X轴
if (this.IsShowText && this.StringFormatX.Operator())
{
var text=this.StringFormatX.Text;
...
...
@@ -12347,6 +12367,35 @@ function ChartCorssCursor()
this.Canvas.fillText(text,x,yCenter,textWidth);
}
}
//子坐标Y轴
if (yValueExtend.FrameID>=0)
{
var frame=this.Frame.SubFrame[yValueExtend.FrameID];
var overlayLeft=right;
this.Canvas.font=this.Font;
for(var i in frame.OverlayIndex)
{
var item=frame.OverlayIndex[i];
overlayLeft+=frame.Interval;
if (overlayLeft+30>chartRight) break;
var yValue=item.Frame.GetYData(y);
for(var i=2;i>=0;--i)
{
var text=IFrameSplitOperator.FormatValueString(yValue,i);
var textWidth=this.Canvas.measureText(text).width+4; //前后各空2个像素
if (textWidth<frame.Interval) break;
}
this.Canvas.fillStyle=this.TextBGColor;
this.Canvas.fillRect(overlayLeft+2,y-this.TextHeight/2,textWidth,this.TextHeight);
this.Canvas.textAlign="left";
this.Canvas.textBaseline="middle";
this.Canvas.fillStyle=this.TextColor;
this.Canvas.fillText(text,overlayLeft+4,y,textWidth);
}
}
}
this.HScreenDraw=function()
...
...
webhqchart/umychart.js
浏览文件 @
f26edb23
...
...
@@ -3514,13 +3514,13 @@ function KLineFrame()
var toolbarHeight=this.ChartBorder.GetTitleHeight();
var left=chartWidth-(this.ChartBorder.Right/pixelTatio)-toolbarWidth;
var top=this.ChartBorder.GetTop()/pixelTatio;
var spanIcon = "<span class='index_param icon iconfont icon-index_param' id='modifyindex' style='cursor:pointer;
' title='调整指标参数'></span>
" +
"<span class='index_change icon iconfont icon-change_index' id='changeindex' style='cursor:pointer;
' title='切换指标'>
</span>" +
"<span class='index_overlay icon iconfont icon-overlay_index' id='overlayindex' style='cursor:pointer;' title='叠加指标'></span>";
var spanIcon = "<span class='index_param icon iconfont icon-index_param' id='modifyindex' style='cursor:pointer;
margin-left:2px;margin-right:2px;' title='调整指标参数'></span>
" +
"<span class='index_change icon iconfont icon-change_index' id='changeindex' style='cursor:pointer;
margin-left:2px;margin-right:2px;' title='切换指标'>
</span>" +
"<span class='index_overlay icon iconfont icon-overlay_index' id='overlayindex' style='cursor:pointer;
margin-left:2px;margin-right:2px;
' title='叠加指标'></span>";
if (this.Identify!==0 && this.CloseIndex) //第1个窗口不能关闭
{
const spanCloseIcon="
<span class='index_close icon iconfont icon-close' id='closeindex' style='cursor:pointer
;' title='关闭指标窗口'></span>";
const spanCloseIcon="
<span class='index_close icon iconfont icon-close' id='closeindex' style='cursor:pointer;margin-left:2px;margin-right:2px
;' title='关闭指标窗口'></span>";
spanIcon+=spanCloseIcon;
}
...
...
@@ -12263,7 +12263,7 @@ function ChartCorssCursor()
this.StringFormatY.Value=yValue;
this.StringFormatY.FrameID=yValueExtend.FrameID;
//
X
轴
//
Y
轴
if (this.IsShowText && this.StringFormatY.Operator() && (this.Frame.ChartBorder.Left>=30 || this.Frame.ChartBorder.Right>=30))
{
var text=this.StringFormatY.Text;
...
...
@@ -12273,7 +12273,7 @@ function ChartCorssCursor()
if (this.Frame.ChartBorder.Left>=30)
{
this.Canvas.fillStyle=this.TextBGColor;
if (left<textWidth) //左边空白的地方太少了画布下
if (left<textWidth
) //左边空白的地方太少了画布下
{
this.Canvas.fillRect(2,y-this.TextHeight/2,textWidth,this.TextHeight);
this.Canvas.textAlign="left";
...
...
@@ -12293,8 +12293,27 @@ function ChartCorssCursor()
if (this.Frame.ChartBorder.Right>=30)
{
var isOverlayIndex=false; //是否有叠加子坐标
var overlayIndexInterval=null; //子坐标间距
if (yValueExtend.FrameID>=0)
{
var frame=this.Frame.SubFrame[yValueExtend.FrameID];
isOverlayIndex=frame.OverlayIndex.length>0;
overlayIndexInterval=frame.Interval;
}
this.Canvas.fillStyle=this.TextBGColor;
if (rightWidth<textWidth) //右边空白显示不下,
if (isOverlayIndex && textWidth>overlayIndexInterval) //大于子坐标宽度
{
var drawRight=right+overlayIndexInterval;
if (drawRight>chartRight) drawRight=chartRight;
this.Canvas.fillRect(drawRight-2-textWidth,y-this.TextHeight/2,textWidth,this.TextHeight);
this.Canvas.textAlign="right";
this.Canvas.textBaseline="middle";
this.Canvas.fillStyle=this.TextColor;
this.Canvas.fillText(text,drawRight-4,y,textWidth);
}
else if (rightWidth<textWidth) //右边空白显示不下,
{
this.Canvas.fillRect(chartRight-2-textWidth,y-this.TextHeight/2,textWidth,this.TextHeight);
this.Canvas.textAlign="right";
...
...
@@ -12313,6 +12332,7 @@ function ChartCorssCursor()
}
}
//X轴
if (this.IsShowText && this.StringFormatX.Operator())
{
var text=this.StringFormatX.Text;
...
...
@@ -12347,6 +12367,35 @@ function ChartCorssCursor()
this.Canvas.fillText(text,x,yCenter,textWidth);
}
}
//子坐标Y轴
if (yValueExtend.FrameID>=0)
{
var frame=this.Frame.SubFrame[yValueExtend.FrameID];
var overlayLeft=right;
this.Canvas.font=this.Font;
for(var i in frame.OverlayIndex)
{
var item=frame.OverlayIndex[i];
overlayLeft+=frame.Interval;
if (overlayLeft+30>chartRight) break;
var yValue=item.Frame.GetYData(y);
for(var i=2;i>=0;--i)
{
var text=IFrameSplitOperator.FormatValueString(yValue,i);
var textWidth=this.Canvas.measureText(text).width+4; //前后各空2个像素
if (textWidth<frame.Interval) break;
}
this.Canvas.fillStyle=this.TextBGColor;
this.Canvas.fillRect(overlayLeft+2,y-this.TextHeight/2,textWidth,this.TextHeight);
this.Canvas.textAlign="left";
this.Canvas.textBaseline="middle";
this.Canvas.fillStyle=this.TextColor;
this.Canvas.fillText(text,overlayLeft+4,y,textWidth);
}
}
}
this.HScreenDraw=function()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录