2 Replies Latest reply on Feb 26, 2010 11:53 AM by andreas

    How to add a tag to a xy plot?




      I am trying to populate a PB disply from values in a spread sheet.


      The below snippet works to draw a xy plot but an not able to add a tag to the xy plot.


      Thanks for any help!


      Set ptplot = disY.Symbols.Add(pbSymbolXYPlot)               <- this adds an XYPlot to the screen

      ptplot.Height = Range("D43")                                                     <- reads/sets the plot height from value in cell D43

      ptplot.Left = Range("E43")                                                           <- reads/sets the plot left position from value in cell E43

      ptplot.Top = Range("F43")                                                           <- reads/sets the plot top position from value in cell F43

      ptplot.Width = Range("G43")                                                     <- reads/sets the plot width from value in cell G43


      xtag = Range("B43")                                                                       <- set “xtag” equal to the tag string in cell B43…this is the x axis value

      ytag = Range("B44")                                                                       <-set “ytag” equal to the tag string in cell B44…this is the y axis value


      ptplot.xytags.Add xtag, True                                                      <- i then try to add the tags to the xyplot…this is what i can’t figure out

      ptplot.xytags.Add ytag, False                                                     <- this syntax does not work. All of the above code works, however