Skip to content

Commit

Permalink
ver 7717
Browse files Browse the repository at this point in the history
7716 小程序
     增加K线最大最小值显示配置
     JSChart.GetKLineZoom  //K线缩放配置
7715 JSChart.GetKLineZoom() //K线缩放配置
7714 增加K线是否显示 最大最小值显示配置
7713 ChartMultiLine 支持填充颜色
  • Loading branch information
jones2000 committed Dec 25, 2019
1 parent 362d5ea commit 67b94c4
Show file tree
Hide file tree
Showing 6 changed files with 151 additions and 5 deletions.
30 changes: 29 additions & 1 deletion umychart_uniapp_h5/umychart.uniapp.h5.js
Original file line number Diff line number Diff line change
Expand Up @@ -3540,6 +3540,7 @@ function JSChart(divElement)
{
if (option.KLine.ShowKLine == false) chart.ChartPaint[0].IsShow = false;
if (option.KLine.InfoPosition>0) chart.ChartPaint[0].InfoPosition=option.KLine.InfoPosition;
if (option.KLine.IsShowMaxMinPrice == false) chart.ChartPaint[0].IsShowMaxMinPrice=option.KLine.IsShowMaxMinPrice;
}

if(option.KLineTitle)
Expand Down Expand Up @@ -4561,6 +4562,11 @@ JSChart.GetMinuteCoordinateData=function()
return g_MinuteCoordinateData;
}

JSChart.GetKLineZoom=function() //K线缩放配置
{
return ZOOM_SEED;
}

var JSCHART_EVENT_ID=
{
RECV_KLINE_MATCH:1, //接收到形态匹配
Expand Down Expand Up @@ -15462,6 +15468,7 @@ function ChartMultiLine()
{
var line=this.Lines[i];
var drawPoints={ Point:[], Color:line.Color };
if (line.BGColor) drawPoints.BGColor=line.BGColor;
for(var j in line.Point)
{
var point=line.Point[j];
Expand All @@ -15488,7 +15495,28 @@ function ChartMultiLine()

this.DrawLine=function(line)
{

if (line.BGColor) //背景色
{
this.Canvas.fillStyle=line.BGColor;
for(var i in line.Point)
{
var item=line.Point[i];
if (i==0)
{
this.Canvas.beginPath();
if (this.IsHScreen) this.Canvas.moveTo(item.Y,item.X);
else this.Canvas.moveTo(item.X,item.Y);
}
else
{
if (this.IsHScreen) this.Canvas.lineTo(item.Y,item.X);
else this.Canvas.lineTo(item.X,item.Y);
}
}
this.Canvas.closePath();
this.Canvas.fill();
}

this.Canvas.strokeStyle=line.Color;
for(var i in line.Point)
{
Expand Down
30 changes: 29 additions & 1 deletion vuehqchart/src/jscommon/umychart.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ function JSChart(divElement)
{
if (option.KLine.ShowKLine == false) chart.ChartPaint[0].IsShow = false;
if (option.KLine.InfoPosition>0) chart.ChartPaint[0].InfoPosition=option.KLine.InfoPosition;
if (option.KLine.IsShowMaxMinPrice == false) chart.ChartPaint[0].IsShowMaxMinPrice=option.KLine.IsShowMaxMinPrice;
}

if(option.KLineTitle)
Expand Down Expand Up @@ -1243,6 +1244,11 @@ JSChart.GetMinuteCoordinateData=function()
return g_MinuteCoordinateData;
}

JSChart.GetKLineZoom=function() //K线缩放配置
{
return ZOOM_SEED;
}

var JSCHART_EVENT_ID=
{
RECV_KLINE_MATCH:1, //接收到形态匹配
Expand Down Expand Up @@ -12144,6 +12150,7 @@ function ChartMultiLine()
{
var line=this.Lines[i];
var drawPoints={ Point:[], Color:line.Color };
if (line.BGColor) drawPoints.BGColor=line.BGColor;
for(var j in line.Point)
{
var point=line.Point[j];
Expand All @@ -12170,7 +12177,28 @@ function ChartMultiLine()

this.DrawLine=function(line)
{

if (line.BGColor) //背景色
{
this.Canvas.fillStyle=line.BGColor;
for(var i in line.Point)
{
var item=line.Point[i];
if (i==0)
{
this.Canvas.beginPath();
if (this.IsHScreen) this.Canvas.moveTo(item.Y,item.X);
else this.Canvas.moveTo(item.X,item.Y);
}
else
{
if (this.IsHScreen) this.Canvas.lineTo(item.Y,item.X);
else this.Canvas.lineTo(item.X,item.Y);
}
}
this.Canvas.closePath();
this.Canvas.fill();
}

this.Canvas.strokeStyle=line.Color;
for(var i in line.Point)
{
Expand Down
30 changes: 29 additions & 1 deletion vuehqchart/src/jscommon/umychart.vue/umychart.vue.js
Original file line number Diff line number Diff line change
Expand Up @@ -3581,6 +3581,7 @@ function JSChart(divElement)
{
if (option.KLine.ShowKLine == false) chart.ChartPaint[0].IsShow = false;
if (option.KLine.InfoPosition>0) chart.ChartPaint[0].InfoPosition=option.KLine.InfoPosition;
if (option.KLine.IsShowMaxMinPrice == false) chart.ChartPaint[0].IsShowMaxMinPrice=option.KLine.IsShowMaxMinPrice;
}

if(option.KLineTitle)
Expand Down Expand Up @@ -4602,6 +4603,11 @@ JSChart.GetMinuteCoordinateData=function()
return g_MinuteCoordinateData;
}

JSChart.GetKLineZoom=function() //K线缩放配置
{
return ZOOM_SEED;
}

var JSCHART_EVENT_ID=
{
RECV_KLINE_MATCH:1, //接收到形态匹配
Expand Down Expand Up @@ -15503,6 +15509,7 @@ function ChartMultiLine()
{
var line=this.Lines[i];
var drawPoints={ Point:[], Color:line.Color };
if (line.BGColor) drawPoints.BGColor=line.BGColor;
for(var j in line.Point)
{
var point=line.Point[j];
Expand All @@ -15529,7 +15536,28 @@ function ChartMultiLine()

this.DrawLine=function(line)
{

if (line.BGColor) //背景色
{
this.Canvas.fillStyle=line.BGColor;
for(var i in line.Point)
{
var item=line.Point[i];
if (i==0)
{
this.Canvas.beginPath();
if (this.IsHScreen) this.Canvas.moveTo(item.Y,item.X);
else this.Canvas.moveTo(item.X,item.Y);
}
else
{
if (this.IsHScreen) this.Canvas.lineTo(item.Y,item.X);
else this.Canvas.lineTo(item.X,item.Y);
}
}
this.Canvas.closePath();
this.Canvas.fill();
}

this.Canvas.strokeStyle=line.Color;
for(var i in line.Point)
{
Expand Down
30 changes: 29 additions & 1 deletion webhqchart.demo/jscommon/umychart.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ function JSChart(divElement)
{
if (option.KLine.ShowKLine == false) chart.ChartPaint[0].IsShow = false;
if (option.KLine.InfoPosition>0) chart.ChartPaint[0].InfoPosition=option.KLine.InfoPosition;
if (option.KLine.IsShowMaxMinPrice == false) chart.ChartPaint[0].IsShowMaxMinPrice=option.KLine.IsShowMaxMinPrice;
}

if(option.KLineTitle)
Expand Down Expand Up @@ -1243,6 +1244,11 @@ JSChart.GetMinuteCoordinateData=function()
return g_MinuteCoordinateData;
}

JSChart.GetKLineZoom=function() //K线缩放配置
{
return ZOOM_SEED;
}

var JSCHART_EVENT_ID=
{
RECV_KLINE_MATCH:1, //接收到形态匹配
Expand Down Expand Up @@ -12144,6 +12150,7 @@ function ChartMultiLine()
{
var line=this.Lines[i];
var drawPoints={ Point:[], Color:line.Color };
if (line.BGColor) drawPoints.BGColor=line.BGColor;
for(var j in line.Point)
{
var point=line.Point[j];
Expand All @@ -12170,7 +12177,28 @@ function ChartMultiLine()

this.DrawLine=function(line)
{

if (line.BGColor) //背景色
{
this.Canvas.fillStyle=line.BGColor;
for(var i in line.Point)
{
var item=line.Point[i];
if (i==0)
{
this.Canvas.beginPath();
if (this.IsHScreen) this.Canvas.moveTo(item.Y,item.X);
else this.Canvas.moveTo(item.X,item.Y);
}
else
{
if (this.IsHScreen) this.Canvas.lineTo(item.Y,item.X);
else this.Canvas.lineTo(item.X,item.Y);
}
}
this.Canvas.closePath();
this.Canvas.fill();
}

this.Canvas.strokeStyle=line.Color;
for(var i in line.Point)
{
Expand Down
30 changes: 29 additions & 1 deletion webhqchart/umychart.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ function JSChart(divElement)
{
if (option.KLine.ShowKLine == false) chart.ChartPaint[0].IsShow = false;
if (option.KLine.InfoPosition>0) chart.ChartPaint[0].InfoPosition=option.KLine.InfoPosition;
if (option.KLine.IsShowMaxMinPrice == false) chart.ChartPaint[0].IsShowMaxMinPrice=option.KLine.IsShowMaxMinPrice;
}

if(option.KLineTitle)
Expand Down Expand Up @@ -1243,6 +1244,11 @@ JSChart.GetMinuteCoordinateData=function()
return g_MinuteCoordinateData;
}

JSChart.GetKLineZoom=function() //K线缩放配置
{
return ZOOM_SEED;
}

var JSCHART_EVENT_ID=
{
RECV_KLINE_MATCH:1, //接收到形态匹配
Expand Down Expand Up @@ -12144,6 +12150,7 @@ function ChartMultiLine()
{
var line=this.Lines[i];
var drawPoints={ Point:[], Color:line.Color };
if (line.BGColor) drawPoints.BGColor=line.BGColor;
for(var j in line.Point)
{
var point=line.Point[j];
Expand All @@ -12170,7 +12177,28 @@ function ChartMultiLine()

this.DrawLine=function(line)
{

if (line.BGColor) //背景色
{
this.Canvas.fillStyle=line.BGColor;
for(var i in line.Point)
{
var item=line.Point[i];
if (i==0)
{
this.Canvas.beginPath();
if (this.IsHScreen) this.Canvas.moveTo(item.Y,item.X);
else this.Canvas.moveTo(item.X,item.Y);
}
else
{
if (this.IsHScreen) this.Canvas.lineTo(item.Y,item.X);
else this.Canvas.lineTo(item.X,item.Y);
}
}
this.Canvas.closePath();
this.Canvas.fill();
}

this.Canvas.strokeStyle=line.Color;
for(var i in line.Point)
{
Expand Down
6 changes: 6 additions & 0 deletions wechathqchart/umychart.wechat.3.0.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ function JSChart(element)
if (option.KLine)
{
if (option.KLine.ShowKLine == false) chart.ChartPaint[0].IsShow = false;
if (option.KLine.IsShowMaxMinPrice == false) chart.ChartPaint[0].IsShowMaxMinPrice = false;
}

if (option.KLineTitle)
Expand Down Expand Up @@ -1066,6 +1067,11 @@ JSChart.GetResource = function () //获取颜色配置 (设置配必须啊在JS
return g_JSChartResource;
}

JSChart.GetKLineZoom = function () //K线缩放配置
{
return ZOOM_SEED;
}

var JSCHART_EVENT_ID =
{
RECV_INDEX_DATA: 2, //接收指标数据
Expand Down

0 comments on commit 67b94c4

Please sign in to comment.