Browse Source

点位数据展示逻辑优化

任一存 1 year ago
parent
commit
812b364229
1 changed files with 1 additions and 4 deletions
  1. 1 4
      src/App.vue

+ 1 - 4
src/App.vue

@@ -544,9 +544,6 @@ export default {
         .attr('initial-fill', (d) => {
           return `rgba(${Math.round((d[2] -zMin) / zLength * 255)}, 0, 0, ${d[3] ? '0.7' : '1'})`
         })
-        .attr('raw-data', (d) => {
-          return d[4]
-        })
 
       gNode.selectAll('rect').on('mouseenter', function(e, d) {
         const id = d[d.length - 1]
@@ -555,7 +552,7 @@ export default {
         })) {
           d3.select(this).attr('fill', 'orange')
         }
-        that.infoText = e.target.attributes['raw-data'].value
+        that.infoText = d[4]
       }).on('mouseleave', function (e, d) {
         const id = d[d.length - 1]
         if (id !== activeRect?.datum()[activeRect?.datum().length - 1] && !activeRectNeighbourList?.some((item) => {