Compare commits

..

2 Commits

Author SHA1 Message Date
唐明明
53ba8eae67 merge 2021-11-22 16:36:25 +08:00
唐明明
a683d8effc 调整首页图表 2021-11-22 16:35:33 +08:00
4 changed files with 51508 additions and 38 deletions

View File

@@ -2,8 +2,8 @@
"name" : "链商星球",
"appid" : "__UNI__1F65101",
"description" : "安徽星煌,链商星球商家工具",
"versionName" : "1.2.0",
"versionCode" : 120,
"versionName" : "1.2.1",
"versionCode" : 121,
"transformPx" : false,
/* 5+App */
"app-plus" : {

View File

@@ -115,7 +115,7 @@
</view>
<!-- 平台累计盈利通证 -->
<view class="chart">
<view class="title">累计盈利和通证价值走势图</view>
<view class="title">通证价值走势图</view>
<view class="chart-f2">
<l-f2 ref="chartChange"></l-f2>
</view>
@@ -356,42 +356,37 @@
})
},
// 绘制图表
showCartc(data) {
showCartc(dataInfo) {
// 图表信息
this.$refs.chartChange.init(config => {
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();
this.$refs.chartChange.init(config => {
config.appendPadding = [8, 30, 10, 15]
const chart = new F2.Chart(config)
chart.source(dataInfo, {
date: {
type: 'timeCat',
mask: 'MM/DD',
tickCount: 7,
range: [ 0, 1 ]
},
value: {
tickCount: 7,
alias: '通证价值'
}
});
chart.tooltip({
showCrosshairs: true,
crosshairsStyle: {
stroke: 'rgba(255, 255, 255, 0.25)',
lineWidth: 1
},
tooltipMarkerStyle: {
fill: '#fff'
}
});
chart.line().position('date*value').shape('smooth').color('#ca66e0');
chart.point().position('date*value').shape('smooth').color('#ca66e0').style({stroke: '#fff', lineWidth: 1 });
chart.area().position('date*value').color('#ca66e0').shape('smooth')
chart.render();
return chart;
})
},

34
pages/index/new_file.js Normal file
View 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();

51441
unpackage/dist/dev/app-plus/app-service.js vendored Normal file

File diff suppressed because one or more lines are too long