简体   繁体   English

Echarts条形图-是否可以进行侧滚动?

[英]Echarts bar graph - Is there a possibility of side scrolling?

Is there a way to side scroll (I mean, on x axis) eCharts graph bar? 有没有一种方法可以横向滚动(我的意思是,在x轴上)eCharts图形栏? I have a huge amount of data that needs to be displayed, so it cannot "fit" only browsers width, because the whole graph will be very hard to read (Every column loses on width). 我需要显示大量数据,因此它无法“适应”浏览器的宽度,因为整个图形将很难读取(每列的宽度都会丢失)。

My echarts version: ^4.0.4 我的echarts版本: ^4.0.4

My chart 我的图表

You can add the attribute called dataZoom inside the object called options then pass this obj to the .setOption. 您可以在名为options的对象内添加名为dataZoom的属性,然后将此obj传递给.setOption。

    dataZoom: [
        {
            show: true,
            start: 94,
            end: 100
        },
        {
            type: 'inside',
            start: 94,
            end: 100
        },
        {
            show: true,
            yAxisIndex: 0,
            filterMode: 'empty',
            width: 30,
            height: '80%',
            showDataShadow: false,
            left: '93%'
        }
    ],

I saw this example but i don't know what you want precisely. 我看到了这个示例,但我不知道您到底想要什么。

https://ecomfe.github.io/echarts-examples/public/editor.html?c=mix-zoom-on-value https://ecomfe.github.io/echarts-examples/public/editor.html?c=mix-zoom-on-value

我发现此示例可以为您提供帮助: 带滚动选项的条形图

Here I have referred the open source javascript graph library for your slider chart requirement. 在这里,我已将开源javascript图形库用于您的滑块图需求。

Plotly.js Plotly.js

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM