wujingjing
2024-10-12 2a907e2a94362abdc3610049de548633c07529b2
src/components/chat/chatComponents/summaryCom/components/recordSet/RecordSet.vue
@@ -117,7 +117,10 @@
let preData = null;
let activeChartType: ChartTypeEnum = props.data?.chart_type ?? ChartTypeEnum.Line;
const originChartType = activeChartType;
const getChartTypeSeriesOption = (type: ChartTypeEnum) => {
   let result = {};
   switch (type) {
@@ -173,14 +176,14 @@
      });
   }
   const yAxisFormatter =
      activeChartType === ChartTypeEnum.Score
   originChartType === ChartTypeEnum.Score
         ? (value) => {
               return scoreMap[value];
           }
         : axisLabelFormatter;
   const tooltipValueFormatter =
      activeChartType === ChartTypeEnum.Score
   originChartType === ChartTypeEnum.Score
         ? (value) => {
               return scoreMap[value];
           }
@@ -212,7 +215,7 @@
            feature: {
               myBar: {
                  onclick: () => {
                     activeChartType = props.data.chart_type === ChartTypeEnum.Score ? ChartTypeEnum.Score : ChartTypeEnum.Bar;
                     activeChartType = originChartType === ChartTypeEnum.Score ? ChartTypeEnum.Score : ChartTypeEnum.Bar;
                     chartInstance.value.setOption({
                        series: series.map((item) => ({
                           ...item,
@@ -258,7 +261,7 @@
            name: valueCol?.title,
            /** @description 不强制保留 */
            scale: true,
            ...(activeChartType === ChartTypeEnum.Score ? scoreYAxisOption : {}),
            ...(originChartType === ChartTypeEnum.Score ? scoreYAxisOption : {}),
         },
         series: series,
      } as echarts.EChartsOption,
@@ -389,7 +392,7 @@
               ${item.marker}<span style="font-size: 14px; color: #666; font-weight: 400; margin-left: 2px"
                  >${item.seriesName}</span
               ><span style="float: right; margin-left: 20px; font-size: 14px; color: #666; font-weight: 900">${
                  activeChartType === ChartTypeEnum.Score ? scoreMap[item.data[1]] : item.data[1]
                  originChartType === ChartTypeEnum.Score ? scoreMap[item.data[1]] : item.data[1]
               }</span>
               <div style="clear: both"></div>
            </div>