Consulting

Results 1 to 4 of 4

Thread: Making "Things" on Charts Move With Charts

  1. #1

    Making "Things" on Charts Move With Charts

    I have a LOT of charts that track stock market happenings. Each chart continues to lengthen on the right side as time goes on. On these charts I have miscellaneous descriptive objects like a name in a text box near the chart. I also have various AutoShape lines showing reference levels and the like. I have never found a way to make the non-chart objects move as the chart moves.
    For example, I might have the year ("2004") somewhere between two vertical (plotted) lines showing January 1st for the year. Over time the plotted "Jan 1" lines move to the left, but the text box showing "2004" stays in the same place, and eventually is plotted to the right of the Jan 1, 05 vertical line. It's not hard to reposition the items on a single chart, but, as I said, I have LOTS of charts. It would be very nice if the "2004" text box moved to the left as the chart moves to the left.
    Is there a check box somewhere that I can click to make that happen?

  2. #2
    MS Excel MVP VBAX Tutor
    Joined
    Mar 2005
    Posts
    246
    Location
    If you add shapes or textboxes to a chart, they are not at all linked to the axis scales, nor to the plot area, so they don't move when the data changes (and sometimes they move when it doesn't).

    In the same way that you plotted your line for January 1st, you could plot a point where you want the label, format the point to be invisible (no line, no marker), and add a data label to the point. Use one of the built-in data label alignments to assure it stays relatively where you want it. If you plot a one-point series, and use "2004" as the series name, it's easy to use the series name as the text of the label.

    If you want an object in a particular position, again plot a point there, then copy the object, select the point, and paste. This applies the object as a custom marker for the point. See this page for more info on this fun technique:

    http://peltiertech.com/Excel/ChartsH...ormatting.html
    - Jon
    -------
    Jon Peltier, Microsoft Excel MVP
    Peltier Technical Services
    Tutorials and Custom Solutions
    http://PeltierTech.com
    _______

  3. #3
    Thanx, Jon. That little detail about the "floating" items would have to be plotted in order to keep up with changes seems obvious to me in retrospect, but it escaped my observation until you pointed it out. I'm sure I can work out techniques to solve the problem. Thanx again for the assist.

  4. #4
    MS Excel MVP VBAX Tutor
    Joined
    Mar 2005
    Posts
    246
    Location
    Glad to provide the hint.
    - Jon
    -------
    Jon Peltier, Microsoft Excel MVP
    Peltier Technical Services
    Tutorials and Custom Solutions
    http://PeltierTech.com
    _______

Posting Permissions

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