标签:14 color 50 滚动条 XX 街道 rgba echarts 255
let dataX = ['XX街道','XX街道','XX街道','XX街道','XX街道','XX街道','XX街道','XX街道','XX街道','XX街道','XX街道','XX街道','XX街道','XX街道','XX街道','XX街道','XX街道','XX街道']; //名称
let dataY = [20,50,15,35,50,30,40,50,60,20,50,15,35,50,30,40,50,60]; //数据
let zoomShow = false;
if (dataY.length > 14) {
zoomShow = true;
} else {
zoomShow = false;
}
var option = {
backgroundColor: '#0D2753',
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow',
},
},
grid: {
top: '10%',
right: '5%',
left: '5%',
bottom: '10%',
},
xAxis: [
{
type: 'category',
data: dataX,
axisLine: {
lineStyle: {
color: 'rgba(66, 192, 255, .3)',
},
},
axisLabel: {
interval:0,
margin: 10,
color: '#05D5FF',
textStyle: {
fontSize: 11,
},
rotate: '45',
},
axisTick: {//刻度
show: false,
},
},
],
yAxis: [
{
axisLabel: {
padding: [3, 0, 0, 0],
formatter: '{value}',
color: 'rgba(95, 187, 235, 1)',
textStyle: {
fontSize: 11,
},
},
axisTick: {
show: true,
},
axisLine: {
lineStyle: {
color: 'rgba(66, 192, 255, .3)',
},
},
splitLine: {
lineStyle: {
color: 'rgba(255,255,255,0)',
},
},
},
],
dataZoom: [//滚动条
{
show: zoomShow,
type: 'slider',
realtime: true,
startValue: 0,
endValue: 14,
xAxisIndex: [0],
bottom: '10',
left: '30',
height: 10,
borderColor: 'rgba(0,0,0,0)',
textStyle: {
color: '#05D5FF',
},
},
],
series: [
{
type: 'bar',
data: dataY,
barWidth: '10',
itemStyle: {
normal: {
color: new echarts.graphic.LinearGradient(
0,
0,
0,
1,
[
{
offset: 0,
color: 'rgba(5, 213, 255, 1)', // 0% 处的颜色
},
{
offset: 0.98,
color: 'rgba(5, 213, 255, 0)', // 100% 处的颜色
},
],
false
),
shadowColor: 'rgba(5, 213, 255, 1)',
shadowBlur: 4,
},
},
label: {
normal: {
show: true,
lineHeight: 10,
formatter: '{c}',
position: 'top',
textStyle: {
color: '#fff',
fontSize: 10,
},
},
},
},
],
};
标签:14,color,50,滚动条,XX,街道,rgba,echarts,255 来源: https://blog.csdn.net/qq_42628504/article/details/122729386
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。