+ Reply to Thread
Results 1 to 2 of 2

Printing point labels for chart "scatter with straight lines"

  1. #1
    Registered User
    Join Date
    09-22-2017
    Location
    ouagadougou
    MS-Off Ver
    93
    Posts
    3

    Printing point labels for chart "scatter with straight lines"

    I have a chart that displays a series of vectors in sequential form.

    The start/end of each vector is defined in a cartesian xy-axis system.

    https://s26.postimg.org/th03p5ouh/vectors.jpg

    It works fine. I wish to display the series name (P!=point 1, P2=point2 ....) and the coordinates for each point. In vba I use the code:

    Please Login or Register  to view this content.
    Range ("A") is the point name
    Range ("B") is the x-coordinate
    Range ("C") is the y-coordinate

    Problem is that for each vector it is written to the chart the start AND the end xy-coordinates.
    Vector 1 writes start and end
    Vector 2 writes start and end (now end of V1 and start of V2 is double written)
    .....

    Fine. I did a workaround with integer division, if vector number is odd then write. It works BUT "P1; 8;16" and "P1 15,8;12,8" are written as belonging to the same point.

    I would like to have "P1; 8;16", "P2 15,8;12,8", "P3 6,5;8,5", etc.

    Can that be done in some way? Is there something else than msoChartFieldRange like msoChartFieldStart or msoChartFieldEnd?

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,609

    Re: Printing point labels for chart "scatter with straight lines"

    I'd go rather this way - for each vector write only startpoint, and only for last vector write also end point.
    Or if the vectors form a closed contour - I'd write only startpoints.
    PS. It's strongly suggested to attach files on a forum, not external servers - many of us have blocked access to such addresses like posting.org etc.
    Best Regards,

    Kaper

+ 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. Replies: 1
    Last Post: 06-21-2017, 08:46 AM
  2. Replies: 0
    Last Post: 06-14-2017, 05:14 PM
  3. Replies: 2
    Last Post: 06-25-2013, 12:43 PM
  4. Can't input date range as x-axis in scatter with straight lines chart using VBA
    By alapatik in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-24-2012, 11:32 AM
  5. Data point labels in XY scatter chart
    By TonyGB007 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 12-09-2005, 05:20 AM
  6. [SOLVED] Scatter Chart with point labels
    By Jim in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-08-2005, 08:40 PM
  7. Showing "Meeting point" of lines in Chart
    By jinjon in forum Excel General
    Replies: 3
    Last Post: 11-19-2005, 12:45 PM

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