占比图间距

This commit is contained in:
jingna 2025-07-30 09:09:54 +08:00
parent 4e726e671d
commit 8699bd5446
6 changed files with 23 additions and 25 deletions

View File

@ -88,7 +88,6 @@ defineExpose({
previewInit
})
onMounted(()=>{
console.log(state,999,'DePreviewPopDialog mounted')
})
</script>

View File

@ -41,6 +41,7 @@
import { imgUrlTrans } from '@/utils/imgUtils'
import Board from '@/components/de-board/Board.vue'
import ChartCarouselTooltip from '@/views/chart/components/js/g2plot_tooltip_carousel'
import { getData } from '@/api/chart'
const dvMainStore = dvMainStoreWithOut()
const snapshotStore = snapshotStoreWithOut()
const { tabMoveInActiveId, bashMatrixInfo, editMode, mobileInPc } = storeToRefs(dvMainStore)
@ -57,6 +58,9 @@
element: {
type: Object
},
view: {
type: Object,
},
editMode: {
type: String,
require: false,
@ -594,6 +598,8 @@
// }
onMounted(() => {
console.log(props.view)
initview()
// if (element.value.propValue.length > 0) {
// editableTabsValue.value = element.value.propValue[0].name
// }
@ -612,7 +618,12 @@
// viewToolTipsChange()
// }, 1000)
})
function initview(){
debugger
getData(props.view).then(res => {
console.log(res,378923749234)
})
}
// onBeforeUnmount(() => {
// if (['canvas', 'canvasDataV', 'edit'].includes(showPosition.value) && !mobileInPc.value) {
// eventBus.off('onTabMoveIn-' + element.value.id, componentMoveIn)
@ -626,6 +637,7 @@
// carouselTimer = null
// }
// })
</script>
<style lang="less" scoped>
.title-hidde-tab {

View File

@ -954,6 +954,7 @@ const onAxisChange = (e, axis: AxisType) => {
}
const calcData = (view, resetDrill = false, updateQuery = '') => {
debugger
if (
view.refreshTime === '' ||
parseFloat(view.refreshTime).toString() === 'NaN' ||
@ -999,8 +1000,6 @@ const changestatus = () => {
item.status = false
}
})
console.log(mapServer.value)
console.log(mapSelect.value)
// mapSelect.value = mapServer.value.find(server => server.status === true);
}
const updatamap = () => {

View File

@ -18,17 +18,10 @@ export class RichTextChartView extends AbstractChartView {
threshold: ['tableThreshold'],
'function-cfg': ['emptyDataStrategy']
}
axis: AxisType[] = ['xAxis', 'yAxis', 'filter']
axis: AxisType[] = ['xAxis', 'filter']
axisConfig: AxisConfig = {
xAxis: {
name: `${t('chart.dimension')}`,
type: 'd',
allowEmpty: true
},
yAxis: {
name: `${t('chart.quota')}`,
type: 'q',
allowEmpty: true
name: `${t('chart.drag_block_table_data_column')} / ${t('chart.dimension_or_quota')}`
}
}
constructor() {

View File

@ -93,7 +93,9 @@ export class G2Pie extends G2ChartView {
}
const g2 = new Chart({
container,
autoFit: true
autoFit: true,
padding:0,
appendPadding:0
})
g2.coordinate('theta', {
radius: customAttr.basicStyle.radius / 100,
@ -122,20 +124,10 @@ export class G2Pie extends G2ChartView {
}
g2.facet('rect', {
fields: ['name'],
padding: 20,
padding: 0,
showTitle: false,
eachView: (view, facet) => {
const data:any = facet.data
// let color
// if(customAttr.basicStyle.seriesColor.length>0){
// customAttr.basicStyle.seriesColor.forEach((item) => {
// if(data.name == item.name){
// color = item.color
// }
// })
// }else{
// color = colorList[0]
// }
data.push({ name: '其他', value: 100 - data[0].value })
view.data(data)
view.coordinate('theta', {

View File

@ -577,6 +577,7 @@ const queryData = (firstLoad = false) => {
}
const calcData = params => {
debugger
dvMainStore.setLastViewRequestInfo(params.id, params.chartExtRequest)
if (chartComponent?.value) {
if (['DeTree'].includes(view.value.type)) {
@ -595,6 +596,7 @@ const calcData = params => {
]
})
} else {
console.log(chartComponent,'23213')
chartComponent?.value?.calcData?.(params, () => {
loading.value = false
})
@ -1210,6 +1212,7 @@ const clearG2Tooltip = () => {
/>
<de-tree-view
v-else-if="showChartView(ChartLibraryType.DETREE)"
:view="view"
:scale="scale"
:themes="canvasStyleData.dashboard.themeColor"
ref="chartComponent"