Results 1 to 2 of 2

Thread: Legend in MSChart

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2003
    Posts
    3

    Legend in MSChart

    When I use MSChart I can't see true legend names, I can only see:

    RED_LINE - C1
    GREEN_LINE - C2
    BLUE_LINE - C3


    How can I change C1-C3 to my own? Here is my code:

    Dim arrData(1 To 12, 1 To 5)


    For i = 1 To 12
    arrData(i, 1) = Left(MonthName(i), 3)
    arrData(i, 2) = frmDevelop.txtBodyT + i * (frmDevelop.txtBodyT2 - frmDevelop.txtBodyT) / 12 'Series 1
    arrData(i, 3) = frmDevelop.txtHandT + i * (frmDevelop.txtHandT2 - frmDevelop.txtHandT) / 12 'Series 2
    arrData(i, 4) = frmDevelop.txtLegT + i * (frmDevelop.txtLegT2 - frmDevelop.txtLegT) / 12 'Series 3
    arrData(i, 5) = Body


    Next
    frmPrgDev.MSChart1.RowCount = 12
    frmPrgDev.MSChart1.ColumnCount = 3
    frmPrgDev.MSChart1.ChartData = arrData
    frmPrgDev.MSChart1.ShowLegend = True

  2. #2
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758
    Change the LegendText property of the specific Series. You access a series through the Plot object of the Chart.

    MSChart1.Plot.SeriesCollection(1).LegendText = "Hi"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width