Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Jul 2004
    Florida, USA
    Thanked 0 Times in 0 Posts

    Changing the legend key (XP SP-2)

    I have a problem that seems like it should have a simple solution, so I suppose I'm either missing the obvious or it's impossible. So here goes...

    I have a scattergram chart where I have lots of dots of different colors representing data of different sorts. The dots are very little so that they don't get in front of each other (and it actually makes for a pleasant look, given the data I've got).

    Here's my problem: Excel insists on making each legend key really tiny, as well--but I'd like to make the legend keys larger so that anybody looking at the graph can tell at a glance which color goes with what. However, if I resize a legend key, Excel resizes all the associated data points. Is there any way to make the legend key larger without making the data points larger?


    p.s. I realize that I could simply make everything the size I want it in the legend and then go through and resize each data point--but for various (principled!) reasons, I need to avoid that solution.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 31 Times in 31 Posts

    Re: Changing the legend key (XP SP-2)

    Welcome to Woody's Lounge!

    I am afraid that the Marker Size for a data series and the corresponding legend key are linked - if you change one, you change the other. The workaround you mention in your PS is the only one I know of. You could create a macro to automate this, and run it when you are otherwise finished with the chart:

    Sub SetMarkerSizes()
    Dim s As Series
    Dim p As Point

    On Error GoTo ErrHandler

    For Each s In ActiveChart.SeriesCollection
    s.MarkerSize = 12
    For Each p In s.Points
    p.MarkerSize = 2
    Next p
    Next s

    Set p = Nothing
    Set s = Nothing
    Exit Sub

    MsgBox Err.Description, vbExclamation
    Resume ExitHandler
    End Sub

    If you need to do this often, you can assign this macro to a keyboard shortcut or custom toolbar button.

  3. #3
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Pittsburgh, Pennsylvania, USA
    Thanked 342 Times in 335 Posts

    Re: Changing the legend key (XP SP-2)

    As far as I know they are linked together and they change together.

    You could not add a the "real legend" but instead create a text box and add each of the elements to it

    A simpler way would be to create the legend the proportion you want in another chart, copy/paste as a picture, crop out all but the legend then paste into the chart.

    Though you might not like this workaround either. (those principals...)


Posting Permissions

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