{
const rows = gridRef.getRows();
const xAxisData = [];
const seriesData = [];
for (const row of rows) {
xAxisData.push(row.year + (row.month ? '-' + row.month : ''));
seriesData.push(row.value);
}
echartsOptionRef = {
title: {
text: factorDefine.name,
left: 'center',
},
xAxis: {
type: 'category',
name: $t('period'),
data: xAxisData,
},
yAxis: {
type: 'value',
name: $t('value'),
},
series: [
{
data: seriesData,
type: 'line',
smooth: true,
},
],
};
}
"
>