如何在ASP.NET图表控件中添加水平滚动条?

问题描述:

我正在开发一个应用程序,我需要在图形模式下显示每日,每周和每年的数据,因为我正在使用条形图控件。一切都运行正常但每当我使用年度数据选择时,所有条形图条都不可见。所以我想在图表控件上添加滚动条,我可以将其滚动到某个程度。



请帮我解决这个问题...





感谢您提前获取任何帮助!!!



什么我试过了:



我试图在google上搜索相同内容,但没有任何东西可以解决我的目的。

I'm working on an application where I need to show up the data on Daily and Weekly and Yearly basis in graphical mode for this I'm using Bar chart control. Everything is working fine but whenever I goes with the Yearly data selection then all bars of bar charts are not visible. So I wanted to add scroll bar on to the chart control by which I can scroll it to the extent.

Please help me out on this...


Thank In advance for any help!!!

What I have tried:

I tried to search about the same on google as well but not have anything to solve my purpose.

不确定我的建议是否会对您有所帮助,但请检查一下 -



您可以嵌入图表控件在具有固定高度(和宽度,如果需要)的div中,根据需要设置如下样式

Not sure if my suggestion will help you or not but check this for a try-

You can embed the chart control in a div with fixed height (and width, if needed) and set the style as following as per your need
overflow: scroll; /* always shows both the scroll bars */




overflow: auto; /* shows the respecive scroll bar if content grows beyond the div visible area */




overflow-x: scroll; /* always shows the horizontal scroll bar */




overflow-x: auto; /* shows the horizontal scroll bar if content grows beyond div width */




overflow-y: scroll; /* always shows the vertical scroll bar */




overflow-y: auto; /* shows the vertical scroll bar if content grows beyond div height */





希望,有帮助:)



Hope, it helps :)