|
@@ -199,7 +199,7 @@ function initChart(canvas, width, height, dpr, data) {
|
|
|
areaStyle: {
|
|
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
|
|
|
offset: 0,
|
|
|
- color: '#DF3E3E'
|
|
|
+ color: data.color
|
|
|
}, {
|
|
|
offset: 1,
|
|
|
color: '#1C1C1C'
|
|
@@ -212,7 +212,7 @@ function initChart(canvas, width, height, dpr, data) {
|
|
|
|
|
|
lineStyle: {
|
|
|
|
|
|
- color: '#DF3E3E'
|
|
|
+ color: data.color
|
|
|
|
|
|
}
|
|
|
|
|
@@ -272,20 +272,23 @@ Page({
|
|
|
timeData : [
|
|
|
'2020/6/1', '2020/6/2', '2020/6/3', '2020/6/4', '2020/6/5', '2020/6/6', '2020/6/7', '2020/6/8', '2020/6/9', '2020/6/10','2020/6/11',
|
|
|
'2020/6/12','2020/6/13','2020/6/14',
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ color:""
|
|
|
},
|
|
|
chartDatas:{
|
|
|
actual:[572,556,3555,4744,552,576,3555],
|
|
|
prediction:[352,246,385,2424,542,546,255],
|
|
|
timeData : [
|
|
|
'2020/6/1', '2020/6/2', '2020/6/3', '2020/6/4', '2020/6/5', '2020/6/6', '2020/6/7'
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ color:""
|
|
|
},
|
|
|
object:{
|
|
|
title:"appl",
|
|
|
Withtitle:"appl inc",
|
|
|
Volume:"545455",
|
|
|
- float:"-5555"
|
|
|
+ float:"-5555",
|
|
|
+ color:'crimson',
|
|
|
},
|
|
|
aa:[
|
|
|
{
|
|
@@ -427,7 +430,23 @@ Page({
|
|
|
* 生命周期函数--监听页面加载
|
|
|
*/
|
|
|
onLoad: function (options) {
|
|
|
-
|
|
|
+ console.log(JSON.parse(options.row))
|
|
|
+ var title = "object.title"
|
|
|
+ var Withtitle ="object.Withtitle"
|
|
|
+ var Volume = "object.Volume"
|
|
|
+ var float ="object.float"
|
|
|
+ var color='object.color'
|
|
|
+ var chartData="chartData.color"
|
|
|
+ var chartDatas="chartDatas.color"
|
|
|
+ this.setData({
|
|
|
+ [title]:JSON.parse(options.row).title,
|
|
|
+ [Withtitle]:JSON.parse(options.row).subtitle,
|
|
|
+ [Volume]:JSON.parse(options.row).digital,
|
|
|
+ [float]:JSON.parse(options.row).Increase,
|
|
|
+ [color]:JSON.parse(options.row).color,
|
|
|
+ [chartData]:JSON.parse(options.row).color,
|
|
|
+ [chartDatas]:JSON.parse(options.row).color,
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
/**
|