-
Notifications
You must be signed in to change notification settings - Fork 139
分时图配置1(走势)
shaman edited this page Jan 18, 2017
·
1 revision
分时图走势配置1(走势):
return {
name: 'time-sharing', //名称
width: 'auto', //绘图canvas宽度(px)
height: 200, //高度
axis: { //坐标轴
row: 4, //显示行数
col: 4, //列数
paddingTop: 0, //顶部留白
paddingBottom: 0,
paddingLeft: 0,
paddingRight: 0,
color: '#cdcdcd' //坐标轴颜色
},
xAxis: {
data: [] //时间
},
yAxis: [
{ //走势
type: 'line', //线条类型 line:折线 bezierLine:三次赛贝尔曲线
lineColor: '#2F6098',
background: 'rgba(53,125,222,0.1)', //走势背景色
/*background: function () { //渐变背景在IOS上会影响均线颜色,这个应该是小程序canvas的bug
return ['rgba(53,125,222,0.3)', 'rgba(0,0,0,0)'];
},*/
data: []
},
{ //均线
type: 'line',
lineColor: '#A96F3E',
data: []
}
],
callback: function (time) { //回调,所有action绘制完毕执行
var page = getCurrentPages();
page = page[page.length - 1];
page.setData({
ts1RenderTime: time
});
}
};