Link to home
Start Free TrialLog in
Avatar of Cerixus
CerixusFlag for United States of America

asked on

MSChart, asp.net, naming y axis? (I'm no good at charts in general)

So the code attached, the example from the documentation, will create a chart and plot 8 columns of data with the corresponding values.  However, the y axis just says 1, 2, 3, 4, 5, 6, 7 and 8.  How do I make it say different stuff?  I don't even know what to call this so I can't effectively google it (though I have tried for days).  In my opinion it should be like Series.Points.Addy(value, "name"), but I guess my opinion doesn't matter much to Microsoft :)

I actually want something basically identical to the attached image.  I created this by using databindxy, but I'd rather do it manually for flexibility reasons...

edit: fixed attachment
' Create new data series and set it's visual attributes
    Dim series As New Series("Spline")
    series.ChartType = SeriesChartType.Spline
    series.BorderWidth = 3
    series.ShadowOffset = 2
 
    ' Populate new series with data
    series.Points.AddY(67)
    series.Points.AddY(57)
    series.Points.AddY(83)
    series.Points.AddY(23)
    series.Points.AddY(70)
    series.Points.AddY(60)
    series.Points.AddY(90)
    series.Points.AddY(20)
 
    ' Add series into the chart's series collection
    Chart1.Series.Add(series)

Open in new window

example.jpg
Avatar of spprivate
spprivate
Flag of United States of America image

This is what there in MSDN for VB

http://msdn.microsoft.com/en-us/library/3ks53324(VS.71).aspx
With Me.chtSales.Plot
      .Axis(MSChart20Lib.VtChAxisId.VtChAxisIdX).AxisTitle.Text = "Year"
      .Axis(MSChart20Lib.VtChAxisId.VtChAxisIdY).AxisTitle.Text = "Millions of $"
   End With

Open in new window

Avatar of Cerixus

ASKER

Sorry, I'm talking about THIS MSchart: http://code.msdn.microsoft.com/mschart

Not the "Legacy ActiveX Control Reference" you posted documentation for.
ASKER CERTIFIED SOLUTION
Avatar of Cerixus
Cerixus
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial