更新:重构和迁移多个PHP文件到deprecated目录,删除不再使用的文件,更新pubfunc.js版本;index_trend,stock_trend 数据源以及代码重构简化
This commit is contained in:
+19
-11
@@ -1,4 +1,12 @@
|
||||
function doubleLineChart(){
|
||||
/*
|
||||
* @Author: 杨水淼 yangshuimiao@jsjd.cc
|
||||
* @Date: 2025-07-08 10:40:52
|
||||
* @LastEditors: 杨水淼 yangshuimiao@jsjd.cc
|
||||
* @LastEditTime: 2025-07-09 07:38:46
|
||||
* @FilePath: \echarts\js\renderCharts.js
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
function doubleLineChart(params){
|
||||
/*
|
||||
需要外部提供:
|
||||
chartid: div container id
|
||||
@@ -7,13 +15,13 @@ function doubleLineChart(){
|
||||
sub_text: str
|
||||
data:data1,data2, array
|
||||
*/
|
||||
var dom = document.getElementById("chartid");
|
||||
var dom = document.getElementById(params.chartid);
|
||||
var myChart = echarts.init(dom,'dark');
|
||||
option = null;
|
||||
option = {
|
||||
title: {
|
||||
text: legend[0]+' V.S '+legend[2],
|
||||
subtext: subtxt,
|
||||
text: params.text,
|
||||
subtext: params.sub_text,
|
||||
textAlign:'center',
|
||||
left:'50%'
|
||||
},
|
||||
@@ -21,7 +29,7 @@ function doubleLineChart(){
|
||||
trigger: 'axis'
|
||||
},
|
||||
legend: {
|
||||
data:legend,
|
||||
data:params.legend,
|
||||
right:'20'
|
||||
},
|
||||
grid: {
|
||||
@@ -41,12 +49,12 @@ function doubleLineChart(){
|
||||
},
|
||||
yAxis: [{
|
||||
type: 'value',
|
||||
name:legend[0], //图列
|
||||
name:params.legend[0], //图列
|
||||
show:true
|
||||
},
|
||||
{
|
||||
type:'value',
|
||||
name:legend[2]+unit, //图例
|
||||
name:params.legend[1], //图例
|
||||
//scale:true,
|
||||
boundaryGap:false,
|
||||
show:true,
|
||||
@@ -74,19 +82,19 @@ function doubleLineChart(){
|
||||
}],
|
||||
series: [
|
||||
{
|
||||
name:legend[0],
|
||||
name:params.legend[0],
|
||||
type:'line',
|
||||
yAxisIndex:0,
|
||||
symbol:'none',
|
||||
data:data1
|
||||
data:params.data1
|
||||
},
|
||||
{
|
||||
name:legend[2],
|
||||
name:params.legend[1],
|
||||
type:'line',
|
||||
yAxisIndex:1,
|
||||
symbol:'none', //数据圆点
|
||||
smooth:false,
|
||||
data:data2
|
||||
data:params.data2
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user