This is a migrated thread and some comments may be shown as answers.

how to do stacked ColumnSeries in code?

1 Answer 156 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
Doug
Top achievements
Rank 1
Doug asked on 04 Apr 2017, 08:29 PM

Dim radChart As New RadHtmlChart()
radChart.ID = "Rad" & iRadCharts
Dim oSeries As Telerik.Web.UI.ColumnSeries = New Telerik.Web.UI.ColumnSeries
oSeries.LabelsAppearance.Visible = False
oSeries.Stacked = True
oSeries.GroupName = "test"
 
LOOP
  Dim oCategorySeriesItem As Telerik.Web.UI.CategorySeriesItem = New Telerik.Web.UI.CategorySeriesItem
  oCategorySeriesItem.Y = Format(v, "0.00")
  radChart.PlotArea.XAxis.Items.Add(sDate)
  oSeries.SeriesItems.Add(oCategorySeriesItem)
      
  Dim oCategorySeriesItem2 As Telerik.Web.UI.CategorySeriesItem = New Telerik.Web.UI.CategorySeriesItem
  oCategorySeriesItem2.Y = Format(vMax, "0.00")
  oCategorySeriesItem2.BackgroundColor = Drawing.Color.Beige
  radChart.PlotArea.XAxis.Items.Add(sDate)
  oSeries.SeriesItems.Add(oCategorySeriesItem2)
END LOOP
radChart.PlotArea.Series.Add(oSeries)
HtmlChartHolder.Controls.Add(radChart)

1 Answer, 1 is accepted

Sort by
0
Peter Milchev
Telerik team
answered on 06 Apr 2017, 01:03 PM
Hello Doug,

I would recommend you to review the implementation of the HtmlChart - Programmatic Chart Creation demo.

The stacked ColumnSeries programmatic creation is analogical.

Regards,
Peter Milchev
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Chart (HTML5)
Asked by
Doug
Top achievements
Rank 1
Answers by
Peter Milchev
Telerik team
Share this question
or