1

I am trying to get a XValue out of a Serie as a String.

    Private Sub Page_load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    Dim series As New Series("Pie")
    series.ChartType = SeriesChartType.Pie

    series.BorderWidth = 3
    series.ShadowOffset = 2
    series.Color = Drawing.Color.CornflowerBlue

    series.Points.AddXY("First", 1)
    series.Points.AddXY("Second", 1)
    series.Points.AddXY("Third", 1)

    Chart1.Series.Add(series)

    Label1.Text = series.Points(0).XValue
End Sub

The problem is that the Label text will not become "First", it becomes "0".

How can I let the label show the String (xvalue) which I added as a point?

EDIT
I am not trying to make "First" into a "1", it was just an example for filling the x values.
This code would also give a "0", and now I changed "First" into "Apple (to show that it is not about converting Strings to numbers).

series.Points.AddXY("Apple", 1)
series.Points.AddXY("Banana", 1)
series.Points.AddXY("Mango", 1)
Stefan Orie
  • 604
  • 5
  • 19
  • possible duplicate of [converting numbers in to words C#](http://stackoverflow.com/questions/2729752/converting-numbers-in-to-words-c-sharp) – Josh Darnell Sep 18 '13 at 13:19

0 Answers0