cannot get 3D chart to show bound data

1 Answer 27 Views
Chart
Paul
Top achievements
Rank 2
Iron
Iron
Iron
Paul asked on 11 Mar 2024, 11:20 PM

<telerik:RadCartesianChart3D>

    <telerik:RadCartesianChart3D.XAxis>
        <telerik:CategoricalAxis3D />
    </telerik:RadCartesianChart3D.XAxis>

    <telerik:RadCartesianChart3D.YAxis>
        <telerik:CategoricalAxis3D />
    </telerik:RadCartesianChart3D.YAxis>

    <telerik:RadCartesianChart3D.ZAxis>
        <telerik:LinearAxis3D />
    </telerik:RadCartesianChart3D.ZAxis>

    <telerik:RadCartesianChart3D.Series>
        <telerik:BarSeries3D ItemsSource="{Binding TheDataPoints}">
        </telerik:BarSeries3D>
    </telerik:RadCartesianChart3D.Series>
    <telerik:RadCartesianChart3D.Grid>
        <telerik:CartesianChart3DGrid />
    </telerik:RadCartesianChart3D.Grid>
</telerik:RadCartesianChart3D>
In my ViewModel I have public ObservableCollection<PlotInfo> TheDataPoints but all I get is an empty chart

public class PlotInfo
{
  public string XValue { get; set; }
  public double YValue { get; set; }
  public double ZValue { get; set; }
}

Is something else needed because XValue is a string?

1 Answer, 1 is accepted

Sort by
1
Accepted
Martin Ivanov
Telerik team
answered on 12 Mar 2024, 09:13 AM

Hello Paul,

You should also assign the XValueBinding, YValueBinding and ZValueBinding properties of the series.

<telerik:BarSeries3D XValueBinding="XValue"  YValueBinding="YValue" ZValueBinding=”ZValue” ItemsSource="{Binding TheDataPoints}"/> 

Regards,
Martin Ivanov
Progress Telerik

A brand new ThemeBuilder course was just added to the Virtual Classroom. The training course was designed to help you get started with ThemeBuilder for styling Telerik and Kendo UI components for your applications. You can check it out at https://learn.telerik.com
Paul
Top achievements
Rank 2
Iron
Iron
Iron
commented on 12 Mar 2024, 09:48 AM

Great thanks, that worked, the quotation marks around ZValue are different, was Word being clever :-)
Tags
Chart
Asked by
Paul
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Martin Ivanov
Telerik team
Share this question
or