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

1 vote
9k views

Hi. I’m trying to add 3DChart to my vue project. And I have a question about the configuration. Can I download .data and .wasm files from the CDN.

For 2D charts , I’ve used recomendation of your release v.2.2:
SciChartSurface.useWasmFromCDN()
It works for me. How I can use CDN for SciChart3DSurface?

0 votes
10k views

Hi,

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

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

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

Thanks for your help
Jean-Charles

0 votes
16k views

Hi

what I’m trying to achieve is displaying Candlesticks in a real time stock chart with added space between price bars. This empty space is very important as it’ll allow me to show further information regarding volumes per price level.

You can have a better understanding of what I’m trying to achieve by having a look at the following image.

I’m already at the point where I’m rendering both the candlesticks and labels correctly (via textannotations). It’s just that the whole graph is crowded and impossible to understand as annotations and price bars overlaps each other.

Thank you for your support,
Michele

0 votes
11k views

Hi all,

  1. How to find out chart’s zoom percentage (chart has multiple X and multiple Y axes.)?
  2. How can I programmatically pan a linear chart, which have a point outside of a visible range?
  3. How can I check is the point outside of a visible range?

Thanks,
Arthur

1 vote
13k views

I want to be able to set opacity on a FastColumnRenderableSeries so that it doesn’t hide the values of other series rendered on the same chart. I have tried setting the Opacity property on the FillBrush but this is ignored. I have also tried setting the UIElement.Opacity property on the FastColumnRenderableSeries itself but that is also ignored.

Both FastMountainRenderableSeries and StackedColumnRenderableSeries can do this by setting UIElement.Opacity on the series itself but it doesn’t seem to work with FastColumnRenderableSeries.

Anyone come across this before?

I guess there is a workaround if you ensure your column series is rendered first, but this is trickier in my case as I am using databinding to populate my series and I don’t know until runtime what series will need to be rendered.

many thanks,

Bill

  • Bill Dines asked 9 years ago
  • last active 7 years ago
0 votes
7k views

Hello

Is there a way to hide certain parts of a FastLineRenderableSeries?
Imagine a vertical line intersecting the plot. Everything left of the line is rendered and everything right is not visible.

I came up with the following ideas:
– Implement a PaletteProvider which returns a transparent color for parts of the series to hide. This did not work: The plot was rendered in white color instead of transparent.
– Modify the underlying XyDataSeries and remove points which should be hidden.

Are there any other options?

Thanks for any assistance.
Daniel

0 votes
4k views

After upgraded SciChart to SciChart_iOS_SDK_3.0.0.5074, using rollover modifier on a SciChart surface which was embedded into a scroll view will crash the app. It crashed when user scroll horizontally on a SciChart surface inside a horizontal scrollable scrollview. It is the same with the vertically scrollable scrollview.

2020-03-09 10:14:15.489302+0800 ******[4835:62890] -[SCIRolloverModifier onTouchesCancelled:]: unrecognized selector sent to instance 0x60000ba28500

2020-03-09 10:14:15.503967+0800 *******[4835:62890] *** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[SCIRolloverModifier onTouchesCancelled:]: unrecognized selector sent to instance 0x60000ba28500’
*** First throw call stack:
(
0 CoreFoundation 0x00007fff23c7127e exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff513fbb20 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23c91fd4 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x00007fff23c75c4c
forwarding + 1436
4 CoreFoundation 0x00007fff23c77f78 _CF_forwarding_prep_0 + 120
5 SciChart 0x000000011139aaba -[SCITouchModifierBase onEvent:] + 186
6 SciChart 0x000000011135dfd8 +[SCIEventManager raiseOnEvent:toTarget:isMaster:] + 267
7 SciChart 0x000000011132d03f __38-[SCIEventDispatcher p_SCI_commonInit]_block_invoke + 165
8 SciChart 0x000000011132d45d -[SCIEventDispatcher raiseOnEvent:withAction:] + 569
9 SciChart 0x000000011133fa94 -[SCIChartSurfaceBase p_SCI_onTouchEvent:] + 233
10 SciChart 0x000000011133f996 -[SCIChartSurfaceBase touchesCancelled:withEvent:] + 209
11 UIKitCore 0x00007fff480bf863 forwardTouchMethod + 340
12 UIKitCore 0x00007fff480bf974 -[UIResponder touchesCancelled:withEvent:] + 49
13 UIKitCore 0x00007fff480bf863 forwardTouchMethod + 340
14 UIKitCore 0x00007fff480bf974 -[UIResponder touchesCancelled:withEvent:] + 49
15 UIKitCore 0x00007fff480a4a43 __106-[UIApplication _cancelViewProcessingOfTouchesOrPresses:withEvent:sendingCancelToViewsOfTouchesOrPresses:]_block_invoke + 609
16 UIKitCore 0x00007fff480a429e -[UIApplication _cancelTouchesOrPresses:withEvent:includingGestures:notificationBlock:] + 1163
17 UIKitCore 0x00007fff480a47ac -[UIApplication _cancelViewProcessingOfTouchesOrPresses:withEvent:sendingCancelToViewsOfTouchesOrPresses:] + 158
18 UIKitCore 0x00007fff47c37f2f -[UIGestureEnvironment _cancelTouches:event:] + 707
19 UIKitCore 0x00007fff47c40115 -[UIGestureRecognizer _updateGestureForActiveEvents] + 1779
20 UIKitCore 0x00007fff47c31eda _UIGestureEnvironmentUpdate + 2706
21 UIKitCore 0x00007fff47c3140a -[UIGestureEnvironment _deliverEvent:toGestureRecognizers:usingBlock:] + 467
22 UIKitCore 0x00007fff47c3117f -[UIGestureEnvironment _updateForEvent:window:] + 200
23 UIKitCore 0x00007fff480d04b0 -[UIWindow sendEvent:] + 4574
24 UIKitCore 0x00007fff480ab53b -[UIApplication sendEvent:] + 356
25 UIKit 0x0000000114ad2bd4 -[UIApplicationAccessibility sendEvent:] + 85
26 UIKitCore 0x00007fff4812c71a __dispatchPreprocessedEventFromEventQueue + 6847
27 UIKitCore 0x00007fff4812f1e0 __handleEventQueueInternal + 5980
28 CoreFoundation 0x00007fff23bd4471 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
29 CoreFoundation 0x00007fff23bd439c __CFRunLoopDoSource0 + 76
30 CoreFoundation 0x00007fff23bd3b74 __CFRunLoopDoSources0 + 180
31 CoreFoundation 0x00007fff23bce87f __CFRunLoopRun + 1263
32 CoreFoundation 0x00007fff23bce066 CFRunLoopRunSpecific + 438
33 GraphicsServices 0x00007fff384c0bb0 GSEventRunModal + 65
34 UIKitCore 0x00007fff48092d4d UIApplicationMain + 1621
35 ****** 0x000000010b51505f main + 143
36 libdyld.dylib 0x00007fff5227ec25 start + 1
37 ??? 0x0000000000000001 0x0 + 1
)

  • Gary Chan asked 4 years ago
  • last active 4 years ago
1 vote
8k views

I have basic printing working based on the XPS printing walkthrough. However the legend does not show. I’m not sure what to do about that. Any ideas on how to handle that?

1 vote
231 views

We managed to create a functioning chart, but sometimes when we first ran the chart it produced this error, followed by the chart being completely unable to display.

We attached the error message produced in DevTools, the expected outcome and the actual outcome when the error occurred.

1 vote
13k views

Hallo,

I have a rollovermodifier wich only moves when i press the leftmousebutton down. This means that the rollover always stays at one place unless i press a mouse button. However as soon as the mouse leaves the chartarea the rollovermodifier disapears. Is there a way to avoid this behaivour? I would like the rollover to always stay visible.

I would also like to add a second rollovermodifier and have it move only when i click on the rollover. But after one whole day of trying i keep getting the error:
“Specified Visual is already a child of another Visual or the root of a CompositionTarget.”

In this methods line:

public override void OnModifierMouseMove(ModifierMouseArgs e)
{
     if(d) base.OnModifierMouseMove(e);
}
0 votes
14k views

Hi,

i have an horizontal line annotation in my chart at a fixed value (some hint for the user “minimum level”) that i always want to be visible. Thus, i’d like to set the axis/chart so that it always shows a range from 0 to 0.05, or larger range if the chart values exceed this range.
I’ve tried to set-up the VisualRangeLimit property to fit my needs but could not achieve my goal.

<s:NumericAxis AxisAlignment="Left"
               Id="MagnitudeAxis"
               VisibleRangeLimit="0, 0.05"
               AxisTitle="{lex:Loc MagnitudeAxisLabel}" />

Are there other options to achieve this or am i doing somthing wrong?

0 votes
14k views

I’m trying to render the SciChartSurface control to a BitmapSource based on the tutorial  http://http://www.scichart.com/screenshots-xps-printing-x-axis-text-labels/ .

The example uses a View to start the rendering from but this is something I wish to prevent, doing everything in C# without any use of XAML.

I got to the point that the chart is rendered properly with the exception of the X and Y-Axis. I also get the error message ‘SciChartSurface didn’t render, Because the SciChartSurface Viewport Size is not valid (e.g. 0 sized). ‘ twice, most likely both originating from the rendering of each axis.

I got the following code so far:

var chart = new SciChartSurface
{
    Background = new SolidColorBrush(Colors.White),
    Foreground = new SolidColorBrush(Colors.Black),

    XAxis = new NumericAxis()
    {
        AutoRange = AutoRange.Never,
        AxisTitle = "axis X",
        Background = new SolidColorBrush(Colors.White),
        TickTextBrush = new SolidColorBrush(Colors.Black),
        GrowBy = new DoubleRange(0.025, 0.025),
        VisibleRange = new DoubleRange(-1, 6),
    },

    YAxis = new NumericAxis()
    {
        AutoRange = AutoRange.Never,
        AxisTitle = "axis Y",
        Background = new SolidColorBrush(Colors.White),
        TickTextBrush = new SolidColorBrush(Colors.Black),
        GrowBy = new DoubleRange(0.025, 0.025),
        VisibleRange = new DoubleRange(0, 15),
    },

    Width = requestedSize.Width,
    Height = requestedSize.Height,

    // RenderPriority.Immediate is required to print or render to bitmap any SciChartSurface that has not been 
    // added to the Visual Tree. This ensures that re-draw events are processed synchronously.
    RenderPriority = RenderPriority.Immediate,
};

// ApplyTemplate is required on the newly created chart to ensure the theme is applied
chart.ApplyTemplate();

// Force the Loaded event for the SciChartSurface
chart.OnLoad();

chart.SeriesSource = new ObservableCollection();
var data = new XyDataSeries<int, int>();
data.Append(0, 10);
data.Append(1, 5);
data.Append(2, 9);
data.Append(3, 12);
data.Append(4, 2);
data.Append(5, 6);
chart.SeriesSource.Add(new ChartSeriesViewModel(data, new FastColumnRenderableSeries
{
    FillBrush = new SolidColorBrush(Colors.Gray),
}));

chart.Measure(new Size(chart.Width, chart.Height));
chart.Arrange(new Rect(new Point(0, 0), chart.DesiredSize));
chart.UpdateLayout();

// Trigger a redraw
chart.InvalidateElement();

// Force the labels of the axes to be correctly placed
new UserControl { Content = chart }.UpdateLayout();

This renders everything from the gridlines, columns, axis titles and minor/major-ticks as expected. However the labels on the axis are all printed in the left-bottom (x-axis) and top-right (y-axis) corners instead of uniformly divided over the axis.

My conclusion therefore is that the Viewport is crucial to the axis label placement but I’m not aware on how to set this correctly in code. Any suggestions on how to do so would be appreciated.

1 vote
5k views

I have a huge dataset to display in graphical form starting from the daily data for 30 days and then to each minute when zoom in, what is the best way to plot this data using zoom in functionality

0 votes
9k views

Performance degrades at a much higher rate when adding FastBandSeries (with multiple axes) when compared to FastLineSeries (with one Y-Axis)

I have this demo project that shows the rendering stuttering that occurs when panning the FastBand Chart. To ensure that this is not some performance hit of purely having multiple Y-Axes, you can simply add one series and the behavior persists. (As well as I know there are examples with multiple Y-Axes with line series that are blazing fast).

I would really like to get to the bottom of this as the one chart type is dragging down the performance of our product overall.

Below the demo project is attached.

It has been 3 weeks since I’ve posted with no input or feedback — quite unacceptable.

0 votes
10k views

Hi,

By default I get a slight gradient on all chart surfaces(see attached image). Is there any way to get rid of it?

Thanks & Regards!

0 votes
932 views

I have a 3D surface chart.

I programmatically add some custom entities derived from BaseSceneEntity, invoked by a user action on some other part of my UI.

When I add the items, to get the screen to refresh I use this loop after adding a number of entities:

        foreach(var item in _zone_items)
        {
            item.InvalidateScene();
        }

_zone_items is a List holding the custom entities which have been added to the chart using

MainSurfaceChart.Viewport3D.RootEntity.Children.Add(cube);

This works fine, and even if I have removed some items from the _zone_items list, the screen still refreshes correctly and shows only the current items in _zone_items (and in RootEntity.Children)

The problem I have is when I remove all items from _zone_items. When I do this I use this loop:

        foreach (var item in _zone_items)
        {
            MainSurfaceChart.Viewport3D.RootEntity.Children.Remove(item);
        }
        _zone_items.Clear();

(I use Remove(item) rather than Clear as in future I may have other entities which are not in _zone_items).
but now I have no way to refresh the screen as I have no entities to call InvalidateScene(). If I touch the mouse on the chart surface and move just slightly it re-renders and the entities are not re-drawn – so they have been removed.

How can I get the chart to refresh/re-render so as to remove the entities which are no longer in the RootEntity.Children? I would have hoped removing them from Children would remove them from the screen?

Thanks
Andrew M

0 votes
0 answers
3k views

Hi All,
Im trying to kind of reproduce trademarkers example, but i cant get the datacontext of Annotation bound to show the tooltip data.

this is the way im doing things:

first i let the user select an area to place a box annotation via SimpleSelectionModifier

View XAML

s:SciChartSurface x:Name="_chart" Annotations="{s:AnnotationsBinding Annotations}"
   <!-- axis not showed for legibility !--
    s:SciChartSurface.ChartModifier 
      s:ModifierGroup
          mods:SimpleSelectionModifier IsEnabled="{Binding EnableAnnotation}"
                             i:Interaction.Triggers
                                i:EventTrigger EventName="RangeSelected"  
                                                            SourceObject="{Binding RelativeSource={RelativeSource  AncestorType={x:Type 
                                                                                            mods:SimpleSelectionModifier }}}"
                                    prism:InvokeCommandAction Command="{Binding RangeSelectedEvent}"  TriggerParameterPath="Coordinates"/
                               /i:EventTrigger
                            /i:Interaction.Triggers
                        /mods:SimpleDataPointSelectionModifier
        /s:ModifierGroup
       /s:SciChartSurface.ChartModifier
/s:SciChartSurface

On the VieModel side i’ve got this property to save CustomAnnotationViewmodels , bound to the scichart.Annotations property

private ObservableCollection<IAnnotationViewModel _annotations = new   ObservableCollection<IAnnotationViewModel>();
public ObservableCollection<IAnnotationViewModel> Annotations
 {
    get { return _annotations; }
    set { SetProperty(ref _annotations, value); }
}

and this Command executed on the rangeSelectedEvent when i create the annotation on the coordinates selected by the user viewmodel and add some custom ddata

   void ExecuteRangeSelectedEvent(Coordinates parameter)
        {
            var annotation = new CustomAnnotationViewModel
            {
                IsEditable = true,
                CanEditText = true,

                X1 = parameter.X1,
                X2 = parameter.X2,
                Y1 = parameter.Y1,
                Y2 = parameter.Y2,
                Data = new Data("test", "text tooltip", DataType.CoolData)
            };
            Annotations.Add(annotation);
            EnableAnnotation = false;
        }

The CustomAnnotationViewModel is based on the BuyMarkerAnnotationViewModel of the tradeMarkers Example.

and interface to support Data management and CustomAnnottionVIewModel that implementado the interface

public interface ISupportData : IAnnotationViewModel
{
    Data Data { get; set; }
}

 public class CustomAnnotationViewModel : CompositeAnnotationViewModel,  ISupportData
{
    private Wave _data;

    public Wave Data
    {
        get { return _data; }
        set
        {
            _data = value;
            OnPropertyChanged("Data");
        }
    }

    public override Type ViewType
    {
        get { return typeof(CustomAnnotation); }
    }
}

and finally de XAML on CustomAnnotation where everything should be bound

 s:CompositeAnnotation x:Class="CustomAnnotation"
                           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"
                           X1="{Binding X1, Mode=TwoWay}"
                           Y1="{Binding Y1, Mode=TwoWay}"
                           X2="{Binding X2, Mode=TwoWay}"
                           Y2="{Binding Y2, Mode=TwoWay}"
                           AnnotationCanvas="BelowChart"
                           IsEditable="true"

        s:CompositeAnnotation.Annotations 
            s:BoxAnnotation Background="Coral"
                             CoordinateMode="Relative"
                             Opacity="0.3"
                             X1="0"
                             X2="1"
                             Y1="0"
                             Y2="1" /
            s:LineArrowAnnotation CoordinateMode="Relative"
                                   Stroke="Coral"
                                   StrokeDashArray="2,4"
                                   StrokeThickness="1"
                                   X1="0"
                                   X2="1"
                                   Y1="0.5"
                                   Y2="0.5" /
            s:LineArrowAnnotation CoordinateMode="Relative"
                                   Stroke="Coral"
                                   StrokeDashArray="2,4"
                                   StrokeThickness="1"
                                   X1="0.5"
                                   X2="0.5"
                                   Y1="0"
                                   Y2="1" /
            s:TextAnnotation x:Name="MeasureText"
                              Background="CornflowerBlue"
                              CoordinateMode="Relative"
                              CornerRadius="3"
                              Foreground="White"
                              HorizontalAnchorPoint="Center"
                              X1="0.5"
                              Y1="1"

              ToolTipService.ToolTip
                    ToolTip Foreground="#222"
                        Grid Margin="6" DataContext="{**Binding Data**}"
                            Grid.RowDefinitions
                                RowDefinition Height="Auto" /
                                RowDefinition Height="Auto" /

                            /Grid.RowDefinitions
                            Grid.ColumnDefinitions
                                ColumnDefinition Width="Auto" /
                                ColumnDefinition Width="Auto" /
                                ColumnDefinition Width="Auto" /
                            /Grid.ColumnDefinitions
                            TextBlock Grid.Row="0" Grid.Column="0" Text="Type: " /
                            TextBlock Grid.Row="1" Grid.Column="0" Text="Text: " /
                            TextBlock Grid.Row="0" Grid.Column="1" Text="{Binding Type}" Foreground="#FF00B400"/
                            TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding LabelText}" /

                        /Grid
                    /ToolTip
                /ToolTipService.ToolTip
            /s:TextAnnotation
        /s:CompositeAnnotation.Annotations
    /s:CompositeAnnotation

I dont mind if everything is shown on tooltip or other way. but when oi run it a get this binding error.

Data is not found on ViewModel

Any ideas? Can anybody see where im making a mistake?
any help would be very appreciated.
thanks

0 votes
11k views

Hi,

we’ve just update scichart from 5.1.0.11425 -> 5.2.1.11757

Since this, the renderable series is not updating when the bound property change is notified.

anybody else seen this?

            <s:XyScatterRenderableSeries DataSeries="{Binding AcceptableDataPoints}" s:TooltipModifier.TooltipTemplate="{StaticResource XyTooltipTemplate}">
                <s:XyScatterRenderableSeries.PointMarker>
                    <s:EllipsePointMarker Width="9" Height="9"  Fill="#AAFFFFFF" Stroke="SteelBlue" StrokeThickness="2" ></s:EllipsePointMarker>
                </s:XyScatterRenderableSeries.PointMarker>
            </s:XyScatterRenderableSeries>
0 votes
7k views

Hello,

Are there any plans to add a percentage X Axis?

For example:

Comparative Percent Performance Chart

The chart plots the percent change for each series starting at the beginning of the view window.

Thanks.

  • Paul R asked 7 years ago
  • last active 7 years ago
0 votes
0 answers
16k views

Hello again. We have an application that has many tabs with scichart surface. Our goal is creating a report: screenshots of all scichart surfaces in tabs. But we found out, when scichartsurface was not active, all tick labels didn’t render on screenshots.
Here is our code snippet for creating screenshot:

double actualHeight = source.RenderSize.Height;
            double actualWidth = source.RenderSize.Width;
            double renderHeight = actualHeight * scale;
            double renderWidth = actualWidth * scale;

            RenderTargetBitmap renderTarget = new RenderTargetBitmap((int)renderWidth, (int)renderHeight, 96, 96, PixelFormats.Pbgra32);
            VisualBrush sourceBrush = new VisualBrush(source);
            DrawingVisual drawingVisual = new DrawingVisual();

            using (var drawingContext = drawingVisual.RenderOpen())
            {
                drawingContext.PushTransform(new ScaleTransform(scale, scale));
                drawingContext.DrawRectangle(sourceBrush, null, new Rect(new Point(0, 0), new Point(actualWidth, actualHeight)));
            }
            renderTarget.Render(drawingVisual);
            JpegBitmapEncoder jpgEncoder = new JpegBitmapEncoder();
            jpgEncoder.QualityLevel = quality;
            jpgEncoder.Frames.Add(BitmapFrame.Create(renderTarget));

            Byte[] _imageArray;
            using (MemoryStream outputStream = new MemoryStream())
            {
                jpgEncoder.Save(outputStream);
                _imageArray = outputStream.ToArray();
            }
            return _imageArray;

How can we fix it?

Thanks in advance

  • Egor asked 8 years ago
0 votes
5k views

Hi All,

Are there any examples of a 3D column chart where the Axis are prevented from overlapping the data? Also want to add a cursor and be able to select a column. I’m using NumericAxis3d and LogarithmicNumericAxis3D.

Thanks
Mark.

0 votes
4k views

Using Following Code to Construct Sync Multiple Graphs

   let _rangeSync = SCIAxisRangeSynchronization()
    let _zoomExtentsModifierSync = SCIMultiSurfaceModifier(modifierType: SCIZoomExtentsModifier.self)
    let _pinchZoomModifierSync = SCIMultiSurfaceModifier(modifierType: SCIPinchZoomModifier.self)
    let _xDragModifierSync = SCIMultiSurfaceModifier(modifierType: SCIXAxisDragModifier.self)
    let _yDragModifierSync = SCIMultiSurfaceModifier(modifierType: SCIYAxisDragModifier.self)
    let _rolloverModifierSync = SCIMultiSurfaceModifier(modifierType: SCIRolloverModifier.self)

func getGraphs() -> [(String,CustomClassThatHoldsData)] {

    let keys = Array(historicChats!.data!.keys)
    var arrayOfTuples = [(String,CustomClassThatHoldsData)]()
    //
    for key in keys {
    arrayOfTuples.append((key, (self.historicChats?.data![key])!))
    }
    return arrayOfTuples
}



 func drawMultichartWithDefault() {

        for data in arrayOfGraphs {
        let chart = SCIChartSurface(frame: CGRect(x: 0, y: 0, width: self.stkCharts.frame.width-50, height: 200))
        initChart(chart, data.1)
        self.stkCharts.addArrangedSubview(chart)
        }

    }

fileprivate func initChart(_ chart: SCIChartSurface, _ data: VitalHistoryData) {
    SCIUpdateSuspender.usingWithSuspendable(chart) {
    let xAxis = SCIDateTimeAxis()
    xAxis.growBy = SCIDoubleRange(min: SCIGeneric(0.1), max: SCIGeneric(0.1))

    let yAxis = SCINumericAxis()
    yAxis.growBy = SCIDoubleRange(min: SCIGeneric(0.1), max: SCIGeneric(0.1))

    let dataSeries = SCIXyDataSeries(xType: .dateTime, yType: .double)
    let dataArray = data.getDataArray()
    for tuple in dataArray {
    dataSeries.appendX(SCIGeneric(tuple.1), y: SCIGeneric((tuple.0)))
    }

    let rSeries = SCIFastLineRenderableSeries()
    rSeries.dataSeries = dataSeries
    rSeries.strokeStyle = SCISolidPenStyle(color: UIColor.green, withThickness: 1.0)

    chart.xAxes.add(xAxis)
    chart.yAxes.add(yAxis)
    chart.renderableSeries.add(rSeries)
    chart.chartModifiers = SCIChartModifierCollection(childModifiers: [self._xDragModifierSync, self._yDragModifierSync, self._pinchZoomModifierSync, self._zoomExtentsModifierSync, self._rolloverModifierSync])

    self._rangeSync.attachAxis(xAxis)
    }
}

On 2 graphs it works quite fine but with the more then 2 graphs it starts lagging

  • Atiq Tahir asked 5 years ago
  • last active 4 years ago
0 votes
3k views

Just trying to run the demo using these instructions: https://github.com/abtsoftware/scichart.ios.examples.

It doesn’t work I’m getting “Failed to emit precompiled header” and “SciChart/SciChart.h file not found”

0 votes
6k views

Dear all,

I am checking in chart demo sample how to use mvvm to bind the chart to a datasource for the series.

I have seen in the constructor of the viewmodel that an instance of ViewportMnager is created as below :

ViewportManager = new DefaultViewportManager();

Then it is used in the folloying methods :

    // Called when the AppendDataCommand is invoked via button click on the view
    private void AppendData()
    {
        var newData = _dataSource.GetRandomWalkSeries(50);

        _dataSeries0.Append(newData.XData, newData.YData);
        ViewportManager.ZoomExtents();
    }

Could you pleas explain what this viewport is doing and what will happen if ZoomExtends() is not called here ?

  • sc sc asked 6 years ago
  • last active 6 years ago
1 vote
5k views

I created demo project using SurfaceMeshRenderableSeries3D but there is bugs or glitch. I have click listener.

image.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (value == 0) {
layout.setVisibility(View.GONE);
value = 1;
} else {
value = 0;
layout.setVisibility(View.VISIBLE);
}
}
});

Above is basic GONE and VISIBLE logic, when i click image first time layout view is gone and SciChartSurface3D get full screen below is xml code.

<LinearLayout
       android:layout_width="match_parent"
       android:layout_height="match_parent"
       android:orientation="vertical">

      <ImageView
          android:id="@+id/image"
          android:src="@mipmap/ic_launcher_round"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"/>

      <LinearLayout
          android:background="@color/design_default_color_secondary_variant"
          android:visibility="visible"
          android:orientation="vertical"
          android:id="@+id/layout"
          android:layout_width="match_parent"
          android:layout_height="100dp"/>

      <com.scichart.charting3d.visuals.SciChartSurface3D
          android:id="@+id/chart3d"
          android:layout_width="match_parent"
          android:layout_height="match_parent" />

   </LinearLayout>

My issues is when i click image the Scichart is getting full but with some black screen glitch, I attach before and after click event images.

Thanks in advance i am waiting for your answer.

0 votes
5k views

I have tried, numerous times, to understand your example “Series with Metadata,” but to my untrained eye it seems to be doing a lot of things at once, which makes it hard to understand. I am fairly inexperienced with WPF and prefer not to use MVVM. I have figured out most of what I need. But I haven’t figured out how to add metadata to existing data and display the metadata on a chart.

Do you have a simple example of adding metadata to an existing OhlcDataSeries and then displaying the metadata using a cursor tool tip?

Your help would be greatly appreciated,
Steven

  • Steven M asked 5 years ago
  • last active 5 years ago
0 votes
19k views

Hi

I’m using auto range on a numeric axis. The data can be anything, but I want the axis to never have a range of less than 5.
E.g.: -100 to -95
E.g.: 17 to 22
E.g.: 0 to 5
etc.

What do I need to set to be able to do this? I have tried MinimalZoomConstrain and VisibleRangeLimit without success. Preferably something to set in XAML on my axis.

Thanks.

0 votes
5k 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
10k views

Hi,

I have a form with two chart surfaces each displaying a chart. I have set their visible ranges to be the same but they have different Y Axis values. This causes the YAxis not to line up. Is there a way I can have the YAxis of both surfaces line up. I’m trying to sync both surfaces and am using the MouseManager.MouseEventGroup to do it. I set the Chart modifiers for the top chart in xaml like this:

<s:SciChartSurface.ChartModifier>
<s:ModifierGroup s:MouseManager.MouseEventGroup="MyCustomGroup">
<s:AnnotationCreationModifier x:Name="annotationCreation" AnnotationCreated="OnAnnotationCreated" YAxisId="Y1"/>
<s:XAxisDragModifier ClipModeX="None" />
<s:YAxisDragModifier IsEnabled="True" ReceiveHandledEvents="True" AxisId="Y1"/>
<s:ZoomPanModifier IsEnabled="True" ReceiveHandledEvents="True" />
<s:CursorModifier IsEnabled="{Binding ShowCursor}" ShowAxisLabels="False" ShowTooltip="True" ReceiveHandledEvents="True" />
<s:MouseWheelZoomModifier ReceiveHandledEvents="True" />
<s:ZoomExtentsModifier ExecuteOn="MouseDoubleClick" />
</s:ModifierGroup>
</s:SciChartSurface.ChartModifier>

and the bottom chart is created in the view model like this:

var scs = new SciChartSurface();
scs.XAxis = new CategoryDateTimeAxis() { DrawMajorGridLines = false, DrawMinorGridLines = false, AutoRange = AutoRange.Never,VisibleRange = ChartVisibleRange};
scs.YAxis = new NumericAxis() { Id = "Y1", DrawMajorGridLines=false,DrawMinorGridLines=false };
scs.Style = (System.Windows.Style)this.chartForm.sciChartControl.Resources["SciChartSurfaceStyle"];
SciChartGroup.SetVerticalChartGroup(scs, "myGroup");
var _chartModifiers = new ModifierGroup();

                MouseManager.SetMouseEventGroup(_chartModifiers, &quot;MyCustomGroup&quot;);

                ChartModifierBase[] chmodColl = this.GetDefaultChartModifiers();
                foreach (ChartModifierBase chmod in chmodColl)
                {
                    _chartModifiers.ChildModifiers.Add(chmod);

                }
                scs.ChartModifier = _chartModifiers;

and the function returning chartmodifiers returns

private ChartModifierBase[] GetDefaultChartModifiers()
{
var chartModifiers = new ChartModifierBase[7];

        XAxisDragModifier xAxisModifier = new XAxisDragModifier();
        xAxisModifier.ClipModeX = ClipMode.None;

        ZoomPanModifier zModifier = new ZoomPanModifier();
        zModifier.IsEnabled = true;
        zModifier.ReceiveHandledEvents = true;

        MouseWheelZoomModifier mwzoom = new MouseWheelZoomModifier();
        mwzoom.ReceiveHandledEvents = true;

        ZoomExtentsModifier zEModifier = new ZoomExtentsModifier();
        zEModifier.ExecuteOn = ExecuteOn.MouseDoubleClick;

        CursorModifier curModifier = new CursorModifier();
        curModifier.IsEnabled = false;
        curModifier.ShowAxisLabels = true;
        curModifier.ShowTooltip = false;
        curModifier.ReceiveHandledEvents = true;


        SeriesValueModifier serModifier = new SeriesValueModifier();
        //serModifier.YAxisId = &quot;Y1&quot;;
        serModifier.IsEnabled = true;

        AnnotationCreationModifier annoModifier = new AnnotationCreationModifier();
        annoModifier.YAxisId = &quot;Y1&quot;;
        annoModifier.IsEnabled = true;
        annoModifier.AnnotationCreated += annoModifier_AnnotationCreated;

        chartModifiers[0] = xAxisModifier;
        chartModifiers[1] = zModifier;
        chartModifiers[2] = mwzoom;
        chartModifiers[3] = zEModifier;
        chartModifiers[4] = curModifier;
        chartModifiers[5] = annoModifier;
        chartModifiers[6] = serModifier;

        return chartModifiers;
    }

The problem is both the charts don’t seem to be synchronised. When I zoom/pan the top chart, nothing happens in the MACD chart and vice versa. What am I doing wrong here ?

I have attached a screenshot of my application. Thanks for patiently answering all my queries so far, you guys are awesome.

0 votes
17k views

Hello,
I would like to allow user click on Legend and highlight the corresponding Series on the chart but I don’t know if this feature is supported or not.

I tried to add mouse events to the Legend Modified but it seems like mouse events are not triggered

This is the simple code that I am using

<s:LegendModifier x:Name="chlLegend" ShowLegend="True" LegendPlacement="Top" Orientation="Horizontal" MouseDown="chlLegend_MouseDown" ScrollViewer.HorizontalScrollBarVisibility="Auto" />

Before investigating more I would like to ask you if you have any hints which is the correct way to implement this behavior.
Is the LegendModifier suitable for this or should I override instead the Legend Control Template?

Thank you in advance for the support

0 votes
6k views

I use the surface.exportToBitmap () to get the picture, but the AxisMarker doesn’t match the actual display, and there’s no sharp arrow. How to solve?

0 votes
6k views

Hello, I’d like to know how is possible to draw Axis Bands from one data point to another.

I’m currently creating real-time stock charts and I need to display the after-hours with a different band.

Thanks in advanced for your help,

0 votes
3k views

Hi,
Im tried to convert date into xAxis using this tutorial

https://www.scichart.com/documentation/android/current/webframe.html#Axis%20APIs%20-%20Convert%20Pixel%20to%20Data%20Coordinates.html

but i got this error

Java.lang.RuntimeException: Unable to start activity ComponentInfo{}: java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.Object com.scichart.data.numerics.math.IMath.fromDouble(double)' on a null object reference

here my code

https://gist.github.com/ngiyus/4590c009261a28dba2c8b10e123a97f3

0 votes
7k views

Hi,

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

Best regards,
Jean-Charles Durand

1 vote
11k views

I try using the EllipsePointMarker with the following code

new EllipsePointMarker
{
   Width = 4,
   Height = 4,
   StrokeThickness = 2
}

the markers usually draw looking like a plus sign or a diamond.

It only looks like a circle if I use a Width and Height of 8.

See attached.

0 votes
4k views

Newbie here…how would I fix the placement of the first and last tick label so that the tick label appears below the major grid line instead of left/right of it? Can’t seem to find an example that shows this.

For the shown graphs, the x-axis is actually a second static numeric axis while there is an additional time axis that is not shown.
So I believe changing the visible range of the visible axis is not an option as then it would no longer line up with hidden axis which has the points.

See attached image for illustration of problem.

0 votes
5k views

Hi there,

I am trying to generate a stacked columns chart to display the drivers’ stints during a moorsport race. The problem that I am unable to solve is related to the width of the columns of the graph. Although I am setting datapointwidth = 1.0, so that the column takes all the space, this only happen if I display one driver/column (see images). When adding new driver/columns, the columnwidth of every column shrinks and does not take up all the space (see images). It looks like the datapointwidh follows the next relationship :

Datapointwidth = 1 / Number of Columns

Is there anyway I can force the stackedcolumnrenderableseries to always have a datapointwidth of 1.0?

0 votes
6k views

I found the one line of code to request a print from a scichart surface. However, when I would run it, I found that it had cut off the bottom portion such that you didn’t get the X axis numbers to show. After playing with different approaches it seems that the printing is somewhat dependent on my margins and what the current width and height are of the surface. I was eventually able to come up with something that has the full plot show up in an xps file. When I print to my printer it clips off part of it still. Does anyone have some direction on how to get this to work with whatever printer may be selected? Do I have to try and find another way?

0 votes
8k views

Hello,

I am using SCI line chart for Android and iOS. How I can I add Multiple scales on the same graph for different lines?

Please do the needful.

0 votes
10k views

Hi,

I have a valid license key for development. But occasionally the charts show the message below and I have to restart the app to avoid that. May I ask is there a reason for that and how to fix it?

"Sorry! You have not set a License Key. You can request a free trial key from www.scichart.com/licensing-scichart-android or purchase at store.scichart.com."

Thanks,
Gang

  • Gang Xu asked 3 years ago
  • last active 3 years ago
0 votes
10k views

Hello again.

As you’ve suggested in other posts, to avoid mouse events broadcasting across multiple windows with charts (and in my case, crashing said windows, ’cause they’re in multiple UI threads), I do binding like this:

<sciChart:ModifierGroup mouse:MouseManager.MouseEventGroup="{Binding MouseGroupId}">

Where MouseGroupId is just a GUID converted to a string. The problem is, this binding (or any binding, even for the constant string in the view model) doesn’t work. Binding trace is as follows:

System.Windows.Data Warning: 55 : Created BindingExpression (hash=43894578) for Binding (hash=31482310)
System.Windows.Data Warning: 57 : Path: 'MouseGroupId'
System.Windows.Data Warning: 59 : BindingExpression (hash=43894578): Default mode resolved to OneWay
System.Windows.Data Warning: 60 : BindingExpression (hash=43894578): Default update trigger resolved to PropertyChanged
System.Windows.Data Warning: 61 : BindingExpression (hash=43894578): Attach to Abt.Controls.SciChart.ModifierGroup.MouseEventGroup (hash=44711291)
System.Windows.Data Warning: 66 : BindingExpression (hash=43894578): Resolving source
System.Windows.Data Warning: 69 : BindingExpression (hash=43894578): Found data context element: ModifierGroup (hash=44711291) (OK)
System.Windows.Data Warning: 77 : BindingExpression (hash=43894578): Activate with root item ChartPanelViewModelProxy (hash=11922526)
System.Windows.Data Warning: 107 : BindingExpression (hash=43894578): At level 0 – for ChartPanelViewModelProxy.MouseGroupId found accessor RuntimePropertyInfo(MouseGroupId)
System.Windows.Data Warning: 103 : BindingExpression (hash=43894578): Replace item at level 0 with ChartPanelViewModelProxy (hash=11922526), using accessor RuntimePropertyInfo(MouseGroupId)
System.Windows.Data Warning: 100 : BindingExpression (hash=43894578): GetValue at level 0 from ChartPanelViewModelProxy (hash=11922526) using RuntimePropertyInfo(MouseGroupId): 'Mouse831A0392'
System.Windows.Data Warning: 79 : BindingExpression (hash=43894578): TransferValue – got raw value 'Mouse831A0392'
System.Windows.Data Warning: 88 : BindingExpression (hash=43894578): TransferValue – using final value 'Mouse831A0392'
System.Windows.Data Warning: 95 : BindingExpression (hash=43894578): Got PropertyChanged event from ModifierGroup (hash=44711291) for DataContext
System.Windows.Data Warning: 78 : BindingExpression (hash=43894578): Deactivate
System.Windows.Data Warning: 102 : BindingExpression (hash=43894578): Replace item at level 0 with {NullDataItem}
System.Windows.Data Warning: 77 : BindingExpression (hash=43894578): Activate with root item <null>
System.Windows.Data Warning: 105 : BindingExpression (hash=43894578): Item at level 0 is null – no accessor
System.Windows.Data Warning: 79 : BindingExpression (hash=43894578): TransferValue – got raw value {DependencyProperty.UnsetValue}
System.Windows.Data Warning: 87 : BindingExpression (hash=43894578): TransferValue – using fallback/default value <null>
System.Windows.Data Warning: 88 : BindingExpression (hash=43894578): TransferValue – using final value <null>
System.Windows.Data Warning: 78 : BindingExpression (hash=43894578): Deactivate
System.Windows.Data Warning: 102 : BindingExpression (hash=43894578): Replace item at level 0 with {NullDataItem}
System.Windows.Data Warning: 62 : BindingExpression (hash=43894578): Detach

So, the getter on view model is being called, and binding receives the initial value, but then ModifierGroup loses its data context, and the bound value is lost.

Because I use the chart in the ItemsControl (while looking forward to using the SciChartGroup, when it’ll be released), the charts are created by the ItemsControl and I couldn’t find an event that’ll allow me to set mouse event group programmatically.

So, how should I do this, prefereably with MVVM?

Full itemscontrol xaml is like this:

    &lt;ItemsControl x:Name=&quot;PanelContainer&quot; ItemsSource=&quot;{Binding Panels}&quot;&gt;
        &lt;ItemsControl.ItemsPanel&gt;
            &lt;ItemsPanelTemplate&gt;
                &lt;UniformGrid Columns=&quot;1&quot; /&gt;
            &lt;/ItemsPanelTemplate&gt;
        &lt;/ItemsControl.ItemsPanel&gt;

        &lt;ItemsControl.ItemTemplate&gt;
            &lt;DataTemplate&gt;
                &lt;sciChart:SciStockChart BarTimeFrame=&quot;{Binding BarTimeFrame, UpdateSourceTrigger=PropertyChanged}&quot;
                                        SeriesSource=&quot;{Binding ChartSeries}&quot;
                                        XAxisVisibleRange=&quot;{Binding ElementName=ChartContainer, Path=DataContext.SharedXVisibleRange, Mode=TwoWay}&quot;
                                        sciChart:SciChartGroup.VerticalChartGroup=&quot;{Binding VerticalGroupId}&quot;
                                        sciChart:ThemeManager.Theme=&quot;BlackSteel&quot;&gt;
                    &lt;sciChart:SciChartSurface.ChartModifier&gt;
                        &lt;sciChart:ModifierGroup mouse:MouseManager.MouseEventGroup=&quot;{Binding MouseGroupId, PresentationTraceSources.TraceLevel=High}&quot;&gt;
                            &lt;sciChart:RubberBandXyZoomModifier IsXAxisOnly=&quot;True&quot; ReceiveHandledEvents=&quot;True&quot; /&gt;
                            &lt;sciChart:MouseWheelZoomModifier /&gt;
                            &lt;sciChart:RolloverModifier ReceiveHandledEvents=&quot;True&quot; /&gt;
                            &lt;sciChart:XAxisDragModifier /&gt;
                            &lt;sciChart:ZoomExtentsModifier ExecuteOn=&quot;MouseDoubleClick&quot; /&gt;
                        &lt;/sciChart:ModifierGroup&gt;
                    &lt;/sciChart:SciChartSurface.ChartModifier&gt;
                &lt;/sciChart:SciStockChart&gt;
            &lt;/DataTemplate&gt;
        &lt;/ItemsControl.ItemTemplate&gt;
    &lt;/ItemsControl&gt;

Also, what’s the right way to use SciChartOverview with the ItemsControl, again, preferably with MVVM? (I’ve found SciChartOverview.BackgroundChartSurface in change log, but couldn’t do anything with it.

  • gman asked 11 years ago
1 vote
10k views

I am using SciChart for WPF version 1.3.1.1107 with the MVVM pattern.

I have a chart with several lines and I would like to zoom to extents on just one of the lines. Can you please suggest how I can zoom my chart to the extents of one of several lines that exist in a chart?

0 votes
6k views

Hello everyone.

I have a candlestick chart with date x-axis and double y-axis.
While scrolling to the left im loading past history and showing it – everything works fine.

Once i have below crash:

What can cause it?
Can not find anything in google.

01-22 10:23:31.490 28770-28770/com.test.livedataperformance E/InputEventReceiver: Exception dispatching input event.
01-22 10:23:31.490 28770-28770/com.test.livedataperformance D/AndroidRuntime: Shutting down VM
01-22 10:23:31.490 28770-28770/com.test.livedataperformance E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.test.livedataperformance, PID: 28770
java.lang.UnsupportedOperationException: Unsupported search mode
at com.scichart.data.model.SciListUtil.longFindIndex(Native Method)
at com.scichart.data.model.SciListUtil.a(SourceFile:39)
at com.scichart.data.model.SciListUtil$b.findIndex(SourceFile:3044)
at com.scichart.data.model.SciListFactory$i.a(SourceFile:3141)
at com.scichart.data.model.SciListFactory$i.findIndex(SourceFile:3126)
at com.scichart.charting.model.dataSeries.XDataSeries.a(SourceFile:273)
at com.scichart.charting.model.dataSeries.XDataSeries.getIndicesXRange(SourceFile:241)
at com.scichart.charting.model.dataSeries.XDataSeries.getWindowedYRange(SourceFile:208)
at com.scichart.charting.visuals.renderableSeries.BaseRenderableSeries.getYRange(SourceFile:1027)
at com.scichart.charting.visuals.axes.rangeCalculators.RangeCalculationHelperBase.getWindowedYRange(SourceFile:225)
at com.scichart.charting.visuals.axes.AxisBase.getWindowedYRange(SourceFile:1098)
at com.scichart.charting.visuals.SciChartSurface.a(SourceFile:1116)
at com.scichart.charting.visuals.SciChartSurface.zoomExtentsY(SourceFile:1167)
at com.scichart.charting.modifiers.ZoomPanModifier.a(SourceFile:202)
at com.scichart.charting.modifiers.ZoomPanModifier.onScroll(SourceFile:176)
at android.view.GestureDetector.onTouchEvent(GestureDetector.java:619)
at com.scichart.charting.modifiers.GestureModifierBase.onTouch(SourceFile:80)
at com.scichart.charting.modifiers.ModifierGroup.onTouch(SourceFile:189)
at com.scichart.core.utility.touch.MotionEventManager.c(SourceFile:140)
at com.scichart.core.utility.touch.MotionEventManager.a(SourceFile:39)
at com.scichart.core.utility.touch.MotionEventManager$a$1.a(SourceFile:224)
at com.scichart.core.utility.touch.MotionEventManager$a$1.execute(SourceFile:221)
at com.scichart.core.utility.touch.MotionEventManager$a.a(SourceFile:211)
at com.scichart.core.utility.touch.MotionEventManager$a.onTouchEvent(SourceFile:183)
at com.scichart.charting.visuals.SciChartSurface.onTouchEvent(SourceFile:1251)
at android.view.View.dispatchTouchEvent(View.java:9300)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2547)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2240)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
at com.android.internal.policy.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2403)
at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1737)
at android.app.Activity.dispatchTouchEvent(Activity.java:2812)
at androidx.appcompat.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:69)
at com.android.internal.policy.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2364)
at android.view.View.dispatchPointerEvent(View.java:9520)
at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4242)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4095)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3641)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3694)
at android.view.ViewRootImpl$InputStage.forward(ViewRoo

1 vote
9k views

x-axis starting value ​​are not displayed if the decimal point.

I hope that even if the first point label and last point label is the decimal value displayed.

(x start point : 723.07)

(x last point : 735.07)

0 votes
6k views

I have an impulse series chart, and with SciChart v3.x the rollover modifier line would “snap” to the nearest point. Since migrating to v6.5 this no longer happens – only the rollover marker snaps, not the vertical line. Setting UseInterpolation=”False” has no effect.

I’ve only noticed this on the impulse series, and the rollover line does still snap on other types (e.g. line, scatter). I just wanted to check that I’m not missing something, or if there any way to reinstate this snapping behaviour?

0 votes
9k views

Hi All,

I have a problem about the length of my Scrollbar this is my code :


        <!--  The grid is used to set paddings around the Overview, so that the size of the Overview matches the size of the XAxis on the parent chart  -->
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1020"/>
            <!--  Matches parent surface padding left  -->
            <ColumnDefinition Width="*"/>
            <!--  Hosts overview control  -->
            <ColumnDefinition Width="{Binding ActualWidthValue, ElementName=proxy, Mode=OneWay, Converter={StaticResource DoubleToGridLengthConverter}}"/>
            <!--  Used to bind to parent surface YAxis  -->
            <ColumnDefinition Width="50"/>
            <!--  Matches parent surface padding right  -->
        </Grid.ColumnDefinitions>

        <helpers:ActualSizePropertyProxy x:Name="proxy" Element="{Binding ElementName=sciChartSurface, Path=YAxis}"/>
        <SciChart:SciChartOverview ParentSurface="{Binding ElementName=sciChartSurface,
                                                    Mode=OneWay}"
                                                            SciChart:ThemeManager.Theme="{Binding ElementName=cboTheme,
                                                           Path=SelectedItem}"
                            SelectedRange="{Binding XVisibleRange,
                                             Mode=TwoWay}" Focusable="True" />

but when i increase the Width the Scrollbar doesn’t change !! (like the picture)
So, i want that my Scrollbar have the same length of my Chart ! it’s possible or not ? And thank you
Best Regards,
Sahar.

  • sahar Les asked 9 years ago
  • last active 9 years ago
0 votes
6k views

Dear all,

I just try to evaluate your tool for a customer project which will start soon and need to see if SciChart is allowing customer request.

One of the request is as below :

The idea is to offer the user of our app to see a list of graph that can be used.
From this list of graph the user can select a default graph to see his data
Then an other possibility is that starting from a default graph template, user could change parameter setting of the selected graph and save it to a new custom graph name he can reuse afterwards.

Is this something possible ?
If yes how to save that new graph settings and recall it ?

Thanks for your help and advise on this

regards

  • sc sc asked 6 years ago
  • last active 6 years ago
0 votes
7k views

Hello.

It’s very strange, but chart can not be zoomed with pinch, only by double tap fitting full screen.
And when trying to zoom app freezes and CPU load became 100%.

func installChart() {
    sciChartSurface = SCIChartSurface(frame: self.view.bounds)
    sciChartSurface?.translatesAutoresizingMaskIntoConstraints = false


    self.vGraphBox.subviews.forEach({ $0.removeFromSuperview() })

    self.vGraphBox.addSubview(sciChartSurface!)

    NSLayoutConstraint.activate([
        sciChartSurface!.leftAnchor.constraint(equalTo: self.vGraphBox.leftAnchor),
        sciChartSurface!.rightAnchor.constraint(equalTo: self.vGraphBox.rightAnchor),
        sciChartSurface!.bottomAnchor.constraint(equalTo: self.vGraphBox.bottomAnchor),
        sciChartSurface!.topAnchor.constraint(equalTo: self.vGraphBox.topAnchor)
        ])

    // Add the SCIChartSurface as a subview
    self.vGraphBox.addSubview(sciChartSurface!)

    let xAxis = SCILogarithmicNumericAxis()
    xAxis.growBy = SCIDoubleRange(min: SCIGeneric(0.1), max: SCIGeneric(0.1))
    xAxis.scientificNotation = .logarithmicBase
    //xAxis.textFormatting = "#.#E+0"
    xAxis.logarithmicBase = 10.0
    xAxis.visibleRange = SCIDoubleRange(min: SCIGeneric(100), max: SCIGeneric(22000.0))

    let yAxis = SCINumericAxis()
    yAxis.autoRange = .never
    yAxis.visibleRange = SCIDoubleRange(min: SCIGeneric(-300.0), max: SCIGeneric(0.0))

    lineRenderableSeries.dataSeries = self.dataSeries
    lineRenderableSeries.strokeStyle = SCISolidPenStyle(colorCode: 0xFFE13219, withThickness: 1)

    //self.sciChartSurface?.chartModifiers.add(pinchZoomModifier) //Causes freeze
    self.sciChartSurface?.chartModifiers.add(SCIZoomPanModifier())
    self.sciChartSurface?.chartModifiers.add(SCIZoomExtentsModifier())

    SCIUpdateSuspender.usingWithSuspendable(sciChartSurface!) {
        self.sciChartSurface?.xAxes.add(xAxis)
        self.sciChartSurface?.yAxes.add(yAxis)
        self.sciChartSurface?.renderableSeries.add(self.lineRenderableSeries)
        self.sciChartSurface?.renderableSeries.add(self.lineRenderableSeriesMax)
    }
}
1 vote
5k views

I am working on a multithreaded application where the acquisition and chart display run on different threads. I am attempting to collect samples and plot only when I have 100 samples available to have less resource consumption and keep the application responsive. However, when I change the number of samples in the block, my FIFO capacity seems to change, allowing significantly less amount of samples than the ones I need. The current FIFO capacity should allow for at least 16 mins worth of data, but it only shows less than a second

If I set the block size to 1 (single sample appending) I obtain the results I need, but I am seeing performance issues in other areas of the program, hence the need of appending in blocks.

See the attachments for more clarity. Any suggestions?

EDIT: Adding code

private void DisplayNPD()
        {
            XyDataSeries<float, float> npdRawDataSeries = new XyDataSeries<float, float>();
            int fifoSize = 1000000;
            npdRawDataSeries.FifoCapacity = fifoSize;
            npdRawData_RS.DataSeries = npdRawDataSeries;

            double npdRaw = 0;
            bool successfulDequeue = false;
            int samplesQueued = 0;
            int samplesInBlock = 100;
            float[] rawSamples = new float[samplesInBlock];
            float[] time = new float[samplesInBlock];

            while (!ImagingSession.terminateThreads)
            {
                if (ImagingSession.laserOnOff && !graphRestarted)
                {
                    int npdElementsInQueue = npdDisplayQueue.Count;
                    if (npdElementsInQueue > 0)
                        successfulDequeue = npdDisplayQueue.TryDequeue(out npdRaw);

                    if (successfulDequeue)
                    {
                        currentTime = graphStopwatch.ElapsedMilliseconds * 0.001;
                        time[samplesQueued] = (float) currentTime;
                        rawSamples[samplesQueued] = (float) (npdRaw * 1000);

                        samplesQueued++;
                        if (samplesQueued == samplesInBlock)
                        {
                            using (npdRawDataSeries.SuspendUpdates())
                                npdRawDataSeries.Append(time, rawSamples);
                            samplesQueued = 0;

                            if (currentTime > upperLimit)
                            {
                                lowerLimit = upperLimit;
                                upperLimit += xAxisWidth;
                                AdjustXAxis(currentHorizontalScale);
                            }
                        }
                    }
                }
            }
        }
0 votes
9k views

Hello,
I’m having some trouble because all the points in a DataSeries have the same value, and those values are rendered outside the surface. (By constant values I mean that all the values on the y axis are equal to 19.8).

If I put a zoom modifier on the chart and zoom out, I can find my values, but when the chart is displayed for the first time, they are not visible.
This makes me think that the scaling of the y axis is not calculated correctly on the chart.

I have attached a code example.

Showing 51 - 100 of 4k results