修改lenged样式

This commit is contained in:
wenzhijie
2022-08-11 11:17:35 +08:00
parent cdc702f689
commit feb662068c

View File

@@ -13,6 +13,7 @@
:legends="legends"
:series="series"
:is-fullscreen="isFullscreen"
class="legends-flex"
></chart-legend>
</div>
<div :class="`chart-canvas-tooltip-${chartId}`" :id="`chart-canvas-tooltip-${chartId}`" class="chart-canvas-tooltip" :style="{left:tooltip.x+'px',top:tooltip.y+'px'}" v-if="tooltip.show">
@@ -209,7 +210,6 @@ export default {
},
// 处理label
treemapFormatterLabel (node) {
console.log(1100)
let str = ''
let valueStr = ''
if (this.chartInfo.param.text === 'all') {
@@ -226,7 +226,6 @@ export default {
str += ''
}
if (str && valueStr) {
console.log(1)
return `
<div style="width:100%;height: 100%;display: flex;align-items: center;justify-content: center;flex-direction: column;cursor: pointer;">
<p style="width: 80%;text-overflow: ellipsis;white-space: nowrap;overflow:hidden;text-align:center">
@@ -239,7 +238,6 @@ export default {
</div>
`
} else if (str) {
console.log(2)
return `
<div style="width:100%;height: 100%;display: flex;align-items: center;justify-content: center;flex-direction: column;cursor: pointer;">
<p style="width: 80%;text-overflow: ellipsis;white-space: nowrap;overflow:hidden;text-align:center">
@@ -249,7 +247,6 @@ export default {
</div>
`
} else if (valueStr) {
console.log(3)
return `
<div style="width:100%;height: 100%;display: flex;align-items: center;justify-content: center;flex-direction: column;cursor: pointer;">
<p style="width: 80%;text-overflow: ellipsis;white-space: nowrap;overflow:hidden;text-align:center">
@@ -373,4 +370,20 @@ export default {
</script>
<style scoped>
.theme-light .legend-container .legend-item {
white-space: nowrap;
margin-right: 10px;
cursor: pointer;
display: inline-block;
flex-wrap: wrap;
flex-direction: column;
}
.theme-light .legend-container{
height:30px !important;
-ms-overflow-style: none; /* Internet Explorer 10+ */
scrollbar-width: none; /* Firefox */
}
.container::-webkit-scrollbar {
display: none; /* Safari and Chrome */
}
</style>