+ Reply to Thread
Results 1 to 5 of 5

incorrect series data in dynamic chart

  1. #1
    Registered User
    Join Date
    09-25-2012
    Location
    ny
    MS-Off Ver
    2016
    Posts
    18

    incorrect series data in dynamic chart

    hi,
    attached is file with embedded macro, where i should see a single series
    line chart using col A as dates series (where there seems to be no problem)
    and utilize named ranges (see row 122) to seek the corresponding results for those dates.
    extra series data seems to show up on all, with a puzzling (to me) reference to row 1
    when any of the series in the new chart are clicked. there should be only one series per chart.
    edit: short story i am getting all 32 avail columns instead of just the one chosen category.

    when macro button is executed there are input boxes to enter series name (use any of choices listed below, or on first row of sheet) and number of days (please use any number up to 120 max).

    categories: n0 n1 n2 n3 t0 t1 t2 t3 a0 a1 a2 a3 r0 r1 r2 r3 g0 g1 g2 g3 o0 o1 o2 o3 f0 f1 f2 f3 e1 e2 e3 e4

    FORUM_chart_030215.xlsm

    ps, i am on excel 2013. the VBA code has some notated lines irrelevant to this file.

    thanks in advance , john.
    Last edited by jago; 03-02-2015 at 03:31 PM.

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

    Re: incorrect series data in dynamic chart

    If you use Charts.Add then all data in the current region will be used in the chart.
    The revised code removes all automatic series and create single new series on specified data.

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

  3. #3
    Registered User
    Join Date
    09-25-2012
    Location
    ny
    MS-Off Ver
    2016
    Posts
    18

    Re: incorrect series data in dynamic chart

    Andy
    thank you so much , this appears to work fine.

  4. #4
    Registered User
    Join Date
    09-25-2012
    Location
    ny
    MS-Off Ver
    2016
    Posts
    18

    Re: incorrect series data in dynamic chart **Charts.Add crash**

    hi
    unfortunately months later i still have struggled to get a consistent result without errors..
    my big file crashes at Charts.Add
    (the sample file included above shows the multiple series in error, and may not crash just due to smaller region size?)
    i believe Charts.Add may be inherently unstable in 2013?
    see this from the Office Dev Center website:
    Charts.Add method
    Office 2013 Other Versions
    This object, member, or enumeration is deprecated and is not intended to be used in your code.
    Namespace: Microsoft.Office.Interop.Excel
    Assembly: Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)


    heres the crash message:
    Problem signature:
    Problem Event Name: APPCRASH
    Application Name: EXCEL.EXE
    Application Version: 15.0.4727.1000
    Application Timestamp: 55521d8a
    Fault Module Name: EXCEL.EXE
    Fault Module Version: 15.0.4727.1000
    Fault Module Timestamp: 55521d8a
    Exception Code: c0000005
    Exception Offset: 0026a927
    OS Version: 6.1.7601.2.1.0.768.3
    Locale ID: 1033

    Additional information about the problem:
    LCID: 1033
    skulcid: 1033



    is there a substitute for charts.add for 2013??

    thanks and regards john

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

    Re: incorrect series data in dynamic chart

    If you check the object model for Excel 2013 you will see it now uses AddChart2 and AddChart is hidden.

    there is also chartobjects.add

    whatever way try and do so with the active cell being in empty space.

+ 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] Align Line Chart's data series Data labels on top of Bar chart data series
    By rgunlimited in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-01-2014, 10:38 AM
  2. [SOLVED] Excel Stock Chart - "Close marker" refers to incorrect data series
    By MartinShort in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 10-07-2012, 10:50 AM
  3. Dynamic Chart Series
    By HangMan in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 07-09-2011, 05:27 AM
  4. Can I create a dynamic chart with a dynamic number of series?
    By SG2 in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 06-24-2011, 08:44 AM
  5. [SOLVED] Dynamic series in Chart
    By Jeff in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 02-24-2005, 08:06 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