xaxis item labeltext for stacked column programatically

2 posts, 0 answers
  1. Joel
    Joel avatar
    166 posts
    Member since:
    Oct 2006

    Posted 28 Aug 2013 Link to this post

    I am creating a an htmlchart completely in the code behind.  I utilized one of the demos. 

    I now want to extend that chart as a stacked column.  It works well.

    Problem I am having is having the x-axis labels showing up.  if I do this, I get an index error

    ch1.PlotArea.XAxis.Items.Item(0)...

    Since I am declaring each series in the code, and each categoryseriesitem in a row loop, it is not databound in a traditional manner.  The following does not throw an error, but the x-axis label is not visible either
    ch1.PlotArea.XAxis.DataLabelsField = "Name"

    Any suggestions? This is close to being done, but this is the last piece.

  2. Joel
    Joel avatar
    166 posts
    Member since:
    Oct 2006

    Posted 28 Aug 2013 Link to this post

    Please disregard.  I had to add xaxis items within the categoryseriesitem loop and it works fine.

    For Each row As DataRow In GetChartDataE().Rows
      ..add categoryseriesitems
     
     ch1.PlotArea.XAxis.Items.Add(row("Name"))
    Next
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top