var data = [{ // 数据项名称 name: '数据1', value : [0, 0, 128], //自定义特殊itemStyle,仅对该item有效 itemStyle:{ color:'#25b8d2' } },{ // 数据项名称 name: '数据2', value : [0, 1, 78], //自定义特殊itemStyle,仅对该item有效 itemStyle:{ color:'#00e086', } },{ // 数据项名称 name: '数据3', value : [1, 1, 62], //自定义特殊itemStyle,仅对该item有效 itemStyle:{ color:'#067bd1' } },{ // 数据项名称 name: '数据4', value : [1, 0, 42], //自定义特殊itemStyle,仅对该item有效 itemStyle:{ color:'#b78437', } }] option = { backgroundColor:'#031744', title: { show: false, text: '', textStyle: { fontSize: 18, fontWeight: 600, fontFamily: 'siyuanheiti_Thin', }, subtext: '', subtextStyle: { fontSize: 16, }, }, tooltip: { show: false, }, visualMap: { show: false, // max: 20, // // #3DEFFF #47FBAC #78C1FF #FDE557 // inRange: { // color: ['#3DEFFF', '#47FBAC', '#78C1FF', '#FDE557', '#CD5C5C', '#F08080', '#FA8072'], // }, }, xAxis3D: { show: false, name: '', type: 'category', }, yAxis3D: { show: false, name: '', type: 'category', }, zAxis3D: { show: false, name: '', type: 'value', }, grid3D: { boxWidth: 40, boxDepth: 40, axisLine:{//坐标轴轴线(线)控制 show:true,//该参数需设为true lineStyle:{//坐标轴样式 width:0//线条宽度 } }, axisLabel:{ show:false,//是否显示刻度 (刻度上的数字,或者类目) }, axisTick:{ show:false,//是否显示出刻度 }, splitLine:{//平面上的分隔线。 show:false,//立体网格线 }, axisPointer:{//坐标轴指示线。 show:false,//鼠标在chart上的显示线 }, light: { main: { intensity: 1.2, shadow: true, }, ambient: { intensity: 0.7, shadow: true, }, }, viewControl: { alpha: 15, beta: 40, // autoRotate: true, zoomSensitivity: 0, autoRotateAfterStill: 5, distance: 250, }, }, series: [ { type: 'bar3D', name: '数量', data:data, // data.map(function (item) { // return { // value: [item[0], item[1], item[2]], // }; // }), bevelSize:0.1,//柱子的倒角尺寸 itemStyle:{//柱条样式 // color:'#000', // opacity:0.5 // borderWidth:10, // borderColor:'#000' }, shading: 'lambert', label: { show: true, distance: 1, textStyle: { color: '#fff', fontSize: 18, borderWidth: 0, borderColor: 'none', backgroundColor: 'rgba(255,255,255,0)', fontFamily: 'impact, Simhei', }, }, itemStyle: { opacity: 0.8, }, // emphasis: { // label: { // textStyle: { // fontSize: 20, // color: '#900' // } // }, // itemStyle: { // color: '#900' // } // } }, ], }