Skip to content

Commit

Permalink
fix(desktop): fix tooltip overflow in tree visual component
Browse files Browse the repository at this point in the history
  • Loading branch information
ysfscream authored and Red-Asuka committed Oct 25, 2024
1 parent 2df620f commit 4d712d7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { CanvasRenderer } from 'echarts/renderers'
echarts.use([TooltipComponent, LegendComponent, TreeChart, CanvasRenderer])
@Component
export default class TreeChartComponent extends Vue {
export default class TreeVisual extends Vue {
@Prop({ required: true }) public id!: string
@Prop({ default: '400px' }) public height!: string
@Prop({ default: '100%' }) public width!: string
Expand Down Expand Up @@ -48,6 +48,7 @@ export default class TreeChartComponent extends Vue {
trigger: 'item',
triggerOn: 'mousemove',
formatter: this.tooltipFormatter,
confine: true,
},
series: [
{
Expand Down
6 changes: 3 additions & 3 deletions src/components/widgets/TreeView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
<i class="iconfont icon-about"></i>
</el-tooltip>
</span>
<tree-chart
<tree-visual
v-if="selectedTreeData"
id="tree-view"
:data="selectedTreeData"
Expand All @@ -121,12 +121,12 @@ import { Getter } from 'vuex-class'
import { Tree } from 'element-ui'
import { getAllIDs, isPayloadEmpty } from '@/utils/topicTree'
import MyDialog from '@/components/MyDialog.vue'
import TreeChart from '@/components/charts/Tree.vue'
import TreeVisual from '@/components/charts/TreeVisual.vue'
@Component({
components: {
MyDialog,
TreeChart,
TreeVisual,
},
})
export default class TreeView extends Vue {
Expand Down

0 comments on commit 4d712d7

Please sign in to comment.