|
@@ -6,8 +6,9 @@ import * as echarts from 'echarts';
|
|
|
* @param seriesList 折线数据内容
|
|
|
* @param legendList 图表数据说明
|
|
|
* @param domId 目标DOM元素ID
|
|
|
+ * @param xAxisName X轴刻度名称
|
|
|
*/
|
|
|
-export function initLineImageTable(xTitleList: any, seriesList: any, legendList: any, domId: any) {
|
|
|
+export function initLineImageTable(xTitleList: any, seriesList: any, legendList: any, domId: any, xAxisName: any) {
|
|
|
const chartDom = document.getElementById(domId);
|
|
|
let myChart = echarts.init(chartDom);
|
|
|
if (myChart != null) {
|
|
@@ -32,12 +33,13 @@ export function initLineImageTable(xTitleList: any, seriesList: any, legendList:
|
|
|
grid: {
|
|
|
top: '3%',
|
|
|
left: '3%',
|
|
|
- right: '3%',
|
|
|
+ right: '5%',
|
|
|
bottom: '30px',
|
|
|
containLabel: true
|
|
|
},
|
|
|
xAxis: {
|
|
|
type: 'category',
|
|
|
+ name: xAxisName,
|
|
|
boundaryGap: false,
|
|
|
data: xTitleList,
|
|
|
axisLabel: {
|