Telerik radChartView

Miss leah
Miss leah used Ask the Experts™
on
anyone works with Telerik controls? Im trying to bind a line type radchartview to an array using this code but the chart wont show:

  Dim radChart As New RadChartView

  radChart.DataSource = New Double() {1.4, 1.9, 3.6, 3.6, 4.1}

  Me.Controls.Add(radChart)
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Éric MoreauSenior .Net Consultant
Top Expert 2016

Commented:
I think you need to go through a LineSeries:
        Dim radChart As New RadChartView

        Dim ls As New LineSeries()
        For Each d As Double In New Double() {1.4, 1.9, 3.6, 3.6, 4.1}
            ls.DataPoints.Add(d)
        Next

        radChart.Series.Add(ls)

        Me.Controls.Add(radChart)

Open in new window

Top Expert 2016
Commented:
Dim cartChart As New RadCartesianChart() 
cartChart.HorizontalAxis = New CategoricalAxis() 
cartChart.VerticalAxis = New LinearAxis() 
Dim barSeries As New BarSeries() With {.ShowLabels = True} 
cartChart.Series.Add(barSeries) 
barSeries.ItemsSource = New Double() { 20, 30, 50, 10, 60, 40, 20, 80 } 
Me.LayoutRoot.Children.Add(cartChart) 

Open in new window

https://docs.telerik.com/devtools/wpf/controls/radchartview/populating-with-data/series-databinding

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial