Results 1 to 5 of 5
  1. #1
    Star Lounger
    Join Date
    Sep 2002
    Location
    Honolulu, Hawaii, USA
    Posts
    63
    Thanks
    1
    Thanked 0 Times in 0 Posts

    setting gradient stops in a chart (2007)

    Aloha folks,

    I'm trying to make the shading of the plot area change based on the data being plotted. I have the plot area set to a gradient fill with 4 stops. I want to change the positions of stop 2 and stop 3 based on the maximumvalue of the value scale.

    I'm having trouble getting the path for and setting the gradient stops. What I want is to change the stop point for stop 2 and stop 3. Can someone help me with syntax?
    Attached Files Attached Files

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: setting gradient stops in a chart (2007)

    Sorry about the lack of replies. I guess that not many users have tried the new gradient options in Excel 2007 yet (I don't have 2007 at all).

  3. #3
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: setting gradient stops in a chart (2007)

    You set the position of gradient stops as a percentage, using syntax like:
    <code>activechart.PlotArea.Format.Fill.GradientSto ps(2).position = 0.33</code>
    if that helps?
    Regards,
    Rory

    Microsoft MVP - Excel

  4. #4
    Star Lounger
    Join Date
    Sep 2002
    Location
    Honolulu, Hawaii, USA
    Posts
    63
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: setting gradient stops in a chart (2007)

    YESSS! Thank you Rory.

    So what is the secret to finding the path to such an item as a 'GradientStop'? I flopped around for three hours in the Excel Object Model Reference unsuccessfully. I mean, how is one supposed to decipher that one uses the Format property to get at the ChartFormat object and then the Fill property to get at the FillFormat object and thus have access to the GradientStops? There HAS to be a better way. MS's Help system often only helps you if you know what you're looking for and where. Their examples suck, pardon the vernacular.

    Mahalo and aloha,
    John Jacobson

  5. #5
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: setting gradient stops in a chart (2007)

    I use the Object Browser. Excel 2007's Help files are an abomination in my opinion and about as useful as a chocolate teapot!
    Regards,
    Rory

    Microsoft MVP - Excel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •