ecomfe / echarts-gl

Extension pack for Apache ECharts, providing globe visualization and 3D plots.
BSD 3-Clause "New" or "Revised" License
2.61k stars 843 forks source link

Can the bar3D show inner label on each bar? #128

Closed xiguaxigua closed 7 years ago

xiguaxigua commented 7 years ago

One-line summary [问题简述]

As the example, I want to add label on each bar, but text was covered by upper bar and what I can do is just change the opacity. So, can the bar add inner text?

2017-09-13 3 00 40

Version & Environment [版本及环境]

Expected behaviour [期望结果]

add inner text on the bar

ECharts option [ECharts配置项]

option = {

  legend: {
    data: ['a', 'b', 'c', 'd']
  },
  xAxis3D: {
    type: 'value',
    show: false
  },
  yAxis3D: {
    type: 'value',
  },
  zAxis3D: {
    type: 'value',
  },
  grid3D: {
    show: false,
    viewControl: {
      // zoomSensitivity: 0,
      // rotateSensitivity: 0,
      // panSensitivity: 0,
      animation: false,
      panMouseButton: 'right'
    },
    light: {
      main: {
        shadow: true,
        quality: 'ultra',
        intensity: 1.5
      }
    }
  },
  series: [
    {
      type: 'bar3D',
      label: {
        show: true,
        distance: 2,
        textStyle: {
          color: '#000'
        }
      },
      itemStyle: {
        opacity: 0.8
      },
      name: 'a',
      shading: 'lambert',
      stack: 'stack',
      data: [
        [0, 10, 10]
      ]
    },
    {
      type: 'bar3D',
      label: {
        show: true,
        distance: 2,
        textStyle: {
          color: '#000'
        }
      },
      itemStyle: {
        opacity: 0.8
      },
      name: 'b',
      shading: 'lambert',
      stack: 'stack',
      data: [
        [0, 10, 20]
      ]
    }
  ]
}

Other comments [其他信息]

https://jsfiddle.net/vue_echarts/bq53s6yw/

xiguaxigua commented 7 years ago

And what's the bast way to change bar3D to horizontal as baidu tongji

pissang commented 7 years ago

About the label, will put all labels in front of bars next version. Horizontal bar3D is in plan.

xiguaxigua commented 7 years ago

Thank you