- 升级 ECharts 到 5.4.2,重构 lib/ 目录结构 - 新增 DataTables 2.x 和 FixedColumns 插件 - 新增 quant/ 宏观研究报告模块 - 重构图表页面:stock_trend、hkholdbycode 等采用 JS fetch API.doorcome.cn 模式 - 新增 CLAUDE.md 补充页面文档和新数据流说明 - 更新 inc/config.php TuShare API 配置 - 更新新闻联播分析模块 news/ 和相关研究报告 research/ - 新增 api_document/ 参考文档 - 清理 .gitignore,排除 uploads/xls/.mcp.json/ source maps 等非代码文件 - 所有 PHP 文件通过 php -l 语法检查 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
93 lines
2.5 KiB
PHP
93 lines
2.5 KiB
PHP
<!DOCTYPE html>
|
|
<html style="height: 100%">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
</head>
|
|
<?php
|
|
ini_set('error_reporting', E_ALL);
|
|
include_once "inc/getData.inc.php";
|
|
$day_st='20180101';
|
|
$day_end=date('Ymd');
|
|
$data=getIndexData('000001.SH',$day_st,$day_end);
|
|
$data1=getIndexData('399001.SZ',$day_st,$day_end);
|
|
$legend=array('上证综指','深证成指');
|
|
?>
|
|
<body style="height: 100%; margin: 0">
|
|
<div id="container" style="height: 400px;width: 1000px"></div>
|
|
<script type="text/javascript" src="../js/echarts.min.js"></script>
|
|
<script type="text/javascript" src="../js/echarts-gl.min.js"></script>
|
|
<script type="text/javascript" src="../js/ecStat.min.js"></script>
|
|
<script type="text/javascript" src="../js/dataTool.min.js"></script>
|
|
<script type="text/javascript" src="../js/simplex.js"></script>
|
|
<script type="text/javascript" src="../js/grey.js"></script>
|
|
<script type="text/javascript">
|
|
var dom = document.getElementById("container");
|
|
var myChart = echarts.init(dom,'grey');
|
|
var app = {};
|
|
option = null;
|
|
legend = <?php echo json_encode($legend);?>;
|
|
option = {
|
|
title: {
|
|
text: '历史数据折线图',
|
|
subtext:"双轴显示",
|
|
textAlign:'center',
|
|
left:'50%'
|
|
},
|
|
tooltip: {
|
|
trigger: 'axis'
|
|
},
|
|
legend: {
|
|
data:legend,
|
|
right:'20'
|
|
},
|
|
grid: {
|
|
left: '3%',
|
|
right: '4%',
|
|
bottom: '3%',
|
|
containLabel: true
|
|
},
|
|
toolbox: {
|
|
feature: {
|
|
saveAsImage: {}
|
|
}
|
|
},
|
|
xAxis: {
|
|
type: 'category',
|
|
//type: 'time',
|
|
boundaryGap: false,
|
|
data: <?php echo json_encode($data['tDate']); ?>
|
|
},
|
|
yAxis: [{
|
|
type: 'value',
|
|
name:legend[0], //图列
|
|
show:true
|
|
},
|
|
{
|
|
type:'value',
|
|
name:legend[1], //图例
|
|
//scale:true, //true 不强制包含0刻度
|
|
boundaryGap:false,
|
|
show:true
|
|
}],
|
|
series: [
|
|
{
|
|
name:legend[0],
|
|
type:'line',
|
|
yAxisIndex:0,
|
|
data:<?php echo json_encode($data['idx']); ?>
|
|
},
|
|
{
|
|
name:legend[1],
|
|
type:'line',
|
|
yAxisIndex:1,
|
|
data:<?php echo json_encode($data1['idx']); ?>
|
|
}
|
|
]
|
|
};
|
|
;
|
|
if (option && typeof option === "object") {
|
|
myChart.setOption(option, true);
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|