Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
bluefrankey
hqchart
提交
915b5e6b
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,体验更适合开发者的 AI 搜索 >>
提交
915b5e6b
编写于
5月 22, 2020
作者:
HQChart
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ver 8537
8536 修正 ZoomUp(), ZoomDown() 数据不够一屏的时候K线 显示不正确
上级
549d8d73
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
104 addition
and
60 deletion
+104
-60
README.md
README.md
+9
-5
umychart_uniapp_h5/umychart.uniapp.h5.js
umychart_uniapp_h5/umychart.uniapp.h5.js
+19
-11
vuehqchart/src/jscommon/umychart.js
vuehqchart/src/jscommon/umychart.js
+19
-11
vuehqchart/src/jscommon/umychart.vue/umychart.vue.js
vuehqchart/src/jscommon/umychart.vue/umychart.vue.js
+19
-11
webhqchart.demo/jscommon/umychart.js
webhqchart.demo/jscommon/umychart.js
+19
-11
webhqchart/umychart.js
webhqchart/umychart.js
+19
-11
未找到文件。
README.md
浏览文件 @
915b5e6b
...
...
@@ -240,11 +240,15 @@ React 例子:[demo-react.md](/教程/demo-react.md) <br>
7.
[
HQChart实战教程7-自定义显示手势点击K线显示信息
](
https://blog.csdn.net/jones2000/article/details/104168610
)
<br>
8.
[
HQChart实战教程8-如何手动重新初始化hqchart
](
https://blog.csdn.net/jones2000/article/details/105302626
)
<br>
9.
[
HQChart实战教程9-自定义A股分时图
](
https://blog.csdn.net/jones2000/article/details/105587559
)
<br>
10.
[
HQChart实战教程10-全ws数据对接HQChart(数字货币对接实战)(付费文章)
](
https://blog.csdn.net/jones2000/article/details/105698038
)
<br>
11.
[
HQChart实战教程11-火币网ws数据对接(付费文章)
](
https://blog.csdn.net/jones2000/article/details/105721190
)
<br>
12.
[
HQChart实战教程12-火币网ws数据对接分时图(付费文章)
](
https://blog.csdn.net/jones2000/article/details/105756659
)
<br>
13.
[
HQChart实战教程13-火币网ws数据对接K线(uniapp)(付费文章)
](
https://blog.csdn.net/jones2000/article/details/105804461
)
<br>
14.
[
HQChart实战教程14-K线图对接第3方http/https数据教程整理
](
https://blog.csdn.net/jones2000/article/details/106064879
)
<br>
10.
[
HQChart实战教程14-K线图对接第3方http/https数据教程整理
](
https://blog.csdn.net/jones2000/article/details/106064879
)
<br>
## 火币对接完整教程(付费文章)
1.
[
HQChart实战教程10-全ws数据对接HQChart(数字货币对接实战)
](
https://blog.csdn.net/jones2000/article/details/105698038
)
<br>
2.
[
HQChart实战教程11-火币网ws数据对接
](
https://blog.csdn.net/jones2000/article/details/105721190
)
<br>
3.
[
HQChart实战教程12-火币网ws数据对接分时图
](
https://blog.csdn.net/jones2000/article/details/105756659
)
<br>
4.
[
HQChart实战教程13-火币网ws数据对接K线(uniapp)
](
https://blog.csdn.net/jones2000/article/details/105804461
)
<br>
5.
[
HQChart实战教程15-火币网ws数据对接拖拽下载历史K线图
](
https://blog.csdn.net/jones2000/article/details/106205584
)
<br>
6.
[
HQChart实战教程16-K线图风格配色篇-仿火币网H5配色
](
https://blog.csdn.net/jones2000/article/details/106226272
)
<br>
## 设计文档:
...
...
umychart_uniapp_h5/umychart.uniapp.h5.js
浏览文件 @
915b5e6b
...
...
@@ -8996,6 +8996,7 @@ function KLineFrame()
var xPointCount=this.CalculateCount(this.ZoomIndex-1);
JSConsole.Chart.Log(`[KLineFrame::ZoomUp] old status. XPointCount=${xPointCount} ZoomIndex=${this.ZoomIndex} DataCount= ${this.Data.Data.length} rightSpaceCount=${rightSpaceCount}`);
var isShowAll=false;
--this.ZoomIndex;
if (cursorIndex.IsLockRight==true) //固定右边
{
...
...
@@ -9016,10 +9017,10 @@ function KLineFrame()
}
else if (xPointCount>=maxDataCount)
{
xPointCount=maxDataCount;
this.XPointCount=xPointCount;
//
xPointCount=maxDataCount;
//
this.XPointCount=xPointCount;
this.Data.DataOffset=0;
isShowAll=true;
JSConsole.Chart.Log(`[KLineFrame::ZoomUp] Show all data. XPointCount=${xPointCount} ZoomIndex=${this.ZoomIndex} DataCount= ${dataCount}`);
}
else
...
...
@@ -9042,8 +9043,11 @@ function KLineFrame()
this.DataWidth = ZOOM_SEED[this.ZoomIndex][0];
this.DistanceWidth = ZOOM_SEED[this.ZoomIndex][1];
var width=this.GetFrameWidth()-g_JSChartResource.FrameMargin;
this.TrimKLineDataWidth(width);
if (!isShowAll)
{
var width=this.GetFrameWidth()-g_JSChartResource.FrameMargin;
this.TrimKLineDataWidth(width);
}
this.LastCalculateStatus.XPointCount=this.XPointCount;
cursorIndex.Index=lastCursorIndex-this.Data.DataOffset;
...
...
@@ -9056,7 +9060,7 @@ function KLineFrame()
if (this.Data.DataOffset<0) return false;
var dataCount=this.Data.Data.length;
var maxDataCount=dataCount+this.RightSpaceCount;
if (this.XPointCount>=d
ataCount) return false;
//if (this.XPointCount>=maxD
ataCount) return false;
var rightSpaceCount=0;
var lastDataIndex = this.Data.DataOffset + this.XPointCount - 1; //最右边的数据索引
...
...
@@ -9072,6 +9076,7 @@ function KLineFrame()
JSConsole.Chart.Log(`[KLineFrame::ZoomDown] old status. XPointCount=${xPointCount} ZoomIndex=${this.ZoomIndex} DataCount= ${this.Data.Data.length} lastCursorIndex=${lastCursorIndex} rightSpaceCount=${rightSpaceCount}`);
var isShowAll=false;
++this.ZoomIndex;
if (cursorIndex.IsLockRight==true) //固定右边
{
...
...
@@ -9092,10 +9097,10 @@ function KLineFrame()
}
else if (xPointCount>=maxDataCount)
{
xPointCount=maxDataCount;
this.XPointCount=xPointCount;
//
xPointCount=maxDataCount;
//
this.XPointCount=xPointCount;
this.Data.DataOffset=0;
isShowAll=true; //数据铺满全屏, 不需要调整宽度
JSConsole.Chart.Log(`[KLineFrame::ZoomDown] Show all data. XPointCount=${xPointCount} ZoomIndex=${this.ZoomIndex} DataCount= ${dataCount}`);
}
else
...
...
@@ -9119,8 +9124,11 @@ function KLineFrame()
this.DataWidth = ZOOM_SEED[this.ZoomIndex][0];
this.DistanceWidth = ZOOM_SEED[this.ZoomIndex][1];
var width=this.GetFrameWidth()-g_JSChartResource.FrameMargin;
this.TrimKLineDataWidth(width);
if (!isShowAll)
{
var width=this.GetFrameWidth()-g_JSChartResource.FrameMargin;
this.TrimKLineDataWidth(width);
}
this.LastCalculateStatus.XPointCount=this.XPointCount;
cursorIndex.Index=lastCursorIndex-this.Data.DataOffset;
vuehqchart/src/jscommon/umychart.js
浏览文件 @
915b5e6b
...
...
@@ -5376,6 +5376,7 @@ function KLineFrame()
var xPointCount=this.CalculateCount(this.ZoomIndex-1);
JSConsole.Chart.Log(`[KLineFrame::ZoomUp] old status. XPointCount=${xPointCount} ZoomIndex=${this.ZoomIndex} DataCount= ${this.Data.Data.length} rightSpaceCount=${rightSpaceCount}`);
var isShowAll=false;
--this.ZoomIndex;
if (cursorIndex.IsLockRight==true) //固定右边
{
...
...
@@ -5396,10 +5397,10 @@ function KLineFrame()
}
else if (xPointCount>=maxDataCount)
{
xPointCount=maxDataCount;
this.XPointCount=xPointCount;
//
xPointCount=maxDataCount;
//
this.XPointCount=xPointCount;
this.Data.DataOffset=0;
isShowAll=true;
JSConsole.Chart.Log(`[KLineFrame::ZoomUp] Show all data. XPointCount=${xPointCount} ZoomIndex=${this.ZoomIndex} DataCount= ${dataCount}`);
}
else
...
...
@@ -5422,8 +5423,11 @@ function KLineFrame()
this.DataWidth = ZOOM_SEED[this.ZoomIndex][0];
this.DistanceWidth = ZOOM_SEED[this.ZoomIndex][1];
var width=this.GetFrameWidth()-g_JSChartResource.FrameMargin;
this.TrimKLineDataWidth(width);
if (!isShowAll)
{
var width=this.GetFrameWidth()-g_JSChartResource.FrameMargin;
this.TrimKLineDataWidth(width);
}
this.LastCalculateStatus.XPointCount=this.XPointCount;
cursorIndex.Index=lastCursorIndex-this.Data.DataOffset;
...
...
@@ -5436,7 +5440,7 @@ function KLineFrame()
if (this.Data.DataOffset<0) return false;
var dataCount=this.Data.Data.length;
var maxDataCount=dataCount+this.RightSpaceCount;
if (this.XPointCount>=d
ataCount) return false;
//if (this.XPointCount>=maxD
ataCount) return false;
var rightSpaceCount=0;
var lastDataIndex = this.Data.DataOffset + this.XPointCount - 1; //最右边的数据索引
...
...
@@ -5452,6 +5456,7 @@ function KLineFrame()
JSConsole.Chart.Log(`[KLineFrame::ZoomDown] old status. XPointCount=${xPointCount} ZoomIndex=${this.ZoomIndex} DataCount= ${this.Data.Data.length} lastCursorIndex=${lastCursorIndex} rightSpaceCount=${rightSpaceCount}`);
var isShowAll=false;
++this.ZoomIndex;
if (cursorIndex.IsLockRight==true) //固定右边
{
...
...
@@ -5472,10 +5477,10 @@ function KLineFrame()
}
else if (xPointCount>=maxDataCount)
{
xPointCount=maxDataCount;
this.XPointCount=xPointCount;
//
xPointCount=maxDataCount;
//
this.XPointCount=xPointCount;
this.Data.DataOffset=0;
isShowAll=true; //数据铺满全屏, 不需要调整宽度
JSConsole.Chart.Log(`[KLineFrame::ZoomDown] Show all data. XPointCount=${xPointCount} ZoomIndex=${this.ZoomIndex} DataCount= ${dataCount}`);
}
else
...
...
@@ -5499,8 +5504,11 @@ function KLineFrame()
this.DataWidth = ZOOM_SEED[this.ZoomIndex][0];
this.DistanceWidth = ZOOM_SEED[this.ZoomIndex][1];
var width=this.GetFrameWidth()-g_JSChartResource.FrameMargin;
this.TrimKLineDataWidth(width);
if (!isShowAll)
{
var width=this.GetFrameWidth()-g_JSChartResource.FrameMargin;
this.TrimKLineDataWidth(width);
}
this.LastCalculateStatus.XPointCount=this.XPointCount;
cursorIndex.Index=lastCursorIndex-this.Data.DataOffset;
vuehqchart/src/jscommon/umychart.vue/umychart.vue.js
浏览文件 @
915b5e6b
...
...
@@ -9040,6 +9040,7 @@ function KLineFrame()
var xPointCount=this.CalculateCount(this.ZoomIndex-1);
JSConsole.Chart.Log(`[KLineFrame::ZoomUp] old status. XPointCount=${xPointCount} ZoomIndex=${this.ZoomIndex} DataCount= ${this.Data.Data.length} rightSpaceCount=${rightSpaceCount}`);
var isShowAll=false;
--this.ZoomIndex;
if (cursorIndex.IsLockRight==true) //固定右边
{
...
...
@@ -9060,10 +9061,10 @@ function KLineFrame()
}
else if (xPointCount>=maxDataCount)
{
xPointCount=maxDataCount;
this.XPointCount=xPointCount;
//
xPointCount=maxDataCount;
//
this.XPointCount=xPointCount;
this.Data.DataOffset=0;
isShowAll=true;
JSConsole.Chart.Log(`[KLineFrame::ZoomUp] Show all data. XPointCount=${xPointCount} ZoomIndex=${this.ZoomIndex} DataCount= ${dataCount}`);
}
else
...
...
@@ -9086,8 +9087,11 @@ function KLineFrame()
this.DataWidth = ZOOM_SEED[this.ZoomIndex][0];
this.DistanceWidth = ZOOM_SEED[this.ZoomIndex][1];
var width=this.GetFrameWidth()-g_JSChartResource.FrameMargin;
this.TrimKLineDataWidth(width);
if (!isShowAll)
{
var width=this.GetFrameWidth()-g_JSChartResource.FrameMargin;
this.TrimKLineDataWidth(width);
}
this.LastCalculateStatus.XPointCount=this.XPointCount;
cursorIndex.Index=lastCursorIndex-this.Data.DataOffset;
...
...
@@ -9100,7 +9104,7 @@ function KLineFrame()
if (this.Data.DataOffset<0) return false;
var dataCount=this.Data.Data.length;
var maxDataCount=dataCount+this.RightSpaceCount;
if (this.XPointCount>=d
ataCount) return false;
//if (this.XPointCount>=maxD
ataCount) return false;
var rightSpaceCount=0;
var lastDataIndex = this.Data.DataOffset + this.XPointCount - 1; //最右边的数据索引
...
...
@@ -9116,6 +9120,7 @@ function KLineFrame()
JSConsole.Chart.Log(`[KLineFrame::ZoomDown] old status. XPointCount=${xPointCount} ZoomIndex=${this.ZoomIndex} DataCount= ${this.Data.Data.length} lastCursorIndex=${lastCursorIndex} rightSpaceCount=${rightSpaceCount}`);
var isShowAll=false;
++this.ZoomIndex;
if (cursorIndex.IsLockRight==true) //固定右边
{
...
...
@@ -9136,10 +9141,10 @@ function KLineFrame()
}
else if (xPointCount>=maxDataCount)
{
xPointCount=maxDataCount;
this.XPointCount=xPointCount;
//
xPointCount=maxDataCount;
//
this.XPointCount=xPointCount;
this.Data.DataOffset=0;
isShowAll=true; //数据铺满全屏, 不需要调整宽度
JSConsole.Chart.Log(`[KLineFrame::ZoomDown] Show all data. XPointCount=${xPointCount} ZoomIndex=${this.ZoomIndex} DataCount= ${dataCount}`);
}
else
...
...
@@ -9163,8 +9168,11 @@ function KLineFrame()
this.DataWidth = ZOOM_SEED[this.ZoomIndex][0];
this.DistanceWidth = ZOOM_SEED[this.ZoomIndex][1];
var width=this.GetFrameWidth()-g_JSChartResource.FrameMargin;
this.TrimKLineDataWidth(width);
if (!isShowAll)
{
var width=this.GetFrameWidth()-g_JSChartResource.FrameMargin;
this.TrimKLineDataWidth(width);
}
this.LastCalculateStatus.XPointCount=this.XPointCount;
cursorIndex.Index=lastCursorIndex-this.Data.DataOffset;
webhqchart.demo/jscommon/umychart.js
浏览文件 @
915b5e6b
...
...
@@ -5376,6 +5376,7 @@ function KLineFrame()
var xPointCount=this.CalculateCount(this.ZoomIndex-1);
JSConsole.Chart.Log(`[KLineFrame::ZoomUp] old status. XPointCount=${xPointCount} ZoomIndex=${this.ZoomIndex} DataCount= ${this.Data.Data.length} rightSpaceCount=${rightSpaceCount}`);
var isShowAll=false;
--this.ZoomIndex;
if (cursorIndex.IsLockRight==true) //固定右边
{
...
...
@@ -5396,10 +5397,10 @@ function KLineFrame()
}
else if (xPointCount>=maxDataCount)
{
xPointCount=maxDataCount;
this.XPointCount=xPointCount;
//
xPointCount=maxDataCount;
//
this.XPointCount=xPointCount;
this.Data.DataOffset=0;
isShowAll=true;
JSConsole.Chart.Log(`[KLineFrame::ZoomUp] Show all data. XPointCount=${xPointCount} ZoomIndex=${this.ZoomIndex} DataCount= ${dataCount}`);
}
else
...
...
@@ -5422,8 +5423,11 @@ function KLineFrame()
this.DataWidth = ZOOM_SEED[this.ZoomIndex][0];
this.DistanceWidth = ZOOM_SEED[this.ZoomIndex][1];
var width=this.GetFrameWidth()-g_JSChartResource.FrameMargin;
this.TrimKLineDataWidth(width);
if (!isShowAll)
{
var width=this.GetFrameWidth()-g_JSChartResource.FrameMargin;
this.TrimKLineDataWidth(width);
}
this.LastCalculateStatus.XPointCount=this.XPointCount;
cursorIndex.Index=lastCursorIndex-this.Data.DataOffset;
...
...
@@ -5436,7 +5440,7 @@ function KLineFrame()
if (this.Data.DataOffset<0) return false;
var dataCount=this.Data.Data.length;
var maxDataCount=dataCount+this.RightSpaceCount;
if (this.XPointCount>=d
ataCount) return false;
//if (this.XPointCount>=maxD
ataCount) return false;
var rightSpaceCount=0;
var lastDataIndex = this.Data.DataOffset + this.XPointCount - 1; //最右边的数据索引
...
...
@@ -5452,6 +5456,7 @@ function KLineFrame()
JSConsole.Chart.Log(`[KLineFrame::ZoomDown] old status. XPointCount=${xPointCount} ZoomIndex=${this.ZoomIndex} DataCount= ${this.Data.Data.length} lastCursorIndex=${lastCursorIndex} rightSpaceCount=${rightSpaceCount}`);
var isShowAll=false;
++this.ZoomIndex;
if (cursorIndex.IsLockRight==true) //固定右边
{
...
...
@@ -5472,10 +5477,10 @@ function KLineFrame()
}
else if (xPointCount>=maxDataCount)
{
xPointCount=maxDataCount;
this.XPointCount=xPointCount;
//
xPointCount=maxDataCount;
//
this.XPointCount=xPointCount;
this.Data.DataOffset=0;
isShowAll=true; //数据铺满全屏, 不需要调整宽度
JSConsole.Chart.Log(`[KLineFrame::ZoomDown] Show all data. XPointCount=${xPointCount} ZoomIndex=${this.ZoomIndex} DataCount= ${dataCount}`);
}
else
...
...
@@ -5499,8 +5504,11 @@ function KLineFrame()
this.DataWidth = ZOOM_SEED[this.ZoomIndex][0];
this.DistanceWidth = ZOOM_SEED[this.ZoomIndex][1];
var width=this.GetFrameWidth()-g_JSChartResource.FrameMargin;
this.TrimKLineDataWidth(width);
if (!isShowAll)
{
var width=this.GetFrameWidth()-g_JSChartResource.FrameMargin;
this.TrimKLineDataWidth(width);
}
this.LastCalculateStatus.XPointCount=this.XPointCount;
cursorIndex.Index=lastCursorIndex-this.Data.DataOffset;
webhqchart/umychart.js
浏览文件 @
915b5e6b
...
...
@@ -5376,6 +5376,7 @@ function KLineFrame()
var xPointCount=this.CalculateCount(this.ZoomIndex-1);
JSConsole.Chart.Log(`[KLineFrame::ZoomUp] old status. XPointCount=${xPointCount} ZoomIndex=${this.ZoomIndex} DataCount= ${this.Data.Data.length} rightSpaceCount=${rightSpaceCount}`);
var isShowAll=false;
--this.ZoomIndex;
if (cursorIndex.IsLockRight==true) //固定右边
{
...
...
@@ -5396,10 +5397,10 @@ function KLineFrame()
}
else if (xPointCount>=maxDataCount)
{
xPointCount=maxDataCount;
this.XPointCount=xPointCount;
//
xPointCount=maxDataCount;
//
this.XPointCount=xPointCount;
this.Data.DataOffset=0;
isShowAll=true;
JSConsole.Chart.Log(`[KLineFrame::ZoomUp] Show all data. XPointCount=${xPointCount} ZoomIndex=${this.ZoomIndex} DataCount= ${dataCount}`);
}
else
...
...
@@ -5422,8 +5423,11 @@ function KLineFrame()
this.DataWidth = ZOOM_SEED[this.ZoomIndex][0];
this.DistanceWidth = ZOOM_SEED[this.ZoomIndex][1];
var width=this.GetFrameWidth()-g_JSChartResource.FrameMargin;
this.TrimKLineDataWidth(width);
if (!isShowAll)
{
var width=this.GetFrameWidth()-g_JSChartResource.FrameMargin;
this.TrimKLineDataWidth(width);
}
this.LastCalculateStatus.XPointCount=this.XPointCount;
cursorIndex.Index=lastCursorIndex-this.Data.DataOffset;
...
...
@@ -5436,7 +5440,7 @@ function KLineFrame()
if (this.Data.DataOffset<0) return false;
var dataCount=this.Data.Data.length;
var maxDataCount=dataCount+this.RightSpaceCount;
if (this.XPointCount>=d
ataCount) return false;
//if (this.XPointCount>=maxD
ataCount) return false;
var rightSpaceCount=0;
var lastDataIndex = this.Data.DataOffset + this.XPointCount - 1; //最右边的数据索引
...
...
@@ -5452,6 +5456,7 @@ function KLineFrame()
JSConsole.Chart.Log(`[KLineFrame::ZoomDown] old status. XPointCount=${xPointCount} ZoomIndex=${this.ZoomIndex} DataCount= ${this.Data.Data.length} lastCursorIndex=${lastCursorIndex} rightSpaceCount=${rightSpaceCount}`);
var isShowAll=false;
++this.ZoomIndex;
if (cursorIndex.IsLockRight==true) //固定右边
{
...
...
@@ -5472,10 +5477,10 @@ function KLineFrame()
}
else if (xPointCount>=maxDataCount)
{
xPointCount=maxDataCount;
this.XPointCount=xPointCount;
//
xPointCount=maxDataCount;
//
this.XPointCount=xPointCount;
this.Data.DataOffset=0;
isShowAll=true; //数据铺满全屏, 不需要调整宽度
JSConsole.Chart.Log(`[KLineFrame::ZoomDown] Show all data. XPointCount=${xPointCount} ZoomIndex=${this.ZoomIndex} DataCount= ${dataCount}`);
}
else
...
...
@@ -5499,8 +5504,11 @@ function KLineFrame()
this.DataWidth = ZOOM_SEED[this.ZoomIndex][0];
this.DistanceWidth = ZOOM_SEED[this.ZoomIndex][1];
var width=this.GetFrameWidth()-g_JSChartResource.FrameMargin;
this.TrimKLineDataWidth(width);
if (!isShowAll)
{
var width=this.GetFrameWidth()-g_JSChartResource.FrameMargin;
this.TrimKLineDataWidth(width);
}
this.LastCalculateStatus.XPointCount=this.XPointCount;
cursorIndex.Index=lastCursorIndex-this.Data.DataOffset;
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录