let option = {
tooltip: {
trigger: "axis",
axisPointer: {
type: "cross",
crossStyle: {
color: "#999",
},
},
},
toolbox: {
show: false,
feature: {
dataView: { show: true, readOnly: false },
magicType: { show: true, type: ["line", "bar"] },
restore: { show: true },
saveAsImage: { show: true },
},
},
xAxis: [
{
type: "category",
data: this.chartx,
axisPointer: {
type: "shadow",
},
},
],
yAxis: [
{
type: "value",
name: "数量",
axisLabel: {
formatter: "{value} ",
},
},
{
type: "value",
name: "占比",
axisLabel: {
formatter: "{value} %",
},
},
],
series: [
{
type: "pictorialBar",
barCategoryGap: "-230%",
barWidth : 50,
symbol:
"path://M0,10 L10,10 C5.5,10 5.5,5 5,0 C4.5,5 4.5,10 0,10 z",
itemStyle: {
opacity: 0.8,
},
emphasis: {
itemStyle: {
opacity: 1,
},
},
data: this.chartBar,
},
{
type: "line",
yAxisIndex: 1,
data: this.chartline,
},
],
};