调整首页图表
This commit is contained in:
@@ -2,8 +2,8 @@
|
|||||||
"name" : "链商星球",
|
"name" : "链商星球",
|
||||||
"appid" : "__UNI__1F65101",
|
"appid" : "__UNI__1F65101",
|
||||||
"description" : "安徽星煌,链商星球商家工具",
|
"description" : "安徽星煌,链商星球商家工具",
|
||||||
"versionName" : "1.2.0",
|
"versionName" : "1.2.1",
|
||||||
"versionCode" : 120,
|
"versionCode" : 121,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
|
|||||||
@@ -115,7 +115,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<!-- 平台累计盈利,通证 -->
|
<!-- 平台累计盈利,通证 -->
|
||||||
<view class="chart">
|
<view class="chart">
|
||||||
<view class="title">累计盈利和通证价值走势图</view>
|
<view class="title">通证价值走势图</view>
|
||||||
<view class="chart-f2">
|
<view class="chart-f2">
|
||||||
<l-f2 ref="chartChange"></l-f2>
|
<l-f2 ref="chartChange"></l-f2>
|
||||||
</view>
|
</view>
|
||||||
@@ -356,41 +356,36 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 绘制图表
|
// 绘制图表
|
||||||
showCartc(data) {
|
showCartc(dataInfo) {
|
||||||
// 图表信息
|
// 图表信息
|
||||||
this.$refs.chartChange.init(config => {
|
this.$refs.chartChange.init(config => {
|
||||||
config.appendPadding = [10, 30, 10, 15]
|
config.appendPadding = [8, 30, 10, 15]
|
||||||
const chart = new F2.Chart(config);
|
const chart = new F2.Chart(config)
|
||||||
chart.source(data, {
|
chart.source(dataInfo, {
|
||||||
date: {
|
date: {
|
||||||
range: [0, 1],
|
|
||||||
type: 'timeCat',
|
type: 'timeCat',
|
||||||
mask: 'MM-DD'
|
mask: 'MM/DD',
|
||||||
|
tickCount: 7,
|
||||||
|
range: [ 0, 1 ]
|
||||||
},
|
},
|
||||||
value: {
|
value: {
|
||||||
tickCount: 0
|
tickCount: 7,
|
||||||
|
alias: '通证价值'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
chart.legend({
|
chart.tooltip({
|
||||||
position: 'bottom',
|
showCrosshairs: true,
|
||||||
offsetY: 0,
|
crosshairsStyle: {
|
||||||
offsetX: 30
|
stroke: 'rgba(255, 255, 255, 0.25)',
|
||||||
|
lineWidth: 1
|
||||||
|
},
|
||||||
|
tooltipMarkerStyle: {
|
||||||
|
fill: '#fff'
|
||||||
|
}
|
||||||
});
|
});
|
||||||
chart.area()
|
chart.line().position('date*value').shape('smooth').color('#ca66e0');
|
||||||
.position('date*value')
|
chart.point().position('date*value').shape('smooth').color('#ca66e0').style({stroke: '#fff', lineWidth: 1 });
|
||||||
.color('name', ['#5881d3', '#ca66e0'])
|
chart.area().position('date*value').color('#ca66e0').shape('smooth')
|
||||||
.shape('smooth')
|
|
||||||
chart.line()
|
|
||||||
.position('date*value')
|
|
||||||
.color('name', ['#5881d3', '#ca66e0'])
|
|
||||||
.shape('smooth', name => {
|
|
||||||
if (name === '预期收益率') {
|
|
||||||
return 'line';
|
|
||||||
}
|
|
||||||
if (name === '实际收益率') {
|
|
||||||
return 'line';
|
|
||||||
}
|
|
||||||
});
|
|
||||||
chart.render();
|
chart.render();
|
||||||
return chart;
|
return chart;
|
||||||
})
|
})
|
||||||
|
|||||||
34
pages/index/new_file.js
Normal file
34
pages/index/new_file.js
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
|
||||||
|
config.appendPadding = [10, 30, 10, 15]
|
||||||
|
const chart = new F2.Chart(config);
|
||||||
|
chart.source(data, {
|
||||||
|
date: {
|
||||||
|
range: [0, 1],
|
||||||
|
type: 'timeCat',
|
||||||
|
mask: 'MM-DD'
|
||||||
|
},
|
||||||
|
value: {
|
||||||
|
tickCount: 0
|
||||||
|
}
|
||||||
|
});
|
||||||
|
chart.legend({
|
||||||
|
position: 'bottom',
|
||||||
|
offsetY: 0,
|
||||||
|
offsetX: 30
|
||||||
|
});
|
||||||
|
chart.area()
|
||||||
|
.position('date*value')
|
||||||
|
.color('name', ['#5881d3', '#ca66e0'])
|
||||||
|
.shape('smooth')
|
||||||
|
chart.line()
|
||||||
|
.position('date*value')
|
||||||
|
.color('name', ['#5881d3', '#ca66e0'])
|
||||||
|
.shape('smooth', name => {
|
||||||
|
if (name === '预期收益率') {
|
||||||
|
return 'line';
|
||||||
|
}
|
||||||
|
if (name === '实际收益率') {
|
||||||
|
return 'line';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
chart.render();
|
||||||
2934
unpackage/dist/dev/app-plus/app-service.js
vendored
2934
unpackage/dist/dev/app-plus/app-service.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user