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

Multiple series in the same 3d chart

1 Answer 102 Views
ChartView3D
This is a migrated thread and some comments may be shown as answers.
Hila
Top achievements
Rank 1
Hila asked on 28 Dec 2016, 02:43 PM

Hi, 

I'm trying to show on the same chart different series types, I need to show Point3d and also Surface3d.

I have no idea why it's not working, actually it shows my surface3d as point3d.

this is the xaml code:

 

<Window x:Class="TelerikWpfApp76.MainWindow"
                xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                xmlns:po="http://schemas.microsoft.com/expression/blend/2008"
                xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                mc:Ignorable="po"
                Title="MainWindow" Height="475.829" Width="525"
                po:DesignHeight="300"
                po:DesignWidth="300"
                DataContext="{Binding RelativeSource={RelativeSource Self}}">
    <Window.Resources>
       
    </Window.Resources>

    <Grid Width="{Binding ActualWidth, RelativeSource = {RelativeSource AncestorType = {x:Type Window}}}"
          Height="{Binding ActualHeight, RelativeSource ={RelativeSource AncestorType = {x:Type Window}}}">
        <telerik:RadCartesianChart3D x:Name="radCartesian" HorizontalContentAlignment="Stretch">
            <telerik:RadCartesianChart3D.Behaviors>
                <telerik:Chart3DCameraBehavior/>
                <telerik:Chart3DTooltipBehavior/>
            </telerik:RadCartesianChart3D.Behaviors>
            <telerik:RadCartesianChart3D.XAxis>
                <telerik:LinearAxis3D>
                    <telerik:LinearAxis3D.LabelStyle>
                        <Style TargetType="TextBlock">
                            <Setter Property="Foreground" Value="#0000cc" />
                            <Setter Property="FontWeight" Value="Bold" />
                        </Style>
                    </telerik:LinearAxis3D.LabelStyle>
                </telerik:LinearAxis3D>
            </telerik:RadCartesianChart3D.XAxis>
            <telerik:RadCartesianChart3D.YAxis>
                <telerik:LinearAxis3D>
                    <telerik:LinearAxis3D.LabelStyle>
                        <Style TargetType="TextBlock">
                            <Setter Property="Foreground" Value="#000066" />
                            <Setter Property="FontWeight" Value="Bold" />
                        </Style>
                    </telerik:LinearAxis3D.LabelStyle>
                </telerik:LinearAxis3D>
            </telerik:RadCartesianChart3D.YAxis>
            <telerik:RadCartesianChart3D.ZAxis>
                <telerik:LinearAxis3D>
                    <telerik:LinearAxis3D.LabelStyle>
                        <Style TargetType="TextBlock">
                            <Setter Property="Foreground" Value="#CA5100" />
                            <Setter Property="FontWeight" Value="Bold" />
                        </Style>
                    </telerik:LinearAxis3D.LabelStyle>
                </telerik:LinearAxis3D>
            </telerik:RadCartesianChart3D.ZAxis>
            <telerik:RadCartesianChart3D.Series>
                <telerik:PointSeries3D x:Name="fenceSeries"
                                       PointSize="20 20 20"
                                       XValueBinding="X"
                                       YValueBinding="Y"
                                       ZValueBinding="Z"
                                       ItemsSource="{Binding Path=Fence}">
                    <telerik:PointSeries3D.DefaultVisualMaterial>
                        <MaterialGroup>
                            <DiffuseMaterial Brush ="#BF444444"/>
                            <SpecularMaterial Brush="#BF444444" SpecularPower="30" />
                        </MaterialGroup>
                    </telerik:PointSeries3D.DefaultVisualMaterial>
                    <telerik:PointSeries3D.TooltipTemplate>
                        <DataTemplate>
                            <Border Background="#5A000000" 
                                    Padding="5" TextElement.Foreground="White">
                                <StackPanel>
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock Text="Track Fence"/>
                                    </StackPanel>
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock Text="X - " FontWeight="Bold" />
                                        <TextBlock Text="{Binding XValue}"  />
                                    </StackPanel>
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock Text="Y - " FontWeight="Bold" />
                                        <TextBlock Text="{Binding YValue}"  />
                                    </StackPanel>
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock Text="Z - " FontWeight="Bold" />
                                        <TextBlock Text="{Binding ZValue}"  />
                                    </StackPanel>
                                </StackPanel>
                            </Border>
                        </DataTemplate>
                    </telerik:PointSeries3D.TooltipTemplate>
                </telerik:PointSeries3D>
                <telerik:SurfaceSeries3D x:Name="searchSeries"
                                       XValueBinding="X"
                                       YValueBinding="Y"
                                       ZValueBinding="Z"
                                       ItemsSource="{Binding Path=SearchFence}">
                    <telerik:SurfaceSeries3D.DefaultVisualMaterial>
                        <MaterialGroup>
                            <DiffuseMaterial Brush ="#B7EDFF"/>
                            <SpecularMaterial Brush="#B7EDFF" SpecularPower="30" />
                        </MaterialGroup>
                    </telerik:SurfaceSeries3D.DefaultVisualMaterial>
                    <telerik:SurfaceSeries3D.TooltipTemplate>
                        <DataTemplate>
                            <Border Background="{Binding RelativeSource={RelativeSource AncestorType=Window}, Path=DataContext.ToolTipColor}" 
                                    Padding="5" TextElement.Foreground="White">
                                <StackPanel>
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock Text="Search Fence"/>
                                    </StackPanel>
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock Text="X - " FontWeight="Bold" />
                                        <TextBlock Text="{Binding XValue}"  />
                                    </StackPanel>
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock Text="Y - " FontWeight="Bold" />
                                        <TextBlock Text="{Binding YValue}"  />
                                    </StackPanel>
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock Text="Z - " FontWeight="Bold" />
                                        <TextBlock Text="{Binding ZValue}"  />
                                    </StackPanel>
                                </StackPanel>
                            </Border>
                        </DataTemplate>
                    </telerik:SurfaceSeries3D.TooltipTemplate>
                </telerik:SurfaceSeries3D>
                <telerik:PointSeries3D x:Name="series" 
                               PointSize="20 20 20"                                        
                               XValueBinding="X"
                               YValueBinding="Y"
                               ZValueBinding="Z"
                               ItemsSource="{Binding Path=Traj}">
                    <telerik:PointSeries3D.TooltipTemplate>
                        <DataTemplate>
                            <Border Background="{Binding RelativeSource={RelativeSource AncestorType=Window}, Path=DataContext.ToolTipColor}" 
                                    Padding="5" TextElement.Foreground="White">
                                <StackPanel>
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock Text="Trajectory"/>
                                    </StackPanel>
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock Text="X - " FontWeight="Bold" />
                                        <TextBlock Text="{Binding XValue}"  />
                                    </StackPanel>
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock Text="Y - " FontWeight="Bold" />
                                        <TextBlock Text="{Binding YValue}"  />
                                    </StackPanel>
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock Text="Z - " FontWeight="Bold" />
                                        <TextBlock Text="{Binding ZValue}"  />
                                    </StackPanel>
                                </StackPanel>
                            </Border>
                        </DataTemplate>
                    </telerik:PointSeries3D.TooltipTemplate>
                </telerik:PointSeries3D>
            </telerik:RadCartesianChart3D.Series>
            <telerik:RadCartesianChart3D.Grid>
                <telerik:CartesianChart3DGrid />
            </telerik:RadCartesianChart3D.Grid>
        </telerik:RadCartesianChart3D>
    </Grid>
</Window>

 

Thanks!

1 Answer, 1 is accepted

Sort by
0
Hila
Top achievements
Rank 1
answered on 28 Dec 2016, 02:52 PM

Got it- my mistake :)

working fine

Tags
ChartView3D
Asked by
Hila
Top achievements
Rank 1
Answers by
Hila
Top achievements
Rank 1
Share this question
or