Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
480
How to change the color of the axis scroll bar in WinChart?
posted

I have a simple scatter chart with x and y axes. I am using the scaling and scrolling feature of wincharts. I would like to change the color of the scrollbar from the ugly black to something that is more pleasing to the eye.

I contacted customer support and they told me that I could use images (skins) to do that. I also got a link to an article with some info on it.

http://help.infragistics.com/Help/NetAdvantage/NET/2008.2/CLR2.0/html/Chart_Scrolling_and_Scaling_Charts.html

This still does not tell me much about how to do it though. I am wondering if anyone here has more information about this.

 Thanks.

 

  • 28496
    Offline posted

     just set the chart's ScrollbarImage property at design time.  you can browse to one of the "skin images" in the folders listed in that help topic...

        * XP -- C:\Documents and Settings\All Users\Documents\Infragistics\NetAdvantage for .NET 2008 Vol. 2 CLR 2.0\Samples\Win\WinChart\Data\images\scrollbar_images
        * Vista -- C:\Users\Public\Documents\Infragistics\NetAdvantage for .NET 2008 Vol. 2 CLR 2.0\Samples\WinForms\Data\images\scrollbar_images 

  • 1320
    Offline posted

    I had a similar problem using the UltraChart as a GanttChart as it has this horrible habit of expanding or compressing all the Series to fit them into the displayed Height of the control.  As I wanted the height of the series bars to remain constant I had to alter the height of the chart programmatically; which then meant that I needed to scroll it accordingly (I hope this makes sense).  And like you said the black scrollbars are ugly.

    My solution was to control the scrolling of the chart externally via an UltraScrollBar control (which has nice formatting using the various Apperance properties).  I put the chart inside a panel and then enlarged it to the desired size.  The scrolbars then just set the Top and Left properties of the chart as desired.  All that is required is some simple maths.

    I hope this helps.