Loading
Ozgrid Excel Help & Best Practices Forums

Excel Video Tutorials / Excel Dashboards Reports



Results 1 to 7 of 7

Thread: Plot On Chart/Graph As Zigzag Pattern

  1. #1
    Join Date
    27th June 2008
    Posts
    16

    Plot On Chart/Graph As Zigzag Pattern

    Hi!
    I have the following list of values which I want to plot as a zigzag. But when i create a line chart from them, the lines connect the zeros and the non-zero points - while I want the lines to connect only the non-zero points - so that there is a zigzag-like pattern shown...I wonder if this can be done..Thanks!

    the Data:

    0
    0
    0
    0
    0
    1.4343
    0
    0
    0
    0
    0
    0
    0
    0
    1.4332
    0
    0
    0
    0
    0
    0
    0
    0
    1.4318
    0
    0
    0
    0
    0
    0
    0
    0
    0
    1.4521
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    1.5153
    0
    0
    0
    0
    0
    0
    1.5336
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    1.55
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    1.5431
    0
    0
    0
    0
    0
    0
    0
    0
    0
    1.5472
    0
    0
    0
    0
    0
    0
    0
    0
    1.5404
    0
    0
    0
    0
    0
    0
    0


    Dima

    Excel Video Tutorials / Excel Dashboards Reports


  2. #2
    Join Date
    23rd April 2008
    Location
    Work in North Wales
    Posts
    262

    Re: Plot On Chart/Graph As Zigzag Pattern

    If you want to plot the non-zero values then put an autofilter on your data, set it to Custom > does not equal 0.

    Charts only plot visible data.

    BTW shouldn't your chart have a second data series, as the non-zero values are not equally spaced?

    Excel Video Tutorials / Excel Dashboards Reports


  3. #3
    Join Date
    16th January 2007
    Posts
    570

    Re: Plot On Chart/Graph As Zigzag Pattern

    hi,
    i numbered data and make scattered chart.
    have a look at attached file.
    regards/junho lee
    Attached Files. REMINDER! OzGrid accepts no responsibility for ANY adverse effects as a result from downloading attached files. ALWAYS run an up-to-date virus scan and disable macros.

    Excel Video Tutorials / Excel Dashboards Reports


  4. #4
    Join Date
    27th June 2008
    Posts
    16

    Re: Plot On Chart/Graph As Zigzag Pattern

    thanks..but i need such a graph without modifying the data series...((

    Excel Video Tutorials / Excel Dashboards Reports


  5. #5
    Join Date
    16th January 2007
    Posts
    570

    Re: Plot On Chart/Graph As Zigzag Pattern

    VB:
    Option Explicit 
    Option Base 0 
    Sub create_chart() 
         '--------------------set data source
        Dim data, i As Long, num As Long, data1, data2 
        data = Range("a1:a" & Range("a65536").End(xlUp).Row) 
        Redim data1(num) 
        Redim data2(num) 
        For i = 1 To UBound(data, 1) 
            If data(i, 1) > 0 And IsNumeric(data(i, 1)) Then Redim Preserve data1(num) _ 
            : Redim Preserve data2(num) _ 
            : data1(num) = i: data2(num) = data(i, 1): num = num + 1 
        Next 
         '----------------------make chart
        Charts.Add 
        ActiveChart.ChartType = xlXYScatter 
        ActiveChart.Location Where:=xlLocationAsObject, Name:="Sheet1" 
        ActiveChart.SeriesCollection.NewSeries 
        ActiveChart.SeriesCollection(1).XValues = WorksheetFunction.Transpose(data1) 
        ActiveChart.SeriesCollection(1).Values = WorksheetFunction.Transpose(data2) 
        ActiveChart.Axes(xlCategory).Select 
        With Selection.Border 
            .Weight = xlHairline 
            .LineStyle = xlAutomatic 
        End With 
        With Selection 
            .MajorTickMark = xlOutside 
            .MinorTickMark = xlNone 
            .TickLabelPosition = xlNextToAxis 
        End With 
        Selection.TickLabels.AutoScaleFont = False 
        With Selection.TickLabels.Font 
            .Size = 11 
        End With 
        ActiveChart.Axes(xlValue).Select 
        With Selection.Border 
            .Weight = xlHairline 
            .LineStyle = xlAutomatic 
        End With 
        With Selection 
            .MajorTickMark = xlOutside 
            .MinorTickMark = xlNone 
            .TickLabelPosition = xlNextToAxis 
        End With 
        Selection.TickLabels.AutoScaleFont = False 
        With Selection.TickLabels.Font 
            .Size = 11 
        End With 
        ActiveChart.SeriesCollection(1).Select 
        With Selection.Border 
            .Weight = xlThin 
            .LineStyle = xlAutomatic 
        End With 
        With Selection 
            .MarkerBackgroundColorIndex = xlAutomatic 
            .MarkerForegroundColorIndex = xlAutomatic 
            .MarkerStyle = xlAutomatic 
            .Smooth = False 
            .MarkerSize = 5 
            .Shadow = False 
        End With 
        ActiveChart.Legend.Select 
        Selection.Delete 
    End Sub 
    
    
    regards/junho lee

    Excel Video Tutorials / Excel Dashboards Reports


  6. #6
    Join Date
    23rd April 2008
    Location
    Work in North Wales
    Posts
    262

    Re: Plot On Chart/Graph As Zigzag Pattern

    If you can't modify your data then can you add some further calculations alongside it?

    The attached gives you what you want without changing or filtering your data.
    Attached Files. REMINDER! OzGrid accepts no responsibility for ANY adverse effects as a result from downloading attached files. ALWAYS run an up-to-date virus scan and disable macros.

    Excel Video Tutorials / Excel Dashboards Reports


  7. #7
    Join Date
    27th June 2008
    Posts
    16

    Re: Plot On Chart/Graph As Zigzag Pattern

    thanks....let me check it out!

    Excel Video Tutorials / Excel Dashboards Reports


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Possible Answers

  1. Not Plot Zero Values on Chart/Graph
    By sayed_harris in forum EXCEL HELP
    Replies: 3
    Last Post: September 8th, 2010, 14:51
  2. Not Plot Zeros On Line Chart/Graph
    By Chayd in forum EXCEL HELP
    Replies: 1
    Last Post: May 30th, 2008, 01:31
  3. Replies: 11
    Last Post: May 15th, 2008, 13:34
  4. Plot Multiple Series in 1 Graph/Chart
    By dunno in forum EXCEL HELP
    Replies: 4
    Last Post: August 18th, 2006, 15:13
  5. Graph: Plot a Stacked Bar Chart
    By geetha in forum EXCEL HELP
    Replies: 1
    Last Post: August 11th, 2006, 16:04

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
  •  
porno