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

0 votes
0 answers
1 view

Hey again!

Is there kind of a delegate that notify me if the user uses the crosshair/SCIRolloverModifier?
I want to know which value he is inspecting to show him further information outside the chart for this datapoint.

Thanks and Greeting
Benedikt

0 votes
0 answers
2 views

https://www.dropbox.com/s/6f20scl1nyug1t7/chart_3.png?dl=0

Please see the link image. Can we have multiple y axis and one x-axis on android Line charts.. any example link will be useful and ready to purchase if supports these type of charts in Android

0 votes
10 views

I need to update a lot of annotations. Not so much. Remove and add about 10-100 annotations per action. And it takes a lot of time. I’ve already tried all the recommendations with SusppendUpdates etc, but the result is the same.

I don’t need the flexibility of UIElements. I’m using it as markers only.

So, maybe it is possible to implement annotations as a series with a custom point marker. I need a vertical dashed line with text, like in screenshot. Is there a way to do it?

0 votes
13 views

I am trying to use date and time for X axis however

it doesn’t not work for me and I am not understanding what I did wrong

attaching the xaml and cs code:

cs:

public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();

    }

    private void sciChartSurface_Loaded(object sender, RoutedEventArgs e)
    {
        //var scatterData = new XyDataSeries<double, double>();
        var lineData = new XyDataSeries<DateTime, double>();
        //var lineData = new XyDataSeries<double, double>();

        DateTime dt = DateTime.Now;
        for (int i = 0; i < 10; i++)
        {
            dt.AddDays(1);
            lineData.Append(dt, i);



        }

        // Assign dataseries to RenderSeries
        LineSeries.DataSeries = lineData;
        lineData.SeriesName = "Barak";
        /*
         ScatterSeries.DataSeries = scatterData;
         scatterData.SeriesName = "Barak2";
         */

        //ScatterSeries.DataSeries = scatterData;
    }
}

xaml:

        <s:SciChartSurface.RenderableSeries>
            <s:FastMountainRenderableSeries x:Name="LineSeries" Stroke="#FF4083B7"/>
            <s:XyScatterRenderableSeries x:Name="ScatterSeries" >
                <s:XyScatterRenderableSeries.PointMarker>
                    <s:EllipsePointMarker Width="7" Height="7" Fill="#FFF" Stroke="SteelBlue"/>
                </s:XyScatterRenderableSeries.PointMarker>
            </s:XyScatterRenderableSeries>
        </s:SciChartSurface.RenderableSeries>

        <s:SciChartSurface.XAxes>
            <s:NumericAxis AxisTitle="Number of sampeles"></s:NumericAxis>
        </s:SciChartSurface.XAxes>

        <s:SciChartSurface.YAxis>
            <s:NumericAxis AxisTitle="Values"></s:NumericAxis>
        </s:SciChartSurface.YAxis>

        <s:SciChartSurface.Annotations>
            <s:TextAnnotation Text="Hello world!" X1="5.0" Y1="5.0"/>
        </s:SciChartSurface.Annotations>


        <s:SciChartSurface.ChartModifier>
            <s:ModifierGroup>
                <!-- Allow drag to zoom on Left mouse -->
                <s:RubberBandXyZoomModifier ExecuteOn="MouseLeftButton"
                                             RubberBandFill="#33FFFFFF" RubberBandStroke="#AAFFFFFF"
                                             RubberBandStrokeDashArray="2 2"/>
                <!-- Allow pan on Right mouse drag -->
                <s:ZoomPanModifier ExecuteOn="MouseRightButton" ClipModeX="None" />
                <!-- Allow Dragging YAxis to Scale -->
                <s:YAxisDragModifier DragMode="Scale"/>
                <!-- Allow Dragging XAxis to Pan -->
                <s:XAxisDragModifier DragMode="Pan"/>
                <!-- Allow Mousewheel Zoom -->
                <s:MouseWheelZoomModifier/>
                <!-- Allow Zoom to Extents on double click -->
                <s:ZoomExtentsModifier ExecuteOn="MouseDoubleClick" />
                <s:LegendModifier ShowLegend="True" Orientation="Horizontal"
                                   VerticalAlignment="Bottom"                                     
                                   HorizontalAlignment="Center"
                                   LegendPlacement="Inside" />
                <!-- Add a RolloverModifier to the chart (shows vertical line tooltips -->
                <s:RolloverModifier ExecuteOn="MouseMove" ShowTooltipOn="MouseHover"/>

            </s:ModifierGroup>


        </s:SciChartSurface.ChartModifier>

    </s:SciChartSurface>


</Grid>

0 votes
0 answers
24 views

Undo/Redo behavior is abnormal.
It didn’t go back to the previous step.

0 votes
41 views

Hi all,

I’m trying to use the metal support in a little test project.
I have following lines to enable metal:

if SCIChartSurface.isMetalSupported {
      sciChartSurface.renderSurface = SCIMetalRenderSurface(frame: sciChartSurface.bounds)
 } else {
       sciChartSurface.renderSurface = SCIOpenGLRenderSurface(frame: sciChartSurface.bounds)
 }

the surface keeps empty until I remove the

sciChartSurface.renderSurface = SCIMetalRenderSurface(frame: sciChartSurface.bounds)

line – or in other words I use OpenGL.
Then the chart will render properly. I am using an iPhoneX (not simulator).

Thank you for your support!

Wall of Code:

import UIKit
import SciChart
import SnapKit

class ViewController: UIViewController {

    // MARK: - UIElements
    private var sciChartSurface: SCIChartSurface!

    // MARK: - Vars
    private var series: SCIXyDataSeries?

    // MARK: - Lifecycle
    override func viewDidLoad() {
        super.viewDidLoad()
        setupSurface()
        setupData()
        renderData()
    }

       // MARK: - Chart
     private func setupSurface() {
        // Create a SCIChartSurface. This is a UIView so can be added directly to the UI
        sciChartSurface = SCIChartSurface.init(frame: view.bounds)
        sciChartSurface.debugWhySciChartDoesntRender = true
        view.addSubview(sciChartSurface)

        // Detect metal with this static property
        if SCIChartSurface.isMetalSupported {
            sciChartSurface.renderSurface = SCIMetalRenderSurface(frame: sciChartSurface.bounds)
        } else {
            sciChartSurface.renderSurface = SCIOpenGLRenderSurface(frame: sciChartSurface.bounds)
        }
        sciChartSurface.snp.makeConstraints { (make) in
            make.edges.equalToSuperview()
        }

        sciChartSurface.translatesAutoresizingMaskIntoConstraints = true
        sciChartSurface.backgroundColor = .gray
        // Create an XAxis and YAxis. This step is mandatory before creating series
        let xAxis = SCICategoryNumericAxis()
        setup(axis: xAxis)
        sciChartSurface.xAxes.add(xAxis)
        let yAxis = SCINumericAxis()
        setup(axis: yAxis)
        sciChartSurface.yAxes.add(yAxis)
    }

    private func setup(axis: SCIAxisBase) {
        let axisStyle = SCIAxisStyle()

        let majorPen = SCISolidPenStyle(colorCode: 0xFF393532, withThickness: 0.5)
        let minorPen = SCISolidPenStyle(colorCode: 0xFF262423, withThickness: 0.5)

        let textFormat = SCITextFormattingStyle()
        textFormat.fontSize = 16

        axisStyle.majorTickBrush = majorPen
        axisStyle.majorGridLineBrush = majorPen
        axisStyle.gridBandBrush = SCISolidBrushStyle(colorCode: 0xE1232120)
        axisStyle.minorTickBrush = minorPen
        axisStyle.minorGridLineBrush = minorPen
        axisStyle.labelStyle = textFormat
        axisStyle.drawMinorGridLines = true
        axisStyle.drawMajorBands = true
        axis.style = axisStyle
    }

    private func setupData() {
        series = SCIXyDataSeries(xType: .int16, yType: .int16)
        TestData.testData.forEach { (testData) in
            let xGeneric = SCIGenericType(type: .int16, .init(int32Data: testData.x))
            let yGeneric = SCIGenericType(type: .int16, .init(int32Data: testData.y))
            series?.appendX(xGeneric, y: yGeneric)
        }
    }

    private func renderData() {
        let renderSeries = SCIFastColumnRenderableSeries()
        renderSeries.dataSeries = series
        sciChartSurface.renderableSeries.add(renderSeries)
    }
}



struct TestData {
    var x: Int32
    var y: Int32

    static let testData = [TestData(x: 2017, y: 5),
                           TestData(x: 2018, y: 8),
                           TestData(x: 2019, y: 2),
                           TestData(x: 2020, y: 9)]
}
0 votes
0 answers
41 views

Hi All,

I tried to do android oscilloscope example. But I cannot the line series data. I could see the data xValues, related yValues. and I cannot find any cause. Could you me know what the problem is?

0 votes
43 views

EDIT 3:

I figured out the problem. The reason why I did not see them was two-fold. The annotation view for some reason cannot infere the height of the parent (the chart) so setting match_parent as height doesn’t work and the view doesn’t have height. Second problem was that I have set .withPosition() with Y value as 0, and that would draw the view under the visible area of the chart.

So let me now ask new questions

1 Is there a possibility to move the annotation just by grabbing it, without first selecting it?
2 How can I change the red border when selecting the annotation?
3 How to set the annotation to return X value of it’s position from the center of its view and not from the start of its view
4 How do I restrict movement of the annotation to only X axis?

/// original question
Hello.

I have a problem with annotations. What I need to achieve, is to draw custom view (it’s fairly simple) on my chart, and this view should have always the height of the chart.

I can’t make it work, I am adding the annotation in exact same way as in example android project, and I even copied annotation code from your example project to mine, but for some reason it doesn’t work in my project.

this is the drawable:

<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:width="40dp">
<color android:color="@color/secondary_18"/>
</item>
<item android:gravity="center_horizontal" android:width="4dp">
<color android:color="@color/secondary"/>
</item>
</layer-list>

EDIT: There is no < br > in this code ^

what I already tried:
1. Wrapping the drawable into layout consisting of <ImageView> with src= set to drawable
2. Creating a class extending View() class and then setting the imageResource there
3. inflating my layout first and then putting it inside .withContent()
4. using .withContent() directly with R.layout.some_layout_view
5. using it with .withBackgroundDrawableId()
6. various combinations with setting different widths and heights and .withPosition() and whatever you can think of

I managed to display the CustomAnnotation once (don’t remember with which combination of settings) but it wouldn’t move anyway despite the .withIsEditable(true) and despite it was “selected” (red border around it appeared on click)

my axes:

        val xAxis = sciChartBuilder.newNumericAxis()
        .withAxisId(X_AXIS_ID)
        .withDrawMajorBands(false)
        .withDrawMajorGridLines(false)
        .withDrawLabels(false)
        .withIsCenterAxis(true)
        .withDrawMinorTicks(false)
        .withDrawMinorGridLines(false)
        .withDrawMajorTicks(false)
        .build()

    val yAxis = sciChartBuilder.newNumericAxis()
        .withAutoRangeMode(AutoRange.Always)
        .withAxisId(Y_AXIS_ID)
        .withDrawMajorBands(false)
        .withDrawMajorGridLines(false)
        .withDrawMinorGridLines(false)
        .withDrawLabels(false)
        .withIsCenterAxis(true)
        .withDrawMajorTicks(false)
        .withDrawMinorTicks(false)
        .build()

    chartSurface.xAxes.add(xAxis)
    chartSurface.yAxes.add(yAxis)

my series:

 chartSurface.renderableSeriesAreaFillStyle = SolidBrushStyle(chartBackgroundColor)
    chartSurface.renderableSeriesAreaBorderStyle = SolidPenStyle(0x0, false, 0f, null)

    val mountainSeries = sciChartBuilder.newMountainSeries()
        .withDataSeries(dataSeries)
        .withStrokeStyle(SolidPenStyle(-0x1, true, 0f, null))
        .withAreaFillLinearGradientColors(-0x1, -0xed7422)
        .withXAxisId(X_AXIS_ID)
        .withYAxisId(Y_AXIS_ID)
        .build()

    chartSurface.renderableSeries.add(mountainSeries)

my control modifiers:

   val chartModifiers = sciChartBuilder.newModifierGroup()
        .withPinchZoomModifier()
        .withXyDirection(Direction2D.XDirection)
        .withReceiveHandledEvents(true)
        .withScaleFactor(0.8f)
        .build()
        .withZoomPanModifier()
        .withXyDirection(Direction2D.XDirection)
        .withClipModeX(ClipMode.ClipAtExtents)
        .withZoomExtentsY(true)
        .withReceiveHandledEvents(true)
        .build()
        .withZoomExtentsModifier()
        .withReceiveHandledEvents(true)
        .withXyDirection(Direction2D.XyDirection)
        .build()
        .build()

    chartSurface.chartModifiers.add(chartModifiers)

one example of many of how I tried to add the annotations:

        chartSurface.annotations.add(
        sciChartBuilder.newBoxAnnotation()
            .withContent(CustomView(context))
            .withXAxisId(X_AXIS_ID)
            .withYAxisId(Y_AXIS_ID)
            .withIsEditable(true)
            .build()
    )

ofc I also tried the same with CustomAnnotation and like I said with various other settings I could think of like .withPosition() and withResizingGrip. Curious thing is that VerticalLineAnnotation works with no problems really.

EDIT2:

Alternatively I could go with two VerticalLineAnnotations on top of each other moving together but I would have to be able to move them instantly, without selecting them first, because those circular handles look really bad and I have to disable them.

But later on I need to have box annotation working anyway, there will be X values selecting feature

0 votes
38 views

Hello

is there a way to set the padding (aka reduce the gap) between bars in a SCIFastColumnRenderableSeries?

I attach a screenshot of my current situation: I would like to have zero margin between columns.

I tried searching in the knowledge base but all the answers I found seem to refer to APIs not available in the iOS SDK

.

There is not such class method in the iOS SDK called SciChartSurface.Padding

Thanks for your help

0 votes
44 views

I have a “live” color map control. Range of Z-values always comprehends zero, but is not symmetrical about zero. I would like to show only the tick at zero (and no others), and only the label ‘0’ (no formatting) at that tick. Is there a simple solution?

0 votes
57 views

In WPF, I am trying to allow user to resize a box annotation by holding the mouse on its side edges and dragging the mouse to left or right. By default, the box annotation allows to resize only by its round shaped holders appearing on top corners. Is there any way to allow such functionality?

So far, I have thought of placing two vertical annotations inside the box annotation template exactly on its edges and then sync their X coordinates with that of the box by two way binding. However, it is not an easy way to do it and also it does not work when used together as a single custom annotation or composite annotation.

Please suggest if any property can be tweaked for box annotation to achieve this?

  • Anil Soman asked 2 weeks ago
  • last active 2 weeks ago
0 votes
49 views

Hello
I have animated line renderable series – when new point added, whole x-axes moves to the right a little.

Everything is smooth until pinch zoom appears.
I think it’s conflict with animated viewport move and zooming.

Is there a way to know, when zooming appears?

E.g. if i know, when zoom started and finished – i can solve this.
Thanks

0 votes
58 views

Hello,

i’ve created the following sample application were i tried to use CategoryDateTimeAxisViewModel as x axis:

class MainViewModel : INotifyPropertyChanged
{
    private IAxisViewModel _xAxis;
    private IAxisViewModel _yAxis;

    public event PropertyChangedEventHandler PropertyChanged;

    public IAxisViewModel XAxis
    {
        get { return _xAxis; }
        set
        {
            if (_xAxis != value)
            {
                _xAxis = value;
                OnPropertyChanged();
            }
        }
    }

    public IAxisViewModel YAxis
    {
        get { return _yAxis; }
        set
        {
            if (_yAxis != value)
            {
                _yAxis = value;
                OnPropertyChanged();
            }
        }
    }

    public MainViewModel()
    {
        XAxis = new CategoryDateTimeAxisViewModel
        {
            AxisTitle = "X-Achse",
            Id = "DefaultAxisId",
            AxisAlignment = AxisAlignment.Bottom,
            AutoRange = AutoRange.Always,
            TickProvider = new DateTimeTickProvider()
        };
        YAxis = new NumericAxisViewModel
        {
            AxisTitle = "Y-Achse",
            Id = "DefaultAxisId",
            AxisAlignment = AxisAlignment.Left,
            AutoRange = AutoRange.Always,
            TickProvider = new NumericTickProvider()
        };
    }

    [NotifyPropertyChangedInvocator]
    protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
    {
        PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
    }
}

<Window x:Class="WpfApp1.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:WpfApp1"
    xmlns:s="http://schemas.abtsoftware.co.uk/scichart"
    mc:Ignorable="d"
    Title="MainWindow" Height="450" Width="800">
<Window.DataContext>
    <local:MainViewModel/>
</Window.DataContext>
<DockPanel>
    <s:SciChartSurface DockPanel.Dock="Top"
                       ChartTitle="Testdiagramm"
                       XAxis="{s:AxesBinding XAxis}"
                       YAxis="{s:AxesBinding YAxis}">
    </s:SciChartSurface>
</DockPanel>

When i run the application i can see only the axis titles but no axes, gridlines etc. However when i replace CategoryDateTimeAxisViewModel with DateTimeAxisViewModel everything works fine and looks like expected. What am i doing wrong?

Best regards
Alexander

0 votes
53 views

I have 2 series displayed on my chart. I have placed a VerticalLineAnnotation in VerticalSliceModifie to display rollover marker on a series. By default it gets displayed for each series plotted. How can I set it to be displayed only for one of the series?

I tried to set SeriesData Binding Path to specific series, but it did not work.

<visuals:VerticalSliceModifier Name="SliceModifier" ShowAxisLabels="False"  ShowTooltipOn="Never" SeriesData="{Binding Path=Series[1]}">
       <visuals:VerticalSliceModifier.VerticalLines>
                <visuals:VerticalLineAnnotation X1="45" 
                Y1="80" 
                Stroke="Red"
                StrokeThickness="1"
                IsEditable="True" 
                x:Name="LRed"
                ResizeDirections="XDirection" 
                DragDirections="XDirection"  
                VerticalAlignment="Bottom">
     </visuals:VerticalLineAnnotation>
</visuals:VerticalSliceModifier.VerticalLines>
</visuals:VerticalSliceModifier>
  • Anil Soman asked 3 weeks ago
  • last active 3 weeks ago
0 votes
49 views

We are working on line charts in Xamarin forms. We have a requirement to zoom in only one direction at one time. Once the user is done with zooming in one direction (say horizontal) and he reaches that place through scrolling, he should be able to zoom in another direction(vertical). Can you please assist this for the same

  • george asked 3 weeks ago
  • last active 2 weeks ago
0 votes
43 views

Hello,

I’m tying out some of the SciStockChart WPF features on the trial version and having trouble with limiting the chart area to the assigned data.

You can easily reproduce my problem on the demo app:
1. Open Featured Apps>>Financial Charts>>SciChart Trader Demo app
2. Move the mouse cursor in the middle of the chart
3. Mouse wheel to zoom in really close
4. Zoom Back out you can see the empty space on the right size became larger
5. You can do 3-4 steps again and with every iteration you get more open space.
6.Plus it gets out of sync with the scroll pane below.

How do we limit the view to the assigned data?

BTW, I can get it work by directly using SciChartSurface (I created that test app based on other demo apps).

Would love to learn how to get it working with SciStockChart.

Thanks in advance!

0 votes
53 views

Hello,

How to add buy sell annotation to real time chart(Performance demo chart in examples)

0 votes
84 views

I am Using ECG Chart In Android. How To Make The ECG Moves Automatically in Horizontal.

0 votes
69 views

Hello,

How to add the color picker for the annotations.

Ex: I will need to create the box annotation with specific colour..

1 vote
92 views

Can SciChart be used in UITableviewCell? Is it possible to use Software rendering on iOS?

The OpenGL/Metal charts are great, but I suspect Software rendering would be a better for displaying data in UITableViewCells. There are many mobile apps out there that use charts in tableviews and I’d love to be able to use SciChart here too.

0 votes
89 views

Hi!

I’ve created my own modifier to do this and it was working perfectly in a previous version. It allowed dragging annotations and without events. Now it doesn’t catch events from the pan actions, but caches events from annotation editing.

class CustomPointSelectionModifier : SeriesSelectionModifier
{
    /// <inheritdoc />
    public override void OnModifierMouseUp(ModifierMouseArgs e)
    {
        base.OnModifierMouseUp(e);
        var xcalc = ParentSurface.XAxes.First().GetCurrentCoordinateCalculator();
        var ycalc = ParentSurface.YAxes.First().GetCurrentCoordinateCalculator();

        var poistionPoint = ParentSurface.RootGrid.TranslatePoint(Mouse.GetPosition((IInputElement)ParentSurface), ModifierSurface);
        var point = new Point()
        {
            X = xcalc.GetDataValue(poistionPoint.X),
            Y = ycalc.GetDataValue(poistionPoint.Y),
        };

        ((PlotBaseDescription)DataContext).OnMouseUp(e, point);
    }
}   

It is demonstrated in the attached example

Hot to achive it now?

Thanks.

0 votes
84 views

I have a need to display a group of data sets in one chart, but because the duration of the data sets vary quite a bit I’d like to have a logarithmic time axis. Has anyone done this before? Thanks in advance!

0 votes
107 views

Hello,

i would like to configure my chart that it looks like a oscilloscope. That means that the gridlines are fixed on the display and not running from right to left. The visible range of the chart should also be fixed and should display a predefined range (e.g. 60 Seconds). Only the data should be displayed as usual. How can i achieve this?

I would be very thankful for a short example.

Best regards
Alexander

0 votes
105 views

Hello. How to draw a plane through 3 points on WPF 3D Point Cloud Chart?

0 votes
94 views

Hello,

I’m trying to get a scatter series chart to work but it doesn’t render. For Bar, Impulse, and Line I can use the same code only switching the series type, but when I attempt to do the same with Scatter series (both XyScatter and ExtremeScatter) the points don’t render.

Here is my scatter series code:

// ... 
        for (int i = 0; i < dimensions; i++)
        {
            var scatterSeries = new ExtremeScatterRenderableSeries()
            {
                PointMarker = new EllipsePointMarker() { Width = 7, Height = 7}
            };

            scatterSeries.PaletteProvider = new ExtremeScatterPaletteProvider(colors);

            Binding DataSeriesBinding = new Binding("Data");
            DataSeriesBinding.Source = (_cvm as ChartViewModelXY).ndData.ElementAt(i);
            scatterSeries.SetBinding(BaseRenderableSeries.DataSeriesProperty, DataSeriesBinding);

            Chart.RenderableSeries.Add(scatterSeries);

            permanentLineSeries++;
        }
// ...
public class ExtremeScatterPaletteProvider : IExtremePointMarkerPaletteProvider
{
    private readonly List<Color> _dataPointColors;
    private readonly Values<Color> _colors = new Values<Color>();
    public ExtremeScatterPaletteProvider(List<Color> dataPointColors)
    {
        _dataPointColors = dataPointColors;
    }
    // Fill Colors for each data-point index
    public Values<Color> Colors { get { return _colors; } }
    public void OnBeginSeriesDraw(IRenderableSeries rSeries)
    {
        var indexes = rSeries.CurrentRenderPassData.PointSeries.Indexes;
        var count = indexes.Count;
        _colors.Count = count;
        // copy required colors from list using data point indices
        for (int i = 0; i < count; i++)
        {
            var dataPointIndex = indexes[i];
            _colors[i] = _dataPointColors[dataPointIndex];
        }
    }
}

The same code works with 3 other XY charts, so I’m fairly certain the issue is with how I am creating the ExtremeScatter. Any help or insight would be greatly appreciated!

Edit: For anyone curious / googling a fully instantiated XyScatterRenderableSeries in code looks like this:

   // Render a scatter series
    var scatterSeries = new XyScatterRenderableSeries()
     {
            PointMarker = new EllipsePointMarker() { Width = 7, Height = 7, Stroke = colors[i], Fill = colors[i]}
     };  

That will render the series with the same color for both the border and interior.

  • Joe asked 4 weeks ago
  • last active 4 weeks ago
0 votes
95 views

Good morning,

I would like to ask you about the solution contained in the title. Is it possible to create realtime charts (for example 7-10) in a list (RecyclerView)? I have studied your example but there were none with a list.

The fragment in the example called createMultiPaneStockChartsFragment contains 4 charts. But unfortunately, it is not a list.
I made a simple activity with 5 charts in a RecyclerView, but charts are stucking a bit.
I do not call notify methods. There is only update LineData method:

oneChartClass.getLineData().append(oneChartClass.getLineData().getCount(), trendPoint.getValue());

Thanking you in advance…
Hubert

0 votes
145 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 1 month ago
  • last active 1 month ago
0 votes
140 views

Hi there,

I recently realized that since upgrading to scichart version 5 my custom label provider has stopped working. With version 4 it has always been working fine.

The interesting thing is that the custom label provider works fine when making use of a “standard” NumericAxisViewModel:

IAxisViewModel newAxis = new NumericAxisViewModel ();
newAxis.TickProvider = new CustomTickProvider();
newAxis.LabelProvider = new CustomLabelProvider();

When applying the same logic to a LogarithmicNumericAxisViewModel however, the label providers “FormatLabel” is never called and so no custom labels are shown:

IAxisViewModel newAxis = new LogarithmicNumericAxisViewModel();
newAxis.TickProvider = new CustomTickProvider();
newAxis.LabelProvider = new CustomLabelProvider();

After doing some research I found out that the labelprovider is never attachd to the IAxisCore as the Init function of the labelprovider is never called when its set as the labelprovider of LogarithmicNumericAxisViewModel. (When its attached to a NumericAxisViewModel it is properly called). I suspect there’s bug somewhere in the LogarithmicNumericAxisViewModel that causes this unexpected behavior.

Any help would be appreciated.

Thanks in advance,

Mathieu.

0 votes
152 views

Hi there:

I am developing an application where the main chart is a heat map type one. I would like to have a custom cursor modifier to show some values of the x, y and z axes with limit digits. The problem is that so far I get these result:

Capture
EDIT: PLEASE INSERT AN IMAGE HERE

I would like to show only 1 decimal in the Z axis and 0 decimals en the X and Y axis. I have checked your modifiers demo but it seems to be not working for my heatmap chart. Any kind of advice about this issue would help me to have the application I am looking for.

The XAML of my chart is like this:

 <s:SciChartSurface x:Name="sciChart" Grid.Column="1" Grid.Row="3" Padding="0" BorderThickness="0" MouseDown="SciChart_MouseDown" Margin="0">
            <s:SciChartSurface.RenderableSeries>
                <s:FastUniformHeatmapRenderableSeries x:Name="heatmapSeries" 
                                                      Opacity="0.9"/>
            </s:SciChartSurface.RenderableSeries>

            <s:SciChartSurface.XAxis>
                <s:NumericAxis DrawMajorBands="True"  
                               DrawLabels="False"
                               TextFormatting="0N"
                               GrowBy="0, 1"
                               s:RolloverModifier.AxisLabelContainerStyle="{StaticResource AxisLabelStyle}" 
                               s:RolloverModifier.AxisLabelTemplate="{StaticResource AxisLabelTemplate}" 
                               s:CursorModifier.AxisLabelContainerStyle="{StaticResource CursorAxisLabelStyle}"/>
            </s:SciChartSurface.XAxis>

            <s:SciChartSurface.YAxis>
                <s:NumericAxis DrawMajorBands="True" 
                               GrowBy="0, 1"
                               DrawLabels="False" 
                               VisibleRange="0,249"  
                               TextFormatting="0"/>
            </s:SciChartSurface.YAxis>

            <s:SciChartSurface.ChartModifier>
                <s:ModifierGroup>
                    <s:RolloverModifier x:Name="RolloverModifier"
                                    IsEnabled="True"
                                    ShowTooltipOn="Always" />
                    <!--<s:CursorModifier IsEnabled="True" ShowTooltip="True" ShowTooltipOn="MouseOver"
                        ShowAxisLabels="true" SourceMode="AllSeries"/>-->
                    <s:CursorModifier x:Name="CursorModifier"
                                  IsEnabled="False"
                                  UseInterpolation="False"
                                  ShowAxisLabels="False"
                                  ShowTooltip="True"
                                  ShowTooltipOn="MouseOver"/>
                    <!--<s:VerticalSliceModifier IsEnabled="True">
                        <s:VerticalSliceModifier.VerticalLines>
                            <s:VerticalLineAnnotation IsEditable="false"
                                                  LabelPlacement="Axis"
                                                  ShowLabel="true"
                                                  LabelTextFormatting="0"/>
                        </s:VerticalSliceModifier.VerticalLines>
                    </s:VerticalSliceModifier>-->
                </s:ModifierGroup>

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

Thanks in advanced.

0 votes
161 views

I use SciChart mostly for stock charts. My understanding is that the line color of a candlestick sets both the body outline and the wicks. Is there any way to set the opacity and line color of the wicks differently than the body outline?

In a stock chart with many points, the color of the wicks becomes the dominant color, and therefore when looking at a chart the curve of the wicks becomes the dominant curve. I would like to reduce the opacity of the wicks so that the curve of the candlestick bodies is the dominant curve when looking at the chart.

Thanks,
Steven

  • Steven M asked 1 month ago
  • last active 1 month ago
0 votes
184 views

How can I shift my X Axis position upwards? I need to shift X Axis so that I can place some labels below it.

  • Anil Soman asked 1 month ago
  • last active 4 weeks ago
0 votes
165 views

Hello there,

I’m currently working for a customer that is interested in buying SciChart WPF.

But first we have a question regarding the real time charts. It’s not a question that I can state easily but I will give it a try.

So the question goes like this:

Is it possible to have a static curve onto the same chart where the real time data points will be plotted n real time?

For e.g. the customer wants to load a theoretical reference curve on the chart before feeding real time data on the chart so that a real time comparison can be done and based on this comparison some hardware tools that generate the real time data will be stopped or let continue depending on how big the divergence gets between that reference curve and what comes in real time from the hardware tools running in background.

Thanks!

0 votes
0 answers
145 views

I have a simple app where the main activity has a FrameLayout that I use to load fragments in to. All fragments all loaded at the same time and I use hide/show to select what fragment to view.

However, when I add a chart to one of the fragments, then it loads fine initially, but if I hide it and then show it again, the app just stops. There isn’t any errors, it just stops responding.

If I remove the graph, everything works fine. Any ideas?

private void addAllFragments()
{
    getSupportFragmentManager().beginTransaction()
            .add(R.id.mainView, mainScreen, "MainScreen")
            .add(R.id.mainView, alarmScreen, "AlarmsScreen")
            .hide(alarmScreen)
            .commit();
}

private void loadFragment(String id)
{
    FragmentTransaction ft = getSupportFragmentManager().beginTransaction();

    for(Fragment f : getSupportFragmentManager().getFragments())
    {
        if(f.getTag() != id)
        {
            ft.hide(f);
        }
        else
        {
            ft.show(f);
        }
    }

    ft.commit();
}

private void loadMainScreen() {
    loadFragment("MainScreen");
}

private void loadAlarmsScreen() {
    loadFragment("AlarmsScreen");
}
0 votes
171 views

Hello,

I’m trying to display a vertical line annotation on a chart using MVVM.

In order to make it work I’ve (All the INotifyPropertyChanged are managed via the BaseViewModel)

public class GraphSurfaceBaseViewModel : BaseViewModel
{
    /// <summary>
    /// A list of annotations
    /// </summary>
    public ObservableCollection<IAnnotationViewModel> Annotations { get; private set; }

 ...
}

I create annotation that way

Graph.Annotations.Add(new VerticalLineAnnotationViewModel()
            {
                X1 = TimeOfComment,
                ShowLabel = true,
                StrokeThickness = 2,
                XAxisId = "Xaxis",
                YAxisId = "Yaxis1",
                AnnotationLabels = new ObservableCollection<AnnotationLabel>() { new AnnotationLabel() {Text = "mon test", LabelPlacement = LabelPlacement.TopRight } }

            });

And the binding to the scichartsurface is :

<s:SciChartSurface   
...         
Annotations="{s:AnnotationsBinding Annotations}"            
</s:SciChartSurface>

I’ve double check that my x axis and y axis have the same ID as the annotation.
The problem is I want to display several annotation labels but they are not appearing. I suspect a problem via the AnnotationsBinding which is not taking the AnnotationLabels from the VerticalLineAnnotationViewModel.

What I got :
enter image description here

What I want (paint skill here):
enter image description here

For the what I want, I can draw a simple vertical bar by settings showLabel = false but I suppose that all the label I previously added to the
AnnotationLabels will not be shown, that’s why I let it.

Thank you for any help.

Renaud

0 votes
153 views

Hi,

It is possible to have different point markers on the same dataseries? Maybe some of the points should use for example the Cross point marker, maybe other points should use the Ellipse point marker and so on. Is there any solution for this?
Thank you,
Brigitta.

0 votes
208 views

chart screenshot

So I am trying to set paddings on the chart, so that the data series do not touch chart edges

I can’t do it with View’s method setPadding because then the black background is present (screenshot shows padding on all sides but I need just left and right)

Also, I managed to achieve no labels, axes, grids etc. but in totally hacky way; I set .withIsCenterAxis and then all other things to false

 .withAxisId(Y_AXIS_ID)
        .withDrawMajorBands(false)
        .withDrawMajorGridLines(false)
        .withDrawMinorGridLines(false)
        .withDrawLabels(false)
        .withIsCenterAxis(true)
        .withDrawMajorTicks(false)
        .withDrawMinorTicks(false)

Is there a normal way of doing this?

thanks

0 votes
191 views

Hi,

I’m attempting to attach a generic/abstract DataSeries to an INotifyPropertyChanged object. However, the TX, TY generics seem to block me from using it as expected. Can anyone help me out?

internal class DataSeriesAbstract : INotifyPropertyChanged
{
    public string dataName;
    public double lastAppendedTimestamp = 0.0f;

    public List<AbstractChartViewModel> subscribers;

    // gives an error that TX and TY cannot be found
    public DataSeries<TX, TY> realData;
    public DataSeries<TX, TY> Data
    {
        get { return realData; }
        set
        {
            realData = value;
            OnPropertyChanged(dataName);
        }
    }
...
}

Thank you

  • Joe asked 1 month ago
  • last active 1 month ago
0 votes
0 answers
190 views

Hey Guys,

I have a requirement where I need to show Donut Chart Title , but adding any annotation is crashing my application.

    let textAnnotation = SCITextAnnotation()
    textAnnotation.coordinateMode = .relative
    textAnnotation.x1 = SCIGeneric(0.5)
    textAnnotation.y1 = SCIGeneric(0.5)
    textAnnotation.horizontalAnchorPoint = .center
    textAnnotation.verticalAnchorPoint = .center
    textAnnotation.text = "Test"
    textAnnotation.style.textStyle.fontSize = 14
    textAnnotation.style.textColor = UIColor.fromARGBColorCode(0xff000000);
    textAnnotation.style.backgroundColor = UIColor.clear
    chartSurface.annotations = SCIAnnotationCollection(childAnnotations: [textAnnotation])

Thanks

0 votes
0 answers
180 views

Hello Team,

In Pie Chart with DonutSeries, the segment spacing seems to have no effect on graph.

donutSeries.segmentSpacing = 10

Thanks

0 votes
162 views

I have a C# program that produces a custom data series in the form List, where the Dataline members are Date, Open, High, Low, Close, Volume. Is there some way I can plot my data series in SciChart, without converting it element-by-element into OhlcDataSeries?

  • Steven M asked 2 months ago
  • last active 1 month ago
0 votes
0 answers
186 views

This might need to be two separate questions, but is there a way to select a point in a line series. or, can I style a pointMarker differently for each data point?

I would prefer to not have to do this with annotations.

0 votes
185 views

Hi Everybody,

I use a FastLineRenderableSeries with an XyDataSeries,

when I append data with a negative incrementation of X value,
nothing seems to be drawn

for example:

 Clear();
 for (int i = 0; i < 100; i++)
 {
      Append(100-i, i);
 }
 ZoomExtents();

but this example is working

 Clear();
 for (int i = 0; i < 100; i++)
 {
      Append(i, i);
 }
 ZoomExtents();

Is there a way to get this working? In my application data comes in real time, so I can’t sort them.

Thanks in advance for your help.

0 votes
185 views

Hi

I want to use a custom Filter to create a new dataseries based on two existing series – like the RatioFilter.

Do you have any examples of that. There must be some complications around assuring that the data is in sync – before creating the new value.

/Flemming

0 votes
191 views

Hello everybody.

What is the best way to pass 3 y-values to single x-value?

Currently i’m using XyyDataSeries + XyDataSeries

Don’t know, if it’s best approach?

0 votes
171 views

Our team is evaluating using the WPF 3D charts for a feature. We need to know if it is possible to add custom objects to the scene and have a user be able to click on the object, allowing for use to manipulate it. Specifically, we’d need to manipulate the clicked object by scaling it and showing a tooltip. The “Add Objects To a 3D Chart” example doesn’t allow you to click on the chess pieces.

1 vote
190 views

Hello,

This might sound like a newbie question (well it is) but I was wondering how this would work.
We have a application made in python that receives data over ethernet or serial, processes it, saves data in a file and then also shows it either in graph or in value. The GUI also has buttons, drop downs and what not to select IPs, serial COMs and send commands. The problem is some issues on processing the data and customization of graphs (among others).

Scichart seems to allow all this and the idea was to make 1 or more threads for the data receiving/sending and processing and then have the GUI thread.
From the examples it seems like everything must be made in C# is this correct? I am more accustomed to C++ .

0 votes
206 views

I am using SciChart MVVM and need to bind to the stroke property of the type LineRenderableSeriesViewModel. Is there anyway to make this happen? It doesn’t support binding as follows:

LineRenderableSeriesViewModel renderSeries = new LineRenderableSeriesViewModel();
Binding b1 = new Binding();
b1.Source = this;
b1.Path = new PropertyPath("color");
BindingOperations.SetBinding(renderSeries, BaseRenderableSeries.StrokeProperty, b1);

I cannot find a way to expose the properties of the LineRenderableSeriesViewModel (IRenderableSeriesViewModel).

0 votes
176 views

Hi guys,

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

Here’s the XAML.

...

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

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

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

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

    </s:FastUniformHeatmapRenderableSeriesForMvvm>

    ...

</s:SciChartSurface.RenderableSeries>
...

Here’s the MVVM code.

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

    public event PropertyChangedEventHandler PropertyChanged;
}
...

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

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

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

}

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

Random rnd = new Random();

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

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

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

    }
}

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

...

What am I missing?

0 votes
184 views

I’m try to generate a UIImage from a SCIChartSurface into a graphic context using the code below from a view that is not displayed on the screen. The image created is pure black, which indicates it did not draw. If I display the graph in a view on the devices screen, the graph draws correctly.

UIGraphicsBeginImageContextWithOptions(self.chart.bounds.size, NO, 0.0);
[self.chart drawViewHierarchyInRect:self.chart.bounds afterScreenUpdates:YES];
UIImage *chartImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();

Are there any special steps that are needed to draw into a graphic context?

0 votes
184 views

Hi all,

Why the API’s for iOS, Android and WPF are not identically?
I have seen many samples on the forum, but to adapt it to a different platform is very hard.
A lot of classes are different for each platform.

  • Is there any “comparison” for the different platforms?
  • Is this planned to unify the API’s?

Regards
Urs

  • Urs Geser asked 2 months ago
  • last active 2 months ago
Showing 1 - 50 of 3k results