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

0 votes
0 answers
2 views

Hi

I’m using SciChart to display digital signals, which by nature are 0 or 1.
I’m binding all data and axes from a viewmodel, following the example “WPF Chart Vertically Stacked YAxis” I tried to achive the same wiht a dynamic grid as AxesTemplate.

[...] RightAxesPanelTemplate="{DynamicResource BinaryYAxesTemplate}" [...]


    <ItemsPanelTemplate x:Key="BinaryYAxesTemplate">
        <Grid vmh:DynamicGridBuilder.RowCount="{Binding YAxesGridRows}" vmh:DynamicGridBuilder.StarRows="{Binding YAxesGridStarRows}" vmh:DynamicGridBuilder.ColumnCount="1" />
    </ItemsPanelTemplate>

Can you supply an example how stacked YAxes can be achieved?

Cheers

Martin

0 votes
0 answers
5 views

Hi:

My name is Harold Ramírez and I have a question I would like you to answer because I don’t find any doucmentation about it online.

I have a WPF application with several charts, some of them in 3D. These 3D charts have the X axis in horizontal, Y in vertical and the Z in depth. I want only to keep the labels on the X and Y axis, on the left and bottom of the chart.

The only documentation I have found is this page: https://www.scichart.com/documentation/v5.x/webframe.html#Showing%20Axis%20Labels%20on%20one%20side%20of%20the%203D%20Chart.html, and only shows how to make it in XAML, but I need it to do it programatically in C#.

Thank you for your time.

Harold.

0 votes
0 answers
11 views

I need to export a load of images from one graph. Export from the View is very long. So, I’ve implemented the export in memory like in this example:
https://support.scichart.com/index.php?/Knowledgebase/Article/View/17213/34/rendering-chart-to-bitmap-in-memory

Export is fast and flexible. One of my axes has a custom label provider, but I see a default axis labels after export. Export from View gives correct label values. Here is the code of the label provider:

public class MyCustomLabelProvider: NumericLabelProvider
{

    public override string FormatLabel(IComparable dataValue)
    {
        return string.Format("{0:" + this.ParentAxis.TextFormatting + "}", 1 / (double)dataValue);
    }

    public override string FormatCursorLabel(IComparable dataValue)
    {
        return string.Format("{0:" + this.ParentAxis.TextFormatting + "}", 1 / (double)dataValue);
    }
}

And a code of export:

    var sciChartSurface = new SciChartSurface();
    ThemeManager.SetTheme(sciChartSurface, "BrightSpark");
    sciChartSurface.YAxes = new AxisCollection()
    {
        new NumericAxis()
        {
            AxisAlignment = AxisAlignment.Left,
            VisibleRangeLimitMode = RangeClipMode.MinMax,
            LabelProvider = new MyCustomLabelProvider(),
            DrawMajorGridLines = false,
            DrawMinorGridLines = false,
            DrawMajorBands = false,
        }
    };
    sciChartSurface.XAxes = new AxisCollection()
    {
        new NumericAxis()
        {
            AxisAlignment = AxisAlignment.Bottom,
            LabelProvider = new CurvatureLabelProvider(),
            VisibleRangeLimitMode = RangeClipMode.MinMax,
            DrawMajorGridLines = false,
            DrawMinorGridLines = false,
            DrawMajorBands = false
        }
    };

    sciChartSurface.RenderableSeries = new ObservableCollection<IRenderableSeries>()
    {
        new FastLineRenderableSeries() { DataSeries = lineSeries, Stroke = Colors.Green }
    };

    ...

    sciChartSurface.XAxes.FirstOrDefault().VisibleRange = new DoubleRange(0, 100);
    sciChartSurface.ExportToFile(Path.Combine(folderPath, $"Object.png"), ExportType.Png, false, new Size(1500, 750));

Any suggestions?

0 votes
0 answers
14 views

Hi support,
I have two signal, one is SIN waveform and another is COS waveform (like picture 1). Now I want to draw two signal like XY-Chart, how can I fix the same scale of X and Y axis? In the same view scale, the path must like a Circle.

  • Jazz Kuo asked 2 days ago
  • last active 2 days ago
0 votes
26 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
19 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
31 views

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

  • Johnny Yeh asked 6 days ago
  • last active 14 hours ago
0 votes
47 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
61 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
60 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
56 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
47 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
55 views

Hello,

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

0 votes
73 views

Hello,

How to add the color picker for the annotations.

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

0 votes
93 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
87 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
111 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
109 views

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

0 votes
97 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
149 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
146 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
154 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
166 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
186 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
170 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
175 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
156 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
196 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
165 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 2 months ago
0 votes
187 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
175 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
195 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
209 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
182 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
175 views

I am developing PieChart with MVVM.
I would like to hide the details of the item. How can I do this?

0 votes
244 views

Maybe this isn’t a quirk, but I wanted to point this out. (No pun intended on points.)

So, I was in search of a way to keep a series selected after the user drags a point or double-clicks on a point in that series.

I found a way, but it doesn’t really make sense to me why it works.

Before, I was using the following code and it would keep the series selected, but it would also select another series with the index of hitTestPoint.DataSeriesIndex. (Which makes sense.) But I wasn’t sure why the series with the point was staying selected too.

    private void _sciChart_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
    {
        if (SelectedSeries == null) { return; }

        HitTestInfo hitTestPoint = SelectedSeries.HitTest(rawPoint: MousePosition, hitTestRadius: 10);

        if (hitTestPoint.IsHit)
        {
            RenderableSeries[hitTestPoint.DataSeriesIndex].IsSelected = true;
        }
    }

However, by adding the IsSelected = false part right after setting it to true works like a charm. And I get why the series with the same index as DataSeriesIndex becomes selected/unselected, but I don’t get why the series with the point also stays selected.

Here’s my “hack” to make it work as I want:

    private void _sciChart_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
    {
        if (SelectedSeries == null) { return; }

        HitTestInfo hitTestPoint = SelectedSeries.HitTest(rawPoint: MousePosition, hitTestRadius: 10);

        if (hitTestPoint.IsHit)
        {
            RenderableSeries[hitTestPoint.DataSeriesIndex].IsSelected = true;
            RenderableSeries[hitTestPoint.DataSeriesIndex].IsSelected = false;
        }
    }

Anyway, it works so that’s great. But I just wanted to let you know about this and maybe give me some insight into why this works or if there’s a “cleaner” way.

Thanks!

  • Greg Knox asked 2 months ago
  • last active 2 months ago
0 votes
249 views

Hallo,

I updated to version 4.2.0.9.172 Runtime 4.0.30319. From that point on I receive this error coming from my VerticalLineAnnotationStyle:
System.InvalidOperationException: ‘Unable to Apply the Control Template. PART_LabelsPanel is missing or of the wrong type’

So I added this to the template in my style:

And now I get this error: System.ArgumentOutOfRangeException: ‘Specified argument was out of the range of valid values.’

What should the Template of VerticalLineAnnotation be?

My current syle:

        <Style x:Key="CommentAnnotationStyle" TargetType="pp:CustomCommentAnnotation">
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="StrokeThickness" Value="1.0" />
        <Setter Property="LabelTextFormatting" Value="{Binding DefaultTextFormatting, Mode=OneWay, RelativeSource={RelativeSource Self}}" />
        <Setter Property="IsHitTestVisible" Value="True"/>
        <Setter Property="Stroke" Value="Blue"/>
        <Setter Property="StrokeDashArray" Value="1 0 0 1"/>
        <!---->
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="s:VerticalLineAnnotation">
                    <Grid x:Name="PART_LineAnnotationRoot" ShowGridLines="False">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>

                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>

                        <Line x:Name="PART_GhostLine"
                              MouseDown="PART_GhostLine_MouseDown"
                              Grid.Row="1"
                              Grid.Column="1"
                              HorizontalAlignment="Center"
                              Stretch="Fill"
                              Stroke="Transparent"
                              StrokeThickness="8"
                              IsHitTestVisible="True"
                              Cursor="Hand"
                              ToolTip="{Binding Comment, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type pp:CustomCommentAnnotation}}}"
                              X1="0"
                              X2="0"
                              Y1="0"
                              Y2="1" /><!-- after Transparent StrokeThickness="{z:Static Member=visuals:ManipulationMargins.AnnotationLineWidth}"-->

        <Line x:Name="PART_Line"
                              MouseDown="PART_GhostLine_MouseDown"
                              Grid.Row="1"
                              Grid.Column="1"
                              HorizontalAlignment="Center"
                              Stretch="Fill"
                              Stroke="{TemplateBinding Stroke}"
                              StrokeDashArray="{TemplateBinding StrokeDashArray}"
                              StrokeEndLineCap="Square"
                              StrokeStartLineCap="Square"
                              StrokeThickness="{TemplateBinding StrokeThickness}"
                              IsHitTestVisible="True" 
                              Visibility="{Binding LineVisible, Converter={StaticResource BoolToVis},
                                        RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type my:STMainWindow}}}"
                              Cursor="Hand"
                              X1="0"
                              X2="0"
                              Y1="0"
                              Y2="1" />

        <Grid x:Name="PART_LabelsPanel"/>
        <Label></Label>
        </Grid>
        </ControlTemplate>
        </Setter.Value>
        </Setter>
    </Style>

Regards,
Jason

  • bochelie asked 2 months ago
  • last active 1 month ago
0 votes
275 views

Am encountering the following runtime error despite explicitly adding a numeric y-axis with Id “DefaultAxisId” to the AxisCollection in my view model that is bound to YAxes:

Exception thrown: ‘System.InvalidOperationException’ in SciChart.Charting.dll
SciChartSurface didn’t render, because an exception was thrown:
Message: AxisCollection.GetAxisById(‘DefaultAxisId’) returned no axis with ID=DefaultAxisId. Please check you have added an axis with this Id to the AxisCollection

Stack Trace: at SciChart.Charting.Model.AxisCollection.GetAxisById(String axisId, Boolean assertAxisExists)
at A.IJ.M(ISciChartSurface D, RenderPassInfo I, IRenderContext2D J)
at A.IJ.RenderLoop(IRenderContext2D renderContext)
at SciChart.Charting.Visuals.SciChartSurface.DoDrawingLoop()

To test, I added the following Y-Axis within my view model constructor:

YAxes.Add(new NumericAxis()
        {
            Id = "DefaultAxisId",
            Visibility = Visibility.Hidden
        });

Why is this error still thrown?

  • bbmat asked 2 months ago
  • last active 2 months ago
0 votes
197 views

I have two separate view models each representing a chart pane. I explicitly do not share the MouseEventGroup Id, and expected none of the ChartModifiers to be shared. However, the MouseWheelZoomModifier is shared. When I zoom via mouse wheel on one chart the other chart is zoomed instantaneously as well. Visible Range is shared but what bothers me is that MouseWheelZoomModifier syncs but other modifiers do not. Is that intended? Desired is to not have any modifiers sync unless I share an identical MouseEventGroup Id.

Here is the code that produces this problem:

<s:SciChartSurface
                x:Name ="Surface"
                Padding="5"
                YAxes="{Binding YAxes, Mode=OneWay}"
                RenderableSeries="{s:SeriesBinding ChartSeries}"
                s:SciChartGroup.VerticalChartGroup="{Binding VerticalChartGroupId}"
                s:ThemeManager.Theme = "{Binding ChartTheme}">

        <s:SciChartSurface.Style>
            <Style TargetType="{x:Type s:SciChartSurface}">
                <Style.Triggers>
                    <!-- Enable DirectX only when not in designer -->
                    <Trigger Property="componentModel:DesignerProperties.IsInDesignMode" Value="False">
                        <Setter Property="s3D:DirectXHelper.TryApplyDirectXRenderer" Value="True" />
                        <Setter Property="s3D:DirectXHelper.FallbackType" Value="{x:Type s:HighQualityRenderSurface}" />
                    </Trigger>
                </Style.Triggers>
            </Style>
        </s:SciChartSurface.Style>

        <s:SciChartSurface.XAxis>
            <s:CategoryDateTimeAxis Id="XAxisId" Visibility="Visible" AutoRange="Never" GrowBy="0.01, 0.01" VisibleRange="{Binding XAxisVisibleRange, Mode=TwoWay}" VisibleRangeLimitMode="MinMax" LabelProvider="{Binding LabelProvider}"/>
        </s:SciChartSurface.XAxis>

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

                <!--s:MouseManager.MouseEventGroup="{Binding SharedMouseGroupId}"-->

                <s:CursorModifier ReceiveHandledEvents="True" SourceMode="AllSeries" UseInterpolation="True" ShowAxisLabels="True" ShowTooltip="False"/>
                <s:ZoomPanModifier ReceiveHandledEvents="True" ZoomExtentsY="False" XyDirection="XDirection" ClipModeX ="ClipAtExtents" ExecuteOn ="MouseLeftButton" />
                <s:RubberBandXyZoomModifier ReceiveHandledEvents="True" IsAnimated = "False" IsXAxisOnly = "True" ExecuteOn = "MouseRightButton"/>
                <s:MouseWheelZoomModifier ReceiveHandledEvents="True" XyDirection = "XDirection"/>
                <s:ZoomExtentsModifier ReceiveHandledEvents="True" IsAnimated = "False" ExecuteOn = "MouseDoubleClick"/>
                <s:RolloverModifier ReceiveHandledEvents="True" x:Name="RollOverModifier" DrawVerticalLine="False" ShowTooltipOn="Never" SourceMode="AllSeries"/>

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

    </s:SciChartSurface>

Edit:

In addition, I am having an issue with the following as well: I use an x-Axis Visible Range property in the the view model, that serves as data context to the rendering surface, I noticed the following issue: MouseWheelZoomModifier causes “_xAxisVisibleRange != value” inside the property setter to ALWAYS evaluate false even when zooming in and out with the mouse wheel. All other chart modifiers cause the inequality to evaluate true when the visible range changes due to applying the chart modifiers. A workaround would be to instead test for “_xAxisVisibleRange.Min != value.Min || _xAxisVisibleRange.Max != value.Max” but it is nonetheless an inconsistency.

Please see below code snippet to illustrate the issue:

public IRange XAxisVisibleRange
    {
        get { return _xAxisVisibleRange; }
        set
        {
            //this is only invoked by its own pane view model (never by an outside pane view model)
            if (_xAxisVisibleRange != value)
            {
                _xAxisVisibleRange = value;
                RaisePropertyChanged("XAxisVisibleRange");


            }
        }
    }
  • bbmat asked 2 months ago
  • last active 2 months ago
0 votes
207 views

For my chart, I create a TimeSpanAxisViewModel with a VisibleRangeLimit like this…

VisibleRange = new TimeSpanRange(new TimeSpan(0, 0, 0), new TimeSpan(0, 0, 30))    
VisibleRangeLimit = new TimeSpanRange(new TimeSpan(0, 0, 0), new TimeSpan(0, 0, 30))
AutoRange = AutoRange.Never

Which properly shows the chart as having 30 seconds of time. Data is added to the chart and it displays as expected.

However, once that data reaches the 30-second limit I’m trying to increase the range by 30 more seconds.

I have a timer that evaluates the elapsed time of a Stopwatch and when that Stopwatch is greater than the current limit (30 seconds) I add to the maximum limit.

Kind of like this…

// If the stopwatch is greater than current range
if (MyStopwatch.Elapsed.TotalSeconds > VisibleRangeSeconds) {

    VisibleRangeSeconds += 30;

    TimeSpan minimumTime = new TimeSpan(0);
    TimeSpan maximumTime = new TimeSpan(0, 0, VisibleRangeSeconds);

    XAxes[0].VisibleRange = new TimeSpanRange(min: minimumTime, max: maximumTime);
    XAxes[0].VisibleRangeLimit = new TimeSpanRange(min: minimumTime, max: maximumTime);

    MySciChart.ChartModifier.ParentSurface.InvalidateElement();
}

I also noticed that VisibleRangeLimit was being updated after the Stopwatch became longer but VisibleRange was staying the same. It wasn’t being updated and I’m not sure why.

What could I be missing that would make the chart grow to the new maximum time?

  • Greg Knox asked 2 months ago
  • last active 2 months ago
0 votes
223 views

I want to write the X axis vertically, as shown in the following image.
How should I do it?

0 votes
207 views

Is it possible to remove the number on the bottom left of the chart seen in he attachment?

0 votes
0 answers
206 views

I’m rebuilding a program to adhere to MVVM and so I’m trying to figure out little tricks to do things I did previously in the code-behind.

I’d like to be able to right-click on a selected series and add a point at that location. I’m doing this in my previous application but I’m not too sure the best route to take with the MVVM application.

I’m currently selecting a series with the SeriesSelectionModifier, but I’m also not sure if there’s a “SelectedSeries” property I can get from the modifier either.

Maybe a Trigger that detects a right mouse click on a selected series that calls a command to add the point?

Or is there just not a way to do this with the chart and I need to rely on subscribing to events?

Thanks!

Answer:

I created a property named SelectedSeries which looks like this…

    public IRenderableSeries SelectedSeries
    {
        get
        {
            if (SciChart.SelectedRenderableSeries.Count > 0)
            {
                return SciChart.SelectedRenderableSeries[0];
            } else
            {
                return null;
            }
        }
    }

Then, I created a MouseRightButtonUp event to see if I right-clicked on SelectedSeries. If so, it adds a point. If I clicked on an existing point, it deletes that point.

    private void _sciChart_MouseRightButtonUp(object sender, MouseButtonEventArgs e)
    {
        if (SelectedSeries != null)
        {
            HitTestInfo hitTestToDelete = SelectedSeries.HitTest(rawPoint: MouseDownPosition, hitTestRadius: 10);

            if (hitTestToDelete.IsHit == true)
            {
                // Do nothing if the first or last point is hit
                if (hitTestToDelete.DataSeriesIndex == 0 || hitTestToDelete.DataSeriesIndex == SelectedSeries.DataSeries.Count - 1)
                {
                    return;
                }

                // Delete point
                DeletePoint(point: hitTestToDelete);
            } else
            {
                // Add point if hitting series
                HitTestInfo hitTestToAdd = SelectedSeries.HitTest(rawPoint: MouseDownPosition, hitTestRadius: 10, interpolate: true);

                if (hitTestToAdd.IsHit == true)
                {
                    // Add point
                    AddPoint(point: hitTestToAdd);
                }
            }
        }
    }
  • Greg Knox asked 2 months ago
  • last active 2 months ago
0 votes
240 views

Is it possible to get a legend for each z-axis line with a waterfall 3d graph. And show/hide each line via the legends?

0 votes
232 views

I’ve been using this chart for a few months now and yesterday ran into a problem with the Y-axis. I’m sure this is nothing more than my lack of understanding on multiple axes.

I have a need to add a 2nd Y axis and I’m not doing something right. My application is using MVVM to bind series to my chart. So far I have been adding data to my chart using the methods described here…

https://www.scichart.com/documentation/v5.x/webframe.html#Tutorial%2003b%20-%20Adding%20Series%20to%20a%20Chart%20with%20MVVM.html

I’ve read the documentation for adding data on multiple axes and have run into a wall. I have cases where I will need to have data only on one axis and other times when I will have data on both. For now I’m just setting up my 2 series in the XAML but not adding data to the 2nd Y axis yet. When I do this my series doesn’t show on the chart anymore.

Here is what I had when it worked…

            <s:SciChartSurface.YAxes>

            <!-- Dose Axis -->
            <s:NumericAxis AxisTitle="Dose (%)" AutoRange="{Binding Path=YAutoRange}"
                           AxisAlignment="Left"
                           FontFamily="Arial"
                           GrowBy="0.05, 0.05" 
                           Style="{DynamicResource ResourceKey=DoseAxisStyle}"
                           s:CursorModifier.AxisLabelContainerStyle="{StaticResource CursorModAxisLabelStyle}"
                           s:CursorModifier.AxisLabelTemplate="{StaticResource CursorModAxisLabelTemplate}" />


        </s:SciChartSurface.YAxes>

And here is what I have now…

            <s:SciChartSurface.YAxes>

            <!-- Dose Axis -->
            <s:NumericAxis AxisTitle="Dose (%)" AutoRange="{Binding Path=YAutoRange}"
                           AxisAlignment="Left"
                           FontFamily="Arial"
                           GrowBy="0.05, 0.05" 
                           Style="{DynamicResource ResourceKey=DoseAxisStyle}"
                           s:CursorModifier.AxisLabelContainerStyle="{StaticResource CursorModAxisLabelStyle}"
                           s:CursorModifier.AxisLabelTemplate="{StaticResource CursorModAxisLabelTemplate}" />

            <!-- 2nd Y Axis -->
            <s:NumericAxis AxisTitle="{Binding Path=RightAxisTitle}" 
                           Id="YAxis2"
                           AxisAlignment="Right"
                           Visibility="{Binding Path=RightAxisVisibility}"
                           AutoRange="{Binding Path=YAutoRange}"
                           FontFamily="Arial"
                           GrowBy="0.05, 0.05" 
                           Style="{DynamicResource ResourceKey=DoseAxisStyle}"
                           s:CursorModifier.AxisLabelContainerStyle="{StaticResource CursorModAxisLabelStyle}"
                           s:CursorModifier.AxisLabelTemplate="{StaticResource CursorModAxisLabelTemplate}" />

        </s:SciChartSurface.YAxes>

My model includes code such as…

        // data context for the series(s) on the chart
        public ObservableCollection<IRenderableSeriesViewModel> Measurements
        {
            get { return _measurements; }
            set { SetProperty(ref _measurements, value); }
        }

        private void AddMeasurementSync(MeasurementViewModel measurement, bool clear = false)
        {
        if (clear)
            // clear the profiles, we're only showing one at a time.
            Measurements.Clear();

        // add profile points to the data series
        var xyProfile = new XyDataSeries<double, double>();
        var xyLeft = new XyDataSeries<double, double>();
        var xyRight = new XyDataSeries<double, double>();

        xyProfile.AcceptsUnsortedData = true;
        xyLeft.AcceptsUnsortedData = true;
        xyRight.AcceptsUnsortedData = true;

        // loop the measurement points and fill the series
        foreach (MeasurementPointViewModel point in measurement.Points)
        {
            if (null != point)
                // add the point to the series and add IPointMetaData
                // which says whether or not we are in the penumbra
                xyProfile.Append(
                    point.Distance,
                    point.Dose);
        }

        // create series for profile          
        LineRenderableSeriesViewModel series = new LineRenderableSeriesViewModel()
        {
            StrokeThickness = 2,
            Stroke = measurement.MeasurementColor,
            AntiAliasing = true,
            DataSeries = xyProfile,
        };

        // should be showing points?
        if (ShowPoints)
        {
            series.PointMarker = new EllipsePointMarker()
            {
                Stroke = Colors.Black,
                Fill = Colors.White,
                Width = 6,
                Height = 6,
            };
        }

        // bind to the collection
        Measurements.Add(series);
    }
0 votes
0 answers
217 views

I want to visualize Contour in my application and set the Contour Interval.
But the visualization is not as the expected value.
From your Example application: 3D Charts > Create A Surface Mesh Chart > Surface Mesh 3D With Contours. (Screenshot in attachment)
I have set the Contour Interval property slider to the maximum value (30).
But the result is less than 20, about 10.

How to make the Interval 30, and the visualization is really 30?
Are there any interval scaling property?

0 votes
241 views

Hello. I have a chart with multiple YAxes. One of the YAxis, for example, has an initial range of -10 to 10. I’d like to be able to put my cursor over that axis, scroll the wheel, and have that range increase or decrease depending on which way the user scrolls.

Is there an ability to do that within SciChart’s standard feature, or will something custom need to be written?

  • Greg Knox asked 2 months ago
  • last active 2 months ago
0 votes
0 answers
252 views

I’d like to rotate after I finish drawing the chart. So I rotated the chart in the following way. (0, 90, 180, 270 Degrees)

SciChart.LayoutTransform = new System.Windows.Media.RotateTransform(0, 0.5f, 0.5f);
SciChart.LayoutTransform = new System.Windows.Media.RotateTransform(90, 0.5f, 0.5f);
SciChart.LayoutTransform = new System.Windows.Media.RotateTransform(180, 0.5f, 0.5f);
SciChart.LayoutTransform = new System.Windows.Media.RotateTransform(270, 0.5f, 0.5f);

And then “TooltipModifier” was also rotated.
But I don’t want to rotate “TooltipModifier.”
When drawing a chart, use “CustomRenderSeries” to rotate using “AxisAlignment” to break the appearance of the chart.

How can you rotate the chart without rotating the “TooltipModifier”?

0 votes
265 views

Hello,
We would like to have a axis behavior similar to Mathlab. The idea is that for the x axis a common exponent is written only once on the right and for the y axis the common exponent is written once on the top of the chart.
Is this possible ?
How can we implement it ?

Thank you !

See figure attached

Showing 1 - 50 of 2k results