Recently, everyone in the blog asked the x axis category to show the problem of how to increase the scroll bar below the use of my project to share with you
The code is to add the scroll bar
Function (EC) {var MyChart = Ec.init (document.getElementById (' line '));
var option = {title: { Text: ' Product ranking Analysis ', Subtext: ' Landscape: Product Name, Portrait: Amount '}, Toolti
P: {show:true, Trigger: ' Axis '},
Legend: {data:[' sales weight ', ' Order Amount ']},
Toolbox: {show:true, feature: { Mark: {show:true}, DataView: {show:true, readonly:false}, Magic Type: {show:true, type: [' Bar ', ' line ']}, restore: {show:true}, S Aveasimage: {show:true}}, grid:{
Y2:150}, Xaxis: [{ Type: ' Category ', Boundarygap:true, DA
Ta:pronamearr, axislabel:{interval:0, Formatter:function (val) {return VA
L.split (""). Join ("\ n");
}
}
}
],
YAxis: [{type: ' value ' }], <span style= "color: #ff0000;" > ≪span style= "color: #FF0000;" > datazoom: {show:true, realtime:true , start:0, end:100}</span>,& Lt;/span> series: [{' name ': ' Pin
Sales weight ", type": "Line", "Data": Normweightarr
}, {"Name": "Order Amount",
' type ': ' line ', ' Data ': Ordermoneyarr}
]
};
Loads the data mychart.setoption for the Echarts object (option); }
This is the effect