var time = new Date();
var day = ('0' + time.getDate()).slice(-2);
var month = ('0' + (time.getMonth() + 1)).slice(-2);
var today = time.getFullYear() + '-' + month + '-' + day;
var send_date = today;
var url_fe = 'https://www.5y6qi.com/ssms/api/getmessage?method=taijiList&date='; //太极五环2.0接口
var color_atla = {
"s": ["#90e0ef", "#00b4d8", "#0077b6"], //蓝色 水
"m": ["#74c69d", "#40916c", "#1b4332"], //绿色 木
"j": ["#ffe347", "#ffc857", "#ffba08"], //黄色 金
"t": ["#cd9777", "#b07d62", "#8a5a44"], //褐色 土
"h": ["#f4acb7", "#f28482", "#ff6b6b"] //红色 火
};
//颜色转换
function color_exchange(x) {
switch (x) {
case 's0':
return 'rgbe(144,224,239)';
case 's1':
return "rgba(0,180,216)";
case 's2':
return "rgba(0,119,182)";
case 'm0':
return 'rgba(116,198,157)';
case 'm1':
return "rgba(64,145,108)";
case 'm2':
return "rgba(27,67,50)";
case 'j0':
return 'rgba(255,227,71)';
case 'j1':
return "rgba(255,200,87)";
case 'j2':
return "rgba(255,186,8)";
case 't0':
return 'rgba(205,151,119)';
case 't1':
return "rgba(176,125,98)";
case 't2':
return "rgba(138,90,68)";
case 'h0':
return 'rgba(244,172,183)';
case 'h1':
return "rgba(242,132,130)";
case 'h2':
return "rgba(255,107,107)";
}
}
//属性选择 将
// var a0, a1, a2, a3, a4, a5, a6; --> cl[0, 0, 0, 0, 0, 0, 0] = cl[0] ~ cl[6]
function ele_select(x) {
switch (x) {
case 0:
return a3;
case 1:
return a2;
case 2:
return a1;
case 3:
return b2;
case 4:
return a4;
case 5:
return b1;
case 6:
return c1;
}
}
function feshow_j(x) { //传入参数:环的颜色
console.log(x);
var j_loop = echarts.init(document.getElementById("j_loop"));
var j_option = {
animation: false,
tooltip: { //鼠标移上去的内容显示格式
trigger: 'item',
// formatter: '{a}
{b}: {c} ({d}%)'
formatter: '{b}',
},
series: [{
// name:'内圈',
hoverAnimation: false,
name: '金',
type: 'pie',
radius: [0, '20%'],
label: {
position: 'inner',
fontSize: 10,
color: 'rgba(0,0,0,0)'
},
data: [{
value: 1,
name: '金'
}],
color: ['rgba(0,0,0,0)'],
},
{
// name: '第一圈',
hoverAnimation: false,
name: '',
type: 'pie',
selectedMode: 'single',
radius: ['20%', '30.5%'],
itemStyle: {
emphasis: {
color: 'rgba(255,186,8)'
}
},
label: {
position: 'inner',
fontSize: 10,
selectedMode: false,
color: [
// x[0],
// x[1],
// x[2],
// x[3]
'rgba(255,255,255,0.8)',
'rgba(255,255,255,0.8)',
'rgba(255,255,255,0.8)',
'rgba(255,255,255,0.8)'
] //字体颜色
},
labelLine: {
show: false
},
data: [{
value: 25,
name: '主运'
}, //A1
{
value: 25,
name: '客运'
}, //A2
{
value: 25,
name: '岁支'
}, //A3
{
value: 25,
name: '主气'
}, //A4
],
color: [
x[0],
x[1],
x[2],
x[3]
]
},
{
// name: '第二圈',
hoverAnimation: false,
name: '',
type: 'pie',
selectedMode: 'single',
radius: ['31.5%', '41.5%'],
startAngle: 180, //开始角度,默认为90度(y轴正向),0度为X轴正向。
itemStyle: {
emphasis: {
color: 'rgba(255,186,8)'
}
},
label: {
position: 'inner',
fontSize: 10,
selectedMode: false,
color: [
'rgba(255,255,255,0.8)',
'rgba(255,255,255,0.8)'
]
},
labelLine: {
show: false
},
data: [{
value: 25,
name: '司天在泉'
}, //A5
{
value: 25,
name: '客气'
}, //A6
],
color: [
x[4],
x[5]
],
},
{
// name: '第三圈',
hoverAnimation: false,
name: '',
type: 'pie',
radius: ['42.5%', '50%'],
itemStyle: {
emphasis: {
color: 'rgba(255,186,8)'
}
},
label: {
position: 'inner',
fontSize: 10,
selectedMode: false,
// color:'white'
color: [
'rgba(255,255,255,0.8)'
]
},
data: [
{
value: 25,
name: '中运'
}, //A7
],
color: [
x[6]
]
},
],
};
j_loop.setOption(j_option);
}
function feshow_m(x) { //传入参数:环的颜色
console.log(x);
var m_loop = echarts.init(document.getElementById("m_loop"));
var m_option = {
animation: false,
tooltip: { //鼠标移上去的内容显示格式
trigger: 'item',
// formatter: '{a}
{b}: {c} ({d}%)'
formatter: '{b}',
},
series: [{
// name:'内圈',
hoverAnimation: false,
name: '木',
type: 'pie',
radius: [0, '20%'],
label: {
position: 'inner',
fontSize: 10,
color: 'rgba(0,0,0,0)'
},
data: [{
value: 1,
name: '木'
}],
color: ['rgba(0,0,0,0)'],
},
{
// name: '第一圈',
hoverAnimation: false,
name: '',
type: 'pie',
selectedMode: 'single',
radius: ['20%', '30.5%'],
itemStyle: {
emphasis: {
color: 'rgba(27,67,50)'
}
},
label: {
position: 'inner',
fontSize: 10,
selectedMode: false,
color: [
'rgba(255,255,255,0.8)',
'rgba(255,255,255,0.8)',
'rgba(255,255,255,0.8)',
'rgba(255,255,255,0.8)'
] //字体颜色
},
labelLine: {
show: false
},
data: [{
value: 25,
name: '主运'
}, //A1
{
value: 25,
name: '客运'
}, //A2
{
value: 25,
name: '岁支'
}, //A3
{
value: 25,
name: '主气'
}, //A4
],
color: [
x[0],
x[1],
x[2],
x[3]
],
},
{
// name: '第二圈',
hoverAnimation: false,
name: '',
type: 'pie',
selectedMode: 'single',
radius: ['31.5%', '41.5%'],
startAngle: 180, //开始角度,默认为90度(y轴正向),0度为X轴正向。
itemStyle: {
emphasis: {
color: 'rgba(27,67,50)'
}
},
label: {
position: 'inner',
fontSize: 10,
selectedMode: false,
color: [
'rgba(255,255,255,0.8)',
'rgba(255,255,255,0.8)'
]
},
labelLine: {
show: false
},
data: [{
value: 25,
name: '司天在泉'
}, //A5
{
value: 25,
name: '客气'
}, //A6
],
color: [
x[4],
x[5]
],
},
{
// name: '第三圈',
hoverAnimation: false,
name: '',
type: 'pie',
radius: ['42.5%', '50%'],
itemStyle: {
emphasis: {
color: 'rgba(27,67,50)'
}
},
label: {
position: 'inner',
fontSize: 10,
selectedMode: false,
// color:'white'
color: [
'rgba(255,255,255,0.8)'
]
},
data: [
{
value: 25,
name: '中运'
}, //A7
],
color: [
x[6]
]
},
],
};
m_loop.setOption(m_option);
}
function feshow_s(x) { //传入参数:环的颜色
var s_loop = echarts.init(document.getElementById("s_loop"));
var s_option = {
animation: false,
tooltip: { //鼠标移上去的内容显示格式
trigger: 'item',
// formatter: '{a}
{b}: {c} ({d}%)'
formatter: '{b}',
},
series: [{
// name:'内圈',
hoverAnimation: false,
name: '水',
type: 'pie',
radius: [0, '20%'],
label: {
position: 'inner',
fontSize: 10,
color: 'rgba(0,0,0,0)'
},
data: [{
value: 1,
name: '水'
}],
color: ['rgba(0,0,0,0)'],
},
{
// name: '第一圈',
hoverAnimation: false,
name: '',
type: 'pie',
selectedMode: 'single',
radius: ['20%', '30.5%'],
itemStyle: {
emphasis: {
color: 'rgba(0,119,182)'
}
},
label: {
position: 'inner',
fontSize: 10,
selectedMode: false,
color: [
// x[0],
// x[1],
// x[2],
// x[3]
'rgba(255,255,255,0.8)',
'rgba(255,255,255,0.8)',
'rgba(255,255,255,0.8)',
'rgba(255,255,255,0.8)'
] //字体颜色
},
labelLine: {
show: false
},
data: [{
value: 25,
name: '主运'
}, //A1
{
value: 25,
name: '客运'
}, //A2
{
value: 25,
name: '岁支'
}, //A3
{
value: 25,
name: '主气'
}, //A4
],
color: [
x[0],
x[1],
x[2],
x[3]
]
},
{
// name: '第二圈',
hoverAnimation: false,
name: '',
type: 'pie',
selectedMode: 'single',
radius: ['31.5%', '41.5%'],
startAngle: 180, //开始角度,默认为90度(y轴正向),0度为X轴正向。
itemStyle: {
emphasis: {
color: 'rgba(0,119,182)'
}
},
label: {
position: 'inner',
fontSize: 10,
selectedMode: false,
color: [
'rgba(255,255,255,0.8)',
'rgba(255,255,255,0.8)'
]
},
labelLine: {
show: false
},
data: [{
value: 25,
name: '司天在泉'
}, //A5
{
value: 25,
name: '客气'
}, //A6
],
color: [
x[4],
x[5]
],
},
{
// name: '第三圈',
hoverAnimation: false,
name: '',
type: 'pie',
radius: ['42.5%', '50%'],
itemStyle: {
emphasis: {
color: 'rgba(0,119,182)'
}
},
label: {
position: 'inner',
fontSize: 10,
selectedMode: false,
// color:'white'
color: [
'rgba(255,255,255,0.8)'
]
},
data: [
{
value: 25,
name: '中运'
}, //A7
],
color: [
x[6]
]
},
],
};
s_loop.setOption(s_option);
}
function feshow_h(x) { //传入参数:环的颜色
var h_loop = echarts.init(document.getElementById("h_loop"));
var h_option = {
animation: false,
tooltip: { //鼠标移上去的内容显示格式
trigger: 'item',
// formatter: '{a}
{b}: {c} ({d}%)'
formatter: '{b}'
},
series: [{
// name:'内圈',
hoverAnimation: false,
name: '火',
type: 'pie',
radius: [0, '20%'],
label: {
position: 'inner',
fontSize: 10,
color: 'rgba(0,0,0,0)'
},
data: [{
value: 1,
name: '火'
}],
color: ['rgba(0,0,0,0)'],
},
{
// name: '第一圈',
hoverAnimation: false,
name: '',
type: 'pie',
selectedMode: 'single',
radius: ['20%', '30.5%'],
itemStyle: {
emphasis: {
color: 'rgba(255,107,107)'
}
},
label: {
position: 'inner',
fontSize: 10,
color: [
// x[0],
// x[1],
// x[2],
// x[3]
'rgba(255,255,255,0.8)',
'rgba(255,255,255,0.8)',
'rgba(255,255,255,0.8)',
'rgba(255,255,255,0.8)'
] //字体颜色
},
labelLine: {
show: false
},
data: [{
value: 25,
name: '主运'
}, //A1
{
value: 25,
name: '客运'
}, //A2
{
value: 25,
name: '岁支'
}, //A3
{
value: 25,
name: '主气'
}, //A4
],
color: [
x[0],
x[1],
x[2],
x[3]
]
},
{
// name: '第二圈',
hoverAnimation: false,
name: '',
type: 'pie',
selectedMode: 'single',
radius: ['31.5%', '41.5%'],
startAngle: 180, //开始角度,默认为90度(y轴正向),0度为X轴正向。
itemStyle: {
emphasis: {
color: 'rgba(255,107,107'
}
},
label: {
position: 'inner',
fontSize: 10,
// color:'white'
color: [
'rgba(255,255,255,0.8)',
'rgba(255,255,255,0.8)'
]
},
labelLine: {
show: false
},
data: [{
value: 25,
name: '司天在泉'
}, //A5
{
value: 25,
name: '客气'
}, //A6
],
color: [
x[4],
x[5]
],
},
{
// name: '第三圈',
hoverAnimation: false,
name: '',
type: 'pie',
radius: ['42.5%', '50%'],
itemStyle: {
emphasis: {
color: 'rgba(255,107,107'
}
},
label: {
position: 'inner',
fontSize: 10,
// color:'white'
color: [
'rgba(255,255,255,0.8)'
]
},
data: [{
value: 25,
name: '中运'
}, //A7
],
color: [
x[6]
]
},
],
};
h_loop.setOption(h_option);
}
function feshow_t(x) { //传入参数:环的颜色
var t_loop = echarts.init(document.getElementById("t_loop"));
var t_option = {
animation: false,
tooltip: { //鼠标移上去的内容显示格式
trigger: 'item',
// formatter: '{a}
{b}: {c} ({d}%)'
formatter: '{b}',
},
series: [{
// name:'内圈',
hoverAnimation: false,
name: '土',
type: 'pie',
radius: [0, '20%'],
label: {
position: 'inner',
fontSize: 10,
color: 'rgba(0,0,0,0)'
},
data: [{
value: 1,
name: '土'
}],
color: ['rgba(0,0,0,0)'],
},
{
// name: '第一圈',
hoverAnimation: false,
name: '',
type: 'pie',
selectedMode: 'single',
radius: ['20%', '30.5%'],
itemStyle: {
emphasis: {
color: 'rgba(138,90,68)'
}
},
label: {
position: 'inner',
fontSize: 10,
selectedMode: false,
color: [
// x[0],
// x[1],
// x[2],
// x[3]
'rgba(255,255,255,0.8)',
'rgba(255,255,255,0.8)',
'rgba(255,255,255,0.8)',
'rgba(255,255,255,0.8)'
] //字体颜色
},
labelLine: {
show: false
},
data: [{
value: 25,
name: '主运'
}, //A1
{
value: 25,
name: '客运'
}, //A2
{
value: 25,
name: '岁支'
}, //A3
{
value: 25,
name: '主气'
}, //A4
],
color: [
x[0],
x[1],
x[2],
x[3]
]
},
{
// name: '第二圈',
hoverAnimation: false,
name: '',
type: 'pie',
selectedMode: 'single',
radius: ['31.5%', '41.5%'],
startAngle: 180, //开始角度,默认为90度(y轴正向),0度为X轴正向。
itemStyle: {
emphasis: {
color: 'rgba(138,90,68)'
}
},
label: {
position: 'inner',
fontSize: 10,
selectedMode: false,
color: [
'rgba(255,255,255,0.8)',
'rgba(255,255,255,0.8)'
]
},
labelLine: {
show: false
},
data: [{
value: 25,
name: '司天在泉'
}, //A5
{
value: 25,
name: '客气'
}, //A6
],
color: [
x[4],
x[5]
],
},
{
// name: '第三圈',
hoverAnimation: false,
name: '',
type: 'pie',
radius: ['42.5%', '50%'],
itemStyle: {
emphasis: {
color: 'rgba(138,90,68)'
}
},
label: {
position: 'inner',
fontSize: 10,
selectedMode: false,
// color:'white'
color: [
'rgba(255,255,255,0.8)'
]
},
data: [
{
value: 25,
name: '中运'
}, //A7
],
color: [
x[6]
]
},
],
};
t_loop.setOption(t_option);
}