Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. changing msgraph data labels using code

changing msgraph data labels using code

Scheduled Pinned Locked Moved Visual Basic
data-structuresdatabasehelp
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    I am constructing a graph that plots distance on the x axis and resistivity on the y-axis. There is an extra data series that plots an arrow at various distances to denote a feature, e.g. tree, but to get the arrow in the right place I have to give each point in the series the value 2000. I am able to turn on the data labels and change the orientation, but I can't change the value in the data label from 2000 to "tree". The code from the help files doesn't seem to work: With myChart With .SeriesCollection(1).Points(2) .HasDataLabel = True .DataLabel.Text = "Saturday" End With End With The following code I have written after reading the help file and this doesn't work either: Set chartpath = subGraph!uofGraph.Object.Application.Chart With chartpath.SeriesCollection(6) .HasDataLabels = True .DataLabels.Orientation = 90 End With Set FeatRs = CurrentDb().OpenRecordset(Me!ItemSQL, DB_OPEN_DYNASET) Counter = FeatRs.RecordCount featCount = 1 For X = 1 To Counter If (IsNull(FeatRs.Fields(6).Value)) Then MsgBox "No Feature" FeatRs.MoveNext Else With chartpath.SeriesCollection(6).DataLabels(featCount) .text = "test" End With MsgBox "Some Feature" FeatRs.MoveNext featCount = featCount + 1 End If Next X FeatRs.Fields(6) contains null fields and the value 2000, series 6 is the arrows and has the data labels I want to change. Thanks in advance Marc Robinson

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups