调整首页图表
This commit is contained in:
@@ -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" : {
|
||||
|
||||
@@ -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,41 +356,36 @@
|
||||
})
|
||||
},
|
||||
// 绘制图表
|
||||
showCartc(data) {
|
||||
showCartc(dataInfo) {
|
||||
// 图表信息
|
||||
this.$refs.chartChange.init(config => {
|
||||
config.appendPadding = [10, 30, 10, 15]
|
||||
const chart = new F2.Chart(config);
|
||||
chart.source(data, {
|
||||
config.appendPadding = [8, 30, 10, 15]
|
||||
const chart = new F2.Chart(config)
|
||||
chart.source(dataInfo, {
|
||||
date: {
|
||||
range: [0, 1],
|
||||
type: 'timeCat',
|
||||
mask: 'MM-DD'
|
||||
mask: 'MM/DD',
|
||||
tickCount: 7,
|
||||
range: [ 0, 1 ]
|
||||
},
|
||||
value: {
|
||||
tickCount: 0
|
||||
tickCount: 7,
|
||||
alias: '通证价值'
|
||||
}
|
||||
});
|
||||
chart.legend({
|
||||
position: 'bottom',
|
||||
offsetY: 0,
|
||||
offsetX: 30
|
||||
chart.tooltip({
|
||||
showCrosshairs: true,
|
||||
crosshairsStyle: {
|
||||
stroke: 'rgba(255, 255, 255, 0.25)',
|
||||
lineWidth: 1
|
||||
},
|
||||
tooltipMarkerStyle: {
|
||||
fill: '#fff'
|
||||
}
|
||||
});
|
||||
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.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
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