Pre loader

Forums

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

Hi guys,

I’m tackling a difficult problem in my solution here. Our chart will allow users to add as many as 50 different series at any one time.

As well as this – the user will be able to specify the RenderableSeries (Chart Type) of each of these between; column, line and mountain.

One solution is to replicate the method found in your own SciChart SciTrader demonstration (in which each type of RenderableSeries is added to the xaml once for each data series, they share a DataSeries and then the Visibility property within the style is managed to only show the one the user requests), but this would require 150 (50 placeholders for 50 possible series * 3 definitions per series) definitions of different RenderableSeries, each with their own Style defined.

Is there any way to create a custom RenderableSeries that extends BaseRenderableSeries and add a DependencyProperty that allows a binding from the xaml to modify the type of RenderableSeries that is displayed?

Even better – is there a way to add RenderableSeries using MVVM (I noticed the add/remove dynamic series tutorial has a note to standby for such a tutorial). I will attempt to find a solution by going down this path as it sounds much less verbose.

Thanks in advance for all your help!
Miles

  • bstapylton asked 11 years ago
  • last active 7 months ago
2 votes
10k views

Hi, I’m trying to just create a simple WPF MVVM application that binds to the ViewportManager and add series dynamically. The data range (X and Y) will vary and I’d like to zoom to fit after a new series is added. Seems simple, but I cannot get it to work. I’ve tried calling ZoomExtents on a bound DefaultViewportManager as well as InvalidateElement() and InvalidateParentSurface(RangeMode.ZoomToFit) and they all have no affect. I was assuming I was doing something wrong, but if you try the WPF demo/sample application it does the same thing. If you go to 2D Charts -> MVVM Examples -> Manipulate Series MVVM, there is a call to AnimateZoomExtents that doesn’t work either after you add a series. You still have to double click on the graph after clicking the plus button to make it fit the graph. I just want to zoom to fit the data and not use code behind. The functionality is clearly there because if you define <s:ZoomExtentsModifier ExecuteOn="MouseDoubleClick"/> it works perfectly, so how do I force that to happen from my view model? Thank you!

  • Andy None asked 7 years ago
  • last active 7 years ago
2 votes
8k views

Since many of the modifiers throw an exception if there isn’t exactly 1 primary axis, is there a built-in controller to maintain that?

I ended up having to put an event on all created axes to check if IsPrimaryAxis changes to True.
If it does, then it goes through all the surfaces other axes and sets the others to False.
Without this, the modifier.XAxis get accessor function throws an exception saying either “too many items found” or “no items found” while looking for the single primary axis.

I have a small sample I can include that demonstrates this, but this seems like I’m just missing something simple…

Thanks!

  • dwoerner asked 9 years ago
  • last active 9 years ago
2 votes
10k 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
11k views

Hi, in the Dynamically Create Annotations demo, the method on how annotations are created is by (for example a line):

1) First Click on the annotation button
2) Click on the SciChart Surface. This creates the first point of a line
3) Click again on the end point of the line.

Instead of having to do two clicks, is there a way to click and drag instead? eg.

1) First Click on the annotation button
2) Click on the SciChart Surface. This creates the first point of a line
3) drag to the end point of the line.

I just want to mimic Microsoft power point behaviour as our users are more familiar with it.

Thanks

  • Azrin Sani asked 9 years ago
  • last active 1 year ago
2 votes
8k views

From your documentation:

4.9 Annotations

SciChart features a rich Annotations API, that allows you to place UIKit UIElements over the chart.
SciChat provides a number of built-in annotations, but you can also create your own.

SCIBoxAnnotation, SCILineAnnotation and SCITextAnnotation are cool, but sometimes it’s not enough.

Is it possible to render UIView on the chart (at least UIImage)?
Is it possible to draw dashed line annotation?
Could you provide an example of creating custom annotation class?

2 votes
11k views

I am using the SciChart control to render real-time data as it arrives from a data source. This source could be producing data many times per second. New values are appended to the series. If I leave my application running for a long time, the data series gets very long and rendering slows down. I can remove data points from the series when they are older than the VisibleRange and that certainly helps.

My problem is that the user might set the VisibleRange to span several days. If the data source is sending data at 10Hz then that would be 6 million data values per week, redrawing at 10Hz, which I guess will cause some CPU loading. I would like to be able to remove intermediate data from the series if new data being appended to the series would render in the same horizontal pixel as the previous data and is neither the maximum nor minimum Y value at that pixel. In order to do that I need to be able to examine the DateTime of the incoming value and determine its X pixel, then walk back through the existing data to see if it would be visible if rendered (in a new X pixel, or a new min or max in the same pixel as the previous value).

So, finally, to the question: Is there a method for determining the X,Y pixel coordinate for a give X and Y value?

  • asthomas asked 11 years ago
  • last active 9 years ago
2 votes
14k views

Hello,

based on your sample Screenshots, XPS Printing, X-Axis Text Labels i render a offscreen SciChart and copy it to the clipboard. It seems to works, but the Axis labels of X and Y axes are at the wrong positions (they are all at the same position). Please see the sample attached.

Many thanks,
Robin

2 votes
14k 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
0 answers
10k 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
13k views

Hi folks,

I haven’t been able to produce scatter charts using a XyScatterRenderableSeries. To demonstrate, I took a sample project you sent me earlier and replaced one line as shown below:

_chartSeries = new ObservableCollection<IChartSeriesViewModel>();
//var renderableSeries = new FastLineRenderableSeries { SeriesColor = Colors.BlueViolet};
var renderableSeries = new XyScatterRenderableSeries { SeriesColor = Colors.BlueViolet};
_chartSeries.Add(new ChartSeriesViewModel(ds0, renderableSeries));

With the original FastLineRenderableSeries, I see the chart. But with XyScatterRenderableSeries, the data does not appear. (Annotations remain visible, of course.)

Am I doing something wrong, or does the ChartSeriesViewModel not work with scatter charts?

Thanks,
–George

  • yefchak asked 11 years ago
  • last active 9 years ago
2 votes
5k 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 5 years ago
  • last active 5 years ago
2 votes
4k 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 3 years ago
  • last active 3 years ago
2 votes
12k views

I’m new to SciCharts, so this might be a terminology issue or something like that.

I’m trying to add a vertical line annotation to my chart that the user can drag around. So far so good. However, I’d like it to also display the values of the series data the line intersects with. This is where I’m unsure of the best way to proceed. What I want is basically the behavior of the RolloverModifier, which displays tooltips when it intersects with series data, but it’s always visible rather than triggered by a rollover. It may be possible to use the RolloverModifier for this, but I ran into an issue where I couldn’t have both a VerticalLineAnnotation with IsEditable=true and a RolloverModifier, and I need to add another VerticalLineAnnotation in addition to this one.

Any advice?

Hopefully I just missed something in the documentation.

2 votes
11k views

Hi,

I’ve got a chart with several XyScatterRenderableSeries and I want to add functionality to switch between Logarithmic and normal Numeric axes. Could you please let me know the best approach to do that?

Thanks & Regards,
Charith

2 votes
10k views

I am implementing a feature to load more historical data when users pan to the left side on a CategoryDateAxis.
To load more, i need to have 2 Date which is the earliest data point i have and the Date that is shown on the X-Axis

For the earliest data point, i can get via IXyDataSeries#getXMin()
But for the other Date, i’m not sure how to get it. I can listen to range changes via IAxisCore#VisibleRangeChangeListener, but the range returns Double. I cant figure out to convert it into a Date

  • abc def asked 7 years ago
  • last active 7 years ago
2 votes
4k views

var lineData = new XyDataSeries<DateTime, double>();

if I have a XyDataSeries<DateTime, double> then I can get the sweeping animation to work. If I change the XyDataSeries to XyDataSeries<DateTime, int> it fails to produce the chart and gives an exception stating

SciChartSurface didn’t render, because an exception was thrown:
Message: Specified cast is not valid.

Stack Trace: at SciChart.Charting.Visuals.RenderableSeries.Animations.Transformations.Point2DSeriesTransformation1.SweepTransform(T pointSeries, Double currentProgress)
at SciChart.Charting.Visuals.RenderableSeries.Animations.Transformations.Point2DSeriesTransformation
1.O(IPointSeries D, Double I)
at SciChart.Charting.Visuals.RenderableSeries.Animations.SweepAnimation.Animate(IRenderPassData rpd, Double currentProgress)
at SciChart.Charting.Visuals.RenderableSeries.Animations.SeriesAnimationBase.OnRender(IRenderPassData rpd)
at SciChart.Charting.Visuals.RenderableSeries.BaseRenderableSeries.WFB(IRenderContext2D D, IRenderPassData I)
at A.IJ.T(ISciChartSurface D, RenderPassInfo I, IRenderContext2D J, Int32 M)
at A.IJ.M(ISciChartSurface D, RenderPassInfo I, IRenderContext2D J)
at A.IJ.RenderLoop(IRenderContext2D renderContext)
at SciChart.Charting.Visuals.SciChartSurface.DoDrawingLoop()

Is this possible or does yaxis have to be a double? If I use fade animation it works properly. Thanks.

  • John asked 4 years ago
  • last active 4 years ago
2 votes
11k views

I’m currently using the MouseWheelZoomModifier to allow the user to zoom into charts (XyDirection=”XYDirection”), but I’ve now had a request to provide an way for the user to zoom X only, Y only, or both. I realise it’s possible to change the XyDirection property (e.g. using checkboxes, like in your demo), but the PM is asking if a more “user friendly” solution is possible.

One option might be to change the zoom direction based on where the mouse is, e.g. if it’s over the X-axis then zoom X only, over the Y-axis then zoom Y only, otherwise zoom XY.

Another option may be to use modifier keys, e.g. wheel + Ctrl = X only, wheel + Shift = Y only, wheel on its own = XY.

Can you offer some pointers towards a suitable solution, if such a thing is possible? Ideally it would be nice if I could implement a customer modifier, if it’s not too complicated, rather than combining the out-of-the-box modifier with mouse events.

  • andyste1 asked 10 years ago
  • last active 7 years ago
2 votes
13k views

attachment is one type chart used in our product. could the sciChart implement this functions?

great thanks.

  • darkgone asked 11 years ago
  • last active 8 years ago
2 votes
13k views

I am attempting to replace an existing chart (Infragistics) as we have now moved this application to a tablet with less processing power and the current solution is using 40 – 50% cpu on said tablet. I am hoping to create a replacement that is much more efficient.

The current chart has 4 wave forms, each displays 8 seconds (which is 4000 points) of data and wraps around on itself with a moving gap just like an ECG machine in a hospital room. The way I get this behavior currently is to create an ObservableCollection with 4000 elements all with NaN values and then update the collection by index resetting the index to 0 when the far right is hit. This is updated from a buffer of incoming datapoints that I create to ensure all points are equidistant by adding points if there are time gaps or dropping points if time overlapped. From what I have read in the forums and samples on how SciChart ECG charts are created that is not the method used. Can anyone suggest the absolute most efficient way to create such a chart using SciChart?

  • mdutra asked 9 years ago
  • last active 9 years ago
2 votes
5k 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
8k 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
9k views

Hi,
I have a SciChartSurfacewith one xaxis an four yaxis and a dynamic number of series which are added at runtime.
Also I have some modifiers especially the ZoomExtentsModifier( ExecuteOn=”MouseDoubleClick” XyDirection=”XDirection”) and for each yaxis a yaxisdragmodifier.
Is it possible to double click on a single yaxis and ZoomExtends only this yaxis?

Regards Markus

2 votes
10k views

Is there any documentation besides the tutorials? Something like the one found on MSDN, with all the Properties of the SciChart elements that can be styled.

  • catalin asked 11 years ago
  • last active 8 years ago
2 votes
14k views

Hi!

I want SciChart to display always the first and last value of an axis. I created a chart wich shows volume on the y-axis and time in seconds on the y-axis. The axis are initialized in the view model with fixed axis dimensions like this:

this.TimeAxis = new NumericAxis();
this.TimeAxis.VisibleRange.SetMinMax(0, 60);
this.TimeAxis.AxisTitle = "Time [s]";
((AxisBase)this.TimeAxis).Style =        (Style)Application.Current.FindResource("DefaultSciChartAxisStyle");

this.VolumeAxis = new NumericAxis();
this.VolumeAxis.VisibleRange.SetMinMax(0, 8);
this.VolumeAxis.AxisTitle = "Volume [l]";
this.VolumeAxis.AxisAlignment = AxisAlignment.Left;
((AxisBase)this.VolumeAxis).Style = (Style)Application.Current.FindResource("DefaultSciChartAxisStyle");

How is it possible to display the first and last value of the axis as shown with red numbers in the attached example.png which are not shown by default?

Best regards,
Joerg

2 votes
11k views

Hi Guys,

I am just wondering if you can help us with the following issue.
We are trying to create a scatter char. The data series set looks like :

public IDataSeriesSet<float, float> ChartDatafloat

The problem that we are having is that there are points that are missing on the chart when it gets generated. so, we would like if you guys could test with the points that I am attaching (scattercsv.csv) and figure out why this is happening… We have seen that points around 14 and between 2000 and 2050 in the Xaxis are not displaying.

<SciChart:SciChartSurface x:Name="SciChartSurface" SciChart:ThemeManager.Theme="BrightSpark"
                              DataSet="{Binding ChartDataXfloat, Mode=TwoWay}">

        <!-- Declare RenderableSeries -->
        <SciChart:SciChartSurface.RenderableSeries>
            <SciChart:XyScatterRenderableSeries>
                <SciChart:XyScatterRenderableSeries.PointMarkerTemplate>
                    <ControlTemplate>
                        <Grid Height="7" Width="7">
                            <Viewbox>
                                <Path Data="M0,0 L10,10 M0,10 L10,0 M0,5 L10,5" Stretch="Uniform" Stroke="Blue" StrokeThickness="1"/>
                            </Viewbox>
                        </Grid>
                    </ControlTemplate>
                </SciChart:XyScatterRenderableSeries.PointMarkerTemplate>
            </SciChart:XyScatterRenderableSeries>
        </SciChart:SciChartSurface.RenderableSeries>

        <!-- Create an X Axis with Growby -->
        <SciChart:SciChartSurface.XAxis>
            <SciChart:NumericAxis VisibleRange="0,2800">
                <SciChart:NumericAxis.GrowBy>
                    <SciChart:DoubleRange Min="0.1" Max="0.1"/>
                </SciChart:NumericAxis.GrowBy>
            </SciChart:NumericAxis>
        </SciChart:SciChartSurface.XAxis>

        <!-- Create a Y Axis with Growby -->
        <SciChart:SciChartSurface.YAxis>
            <SciChart:NumericAxis>
                <SciChart:NumericAxis.GrowBy>
                    <SciChart:DoubleRange Min="0.1" Max="0.1"/>
                </SciChart:NumericAxis.GrowBy>
            </SciChart:NumericAxis>
        </SciChart:SciChartSurface.YAxis>

    </SciChart:SciChartSurface>

I am attaching as well an image that shows how the chart should looks like. I am only trying to display the blue points. So, chart number 1 displays all the points that I am attaching in the spreadsheet and chart number 2 is the one that I am trying to create with the same points and as you can see is missing some of the points.

Hope you can help us….

Thanks very much

2 votes
9k views

Hi SciChart Team,

Thank you all for your help and support.

I finally got the multiple symbols on the stock chart with reference to this and with this clear explanation
IAnnotation annotation = builder.newCustomAnnotation().withContent(R.layout.example_custom_annotation_view).withYAxisId(PRICES).withPosition(i, prices.getHighData().get(i)).withVerticalAnchorPoint(VerticalAnchorPoint.Bottom).build();
this.annotations.add(annotation);

The above code worked for me and hope it helps to others too who all are trying this.

Thanks,
Ghousia

2 votes
9k views

Basically I want to do something like this:
https://finviz.com/map.ashx?t=sec

It’s a hierarchical dataset, displayed visually. Is there a way to do this with SciChart?

  • kelias asked 5 years ago
  • last active 5 years ago
2 votes
9k 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?

2 votes
10k 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
5k 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
16k 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
8k views

Hello, SciChart team,
i’m trying to ZoomExtents a chart, which is in in one tab of TabControl, from another tab, but it doesn’t change visible ranges.

i wanted to attach an example project, but every time i try i get “Forbidden” popup & nothing attaches (file size is 900 KB, format – “.zip”)
here’s link for an Example
please help with this not so large but unpleasant issue,
thanks heaps,
Alexander

2 votes
7k views

I managed to spearate the legend from the SciChartSurface, however the way I did it is very hackish. I couldn’t find any documentation on how it is supposed to be done correctly.

The way I did it (Kotlin code):

val legend = SciChartLegend(context)
legendModifier = LegendModifier(legend)
legendModifier.setOrientation(Orientation.VERTICAL)
legendModifier.setLegendPosition(Gravity.START or Gravity.TOP, 0)
legendModifier.setSourceMode(SourceMode.AllVisibleSeries)
legendModifier.setShowSeriesMarkers(true)
legendModifier.setShowCheckboxes(true)


val modifierGroup = chartBuilder.newModifierGroup().build()
modifierGroup.childModifiers.add(legendModifier)
chartSurface.chartModifiers.add(modifierGroup)

if(legend.parent != null)
{
    (legend.parent as ViewGroup).removeView(legend)
}

val linearLayout = LinearLayout(context)
linearLayout.orientation = LinearLayout.VERTICAL
linearLayout.addView(legend)
linearLayout.addView(chartSurface)

I was surprised that passing the legend to LegendModifier constructor also adds it to it’s layout. So I had to manually remove it and add it to my LinearLayout. It does work, but as I said, it is a hackish way of doing it. My question is, how is it done correctly?

2 votes
13k 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
18k 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
1 vote
16k views

Hello. I need to provide custom point marker with height and width based on my data, but trying to implement BasePointMarker I have the center points but not the original data to make the width and height based in my original binding. Is there a solution to do that? Thank you.

Tommy Garcia.

1 vote
9k views

Hi,

I was wandering if there’s a way to display the data in the SciChartOverview control in a logarithmic scale.
Perhaps something equivalent to the LogarithmicNumericAxis ?

The matter is quite urgent, hence I’ll be very grateful for a prompt response.

Thanks,
Mark.

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

To whom this may concern:

I have a Custom Renderable Series that I use to draws a polygon around the points on a scatter plot.

protected override void Draw(IRenderContext2D renderContext, IRenderPassData renderPassData)
{
    base.Draw(renderContext, renderPassData);

    var blobShellPoints = getBlobShellPoints();

    using (var polyPen = renderContext.CreateBrush(Colors.DodgerBlue, 0.3))
    {
        var startCoordinates = getCoordinatesFor(blobShellPoints[0].X, blobShellPoints[0].Y);

        using (var blobDrawingContext = renderContext.BeginPolygon(polyPen, startCoordinates.X, startCoordinates.Y))
        {
            foreach (var point in blobShellPoints)
            {
                var pointCoords = getCoordinatesFor(point.X, point.Y);

                blobDrawingContext.MoveTo(pointCoords.X, pointCoords.Y);
            }
        }
    }
}

I would like to know if there is some way to show a tooltip when the mouse hovers over the said drawn polygon. I don’t see any ability to do this after I finish creating the polygon or before the end of the encapsulated polyPen disposable. It should look something like the attached image.

Can you please advise? Thank you kindly for your response!

P.S. I realize some of this code may be obsolete since I’m using SciChart 5. If this is only possible in 6+ then that’s understandable.

  • Ari Sagiv asked 2 years ago
  • last active 2 years ago
1 vote
9k views

Hi,
I have a SciChartGroup with 2 SciChartSurfaces…
It seems the SciChartGroup is adding the surface Title on its own somewhere.
What do I have to do to not display the 2nd surfaces title in white in the top-left corner?
Thanks!

Here is a screenshot of what I’d like to remove:

enter image description here

(I’d attach the project, but the buttons on the ask page aren’t attaching anything – in chrome anyway…)

Here is the codebehind:

using System;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Windows;
using System.Windows.Input;
using Abt.Controls.SciChart;
namespace nameOn2ndSurface
{
    public partial class MainWindow : Window
{
    public MainWindow()
    {
        InitializeComponent();
    }
}
public class datamodel : INotifyPropertyChanged
{
    #region PropertyChanged

    public event PropertyChangedEventHandler PropertyChanged;
    protected void OnPropertyChanged(PropertyChangedEventArgs e)
    {
        if (PropertyChanged != null)
            PropertyChanged(this, e);
    }
    protected void notifyPropertyChanged(string propertyName)
    {
        PropertyChangedEventArgs e = new PropertyChangedEventArgs(propertyName);
        OnPropertyChanged(e);
    }

    #endregion

    ObservableCollection<DataModelGraph> graphs;

    public datamodel()
    {
        graphs = new ObservableCollection<DataModelGraph>();
        graphs.Add(new DataModelGraph() { Title = "graph1" });
        graphs.Add(new DataModelGraph() { Title = "graph2" });
    }
    public ObservableCollection<DataModelGraph> Graphs
    {
        get
        {
            return graphs;
        }
    }
}
public class DataModelGraph : IChildPane, INotifyPropertyChanged
{
    #region PropertyChanged

    public event PropertyChangedEventHandler PropertyChanged;
    protected void OnPropertyChanged(PropertyChangedEventArgs e)
    {
        if (PropertyChanged != null)
            PropertyChanged(this, e);
    }
    protected void notifyPropertyChanged(string propertyName)
    {
        PropertyChangedEventArgs e = new PropertyChangedEventArgs(propertyName);
        OnPropertyChanged(e);
    }

    #endregion

    string title;
    public DataModelGraph()
    {
        title = "graph";
    }
    public string Title
    {
        get
        {
            return title;
        }
        set
        {
            if (title != value)
            {
                title = value;
                notifyPropertyChanged("Title");
            }
        }
    }

    public ICommand ClosePaneCommand { get; set; }
    public void ZoomExtents()
    {
    }
}

}

Here is the xaml:

<Window x:Class="nameOn2ndSurface.MainWindow"
    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" 
    xmlns:local="clr-namespace:nameOn2ndSurface"
    Title="MainWindow" Height="350" Width="525">
<Window.Resources>
    <local:datamodel x:Key="data" />
    <Style TargetType="s:SciChartSurface">
        <Setter Property="Foreground" Value="Red"/>
        <Setter Property="ChartTitle" Value="{Binding Title}"/>
    </Style>
</Window.Resources>
<Grid DataContext="{DynamicResource data}">
    <s:SciChartGroup x:Name="group"
                     ItemsSource="{Binding Graphs}"
                     >
        <s:SciChartGroup.ItemTemplate>
            <DataTemplate>
                <s:SciChartSurface />
            </DataTemplate>
        </s:SciChartGroup.ItemTemplate>
    </s:SciChartGroup>
</Grid>

  • dwoerner asked 9 years ago
  • last active 9 years ago
1 vote
1k views

Hi.

We want to use your Android Chart library in our project. I’m getting familiar with it and I don’t totally gets how to implement Scrolling Realtime (FIFO) Line Chart.

What we want to do: our copmany wants an app that will represent the data on the line charts from their sensors. I need real-time (FIFO) representation from 1 to 16 charts in RecyclerView.

The guide here doesn’t cover the whole implementation (for example, we add data to XyDataSeries, but where to add these series to surface is not indicated). And link to github is not working also.

Do you have some example code or documentation regarding it?

1 vote
10k views

We create a surface in code and use ExportToFile() to embed it in a printable document.
All well and fast.

But, after changing region settings from en-us to de-de this Method takes ALL memory an the Machine and causes out of memory issues and virtually halts the machine.

We tried our code on different machines and the behavior was always the same.

Has anybody similar experiences? Or even a solution 🙂

Regards
Otto Gierling

1 vote
895 views

I have some 3 dimension data that I have successfully generated a 3D surface mesh chart out from in WPF. However, I want to generate a 2D plot from the 3D chart given some parameters (e.g. a x-value, a y-value etc.). Can anyone advise on the best way to extract a 2D plot from a 3D chart?

  • Gil Owu asked 1 year ago
  • last active 3 months ago
1 vote
9k views

In our application we use a CAT5 USB to Ethernet extender to achieve a 50 ft distance from computer to monitor. At the monitor end we then use a Startech USB to VGA adapter. We found that with this configuration there is an issue with screen redraw whenever we run a WPF-based application – it shows up as flickering screen artifacts, portions of background windows showing through the foreground window, etc. Clearly wrong behavior, very repeatable, and only seen when a WPF application is running (it effects the entire display and any/all other applications currently running).

After much investigation we found that this could be fixed by a registry key that forces software-based rendering of WPF on a system-wide level, and setting this key completely solves the problem (with, we would assume, a degradation in WPF performance but it certainly isn’t noticeable to us):

HKEY_CURRENT_USER\Software\Microsoft\Avalon.Graphics\DisableHWAcceleration DWORD set to 1

https://msdn.microsoft.com/en-us/library/aa970912%28v=vs.110%29.aspx#overview

My question is, how would this setting affect the performance of your charting controls? In our application we certainly wouldn’t be pushing the speed of your real time charts, probably maximum update is 4 to 8 points per second added to the chart, but I am concerned that it doesn’t cause display issues or result in undue processor utilization.

1 vote
936 views

The x, y values showing in the tooltip of crosshair are rounded to 1 decimal place. How I can I modify the tooltip to show the actual x, y values? And how can I change the text font size in the tooltip?

1 vote
781 views

Hello,
I receive data at a very high speed from a hardware board and need to plot it on a SciChartSurface.
the sample is FastLineRenderableSeries

   <s:SciChartSurface x:Name="sciChart0" MaxFrameRate="5" 
               s:VisualXcceleratorEngine.AvoidBlacklistedGpu="False"
                s:VisualXcceleratorEngine.IsEnabled="True" 
                ForceCursor="True"
                s:VisualXcceleratorEngine.FallbackType="{x:Type s:HighQualityRenderSurface}"
                s:VisualXcceleratorEngine.DowngradeWithoutException="False" 
                s:VisualXcceleratorEngine.EnableImpossibleMode="True" 
                RenderPriority="Normal">
         <s:SciChartSurface.RenderableSeries>
                  <s:FastLineRenderableSeries   x:Name="RenderableSeries1" DataSeries="{Binding Series, 
                     Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
           </s:SciChartSurface.RenderableSeries>

    </s:SciChartSurface>

while Series is XyDataSeries<double, double>
I created a thread that opens a socket (on port 3490) and all the information it receives it draws on the graph.
The problem is that if some time passes, and I stop the transmission of the data, it still draws what it has left to draw to “reach the end of the buffer”. It makes me realize that he is not keeping up with the transmission and it takes him more time to draw than the time it takes for the information to arrive.
(If I start the transmission and let it draw, and then stop quickly, it does stop immediately. The problem is if a lot of information arrives over time).
I wanted to ask if there is a way to speed it up in some way? (Maybe by giving up the plotting quality?)
Since I need to draw the information that arrives in real time and not information that arrived a few seconds ago…
The drawing is done by a separate thread:

i’m using Append():

Series.Append(double[XPoints] array, double[YPoints] array);
1 vote
10k views

How to set Crosshair (CursorModifier) color and thickness in xaml?

  • RTrade A asked 8 years ago
  • last active 8 years ago
1 vote
1k views

Hello,

As you can see in the attached image, I’m using a Candlestick Chart for a financial application, but the gap between each bar on the chart is pretty small and it doesn’t look good.

I want to add a space between the bars but I couldn’t find how to do it. Can you help me?

Best regards.

1 vote
750 views

Hello,

I found a bug where the SCILegendModifier doesn’t display the full series name. If I add 5 spaces to the series name string, I’m able to see the full series name.

Also, when using margins on the legend modifier instance, the legend fills all available space. Manually resizing the window fixes this bug.

See the photos.

1 vote
0 answers
571 views

I used both, but DataPointSelectionModifier doesn’t seem to work

  • ppp t asked 8 months ago
  • last active 8 months ago
Showing 51 - 100 of 4k results

Try SciChart Today

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

Start TrialCase Studies