|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
// 单柱状
|
|
|
|
|
export default function histogram(dx=[],ds=[],data=[],color1='',direction=true) {
|
|
|
|
|
export default function histogram(dx=[],ds=[],color1='',direction=true) {
|
|
|
|
|
// direction true为垂直 false为水平
|
|
|
|
|
return {
|
|
|
|
|
tooltip: {
|
|
|
|
@ -9,16 +9,23 @@ export default function histogram(dx=[],ds=[],data=[],color1='',direction=true)
|
|
|
|
|
},
|
|
|
|
|
confine: true
|
|
|
|
|
},
|
|
|
|
|
legend: {
|
|
|
|
|
x:'15',
|
|
|
|
|
icon: 'rectangle',//data图标样式
|
|
|
|
|
itemWidth: '10',//data图标大小
|
|
|
|
|
itemHeight: '10',
|
|
|
|
|
textStyle: {
|
|
|
|
|
fontSize: '9'
|
|
|
|
|
},
|
|
|
|
|
data: data,
|
|
|
|
|
},
|
|
|
|
|
dataZoom: [{ //添加X轴滚动条
|
|
|
|
|
type: 'inside',
|
|
|
|
|
show: false,
|
|
|
|
|
start: 50,
|
|
|
|
|
end: 10,
|
|
|
|
|
handleSize: 5
|
|
|
|
|
}],
|
|
|
|
|
// legend: {
|
|
|
|
|
// x:'15',
|
|
|
|
|
// icon: 'rectangle',//data图标样式
|
|
|
|
|
// itemWidth: '10',//data图标大小
|
|
|
|
|
// itemHeight: '10',
|
|
|
|
|
// textStyle: {
|
|
|
|
|
// fontSize: '9'
|
|
|
|
|
// },
|
|
|
|
|
// data: data,
|
|
|
|
|
// },
|
|
|
|
|
//图表位置
|
|
|
|
|
grid: {
|
|
|
|
|
left: 20,
|
|
|
|
|