refactor(图表): 去除G2PLOT

This commit is contained in:
wisonic-s
2025-04-23 16:26:53 +08:00
committed by GitHub
parent 062cca2d70
commit d30ef2b77b
4 changed files with 5 additions and 11 deletions

View File

@@ -26,7 +26,7 @@ export default {
vue: ['vue', 'vue-router', 'pinia', 'vue-i18n', 'mitt'],
lodash: ['lodash-es', 'lodash'],
library: ['jspdf', '@tinymce/tinymce-vue', 'screenfull'],
antv: ['@antv/g2', '@antv/g2plot', '@antv/l7', '@antv/l7plot', '@antv/s2'],
antv: ['@antv/g2', '@antv/l7', '@antv/l7plot', '@antv/s2'],
tinymce: ['tinymce'],
axios: ['axios'],
'vuedraggable-es': ['vuedraggable']

View File

@@ -1,5 +1,3 @@
import type { PickOptions } from '@antv/g2plot/esm/core/plot'
import type { Plot } from '@antv/g2plot/esm/core/plot'
import {
getAnalyse,
getAnalyseHorizontal,
@@ -31,7 +29,6 @@ import {
handleEmptyDataStrategy,
setupSeriesColor
} from '../../../util'
import { Options } from '@antv/g2plot'
export interface G2PlotDrawOptions<O> extends AntVDrawOptions<O> {
/**

View File

@@ -5,8 +5,6 @@ import { FeatureCollection } from '@antv/l7plot/dist/esm/plots/choropleth/types'
import { useMapStoreWithOut } from '@/store/modules/map'
import { getGeoJson } from '@/api/map'
import { computed, toRaw } from 'vue'
import { Options } from '@antv/g2plot/esm'
import { PickOptions } from '@antv/g2plot/esm/core/plot'
import { innerExportDataSetDetails, innerExportDetails } from '@/api/chart'
import { ElMessage } from 'element-plus-secondary'
import { useI18n } from '@/hooks/web/useI18n'

View File

@@ -7,7 +7,6 @@ import copilot from '@/assets/svg/copilot.svg'
import chartTable from '@/assets/svg/chart-table.svg'
import chartDownload from '@/assets/svg/chart-download.svg'
import { PropType, computed, onMounted, shallowRef, ref, nextTick, watch } from 'vue'
import { Column, Line, Pie } from '@antv/g2plot'
import { useElementSize } from '@vueuse/core'
import { downloadCanvas } from '@/utils/imgUtils'
import ExcelJS from 'exceljs'
@@ -53,7 +52,7 @@ const chartRef = ref()
const { width } = useElementSize(chartRef)
onMounted(() => {
const { chart, msgType, msgStatus, chartData, id } = props.copilotInfo
if (msgStatus === 1 && msgType === 'api' && chartData) {
/* if (msgStatus === 1 && msgType === 'api' && chartData) {
if (['bar', 'line'].includes(chart.type)) {
activeCommand.value = chart.type
const chartType = chart.type === 'bar' ? Column : Line
@@ -94,7 +93,7 @@ onMounted(() => {
})
renderTableLocal.value = true
}
}
} */
nextTick(() => {
;(chartTypeList.value || content.value).scrollIntoView({
block: 'end',
@@ -134,7 +133,7 @@ const changeChartType = () => {
}
const switchChartType = type => {
renderTableLocal.value = false
nextTick(() => {
/* nextTick(() => {
if (columnPlot?.chart && !columnPlot.chart.wrapperElement) {
columnPlot.chart.wrapperElement = document.querySelector(
`#de-${props.copilotInfo.id}-ed > div`
@@ -193,7 +192,7 @@ const switchChartType = type => {
renderTableLocal.value = true
}
})
}) */
}
const chartTypeRef = ref()
const downloadChart = () => {