Shape artifacts created by Sparklines

  • Jonathan Nash
    Jonathan Nash

    I have a dashboard page with quite a number of sparklines in it, ~25 line charts and maybe 100 pie charts.

    In developing this sheet, these sparklines get recalculated quite a bit, the sheet is saved, recalculated etc.

    Over time, I've noticed that shapes show up with "AutoShape" in the name or "Oval" in the name.  For example, if you run the following:

    Sub ShowErroneousShapes()
        Dim i As Integer

        For i = 1 To Dashboard.Shapes.count
            If InStr(1, LCase(Dashboard.Shapes(i).name), LCase("Oval")) > 0 Or _
                InStr(1, LCase(Dashboard.Shapes(i).name), LCase("AutoShape")) Then
                    Debug.Print Dashboard.Shapes(i).name
            End If
    End Sub

    You get:
    AutoShape 463000
    Oval 463002
    AutoShape 463003

    (there were a lot more but I deleted them).  I was trying to diagnose why a pie chart just wasn't right despite all the inputs being correct.  After a long time, I figured it was because one of these shapes (of an old pie chart) was on top, blocking the new one.

    • nixnut

      Which versions of excel and the sparklines add-in are you using?
      Could it be that you occidentally moved a shape so it didn't quite fit in the cell anymore? Does this happen when changing the zoom level of the sheet and redrawing the shapes? 

      • Jonathan Nash
        Jonathan Nash

        sorry for late response.  I'm using excel 2003.  The version according to the about form is 3.2.3.

        I will keep my eye out for this behavior when changing the zoom level and moving shapes or resizing rows/columns.  So far, I haven't noticed when it happens, just that these things accumulate over time.