<!--
为了方便我们能够复现和修复 bug,请遵从下面的规范描述您的问题。
-->
### One-line summary [问题简述]
var hours = [0,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,
22,23,24,25,26,27,28];
var days = [0,6,7,8,9,10,11,12,13,14,15,16];
var data = [[0,0,5],[1,1,1],[2,2,6],[5,3,8]];
option = {
title: {
text: '三维立体图',
subtext: '单位:(cm)'
},
tooltip: {},
visualMap: {
max: 20,
inRange: {
color: ['#313695', '#4575b4', '#74add1', '#abd9e9', '#e0f3f8',
'#ffffbf', '#fee090', '#fdae61', '#f46d43', '#d73027', '#a50026']
}
},
xAxis3D: {
type: 'category',
data: hours,
axisLabel:{
show:true,
interval:0
}
},
yAxis3D: {
type: 'category',
data: days,
axisLabel:{
show:true,
interval:0
}
},
zAxis3D: {
type: 'value'
},
grid3D: {
boxWidth: 200,
boxDepth: 80,
viewControl: {
// projection: 'orthographic'
},
light: {
main: {
intensity: 1.2,
shadow: true
},
ambient: {
intensity: 0.3
}
}
},
series: [
{
name: '辅助',
stack: '总量1',
type: 'bar3D',
data: data.map(function (item) {
return {
value: [-1, -1, item[2],item[2]]
}
}),
itemStyle: {
opacity: 0
}
},
{
name: '辅助',
stack: '总量1',
type: 'bar3D',
data: data.map(function (item) {
return {
value: [item[1], item[0], item[2]],
}
}),
shading: 'lambert',
label: {
textStyle: {
fontSize: 16,
borderWidth: 1
}
},
emphasis: {
label: {
textStyle: {
fontSize: 20,
color: '#900'
}
},
itemStyle: {
color: '#900'
}
}
}
]
}
现在的情况是:
1.左下角的坐标是正方体的原点坐标,从这个原点开始往xyz轴方向5cm就是它的长宽高(它的长宽高就是5cm);例如左下角的坐标是(1,1,1),那么它右上角的坐标就是(6,6,6).而且是悬浮在空中
2.现在的要求是悬浮在柱体上显示的是可以是它的坐标(1,1,1),但是要求视觉看上是个正方体,且这样不同坐标同样边长的正方体是多个,视觉上它的长宽高要和xyz轴的刻度一致;例如左下角的坐标是(1,1,1),那么它剩余的坐标是(1,6,1),(1,6,6),(6,1,1),(6,6,1),(6,6,6)...
3.虽然前行修改了xy轴的刻度值,但是刻度值之间的距离不对,例如x轴数字是0,6,7,8...,但是刻度之间的距离是一样的
4.z轴如果type不是value的话就不会让柱体浮在空中,随之而来的是不能控制显示的数字
### Version & Environment [版本及环境]
+ ECharts version [ECharts 版本]:
+ Browser version [浏览器类型和版本]:
+ OS Version [操作系统类型和版本]:
### Expected behaviour [期望结果]
### ECharts option [ECharts配置项]
<!-- Copy and paste your 'echarts option' here. -->
<!-- [下方贴你的option,注意不要删掉下方 ```javascript 和 尾部的 ``` 字样。最好是我们能够直接运行的
option。如何得到能运行的 option 参见上方的 guidelines for contributing] -->
```javascript
option = {
}
```
### Other comments [其他信息]
<!-- For example: Screenshot or Online demo -->
<!-- [例如,截图或线上实例 (JSFiddle/JSBin/Codepen)] -->
[ Full content available at:
https://github.com/apache/incubator-echarts/issues/8916 ]
This message was relayed via gitbox.apache.org for [email protected]