SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components

0 votes
0 answers
13 views

Hello,

I was doing a custom pan zoom modifier to drag the chart by click and drop. The Y-axis works well and I can drag up and down but the X-axis instead of just moving it scales a lot.

The same thing happens when I implemented a mouse wheel scroll using the same functionality, is it possible that the last candle is anchored to the side of the graphic? or I’m just not using correctly the Scroll method?

Here is the code of the pan modifier

public override void OnModifierMouseMove(ModifierMouseArgs e)
    {
        if (_lastPoint == null)
            return;

        if (!ModifierSurface.IsPointWithinBounds(e.MousePoint))
            return;

        base.OnModifierMouseMove(e);

        var currentPoint = e.MousePoint;
        var xDelta = currentPoint.X - _lastPoint.Value.X;
        var yDelta = _lastPoint.Value.Y - currentPoint.Y;

        using (ParentSurface.SuspendUpdates())
        {
            XAxis.Scroll(XAxis.IsHorizontalAxis ? xDelta : -xDelta, SciChart.Charting.ClipMode.None);
            YAxis.Scroll(YAxis.IsHorizontalAxis ? -xDelta : yDelta, SciChart.Charting.ClipMode.None);
        }

        _lastPoint = currentPoint;
    }

This is the XAML code

<!--  Create the chart surface with candlestick and histogram bars around each candlestick  -->
    <s:SciChartSurface
        x:Name="sciChart"
        Grid.Column="1"
        Padding="0"
        BorderThickness="0"
        ViewportManager="{Binding ViewportManager}">


        <s:SciChartSurface.RenderableSeries>

            <s:FastHistoBarRenderableSeries
                DataSeries="{Binding DataSeries, Mode=TwoWay}"
                HistogramMode="{Binding HistogramBarMode, Mode=TwoWay}"
                HorizontalBarSpacing="20"
                MaxHistoBarCandles="240"
                PaletteProvider="{StaticResource VolumeLadderThresholdPaletteProvider}"
                TickSize="{Binding TickSize, Mode=TwoWay}"
                VerticalBarSpacing="{Binding VerticalBarSpacing, Mode=TwoWay}"
                StrokeUp="#FF84CFFB"
                StrokeDown="Red"
                AllowDrop="true">


                <s:FastHistoBarRenderableSeries.FillUp>

                    <SolidColorBrush Color="#FF00A2FF" />
                </s:FastHistoBarRenderableSeries.FillUp>

                <s:FastHistoBarRenderableSeries.FillDown>
                    <SolidColorBrush Color="Red" ></SolidColorBrush>
                </s:FastHistoBarRenderableSeries.FillDown>

                <s:FastHistoBarRenderableSeries.AskBarStyle>
                    <Style TargetType="s:HistogramBar">
                        <Setter Property="Stroke" Value="Black" />
                        <Setter Property="MinWidth" Value="200"/>
                        <Setter Property="MinHeight" Value="200"/>
                        <Setter Property="MaxHeight" Value="200"/>
                        <Setter Property="MaxWidth" Value="200"/>
                        <Setter Property="Height" Value="360"/>
                        <Setter Property="Margin"  Value="340"/>
                        <Setter Property="Fill" Value="red" />
                        <Setter Property="FontSize" Value="23" />
                        <!--<Setter Property=" Value="Red" />-->
                    </Style>
                </s:FastHistoBarRenderableSeries.AskBarStyle>

                <s:FastHistoBarRenderableSeries.BidBarStyle>
                    <Style TargetType="s:HistogramBar">
                        <Setter Property="Stroke" Value="Black" />
                        <Setter Property="Fill" Value="#FF00A2FF" />
                    </Style>
                </s:FastHistoBarRenderableSeries.BidBarStyle>

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

        <!--  Create an X Axis  -->
        <s:SciChartSurface.XAxis>
            <s:CategoryDateTimeAxis GrowBy="0.0, 0.1" DrawMajorBands="True" />
        </s:SciChartSurface.XAxis>

        <!--  Create a Y Axis with GrowBy  -->
        <s:SciChartSurface.YAxis>
            <s:NumericAxis GrowBy="0.1, 0.1" DrawMajorBands="True" />
        </s:SciChartSurface.YAxis>

        <s:SciChartSurface.ChartModifier>

            <s:ModifierGroup s:MouseManager.MouseEventGroup="SciChartGroup">
                <!--<s:MouseWheelZoomModifier x:Name="mouseWheelZoomModifier" 
                                          ActionType="Zoom" 
                                          XyDirection="XYDirection"/>-->
                <!--<s:ZoomPanModifier x:Name="zoomPanModifier" 
                                   IsEnabled="False"
                                   ClipModeX="ClipAtExtents"                                   
                                   />-->
                <s:ZoomExtentsModifier x:Name="zoomExtentsModifier"/>
                <!--<s:RubberBandXyZoomModifier x:Name="rubberBandXyZoomModifier" 
                                            ZoomExtentsY="True"/>-->
                <cm:ZoomPanModifier/>
                <cm:MouseWheelHorizontalScroll/>
                <s:XAxisDragModifier DragMode="Scale"/>
                <s:YAxisDragModifier DragMode="Scale"/>
                <!--<s:RolloverModifier DrawVerticalLine="False"/>-->

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

Thanks 🙂

0 votes
0 answers
12 views

Hello,

I’m trying to display the value of the bars in the Market Profile chart. I was trying to add a text for each bar created but I don’t know where to find the surface position to instantiate the text.

This is the part of the code where the bars are created.

for (int i = 0; i < ticksPerCandle; i++)
            {
                _index++;

                volume = _random.Next(100);
                bidOrAsk = _random.Next(2) == 0 ? BidOrAsk.Bid : BidOrAsk.Ask;

                //date = date;
                var newTick = _data[_index];
                var open = _dataSeries0.OpenValues[_candleCount - 1];
                high = _dataSeries0.HighValues[_candleCount - 1];
                high = high > newTick ? high : newTick;

                low = _dataSeries0.LowValues[_candleCount - 1];
                low = low < newTick ? low : newTick;

                var meta = (CandlestickMetaData)_dataSeries0.Metadata[_candleCount - 1];

                meta.AddTick(new CandleTick
                {
                    BidOrAsk = bidOrAsk,
                    Price = newTick,
                    Volume = volume,
                    TimeStamp = date
                });

This is how it should look like

0 votes
17 views

Hi everyone!

What are the differences between the professional pack and its API included, and the SDK that comes with enterprise pack? Where is the SDK documentation? What’s the way to know what can I do with API and what with SKD? For example, in case I want to put text over the horizontals bars of the market profile histogram? Or whether I want to put some bubbles moving around the surface screen like a screensaver?

  • Nil Nil asked 2 days ago
  • last active 21 hours ago
0 votes
0 answers
32 views

Hi! I was playing around with the MarketProfile example and I wanted to put some numbers in the bars representing the price.
Is there any way to do that?

enter image description here

0 votes
0 answers
59 views

Hi, i am using scichart v6.2.0.13254 and v6.2.1.13304, when i insert data it will cause the System.AccessViolationException,below is a very simple example, when it run,click LoadMoreData a few times it will throw the exctipion.

0 votes
0 answers
59 views

I have a problem with dynamically adding/removing zoom/pan modifier.
Initially when chart is created, it add zoomExtend and xyRubberBand modifier, so the chart zooms on left button drag. I added a button in my app so when the button is clicked, xyRubberBand is removed and ZoomPan modifier is added (with execute on MouseLeftButton); so when I click button, I do see pan behavior, problem is, when mouse left button up it still stays in pan mode, which means pan continues even with left button up, I found if I click right mouse button at this point the pan behavior stops.
The code to dynamically add/remove modifiers is below

public void AddPan()
{
var rubber = ModifierGroup.ChildModifiers.FirstOrDefault(x => x is RubberBandXyZoomModifier);
var pan = ModifierGroup.ChildModifiers.FirstOrDefault(x => x is ZoomPanModifier);
if (rubber != null) ModifierGroup.ChildModifiers.Remove(rubber);
if (pan == null) ModifierGroup.ChildModifiers.Add(new ZoomPanModifier() { ExecuteOn = ExecuteOn.MouseLeftButton, IsEnabled =
true });
OnPropertyChanged(nameof(ModifierGroup));
}

0 votes
0 answers
83 views

Hi,

Multiple X-Axis and Y-Axis with 3 different charts and cursor can be moved along x-axis for the 3 charts.
Please find the screenshot attached.

Please reach out to me if you need any more details.

Thank you
Shaik Nazeer Hussain

0 votes
93 views

Hi,

Our view models currently hold AxisCollection and work with IAxis. We’re hoping to switch to working with IAxisViewModel at this level.
But some feature differences will make this harder:

  • IAxis.TickLabelStyle – view model only supports TickTextBrush, not the other font related properties we customise in this style.
  • SImilarly MajorGridLineStyle and MinorGridLineStyle
  • Is IAxisViewModel.StyleKey the equivalent of IAxis.TitleStyle? (we just need to move our style definitions to XAML instead of creating Style objects in code)
  • Is IAxisViewModel.VisibleRange equivalent to IAxis.DataRange?

Can there be equivalent IAxisViewModel.TickLabelStyleKey, similarly Minor/Major grid line StyleKey?

Background
Our view models hang around to hold logical state of charts. But they also hold some AxisCollection, bound to from SciChartSurface.

We get exceptions like: InvalidOperationException Element already has a logical parent, under SciChart methods in the call stack.
E.g. when reconnecting to a PC over remote desktop, where a chart was already loaded.

This change was also suggested as a solution to our other recent issue, here:
https://www.scichart.com/questions/wpf/axiscollection-isprimaryaxis-stops-auto-updating#sabai-entity-content-13950

The “Element already has a logical parent” exception doesn’t happen when clicking between multiple charts like that latter issue. I’ve prototyped a changeover (commenting out all the bits not directly equivalent) and it seems to resolve this exception.

0 votes
112 views

I am getting a weird exception when appending data to my dataseries.

 SciChartSurface didn't render, because an exception was thrown:
  Message: Specified argument was out of the range of valid values. (Parameter 'You must have a width and height > than 0.')

  Stack Trace:    at geq.pne(Int32 dbt, Int32 dbu, Int32 dbv, Int32 dbw)
   at geq..ctor(Int32 dak, Int32 dal, Int32 dam, gfb dan)
   at SciChart.Charting.Common.Helpers.Strategies.CommonRenderContextDrawingStrategy.DrawPointMarkers(IRenderContext2D context, Color strokeColor, Color strokeBrush, Size spriteSize, Action`3 renderToCacheMethod)
   at SciChart.Charting.Visuals.PointMarkers.BitmapSpriteBase.CreateSprite(IRenderContext2D context, Color strokeColor, Color strokeBrush)
   at SciChart.Charting.Visuals.PointMarkers.BitmapSpriteBase.yry(IRenderContext2D bbr, Nullable`1 bbs, Nullable`1 bbt)
   at SciChart.Charting.Visuals.PointMarkers.BitmapSpriteBase.BeginBatch(IRenderContext2D context, Nullable`1 strokeColor, Nullable`1 fillColor)
   at vra.Begin(IPathColor pathColor, Double startX, Double startY, Int32 index)
   at wbb.udm(Double hmn, Double hmo, Double hmp, Double hmq, Int32 hmr)
   at vpx.ett(wba agi, IPointSeries agj, ICoordinateCalculator`1 agk, ICoordinateCalculator`1 agl)
   at SciChart.Charting.Visuals.RenderableSeries.DrawingProviders.LegacyPointMarkerRenderer.Draw(IRenderContext2D renderContext, IPointSeries pointSeries, IRenderPassData renderPassData)
   at SciChart.Core.Extensions.EnumerableExtensions.ForEachDo[T](IEnumerable`1 enumerable, Action`1 operation)
   at SciChart.Charting.Visuals.RenderableSeries.BaseRenderableSeries.SciChart.Charting.Visuals.IDrawable.OnDraw(IRenderContext2D renderContext, IRenderPassData renderPassData)
   at vsb.ixq(RenderPassInfo caj, IRenderContext2D cak, Int32 cal)
   at vsb.ixp(ISciChartSurface cag, RenderPassInfo cah, IRenderContext2D cai)
   at vsb.RenderLoop(IRenderContext2D renderContext)
   at SciChart.Charting.Visuals.SciChartSurface.DoDrawingLoop()

I have no idea what width and height it is referring to. My SciChartSurface height and width are NaN but the actual height and width are 509 and 1007. The despite the exception I am still getting the graph to render correctly. Does anyone know how to track this down?

0 votes
0 answers
96 views

I’m using the DirectX 11 renderer.
Issue can be best seen in this image:

1 pixel errors

You can see that especially between the colors you can see lots of “dots”, which appear quite randomly as you zoom around.
But even in the black part some of these are created, so it is not exclusively to the multi color part.

I’m not sure why it happens and how to fix it, it seems like in some situations for some reason 1 pixel is left out for coloring (keeps background color).
I created this with lots of lines from a 60 hz input signal, and each signal gets drawn as a line. While the end result itself looks perfect, I’m getting these artifacts everywhere.

I suspect it happens from an optimization which is why I tried to turn them all off, but I wasn’t been able to find such a setting.
Any idea on how to fix this? 🙂

1 vote
112 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 weeks ago
  • last active 1 week ago
0 votes
118 views

Hello! I’ve created a UserControl that houses a chart that I’m populating with StackedColumnRenderableSeriesViewModels.

XAML:

<UserControl>

<Grid>
    <sci:SciChartSurface x:Name="StackedColumnSciChart" RenderableSeries="{sci:SeriesBinding RenderableSeries, RelativeSource={RelativeSource AncestorType=UserControl}}">

        <sci:SciChartSurface.XAxis>
            <sci:NumericAxis Id="LengthAxisID" AutoRange="Never" AxisTitle="Length (mm)" />
        </sci:SciChartSurface.XAxis>

        <sci:SciChartSurface.YAxis>
            <sci:NumericAxis Id="ValueAxisID" AutoRange="Never" />
        </sci:SciChartSurface.YAxis>

    </sci:SciChartSurface>
</Grid>

</UserControl>

C#:

RenderableSeries dependency property

public ObservableCollection<IRenderableSeriesViewModel> RenderableSeries
    {
        get { return (ObservableCollection<IRenderableSeriesViewModel>)GetValue(RenderableSeriesProperty); }
        set { SetValue(RenderableSeriesProperty, value); }
    }
    public static readonly DependencyProperty RenderableSeriesProperty = DependencyProperty.Register("RenderableSeries", typeof(ObservableCollection<IRenderableSeriesViewModel>), typeof(StackedColumnChart), new PropertyMetadata(defaultValue: new ObservableCollection<IRenderableSeriesViewModel>()));

Creating StackedColumnRenderableSeriesViewModels for temperatures

foreach (PlotInfo plot in CreateTemperaturePlots())
            {
                StackedColumnRenderableSeriesViewModel stackedColumnRenderableSeries = new StackedColumnRenderableSeriesViewModel()
                {
                    Stroke = plot.Color,
                    Fill = new SolidColorBrush(color: plot.Color),
                    XAxisId = plot.XAxisID,
                    YAxisId = plot.YAxisID,
                    StackedGroupId = plot.GroupID,
                    DataSeries = plot.DoubleDataSeries
                };

                // Set the Y Axis range
                StackedColumnSciChart.YAxes[0].VisibleRangeLimit = new DoubleRange(min: 0.0, max: 1200.0);
                StackedColumnSciChart.YAxes[0].VisibleRange = new DoubleRange(min: 0.0, max: 1200.0);

                Console.WriteLine($"Temperature Plot GroupID: {plot.GroupID}, DataSeries: [X: {plot.DoubleDataSeries.XValues[0]}, Y: {plot.DoubleDataSeries.YValues[0]}]");

                RenderableSeries.Add(stackedColumnRenderableSeries);
            }

Creating StackedColumnRenderableSeriesViewModels for gases

foreach (PlotInfo plot in CreateGasPlots())
            {
                StackedColumnRenderableSeriesViewModel stackedColumnRenderableSeries = new StackedColumnRenderableSeriesViewModel()
                {
                    Stroke = plot.Color,
                    Fill = new SolidColorBrush(color: plot.Color),
                    XAxisId = plot.XAxisID,
                    YAxisId = plot.YAxisID,
                    StackedGroupId = plot.GroupID,
                    DataSeries = plot.DoubleDataSeries
                };

                // Set the Y Axis range
                StackedColumnSciChart.YAxes[0].VisibleRangeLimit = new DoubleRange(min: 0.0, max: 30000);
                StackedColumnSciChart.YAxes[0].VisibleRange = new DoubleRange(min: 0.0, max: 30000);

                Console.WriteLine($"Gas Plot GroupID: {plot.GroupID}, DataSeries: [X: {plot.DoubleDataSeries.XValues[0]}, Y: {plot.DoubleDataSeries.YValues[0]}]");

                RenderableSeries.Add(stackedColumnRenderableSeries);
            }

Temperature Data:

Temperature Plot GroupID: Group0, DataSeries: [X: 0, Y: 0]
Temperature Plot GroupID: Group1, DataSeries: [X: 200, Y: 0]
Temperature Plot GroupID: Group2, DataSeries: [X: 400, Y: 670.773630135875]
Temperature Plot GroupID: Group3, DataSeries: [X: 600, Y: 740.345771031664]
Temperature Plot GroupID: Group4, DataSeries: [X: 800, Y: 784.109352476318]
Temperature Plot GroupID: Group5, DataSeries: [X: 1000, Y: 810.433384818085]
Temperature Plot GroupID: Group6, DataSeries: [X: 1200, Y: 830.191409478306]
Temperature Plot GroupID: Group7, DataSeries: [X: 1400, Y: 851.270291157906]
Temperature Plot GroupID: Group8, DataSeries: [X: 1600, Y: 866.993960435544]
Temperature Plot GroupID: Group9, DataSeries: [X: 1800, Y: 877.308898422191]
Temperature Plot GroupID: Group10, DataSeries: [X: 2000, Y: 896.995238248967]
Temperature Plot GroupID: Group11, DataSeries: [X: 2200, Y: 910.176039942053]
Temperature Plot GroupID: Group12, DataSeries: [X: 2400, Y: 928.835289697347]
Temperature Plot GroupID: Group13, DataSeries: [X: 2600, Y: 947.442843516404]
Temperature Plot GroupID: Group14, DataSeries: [X: 2800, Y: 959.806601821192]
Temperature Plot GroupID: Group15, DataSeries: [X: 3000, Y: 962.432915671719]
Temperature Plot GroupID: Group16, DataSeries: [X: 3200, Y: 963.263705166903]
Temperature Plot GroupID: Group17, DataSeries: [X: 3400, Y: 953.094653198038]
Temperature Plot GroupID: Group18, DataSeries: [X: 3600, Y: 920.368723738552]
Temperature Plot GroupID: Group19, DataSeries: [X: 3800, Y: 0]
Temperature Plot GroupID: Group20, DataSeries: [X: 4000, Y: 0]
Temperature Plot GroupID: Group21, DataSeries: [X: 4200, Y: 0]
Temperature Plot GroupID: Group22, DataSeries: [X: 4400, Y: 0]
Temperature Plot GroupID: Group23, DataSeries: [X: 4600, Y: 0]

Gas Data:

Gas Plot GroupID: Channel571, DataSeries: [X: 600, Y: 5000]
Gas Plot GroupID: Channel571, DataSeries: [X: 600, Y: 5000]
Gas Plot GroupID: Channel572, DataSeries: [X: 800, Y: 5000]
Gas Plot GroupID: Channel572, DataSeries: [X: 800, Y: 5000]
Gas Plot GroupID: Channel573, DataSeries: [X: 1000, Y: 5000]
Gas Plot GroupID: Channel574, DataSeries: [X: 1200, Y: 5000]
Gas Plot GroupID: Channel574, DataSeries: [X: 1200, Y: 5000]
Gas Plot GroupID: Channel575, DataSeries: [X: 1400, Y: 5000]
Gas Plot GroupID: Channel575, DataSeries: [X: 1400, Y: 5000]
Gas Plot GroupID: Channel575, DataSeries: [X: 1400, Y: 5000]
Gas Plot GroupID: Channel576, DataSeries: [X: 1600, Y: 5000]
Gas Plot GroupID: Channel576, DataSeries: [X: 1600, Y: 5000]
Gas Plot GroupID: Channel576, DataSeries: [X: 1600, Y: 5000]
Gas Plot GroupID: Channel577, DataSeries: [X: 1800, Y: 5000]
Gas Plot GroupID: Channel577, DataSeries: [X: 1800, Y: 5000]
Gas Plot GroupID: Channel578, DataSeries: [X: 2000, Y: 5000]
Gas Plot GroupID: Channel578, DataSeries: [X: 2000, Y: 5000]
Gas Plot GroupID: Channel579, DataSeries: [X: 2200, Y: 5000]
Gas Plot GroupID: Channel579, DataSeries: [X: 2200, Y: 5000]
Gas Plot GroupID: Channel580, DataSeries: [X: 2400, Y: 5000]
Gas Plot GroupID: Channel580, DataSeries: [X: 2400, Y: 5000]
Gas Plot GroupID: Channel581, DataSeries: [X: 2600, Y: 5000]
Gas Plot GroupID: Channel581, DataSeries: [X: 2600, Y: 5000]
Gas Plot GroupID: Channel582, DataSeries: [X: 2800, Y: 5000]
Gas Plot GroupID: Channel582, DataSeries: [X: 2800, Y: 5000]
Gas Plot GroupID: Channel583, DataSeries: [X: 3000, Y: 5000]
Gas Plot GroupID: Channel583, DataSeries: [X: 3000, Y: 5000]
Gas Plot GroupID: Channel584, DataSeries: [X: 3200, Y: 5000]
Gas Plot GroupID: Channel584, DataSeries: [X: 3200, Y: 5000]
Gas Plot GroupID: Channel585, DataSeries: [X: 3400, Y: 5000]
Gas Plot GroupID: Channel585, DataSeries: [X: 3400, Y: 5000]
Gas Plot GroupID: Channel586, DataSeries: [X: 3600, Y: 5000]
Gas Plot GroupID: Channel586, DataSeries: [X: 3600, Y: 5000]
Gas Plot GroupID: Channel587, DataSeries: [X: 3800, Y: 5000]
Gas Plot GroupID: Channel587, DataSeries: [X: 3800, Y: 5000]
Gas Plot GroupID: Channel588, DataSeries: [X: 4000, Y: 5000]
Gas Plot GroupID: Channel588, DataSeries: [X: 4000, Y: 5000]
Gas Plot GroupID: Channel589, DataSeries: [X: 4100, Y: 5000]
Gas Plot GroupID: Channel589, DataSeries: [X: 4100, Y: 5000]
Gas Plot GroupID: Channel589, DataSeries: [X: 4100, Y: 5000]
Gas Plot GroupID: Channel590, DataSeries: [X: 4200, Y: 5000]
Gas Plot GroupID: Channel590, DataSeries: [X: 4200, Y: 5000]
Gas Plot GroupID: Channel590, DataSeries: [X: 4200, Y: 5000]
Gas Plot GroupID: Channel591, DataSeries: [X: 4300, Y: 5000]
Gas Plot GroupID: Channel591, DataSeries: [X: 4300, Y: 5000]
Gas Plot GroupID: Channel591, DataSeries: [X: 4300, Y: 5000]

With the Temperature data, each StackedColumnRenderableSeriesViewModel has its own StackedGroupId. With the Gas data, there are multiple StackedGroupIds.

I tried attaching two PNG files (60K and 70K) to this but the forum says they are forbidden. Here is a link: Gas and Temperature charts

  • Greg Knox asked 3 weeks ago
  • last active 3 weeks ago
0 votes
128 views

Hi,

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

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

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

Thanks for your help
Jean-Charles

0 votes
118 views

Dear Team,

We are evaluating Scichart Candle series chart from example suite and facing following issue [Stock market analysis product]. I am using 2 example from the demo solution of scichart after extracting. Attached are solution to reproduce. We are using 6.2.0.13254 version of scichart.

SciChart multipane candle chart or candle line example project throws Access Violation in Scichart.Data.Dll if number of points increased to 5000 or above. The issue happens in both solutions Multiplane chart and CandleStickAndLines.

1) SciChart_MultiPaneStockCharts.sln:

if i increase number of candle points around 5k to 10k, (i wrote an API which reads data points file this data is of real Stock Market data).

Issue 1) Firstly the chart does not render if points are more than 5000. But If we do any resize of window height or width the chart renders. If i include volume panel and other indicators like in the example the chart throws Access violation.

Issue 2) If i comment all the series retain only candle series the chart renders with 5-10k points but only after resize of window. And if i add volume panel runtime from a button click (i added Add Panel button on left hand side tray) the chart crashes with Access Violation in SciChart.Data.dll

Issue 3) The width of the chart does not work fine, even with example data set which is about 3k+ points if i shrink the width lets say to half and then make large, couple of times the chart then does not invalidate or redraw just becomes small and then nothing works (zoom , pan or any clicks)

Issue4) I also saw crash when i tried to move the axis X couple of times, again when volume and other series were present.

2)SciChart_CandlestickandLines:
In this project since it creates series from code behind the CandleSeries ( but with line series commented) works fine even if 10k points added.
But as soon the Line series added dynamically by button or by lets say right click the chart crashes Access Violation. It seems there is a threshold above which FastLineRenderableSeries (column, line etc) crashes with Access Violation.

Kindly need your assistance. If this issue can be fixed or has been fixed we would be pushing management to buy the license of the product we really like its feartures.

Regards,
SYED

0 votes
0 answers
103 views

Hello,
I would like to display tooltip in front.

Case1:
At Stacked/FastColumnRendarableSeries,
I would like to display tooltip on the x axis’s label.
Is it possible?

Case2:
At PieChart,
I would like to display tooltip on the other control,
Because, pie chart’s area is narrow.
Is it possible?

Please refer to the attached file for details.

Regards,

0 votes
161 views

This issue was reported on support tickets by a customer, and we are duplicating here for the community.

Our application use SciChart, it runs normal on most of PCs, but there is one PC which runs the application threw an exception, please see below log info.

2020-07-03 08:08:21,091 [1]-[OnUnhandledException] ERROR Exception has been thrown by the target of an invocation.
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> System.Windows.Markup.XamlParseException: Set property ‘SciChart.Charting.VisualXcceleratorEngine.IsEnabled’ threw an exception. —> System.Exception: Your GPU is blacklisted for use by the Visual Xccelerator Engine! There are several reasons why a GPU could belong to the blacklist. For example, low computation capabilities of the GPU could cause Timeout Detection and Recovery of Graphics Adapter Drivers by the OS, resulting in crashing the application. at SciChart.Charting.VisualXcceleratorEngine.ivc(DependencyObject t, DependencyPropertyChangedEventArgs u) at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)

what should I do? how to resolve this issue?

0 votes
0 answers
196 views

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

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

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

PeakAnnotation.xaml

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

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

PeakAnnotation.xaml.cs

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

    }

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

    public string StyleKey { get; set; }

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

MainViewModel.cs

public MainViewModel()
    {
        ChartTitle = "Testing";

        Annotations = new AnnotationCollection();

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

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

MainWindow.xaml

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

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

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

0 votes
183 views

Hello,

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

Do you have an idea ?
Thanks

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

i have a SciChartGroup may have multiple charts, i hope when i click mouse left every chart it is cross only, i click it again every chart it is arrow only

  • Allen Qiu asked 1 month ago
  • last active 1 month ago
0 votes
240 views

Hi,I have upgrade my scichart from v4.2 to v6.2(trial version) After upgrade I have blow problems(I am using visual studio 2019):,
1.” SciStockChart didn’t render, because an exception was thrown:
Message: AxisCollection.GetAxisById(‘DefaultAxisId’) returned no axis with ID=DefaultAxisId. Please check you have added an axis with this Id to the AxisCollection
” shown int the output
2.when i mousewheel to load more data it will happen “System.AccessViolationException”
3.after when i loaded more data,I use the keyboard key left or key right to prev or next data ,it can’t pinpoint, in the TestDemo every minute is a alone data,i want to use the key left or key right to arrive it.
4.int the TestDemo “SimpleCursorModifier.cs” is control the cursor how to display, when it is cursors.Arrow i click i hope it change cross only, i click again i hope it change Cursors.Arrow,unfortunately it only change in one map(SciStockChart),i must move it is normal.

marks: when i user v4.2 no above questions, Attached(TestDemo.zip) is my example

0 votes
188 views

We bind a view model’s AxisCollection to a surface’s XAxes. But our view model lives longer than the surface. It might get bound to a new surface as users click away (causing surface Dispose), then back to the chart (causing new Surface).

This used to work in SciChart 5.1, but broke when we upgrade to 5.5.

Seems to be because SciChartSurface now does UnsubscribeInnerCollection on that AxisCollection when the surface is disposed.
It means clear and re-add to that AxisCollection no longer automatically set IsPrimaryAxis = true on one axis. Which causes issues with various things that expect one (e.g. modifiers).

We can work around it (set IsPrimaryAxis true ourselves), but does this change mean you’re not expecting one AxisCollection to get re-used across different surface instances (but only one at a time)?

Thanks

0 votes
283 views

I would like add checkbox to collapse/hide VerticalSliceModifier, but can’t find properties that do it.
Here is my code:

              <s:VerticalSliceModifier ShowTooltipOn = "MouseOver">
                    <s:VerticalSliceModifier.VerticalLines>
                        <s:VerticalLineAnnotation X1="{Binding VerticalLinePosition}" ShowLabel="True"   Stroke="White"/>
                    </s:VerticalSliceModifier.VerticalLines>
                </s:VerticalSliceModifier>
0 votes
0 answers
170 views

Hello. When I try to add to curve some points with very small numbers:

curve.DataSeries = chartData;
chartData.Append(1, -6.525999992441564E-04);
chartData.Append(2, -6.5259999988724722E-04);
chartData.Append(3, -6.52599999843273E-04);
chartData.Append(4, -6.5259999970558607E-04);
chartData.Append(5, -6.5259999978135147E-04);

y axis not shown labels whatever Text Formatting property for this is. What I’m doing wrong? I noticed if I add points with -3 order of value, axis labels will show.
Surface description:

<sc:SciChartSurface>
    <sc:SciChartSurface.RenderableSeries>
        <sc:FastLineRenderableSeries Name="curve"/>
    </sc:SciChartSurface.RenderableSeries>
    <sc:SciChartSurface.XAxis>
        <sc:NumericAxis/>
    </sc:SciChartSurface.XAxis>
    <sc:SciChartSurface.YAxis>
        <sc:NumericAxis TextFormatting="E3" AutoRange="Always" x:Name="yAxis"/>
    </sc:SciChartSurface.YAxis>
</sc:SciChartSurface> 
0 votes
0 answers
201 views

Hi.

I am trying to make a chart that looks like the attached image.

All information and images are received dynamically and I have to draw it
(About 1,000 pieces of data are received per second, and I will update this on the chart.)

I’ve used XyScatterRenderableSeries and SpritePointMarker, but I could only draw one image

I want you to know how to approach

Please provide me some guide or tutorials.

Looking forward for your reply.

Thanks.

0 votes
0 answers
176 views

The issue I am running into is that when we hover over the plot, the tooltip does not represent the series that eventually becomes flagged as selected. This occurs when there are several line series grouped closely together.

I am using the default tooltip modifier together with a custom selection modifier.

I was wondering whether there is a way to obtain the tooltip information in our OnModifierMouseDown or somehow reconcile the hit testing of the tooltip modifier and our custom selection modifier (logic below). Our hit test radius is 9 because this seemed to be closest to the default tooltip hittest radius.

(Note our CustomSeriesSelectionModifier overrides ChartModifierBase. It does not override the default seriesselectionmodifier class because we found that it was not giving us adequate control over the selection rules)

Example scenario: Three curves grouped closely together. Hovering over them shows the tooltip for curve 3. Clicking selects curve 1 (even while the tooltip for curve 3 is still visible)

Thanks in advance

public class CustomSeriesSelectionModifier : ChartModifierBase
{
    public CustomSeriesSelectionModifier()
    : base()
    {
        ReceiveHandledEvents = true;
    }

    public override void OnModifierMouseDown( ModifierMouseArgs e )
    {
        base.OnModifierMouseDown( e );

        var point = GetPointRelativeTo( e.MousePoint, ModifierSurface );

        Vector smallestDifference = new Vector( double.MaxValue, double.MaxValue );
        IRenderableSeries hitSeries = null;

        foreach ( var series in this.ParentSurface.RenderableSeries )
        {
            var hitTest = series.HitTest( point, 9.0 );
            if ( hitTest.IsHit )
            {
                Vector diff = Point.Subtract( point, hitTest.HitTestPoint );

                if ( smallestDifference.Length > diff.Length )
                {
                    smallestDifference =  diff ;
                    hitSeries = series;
                }
            }
        }

        if ( hitSeries != null )
        {
            // do custom selection stuff
        }
    }

}
  • John Chow asked 2 months ago
  • last active 2 months ago
0 votes
246 views

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

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

I got this exception:

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

But it should use HighQualityRenderSurface without any exception.

  • Tobias asked 2 months ago
  • last active 2 months ago
0 votes
229 views

Hello Everyone,

I have set up a few annotations in my project and set their visibility to hidden.
I am displaying only the selected one from a combobox I have set up for the user.
But each time the chart does ZoomExtents. all the annotations appear and their visibility resets to visible.
Is this intentional?
Can I disable this option?

Thank you in advance.

0 votes
238 views

Hi, i am trying to read an excel file which contains a few column of data to be plotted. The number of series depends on number of column in the excel file. Hence, the number of series need to be plotted dynamically. Besides, for each series, the data in not plotted in one shot. There is a timer used to plot each data point dynamically.

I am trying to use “ObservableCollection” in this case, i able to create the fastlinerenderableseries and XyDataSeries for each line series and add them into the ObservableCollection. However, i do not know how to have the real time update on each line series.

Please provide me some guide or tutorials.
Looking forward for your reply.
Thanks

  • mian ooi asked 2 months ago
  • last active 2 months ago
0 votes
0 answers
235 views

Hello.
I am trying to use IExtremeRenderContext2D.DrawColoredSprites method to draw my custom series, this is a simplified example:

public class MyCustomSeries2 : CustomRenderableSeries
{
    private readonly WriteableBitmap _bmp;

    public MyCustomSeries2()
    {
        _bmp = new WriteableBitmap(5, 5, 96, 96, PixelFormats.Bgra32, null);

        _bmp.SetPixel(0, 0, Colors.White);
        _bmp.SetPixel(1, 1, Colors.White);
        _bmp.SetPixel(2, 2, Colors.White);
        _bmp.SetPixel(3, 3, Colors.White);
        _bmp.SetPixel(4, 4, Colors.White);

        _bmp.SetPixel(4, 0, Colors.White);
        _bmp.SetPixel(3, 1, Colors.White);
        _bmp.SetPixel(2, 2, Colors.White);
        _bmp.SetPixel(1, 3, Colors.White);
        _bmp.SetPixel(0, 4, Colors.White);
    }

    protected override bool GetIsValidForDrawing()
    {
        return true;
    }

    protected override void Draw(IRenderContext2D renderContext, IRenderPassData renderPassData)
    {
        var extremeRenderContext = renderContext.AsExtremeRenderContext();

        if (extremeRenderContext != null)
        {
            var sprite = renderContext.CreateSprite(_bmp);
            extremeRenderContext.DrawColoredSprites(sprite, new[] {new ColoredVertex {ColorArgb = Colors.White.ToInt(), X = 100, Y = 100}}, 0, 1);
        }
    }
}

So I would expect to see a pixel-perfect cross with sharp edges etc. But it renders as a smoothed mess instead.
How can I make it draw my sprites pixel-to-pixel?

Thanks

0 votes
0 answers
224 views

Hello
My app is composed of tiles that shows charts created dynamically, each creats its own legendModifier like below

var legendModifier = new LegendModifier()
{
Name=”chartLegend”,
ShowLegend = true,
IsEnabled = true,
LegendPlacement = LegendPlacement.Inside,
Orientation = System.Windows.Controls.Orientation.Vertical,
Margin = new System.Windows.Thickness(3),
ShowVisibilityCheckboxes = true,
};

It shows up fine first time, if I created a second chart if I use same dataset, legend is fine in this second chart, but if I use different data in third chart, the legend won’t show up, even if I create a fourth chart chart with same data as the first chart, the legend still doesn’t show up. Attached image, thanks.

0 votes
0 answers
248 views

Dear SciChart Team:

I have a time chart of an oscilloscope application, and new values will be added to the curve over time.

I hope that after adjusting the scales of the X-axis and Y-axis, you can use this perspective to view the canvas, and like AutoRangeType.Always, you can watch the newly added values, but will not change the scale of the X-axis and Y-axis.

Is there any way to achieve this function? Thanks for your suggestion.

0 votes
263 views

Hello, I’m looking to do something similar to your example titled “WPF Chart Vertically Stacked YAxis”, but I’d like to be able to hide a data series and associated axis based on check boxes, and have the remainder of the series fill the empty space.

Do you have any example of something like this?

Thanks.

0 votes
286 views

I have a line chart using an XYDataSeries<DateTime, double> and set the FifoCapacity on the data series to 600. I am sampling the data at a sample rate of 100 ms, which equates to 1 minute of data. When I set the visible range to 2 minutes I can see more data then 1 minute’s worth. In fact, the data series actually has about 1080 points in it. I have verified that the FifoCapacity is in fact 600 on the series.

As new data comes in it is being appended:

_dataSeries.Append(valueSample.Time, valueSample.Value);

Does the chart only overwrite old data if memory constraints require it to? Not sure what is going on.

0 votes
341 views

Hi,
I am evaluating Scichart for high speed real time application. According to ‘Performance tips and tricks’, I enabled VisualXcceleratorEngine in my ScichartSurface. My application was working pretty well when I was using Scichart version 6.0. But when I upgraded it to Scichart version 6.1, my application was crashed every time I run it. I have to disable DirectX engine to run my application.

It seems there is a problem with this file:
..\AppData\Local\SciChart\Dependencies\v6.1.1.13136\x86\VXccelEngine2D.dll

Any thought here?

0 votes
340 views

Hi,

I am using Scichart 6.1 in WPF application. I want to access ScichartSurface in my view model to call some commands like ZoomExtentsModifier or SuspandUpdate. So I created all controls like surface, Axis, Series and annotations in my code according to your example ‘Creating your First SciChartSurface’.
My question is how can I attach this view model to my view [*.xaml file] ? I couldn’t find any example of xaml file in this case.

Regards

0 votes
302 views

Hi,

I have a surface with two x-axes and one y-axis. I am plotting 2 lines, which both have a numerical axis for their x-axis. I would like to be able to pan the lines so that I can align them for further analysis. However, I want the scaling on the two x-axes to stay identical. I have implemented the panning, which was straight forward using the XAxisDragModifier DragMode=”Pan”, so that is sorted. However, the scaling on the two axes is not identical, as each of the two lines have values for different x-ranges. This means that when I overlay them, one is more stretched out relative to the other.

Is there a way to lock the scaling for x-axes? See image below, I would like the red lines to be in sync, and equally big. So that 5 cm on the first x-axis is an equal amount of time as 5 cm on the second x-axis

Thank you,
-Lars

0 votes
308 views

Hi,

I am using gcAllowVeryLargeObjects in my code to support .Net arrays that are more than 2GB in size, they are usually a 2D array.
Would SciChart be able to plot this data?

  • Rakshith M asked 3 months ago
  • last active 3 months ago
0 votes
343 views

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

The tagging Class:

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

The LegendItemTemplate:
<Window.Resources>


<Grid.ColumnDefinitions>

</Grid.ColumnDefinitions>

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

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

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

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

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

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

Kind regards
Martin

0 votes
347 views

Hello,
I am currently using the HighQualityRenderSurface (as seen here: https://support.scichart.com/index.php?/News/NewsItem/View/30) to replace some dynamically drawn maps in an application. I’m wondering if there is a way to make a blended/ gradient brush that can be drawn onto this surface. The application currently uses a three color blended brush drawn onto a WPF canvas.

Edit: Added images as an example of what we are trying to achieve.

zoomed out

zoomed in

1 vote
432 views

Hello,

I just purchased this library 2 days ago, and my first impression is WOW! Very happy with my purchase for my small team. That being said I have a unique design requirement and I’m struggling to figure out how to resolve.

Our app utilizes a cursor indicator in the form of a vertical line, this indicator is used as a visual reference and synced across multiple charts. The behavior needs to be similar to how a RollOver modifier works, however the vertical line needs to stay in place, when the user is not “Mouse – Left Down”. Because the RollOver indicator goes away when not hovering over the chart, I decided to make a custom mouse modifier.

Essentially I created a “vertical line annotation” then disabled the dragging (want it to be moved only by mouse cursor movement, and not requiring the user to drag). Made a custom mouse modifier, where OnMouseModiferDown I set a bool flag, then OnMouseMoodiferMove I get the mouse cursor position and update the X1 binding of the cursor, finally OnMouseModiferUp I set the bool flag to false.

The Issue: With my custom mouse modifier the Vertical Line annotation lags the mouse position, It almost looks like there is some sort of smoothing applied to the movement? Is there a way to turn this effect off or reduce it? Here is a link to the behavior to highlight what I’m seeing.
Video of Behavior

My Code is given below.

Xaml

<local:mouseMove ExecuteOn="MouseMove"/>

<s:VerticalSliceModifier IsEnabled="True">
    <s:VerticalSliceModifier.VerticalLines>
        <s:VerticalLineAnnotation IsEditable="False" LabelPlacement="Axis" ShowLabel="False" X1="{Binding cursorPoint Mode=TwoWay}" Style="{StaticResource sliceStyle}" />
    </s:VerticalSliceModifier.VerticalLines>
</s:VerticalSliceModifier>

C#, Mouse Modifier (MouseMove)

public class mouseMove : XAxisDragModifier
    {
        private bool moveCursor { get; set; }
        public override void OnModifierMouseDown(ModifierMouseArgs e)
        {
            if (e.MouseButtons == MouseButtons.Left)
            {
                moveCursor = true;
            }
        }
        public override void OnModifierMouseUp(ModifierMouseArgs e)
        {
            if (e.MouseButtons == MouseButtons.Left)
            {
                moveCursor = false;
            }
        }
        public override void OnModifierMouseMove(ModifierMouseArgs e)
        {
            if ((Keyboard.Modifiers == ModifierKeys.Control))
            {
                //This is my keybind for the RuberBandXY, ignore this mouse event if Ctrl + Left Mouse Down
            }
            else
            {
                if (moveCursor)
                {
                    // Get mouse point
                    var mousePoint = e.MousePoint;

                    mousePoint = ParentSurface.RootGrid.TranslatePoint(mousePoint, ParentSurface.ModifierSurface);
                    var xDataValue = ParentSurface.XAxis.GetDataValue(mousePoint.X);
                    ParentSurface.Annotations[0].X1 = xDataValue;
                }

            }
        }
    }
0 votes
349 views

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

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

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

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

Solution below

0 votes
496 views

We have big trouble with SciChart 6.1. First was the initial loading time. But there is this async loading workaround.
Now if we try to render a simple (not large) signal into the chart, it hangs in the rendering loop. No exception, high CPU usage.
Any solution for this issue?
enter image description here

It works on some, but it fails on most of our PCs/Laptops.

  • Tobias asked 3 months ago
  • last active 3 months ago
0 votes
336 views

Hello,

I have a list in wich I have another 3 sublists (values for XAxis, values for YAxis, values for ZAxis: x[i] and y[i] and z[i] are the coordinates for a point). With these values I want to create a SurfaceMeshRenderableSeries3D, but what I tried it doesn’t work.
Can you help me with some code?
Thank you!

Here is what I tried:

      int xSize = ListOfPoints.Count;
        int zSize = ListOfPoints.Count;

        var xSteppings = new double[xSize];
        var zSteppings = new double[zSize];

        for (int i = 0; i < xSize; i++)
        {
            xSteppings[i] = ListOfPoints.ElementAt(i).XValue;
            zSteppings[i] = ListOfPoints.ElementAt(i).ZValue;
        }

        var dataSeries = new NonUniformGridDataSeries3D<double>(xSize, zSize, xIndex => xSteppings[xIndex], zIndex => zSteppings[zIndex])


        for (int xi = 0; xi < xSize; xi++)
        {
            for (int zi = 0; zi < zSize; zi++)
            {
                dataSeries[zi, xi] = ListOfPoints.ElementAt(zi).YValue;
            }
        }
        DataSource_SurfaceMesh.DataSeries = dataSeries;
  • asked 3 months ago
  • last active 3 months ago
0 votes
356 views

I am using the CategoryDateTimeAxis to fetch data in minute resolution for a few days and then append realtime data in one second resolution to it. Since the CategoryDateTimeAxis uses equidistance calculations I was wondering if it is possible to override that behaviour somehow? I.e. can I control the distance calculation somehow?

I am currently switching to CategoryDateTimeAxis because DiscontinuousDateTimeAxis provides to much of a performance hit for our use case.

0 votes
406 views

Hi,

I am developing a real-time application which needs multiple charts in some tab Items. I create a user control contain a ScichartSurface and RenderableSeries for each chart. Then apply this user Control as a list item of a list box in each tab. I inspired from 50-Channel EEG example.

The problem is the performance is too low and my tab items have a considerable delay on changing. So if I use one surface per tab item and use stacked YAxis to show series then does it make any difference?

Any insight would be much appreciate.

  • maryam zoj asked 4 months ago
  • last active 4 months ago
0 votes
365 views

I use a simple box annotation to highlight a section candlesticks on a chart. Currently I only see how to set this annotation X1 and X2 to Major grid units (ie 1,2,3,4,5). Since I would like to have this box annotation fully highlight only the desired candlesticks, is there a way to offset this X1 and X2 position by 0.5 so that it would include only (and fully) the desired candles? Apologies if I have missed this in the docs somewhere but I have been unable to find anything to accomplish this.

EDIT: For my x axis I am using a CategoryDateTimeAxis

Thank you.

  • Leland asked 4 months ago
  • last active 4 months ago
0 votes
428 views

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

0 votes
487 views

My application is crashing only on one machine. I’ve narrowed it down to SciChart as my application doesn’t crash when I’ve removed SciChart from the UI.

At first I assumed it was potentially related to the visual accelerator engine; however, I removed that from my surface style and switched back to HighQualityRenderSurface and it still crashes.

It should be noted that I have not yet displayed anything on the SciChartSurface when this happens.

Here is what I initially had.

<Style x:Key="SurfaceStyle" TargetType="s:SciChartSurface">
    <Setter Property="Background" Value="White"/>
    <Setter Property="Padding" Value="0,0,10,0"/>
    <Setter Property="s:VisualXcceleratorEngine.IsEnabled" Value="True" />
    <Setter Property="s:VisualXcceleratorEngine.DowngradeWithoutException" Value="True" />
    <Setter Property="s:VisualXcceleratorEngine.FallbackType" Value="{x:Type s:HighQualityRenderSurface}" />
    <Style.Triggers>
        <Trigger Property="componentModel:DesignerProperties.IsInDesignMode" Value="False">
            <Setter Property="s3d:DirectXHelper.TryApplyDirectXRenderer" Value="True" />
            <Setter Property="s3d:DirectXHelper.FallbackType" Value="{x:Type s:HighQualityRenderSurface}" />
        </Trigger>
    </Style.Triggers>
</Style>

This is after I removed the Xccelerator.

<Style x:Key="SurfaceStyle" TargetType="s:SciChartSurface">
    <Setter Property="Background" Value="White"/>
    <Setter Property="Padding" Value="0,0,10,0"/>
    <Setter Property="RenderSurface">
        <Setter.Value>
            <s:HighQualityRenderSurface />
        </Setter.Value>
    </Setter>
</Style>

Any help is greatly appreciated. This is a time sensitive problem. Thanks.

0 votes
0 answers
351 views

My application is an oscilloscope application. It is a two-dimensional graph, the X axis is TimeSpanAxis, and the Y axis is NumericAxis.
When I add data to the DataSeries of the curve, if the value is too large, such as: double.MaxValue, double.Minvalue, etc., the curve will be presented as an approximate value, as shown in the figure(Input: 9007199254740992; Display: 9007199254740990).

What should I do to accurately display the maximum or minimum values, such as: double.MaxValue (1.7976931348623157E + 308), ulong.MaxValue (18446744073709551615), … etc.

Showing 1 - 50 of 2k results