Files
echart/js/trend.basic.js
T
simonandClaude Opus 4.7 eedead0d41 feat: 全面代码更新 - ECharts 5.4.2 重构、新增量化分析模块、前端库升级
- 升级 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>
2026-06-06 18:01:55 +08:00

80 lines
2.3 KiB
JavaScript

/**
* Created by Simon on 2017-6-14.
*/
(function(){
$("#btn-search").on("click",function(){
if(check_form("myform")){
$("#myform").submit();
}
});
drawGraph();
function drawGraph(){
// 基于准备好的dom,初始化echarts实例
var myChart = echarts.init(document.getElementById('main'));
var x = $.parseJSON($("#x").val());
var legend = $.parseJSON($("#legend").val());
var total = $.parseJSON($("#total").val());
var l_yield = $.parseJSON($("#yield").val());
var option = {
title: {
text: '经营报表趋势图',
top: "top",
left: "center"
},
tooltip: {
trigger: 'axis',
axisPointer: {
animation: false
}
},
grid: {x: '7%', y: '7%', width: '85%', height: '70%',top: "15%"},
xAxis: {
type : 'category',
data : x
},
yAxis: [{
type: 'value',
name: legend[0],
},{
type: 'value',
name: legend[1],
/* axisLabel: {
formatter:'{value} %'
}, */
scale: true,
boundaryGap: ['20%','20%']
}],
series: [{
name: legend[0],
type: "bar",
yAxisIndex: 0,
data: total,
itemStyle:{
normal:{
color: "#00BB00"
}
}
},{
name: legend[1],
type: "line",
yAxisIndex: 1,
data: l_yield,
label:{
normal:{
show: true
}
},
lineStyle:{
normal:{
color: "#D26900"
}
}
}]
};
//console.info(option);
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
}
})();