We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
柱状图要展示数据量较大,x轴比较长,希望默认显示一部分数据,且默认设置一个合适的缩放比例,让页面看着舒服,然后用户可以通过左右划动屏幕来滚动柱状图,以达到查看更多数据的目的。
现在的问题就是 1、怎么设置默认缩放比例 2、如何默认显示一部分数据(现在的现象是显示全部数据,柱状图变成很细的线了)
代码:
option = { title: { text: '特性示例:渐变色 阴影 点击缩放', subtext: 'Feature Sample: Gradient Color, Shadow, Click Zoom' }, xAxis: { min: 'dataMin', max: 'dataMax', data: dataAxis, axisLabel: { inside: false, textStyle: { color: '#000' } }, axisTick: { show: false }, axisLine: { show: false }, z: 10 }, yAxis: { type: 'value', min: 'dataMin', max: 'dataMax', splitLine: { show: true }, axisLine: { show: false }, axisTick: { show: false }, axisLabel: { textStyle: { color: '#999' } } }, dataZoom: [ { type: 'inside', // orient: 'horizontal', // zoomLock:true //如果设置为 true 则锁定选择区域的大小,也就是说,只能平移,不能缩放。 } ], series: [ { // For shadow type: 'bar', itemStyle: { normal: {color: 'rgba(0,0,0,0.05)'} }, barGap: '-100%', barCategoryGap: '40%', data: dataShadow, animation: false }, { type: 'bar', itemStyle: { normal: { color: new echarts.graphic.LinearGradient( 0, 0, 0, 1, [ {offset: 0, color: '#83bff6'}, {offset: 0.5, color: '#188df0'}, {offset: 1, color: '#188df0'} ] ) }, emphasis: { color: new echarts.graphic.LinearGradient( 0, 0, 0, 1, [ {offset: 0, color: '#2378f7'}, {offset: 0.7, color: '#2378f7'}, {offset: 1, color: '#83bff6'} ] ) } }, data: data } ] };
option = { }
The text was updated successfully, but these errors were encountered:
可以设置 start, end,或者具体值 startValue, endValue
Sorry, something went wrong.
No branches or pull requests
One-line summary [问题简述]
柱状图要展示数据量较大,x轴比较长,希望默认显示一部分数据,且默认设置一个合适的缩放比例,让页面看着舒服,然后用户可以通过左右划动屏幕来滚动柱状图,以达到查看更多数据的目的。
现在的问题就是 1、怎么设置默认缩放比例 2、如何默认显示一部分数据(现在的现象是显示全部数据,柱状图变成很细的线了)
代码:
Version & Environment [版本及环境]
Expected behaviour [期望结果]
ECharts option [ECharts配置项]
Other comments [其他信息]
The text was updated successfully, but these errors were encountered: