Pre loader

Category: 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

2 votes
11k views

hello

I have problems with RolloverModifier while dataseries are UnsortedXyDataSeries. If I change to (sorted)XyDataSeries everything OK. I didn’t find any information in documentation that this modifier has such restriction.
Second question about sorted series: does Append(x,y) of XyDataSeries require to be last point of x range or it can append to any place of existing range?

2 votes
6k views

I would like to dynamically add and remove columns from a ColumnRenderableSeriesViewModel in code behind.

I am using MVVM and the SeriesBinding. I assigned a XyDataSeries<double, double> to the ColumnRenderableSeriesViewModel .DataSeries.

The chart initially draws all the bars for each item in the XYDataSeries, but If I append or remove one of them, the chart does not update and show the new bar or remove the old bar.

Here is my XAML:

        <s:SciChartSurface RenderableSeries="{s:SeriesBinding RenderableSeries}">
            <s:SciChartSurface.XAxis>
                <s:NumericAxis />
            </s:SciChartSurface.XAxis>

            <s:SciChartSurface.YAxis>
                <s:NumericAxis />
            </s:SciChartSurface.YAxis>
        </s:SciChartSurface>

And some of my view model:

using SciChart.Charting.Model.ChartSeries;
using SciChart.Charting.Model.DataSeries;
using System.Collections.ObjectModel;

namespace ChartExample {
    public class ChartViewModel {
        ColumnRenderableSeriesViewModel _seriesViewModel = new ColumnRenderableSeriesViewModel();
        XyDataSeries<double, double> _dataSeries = new XyDataSeries<double, double>();

        public ChartViewModel() {
            RenderableSeries.Add(_seriesViewModel);
            _seriesViewModel.DataSeries = _dataSeries;
        }


        public ObservableCollection<IRenderableSeriesViewModel> RenderableSeries { get; } = new ObservableCollection<IRenderableSeriesViewModel>();


        public void AddSeries() {
            _dataSeries.Append(_dataSeries.Count, _dataSeries.Count);
        }


        public void RemoveSeries(int seriesIndex) {
            _dataSeries.RemoveAt(seriesIndex);
        }
    }
}

Can you please tell me what I might be doing wrong?

  • Doug Witt asked 6 years ago
  • last active 6 years ago
2 votes
20k views

Hi,

I am trying to create a chart with additional information, similarly as discussed in this question:
https://www.scichart.com/questions/question/correlating-metadata-with-datapoints/
It works fine for simple information, such as enums, that I can cast into a double (see also the example provided in the question mentioned above).

However it seems that there is a restriction on the generic class XyzDataSeries.
Whenever I try to use a different data types for TY and TZ

XyzDataSeries<DateTime, double, int>

I get the following exception at runtime:

SciChartSurface didn’t render, because an exception was thrown:

Message: Das Objekt des Typs "Abt.Controls.SciChart.Wpf.StoreEditor1[System.Int32]" kann nicht in Typ "System.Collections.Generic.IList1[System.Double]" umgewandelt werden.

  Stack Trace:    bei Abt.Controls.SciChart.Wpf.NetworkResolver1.Execute(ResamplingMode resamplingMode, IndexRange pointRange, Int32 viewportWidth, Boolean isFifo, Boolean isCategoryAxis, IList xColumn, IList yColumn, Nullable1 dataIsSorted, Nullable1 dataIsEvenlySpaced, Nullable1 dataIsDisplayedAs2d, IRange visibleXRange)
   bei Abt.Controls.SciChart.Model.DataSeries.XyzDataSeries`3.ToPointSeries(ResamplingMode resamplingMode, IndexRange pointRange, Int32 viewportWidth, Boolean isCategoryAxis, Nullable1 dataIsDisplayedAs2D, IRange visibleXRange, IPointResamplerFactory factory)
   bei Abt.Controls.SciChart.Wpf.MethodManager.ListStream(AxisCollection urlAvailable, IRenderableSeries lockInitialized, RenderPassInfo valuesHeader, IPointResamplerFactory addressMap, IDataSeries& nextName, IndexRange& previousValues, IPointSeries& syncObjectHandle)
   bei Abt.Controls.SciChart.Wpf.MethodManager.ListStream(ISciChartSurface urlAvailable, Size lockInitialized)
   bei Abt.Controls.SciChart.Wpf.MethodManager.RenderLoop(IRenderContext2D renderContext)
   bei Abt.Controls.SciChart.Visuals.SciChartSurface.DoDrawingLoop()

Sorry for the german. The message translates to:

The object of type [...] cannot be casted into type [...]

I’m quite confused about this. It works nicely, if I use the same data types for TY and TZ .

XyzDataSeries<DateTime, double, double>
XyzDataSeries<DateTime, int, int>

This is not what I would expect from a generic type with three types.
If the types for Y and Z values need to be of the same type, the class should rather look something like this: XyzDataSeries<TX, TYZ>.
The API documentation does not mention anything about this. It only states that the types need to be IComparables, which seems not the full truth.

This is a problem for me, because I have more complex metadata than a double, which I want to reference over the Z value.
But I don’t want to use an index of type double. I’d rather use a GUID or even add the metadata object itself as Z value.

Is this by design or is this something that could be fixed in the future?

Do you have a suggestion how to best reference point related metadata (without having to implement my own DataSeries)?

2 votes
16k views

I have a situation where I need to have a lot of independent realtime charts rendered on the screen at the same time. I have put a scichart into a user control and that user control into a list so I can reuse my configuration.

Unfortunately, the behavior I am seeing is that when I have more than 5 charts, the charts stutter really badly. I’m using the SciChartPerformanceOverlay to determine what the FPS is of each of the charts.

I can see that in my 5 chart situation, if my mouse cursor is NOT over the window or NOT moving on the window, each chart has an FPS of ~18 for SciChartSurface and an FPS of >500 for Composition Target. When I start to move the mouse around on top of the window, the SciChartSurface FPS value drops to < 5 and the Composition Target drops to ~300.

I’ve got no mouse events hooked up, I’ve set TryApplyDirectXRenderer to true and it seems to accept it. I’ve double-checked the following values:

Direct3D10CompatibilityHelper.HasDirectX10CapableGpu: True
Direct3D10CompatibilityHelper.HasDirectX10RuntimeInstalled: True
Direct3D10CompatibilityHelper.IsSupportedOperatingSystem: True
Direct3D10CompatibilityHelper.SupportsDirectX10: True

I’m suspending the chart before adding points. Each chart only has 1000 points inside a XyDataSeries<int, double> that is databound to a FastLineRenderableSeries. I’m even using Update instead of Append to try to reuse the same memory, in case that makes a difference.

I’ve played with the MaxFrameRate and nothing seems to help.

My dev machine is a bit old and the graphics card is Intel-based, but I never imagined the performance would get so bad so quickly. I’m hoping there’s something I’m missing here as I’ve read such good things about SciChart.

Please let me know if there’s any advice.

Thanks

2 votes
14k views

Hi!

I would like to add a margin to the x-axis number so that they don’t stick on the axis anymore. See attached screenshot for detailed explanation.

Is that possible?

Best regards,
Joerg

2 votes
22k views

Hi I’m just wondering if there is anyway to force Y values to show up on the chart for all data points like a Histogram. I’ve attached screenshots to show what I would like the final screen to look like (ChartTest) so you have an idea. Hoping there is a way to force rollover to always show, or maybe have axis markers on the bottom that can display the y value at each x point. Hopefully you understand what I’m trying to achieve. Thanks.

  • Kohins asked 10 years ago
  • last active 6 years ago
2 votes
17k views

I’m trying out polar chart for my specific needs. In my scenario x-axis needs to display 0-360 (angle) values starting from bottom and going counter-clockwise so that 0 is at the bottom, 90 is at right, 180 is at the top and so on. Looking at polar chart default x-axis display it starts from right and go clockwise. Is there any way to change this behavior?

2 votes
17k views

Hi,
I have some XyDataSeries<DateTime, double> showing some data on my chart. Also I have 2 vertical line annotations (red and blue) where I know the two DateTime values.

Is there a effective way to get the double values between this range of each XyDataSeries.

Regarrds Markus

2 votes
6k views

Hi ,

I am currently using the DataPointSelectionModifier for StackedColumnRenderableSeriesViewModel and I am having an issue trying to have a single selection that is togglable.

I am currently not AllowingMultiSelection so the default value is SelectionMode.Replace, which, in case you click on the same column, it will deselect that column and then select it again. Is there a way around this?

Best Regards.

2 votes
18k views

Hi
I not really understand how i could display the X and Y value separated in a rolloverLabel?
In the example is always on value like Y.
Can you help me?

Thanks

  • Marcel asked 12 years ago
  • last active 10 years ago
2 votes
13k views

Hi There,

I work for a company where they use WPF SciChart alot in many applications.I am new bee to SciChart but I need to learn them in deep to meet our user requirements.So can you please let us know how can we get good command of sci charts.Are there any video tutorials? Are there any simple samples to start.

Regards,
Priya

  • priya asked 10 years ago
  • last active 10 years ago
2 votes
11k views

I’ve been trying to get SciChart to work with good performance and as part of my experimentation am trying to see how RenderPriority.Manual works. As far as I can tell, it doesn’t.

I haven’t been able to find much in terms of samples or docs. According to the little documentation here:
https://www.scichart.com/documentation/v4.x/SciChart.Charting~SciChart.Charting.Visuals.RenderPriority.html

It says

Manual — Never redraws automatically. You must manually call
InvalidateElement() or ZoomExtents() on the SciChartSurface in order
to get it to redraw

Now, when I try to call either of those functions on my SciChartSurface, nothing visually happens. I’ve tried other Invalidate methods as well, and still no refresh love.

I’ve attached the small sample application that repro’s the issue.

Please let me know what I’m doing wrong.

Thanks,
Brian

2 votes
12k views

Hi

This is a little snippet of my code

<s:SciChartSurface SeriesSource="{Binding ChartSeries}"
                   YAxes="{Binding YAxisCollection}"
                   XAxis="{Binding XAxis}"
                   Annotations="{Binding AnnotationCollection}"
                   s:HorizontalGroupHelper.HorizontalChartGroup="horizontalChartGroup">

I would like to be able to set throught my ViewModel the “syncWidthGroup” of the HorizontalChartGroup like this.

s:HorizontalGroupHelper.HorizontalChartGroup="{Binding ChartGroup}"

But an exception is thrown saying I can only bind to DP og DO.

    System.Windows.Markup.XamlParseException occurred
  HResult=-2146233087
  Message=A 'Binding' cannot be set on the 'SetHorizontalChartGroup' property of type 'SciChartSurface'. A 'Binding' can only be set on a DependencyProperty of a DependencyObject.
  Source=PresentationFramework
  LineNumber=14
  LinePosition=324
  StackTrace:
       at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
       at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
       at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
       at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
       at Sekal.DrillScene.Desktop.Application.Views.TrackView.InitializeComponent() in c:\dev\projects\SekalApplications\Client\Sekal.DrillScene.Desktop\obj\Debug\decoratedxaml\Application\Views\TrackView.xaml:line 1
       at Sekal.DrillScene.Desktop.Application.Views.TrackView..ctor() in c:\dev\projects\SekalApplications\Client\Sekal.DrillScene.Desktop\Application\Views\TrackView.xaml.cs:line 10
  InnerException: 

So how would I go about doing this through code and not xaml, as I use ViewModel first approach and ViewModels are dynamically appended to an Items collection? (Using Caliburn.Micro)

2 votes
6k views

Hi, I am currently working with the DataPointSelectionModifier with StackedColumnRenderableSeriesViewModel series. I currently am able to get the data point with the correct values whenever I click on a column but it seems that I am not able to change the selection fill of the column.

All I can seem able to do is changing the color of the whole series, but that is not what I am looking for.

Best Regards.

2 votes
21k views

Hi Guys

I am using an ItemsControl to display a collection of SciStockCharts. I want to be able to use a single SciChartOverview (not part of the Item Template) to set the visible range on all of the charts displayed in the ItemsControl. Is this possible and if so how would I go about achieving it.

Thanks in advance
Regards
Ian Carson

  • Ian Carson asked 10 years ago
  • last active 10 years ago
2 votes
0 answers
9k views

Hi SciChart-Team!

This is more a feature than a support request but I could not find a more suitable place for it.

One of the strengths of SciCharts is its ability to select – use case dependend – the most appropriate resampling technique for drawing from a wide variety of options. Currently I depict a 2-dimensional empirical probablity density function (PDF) with the heatmap. The best way for a sub-/resampling would be a kind of “Sum”-Mode to represent the new “Cell-Count” and to prevent the disappearance of strongly localized, concentrated PDF-spikes if the window is scaled down. Maybe it is possible to implement such a resampling mode for the heatmap in a future release?

Due to the lack of a “Sum”-Mode I tried to use “Max”-Mode to keep the PDF-Spikes visible after scaling down but that didn’t worked as I expected. Was my expectation wrong? I know I can do it by myself and recalculate the PDF for the new heatmap size, create a new Heatmap2DArrayDataSeries … etc. but it would be nice if it would work out of the box.

Thanks!

Janko

2 votes
9k views

Hello, I am currently importing and displaying a .obj file as a ObjectModel3D object similar to the following syntax of the code provided in the AddObjectsToA3DChart.xaml example:

object:ObjectModel3D TextureSource=”{StaticResource BlackTexture}” Source=”{StaticResource KnightLowObj3DSource}” Position=”0.0625, 0.6, 0.8125″ CoordinateMode=”Relative” Scale=”0.2, 0.2, 0.2″ Rotation=”{StaticResource ObjRotationState}”

Where ObjRotationState is : object:Rotation3D x:Key=”ObjRotationState” Axis=”YAxis” Angle=”180″

The above code excerpt sets the rotation angle at 180 degrees on the Y-axis only for the ObjectModel3D object.

However, I would like to set the rotation angle for the X, Y, and Z axis of the ObjectModel3D object at the same time. Is it possible to set the rotational angle for multiple axis as described? If not, are there suggested workarounds to achieve the same behavior?

Thank you for your assistance.

2 votes
12k views

Hello support team,

Im looking for a way to use keys to navigate through values in the graph. The rollover provides this easily with the mouse.
I include the rollovermodifier and the template I have. Do you have an idea how to do this? I just need to navigate left and right with the cursors. Any input or idea is extremely welcome.
Thank you very much for your great support

Marcel

2 votes
24k views

Hi,

Annotation chart sample Drag Horizontal Threshold allow us to draw custom controllable color for the data series. The same way I need to draw the chart surface background color. I couldn’t find the appropriate API to do this job. Could you advise how to draw surface background color.

Update:

Attached the graph image, I like to draw the grey and white backgrounds based on horizontal and vertical line positions.

Thanks.

2 votes
11k views

Good afternoon,

In the project Im working I need to save the annotations created so I can load generate them when the graph is generated.
I have tried to serialize them but maybe because its obfuscated I get an exception I try serialization:
There was an error reflecting type ‘Abt.Controls.SciChart.LineArrowAnnotation’
inner exception: There was an error reflecting property ‘InputBindings’.
Do you have an easy solution for this?

I would like to ask if its possible to have such a feature included, a method that would return the xml of the current state of the object.
or the list of minimum properties needed for annotation base:
X1, X2, Y1, Y2, YAxisId

then each different annotation type has different properties, thats why serialization would be extremely useful in this case.

Thank you for your attention

2 votes
14k views

Hi

Has anyone implemented or has any thoughts on how to implement keyboard shortcuts to zoom and pan? Something like key up/down/right/left to pan and shift+up/down/right/left to zoom?

2 votes
14k views

I want to have a BoxAnnotation where Y1 (- double.Infinity) and Y2 (+ double.Infinity). Basically I wanna specify only X1 and X2. And the behaviour must ensure always the box annotations Y1 & Y2 stretch to visible area even when I resize (zoomout) the chart.

In the screen shot its not stretched.

2 votes
5k views

After update to SciChart.6.2.1.13304 we get an InvalidOperationException:

    This SciChartSurface instance is disposed, you cannot set a RenderSurface on it at this time
System.InvalidOperationException: This SciChartSurface instance is disposed, you cannot set a RenderSurface on it at this time
   at SciChart.Charting.Visuals.SciChartSurfaceBase.OnRenderSurfaceDependencyPropertyChanged(DependencyPropertyChangedEventArgs e)
   at SciChart.Charting.Visuals.SciChartSurface.OnRenderSurfaceDependencyPropertyChanged(DependencyPropertyChangedEventArgs e)
   at SciChart.Charting.Visuals.SciChartSurfaceBase.eit(DependencyObject ph, DependencyPropertyChangedEventArgs pi)
   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.SetCurrentValue(DependencyProperty dp, Object value)
   at SciChart.Charting.VisualXcceleratorEngine.bov.nmx()
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

I have no idea what happen. This is how we initalize SciChart:

<s:SciChartSurface x:Name="sciChart"
                           Grid.Column="2"
                           RenderPriority ="Low"
                           s:PerformanceHelper.EnableExtremeDrawingManager="True"
                           s:PerformanceHelper.EnableExtremeResamplers="True"
                           s:VisualXcceleratorEngine.DowngradeWithoutException="True"
                           s:VisualXcceleratorEngine.FallbackType="{x:Type s:HighQualityRenderSurface}"
                           s:VisualXcceleratorEngine.AvoidBlacklistedGpu="False"
                           s:VisualXcceleratorEngine.EnableImpossibleMode="True"
                           s:VisualXcceleratorEngine.IsEnabled="{Binding Path=DirectXSupport, FallbackValue=True}"
                           s:SciChartGroup.VerticalChartGroup="{Binding Path=ChartViewModel.VerticalChartGroupKey}"
                           Style="{StaticResource SciChartSurfaceStyle}"
                           GridLinesPanelStyle="{StaticResource DefaultGridLinesPanelStyle}"
                           RenderableSeries="{s:SeriesBinding RenderableSeriesViewModels, UpdateSourceTrigger=PropertyChanged}">

Any idea?

  • Tobias asked 4 years ago
  • last active 3 years ago
2 votes
15k views

Hi,

Now that I’m binding to a SeriesSource instead of creating my RenderableSeries in XAML, I don’t know how to apply a RolloverMarkerTemplate.

In XAML I had the following:

                        <SciChart:FastLineRenderableSeries SeriesColor="Blue">
                            <SciChart:FastLineRenderableSeries.Style>
                                <Style TargetType="{x:Type SciChart:FastLineRenderableSeries}">
                                    <Setter Property="RolloverMarkerTemplate">
                                        <Setter.Value>
                                            <ControlTemplate>
                                                <Ellipse Width="7" Height="7" Fill="SlateGray" Stroke="SlateGray" StrokeThickness="1" />
                                            </ControlTemplate>
                                        </Setter.Value>
                                    </Setter>
                                </Style>
                            </SciChart:FastLineRenderableSeries.Style>
                        </SciChart:FastLineRenderableSeries>

But now I do something like this:

    _chartSeries.Add(New ChartSeriesViewModel(rawSeries, New FastLineRenderableSeries()))
            With _chartSeries(0).RenderSeries
                .SeriesColor = Colors.Blue
            End With

I’m able to set the SeriesColor = Colors.Blue in code, but I don’t know how to generate the RolloverMarkerTemplate to control other features such as the ellipse shape.

Thanks,
–George

2 votes
0 answers
11k views

Hi, we are updating our scichart component to version 5. Now we had to change our Series Binding which is obsolete now to RenderableSeries binding.

In the most graphs it works fine but I have also graphs that uses ElementName with paths for the binding and that does not work.

I tried the following versions which all did not work, is there a different way to do it?

<!-- old scichart version which is not allowed anymore-->
    <s:SciChartSurface Style="{StaticResource SciChartSurfaceStyle}" 
                       SeriesSource ="{Binding ElementName=GraphRoot, Path=Series}"
                       BorderThickness="1 0 0 0"
                       Background="Transparent">

<!-- First try with new version which is not working because we don't use seriesBinding-->
    <s:SciChartSurface Style="{StaticResource SciChartSurfaceStyle}" 
                       RenderableSeries ="{Binding ElementName=GraphRoot, Path=Series}"
                       BorderThickness="1 0 0 0"
                       Background="Transparent">

<!-- Second try with new version which is also not working -->
    <s:SciChartSurface Style="{StaticResource SciChartSurfaceStyle}" 
                       RenderableSeries ="{s:SeriesBinding ElementName=GraphRoot, Path=Series}"
                       BorderThickness="1 0 0 0"
                       Background="Transparent">

<!-- Last try with new version which is also not working becaus without ElementName he cannot find the Series-->
    <s:SciChartSurface Style="{StaticResource SciChartSurfaceStyle}" 
                       RenderableSeries ="{s:SeriesBinding Series}"
                       BorderThickness="1 0 0 0"
                       Background="Transparent">

Please is there any idea how to solve this?

2 votes
11k views

Hi guys,

I’ve been trying to select data points in my heat map for the whole without success. I’ve read, re-read and re-re-read the documentation, but I can’t figure out what I’m doing wrong.

Here’s the XAML.

...

<s:SciChartSurface.RenderableSeries>
    <s:FastUniformHeatmapRenderableSeriesForMvvm
        x:Name="heatmapSeries" 
        Opacity="0.9" 
        DataSeries="{Binding UniformHeatmapDataSeries}"
        s:DataPointSelectionModifier.IncludeSeries="True" >

        <s:FastUniformHeatmapRenderableSeriesForMvvm.ColorMap>
            <s:HeatmapColorPalette Maximum="60" Minimum="6">
                <s:HeatmapColorPalette.GradientStops>
                    <GradientStop Offset="0" Color="Transparent"/>
                    <GradientStop Offset="0.1" Color="DarkBlue"/>
                    <GradientStop Offset="0.2" Color="CornflowerBlue"/>
                    <GradientStop Offset="0.4" Color="DarkGreen"/>
                    <GradientStop Offset="0.6" Color="Chartreuse"/>
                    <GradientStop Offset="0.8" Color="Yellow"/>
                    <GradientStop Offset="1" Color="Red"/>
                </s:HeatmapColorPalette.GradientStops>
            </s:HeatmapColorPalette>
        </s:FastUniformHeatmapRenderableSeriesForMvvm.ColorMap>

        <s:FastUniformHeatmapRenderableSeriesForMvvm.PointMarker>
            <s:XPointMarker Fill="Pink" Width="5" Height="5"/>
        </s:FastUniformHeatmapRenderableSeriesForMvvm.PointMarker>

        <s:FastUniformHeatmapRenderableSeriesForMvvm.SelectedPointMarker>
            <s:TrianglePointMarker Fill="White" Width="12" Height="12"/>
        </s:FastUniformHeatmapRenderableSeriesForMvvm.SelectedPointMarker>

    </s:FastUniformHeatmapRenderableSeriesForMvvm>

    ...

</s:SciChartSurface.RenderableSeries>
...

Here’s the MVVM code.

...
class SelectedPointMetadata : IPointMetadata
{
    public bool IsSelected { get; set; }

    public event PropertyChangedEventHandler PropertyChanged;
}
...

double[,] heatMap = new double[heatMapHeight + glowRadius * 2, heatMapWidth + glowRadius * 2];
double[,] glowMatrix = this.getGlowEffectMatrix(glowRadius);

SelectedPointMetadata[,] selectablePoints = new SelectedPointMetadata[heatMapHeight + glowRadius * 2, heatMapWidth + glowRadius * 2];

for (int i = 0; i < spectrogram.SpectrogramAtoms.Count; i++) {
    var atom = spectrogram.SpectrogramAtoms[i];
    int x = Math.Min((int)(atom.Frequency.Hertz / frequencyStep) + glowRadius, heatMapHeight - 1);
    int y = Math.Min((int)(atom.Time.Seconds / xStep) + glowRadius, heatMapWidth - 1);
    this.applyEffectMatrix(x, y, atom.SNR, ref heatMap, ref glowMatrix, glowRadius);

}

var xBound = heatMap.GetLength(0);
var yBound = heatMap.GetLength(1);

Random rnd = new Random();

for (var i = 0; i < xBound; i++)
{
    for (var j = 0; j < yBound; j++)
    {
        var x = rnd.Next(1, 10);

        selectablePoints[i, j] = new SelectedPointMetadata() { IsSelected = false };

        if (x == 5)
        {
            selectablePoints[i, j].IsSelected = true;
        }

    }
}

this.UniformHeatmapDataSeries = new UniformHeatmapDataSeries<double, double, double>(
    heatMap,
    (-xStep * glowRadius),
    xStep,
    (-frequencyStep * glowRadius),
    frequencyStep,
    selectablePoints
    );

...

What am I missing?

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

1 vote
2k views

Is there any way Gantt Chart be plotted based on the dynamic data.
The example https://www.scichart.com/example/wpf-chart/wpf-chart-example-gantt-chart/ shows plotting Graph using predefined data loaded through constructor.
In the same example if a new item is added dynamically to the Item Collection in the View-Model it should reflect in the Graph.

Also how to plot the graph if a single project has multiple timeline.

  • Santhosh M asked 2 years ago
  • last active 2 years ago
1 vote
2k views

How is it possible to sync SciChart with a ListView? The vertical chart grid should be the same width as the list view columns. A ScrollBar or a Chart-Overview should be used for synchronous scrolling of the X-axis and the ListView.

  • Tobias asked 2 years ago
  • last active 2 years ago
1 vote
5k views

Hello SciChart team,

I wanted to implement 3DSelectionModifier that should select a point closest to the mouse pointer per mouse click.

To do this, I create a rectangle with a clicked point in the center with a mouse click and use the PickScene method of the ViewPort3D object.

List<EntityVertexId>? entityVertexIds = Viewport3D.PickScene(mousePoint.ToRectCenter(30));

Depending on the camera angle It can of course happen that several points appear in the scene. In this case I wanted to do the following:

for each determined point in 3D space, determine its 2D screen coordinates

HitTestInfo3D hitTestInfo = new HitTestInfo3D() { IsHit = true, EntityId = entityVertexId.EntityId, VertexId = entityVertexId.VertexId };
SeriesInfo3D? seriesInfo = pointsEntity.ToSeriesInfo(hitTestInfo);
//Vector3D hitVertex = seriesInfo.HitVertex; 
Vector3 vertex = seriesInfo.HitVertexCoords; 
Point point1 = ParentSurface.Camera.WorldToScreenSpace(vertex); 

Determine the distance between the point of the mouse and the 2D coordinates of the point from the scene

double newDistance = PointUtil.Distance(mousePoint, point1);

Select the point with the shortest distance.

if (distance.IsNaN() || newDistance < distance) 
{   
  distance = newDistance;   
  nearestSeriesInfo3D = seriesInfo; 
}

During the implementation I encountered the following problem:
I used following camera object method first

Point p = ParentSurface.Camera.WorldToScreenSpace(vertex);

but this gave me no plausible point.
The other method

Point p = ParentSurface.Camera.LocalCoordinateToScreenSpace(vertex);

also seemed to return a point that returned the wrong value when calculating the distance, so the wrong point was selected.

If I try to click the data point directly, I expect at least one of the methods to return a point very very close to the mouse pointer. However, both methods gave me a point on the screen (see screenshot) that did not match the mouse point.

Maybe I’m missing a step or transformation. Could you explain me what I’m doing wrong?

Example project is attached

1 vote
18k views

Hello,

I am evaluating the possibility to use SciChart for our corporate project, and now trying to create a series using data binding, strict MVVM (no code in code behind). The data we have are provided as an ObservableCollection, and the series would need to use the property “SomeKey” for X-Axis value, and the property “SomeValue” for the Y-Axis. Is it possible to do this, and if yes, then how?

Best regards
Petr Osipov
Rohde & Schwarz

1 vote
5k views

Hello

In Tutorial 06b – Realtime Updates, I want change the <s:SciChartSurface.XAxis> from <s:NumericAxis/> to <s:DateTimeAxis/> . I have tried a lot, but it still doesn’t work.

Could you please help me to do this work.

Thank you very much.

  • Zhi Zhang asked 8 months ago
  • last active 8 months ago
1 vote
5k views

Hello,

Normally, if I have a ScichartSurface with a X- and Y-Axis, were both axis AutoRange- properties are set to Always, the surface displays the entire data by adjusting the Visible ranges of the axis after new data has been appended.

This also works if there are multiple Data-Series on the ScichartSurface.

In my case, I have two FastLineRenderableSeries on my Surface. Each of them receiving new data via the Append-function while the x- and y-axis are continuously adjusted automatically to display all the datapoints of both Datasets.

So far so good…

But what would I have to do if I wanted one of the two Datasets to be ignored by the Autorange properties of the x- and y-Axis?

I have already tried to set the X- and YAxisID of one dataset to null, hoping I could make both axis ignore this Dataset while they are adjusting their Visible ranges. However, this only led to error messages.

I could also try to write my own ViewPortManagers and overwrite the OnCalculateNewXRange and OnCalculateNewYRange funvtions, but that seems a little bit excessive.

Is there an easy way to achieve the desired behavior?

Thanks.

1 vote
880 views

Hello,
I’m attempting to build one of the WPF examples on a machine that has no internet access. I get the error mentioned in the title. When I exported the project, I selected the “Installation Folder” option rather than the “NuGet Package”.

How can I fix this error?

Thanks, Brett S.

1 vote
10k views

‘Hi i get a weird problem:

The type or namespace name ‘XyDataSeries’ could not be found (are you missing a using directive or an assembly )

I also get the error with IChartSeriesViewModel, FastLineRenderableSeries and IXyDataSeries

1 vote
16k views

Hi

In terms of a oscilloscope for instance you can calculate what the time per division (time/div) is for the y-axis and the volts per division for the x-axis. This changes when you zoom in and out.

My question is how can I calculate these in the simplest way possible to calculate the volts per division according to the current zoom level?
You will obviously have inputs of the start frequency and amplitude when the application start or whenever these inputs changes on the units side.
But when you zoom in and out depending on whether you are zooming the y-axis or x-axis or both the time / div and volts / div needs to be calculated.

Thanks a lot Gert

  • Gertdt76 asked 10 years ago
  • last active 10 years ago
1 vote
13k views

Hi Scichart,

I am struggling with a ContextMenu on a SciChartSurface that wont be displayed.

The problem started when i added mouse panning with the right mouse-button which is the same button the ContextMenu is activated on.

So will this combination even work – with both a ContextMenu and mouse panning with the right mouse button?

To manually validate if the ContextMenu should open or if the panning should be enabled, I have tried to get the mouse coordinates manually in C# to see if the mouse was moved(panning) or if it was a click(ContextMenu). This did not work very well when i afterwards started to pan/zoom again.

Do you have a code example using both a ContextMenu and mouse panning using right mouse button?

Best regards,
Jeppe

1 vote
10k views

Hello All,

i draw in real time my curve and i want added a line(For exemple Y=0.055) in my chart (like my picture)!
it’s possible to draw in Scichart a serie (line) when you make just the Yvalue like my picture i want just identify the Y=0,055 ?

how can i did this with scichart ?
Thank You
Best Regards,
Sahar

  • sahar Les asked 9 years ago
  • last active 9 years ago
1 vote
17k views

I would like to show the Y values of the slice on a special panel. So far I have not yet found out how to disable the tooltips that appear next to the annotation line. I have tried to add a ToolTipOpening handler to the anntotated line, to the modifier and to the chart surface but it does not get called.

What should I do?

1 vote
11k views

I would like to define two FastHeatMapRenderableSeries.ColorMap s. One in black and white for printing and the other one, … Why not just for the fun of it :D. How would I be able to switch between ColorMaps ( preferably through binding ) in wpf?

  • Michel Moe asked 9 years ago
  • last active 9 years ago
1 vote
9k views

hi,
Guys i have a requirement to make a chart name volume by price please see the attachment image.
can we make this kind of charts .
Thanks in advance.

1 vote
10k views

Hello everybody! I’m working with FastMountainrenderableSeries, I need to paint them particularly:
I have got an annotation, that can be moved, and area of renderable series. The area, that is above the annotaion, must be painted with one color, and area below the annotation must be painted with another (see image 1). I know, that it can be done with FastBandRenderableSeries, but I don’t need to have two series. Is there any way to do this with FastMountainSeries or FastBandRenderableSeries and annotation, without extra auxiliary renderable series ?

Thanks in advance.

  • Egor asked 9 years ago
  • last active 7 years ago
1 vote
13k views

I’m trying to create a chart where the visible range is scrolling “window” that advances ahead of the most recent data point when the data hits the edge so that the line is always moving from the center of the chart towards the edge.

Say we have data coming in once a second, we want the window to be 60 seconds wide and advance in increments of 30 seconds. In SciChart terms, we would begin with a data range of 0-0 and a visible range of 0-60. The line will start at the left edge of the chart and, as points come in, advance towards the right edge. When we get a point at t=60, we will programmatically advance the visible range by our increment so that we have a data range of 0-60 and a visible range of 30-90. The line will now be advancing from the middle of the chart to the right edge. When we hit t=90, we will advance the visible range again so data range = 0-90, visible range = 60-120. Again the line will advance from the center of the chart to the edge. And so on.

My current problem is the scrollbar. If I have a data range of 0-90 and a visible range of 60-120, the total extent of the chart as far as a normal viewer is concerned is 0-120. The scrollbar should reflect that, and the bit of the scrollbar that indicates the visible section should take up half its total width (0-60 being in the past and 60-120 being visible). Instead, the scrollbar is sized as though 0-60 is in the past and 60-90 is visible. Touching the scrollbar at all will, in fact, set the visible range to 60-90, re-rendering the chart and eliminating our buffer of visible space to the right. My question is how do I fix this behavior so that the scrollbar is aware of the “real” range of the chart which is neither data range nor visible range but a combination of the two?

1 vote
13k 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-dev.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?

  • Azrin Sani asked 8 years ago
  • last active 8 years ago
1 vote
0 answers
6k views

Hello folks,

I am currently evaluating your charting capabilities, and am very pleased with what I see so far. One of our requirements, however, appears to be a struggle for your software. I am hoping you will show me the light!

We generate measurements of acoustic data into a 2 dimensional array of bytes in a file on disk. This file could be very large, potentially 2^17 x 2^17 bytes (128k x 128k or 17GB) We would like to be able to display them via a heatmap.

To test the functionality, I generated a byte[10k,10k] in memory and gave it to the Heatmap series with a simple gradient brush with 2 stops, 0=White, 1=Black. The gray scales render beautifully, and quite snappy too.

Obviously, the real data is too large to store in a [,] structure in memory. However, it appears that the only API to your heatmap requires the [,] architecture. So my question is this: am I missing something? Is there a virtualized mechanism for handling large datasets, such as a callback mechanism or the like? And assuming not (I think have done some pretty exhaustive exploration), what would be your recommended approach?

Thank you in advance for your response,
Mike.

1 vote
7k views

Dear all, I am trying to export a heat map that I have generated that you can see at the right side of the attached image. However, the resulting XPS generated is the figure at the left. As one can see they are not very similar as one would expect. I have checked my code, but can’t seem to find the problem. Parts of my code are shown here to give more info. If anyone has tips why this strange result may occur , let me know please.

 <s:SciChartSurface x:Name="sciChart"  ChartTitle="Carbon and DBE">


       <s:SciChartSurface.RenderableSeries>
           <s:FastHeatMapRenderableSeries x:Name="heatmapSeries" Opacity="0.5" Maximum="100">
               <s:FastHeatMapRenderableSeries.ColorMap>
                   <LinearGradientBrush>
                       <GradientStop Offset="0" Color="DarkBlue"/>
                       <GradientStop Offset="0.2" Color="CornflowerBlue"/>
                       <GradientStop Offset="0.4" Color="DarkGreen"/>
                       <GradientStop Offset="0.6" Color="Chartreuse"/>
                       <GradientStop Offset="0.8" Color="Yellow"/>
                       <GradientStop Offset="1" Color="Red"/>
                   </LinearGradientBrush>
               </s:FastHeatMapRenderableSeries.ColorMap>
           </s:FastHeatMapRenderableSeries>

       </s:SciChartSurface.RenderableSeries> .
    </s:SciChartSurface>

and code

    double[,] a = x.Normalized2DArray(100);
                    Heatmap2DArrayDataSeries<double, double, double> heatmap = new Heatmap2DArrayDataSeries<double, double, double>(a, ix => (double)ix * x.binSizeX, iy => (double)iy * x.binSizeY);
                      heatmapSeries.DataSeries = heatmap;
          sciChart.ExportToFile(@"C:\Temp\chart.xps", ExportType.Xps, true, new Size(2000, 2000));
1 vote
8k views

I have created a 3D surface mesh successfully and now I want to plot a data series on the mesh. The inputs to the data series are 2D (X,Y) with the Z axis value always being directly on the mapped 3D surface point at the specified X,Y position.

I am trying to populate a XyzDataSeries3D() collection like so…

var xyzData = new XyzDataSeries3D();
xyzData.Append(x, y, z);

How to I determine the Z value given I have the X and Y values? Is there a built-in method for determining this or do I need to do it myself?

Thanks.
Gareth.

1 vote
0 answers
12k views

Tooltips from my TooltipModifier were being clipped at the SciChartSurface’s boundaries when they were long, which I didn’t like. I poked around a bit and discovered SciChartSurface.ClipModifierSurface. After setting this to false, the tooltips were allowed to spill over the boundaries as desired. Yay! However, certain elements including (but perhaps not limited to) the GridLinesPanel’s border lines and gridlines from adjacent plots end up rendering on top of the tooltip (see screenshot; it’s showing two surfaces stacked vertically, with a tooltip from the top one spilling over onto the one below it). Is there anything I can do to prevent this? Things that didn’t work were using a custom TooltipContainerStyle with the new container’s opacity set to 1.0 and its Panel.ZIndex to 100.

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

such as,
SciChartSurface didn’t render, because an exception was thrown:
Message: Object reference not set to an instance of an object.

Stack Trace: at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length)
at SciChart.Data.Model.Values1.qui(Int32 tht)
at jrj.ResampleInternal(Values
1 resampledXValues, Values1 resampledYValues, Vectori resampledIndices, Double[] xValues, Double[] yValues, ResamplingArgs args)
at SciChart.Data.Numerics.PointResamplers.ExtremeResamplerBase
2.dlq(IList1 hxl, IList1 hxm, IPointSeries hxn, ResamplingArgs hxo, DoubleRange hxp)
at SciChart.Data.Numerics.PointResamplers.ExtremeResamplerBase2.Execute(IList1 xColumn, IList1 yColumn, ResamplingParams resamplingParams, ResamplingMode resamplingMode, IPointSeries lastPointSeries)
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 jfw.dxn(AxisCollection cax, IRenderableSeries cay, RenderPassInfo caz, IPointResamplerFactory cba, Boolean cbb, IDataSeries& cbc, IndexRange& cbd, IPointSeries& cbe, Int32& cbf)
at jfw.dxl(ISciChartSurface cat, Size cau, Boolean cav)
at jfw.RenderLoop(IRenderContext2D renderContext)
at SciChart.Charting.Visuals.SciChartSurface.DoDrawingLoop()

  • YXJ YXJ asked 3 years ago
  • last active 3 years ago
Showing 51 - 100 of 3k results