+ Reply to Thread
Results 1 to 18 of 18

Adding a code for the legend in the chart at the bottom

  1. #1
    Registered User
    Join Date
    07-24-2013
    Location
    Germany
    MS-Off Ver
    Excel 2010
    Posts
    41

    Thumbs up Adding a code for the legend in the chart at the bottom

    Hello Friends,

    Kindly find the attached file ( Excel and image) for your reference.

    Everything is working properly, after two days of hard work ( by two of our guest).

    But, now can somebody please help me editing the code, since I am not getting the name of the legend in the chart.

    Let me explain you in short how everything works :

    G-drift is the main page. After clicking on the create chart sheet - button, the new worksheets are generated , in those new WS, charts are created from the range in
    Worksheet - "Overview"

    All is okay, but the name of the legend is not visible (Refer image).

    Thanks in advance

    Regards,
    Cadcraft
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Adding a code for the legend in the chart at the bottom

    delete the blank row 3 on the overview sheet then perhaps
    Please Login or Register  to view this content.
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Registered User
    Join Date
    07-24-2013
    Location
    Germany
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: Adding a code for the legend in the chart at the bottom

    Hallo Joseph,

    Your code is also working the same without label to Legends.

    And if i delete the 3rd row in "Overview", then there are no charts.

    Any other options ?

    Regards,
    Cadcraft

  4. #4
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Adding a code for the legend in the chart at the bottom

    code was tested on your workbook in 2010 after deleting the blank row 3-works fine for me

  5. #5
    Registered User
    Join Date
    07-24-2013
    Location
    Germany
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: Adding a code for the legend in the chart at the bottom

    Hallo Joseph,

    I just also tried, in the file which i send you. It is not giving any output (chart) at my end.

    And also I can not delete the 3rd row, since in g-drift there are formulae related to it.

    other way - we can avoid or hide 3rd row, but the legend is important.

    regards,
    Cadcraft

  6. #6
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Adding a code for the legend in the chart at the bottom

    I cannot see how that code would not produce any charts at all I'm afraid

  7. #7
    Registered User
    Join Date
    07-24-2013
    Location
    Germany
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: Adding a code for the legend in the chart at the bottom

    Hi Joseph,

    I tried, but not working buddy.

    I will again give a try after some time, but if it works also, I can not use it, as I told you that I have used
    formulas from 4th row of Overview in G-drift.(In the table).

    Regards,
    Cadcraft.

  8. #8
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Adding a code for the legend in the chart at the bottom

    Try this, which creates charts only for those areas with data

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  9. #9
    Registered User
    Join Date
    07-24-2013
    Location
    Germany
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: Adding a code for the legend in the chart at the bottom

    Hello Andy,

    It is working. But then look at the range on Y-axis, they repeat 0,00 0.00 0.01 0.01 0.01 in such a manner.

    regards,
    cadcraft

  10. #10
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Adding a code for the legend in the chart at the bottom

    That's not what I get when I run the code.
    Those values would suggest the number format is not showing enough precision.
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    07-24-2013
    Location
    Germany
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: Adding a code for the legend in the chart at the bottom

    Hello Andy,

    Yes it is working perfectly.

    but now the thickness of the graph is too thick.

    I would like to have a thinner line showing the values, rest all is ok.

    Regards,
    Cadcraft

  12. #12
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Adding a code for the legend in the chart at the bottom

    Please Login or Register  to view this content.
    set the line's weight property

  13. #13
    Registered User
    Join Date
    07-24-2013
    Location
    Germany
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: Adding a code for the legend in the chart at the bottom

    Hello Andy,

    With the above code it is still working the same way.

    How do i change the line weight property, in code or manually ??

    I am really not good in excel, thanks for co-operation.

    Regards,
    Cadcraft

  14. #14
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Adding a code for the legend in the chart at the bottom

    The line weight change is in that code.

    Please Login or Register  to view this content.
    If it is not changing the output it generates I would assume you are not running that code but some older version.

    Manually select the series and format the line style.

  15. #15
    Registered User
    Join Date
    07-24-2013
    Location
    Germany
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: Adding a code for the legend in the chart at the bottom

    Hello Andy,

    Its changes to a mild difference, but not the exact thin line.

    Thanks.

    Regards,
    Cadcraft.

  16. #16
    Registered User
    Join Date
    07-24-2013
    Location
    Germany
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: Adding a code for the legend in the chart at the bottom

    Hallo Andy,

    The following code works perfectly, even for the data range on x-axis.

    but unable to get the legend names.

    Kindly help.

    Regards,
    Cadcraft.

    ______________________________________________________________________________________________

    Please Login or Register  to view this content.
    Last edited by JBeaucaire; 08-20-2013 at 09:49 AM. Reason: Added CODE tags, as per Forum Rules. Take a moment to read the Forum Rules in the menu bar above. Thanks.

  17. #17
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Adding a code for the legend in the chart at the bottom

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here


    Try reducing the line weight value to get thinner lines
    Please Login or Register  to view this content.
    If you are not sure of the value to use try recording a macro whilst you format the line as required.

  18. #18
    Registered User
    Join Date
    07-24-2013
    Location
    Germany
    MS-Off Ver
    Excel 2010
    Posts
    41

    Thumbs up Re: Adding a code for the legend in the chart at the bottom

    Hallo,


    I would really like to thank to all those who took out their time and helped me.

    Here, following is the final code which works perfect, and hence, would like to end this thread here.

    Again thanks to all.
    Solved!

    Regards,
    Cadcraft

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Adding only bottom line border to chart
    By Alexander_Golinsky in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-11-2012, 02:50 AM
  2. [SOLVED] Exclude one data series from scatter chart legend (but not from the chart)
    By JayUSA in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 05-29-2012, 05:24 PM
  3. [CHART] adding values to legend
    By TomBP in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 06-15-2010, 05:57 AM
  4. Adding categories to the legend?
    By BlackMagic21 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 11-02-2008, 09:04 PM
  5. Adding symbols and subscripts in legend
    By ady_mech in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 12-06-2007, 12:37 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1