Jump to content
Software FX Community

How to enable scroll bar and How to set background color


ryanlcs
 Share

Recommended Posts

The default background is a Gradient Background. 

To set a plain background do:

chart1.Background =

null;

The default background color is dependant on the palette. To change it to a specific color (not dependant on the palette) do:

 chart1.BackColor= <color>;

To turn scrolling on and off(default):

chart.AxisX.AutoScroll = true/false;

Notice that the scrollbar will only show if there is a need for it.

Link to comment
Share on other sites

The BackColor properties will set the entire background color. How about setting the background color for the chart plotted area, the middle section?

The scrolling is turn on when the enable check box is clicked. So, how can I fired the scrolling to true from javascript?

Thanks.

Link to comment
Share on other sites

I found this from online documentation:

Dim myGradient = New GradientBackground(GradientType.BackwardDiagonal)

Charts.PlotAreaBackground = myGradient

But to use gradient, "ChartFX.Adornments.dll" must be added as reference, but I cant find this dll file, only manage to get "ChartFX.WebForms.Adornments.dll". I dunno are they the same.

From the code, I hit an error, saying "GradientBackground" is not defined.

Please help.

Link to comment
Share on other sites

Hi,

Are you using the Webforms version of the product? Have you dropped a chart control directly from the toolbox onto a form? If so, this library should have been added automatically. If not, try adding it manually. The one you need to add is: ChartFX.WebForms.Adornments.dll

In order to specify a color for the plot area, you can set it as follows: 

Chart1.PlotAreaColor = Drawing.Color.Red

Regards,

RandyJ

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...