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

<!–

Welcome to the SciChart WPF Charts Community Forums!

Please see our Question asking guidelines before posting. You can also find our WPF Charts Documentation here.
  – Thanks & regards, SciChart Team

–>

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy

We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

0 votes
10 views

Hi, is there a way to get the number of major ticks lines and to calculate the difference of two consecutive major ticks lines values? Thanks.

  • M. C. asked 14 hours ago
  • last active 11 hours ago
0 votes
18 views

I have a DateTimeAxis.

While I can see a way to template the format the text for all the axis tick labels, I need a way to completely override what is being rendered for each item. I want, for example, today’s date to be in bold, and to apply other text/buttons below the axis label conditionally, depending on logic specific to that date.

Is this possible?

0 votes
11 views

I’ve enabled the Rollover on my chart, and I am trying to make a custom AxisLabelTemplate, which is easy to do if you are just looking to add some text/format around the AxisFormattedDataValue.

However, what i really want to do is to use the AxisInfo.DataValue to look up a specific string related to each of the Avis values, and set this as my label text;

ie, if my axis DataValues are “1, 2, 3, 4, 5″I want the rollover text to read “1 – Dog”, “2 – Cat”, “3 – Fish”, “4 – Mouse”, “5 – Aardvark”

Is this possible?

Thanks

0 votes
0 answers
22 views

Hello,

I’m writing regarding the IsCenterAxis property on the AxisBase object. I am creating biplots in my application and have set this property to true but the axes stay on the outside edge of the chart. Is there something else I must do to achieve this? I found a link in the forum about doing exactly this, but it was broken.

This is the broken link on the Navigation Pane page about “Placing Axis Central in the Chart”
https://www.scichart.com/documentation/v5.x/www.scichart.com/wpf-chart-example-central-xaxis-and-yaxis

Also, I need to draw a unit circle on my chart and I was curious what the best way to go about doing that would be.

Thank you

0 votes
0 answers
17 views

Hello!
I’m writting an app with using SciChart Surface. After little changes in XAML code, that had no effect on surface, those surface show nothing. I turned all made changes back to correct working version but this didn’t help. What can it be? I attach veiw of surface that a see now. (Theme is presetup “Electric”)

0 votes
0 answers
19 views

Hello Guys
I want to know how to set up a Xaxis major line manually.(NumericAxis )

For example,
If the range of the x-axis is 1 to 100

Major lines are 0,10,30,35,50 … 100

I want to set it freely.

1 vote
37 views

Hello, SciChart Team!
i have an issue using mouse drag event ( RubberBandXyZoomModifier, ZoomPanMidifier). the message says “NullReferenceException in SciChart.Charting.dll ” or “Thread.cs not found” from time to time.
after some experiments i figured out that the app starts to crush after i change XAxis type .
i have a simple mvvm user control used to display both arrays of double and datebound data, XAxes of SciChart Surfase is bound to an observable collection of IAxis elements. if i need to change chart type i clear this collection and create an axis of desired type (DateTimeAxisViewModel or NumericAxisViewModel). after that the series can be added, but zooming causes crash with nearly to no info.

i attached a solution, which lacks only scichart dlls in order to run (hopefully), Window_Loaded method has a commented line which changes chart type and makes app crush on zooming, would be nice if you checked it out.
Thanks in advance!
Alexander

0 votes
0 answers
24 views

I’m trying to run my WPF with SciChart aplication in the separate AppDomain, but method SciChartSurface.SetRuntimeLicenseKey() is not working for me – no any exception, but in SciChart control I can see “Sorry! Your trial of SciChart has expired. Please contact sales if you require an extension.” instead of Chart.

In the default AppDomain it works fine.

I tried to run SetRuntimeLicenseKey method from both AppDomains – Default and separate, but without luck.

0 votes
0 answers
27 views

Hello!

I want to use three colors in Xaxis.
But I do not know how to use multiple colors at once.

can put multiple colors through Xaxes,
but when move the scroll bar, the Xaxes colors do not move together. (Top and Buttom Xaxes colors)
I want to move the colors of both Xaxes together. or want to assign multiple colors(over the 3 Colors) to one Xaxis.

You can see the code and graphs through the image.

Tell us how to use it.

Thank you!

1 vote
58 views

Hello,

I am currently taking a v5 test drive and noticed the following problem that would be a show stopper for me:

When syncing several chats via shared mouse events and shared visible x-Axis range I noticed that when zooming in that the chart axes get out of sync, sometimes significantly by several seconds on a CategoryDateTimeAxis, DateTimeAxis, but also apparently on numeric axes.

The error can easily be replicated when looking at your Example Suite , specifically the “Sync Multi Chart Mouse” sample. When you zoom into the chart you notice that the x-Axes on each chart are not aligned anymore. In this specific example when zooming in so that the minimum on the left side of the screen lies at around value 10 and the maximum at around 55 then moving with the mouse on the top chart to 52.44 shows a value of 52.53 on the lower chart. That is completely out of sync and gets worse on DateTime and Category DateTime axes.

Could anyone (and support) please chime in so I can understand what is going on and whether there is a fix for this or whether this is a bug that has been around for some time and cannot be adjusted within a reasonable amount of time?

I have been pulling my hairs over this and spent hours on different approaches, via ViewPortManager and the updating of shared visible range in both code and xaml. All to no avail and given the example code also exhibits the same issue I doubt it relates to a wrong implementation on my end.

Thanks a lot,
Matt W.

  • bbmat asked 2 weeks ago
  • last active 2 weeks ago
0 votes
40 views

i want o change SciChartInteractionToolbar default rubber band zoom mode to pan move .how to do it ?

0 votes
45 views

I have a strip chart (see attached image), which uses VerticalLineAnnotation to mark events. I add my own AnnotationLabel with the Text showing the event id, and a ToolTip with detailed event information. I’m currently setting the LabelPlacement as Axis. I like the look of that AnnotationLabel style, but I’d really like it to be above the plot so it doesn’t clutter up the axis. Is there a nice way to do this?

0 votes
50 views

Dear all,

I have to perform some operation inside a chart ViewPortManger.BeginInvoke()

Is there a way to know when the BeginInvoke() method is completed or do I have to implement an custom event ?

regards

  • sc sc asked 3 weeks ago
  • last active 3 weeks ago
0 votes
62 views

Hello,

I developed a program using scichart.

Unfortunatly, It can not work on some computers.

There are same hardware and OS(Window 7).

I found this problem when I use DirectX.

I have referenced your code. and My code had ChangeRenderSurface method.

but It can not work well…

I think the problem occurred when I called scichart3d.

What is wrong?

Does it need to install anything else?

If you have a solution , please tell me.

  • Guest asked 4 weeks ago
  • last active 3 weeks ago
1 vote
223 views

Dear all,

In our application we have a chart that we need to explot into a BMP file at a given size.
For our scenario the process is as below :

1 – From the chart which is display to user at a default size we force the Width and Height of the chart to our desired size

mysciChart.Width = 480;
mysciChart.Height = 220;
mysciChart.UpdateLayout();

2 – We can then use the build in Export To file method to export the file

if (mysciChart.ActualWidth > 10 && mysciChart.ActualHeight > 10)
{
    mysciChart.ExportToFile(myBMPFile, ExportType.Bmp, false);
    }

The chart is then exported to correct size but it is not refresh with data as shown in picture attached

please note that the code above is executed in the Main UI thread dispatcher

Any idea how to get the chart properly render in Export, is there a kind of refresh something to call on the chart before export when we change its size ?

Thnaks for help

  • sc sc asked 4 weeks ago
  • last active 5 days ago
1 vote
66 views

Is there any way to change the y axis values according to the unit?

For example,

I am plotting the resistance value in Y axis, initially the values were in ohm and suddenly it changes to mega ohm since it is a live graph, then the values which we were shown in ohm should be converted to mega ohm and display in the graph.

Is there is any options available in Scichart in this scenario?

0 votes
0 answers
59 views

Hello,

ColumnChart: Autorange is not working if XyDataSeries contains 1 or 2 items.

The SDK example -> 2D Charts -> Column Chart with little modifications (the complete code is attached):

    private void OnClick(object sender, RoutedEventArgs e)
    {
        using (this.sciChart.SuspendUpdates())
        {
            for (int i = 0; i < ARRAY_SIZE; i++)
            {
                var val = _rnd.Next(-100, 100);
                Debug.WriteLine(val);
                _dataSeries.Update(i, val);
            }
        }
        sciChart.ZoomExtents();
    }

If ARRAY_SIZE is 1; any value; after “click me” button pressed (may be needed to press few times to catch this)
enter image description here

If ARRAY_SIZE is 2; the values are [27, 55]

enter image description here

If ARRAY_SIZE is 3 or more – columns are displayed OK for any values.

If I use

AutoRange="Never" VisibleRange="-100, 100"

this example works OK.

Question: please let me know how to make the ColumnChart working properly for one or two columns and AutoRange=”Always”

Thanks!

-Egor

1 vote
0 answers
70 views

Hi All,
I’m using the RubberBandXyZoomModifier and DataPointSelectionModifier together from the left mouse button; enabling and disabling them based on the left CTRL key being pressed (CTRL key down = select).

I’m seeing what I assume to be a focus issue on first mousing over off the chart area in that the chart area doesn’t attract focus, and thus recognise the ctrl key press, until there’s been a mouse button click. I’ve created an app to demonstrate and attached the XAML and code behind for it.

To see the behaviour, run the code and press the “does nothing” button to set focus to it. Mouse over the chart and press the CTRL key – the key press is not recognised. Click the left mouse button and the key press is now recognised. So far so good.
Now if you repeat the process but click and drag – the logic is caught between the two modifiers being enabled/disabled and the zoom selection is shown even though the CTRL key is down. There are other issues e.g. CTRL down and drag outside the chart can leave the selection modifier drag area marked on the chart while the zoom mode is in operation

I was thinking of something like setting focus or forcing a mouse click in response to the mouse over event but so far my attempts have failed – probably from doing the wrong thing in the wrong place – so, as usual, any and all suggestions are most welcome!

/Stuart

1 vote
71 views

I would like to dynamically add and remove columns from a ColumnRenderableSeriesViewModel in code behind.

I am using MVVM and the SeriesBinding. I assigned a XyDataSeries<double, double> to the ColumnRenderableSeriesViewModel .DataSeries.

The chart initially draws all the bars for each item in the XYDataSeries, but If I append or remove one of them, the chart does not update and show the new bar or remove the old bar.

Here is my XAML:

        <s:SciChartSurface RenderableSeries="{s:SeriesBinding RenderableSeries}">
            <s:SciChartSurface.XAxis>
                <s:NumericAxis />
            </s:SciChartSurface.XAxis>

            <s:SciChartSurface.YAxis>
                <s:NumericAxis />
            </s:SciChartSurface.YAxis>
        </s:SciChartSurface>

And some of my view model:

using SciChart.Charting.Model.ChartSeries;
using SciChart.Charting.Model.DataSeries;
using System.Collections.ObjectModel;

namespace ChartExample {
    public class ChartViewModel {
        ColumnRenderableSeriesViewModel _seriesViewModel = new ColumnRenderableSeriesViewModel();
        XyDataSeries<double, double> _dataSeries = new XyDataSeries<double, double>();

        public ChartViewModel() {
            RenderableSeries.Add(_seriesViewModel);
            _seriesViewModel.DataSeries = _dataSeries;
        }


        public ObservableCollection<IRenderableSeriesViewModel> RenderableSeries { get; } = new ObservableCollection<IRenderableSeriesViewModel>();


        public void AddSeries() {
            _dataSeries.Append(_dataSeries.Count, _dataSeries.Count);
        }


        public void RemoveSeries(int seriesIndex) {
            _dataSeries.RemoveAt(seriesIndex);
        }
    }
}

Can you please tell me what I might be doing wrong?

  • Doug Witt asked 1 month ago
  • last active 4 weeks ago
0 votes
66 views

Hello,

I’m working at displaying a map using FastNonUniformHeatmapRenderableSeries. I want to make it looks blurry, so there will be smooth transition between inner edges.

How can I do it?

Thanks in advance

0 votes
73 views

Hello,

question about FastColumnRenderableSeries:
assuming the UseUniformWidth is set to True (all columns are same width) and Series already displayed: how I could get the actual width for one (any) column from code?

I.e. I do not want to use GetColumnWidth(IPointSeries points, IRenderPassData renderPassData) to computes the width of the columns to be drawn.

Just need to get the actual width for column already drawn.
From code.

Thanks!

-Egor

1 vote
62 views

Hello,

one more question please;
Please see the pict below (same SDK example: 2D charts-> Column Chart)

[enter image description here

Just added the Legend and Rollover:

            <s:SciChartSurface.ChartModifier>
            <s:ModifierGroup>
                <s:ModifierGroup>
                    <s:LegendModifier x:Name="LegendModifier" 
                                      ShowVisibilityCheckboxes="False" 
                                      ShowLegend="True" 
                                      Orientation="Vertical" Margin="10"
                                      HorizontalAlignment="Right" 
                                      ShowSeriesMarkers="True"  />
                    <s:RolloverModifier x:Name="RolloverModifier" 
                                        ExecuteOn="MouseMove" 
                                        ShowTooltipOn="MouseHover" 
                                        IsEnabled="True" />
                </s:ModifierGroup>
            </s:ModifierGroup>
        </s:SciChartSurface.ChartModifier>

I’d like to keep Series Name in one place – on Legend and remove it from Rollover tooltip text.
I.e. tooltip shall be “13.7” in this case.

I found how to format the Legend (LegendModifier.LegendItemTemplate SciChart WPF v5 SDK User Manual)
But didn’t find the similar way for Tooltip.

Could you please let me know how to achieve this?

Thanks!

-Egor

-1 votes
78 views

When the axisX.VisibleRange.Max is 5000 and the axisX.VisibleRange.Min is 4600, now I execute these program statements:
double max = Convert.ToDouble(axisX.VisibleRange.Max);
axisX.VisibleRange.SetMinMax(max-5000, max);
The vertical grid line become like the figure 2.png. How can I solve it?

0 votes
66 views

1) About VerticalLineAnnotation, when I move the vertical line, which event I can use to get real time data?
2) Do the chart lib have the full method to calculate the Fast Fourier Transformation?

0 votes
68 views
  1. How can I make the gap always the same between the two verticalLineAnnotations? In other words, when i move one of the verticalLines, another verticalLine also move follow the previous verticalLine and the gap between them is the same.
  2. When I move the vertical line, which corresponding event of VerticalLineAnnotation the I can use to get realtime data.
0 votes
57 views

I am evaluating the SciChart package and I am trying to show a graph of data. The data changes about every 500ms. I have the code as shown below.

My XAML code is:

                            <s:SciChartSurface  Name="Chart1">
                            <s:SciChartSurface.RenderableSeries>
                                <s:FastLineRenderableSeries DataSeries="{Binding SpectrumDataSciChart}" Name="lineRenderSeries"/>
                            </s:SciChartSurface.RenderableSeries>
                            <s:SciChartSurface.XAxis>
                                <s:NumericAxis ScientificNotation="None" />
                            </s:SciChartSurface.XAxis>
                            <s:SciChartSurface.YAxis>
                                <s:NumericAxis  />
                            </s:SciChartSurface.YAxis>
                        </s:SciChartSurface>

SpectrumDataSciChart is defined in the view model (.cs) as below:

        private XyDataSeries<double, double> _spec2;
    public XyDataSeries<double,double> SpectrumDataSciChart
    {
        get { return _spec2; }
        set { _spec2 = value; NotifyPropertyChanged(); }
    }

I see the correct plot but then the plot is removed (just a blank chart) and then it appears again. Seems like it is when I update the data (setting SpectrumDataSciChart to a new set of values). I don’t see this behavior with other vendors charts and wondering if I need to set something on the chart or bind differently. I tried using “FastLineRenderableSeriesForMvvm” (as I am using MVVM with WPF) also but it does the same thing. Any ideas?

0 votes
71 views

I’m playing with the DatPointSelectionModifier which seems mostly what i need but I have two problems as follows:

1/ I have started a selection operation by dragging over an area containing some points and I decide that I don’t want that area after all and want to cancel the operation (much like file explorer file dragging – hitting escape cancels the operation) – How do I do that?

2/ I have a set of selected points and drag to select another set which overlaps the first set. I would like the any points in the overlap to invert from selected to unselected and vice versa. How would I know which points are encompassed by the drag operation so i can work out the overlap?

Thanks for any suggestions
/Stuart

1 vote
162 views

I think this is a pretty simple question but i am not sure what i am missing.I have a toggle button on my legend that is intended to allow the users to select all the series or deselect all the series.
the button essentially goes through the Renderable series view models and set the IsSelected to either true or false, this approach however, doesn’t work. I looked at the SelectionModifier and i can see that has a protected DeselectAll method and i am thinking to leverage that to solve this use case.

what is the best solution to accomplish this? isn’t this functionality something that perhaps be standard and could just be turned on?

0 votes
74 views

Hello,

one more question.
Same example from your SDK – 2D charts, Column Chart

How could I change the width / color for one line only:
enter image description here

I.e. for X-line (Y = 0).
The rest X lines shall remain the same.

Thanks!

-Egor

0 votes
75 views

Graph type “RangeBar” of Microsoft “MSChart” control and Does the graph type with the same function exist in “SCICHART”?
If it does not exist, is it possible to reproduce “RangeBar”?
I would be happy if you could have a Chart like the image.
Best regards.

1 vote
79 views

To whom this may concern:

I’d like to refer to the “Spline Scatter Line Chart” example in the SciChart Examples package. If I were to make this a CustomRenderableSeriesViewModel that I can set in a ViewModel class, how would I go about doing that?

I am using SciChart v4, and here’s what I know so far:

  1. CustomRenderableSeriesViewModel : BaseRenderableSeriesViewModel
  2. ViewType = typeof(CustomRenderableSeries)

My code so far is:

public class CustomRenderableSeriesViewModel : BaseRenderableSeriesViewModel
{
    public override Type ViewType => typeof(CustomRenderableSeries);
}

How would I go about setting the IsSplineEnabled property of the CustomRenderableSeries through the CustomRenderableSeriesViewModel class?

FYI: I have looked here and the Worked Example – CustomRenderableSeries in MVVM link goes to the SciChart v5 User manual.
Additionally, this is a duplicate of this issue on Stack Overflow (since I thought you were still fielding questions on there). Feel free to answer on either or both.

Can you please advise?

  • Ari Sagiv asked 2 months ago
  • last active 1 month ago
-1 votes
0 answers
70 views

For every 5 seconds I’m adding 5,00,000 data points to line Series but on zoom and other mouse handler gets hanged on adding data.

2 votes
77 views

Hello, @scichart team,

one question please for Column Chart (2D; WPF).
Based on on the example from your SDK for Column Chart (2D Charts – Column Chart).
No changes to the code at all;

enter image description here

My need is to display each “X” value on X axis;
I.e. right now it is “0, 2, 4, 6 etc”
But I need “0, 1, 2, 3, 4, 5 etc.”
I.e. no changes expect this one.

I played with https://www.scichart.com/documentation/v5.x/SciChart.Charting~SciChart.Charting.Visuals.Axes.AxisCore_members.html and with the custom NumericLabelProvider but didn’t find how to make this.

Please suggest how to achieve this.

Thanks!

-Egor

0 votes
0 answers
170 views

I’m using the YAxes property of the chart to data bind to a collection of NumericAxisViewModels. Is there a way to rotate the tick labels in this scenario. I can’t define a style in XAML and then assign it to the Axis because the axis is created in scichart somewhere. All I have is the axis view model. I have a LabelProvider but it doesn’t seem to support rotation unless I access the ParentAxis. Ultimately I would like to rotate some vertical axis and not other but I might be able to live with rotating all of them.

I have tried defining a style in xaml that applies to all numeric axis but it didn’t work:

<Style TargetType="{x:Type s:DefaultTickLabel}">
        <Setter Property="LayoutTransform">
            <Setter.Value>
                <RotateTransform Angle="-90"/>
            </Setter.Value>
        </Setter>
    </Style>

Adding a LabelProvider sort of works but seems a little hacky and doesn’t set the scale appropriately ( I have to zoom to extends to see the labels). Is this the way I am supposed to do it?

public override string FormatLabel(IComparable dataValue) {
        var style = new Style(typeof(DefaultTickLabel));
        style.Setters.Add(new Setter(DefaultTickLabel.LayoutTransformProperty, new  RotateTransform(-90.0)));
        ParentAxis.TickLabelStyle = style;
0 votes
223 views

Hi

I’m trying to use SciChart in my Xamarin Visual Studio Cross platform application. After installing the SciChart package in the Package Manager console I got the dependency reference error:

Package SciChart 5.1.0.11405 was restored using '.NETFramework, Version=v4.6.1' instead of the project target framework 'NETStandard,Version=v2.0'. This papckage may not be fully compatible with your project .

I know that .NET framework 4.6.1 is different from .NETStandard2.0.

I’ve read some articles about how to target multiple .NET versions in the same application by modifying the .csproj file, but I can’t get it work anyway.
https://medium.com/@SicknoteSteve/nuget-targeting-both-net-standard-and-the-net-framework-326a16266ca4
I’ve modified the csproj file like this

<PropertyGroup>
  <TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)'=='netstandard2.0'">
  <PackageReference Include="Xamarin.Forms" Version="2.5.0.280555" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net461'">
  <PackageReference Include="SciChart" Version="5.1.0.11405" />
  <PackageReference Include="Xamarin.Forms" Version="2.5.0.280555" />
</ItemGroup>

This action removes all dependency errors, but I still can’t use the libraries.

Does anyone know how to solve this issue?

Thanks in advance!

0 votes
0 answers
202 views

Hi!

My goal is to allow the user to mark an x-axis range in the chart. For this, I use BoxAnnotation. The boxes cover the whole chart height and can only be moved/resized in horizontal direction.
The annotation is created via AnnotationCreationModifier.

The problem is that the user cannot select this range everywhere, but only within a certain interval of the x-axis. So it would be necessary to limit the drag range for the AnnotationCreationModifier and for the Annotation resize/move action. With other words, the drawn rectangles should stop following the mouse when the mouse if moved out of the allowed x-axis range.
Is this possible?

Best regards,
ChartIt

0 votes
158 views

I am binding my chart to an ObservableCollection that consists of many XYDataSeries. When I create and add the XyDataSeries, I set the SeriesName and Stroke properties. The data shows on the chart. I have the following Legend Template:

    <DataTemplate x:Key="LegendItemTemplate" DataType="s:SeriesInfo">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>

            <CheckBox Grid.Column="0" 
                      Margin="5,0"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Center"        
                      Foreground="{StaticResource BlackBrush}"
                      Content="{Binding SeriesName}"
                      IsChecked="{Binding RenderableSeries.IsVisible, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                      Visibility="{Binding LegendData.ShowVisibilityCheckboxes, RelativeSource={RelativeSource AncestorType=s:SciChartLegend}, Converter={StaticResource VisibleWhenTrueConverter}}" />


            <xctk:ColorPicker Grid.Column="2"  x:Name="cpPalette" 
                              ColorMode="ColorPalette" VerticalAlignment="Center"
                              SelectedColor="{Binding RenderableSeries.Stroke, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Height="25" Width="40" />

        </Grid>
    </DataTemplate>

However, when I change the colour using the Colorpicker, my charts series are not updated (ie, changing colour)

0 votes
157 views

Hi

Is it possible to show an axis line like on the image?

/Flemming

0 votes
178 views

Hi

I have attached an image of a chart.

Is it possible to get the first and last date to stand directly under the tick?

/Flemming

0 votes
186 views

Hi

I have tried following your custom DeltaCalculator example:

https://www.scichart.com/documentation/v5.x/Axis%20Ticks%20-%20TickProvider%20and%20DeltaCalculator%20API.html

var axis = new NumericAxis();
axis.DeltaCalculator = new CustomNumericDeltaCalculator();

But there does not seem to be a DeltaCalculator property on the axis object?

/Flemming

0 votes
188 views

I am aware that for performance reasons that SciChart expects data to be sorted in the X direction. But is it possible to have it sorted in a descending order rather than the default ascending order?

  • muh fugen asked 3 months ago
  • last active 3 months ago
0 votes
155 views

I want to use a CursorModifier – but is it possible to only show the vertical line?

/Flemming

0 votes
184 views

I’m trying to create a custom overview control as shown in the example with the same name, but all I get is an empty black box. The main chart is working just fine and I have it bound (for now) to the same data series as the main chart. However the only way I can get it to show anything in the overview chart is to bind it’s x and y axes to the same as the main chart, which basically makes it a copy.

            <sc:SciChartSurface x:Name="OverviewSurface" Loaded="OnOverviewSurfaceLoaded" Grid.Row="1" Margin="10,0,0,0" RenderableSeries="{sc:SeriesBinding RenderableSeriesViewModels}" >

            <sc:SciChartSurface.XAxis>
                <sc:NumericAxis DrawMajorGridLines="False" DrawMinorGridLines="False" Visibility="Collapsed"/>
            </sc:SciChartSurface.XAxis>

            <sc:SciChartSurface.YAxis>
                <sc:NumericAxis DrawMajorGridLines="False" DrawMinorGridLines="False" Visibility="Collapsed"/>
            </sc:SciChartSurface.YAxis>
        </sc:SciChartSurface>

That code above just doesn’t work at all. The RenderableSeriesViewModels are the same as bound to the main chart which is working. I’ve tried variations, using AutoRange and and creating all new ViewModels just for the overview axes but the only way I can get it to show anything at all is to bind it to the main chart axis and then I can’t hide them without hiding them on the main chart.

0 votes
0 answers
184 views

Hi!

As I found a decent solution to my previous question for how to create a simple, single vertical line chart modifier, I deleted my previous post; I use the TooltipModifierBase and just added a line where I need it, orientating myself on how the CursorModifier works.

My problem now is, I can’t get the coordinates to show on the axis label when using “UpdateXAxesOverlay(mousePoint)”. The label shows up properly, but it just says “SciChart.Charting.Visuals.RenderableSeries.AxisInfo” on it. I assume I’m missing a binding or such somewhere, but I’ve sadly been unable to figure out where or how to get it work.

0 votes
184 views

Sir,
I have a dataseries from a music file and displaying it in realtime on the screen. The chart shows only a small portion of the waveforms and on each dispatcher timer tick (10ms) I am adjusting the visible range of the chart as shown below.

        }
       // sciChartZoom.XAxis.VisibleRangeChanged -= TimeSpanAxis_VisibleRangeChanged;

        DateTime dtmp = dtmin;
        TimeSpan drng = new TimeSpan(0, 0, VisCon.zoomRangeIn);
        TimeSpan ttmp = TimeSpan.FromSeconds(VandC.posSeconds);
        TimeSpan dtlo = ttmp.Subtract(drng);
        TimeSpan dthi = ttmp.Add(drng);

        dtmp = dtmp.AddSeconds(VandC.posSeconds);


        double posAxis = (double)sciChartFull.XAxis.GetCoordinate(ttmp);

        Thickness m = posRec.Margin;
        m.Left = posAxis - VisCon.posRectmargin1;
        posRec.Margin = m;

        sciChartZoom.XAxis.VisibleRange = new TimeSpanRange(dtlo, dthi);

        //sciChartZoom.XAxis.VisibleRangeChanged += TimeSpanAxis_VisibleRangeChanged;

    }

My problem is that the chart does not move very smooth and it uses around 50% CPU power(core i5 3.2GHz). Decreasing the timer ticks less than 10ms does not make any improvement.

I am attaching a picture of how the chart looks. The top is the zoom chart while the bottom one is always static.

Can you help please?

Regards
Julian

1 vote
0 answers
180 views

Hi, we are updating our scichart component to version 5. Now we had to change our Series Binding which is obsolete now to RenderableSeries binding.

In the most graphs it works fine but I have also graphs that uses ElementName with paths for the binding and that does not work.

I tried the following versions which all did not work, is there a different way to do it?

<!-- old scichart version which is not allowed anymore-->
    <s:SciChartSurface Style="{StaticResource SciChartSurfaceStyle}" 
                       SeriesSource ="{Binding ElementName=GraphRoot, Path=Series}"
                       BorderThickness="1 0 0 0"
                       Background="Transparent">

<!-- First try with new version which is not working because we don't use seriesBinding-->
    <s:SciChartSurface Style="{StaticResource SciChartSurfaceStyle}" 
                       RenderableSeries ="{Binding ElementName=GraphRoot, Path=Series}"
                       BorderThickness="1 0 0 0"
                       Background="Transparent">

<!-- Second try with new version which is also not working -->
    <s:SciChartSurface Style="{StaticResource SciChartSurfaceStyle}" 
                       RenderableSeries ="{s:SeriesBinding ElementName=GraphRoot, Path=Series}"
                       BorderThickness="1 0 0 0"
                       Background="Transparent">

<!-- Last try with new version which is also not working becaus without ElementName he cannot find the Series-->
    <s:SciChartSurface Style="{StaticResource SciChartSurfaceStyle}" 
                       RenderableSeries ="{s:SeriesBinding Series}"
                       BorderThickness="1 0 0 0"
                       Background="Transparent">

Please is there any idea how to solve this?

0 votes
0 answers
150 views

for HorizontalLineAnnoataion and VerticalLineAnnotation, if the LabelPlacement is set to values other than Auto or Axis, the label is still seen even the ShowLabel is set to false.

Here is the source code
Xaml

<sc:SciChartSurface.XAxis>

</sc:SciChartSurface.XAxis>
<sc:SciChartSurface.YAxis>

</sc:SciChartSurface.YAxis>

        <sc:SciChartSurface.Annotations>
            <sc:VerticalLineAnnotation VerticalAlignment="Stretch" x:Name="V1"
                                      FontSize="12"
                                      FontWeight="Bold"
                                      ShowLabel="True"
                                      Stroke="Brown"
                                      StrokeThickness="2"
                                      X1="9" LabelPlacement="Auto"
                                      Y1="4" />

            <sc:HorizontalLineAnnotation HorizontalAlignment="Stretch" x:Name="H1"
                                        FontSize="12"
                                        FontWeight="Bold"
                                        LabelPlacement="TopLeft"
                                        ShowLabel="True"
                                        Stroke="Orange"
                                        StrokeThickness="2"
                                        X1="7"
                                        Y1="2.8" />
        </sc:SciChartSurface.Annotations>
    </sc:SciChartSurface>
    <UniformGrid Rows="1" VerticalAlignment="Top" HorizontalAlignment="Right">
        <CheckBox IsChecked="{Binding ElementName=H1, Path=ShowLabel}" Foreground="White"  Margin="3">
            <CheckBox.Content>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="H1" VerticalAlignment="Center"/>
                    <ComboBox ItemsSource="{Binding Source={x:Static local:MainWindow.LabelPlacements}}" SelectedItem="{Binding ElementName=H1, Path=LabelPlacement}" />
                </StackPanel>
            </CheckBox.Content>
        </CheckBox>
        <CheckBox IsChecked="{Binding ElementName=V1, Path=ShowLabel}" Foreground="White" Margin="3">
            <CheckBox.Content>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="V1" VerticalAlignment="Center"/>
                    <ComboBox ItemsSource="{Binding Source={x:Static local:MainWindow.LabelPlacements}}" SelectedItem="{Binding ElementName=V1, Path=LabelPlacement}" />
                </StackPanel>
            </CheckBox.Content>
        </CheckBox>
    </UniformGrid>
</Grid>

And the cs
using SciChart.Charting.Visuals.Annotations;
using System;
using System.Windows;

namespace SciChartLineAnnotation
{
///

/// Interaction logic for MainWindow.xaml
///

public partial class MainWindow : Window
{
public static LabelPlacement[] LabelPlacements { get; private set; }

    static MainWindow()
    {
        Array array = System.Enum.GetValues(typeof(LabelPlacement));
        LabelPlacements = new LabelPlacement[array.Length];
        int idx = 0;
        foreach(var item in array)
        {
            LabelPlacements[idx++] = (LabelPlacement)item;
        }
    }

    public MainWindow()
    {
        InitializeComponent();
    }
}

}

0 votes
217 views

I added nearly 607 lines using code:
_verticalLineAnnotations.Add(new VerticalLineAnnotationViewModel()
{
VerticalAlignment = VerticalAlignment.Stretch,
Stroke = Utility.Utility.ConverStringToColor(item.Color.ToString()),
StrokeThickness = 2,
X1 = item.Time,
Tooltip = item.Label,

        });

However, the rendering on the chart is very slow, it takes time to get these points loaded, is there a way to make it fast???

0 votes
0 answers
178 views

Hello,

I am using Numeric Axis View Model for making Y-Axis dynamically. I want to show strings instead of number. I saw the label provider api but i don’t get how to use this Label Provider. Can anyone tell me or give me a working example of showing strings instead of number using label provider.

Thanks

0 votes
0 answers
184 views

Hello,

I have a usercontrol in which there is SciChartSurface and Modifiers and this UserControl(Name = UCSciChart) have its own ViewModel(Name = UCSciChartViewModel). Now I have Another User Control(Name = TimeChartView) in which I placed UCSciChart usercontrol 1 for single mode and 16 for multiple mode. TimeChartView has its own view model (TimeChartViewModel). Now if click on series, the style applies, but if i click outside it does not goes to old style, it is in single mode. If i click on multiple mode, then there is multiple user control and all have their own view model. But in multiple mode, if i click on series no style is applied.

I am posting my code here:

UCSciChart.xaml


<s:SciChartSurface.ChartModifier>


<s:SeriesSelectionModifier.SelectedSeriesStyle>

</s:SeriesSelectionModifier.SelectedSeriesStyle>






</s:SciChartSurface.ChartModifier>

TimeChartView.xaml

<UniformGrid.ContextMenu>

</UniformGrid.ContextMenu>

Showing 1 - 50 of 2k results