OBIEE 中引入echarts例子2(柱线图)

折线图,多个柱子和线形图

代码:

var option = {
tooltip : {
trigger: ‘axis’
},
toolbox: {
show : true,
color : [‘#000000’,’#22bb22’,’#4b0082’,’#d2691e’],
y:’bottom’,
// x : ‘left’,
feature : {
mark : {show: false},
dataView : {show: false, readOnly: false},
magicType: {show: true, type: [‘line’, ‘bar’]},
restore : {show: true},
saveAsImage : {show: true}
}
},
calculable : true,
legend: {
y:’top’,
data:[‘a’,’b’,’c’,’d’,’e’,’f’,’g’,’h’]
},
grid:{borderWidth:0},
xAxis : [
//下x轴
{
type : ‘category’,
splitLine:’false’,
axisLine: {//x轴
onZero:true,
lineStyle: {
color: ‘#000000’,
type: ‘solid’,
width: 1
}
},
axisTick : { // x轴标记
show:true,
length: 2,
lineStyle: {
color: ‘#000000’,
type: ‘solid’,
width: 1
}
},
data :d
},
//上x轴
{
type : ‘category’,
show:false,
splitLine:’false’,
axisLine: {//x轴
onZero:true,
lineStyle: {
color: ‘red’,
type: ‘solid’,
width: 0
}
},
axisTick : { // x轴标记
show:false,
length: 2,
lineStyle: {
color: ‘red’,
type: ‘solid’,
width: 0
}
},
data :f
},
],
yAxis : [
//左y轴
{
type : ‘value’,
splitLine:’false’,
name : ”,
axisLine: {//y轴线
lineStyle: {
color: ‘#000000’,
type: ‘solid’,
width: 1
}
},
axisLabel : {//y轴标签
formatter: ‘{value}万 ’
}
},
//右y轴
{
type : ‘value’,
scale:true,
show : ‘true’,
splitLine:’false’,
name : ”,
axisLine: {//y轴
lineStyle: {
color: ‘#000000’,
type: ‘solid’,
width: 1
}
},
axisLabel : {
formatter: ‘{value}%’
}
}
],
series : [
{
name:’a’,
type:’bar’,
barGap:’5%’,
barCategoryGap:’15%’,
itemStyle : { normal: {color:’#334B5C’,label : {show: false, position: ‘insideBottom’,textStyle:{color:’#FFFFFF’}}}},
data:a
},
{
name:’b’,
type:’bar’,
itemStyle : { normal: {color:’#D53A35’,label : {show: false, position: ‘insideBottom’,textStyle:{color:’#FFFFFF’}}}},
data:b
},
{
name:’c’,
type:’bar’,
itemStyle : { normal: {color:’#27727B’,label : {show: false, position: ‘insideBottom’,textStyle:{color:’#FFFFFF’}}}},
data:g
},
{
name:’e’,
type:’line’,
symbol:’emptyCircle’,
symbolSize: 2,
smooth:’true’,
xAxisIndex: 0,
yAxisIndex: 1,
itemStyle : { normal: {color:’#CA8622’,label : {show: false, position: ‘top’, formatter: ‘{c}%’,textStyle:{color:’black’}}}},
data:e
},
{
name:’d’,
type:’line’,
symbol:’emptyCircle’,
symbolSize: 2,
smooth:’true’,
xAxisIndex: 0,
yAxisIndex: 1,
itemStyle : { normal: {color:’#9ACD32’,label : {show: false, position: ‘top’, formatter: ‘{c}%’,textStyle:{color:’black’}}}},
data:f
},
{
name:’f’,
type:’line’,
symbol:’emptyCircle’,
symbolSize: 2,
smooth:’true’,
xAxisIndex: 0,
yAxisIndex: 1,
itemStyle : { normal: {color:’#FCCE10’,label : {show: false, position: ‘top’, formatter: ‘{c}%’,textStyle:{color:’black’}}}},
data:h
},
{
name:’g’,
type:’line’,
symbol:’emptyCircle’,
symbolSize: 2,
smooth:’true’,
xAxisIndex: 0,
yAxisIndex: 1,
itemStyle : { normal: {color:’#61A0A8’,label : {show: false, position: ‘top’, formatter: ‘{c}%’,textStyle:{color:’black’}}}},
data:c
},
{
name:’h’,
type:’line’,
symbol:’emptyCircle’,
symbolSize: 2,
smooth:’true’,
xAxisIndex: 0,
yAxisIndex: 1,
itemStyle : { normal: {color:’#da70d6’,label : {show: false, position: ‘top’, formatter: ‘{c}%’,textStyle:{color:’black’}}}},
data:i
}
]
};
// 为echarts对象加载数据
myChart.setOption(option);
}
);



效果图

这里写图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值