Pre loader

Tag: Chart3D

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0 votes
9k views

Hello!

I am getting started with SciChart and attempting to use it for a project I’m working on.

I am attempting to make a 3D scatter plot whose data is populated through a ViewModel.

Below is a my xaml:

 <UserControl x:Class="CustomWindow.Pages.Results_Page.Common_Tests.Positional6DOFErrorTest"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:enum="clr-namespace:MultiMet.Interfaces.Common;assembly=MultiMet.Interfaces"
             xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid"
             xmlns:s3D="http://schemas.abtsoftware.co.uk/scichart3D"
             mc:Ignorable="d" 
             d:DesignHeight="360" d:DesignWidth="712">

    <Grid Background="White">
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>

        <!-- Some other stuff I'm doing on the page -->

        <s3D:SciChart3DSurface Grid.Column="1" ShowLicensingWarnings="True"
                        IsFpsCounterVisible="False"
                         IsAxisCubeVisible="True"
                         IsXyzGizmoVisible="False"
                         CoordinateSystem="RightHanded"
                               Background="White" RenderableSeries="{s3D:SeriesBinding RenderableSeries3DViewModels}">
            <!-- Create XAxis -->
            <s3D:SciChart3DSurface.XAxis>
                <s3D:NumericAxis3D TickTextBrush="Black" AxisTitle="X (mm)" DrawMajorBands="True" DrawMajorGridLines="True"
                        DrawMinorGridLines="True"
                        DrawMajorTicks="True"
                        DrawMinorTicks="True"
                        AxisBandsFill="Transparent"
                        FontSize="10"
                        TickLabelAlignment="Camera"
                                   GrowBy="0.1, 0.1"/>
            </s3D:SciChart3DSurface.XAxis>
            <!-- Create YAxis -->
            <s3D:SciChart3DSurface.YAxis>
                <s3D:NumericAxis3D AxisTitle="Z (mm)"
                        AxisBandsFill="Transparent"
                        TickTextBrush="Black"
                        FontSize="10"
                        TickLabelAlignment="Camera"
                                   GrowBy="0.1, 0.1"/>
            </s3D:SciChart3DSurface.YAxis>
            <!-- Create ZAxis -->
            <s3D:SciChart3DSurface.ZAxis>
                <s3D:NumericAxis3D AxisTitle="Y (mm)"
                        AxisBandsFill="Transparent"
                        TickTextBrush="Black"
                        FontSize="10"
                        TickLabelAlignment="Camera"
                                   GrowBy="0.1, 0.1"/>
            </s3D:SciChart3DSurface.ZAxis>

            <!-- Create Interactivity Modifiers for rotating camera -->
            <s3D:SciChart3DSurface.ChartModifier>
                <s3D:ModifierGroup3D>
                    <s3D:OrbitModifier3D ExecuteOn="MouseLeftButton" ExecuteWhen="None"/>
                    <s3D:MouseWheelZoomModifier3D MouseWheelSensitivity="90" />
                    <s3D:FreeLookModifier3D ExecuteOn="MouseRightButton"/>
                    <s3D:TooltipModifier3D IsEnabled="True" SourceMode="AllSeries" ShowTooltipOn="MouseOver"/>
                </s3D:ModifierGroup3D>
            </s3D:SciChart3DSurface.ChartModifier>
        </s3D:SciChart3DSurface>
    </Grid>
</UserControl>

And below I declare and define my scatter plot in the viewmodel (the scatterSeries is an XyzDataSeries3D set somewhere else) :

    PositionalErrorTestModel.RenderSeries3DViewModels = new ObservableCollection<IRenderableSeries3DViewModel>();
PositionalErrorTestModel.RenderSeries3DViewModels.Add(new ScatterRenderableSeries3DViewModel
            {
                PointMarker = new SpherePointMarker3D { Fill = System.Windows.Media.Color.FromRgb(0x78, 0xC3, 0), Size = 5, Opacity = 1 },
                DataSeries = scatterSeries
            });

The chart appears, but the data does not. Is there something I’m missing? Do I need to explicitly call an update to the chart? Because the page the chart is on and the chart does get loaded before the data is populated.

Please let me know if you need to know anymore information.

Thanks for any help you can provide!

Showing 1 result

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies