+ Reply to Thread
Results 1 to 8 of 8

Having stock chart to draw many individual straight line

  1. #1
    Forum Contributor
    Join Date
    09-22-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    184

    Having stock chart to draw many individual straight line

    Hi all,

    I have stock chart with candlestick bar and a few of smooth line.
    That means I have utilize both axes and cant add any new Y values.
    If I do, it will change secondary axes too.

    Now I have this new set of data that need to be incorporate into the chart.
    As above described, I have try a lot of method and some really not that good and inconveniences.

    Is there a way to add many individual straight line in the same chart? Straight line refers to line connecting two points and can be in any direction and length.

    If can be done with vba, I am happy with it.

    Any suggestion is appreciated.

    Thanks.

    Book1.xlsx
    Last edited by DavidRoger; 12-17-2013 at 11:31 PM. Reason: Add attachement

  2. #2
    Forum Contributor
    Join Date
    09-22-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    184

    Re: Having stock chart to draw many individual straight line

    Found this from reading other question.

    .SeriesCollection.NewSeries
    .SeriesCollection(2).XValues = "={0,365}"
    .SeriesCollection(2).Values = "={0," & S & "}"
    where S is the last point's value.

    Can any one please explain how to incorporate this? Please give example.

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

    Re: Having stock chart to draw many individual straight line

    Just add another line in the same way as you did the other 2.

    In order to have breaks in the line you will need to have empty cells.
    Attached Files Attached Files
    Cheers
    Andy
    www.andypope.info

  4. #4
    Forum Contributor
    Join Date
    09-22-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    184

    Re: Having stock chart to draw many individual straight line

    Thank you for your suggestion.

    I was hoping someone would know to do without the empty space.
    It would really save me thinking of the linked formula. It's seen almost impossible.

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

    Re: Having stock chart to draw many individual straight line

    only other way is to create the chart yourself and by that I mean use stacked column chart to produce the floating columns and xy-scatter for the lines.

  6. #6
    Forum Contributor
    Join Date
    09-22-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    184

    Re: Having stock chart to draw many individual straight line

    Tried that also.

    Doesn't seem like stock chart allowed combined chart.
    Since I have use the secondary axis for line chart,
    I cant use it for individual straight line.

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

    Re: Having stock chart to draw many individual straight line

    You can use 3 series with NA() formula before and after each line segment.
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    09-22-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    184

    Re: Having stock chart to draw many individual straight line

    Andy,

    Thanks for your suggestion.
    I guess there is no other option.

+ 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. [SOLVED] straight line connecting first and last point on a chart
    By hermac@pandora.be in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-18-2013, 06:42 AM
  2. Straight Line and Trendline Chart together
    By sakmsb in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 02-24-2013, 05:25 AM
  3. Replies: 1
    Last Post: 12-31-2012, 05:31 AM
  4. Adding a straight line current price indicator in VOHLC Chart?
    By naira in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 10-11-2012, 11:59 AM
  5. Straight Average Line on Line Chart
    By miked79 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 09-11-2008, 12:00 PM

Tags for this Thread

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