[Devexpress] example of a scroll bar in chartcontrol

Source: Internet
Author: User

Key code:

/// <Summary> /// set the chartcontrol scroll bar. [Default: X, Y axis appears. /// </Summary> /// <Param name = "chart"> chartcontrol </param> /// <Param name = "backcolor"> scroll bar background color </param> /// <Param name = "barcolor"> scroll bar color </param> /// <Param name = "bordercolor"> scroll bar border color </param> /// <Param name = "javasickness"> scroll bar width </param> Public static scrollbaroptions setscrollbar (this chartcontrol chart, color backcolor, color barcolor, color bordercolo R, int interval ickness) {xydi1__ di1_= (xydi1_) chart. di1_; if (_ di1! = NULL) {_ digoal. enableaxisxscrolling = true; _ dibytes. enableaxisyscrolling = true; _ dibytes. enableaxisxzooming = true; _ digoal. enableaxisyzooming = true; scrollbaroptions _ scrollbaroptions = _ digoal. defaultpane. scrollbaroptions; _ scrollbaroptions. backcolor = backcolor; _ scrollbaroptions. barcolor = barcolor; _ scrollbaroptions. bordercolor = bordercolor; _ scrollbaroptions. required ickness = required ickn ESS; return _ scrollbaroptions;} return NULL ;} /// <summary> /// set the x-axis scroll bar of chartcontrol /// </Summary> /// <Param name = "chart"> chartcontrol </param> /// <param name = "backcolor"> scroll bar background color </param> /// <Param name = "barcolor"> scroll bar color </param> /// <Param name = "bordercolor "> scroll bar border color </param> /// <Param name =" javasickness "> scroll bar width </param> /// <Param name =" baralignment "> scroll bar position </param> Public static void setaxisxscrol Lbar (this chartcontrol chart, color backcolor, color barcolor, color bordercolor, int difficulty ickness, invalid baralignment) {scrollbaroptions _ scrollbaroptions = setscrollbar (chart, backcolor, barcolor, bordercolor, interval ickness ); if (_ scrollbaroptions! = NULL) {_ scrollbaroptions. xaxisscrollbaralignment = baralignment; _ scrollbaroptions. xaxisscrollbarvisible = true; _ scrollbaroptions. yaxisscrollbarvisible = false ;}} /// <summary> /// set the chartcontrol Y-axis scroll bar /// </Summary> /// <Param name = "chart"> chartcontrol </param> /// <param name = "backcolor"> scroll bar background color </param> /// <Param name = "barcolor"> scroll bar color </param> /// <Param name = "bordercolor "> scroll bar border color </param> // /<Param name = "javasickness"> scroll bar width </param> // <Param name = "baralignment"> scroll bar position </param> Public static void setaxisyscrollbar (this chartcontrol chart, color backcolor, color barcolor, color bordercolor, int barickness, baralignment) {scrollbaroptions _ scrollbaroptions = setscrollbar (chart, backcolor, barcolor, bordercolor, border ickness); If (_ scrollbaroptions! = NULL) {_ scrollbaroptions. xaxisscrollbarvisible = false; _ scrollbaroptions. yaxisscrollbarvisible = true; _ scrollbaroptions. yaxisscrollbaralignment = baralignment ;}}

Running effect:

Thank you for your help!

[Devexpress] example of a scroll bar in chartcontrol

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.