Pre loader

Tag: WPF

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
6k views

Hello,

I am currently working on a proof of concept to move make our software cross platform. Currently, we use the WPF charting package but we have the full bundle so we have access to all the charts. I’m working on a Maui Blazor app where the UI and its logic are stored in a razor class lib and most of the services are stored in the shared WebAssembly project. Ideally, I would like to create the chart data inside a service and then create the appropriate views for each platform using the platform specific charts. Eventually my plan is to have a Blazor WASM project that we host online (where users can view their data), a Maui app that will run on Windows and Mac, and a WPF app that will host the project on computers that aren’t running Windows 10 and 11.

Are there any plans to implement a shared library of some type for the IRenderableSeriesViewModel, IDataSeries, IPaletteProvider, etc. where we could reference these interfaces regardless of platform?

Thank you,

Tim Stephansen

0 votes
2k views

Hi All!

I have a syncfusion theme (MaterialDark) applied to my WPF app.

Without the theme applied, I can set the background color of a TextAnnotaion in the normal way in bothe XAML and c#, no problem.

When I apply the theme, it overrides this setting and renders the TextAnnotation with a black background and no matter what I try, I

can’t seem to get rid of it.

I have tried:

  1. setting up a Resource dictionary in XAML

  2. setting the style to null and then applying inline style (in both code behind and XAML)

Nothing seems to work!

Has anyone encountered this issue beforew or know of any solutions?

It’s driving me mad!

0 votes
2k views

I want to visualize the octave band.
How can I visualize it?

1 vote
6k views

Hi Team,

I am getting the error message Sorry! your trail of schichart has expired message is coming on the end user PC through we have purchased the developer license and activating the schichart using the runtime key provided in my account. Gone through the steps provided in here .

Also checked if there are any spaces in the license key. FYI, my developer license is expired and using the v5.4 with nuget.

1 vote
2k views

Sorry. My English is not good.

I have to mapping “Connector” image to 3D Cylindroid Chart.
But I do not know how.

Please let me know

0 votes
0 answers
8k views

I want to customise BrightSpark theme from scratch.

In the page below, there is SciChartv4Dark theme’ s xaml.
https://www.scichart.com/documentation/win/current/webframe.html#Creating%20a%20Custom%20Theme.html

Can I get same thing for BrightSpark theme?

0 votes
8k views

Hi, I would like to know if it is possible to do half-pie (as in the photo) with SciChartDonutSurface and if so how? Thanks!

  • mike laor asked 2 years ago
  • last active 2 years ago
0 votes
3k views

Hello all,

I was trying to export my SciChartSurface to bitmap, to save in a pdf.

First I tried ExportToBitmapSource(true/false, wantedSize) method. It leaded to StackOverflowException.
Then I tried to set explicitly the Height and Width and call the parameterless ExportToBitmapSource() method. It works fine, saves fine, but for a second I see the modified Height and Width and axes.
I tried them sync and async calls too.

Have you ever met these kind of functioning, or is the failure in me?

On my SciChart almost everything has predefined Style. Maybe that’s why the ExportToBitmapSource(true/false, wantedSize) dies while cloning the chart inside?

0 votes
0 answers
5k views

Hello SciChart team,
we have a problem with column series in 2D. At certain values in the X-axis, the bars in the chart overlap.

We found that the bar width is calculated incorrectly only from a certain distance between the values on the X-axis. There seems to be a bug in the calculation of the minimum bar width.

I’ve already seen issues related to a similar problem with the non-equidistant axis values and have already tried the “UseUniformWidth” property. Unfortunately without success. In principle, however, it seems to work with the non-equidistant axis values (ColumnChart1.png). As soon as the value is changed from 16 to 18, the bars overlap (ColumnChart2.png). In the application we need the width at 100%.

I’ve also attached an example project that can be used to reproduce the error.

Best regards
Silvester

1 vote
0 answers
6k views

Is it possible to add color gradients to part of the mesh on an ObjectModel3D? We would love to use SciChart exclusively for our charts because they are easy to work with and almost all of the other charts in our software are SciChart charts.

Currently, we use LightningCharts for our 3D heads and the have a method call UpdateFill which applies a color gradient to part of the mesh. This shading is done using the geometry data generated from LightningCharts after the head is rendered. I didn’t see a similar method in SciChart but I don’t know that it is necessary because the geometry will be the same ever time the chart is rendered so we can just use the data generated from LightningCharts.

I’ve included a screenshot showing what I’ve been able to create with SciChart and a screenshot showing what the chart looks like currently with LightningCharts. The brain is a .obj file (along with the scalp and face but those are separate and don’t require any shading). The sensor locations (Fp1, Fp2, O1, and O2) are added using the ScatterRenderableSeries3D (I haven’t added annotations for the locations yet).

SciChart

LightningCharts

0 votes
10k views

Hello SciChart-Team,
we had the requirement to show the zero line when there are negative values ​​in the chart.
We noticed the following things, especially in connection with the main grid lines.
There are some side effects at certain sizes of the window:
When the gridlines are on(see screenshot 1):
1. Grid line and tick are not on the same level (Only for certain sizes)
2. The grid line and horizontal annotation line (green) are not aligned either (Only at certain sizes)
3. The axis line (defined via BorderThickness) is also not aligned with the grid line (regardless of the size of the control).And the bottom tick is never aligned with the major grid line

If the major grid lines are switched off, the zero annotation line is not aligned to the ticks for certain sizes of the control (see screenshot 2)

It looks like different algorithms were used to calculate the line position of the ticks, grid lines and line annotations.

The problem was detected on the monitor with 100% scaling. On a 4K monitor with scaling > 100%, the problem became even more apparent

Do you have any suggestion how to solve the problem?

I’ve attached a modified example project in which the behavior can be reproduced.

Regards
Silvester Schneidt

0 votes
7k views

Is there a way to apply functionalities on signals as in average, slope, etc. ?

Thank you
Anders

0 votes
0 answers
3k views

X, Z, Y are 2D (m x n) arrays of the same size.

How do I plot this as a 3D Surface mesh or a 2D Contour? I created a XyzDataSeries3D but when I set it to a SurfaceMeshRenderableSeries3D, it does not plot anything. But it does plot when using ScatterRenderableSeries3D.

I am basically trying to replicate the surf(X, Y, Z), contour(X, Y, Z) function in Matlab.

Attached is a test data that contain the X, Z and Y 2D arrays of size (261 x 10). The zip file contains an Excel file which has three sheets X, Z and Y that contain the data.

The images are of the Surf plot, and the Contour plot generated using Matlab. I need to generate these plots using SciChart instead of with Matlab.

  • A Devadas asked 2 years ago
  • last active 12 months ago
0 votes
2k views

Is there a way to draw an svg formatted annotation onto a chart for WPF?

I have found references/examples for it in javascript here . . .

https://www.scichart.com/documentation/js/current/Tutorial%2006%20-%20Adding%20Annotations.html

but not for any other platform.

0 votes
3k views

Hello SciChart Team,
I have multiple charts in my application where all the charts are in the same MdofierGroup to show the RolloverModifier tooltip at the same time. As I want to show custom tooltip text, I have created a custom TooltipTemplate and TooltipContainerStyle. But now when the tooltip is shown on the left side the tooltip text is a long way from the marker. I want to align the tooltip text based on the tooltip position. When the tooltip is on the right side the text will be aligned left and when the tooltip is on left side the text will be aligned right.

I have attached some code snippets of my implementations, can you suggest me any way to achieve this?

<Style x:Key="_tooltipContainer" TargetType="scichart:TooltipControl">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="scichart:TooltipControl">
                    <ContentPresenter Content="{TemplateBinding DataContext}"
                                          ContentTemplate="{TemplateBinding ContentTemplate}" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <DataTemplate x:Key="_tooltipTemplate" DataType="scichart:XySeriesInfo">
        <StackPanel Orientation="Vertical">
            <TextBlock FontSize="12" FontFamily="Rubik" Foreground="White">
                <TextBlock.Text>
                    .
                    .
                    .
                </TextBlock.Text>
            </TextBlock>
        </StackPanel>
    </DataTemplate>

    <!-- Style applied via x:Key name in ViewModel -->
    <Style TargetType="scichart:BaseRenderableSeries"  x:Key="_lineSeriesStyle">
        <Setter Property="RolloverMarkerTemplate">
            <Setter.Value>
                <ControlTemplate>
                    <Ellipse Width="7" Height="7" Stroke="White" StrokeThickness="1" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>

        <Setter Property="scichart:RolloverModifier.TooltipContainerStyle" Value="{StaticResource _tooltipContainer}"/>
        <Setter Property="scichart:RolloverModifier.TooltipTemplate" Value="{StaticResource _tooltipTemplate}"/>
        <Setter Property="scichart:RolloverModifier.IncludeSeries" Value="True"/>
        <Setter Property="StrokeThickness" Value="2"/>
    </Style>


 <scichart:SciChartSurface RenderableSeries="{scichart:SeriesBinding ItsRenderableTimeGraphSeries}">


                                    <scichart:SciChartSurface.ChartModifier>
                                        <scichart:ModifierGroup DataContext="{Binding Path=DataContext, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ItemsControl}}}" 
                                                            scichart:MouseManager.MouseEventGroup="MouseEventGroup" >
                                            <scichart:RolloverModifier ShowTooltipOn="MouseHover" DrawVerticalLine="False" />
                                        </scichart:ModifierGroup>
                                    </scichart:SciChartSurface.ChartModifier>
.
.
.
</scichart:SciChartSurface>

In ViewModel:

ItsRenderableTimeGraphSeries = new ObservableCollection<IRenderableSeriesViewModel>
        {
            new MountainRenderableSeriesViewModel()
            {
                IsDigitalLine = false,
                StyleKey = "_lineSeriesStyle",
            }
        };
0 votes
4k views

Hi,

I am developing a desktop application using your SciChart WPF v6.5.1.26067 library. Right now, it is used on Windows 10 machines. It is working in all computers except for one. In this computer, we can’t make zoom or click on it to show more data. Could you tell me a reason? The machine system information is:

      Time of this report: 2/17/2022, 17:05:06
      Machine name: PA05009
      Machine Id: {54B0843D-6CE1-4289-A978-A41820074452}
      Operating System: Windows 10 Pro 64-bit (10.0, Build 19042) (19041.vb_release.191206-1406)
      Language: Spanish (Regional Setting: Spanish)
      System Manufacturer: Dell Inc.
      System Model: Vostro 3500
      BIOS: 1.9.0 (type: UEFI)
      Processor: 11th Gen Intel(R) Core(TM) i3-1115G4 @ 3.00GHz (4 CPUs), ~3.0GHz
      Memory: 8192MB RAM
      Available OS Memory: 7914MB RAM
      Page File: 7853MB used, 6461MB available
      Windows Dir: C:\WINDOWS
      DirectX Version: DirectX 12
      DX Setup Parameters: Not found
      User DPI Setting: 120 DPI (125 percent)
      System DPI Setting: 120 DPI (125 percent)
      DWM DPI Scaling: UnKnown
      Miracast: Available, with HDCP
      Microsoft Graphics Hybrid: Not Supported
      DirectX Database Version: 1.0.8
      DxDiag Version: 10.00.19041.0928 64bit Unicode

Thanks,

Harold.

1 vote
9k views

I am considering applying server-side licensing for my javerScript application.

In the document below, there is a phrase “Our server-side licensing component is written in C++.”
(https://support.scichart.com/index.php?/Knowledgebase/Article/View/17256/42/)

However, there is only asp.net sample code on the provided github.
(https://github.com/ABTSoftware/SciChart.JS.Examples/tree/master/Sandbox/demo-dotnet-server-licensing)

I wonder if there is a sample code implemented in C++ for server-side licensing.

Can you provide c++ sample code?
Also, are there any examples to run on Ubuntu?

0 votes
3k views

Hi,

I’m trying to evaluate the reality of creating multiple realtime charts and I’m hitting a huge performance brick wall.

My application will have high speed streamed data coming in over ethernet. Currently I’m simulating this with a thread timer that updates 100 data objects at 60Hz. Screen data and chart updates I’ve got throttled to 30Hz but it’s still grinding my charts are still struggling. If I move the mouse pointer the charts freeze entirely until the mouse is still.

I want the end user to be able to choose any data object and chart it however they want. Adding charts and adding plots to charts etc. To enable this I’ve created a chart template as a user control and at runtime the charts are added to a panel on a tab control. Event one chart on one tab chugs though. Move the mouse over it and it locks up.

I have a single overview chart with a scrollbar over the top on the parent control. I need this to control the cursor (vertical line) and shared X visible range. Live data is Fifo limited to a 10 second range. All this works, just painfully slowly.

SharedXVisible range is MVVM bound. Renderable series is LineRenderableSeriesViewModel and data is pushed at 30Hz from a Data provider as per this tutorial:
https://www.scichart.com/documentation/win/current/Tutorial%2006b%20-%20Adding%20Realtime%20Updates%20with%20MVVM.html

CPU usage is sub 20%. Max frame rate is 30fps. Render priority doesn’t seem to make much difference, though “immediate” will lock up the whole app. I’m no expert at performance profiling but I’m not getting any clues from ReShaper dotTrace so far.

I tried creating a version that hand almost no binding and used codebehind to update the data. It didn’t seem to help. I’d rather not do this though as I have a lot of things working that I like such as vertical slice, annotations, templates etc.

I’ve got a list of all the live data on the right of the screen and it all updates rapidly, even while the mouse is moving and the charts are frozen.

I’m also using some Syncfusion controls and theming, if it matters.

I must be missing something obvious surely.

<!--  Define Chart  -->
        <s:SciChartSurface x:Name="chart" Grid.Row="0" Grid.Column="0"
                           Background="Black"
                           RenderPriority="low"
                           MaxFrameRate="30"
                           RenderableSeries="{s:SeriesBinding RenderableSeriesCollection}"
                           >

            <!--  Define X and Y Axis  -->
            <s:SciChartSurface.YAxis>
                <s:NumericAxis AutoRange="{Binding AxisYRangeMode}" 
                               DrawMajorBands="False" 
                               DrawMinorGridLines="false" 
                               DrawMajorGridLines="True" 
                               DrawMajorTicks="False" 
                               DrawMinorTicks="False" 
                               VisibleRange="{Binding AxisYVisibleRange}" />
            </s:SciChartSurface.YAxis>

            <s:SciChartSurface.XAxis>
                <s:NumericAxis AutoRange="{Binding AxisXRangeMode}" 
                               BorderBrush="{StaticResource BorderBrushGray}" 
                               BorderThickness="1" 
                               DrawMajorBands="False" 
                               DrawMinorGridLines="False" 
                               DrawMajorGridLines="True" 
                               DrawMajorTicks="False" 
                               DrawMinorTicks="False" 
                               TextFormatting="0" 
                               VisibleRange="{Binding SharedXVisibleRange, Mode=TwoWay}" 
                               s:VerticalSliceModifier.AxisLabelContainerStyle="{x:Null}"/>
            </s:SciChartSurface.XAxis>

            <!--  Modifiers  -->
            <s:SciChartSurface.ChartModifier>
                <s:ModifierGroup>
                    <s:RubberBandXyZoomModifier 
                        IsXAxisOnly="True" 
                        ZoomExtentsY="True" 
                        IsAnimated="True" 
                        RubberBandFill="#20FFFFFF" 
                        RubberBandStroke="GreenYellow" 
                        RubberBandStrokeDashArray="2 2">
                    </s:RubberBandXyZoomModifier>

                    <s:ZoomExtentsModifier IsAnimated="True"/>

                    <s:MouseWheelZoomModifier IsEnabled="True"/>

                    <s:XAxisDragModifier IsEnabled="True" DragMode="Pan"/>

                    <s:LegendModifier x:Name="legendModifier"
                                      Background="Transparent" 
                                      Margin="10" 
                                      GetLegendDataFor="AllSeries" 
                                      LegendItemTemplate="{StaticResource CustomLegendTemplate}" 
                                      ShowLegend="True" ShowVisibilityCheckboxes="True"/>

                    <s:VerticalSliceModifier Name="sliceModifier">

                    <s:VerticalSliceModifier.VerticalLines>
                            <s:VerticalLineAnnotation Style="{StaticResource sliceStyle}" 
                                                      X1="{Binding SlicePosition, Mode=TwoWay}"/>
                        </s:VerticalSliceModifier.VerticalLines>
                    </s:VerticalSliceModifier>

                </s:ModifierGroup>
            </s:SciChartSurface.ChartModifier>
        </s:SciChartSurface>

Thanks in advance,
Declan.

PS. I’m trying to attach a screenshot but it keeps saying “Forbidden”.

1 vote
6k views

Hello SciChart-Team,
I noticed that the columns in Sparse Column3D and in Uniform Column 3D always start at the XZ surface. Is there any option or way to do so, that columns always use the zero value of the Y axis as their starting point. The visible range of the axes should correspond to the minimum and maximum Y values.

The current behavior can be reproduced in the example SciChart_UniformColumn3D:
If the VisibleRange of the Y-axis goes from 0 to 0.5 then the columns with negative values go down (see screenshot 1)
As soon as the VisibleRange of the Y-axis goes from -0.5 to 0.5, the columns look like this (Screenshot2) We need the columns to look like in Screenshot 1, only that the Y-axis is also visible downwards.

Can the starting point of the columns be changed?

Best regards
Silvester

0 votes
3k views

Hello everybody,

I didnt find any answer to this. Is it possible to display data from year 0 to year 9999?

Until now i figuered out, that data from the year 834 to 9166 can be displayed. Beyond this range (eg to 9499) not data were displayed and the x-axis shows todays date.

Thanks for any help
Emanuel

0 votes
7k views

Hi,

I am developing an MVVM WPF application and need to access the SelectedPointMarkers property of DataPointSelectionModifier from the ViewModel.

From looking at the DataPointSelectionModifier documentation (https://www.scichart.com/documentation/win/current/webframe.html#DataPoint%20Selection.html) I can see how you can get the X and Y coordinate values of a selected point in a view, by binding the PointMarkersSelectionModifier to a listbox.

However this doesn’t really help me, I need to get the coordinates of the SelectedPointMarker into a property inside the ViewModel that can be accessed, rather than just binding to a listbox in the view itself.

I’ve also looked at this similar post: (https://www.scichart.com/questions/wpf/i-want-to-bind-selectedpointmarkers-of-datapointselectionmodifier), but I had no luck getting Kenishis solution to work in my case.

How can i do this?

Thanks.

0 votes
3k views

I have a chart with multiple series, and I would like to have the RolloverModifier behavior for all selected series, but with a single tooltip combining the values for all selected series rather than a separate tooltip per series (similar to the CursorModifier)

Is there a way to do one of the following?

  1. Merge the tooltips from the RolloverModifier?
    OR
  2. Only show the vertical crosshair from the CursorModifier, and snap the crosshair to the closest point in the series?

The RolloverModifier is closer to the behavior I want, the only change I would want is the merged tooltip.

0 votes
3k views

How do you set X1,X2 and Y1,Y2 in xaml as suggested in a previous post here on the forum?

I also get null values here when using Composite Annotations example. the suggestion to set the value DependencyProperty.SetCurrentValue(X1Property, 0.0); does not work since DependencyProperty does not expose a SetCurrentValue method (?)

I am using your example code for doing composite Annotations on my existing chart.
I am using MeasureXAnnotation and MeasureXyAnnotation and the respective Update method that is overidden.

What am I missing ?

Appreciate your help with getting this working

Thanks
Anders

0 votes
3k views

I am having an issue with my Composite Annotation implementation.
I am using the example provided in the MeasureXyAnnotation.xaml that I found here.
My exception that is thrown (see exception attachment provided) complains about a missing Axis value.

In the public override void Update(ICoordinateCalculator xCoordCalc, ICoordinateCalculator yCoordCalc)
the yCoordCalc comes in with a null value. The xCoordCalc is populated and looks valid.

See attachment of my plotting area and well as the chart area. The composite annotation shows up alright, but as soon as I try to drag it the exception is immediately thrown.

I have no idea at this point why. I have tried to implement the annotation according to your example but obviously I am missing something.
Support getting this to work would be immensely appreciated.

Thank you
Anders

0 votes
3k views

Hello guys !
I am looking at the Composite Annotation example provided with the SDK that I downloaded a few days back.

I am somewhat confused on what assemblies I will need . The assemblies list you use is extensive and it is unclear to me what assemblies I need to include to apply this to my plot implementation.

The namespace
SciChart.Examples.Examples.AnnotateAChart.CompositeAnnotations is what I am looking at and what in that list of assemblies will I need to include to successfully implement Composite Annotation in our application ?

I work with a few models and views. Two of them, the ChartView and the PlotView respectively handles the charting surface , then the surrounding toggle buttons and such belongs to the PlotView.

What would be your recommendation how to begin implement this ?

Appreciate the support
Thank you

Cheers
Anders

0 votes
0 answers
6k views

I have a custom chartmodifier I use for highlighting points on mouseover for my 2D plots and I want to create the same functionality for my 3D scatter plot. However, I can’t get it to work;

for the 2D plot I do

var series = ParentSurface.RenderableSeries[0];
var pt = GetPointRelativeTo(e.MousePoint, ModifierSurface);
double dataPointRadius = 8;
var result = series.HitTestProvider.HitTest(pt, dataPointRadius);

However, it seems that 3D plots don’t have a hittestprovider and that it’s not possible to define a radius for the hit test, so the code becomes

var series = ParentSurface.RenderableSeries[0];
var pt = GetPointRelativeTo(e.MousePoint, ModifierSurface);
var result = series.HitTest(pt);

However, result.IsHit is always false. What am I missing?

0 votes
5k views

Hello,

I am trying to set the interval on the x-axis in a polar plot but it doesn’t appear to be accepting it and plotting accordingly. My axis definition is quite simple:

<s:SciChartSurface.XAxis>
       <s:PolarXAxis Name="TFxAxis" MajorDelta="15"/>
</s:SciChartSurface.XAxis>

I am plotting angles and radii so one data point might be (45, 1) and the next (50, 2) and so on where my visible range is TFxAxis.VisibleRange = new DoubleRange(-180.0, 180.0). Very simple plot but it keeps returning to a default of 1 on my MajorDelta for the x-axis and then showing major axes at 50 degree intervals. I’ve tried a variety of solutions but nothing seems to work properly.
Thanks,
Christina

0 votes
0 answers
7k views

Hi,

I am having an issue with the SciChart graphs. I have attached an image – SciChartIssue.png, here which shows the issue. Our SciChart graph contains 8 channels of dataseries for EEG / EMG signals. By default the first channel is selected. When we select/deselect additional channels, they start showing up on the graph accordingly. The issue happens when a channel is de-selected. i.e. when any channel is de-selected, we are clearing that particular channel dataseries, while the other series is being appended and rendered using SuspendUpdates(). But on the graph, the waveform tends to move towards the extreme end of the chart (as seen from the image attached). we were initially using version 5.4 of Scichart. but i later updated it to v6.3, but still have the same issue.
If you are aware or have come across such an issue, then I would appreciate any help or advice from you. Since this is a vast and secure project, I am not able to share the entire code with you at this moment. However, I have attached a xaml & .cs file used to render the graph, If it helps.

Thanks!

0 votes
3k views

Hey Guys,

On a SciChart surface (CandleStickChart), how could I add LineAnnotation, BoxAnnotation, and TextBox annotation using TradingAnnotationCreationModifierMvvm (available under
ChartAnnotations/Trade Annotations sample). I have recreated a sample, based on the example.

Following is my XAML code,

Chart Surface: Modifiers.

<s:TradingAnnotationCreationModifierMvvm AnnotationViewModelType="{Binding DataContext.AnnotationCreationVM.AnnotationType, Source={StaticResource ROOT_OHLC_CHART_SPY}}"
                                                         AnnotationViewModelsCollection="{Binding LAnnotations}"
                                                         IsEnabled="{Binding DataContext.AnnotationCreationVM.IsAnnotationCreationEnable, Source={StaticResource ROOT_OHLC_CHART_SPY}, Mode=TwoWay}"
                                                         ReceiveHandledEvents="True">
                            <i:Interaction.Behaviors>
                                <ext:EventToCommandBehavior Command="{Binding DataContext.AnnotationCreationVM.AnnotationCreatedCommand, Source={StaticResource ROOT_OHLC_CHART_SPY}}"
                                                    Event="AnnotationCreated"
                                                    PassArguments="True" />
                            </i:Interaction.Behaviors>
                        </s:TradingAnnotationCreationModifierMvvm>

ParentView Buttons,

<ToggleButton Width="Auto" HorizontalAlignment="Stretch" Content="Line" 
                                  Style="{StaticResource ChartToggleButton}" 
                                  IsChecked="{Binding AnnotationCreationVM.Line}" 
                                  CommandParameter="{x:Type s:LineAnnotationViewModel}"/>
                    <ToggleButton Width="Auto" HorizontalAlignment="Stretch" Content="Elliot Wave"  Grid.Row="1"
                                  Style="{StaticResource ChartToggleButton}" 
                                  IsChecked="{Binding AnnotationCreationVM.EllioteWave}" 
                                  CommandParameter="{x:Type dt:ElliotWaveAnnotationViewModel}"/>
                    <ToggleButton Width="Auto" HorizontalAlignment="Stretch" Content="Pitch Fork" Grid.Row="2" 
                                  Style="{StaticResource ChartToggleButton}" 
                                  IsChecked="{Binding AnnotationCreationVM.PitchFork}" 
                                  CommandParameter="{x:Type dt:PitchforkAnnotationViewModel}"/>
                    <ToggleButton Width="Auto" HorizontalAlignment="Stretch" Content="Xabcd" Grid.Row="3" 
                                  Style="{StaticResource ChartToggleButton}" 
                                  IsChecked="{Binding AnnotationCreationVM.Xabcd}" 
                                  CommandParameter="{x:Type dt:XabcdAnnotationViewModel}"/>
                    <ToggleButton Width="Auto" HorizontalAlignment="Stretch" Content="Head N Shoulders" Grid.Row="4" 
                                  Style="{StaticResource ChartToggleButton}" 
                                  IsChecked="{Binding AnnotationCreationVM.Hns}" 
                                  CommandParameter="{x:Type dt:HeadAndShouldersAnnotationViewModel}"/>
                    <ToggleButton Width="Auto" HorizontalAlignment="Stretch" Content="Fibonacci Extension" Grid.Row="5" 
                                  Style="{StaticResource ChartToggleButton}" 
                                  IsChecked="{Binding AnnotationCreationVM.FibExt}" 
                                  CommandParameter="{x:Type dt:FibonacciExtensionAnnotationViewModel}"/>
                    <ToggleButton Width="Auto" HorizontalAlignment="Stretch" Content="Fibonacci Retracement" Grid.Row="6"
                                  Style="{StaticResource ChartToggleButton}" 
                                  IsChecked="{Binding AnnotationCreationVM.FibRetr}" 
                                  CommandParameter="{x:Type dt:FibonacciRetracementAnnotationViewModel}"/>

ParentView view model,

public ICommand AnnotationCreatedCommand => new ActionCommand<AnnotationCreationMVVMArgs>(e =>
    {
        try
        {
            var annotation = e.NewAnnotationViewModel;
            if (annotation != null)
            {
                if (annotation is ITradingAnnotationViewModel tradingAnnotation)
                {
                    ((AnnotationBase)tradingAnnotation.Annotation).Selected += OnAnnotationSelectionChanged;
                    ((AnnotationBase)tradingAnnotation.Annotation).Unselected += OnAnnotationSelectionChanged;
                }
                annotation.IsEditable = true;
                annotation.CanEditText = true;
                annotation.IsSelected = true;

                FibRetr = false;
                FibExt = false;
                Hns = false;
                Xabcd = false;
                PitchFork = false;
                EllioteWave = false;
                Line = false;
            }

            IsAnnotationCreationEnable = false;
            IsAnnotationDrawn = false;

            OnPropertyChanged("IsAnnotationDrawn");
        }
        catch { }
    });

    private void OnAnnotationSelectionChanged(object sender, EventArgs eventArgs)
    {            
        try
        {
            var parent = ((System.Windows.FrameworkElement)((System.Windows.FrameworkElement)sender).Parent).TemplatedParent;
            if(parent is SciChartSurface)
            {
                var surface = parent as SciChartSurface;
                if(null != surface)
                {
                    OHLCVChart chart = surface.DataContext as OHLCVChart;
                    Annotations = chart.LAnnotations;
                    SelectedAnnotation = Annotations.FirstOrDefault(x => x.IsSelected);
                }
            }                
        }
        catch { }        
    }

If there is any other way to club all Trading related annotations + TextBox, Line, TrendLine Annotations creation dynamically using any other modiefier, that will do. We are tying to build Trading charts: with Ability to add annotations.

Thanks.

0 votes
7k views

With fifocapacity(XyDataSeries), memory behaves like an image. (Repeat ups and downs)
Is this due to fifocapacity(XyDataSeries)?

Capture : x = minutes , y = MB

1 vote
4k views

Hello dear SciChart team,

Our customer has a new security program that starts on Dlls that are copied into a directory during runtime. At the moment has the customer the problem that this security program starts on an AbtLicensingNative.dll. This DLL is in the following directory:
% USERPROFILE% \ AppData \ Local \ SciChart \ Dependencies \ v.6.2.1.13304 \ x64.

For this reason the following questions:
Is this DLL safe?
Why is the dll only copied at runtime? Is there another solution for this?

best regards
Silvester

1 vote
7k views

SciChart is creating too much garbage objects/events* instead of reusing through pools (Analysis through dotMemory shows this). In complex applications this additional gc-pressure causes frequent lockups. (GC Pauses in 50-250ms+ range).

Top backtraces for GC-Problem:
– WeakEventTable.Purge
– Tick Rendering (TimeSpan, Strings)
– ProperyChangedEventManager.Purge

Top Types:
– WeakEventTable+EventKey
– HybridDictionary
– Double, String, TimeSpan
– Action

All of these top types/backtraces result directly from SciChart as we cross-verified with your 2D-Chart-Realtime-Series demo and by omitting the SciChart controls from our application. ( 2/3 of the total memory pressure comes from SciChart with even just 2 charts being present in our application, we see 5MB garbage memory traffic per 2 second, resulting in very frequent GC collections sporadically spiking into a high duration)

We currently use SciChart WPF V5, it seems SciChart WPF V6 Demo didnt fix this instead just using the LowLatency GC mode causing more frequent GC-collections causing worse overall performance in complex applications. (as we verfied in our application)

Is there plans to increase memory/object reuse/pooling and reduce events/actions? (70k allocations of events/actions for short time spans arent really understandable). What are those 70k events for simply rendering a chart with not much changing, see the attached image.

What settings/methods do you recommend to lower the Memory Pressure/WeakEvents resulting from SciChart usage?

What is the best rendering method to minimize GC pressure, we only require updates if new data becomes available through our application. Would it be manual?

Please comment

Thank you

0 votes
4k views

Hello,

On our SciChart’s XAxis we are using a NumericAxis and within the NumericAxis we bind to a LabelProvider. In the UI, this works perfectly and we get the XAxis appearing with the titles we desire (as strings writing over the numeric values 0, 1, 2, …). Meanwhile the YAxis doesn’t use any LabelProvider and stays numeric. The XAxis.LabelProvider is an IList of strings.

Although this works great in the UI, when I export the SciChart it does not pick up the LabelProvider and the exported image only contains the numeric values 0, 1, 2, … on the XAxis.

I do the export as following:

SciChartSurfaceBase.ExportToFile(filename, SciChart.Core.ExportType.Png, useXamlRenderSurface, exportedSize);

Is there a way to get the ExportToFile command to acknowledge the LabelProvider is there like it does with the UI?

Thank you!
Hannah

0 votes
9k views

Is it possible to plot a continuous vertical line as part of data point markers in line graph? I have used sprite to render text for data points. Now I want to draw a vertical line starting from data point till the peak apex to show which peak it is pointing to. The text labels in point markers are shifted to upward for some peaks to avoid collision and therefore there is a gap between peak apex and the point marker. So this requirement. I tried so far with OR symbol but it is displayed as a vertical dotted line when multiple OR symbols are placed one below another.

  • Anil Soman asked 3 years ago
  • last active 3 years ago
0 votes
9k views

Hi,
Is there a property in XAML to display series name of each FastLineRenderableSeries? TIA

0 votes
0 answers
7k views

Is it possible to show a continuous vertical line as part of Data PointMarker in graph? We have managed to show text labels for our peaks using Data Points and point markers. We have used Sprite to display the TextBlock with peak labels. Now we need to show a vertical line starting from the label text up to the tip of peak. For readability we have kept a vertical space between the data point and the peak label. Hence sometimes it becomes difficult to find which peak points to which peak label. However there is no character to represent a long and continuous line. The OR character shows dotted line. Is there any other control we can use inside the sprite to show as a line?

0 votes
7k views

Hi,

I have made the chart vertical by changing X axis alignment to left and Y axis alignment to bottom. After changing like this, im not able to resize the box annotation using all four resize adorners. Only two working, other two resetting Y1 value. below is the code snippet.

<s:SciChartSurface.Annotations>
     <s:BoxAnnotation
         x:Name="rangeBox"
         AnnotationCanvas="AboveChart"
         Background="Red"
         ClipToBounds="False"
         CoordinateMode="RelativeX"
         DragDirections="YDirection"
         IsEditable="True"
         Opacity="0.3"
         ResizeDirections="YDirection"
         X1="{Binding TopDepth, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
         X2="{Binding BottomDepth, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
         Y1="0"
         Y2="1"
         YAxisId="Top" />
 </s:SciChartSurface.Annotations>
 <s:SciChartSurface.XAxis>
     <s:NumericAxis
         AutoRange="Once"
         AxisAlignment="Left"
         AxisTitle="Depth [ft]"
         DrawMajorBands="False"
         FlipCoordinates="{Binding FlipYAxis}"
         TitleStyle="{StaticResource AxisTitleStyle}" />
 </s:SciChartSurface.XAxis>
 <s:SciChartSurface.YAxis>
     <s:NumericAxis
         AxisAlignment="Bottom"
         BorderBrush="DarkGray"
         BorderThickness="0,0,0,1"
         DrawMajorBands="False"
         DrawMajorGridLines="True"
         Id="Top"
         TickTextBrush="DarkGray"
         TitleStyle="{StaticResource AxisTitleStyle}" />
 </s:SciChartSurface.YAxis>

Can you please let me know what i’ve missed?

Thanks
-MK

  • Sync Kumar asked 4 years ago
  • last active 4 years ago
0 votes
7k views

Hi,

I am using in my chart a VerticalSliceModifer with a VerticalLineAnnotation.
It works as expected, but I would like to modify the aspect of my VerticalLineAnnotation by adding a marker on the axis on top of the line, exactly as in the attached picture (not a scichart).
Is there a way to do that ?

Best regards,
Jean-Charles Durand

0 votes
8k views

Hi,
Is it possible to show contour of bars in ColumnRenderableSeries3D?
Is there way to do this?

ColumnRenderableSeries3D has a Stroke property, but does not appear to have any effect on setting this property.

best regards
Silvester

0 votes
0 answers
6k views

I am rendering a HeatMap on WPF page using FastUniformHeatmapRenderableSeries which has 3 axes X, Y and Z. The Z values are represented with colors by defining the color palette and gradients. This works perfectly. Now there a need to define color palette in such a way that it will get applied to different parts of the map based on min and max value at that area of the map. To elaborate more, the Z values are basically representing peaks at different areas. So there can be multiple peaks distributed on the map.

What I need is that the top-most part of each peak should be shown in red color and then going down till its base with change in color like orange, yellow, green and blue based on certain range in %. The point to note here is, every peak can have its own min and max values. Peak 1 can start from Z=15 and end at Z=48 and peak 2 can start from Z=3 and end at Z=20. So the colors in the palette should get distributed equally for both these peaks. Top-most area of peak 1 and that of peak 2 should be having same color.
Is this possible in heat map? having say a conditional color palette based on multiple value ranges?

0 votes
10k views

Hi,

I am currently adding a Vertical Slice Modifier with just on Vertical Line inside of it.
The idea is to create a vertical cursor to display Y values for a given X value.
As my chart is a real time chart, I don’t want my cursor position changed expect on user interaction, I set to Relative the CoordinateMode property of my Annotation.

<s:VerticalSliceModifier Name="sliceModifier" ShowTooltipOn="Always" IsEnabled="True">
                    <s:VerticalSliceModifier.VerticalLines>
                        <s:VerticalLineAnnotation IsEditable="True" X1="0.5" Stroke="#D62D15" CoordinateMode="Relative"/>
                    </s:VerticalSliceModifier.VerticalLines>
                </s:VerticalSliceModifier>

The vertical line is correctly displayed at the centre of the surface but point markers and tooltips are not displayed at the line position, it seems the relative coordinate mode is not handle on this area.

Thanks for your help
Jean-Charles

0 votes
0 answers
7k views

I have created a composite annotation that consists of four elements: two VerticalLineAnnotations, a BoxAnnotation, and a TextAnnotation. When I first add the annotation, everything appears correctly. However, when I change between tabs in my TabControl… the BoxAnnotation disappears. The box will reappear when I move the composite annotation a few pixels.

Note: Calling ZoomExtents() or InvalidateElement() does not fix the issue.

I’ve created a simple app to reproduce the issue.

PeakAnnotation.xaml

<s:CompositeAnnotation x:Class="WpfPresentation.Views.PeakAnnotation"
                xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                xmlns:s="http://schemas.abtsoftware.co.uk/scichart"
                Canvas.ZIndex="1" 
                DragDirections="XDirection"
                ResizeDirections="XDirection"
                IsEditable="True">

<s:CompositeAnnotation.Annotations>
    <s:VerticalLineAnnotation CoordinateMode="Relative" Stroke="#FFBADAFF" StrokeThickness="2" X1="0" X2="0" Y1="0" Y2="1"/>
    <s:VerticalLineAnnotation CoordinateMode="Relative" Stroke="#FFBADAFF" StrokeThickness="2" X1="1" X2="1" Y1="0" Y2="1"/>
    <s:BoxAnnotation x:Name="box" Opacity="0.2" CornerRadius="2" Background="#FFBADAFF" BorderBrush="#1964FF" CoordinateMode="Relative" X1="0" X2="1" Y1="0" Y2="1"/>
    <s:TextAnnotation x:Name="AnnotationTextLabel" CoordinateMode="Relative" X1="0" Y1="0.95" FontSize="12" Foreground="White"/>
</s:CompositeAnnotation.Annotations>

PeakAnnotation.xaml.cs

public partial class PeakAnnotation : CompositeAnnotation
{
    public PeakAnnotation()
    {

    }

    public PeakAnnotation(string annotationText)
    {
        InitializeComponent();
        AnnotationTextLabel.Text = annotationText;
    }

    public string StyleKey { get; set; }

    public Type ViewType => throw new NotImplementedException();
}

MainViewModel.cs

public MainViewModel()
    {
        ChartTitle = "Testing";

        Annotations = new AnnotationCollection();

        var myAnnotation = new PeakAnnotation("My Annotation Title")
        {
            X1 = 40,
            X2 = 50,
            Y1 = 0,
            Y2 = 100
        };

        Annotations.Add(myAnnotation);
    }
    public string ChartTitle { get; set; }
    public AnnotationCollection Annotations { get; set; }
}

MainWindow.xaml

<Window x:Class="SciChartTesting.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:local="clr-namespace:SciChartTesting" xmlns:s="http://schemas.abtsoftware.co.uk/scichart"
    mc:Ignorable="d"
    Title="MainWindow" Height="450" Width="800">

<Window.Resources>
    <local:MainViewModel x:Key="MainViewModel"/>
</Window.Resources>

<Grid DataContext="{StaticResource MainViewModel}">
    <TabControl>
        <TabItem Header="TabOne">
            <Label Content="This is TabOne"/>
        </TabItem>
        <TabItem Header="TabTwo">
            <s:SciChartSurface ChartTitle="{Binding ChartTitle}" Annotations="{Binding Annotations}">
                <s:SciChartSurface.XAxis>
                    <s:NumericAxis VisibleRange="0,100"/>
                </s:SciChartSurface.XAxis>
                <s:SciChartSurface.YAxis>
                    <s:NumericAxis VisibleRange="0,100"/>
                </s:SciChartSurface.YAxis>
            </s:SciChartSurface>
        </TabItem>
    </TabControl>
</Grid>

0 votes
7k views

Hello,

I want to implement a custom deltaX cursor in my software. It consists in two vertical lines that can be moved be the user and the idea to get the delta x (DateTime) between the two lines.
I’ve started to implement it by using two custom VerticalLineAnnotation added to a VerticalSliceManager. As my chart is a real time chart, I don’t want my cursors postions changed exepct on user interaction, that’s why I set to Relative the CoordinateMode property of my two Annotations.
The display and the interaction works fine, but when I try to retrieve the actual position of one cursor to compute the delta I have some trouble to convert the relative position to a DateTime value.
I have override the OnDragDelta() method, the relative value of X1 is correct but when I try to convert it into a DateTime by using FromRelativeCoordinate, I still have Date in 1899. I also try to interpret this as OA Date but I still have wrong date.

Do you have an idea ?
Thanks

 public override void OnDragDelta()
    {
        if (_sciChartSurface.XAxis != null)
        {
            double dataValue = (double)this.FromRelativeCoordinate((double)this.X1, _sciChartSurface.XAxis);
            DateTime classic = new DateTime((long)dataValue);
            DateTime fromOa = DateTime.FromOADate(dataValue);
            Debug.WriteLine("CLASSIC "+ classic);
            Debug.WriteLine("OA "+ fromOa);
        }
    }
0 votes
5k views

On a small PC with only Intel HD Graphics 4600 the DirectX rendering is not supported by SciChart. Thats fine but it should use the fallback render surface.

<s:SciChartSurface 
  RenderPriority ="Low"
  s:VisualXcceleratorEngine.IsEnabled="True"
  s:VisualXcceleratorEngine.FallbackType="{x:Type s:HighQualityRenderSurface}"
  s:VisualXcceleratorEngine.DowngradeWithoutException="True"
  s:VisualXcceleratorEngine.EnableImpossibleMode="True"
  s:PerformanceHelper.EnableExtremeDrawingManager="True"
  s:PerformanceHelper.EnableExtremeResamplers="True"

I got this exception:

    System.Exception: Your GPU is blacklisted for use by the Visual Xccelerator Engine! There are several reasons why a GPU could belong to the blacklist. For example, low computation capabilities of the GPU could cause Timeout Detection and Recovery of Graphics Adapter Drivers by the OS, resulting in crashing the application.
   at SciChart.Charting.VisualXcceleratorEngine.ivc(DependencyObject t, DependencyPropertyChangedEventArgs u)
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)

But it should use HighQualityRenderSurface without any exception.

  • Tobias asked 4 years ago
  • last active 4 years ago
0 votes
7k views

Hi,
I’m experimenting with the LegendModifier and want to control which RenderableSeries are shown via the “LegendItemTemplate” approach. The idea is to add a specific tagging class to the RenderableSeries.DataSeries.Tag and use the content inside the LegendItemTemplate which I define in the Window.Resouces.

The tagging Class:

public class DataSeriesTag
{
    public string LegendText { get; set; }
    public bool ShowLegend { get; set; }
}

The LegendItemTemplate:
<Window.Resources>


<Grid.ColumnDefinitions>

</Grid.ColumnDefinitions>

            <!--<CheckBox Width="16" Margin="5,0,0,0"
                HorizontalAlignment="Left"
                VerticalAlignment="Center"
                IsChecked="{Binding RenderableSeries.IsVisible, Mode=TwoWay}"
                Visibility="{Binding RenderableSeries.DataSeries.Tag.ShowLegend, Converter={dxmvvm:BooleanToVisibilityConverter}}" />-->

            <s:PointMarker Grid.Column="1" Margin="5,0,0,0" Width="40" Height="10" VerticalAlignment="Center" HorizontalAlignment="Center"
              DataContext="{Binding RenderableSeries}"
              DeferredContent="{Binding LegendMarkerTemplate}"
              Visibility="{Binding ShowSeriesMarkers, RelativeSource={RelativeSource AncestorType=s:SciChartLegend}, Converter={dxmvvm:BooleanToVisibilityConverter}}" />

            <TextBlock Margin="5,0,5,0"
     Grid.Column="2"
     HorizontalAlignment="Left"
     Text="{Binding RenderableSeries.DataSeries.Tag.LegendText}" />

        </Grid>
    </DataTemplate>
</Window.Resources>

As long as I declare the SciChartSurface.ChartModifier in XAML, it works perfect.
The proplem raises when I bind the ModifierGroup to a ViewModel Property and try to build the LegendModifier there. How can I assign the LegendItemTemplate in the ViewModel?:

legendModifier = new LegendModifier(){
            ShowLegend = true,
            ShowVisibilityCheckboxes = false,
            LegendItemTemplate = ??????
        };
        TheModifiers.ChildModifiers.Add(legendModifier);

Kind regards
Martin

0 votes
4k views

Some customers are reporting the following exception when upgrading to SciChart v6.1.0.13075 or 6.1.1.13136 via NuGet

SciChartSurface didn't render, because an exception was thrown:
Message: Unable to find an entry point named 'CSharp_ResamplingArgs_InputSize_set' in DLL 'VXccelEngine2D'.

Stack Trace: at cnh.zlm(HandleRef dnc, Int32 dnd)
at SciChart.Charting2D.Interop.ResamplingArgs.set_InputSize(Int32 value)
at SciChart.Charting2D.Interop.ExtensionMethods.ToResamplingArgs(ResamplingParams resamplingParams, ResamplingMode resamplingMode, ResamplingArgs resamplingArgs)
at SciChart.Data.Numerics.PointResamplers.ExtremeResamplerBase`2.Execute(IList`1 xColumn, IList`1 yColumn, ResamplingParams resamplingParams, ResamplingMode resamplingMode, IPointSeries pointSeries)
at SciChart.Charting.Model.DataSeries.XyDataSeries`2.ToPointSeriesInternal(ResamplingParams resamplingParams, ResamplingMode resamplingMode, IPointResamplerFactory factory, IPointSeries lastPointSeries)
at SciChart.Charting.Model.DataSeries.DataSeries`2.ToPointSeries(ResamplingParams resamplingParams, ResamplingMode resamplingMode, IPointResamplerFactory factory, IPointSeries lastPointSeries)
at uqw.ttd(AxisCollection bzg, IRenderableSeries bzh, RenderPassInfo bzi, IPointResamplerFactory bzj, IDataSeries& bzk, IndexRange& bzl, IPointSeries& bzm, Int32& bzn, Boolean bzo)
at uqw.ttb(ISciChartSurface bzd, Size bze)
at uqw.RenderLoop(IRenderContext2D renderContext)
at SciChart.Charting.Visuals.SciChartSurface.DoDrawingLoop()

It could be a different exception message but ‘Entry Point not Found in VXccelEngine2D.dll’ is the similar message shown in the exception.

Solution below

0 votes
4k views

After installing the SciChart Licensing Wizard (for current user only), the Wizard hangs and does not display anything, which means I cannot activate the my license.

0 votes
9k views

Sorry for the simple question and please point me to the correct place if I have missed this in the docs.

I am just trying to easily bind the DataSeries of a FastLineRenderableSeries as a custom UserControl.

In my MainView I have placed the custom control:

<customUserControls:CustomLineChart x:Name="CustomLineChart1"
                                                    Grid.Column="1"
                                                    Grid.Row="0" />

My CustomLineChart.xaml is:

 <Grid>
    <sci:SciChartSurface x:Name="simpleLineChart">
        <sci:SciChartSurface.RenderableSeries>
            <sci:FastLineRenderableSeries x:Name="lineRenderSeries"
                                          Stroke="Blue"
                                          StrokeThickness="2" >
            </sci:FastLineRenderableSeries>
        </sci:SciChartSurface.RenderableSeries>

        <!--  Create an X Axis with GrowBy  -->
        <sci:SciChartSurface.XAxis>
            <sci:NumericAxis DrawMajorBands="True"
                             GrowBy="0.1, 0.1" />
        </sci:SciChartSurface.XAxis>

        <!--  Create a Y Axis with GrowBy. Optional bands give a cool look and feel for minimal performance impact  -->
        <sci:SciChartSurface.YAxis>
            <sci:NumericAxis DrawMajorBands="True"
                             GrowBy="0.5, 0.5" />
        </sci:SciChartSurface.YAxis>
    </sci:SciChartSurface>

    <!--ect.....-->

</Grid>

I am trying to figure out how to bind the UserControl lineRenderSeries.DataSeries property in my MainViewModel

So something like this in my MainView.cs:

public partial class MainView : Window
{
    public MainView(MainViewModel vm, IMainFactory mainFactory)
    {
        InitializeComponent();
        DataContext = vm;

        CustomLineChart1.lineRenderSeries.DataSeries = vm.SomeXyDataSeries;
    }
}

Which works if the SomeXyDataSeries is set prior to this object getting created and does not update because it is not bound

Or something like this in my MainView.xaml

<customUserControls:SimpleLineChart x:Name="CoreStrategyPLGraph"
                                                    Grid.Column="1"
                                                    Grid.Row="0" 
                                                    DataSeries="{Binding SomeXyDataSeries}"/>

I have just been having an issue understanding how to properly set up this binding on the UserControl.

Any input/clarification on how to do this would be great!

Thank you,

  • Leland asked 4 years ago
  • last active 4 years ago
0 votes
10k views

I’m using XyDataSeries<Timespan, double> to plot to my chart.

I want to show elapsed time at chart X-Axis label like below

ex) If Timespan value is 1day 2hour 30min 40sec

Default label style: 02:30:40

Label style I want: 26:30:40

How can I set like that?

0 votes
4k views

Hello,

Is there a corresponding Documentation for the 3D Chart like this one for 2D Charts: https://www.scichart.com/example/wpf-chart-example-series-with-metadata/

What I am trying to do is to make some PointMarkers of the ScatterRenderableSeries3DViewModel in the 3D Chart bigger depending on the PointMetadata3D.
For 2D Charts I could accomplish that with the Documentation mentioned above. Now I want to do the same for 3D Charts.

Can someone give me a hint how to do that?

Showing 51 - 100 of 185 results