Hello,
Normally, if I have a ScichartSurface with a X- and Y-Axis, were both axis AutoRange- properties are set to Always, the surface displays the entire data by adjusting the Visible ranges of the axis after new data has been appended.
This also works if there are multiple Data-Series on the ScichartSurface.
In my case, I have two FastLineRenderableSeries on my Surface. Each of them receiving new data via the Append-function while the x- and y-axis are continuously adjusted automatically to display all the datapoints of both Datasets.
So far so good…
But what would I have to do if I wanted one of the two Datasets to be ignored by the Autorange properties of the x- and y-Axis?
I have already tried to set the X- and YAxisID of one dataset to null, hoping I could make both axis ignore this Dataset while they are adjusting their Visible ranges. However, this only led to error messages.
I could also try to write my own ViewPortManagers and overwrite the OnCalculateNewXRange and OnCalculateNewYRange funvtions, but that seems a little bit excessive.
Is there an easy way to achieve the desired behavior?
Thanks.
- Marc Vahldieck asked 10 months ago
- last active 10 months ago
I have two SciChartSurfaces
One is a HeatMap (x:Name=”MainChartSurface”), the other a line graph.
I have set it up so that when a vertical cursor is moved the smaller line graph shows a ‘cross-section’ of the heatmap.
The attached image shows the right hand end of the heatmap and the smaller line graph.
The X-axis of the line graph is set to Alignment=Right and this axis has the same range as the y-axis of the heat map – set in xml as:
MajorDelta="{Binding Source={x:Reference Name=MainChartSurface}, Path=YAxis.MajorDelta, Mode=TwoWay}"
MinorDelta="{Binding Source={x:Reference Name=MainChartSurface}, Path=YAxis.MinorDelta, Mode=TwoWay}"
AutoTicks="False"
VisibleRange="{Binding Source={x:Reference Name=MainChartSurface}, Path=YAxis.VisibleRange, Mode=TwoWay}"
this all works, so if the main graph is zoomed, the 2D line graph Y-axis follows the main graph.
The Y-axis of the line graph has Alignment=Bottom, and it shows the z-values for all y-values at the location vertical cursor (a RolloverModifier) on the main graph.
The problem I have is that the space taken by the axis at the bottom of the charts is different, so the chart areas are different. Look carefully at the attached image and see the bottom axes do not align.
How can I link the space taken to force the bottom axes to stay in alignment?
Thanks
Andrew Milford
- Andrew Milford asked 10 months ago
- last active 9 months ago
Is there any option to hide the axis title of NumericAxis3D in ZxAxisPlane. Want to hide the title highlighted in the attached image.
- Ammar Khan asked 10 months ago
- last active 3 months ago
Hello!
I have got an exception on databinding an AxisCollection and then sorting a ListBox with charts inside.
Element already has a logical parent. It must be detached from the old parent before it is attached to a new one.
at MS.Internal.Controls.InnerItemCollectionView.AssertPristineModelChild(Object item)
at MS.Internal.Controls.InnerItemCollectionView.Insert(Int32 index, Object item)
at System.Windows.Controls.ItemCollection.Insert(Int32 insertIndex, Object insertItem)
at SciChart.Charting.Visuals.SciChartSurface.slf(IAxis ann, AxisAlignment ano, Boolean anp)
at SciChart.Charting.Visuals.SciChartSurface.slb(IAxis ane, AxisAlignment anf, Boolean ang)
at SciChart.Charting.Visuals.SciChartSurface.ske(IAxis aly)
at SciChart.Core.Extensions.EnumerableExtensions.ForEachDo[T](IEnumerable1 enumerable, Action
1 operation)
at SciChart.Charting.Visuals.SciChartSurface.OnApplyTemplate()
at System.Windows.FrameworkElement.ApplyTemplate()
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.Controls.DockPanel.MeasureOverride(Size constraint)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.Controls.Border.MeasureOverride(Size constraint)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.Controls.Border.MeasureOverride(Size constraint)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.Controls.Control.MeasureOverride(Size constraint)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.Controls.Border.MeasureOverride(Size constraint)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.Controls.Border.MeasureOverride(Size constraint)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.Controls.Control.MeasureOverride(Size constraint)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.Controls.WrapPanel.MeasureOverride(Size constraint)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
I am able to reproduce the issue. Please see the attachment.
I will not write more, since the example is simple.
What can i do to avoid this issue?
Thank you very much!
Paul
- Paul Stempel asked 10 months ago
Good day,
we are using the VerticalSliceModifier for sorted data and it works very good.
<local:VerticalSliceModifierExt x:Name="SliceModifier">
<s:VerticalSliceModifier.VerticalLines>
<chartModifier:SnappyVerticalLine x:Name="VerticalLine"
ShowLabel="False"
X1="0"
Y1="0"
CoordinateMode="Absolute"
IsEditable="True">
</chartModifier:SnappyVerticalLine>
</s:VerticalSliceModifier.VerticalLines>
Please see the image “Example Vertical Slice Modifier”.
The challange is to have something similar for unsorted data.
One of the issues are multiple intersections. Please see the image “Multiple Intersections” where i would like be able to select what intersections shall be highlighted.
The next challange is the usage of multiple series and synchronization based on a different property (t for time). Please see “Multiple Series” image.
We already have IPointMetadata with X,Y and t to be able to find the data point to highlight.
My question: Is there already some modifier chat can help with this requirements or what would be a clean solution if we need to develop a custom modifier.
Thank you in advance
Paul
- Paul Stempel asked 10 months ago
- last active 1 month ago
Am trying to get the same look and feel of the cursor modifier on both the charts.
- am not able to get the tool tip to show on the other side.
- am not able to get the get horizontal lines.
- P S asked 10 months ago
- last active 10 months ago
Hello,
i’m trying to build a chart using a Stripe Data series, on the X axis i have a DatetimeAxis while on Y axis i have a Numeric.
I have an observable collection of IRenderableSeriesViewModel, and when i try to add a StripeRenderableSeriesViewModel if the dataseries contains many elements (>2000) it logs this exception below:
Exception thrown: ‘System.InvalidCastException’ in System.Private.CoreLib.dll
SciChartSurface didn’t render, because an exception was thrown:
Message: Invalid cast from ‘Double’ to ‘DateTime’.
Stack Trace: at System.Double.System.IConvertible.ToDateTime(IFormatProvider provider)
at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
at SciChart.Charting.Model.DataSeries.StripeDataSeries2.rwx(ResamplingParams gib, StripePointSeries gic)
2.ToPointSeries(ResamplingParams resamplingParams, ResamplingMode resamplingMode, IPointResamplerFactory factory, IPointSeries lastPointSeries)
at SciChart.Charting.Model.DataSeries.StripeDataSeries
at dih.lay(AxisCollection gg, IRenderableSeries gh, RenderPassInfo gi, IPointResamplerFactory gj, Boolean gk, IDataSeries& gl, IndexRange& gm, IPointSeries& gn, Int32& go)
at dih.lax(ISciChartSurface gd, Size ge, Boolean gf)
at dih.RenderLoop(IRenderContext2D renderContext)
at SciChart.Charting.Visuals.SciChartSurface.DoDrawingLoop()
Exception thrown: ‘System.Threading.SynchronizationLockException’ in SciChart.Drawing.dll
SciChartSurface didn’t render, because an exception was thrown:
Message: Object synchronization method was called from an unsynchronized block of code.
Stack Trace: at System.Threading.Monitor.Exit(Object obj)
at irv.hds(jbq r, SCRTRenderContext s)
at jbv.Dispose()
at SciChart.Charting.Visuals.SciChartSurface.DoDrawingLoop()
Binding and data i’m pretty sure are ok since with fewer data it works fine
EDIT: i was able to reproduce the issue in the wpf sample project (repo), just replace GanttChartViewModel.cs with the sample one i have attached here and it can be reproduced by navigating to the Gantt chart example
- Marco Bilardi asked 10 months ago
- last active 9 months ago
Hello everybody,
Having two FastLineRenderableSeries objects, how can I display them on the same chart, where the X axis represents the time, but the second one with a small time delay on the x-axis (shifted)? Thanks.
- Marius Cabas asked 10 months ago
- last active 10 months ago
Dear SciChart team,
I’ve been using SciChart WPF 2D professional for many years now, but this week I’m having a strange problem on one of my colleague’s new laptop (Lenovo X13). The charts seem frozen.
To check if it’s a problem with my application or something else, I installed SciChart on the laptop and launched the SciChart WPF v7 example (.net framework). Then I found all the charts do not render properly.
I have searched the questions on the forum, and I found this https://www.scichart.com/questions/wpf/zoom-not-working-properly-on-one-single-computer, it seems there was someone had the same issue, but it was posted 10 years ago, so I am not sure does the intel graphics hardware still has this problem now days.
I am asking my colleague to upgrade the graphic adapter’s driver, but if you have any other idea to fix this issue, please also let me know.
Best Regards
Chris
- Chris Chen asked 11 months ago
- last active 11 months ago
Hello,
I’m currently rewriting a program in .net7 WPF using MVVM as much as possible.
In my MainViewModel:
I read data from a CSV file and transforming it into an ObservableCollection of LineRenderableSeriesViewModel (stored in the « RenderableSeriesViewModels » variable) . Additionally, the Y axes are transformed into ObservableCollection of IAxisViewModel (within the « Yaxes » variable).
Each series corresponds to a LineRenderableSeriesViewModel and each Y axis is represented as a NumericAxisViewModel. The X-axis is a DateTime common to all series and is declared only in XAML.
Within my view’s XAML:
I declare RenderableSeries=”{s:SeriesBinding RenderableSeriesViewModels}” and YAxes=”{s:AxesBinding YAxes}. I’ve defined a legend template to add several elements:
– DataContext=”{Binding RenderableSeries}”
– A checkbox to toggle serie visibility (IsVisible binding).
– A checkbox to toggle Y-axis visibility for the serie (YAxis.Visibility binding).
– A color picker to change the color of a serie, bound to “Stroke”, “YAxis.TickTextBrush”, and “YAxis.BorderBrush”
– A slider for adjusting serie thickness (StrokeThickness binding).
Results:
Each element acts on the graph as expected: RenderableSeries updates and the graph refreshes correctly.
In the MainViewModel, RenderableSeriesViewModels and YAxes are not updated for all elements:
– “IsVisible” and “StrokeThickness” for the concerned series are instantly modified in RenderableSeriesViewModels but “Stroke” is not.
– “YAxes” is not updated.
The code for the LegendTemplate and a screenshot of the resulting legend are in the attachements.
Could you please help me to understand what I do wrong?
- Nicolas MARTINEZ asked 11 months ago
- last active 10 months ago
Several legends are displayed using LegendModifier.
-
Using ScrollViewer.VerticalScrollBarVisibility=”Auto”, it was possible to move using mouse scrolling, bar grabbing, etc., but it did not work when the border was dragged in a screen touch environment. Is there a way to drag on a touch monitor?
-
It is being displayed using Orientation=”Horizontal”, but there is a limit to displaying it on one line due to the large number of legends. What document can I refer to if I want to change it to display as multi-line? I think the MVVM method would be best.
- Lee Ji Un asked 11 months ago
- last active 11 months ago
My code is as below
for (int i = 0; i < plot.ZData.Length; i++)
{
var xData = plot.XData[i];
var yData = plot.YData[i];
for (int j = 0; j < xData.Length; j++)
{
dataSeries[i, j] = yData[j];
}
}
Here Z values and X values are linear and Y values are in Logarthimic scale.
I have used Z and Y axis as NumericAxis3D and X is LogarithmicNumericAxis3D .
Is something wrong here? Please suggest.
- Deepashree Iyangar asked 11 months ago
- last active 8 months ago
The format of the set DateTimeAxis x-axis is (“yyyy-MM-dd hh:mm:ss”), but when the chart is enlarged, if the range is short, it changes to (“hh:mm:ss”). I want to display year/month/day information as well, even if the range is short. Please answer with the MVVM model.
- Lee Ji Un asked 11 months ago
- last active 11 months ago
Hi,
We have a waterfall chart where we plot spectrums of XData length 2097153 and of multiple slices. It takes forever to plot this chart. Our application hangs. I tried multiple resampling algorithms as given in the link https://github.com/ABTSoftware/SciChart.Wpf.Examples/blob/SciChart_v6_Release/Sandbox/CustomerExamples/ResamplingOfGridDataSeries3D/ResamplingOfGridDataSeries3D.xaml.cs
But this changes the plot’s appearance completely which makes plot unusable.
Please can you suggest how I can plot this chart with decent performance.
Regards,
Deepashree
- Deepashree Iyangar asked 11 months ago
- last active 11 months ago
Hi,
I want to add a heatmap control (vertical bar) Image attached. This bar should display the energy levels of the waterfall. Basically how the Y axis varies as per the color. How can I achieve this?
- Deepashree Iyangar asked 11 months ago
- last active 11 months ago
(Edited to add code blocks)
I am trying to draw 4 series simultaneously on a chart. I have 2 Scatter plot series, a FastLineRenderableSeries (Which I’ll call the trendline) and I have a FastErrorBarsRenderableSeries which I’ll call the uncertainty. The scatter plots always draw.
When I draw the scatter plots and the trendline, everything looks right. As soon as I add any points to the HlcDataSeries in the uncertainty, though, the trendline disappears, and the error bars won’t draw. It’s very strange.
Below is my xaml and code (edited for clarity).
void SetData(int channels, MyDataSet incomingData){
var n = incomingData.Count;
var unc = new List<Point>(n); //Point has x y coords and uncertainty
double[] xValues = new double[n], yValues = new double[n];
for (int i = 0; i < n; i++)
{
var x = incomingData[i].X.Value; //Incoming data has x y coords
//with uncertainties in each direction
var y = incomingData[i].Y.Value;
xValues[i] = x;
yValues[i] = y;
var yVal = incomingData[i].Y;
if (yVal is not { Uncertainty: not null and not 0 }) continue;
unc.Add(incomingData[i]);
}
if (xValues.Any())
PointData = new XyDataSeries<double>(xValues, yValues);
var xList = new double[channels];
var yList = new double[channels];
if (incomingData.CalibrationCoefficients == null)
{
incomingData.Fit(); //Generate coefficients
}
for (var i = 0; i < channels; i++)
{
xList[i] = i;
yList[i] = incomingData.GetY(i); //Apply Coefficients
}
LineData = new XyDataSeries<double>(xList, yList);
unc.Add(new Point(1, 0, 100, 50)); //x, x uncertainty, y, y uncertainty
unc.Add(new Point(10, 0, 100, 50));//Adding bogus data to ensure uncertainty
unc.Add(new Point(100, 0, 1000, 50));
unc.Add(new Point(1000, 0, 500, 50));
unc.Add(new Point(5000, 0, 250, 50));
if (unc.Any())
{
UncertaintyData = new HlcDataSeries<double, double>();
var hlc = (HlcDataSeries<double, double>)UncertaintyData;
foreach (var t in unc)
{
var uncertainty = Math.Abs(t.Y.Uncertainty);
var y = t.Y.Value;
hlc.Append(t.X.Value, y,
y- uncertainty,
y+ uncertainty);
}
}
}
And my Xaml:
<s:SciChartSurface MinWidth="200" MinHeight="200"
Name="ChartSurface" Padding="0"
Style="{Binding CurrentChartStyle}" >
<s:SciChartSurface.RenderableSeries>
<!-- Scatter plots omitted for brevity -->
<s:FastErrorBarsRenderableSeries DataSeries="{Binding UncertaintyData}"
ErrorDirection="YAxis"
Stroke="Blue"
StrokeThickness="2"
LastErrorBarWidth="7"
DataPointWidthMode="Absolute"
/>
<s:FastLineRenderableSeries x:Name="LineSeries" AntiAliasing="True" Stroke="Gray"
DataSeries="{Binding LineData}" StrokeThickness="2"/>
</s:SciChartSurface.RenderableSeries>
<!-- Axes omitted for brevity -->
</s:SciChartSurface>
- Isaac Sherman asked 11 months ago
- last active 11 months ago
Hi,
I want to change the grid distance between the two slices dynamically in both X , Y and Z direction. But whatever the value I set for StepZ and StepX, nothing changes in the output. I still see the same graph.
Please can you suggest if there is any way to achieve this.
I am attaching the code of waterfall example here.
- Deepashree Iyangar asked 11 months ago
- last active 9 months ago
Hi,
I’m experiencing a glitch using polar charts with small values.
In the attached example, I tried to create an arc starting at 0.0004, the problem is that up to a certain level of zoom, it works fine, then it start creating corrupted shapes. You can see all stages of the glitch in the picture.
Is this related to small values? I really have to work with small numbers, any workaround?
My client is using an older version, but I tried with mine, 7.0 and I get the same problem.
Thanks
- Alessio Diana asked 11 months ago
- last active 11 months ago
Attached sample program based on AnnotationsAreEasy
The graph is on a Tab of a TabControl.
There is a custom Composite Annotation on the left side of the graph – ZoneAnnotation: consisting of a BoxAnnotation and a TextAnnotation.
Click on Chart Tab and the annotation displays correctly first time.
Click on Tab1 then Click on Chart Tab again. Now the box part of the annotation does not get drawn.
If you pan or zoom the chart it magically re-appears!
Click on Tab1 then Chart Tab again and it disappears again.
Cut down code attached is using V6.6 but this still happens on v7.0.2.27161
Is this a bug or something with the way I am defining the ZoneAnnotation?
Thanks
- Andrew Milford asked 11 months ago
- last active 4 weeks ago
Hello,
I have a SciChartSurface with multiple StackedColumnRenderableSeries. The goal is to create a column style “Stacked Graph”.
The StackedColumnRenderableSeries are created this way:
private StackedColumnRenderableSeries[] m_layers = new StackedColumnRenderableSeries[0]; ------- while (num > m_layers.Length) { StackedColumnRenderableSeries layer = new StackedColumnRenderableSeries() { DataPointWidth = 0.9, Fill = new SolidColorBrush(DefaultMainColorOfCurrentSetting), Stroke = Colors.Black, ShowLabel = false }; layer.DataSeries = new XyDataSeries<double, double>(); layer.DataSeries.AcceptsUnsortedData = true; m_sciChartSurface.RenderableSeries.Add(layer); List<StackedColumnRenderableSeries> temp = m_layers.ToList(); temp.Add(layer); m_layers = temp.ToArray(); }
Later, they are fed data with this function:
void addBar(double[] layerValues) { using (m_sciChartSurface.SuspendUpdates()) { for (int i = 0; i < m_layers.Length; i++) { XyDataSeries<double, double> data = (XyDataSeries<double, double>)m_layers[i].DataSeries; data.Append(m_currentTimepoint, layerValues[i]); } } m_currentTimepoint++; } private int m_currentTimepoint = 1;
If I use this function within the class constructor, everything works as expected (see attached image).
However, sometimes, I receive the error message “”System.ArgumentException” in SciChart.Charting.dll The StackedColumnRenderableSeries type requires that all stacked stacked series with the same StackedGroupId have the same XValues.”
I fail to see the meaning of this message, since, the x-Value is the same for each part of the new column. Its “m_currentTimepoint”.
Additional Information:
This visualization is part of a medical monitoring software we are currently developing. If we use test data to call the addBar-Function (directly from the constructor, for example), the error does not appear. However, if we use data from our medical sensors, it appears. In both cases, the addBar-Function receives valid data (no NaN´s or such things)
The function is not called often, about once every 10 seconds.
Thank you
- Marc Vahldieck asked 12 months ago
- last active 11 months ago
Hi,
I am using the scichart for WPF an came across a problem. I am trying to create a thumbnail image of a size 300×200 pixels of my chart. I have tried using the ExportToStream method with option of specifying the size output, but that creates a smaller resolution image of my chart. I was hoping that it will resize the chart to the desired size and then make an image.
So I tried a second option which was to put the chart in a user control of a certain size and then use the RenderTargetBitmap to render the user control in an image. That resulted in a partial chart without the chart lines. Take a look at the attached?
Any ideas how to make the chart to be rendered in memory in full for a certain size?
Kind regards,
Boštjan
- Boštjan Arzenšek asked 12 months ago
- last active 11 months ago
Hi, I’m interested in putting WPF controls like buttons, data grids, sliders, etc. inside the chart.
Is that possible?
- Binata Team asked 12 months ago
- last active 12 months ago
When I put localized text in my annotations, and the user selects a different language while the chart is showing, do I have to rebuild my annotations?
I had hoped that I could register ‘globalized’ texts in my annotation object, and localize them in the getter method, but it seems that the getter method is not called every time the annotation text is displayed in a ToolTip
- Søren Bech Christensen asked 12 months ago
- last active 12 months ago
When using VisibleRange, I want to prevent the letters 0 and 360 from overlapping. I want to see 0 or only 360. please tell me how
- HyunHo Lee asked 12 months ago
- last active 12 months ago
If I plot a SciChart3DSurface using UniformGridDataSeries3D to plot a SolidMesh – what is the maximum number if data points I can plot?
If I plot 16385 on x and 32 on z I get the debug message:
SciChart3DSurface didn’t render, because an exception was thrown:
Message: Grid mesh size exceeds hardware texture size
Is 16K the limit?
I came across this
https://abtsoftware.myjetbrains.com/youtrack/issue/SC3D-326
which seems to indicate maybe larger might be possible?
and I found on this page:
https://www.scichart.com/requirements-for-3d-surface-mesh-charts/#!
The current limit for the size of the 3D Surface Mesh chart is limited by the maximum texture size on your GPU, which in most cases is 40964096 and on some GPUs is larger, up to 16k * 16k.*
Is it possible at runtime to find out what the limit is (if it depends on the users hardware) so I can adapt the data if running on a lower capability platform rather than throwing an exception or displaying a blank graph?
Thanks
- Andrew Milford asked 12 months ago
- last active 11 months ago
Hello, everyone.
I want to add annotations for analyzing 3d charts.
In order to do that, it is necessary to be able to make several marks on the X-axis, Y-axis, and Z-axis, and I would like to know the best practices.
please check the attached picture. It is similar with cursor but it’s fixed.
I found Custom Geometry documents.
https://www.scichart.com/documentation/win/current/webframe.html#Adding%20Cubes%20and%20Custom%20Geometry%20to%20the%20Chart.html
but I am not sure this is for the best.
Thanks,
Kim, JinSeok.
- JINSEOK KIM asked 12 months ago
- last active 12 months ago
I need to serialize annotations. Not all the chart properties, but just Annotations.
I’ve tried to serialize the AnnotationCollection, as well as a List and neither works.
- kelias asked 12 months ago
- last active 12 months ago
Hi SciChart,
We are experiencing a SciChart XPS export issue.
I am using a FlowDocumentPageViewer with a FlowDocument containing SciChart graphs. My goal is to export all pages of the FlowDocument to an XPS file using the XamlRenderSurface to save in vector graphics. However, I’m facing an issue where only the currently selected page exports correctly, while the other pages display empty graphs.
By default, we employ the VisualXcceleratorRenderSurface for all SciChart render surfaces. Before exporting, I programmatically switch them to XamlRenderSurface to save in vector graphics. This approach works well when all the graphs have been rendered on-screen at least once with the new surface type before exporting. However, if a graph hasn’t been rendered on-screen before exporting, it appears empty, and only the graphs from the selected page export correctly. You can find code snippets below.
XAML code:
<s:SciChartSurface
x:Name="PART_Surface"
...
RenderSurface="{TemplateBinding RenderType, Converter={StaticResource RenderTypeConverter}}"
...
Converter:
public class RenderTypeConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
// Set render settings
return (RenderType)value switch
{
RenderType.DirectX => new VisualXcceleratorRenderSurface(),
RenderType.HighQuality => new HighQualityRenderSurface(),
RenderType.HighSpeed => new HighSpeedRenderSurface(),
RenderType.Vector => new XamlRenderSurface(),
_ => new HighSpeedRenderSurface(),
};
}
...
}
Export:
private void ExportVector(string fullPath)
{
// Sets the RenderType to Vector for all surfaces
// This invokes RenderTypeConverter to set the RenderSurface to XamlRenderSurface
// Since they are bound in the XAML code
SetAxesSurfacesRenderToVector();
XPS_Export_AllPagesOfFlowDocument(fullPath);
// DirectX is always the default for all surfaces that we use
ResetAxesSurfacesToDirectX();
}
private void XPS_Export_AllPagesOfFlowDocument(string fullPath)
{
using (var package = Package.Open(fullPath, FileMode.Create))
{
using (var xpsDocument = new XpsDocument(package, CompressionOption.Maximum))
{
var xpsSerializationManager = new XpsSerializationManager(new XpsPackagingPolicy(xpsDocument), false);
var documentPaginator = ((IDocumentPaginatorSource)FlowDocument)?.DocumentPaginator;
xpsSerializationManager.SaveAsXaml(documentPaginator);
xpsDocument.Close();
}
}
}
The binding and the converter works for all offscreen elements, yet the they won’t take effect until rendered on screen at least once.
I have to select each page manually, after setting all graphs to use XamlRenderSurface, so each would be rendered on screen at least once before the export.
My question is: How can I export XamlRenderSurfaces that are off-screen and haven’t been rendered on-screen before the export process?
You can find an image below showcasing the problem.
Thank you and looking forward to your reply!
Best Regards,
Kaloyan Krastev
- Kaloyan Krastev asked 12 months ago
- last active 10 months ago
I tried to create an WPF application that used a graph with LineRenderableSeriesViewModel
and XYDataSeries
to display real-time data. Cursor inspection was added to the chart as shown in the picture to make it easier to view the data. After some time I found out that when inspecting the cursor, if you move it quickly inside the chart, the CPU load increases several times.
Is there any elegant way to preserve performance with such manipulations?
My computer has a pretty good build but on weaker computers it causes some problems.
- Processor: AMD Ryzen 7 5825U with Radeon Graphics 2.00 GHz
- RAM: 16.0 GB (14.8 GB usable)
- System: Windows 11 Pro (21H2)
- Kostiantyn Britikov asked 12 months ago
- last active 12 months ago
In this thread
it mentions
SciChart (as of July 2023) currently targets the following platforms
WPF, with c# .net or netCore or .NET 6/7
I cannot find libraries for .NET7!
When I try to use netcoreapp3.1 libraries or net452 libraries I get a runtime error that it is unable to open the dll. Or is something else going wrong? I can see the relevant dll’s are copied to the output folder.
- Andrew Milford asked 12 months ago
- last active 10 months ago
Hello again,
I would like to ask if there is a way to give a border (stroke and thickness) to horizontal and vertical line annotations.
I assume it has something to do with setting the WPF-style of the annotation element, but I’m running into a lot of errors while experimenting with this approach.
Is there an easy-to-understand example around?
Thank you verry much.
- Marc Vahldieck asked 1 year ago
- last active 1 year ago
Hello
In Tutorial 06b – Realtime Updates, I want change the <s:SciChartSurface.XAxis>
from <s:NumericAxis/>
to <s:DateTimeAxis/>
. I have tried a lot, but it still doesn’t work.
Could you please help me to do this work.
Thank you very much.
- Zhi Zhang asked 1 year ago
- last active 1 year ago
When running with scaling other than 100%, the results are very blurry.
I’ve come across this article https://support.scichart.com/index.php?/Knowledgebase/Article/View/17263/40/ which explains the reasoning. In that you’re always rendering at 96DPI no matter what the current scaling is set to.
It says to use the XamlRenderSurface, but this isn’t practical in most scenarios. For example, we want to render scatter plots. Enabling the XamlRenderSurface in your Scatter Chart example results in very poor performance even with only a small number of points being rendered.
So is the situation still the same from that 2019 article? You still don’t provide the option to render using the accelerated surface at anything other than 96 DPI?
I appreciate that the performance would be reduced, but it would surely be much better than the XamlRenderSurface?
- Ben Green asked 1 year ago
- last active 12 months ago
I am considering applying server-side licensing for my javerScript application.
In the document below, there is a phrase “Our server-side licensing component is written in C++.”
(https://support-dev.scichart.com/index.php?/Knowledgebase/Article/View/17256/42/)
However, there is only asp.net sample code on the provided github.
(https://github.com/ABTSoftware/SciChart.JS.Examples/tree/master/Sandbox/demo-dotnet-server-licensing)
I wonder if there is a sample code implemented in C++ for server-side licensing.
Can you provide c++ sample code?
Also, are there any examples to run on Ubuntu?
- Simon Molino asked 1 year ago
On graphs with many axes it can often be difficult to read as the tics don’t line up with grid-lines.
What I would like to try is having a fixed number of grid lines (either a set number or based on the size of the graph) and then having all axis ticks aligned with the grid. To make the ticks human friendly I would then want to slightly zoom out each axis so that tics become nice numbers.
I am imagining it would also need to slightly adjust the zoom levels each time user interactions interact with the graph, i.e. if the user was to use a rubberband modifier to zoom in, I would expect I would need to hook in somehow to zoom out very slightly to get nice numbers on the tics, as they can no longer float about to nice values.
Is there any easy way I could experiment with something like this.
- Hugoagogo asked 1 year ago
- last active 11 months ago
Setting VisibleRange in xaml or in code behind does not seem to work. It always defaults to (0.1, 100)
<s:SciChartSurface x:Name="positiveScaleChart"
Loaded="OnLogarithmicAxisViewLoaded">
<s:SciChartSurface.RenderableSeries>
<s:FastLineRenderableSeries />
</s:SciChartSurface.RenderableSeries>
<s:SciChartSurface.XAxis>
<s:NumericAxis TextFormatting="0"
VisibleRange="0, 100"
AutoRange="Never" />
</s:SciChartSurface.XAxis>
<s:SciChartSurface.YAxis>
<s:LogarithmicNumericAxis AxisAlignment="Left"
TextFormatting="0"
AutoRange="Never"
VisibleRange="-1, 10000">
</s:LogarithmicNumericAxis>
</s:SciChartSurface.YAxis>
</s:SciChartSurface>
public partial class LogarithmicAxisView : UserControl
{
public LogarithmicAxisView()
{
InitializeComponent();
}
private void OnLogarithmicAxisViewLoaded(object sender, RoutedEventArgs e)
{
var posDataSeries0 = new XyDataSeries<double, double>();
var data1 = new DoubleSeries();
for (int i = 0; i < 100; ++i)
{
data1.Add(new XYPoint() { X = i, Y = Math.Pow(i, 3) });
}
posDataSeries0.Append(data1.XData, data1.YData);
positiveScaleChart.RenderableSeries[0].DataSeries = posDataSeries0;
positiveScaleChart.YAxis.VisibleRange = new DoubleRange(-1, 10000);
}
}
- Ben Green asked 1 year ago
- last active 1 year ago
We’re currently using the DataPointSelectionModifier which works great, however, we need some slight tweaks to it’s behaviour
- The ability to disable marquee selection on demand (whilst still being able to multi select points by clicking each point)
- Swap the Ctrl/Shift key combos
I was wondering if the source for the DataPointSelectionModifier could be made available for people to adapt to suit their needs? else it means trying to create it from scratch.
Perhaps you could post it in an area that only customers could access?
- Ben Green asked 1 year ago
- last active 12 months ago
Hello,
I’m relatively new to SciChart and I’m facing a challenge with customizing the appearance of a dynamically created series that is bound to a SciChartSurface using SeriesBinding in WPF.
I have a VerticalSliceModifier in my XAML where I define a VerticalLineAnnotation. My series is created in code as a MountainRenderableSeriesViewModel and then bound to the chart using SeriesBinding. Here’s the relevant code snippets:
<s:SciChartSurface
Grid.Row="1"
Background="Transparent"
BorderThickness="0"
RenderableSeries="{s:SeriesBinding Series}"
Annotations="{s:AnnotationsBinding Annotations}">
<s:VerticalSliceModifier ShowTooltipOn="Never" Foreground="White" Name="sliceModifier">
<s:VerticalSliceModifier.VerticalLines>
<s:VerticalLineAnnotation X1="{Binding Number}" Style="{StaticResource sliceStyle}" />
</s:VerticalSliceModifier.VerticalLines>
</s:VerticalSliceModifier>
</s:SciChartSurface>
public class MountainRenderableSeriesViewModel
{
public DataSeriesViewModel<double, double> DataSeries { get; set; }
public DataTemplate RolloverMarkerTemplate { get; set; }
// Other properties...
public MountainRenderableSeriesViewModel()
{
// Initialize your DataSeries and other properties
// Set the RolloverMarkerTemplate for this series
RolloverMarkerTemplate = Application.Current.Resources["CustomRolloverMarkerTemplate"] as DataTemplate;
}
}
My challenge is that I want to customize the RolloverMarkerTemplate for this dynamically created series. Most of the examples I’ve found show how to use RolloverMarkerTemplate with a statically defined series, but I cannot figure out how to assign it when the series is created in a ViewModel and bound to the chart using SeriesBinding.
Any guidance or code examples on how to achieve this customization would be greatly appreciated.
- Eira Jeremy asked 1 year ago
- last active 11 months ago
Hello.
I have a XYRenderableDataSeries with point markers with a fill color.
I also have a DataPointSelectionModifier which allows me to select clusters up to 5 from the series.
I want that when I select a cluster from the series, the points selected from the series should be colored for that specific cluster. i.e. all the cluster colors should be different. Also, when I select another cluster, the colors in the points selected from 1st cluster or other clusters should be preserved.
Here’s the XAML code :
<s:XyScatterRenderableSeries DataSeries="{Binding ScatterData}">
<s:XyScatterRenderableSeries.PointMarker>
<s:EllipsePointMarker Width="3" Height="3" Fill="#AAFFFFFF" Stroke="SteelBlue" StrokeThickness="2"/>
</s:XyScatterRenderableSeries.PointMarker>
<s:XyScatterRenderableSeries.SelectedPointMarker>
<s:EllipsePointMarker Fill="{Binding ClusterColor, Mode=TwoWay}"
Width="12"
Height="12" />
</s:XyScatterRenderableSeries.SelectedPointMarker>
</s:XyScatterRenderableSeries>
<s:SciChartSurface.ChartModifier>
<s:ModifierGroup>
<s:DataPointSelectionModifier Name="PointMarkersSelectionModifier"
IsEnabled="{Binding IsManualClustering}"
SelectionChanged="PointMarkersSelectionModifier_SelectionChanged"
SelectionFill="#B1B5B2B2"
SelectionStroke="#009E9C9C" />
<s:MouseWheelZoomModifier IsEnabled="True" />
<s:RubberBandXyZoomModifier IsEnabled="False" />
</s:ModifierGroup>
</s:SciChartSurface.ChartModifier>
I tried to find examples but could not find any. Please let me know if we can reach a solution to this in some way.
Thank you.
- Ammar Khan asked 1 year ago
- last active 12 months ago
We are using the VerticalLineAnnotation and want to change it’s location (X1 property) in the viewmodel.
Annotations are bound like this:
<s:SciChartSurface
...
Annotations="{s:AnnotationsBinding Annotations}"
to the property:
public ObservableCollection<IAnnotationViewModel> Annotations { get; private set; }
The collection contains this association:
this.nowAnnotation = new VerticalLineAnnotationViewModelEx()
{
X1 = TimeSpan.FromSeconds(0),
StyleKey = "NowAnnotationStyle"
};
To change the location we change the value of X1:
nowAnnotation.X1 = value;
Calling that didn’t have a direct effect on the UI unless the user does any action which redraws the chart.
We created a style which sets an attached property to pass the VerticalLineAnnotation to the view model, this works fine.
<Style TargetType="s:VerticalLineAnnotation" x:Key="NowAnnotationStyle">
<Setter Property="viewModels:VerticalLineAnnotationViewModelEx.PassIAnnotation" Value="True" />
</Style>
And we added a Refresh method to VerticalLineAnnotationViewModelEx and call it after setting X1:
nowAnnotation.X1 = value;
nowAnnotation.Refresh();
The first implementation of the Refresh method we did was:
public void Refresh()
{
this.Annotation.Refresh();
}
From the documentation this should redraw the annotation without redrawing the whole chart, but it had no effect.
https://www.scichart.com/documentation/win/current/webframe.html#SciChart.Charting~SciChart.Charting.Visuals.Annotations.AnnotationBase~Refresh.html
It only started working after changing to this:
public void Refresh()
{
this.Annotation.ParentSurface.InvalidateElement();
}
Is there a better way to do it, shouldn’t the first implementation work?
The complete code of VerticalLineAnnotationViewModelEx
public class VerticalLineAnnotationViewModelEx : VerticalLineAnnotationViewModel
{
public static readonly DependencyProperty PassIAnnotationProperty = DependencyProperty.RegisterAttached(
"PassIAnnotation", typeof(bool), typeof(VerticalLineAnnotationViewModelEx),
new PropertyMetadata(default(bool), OnPassIAnnotationChanged));
public IAnnotation Annotation { get; private set; }
private static void OnPassIAnnotationChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var verticalLineAnnotation = (VerticalLineAnnotation)d;
((VerticalLineAnnotationViewModelEx)verticalLineAnnotation.DataContext).Annotation = (IAnnotation)d;
}
public static void SetPassIAnnotation(DependencyObject element, bool value)
{
element.SetValue(PassIAnnotationProperty, value);
}
public static bool GetPassIAnnotation(DependencyObject element)
{
return (bool)element.GetValue(PassIAnnotationProperty);
}
public void Refresh()
{
//this.Annotation?.Refresh();
this.Annotation?.ParentSurface.InvalidateElement();
}
}
- AC42admin LMB asked 1 year ago
- last active 12 months ago
Hi~
How to create dotted line cursor like a dashed line curve?
Thanks.
- kim2 kim asked 1 year ago
- last active 1 year ago
I have created a demo app with the relevant code.
I have a tab control with 2 tabs, each one with a version of the SciChart surface showing multiple graphs stacked on top of each other.
The first (LAT) uses the standard WPF ListBox with each item contains a surface.
The second (ECG) uses a vertically stacked YAxis (from the customer examples).
Scenario
Select the second tab (ECG).
Press the Create button to create 50 waveforms.
(note – only a single graph is created)
Select the first tab, then select the 2nd tab.
(all 50 graphs are created)
HELP
I am unable to upload the .zip file (with the demo) or an images.
I select the file – but it does not upload
- Craig Wooldridge asked 1 year ago
- last active 1 year ago
Code changes :
– Grab the SciChart_ScatterChart example
<s:SciChartSurface Name="sciChart"
Grid.Column="1"
Padding="0"
BorderThickness="0">
<s:SciChartSurface.RenderableSeries>
<s:XyScatterRenderableSeries x:Name="scatterRenderSeries0"
Opacity="0.67">
<s:XyScatterRenderableSeries.PointMarker>
<s:EllipsePointMarker Width="14"
Height="14"
Fill="{StaticResource PointMarkerFillColor}"
StrokeThickness="0" />
</s:XyScatterRenderableSeries.PointMarker>
</s:XyScatterRenderableSeries>
</s:SciChartSurface.RenderableSeries>
<s:SciChartSurface.XAxis>
<s:NumericAxis DrawMajorBands="True"
GrowBy="0.1, 0.1"
VisibleRangeLimit="0, 0"
VisibleRangeLimitMode="Min" />
</s:SciChartSurface.XAxis>
<s:SciChartSurface.YAxis>
<s:NumericAxis DrawMajorBands="True"
GrowBy="0.1, 0.1"
VisibleRangeLimit="0, 0"
VisibleRangeLimitMode="Min" />
</s:SciChartSurface.YAxis>
<s:SciChartSurface.ChartModifier>
<s:ModifierGroup>
<s:ZoomPanModifier ClipModeX="ClipAtMin" />
<s:MouseWheelZoomModifier />
</s:ModifierGroup>
</s:SciChartSurface.ChartModifier>
Repro steps :
- Zoom out using the wheel
- Try to pan
- Notice that it appears to apply an unwanted zoomToExtents operation
Can I also ask why there is still no ClipModeY for the ZoomPanModifier? there are a few posts relating to this with workarounds, but none of them seem to work as far as I can tell without weird side affects.
- Ben Green asked 1 year ago
- last active 1 year ago
I’m experimenting with creating a CustomRenderableSeries.
I was expecting VisualXcceleratorRenderSurface to perform the fastest. But what I am finding is that it is noticeably slower than XamlRenderSurface. By slower, I mean interaction with zoom/pan becomes choppy and resizing the window is choppy. Which is surprising because I’m really not rendering much at all.
We plan on rendering a lot more than this, but it already appears to struggling. Can you shed some light?
public class MyDataSeries : XyDataSeries<double>
{
public MyDataSeries()
{
}
}
public class MyRenderableSeries : CustomRenderableSeries
{
public MyRenderableSeries()
{
}
protected override void Draw(IRenderContext2D renderContext, IRenderPassData renderPassData)
{
base.Draw(renderContext, renderPassData);
if (DataSeries is not MyDataSeries series)
return;
using (var brush = renderContext.CreateBrush(Brushes.Red))
using (var pen = renderContext.CreatePen(Colors.Black, true, 1))
{
for (int i = 0; i < series.Count; ++i)
{
double pos = (double)series.XValues[i];
var x = renderPassData.XCoordinateCalculator.GetCoordinate(pos);
var y = renderPassData.YCoordinateCalculator.GetCoordinate(pos);
var s = renderPassData.XCoordinateCalculator.GetCoordinate(0) - renderPassData.XCoordinateCalculator.GetCoordinate(1);
var points = CreateCircle(new Point(x, y), s);
renderContext.FillPolygon(brush, points);
}
}
}
private List<Point> CreateCircle(Point pos, double radius)
{
var points = new List<Point>();
int count = 1000;
for (int i = 0; i < count; ++i)
{
double angle = (360.0 / count * i) * (Math.PI / 180);
double x = Math.Cos(angle) * radius;
double y = Math.Sin(angle) * radius;
points.Add(new Point(pos.X + x, pos.Y + y));
}
points.Add(points[0]);
return points;
}
}
public class MyRenderableSeriesViewModel : BaseRenderableSeriesViewModel
{
public override Type ViewType => typeof(MyRenderableSeries);
}
public class MyViewModel : BaseViewModel
{
public List<IRenderableSeriesViewModel> RenderableSeriesViewModels { get; }
public MyViewModel()
{
RenderableSeriesViewModels = new List<IRenderableSeriesViewModel>
{
Generate(Enumerable.Range(0, 25).Select(x => (double)x).ToArray()),
};
}
private IRenderableSeriesViewModel Generate(double[] data)
{
var dataSeries = new MyDataSeries();
dataSeries.Append(data, data);
return new MyRenderableSeriesViewModel
{
DataSeries = dataSeries,
StyleKey = "mySeriesStyle"
};
}
}
<UserControl x:Class="SciChart.Examples.Examples.SeeFeaturedApplication.Histogram.ViolinView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:s="http://schemas.abtsoftware.co.uk/scichart"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:SciChart.Examples.Examples.SeeFeaturedApplication.Histogram"
mc:Ignorable="d">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/SciChart.Charting;component/Themes/Default.xaml" />
</ResourceDictionary.MergedDictionaries>
<Style TargetType="{x:Type local:MyRenderableSeries}"
BasedOn="{StaticResource MvvmDefaultRenderableSeriesStyle}"
x:Key="mySeriesStyle">
</Style>
</ResourceDictionary>
</UserControl.Resources>
<s:SciChartSurface x:Name="SciChart"
RenderableSeries="{s:SeriesBinding RenderableSeriesViewModels}">
<s:SciChartSurface.RenderSurface>
<s:VisualXcceleratorRenderSurface />
</s:SciChartSurface.RenderSurface>
<s:SciChartSurface.XAxis>
<s:NumericAxis />
</s:SciChartSurface.XAxis>
<s:SciChartSurface.YAxis>
<s:NumericAxis />
</s:SciChartSurface.YAxis>
<s:SciChartSurface.ChartModifier>
<s:ModifierGroup>
<s:ZoomPanModifier />
<s:RubberBandXyZoomModifier ExecuteOn="MouseRightButton" />
<s:ZoomExtentsModifier ReceiveHandledEvents="False" />
<s:MouseWheelZoomModifier />
</s:ModifierGroup>
</s:SciChartSurface.ChartModifier>
</s:SciChartSurface>
I have tested this on 3 machines, and all show the same behaviour.
**VisualXcceleratorEngine: Creating VisualXcceleratorRenderSurface Visual Xccelerator Engine v7.0.1.27055
GPU Capability Test ### Is BGRA feature required: TRUE
Examining Graphics Adapter: Intel(R) Iris(R) Xe Graphics VRAM:
128Mb DeviceId: 39497Visual Xccelerator Engine Direct3D9 Compatibility
Determines whether the adapter is blacklisted due to its unstable work… FALSE
Trying to create Direct3D9 Device… SUCCESSVisual Xccelerator Engine Direct3D11 Compatibility
Trying to create Direct3D9Ex Device (WPF Compatibility)… SUCCESS
Trying to create Direct3D11 Device… SUCCESSRank: 3000128 Points
Examining Graphics Adapter: NVIDIA T500 VRAM: 1928Mb DeviceId:
8123Visual Xccelerator Engine Direct3D9 Compatibility
Determines whether the adapter is blacklisted due to its unstable work… FALSE
Trying to create Direct3D9 Device… FAILEDVisual Xccelerator Engine Direct3D11 Compatibility
Trying to create Direct3D9Ex Device (WPF Compatibility)… FAILED
Trying to create Direct3D11 Device… SUCCESSRank: 3001928 Points
Examining Graphics Adapter: Microsoft Basic Render Driver VRAM: 0Mb
DeviceId: 140Visual Xccelerator Engine Direct3D9 Compatibility
Determines whether the adapter is blacklisted due to its unstable work… FALSE
Trying to create Direct3D9 Device… FAILEDVisual Xccelerator Engine Direct3D11 Compatibility
Trying to create Direct3D9Ex Device (WPF Compatibility)… FAILED
Trying to create Direct3D11 Device… SUCCESSRank: 2000000 Points
Selected Graphics Adapter, where DeviceId is: 8123 Is Direct3D9
Supported: FALSE Is Direct3D11 Supported: TRUE Is Blacklisted:
FALSEPlease find the log file here:
C:\dev\TestApps\SciChart_Violin\bin\Debug\net6.0-windows\GpuCapability.log**VisualXcceleratorEngine: SUCCESS! VisualXcceleratorRenderSurface: attempt to initialize the engine with parameters: Use Direct3D9 –
False
- Ben Green asked 1 year ago
- last active 12 months ago
I am working on a multithreaded application where the acquisition and chart display run on different threads. I am attempting to collect samples and plot only when I have 100 samples available to have less resource consumption and keep the application responsive. However, when I change the number of samples in the block, my FIFO capacity seems to change, allowing significantly less amount of samples than the ones I need. The current FIFO capacity should allow for at least 16 mins worth of data, but it only shows less than a second
If I set the block size to 1 (single sample appending) I obtain the results I need, but I am seeing performance issues in other areas of the program, hence the need of appending in blocks.
See the attachments for more clarity. Any suggestions?
EDIT: Adding code
private void DisplayNPD()
{
XyDataSeries<float, float> npdRawDataSeries = new XyDataSeries<float, float>();
int fifoSize = 1000000;
npdRawDataSeries.FifoCapacity = fifoSize;
npdRawData_RS.DataSeries = npdRawDataSeries;
double npdRaw = 0;
bool successfulDequeue = false;
int samplesQueued = 0;
int samplesInBlock = 100;
float[] rawSamples = new float[samplesInBlock];
float[] time = new float[samplesInBlock];
while (!ImagingSession.terminateThreads)
{
if (ImagingSession.laserOnOff && !graphRestarted)
{
int npdElementsInQueue = npdDisplayQueue.Count;
if (npdElementsInQueue > 0)
successfulDequeue = npdDisplayQueue.TryDequeue(out npdRaw);
if (successfulDequeue)
{
currentTime = graphStopwatch.ElapsedMilliseconds * 0.001;
time[samplesQueued] = (float) currentTime;
rawSamples[samplesQueued] = (float) (npdRaw * 1000);
samplesQueued++;
if (samplesQueued == samplesInBlock)
{
using (npdRawDataSeries.SuspendUpdates())
npdRawDataSeries.Append(time, rawSamples);
samplesQueued = 0;
if (currentTime > upperLimit)
{
lowerLimit = upperLimit;
upperLimit += xAxisWidth;
AdjustXAxis(currentHorizontalScale);
}
}
}
}
}
}
- Matthew Beatty asked 1 year ago
- last active 1 year ago
I used an IPointMarkerPaletteProvider to change the color of the bubble chart to a solid color. However, the circles are not smooth around the perimeter, and they look very stepped. The same thing happens when I set the AntiAliasing property of the FastBubbleRenderableSeries to True. How can I make it a smooth circle?
- sungchul park asked 1 year ago
- last active 1 year ago
I want the bubbles in my bubble chart to be one color with no gradient, and I also want to color the border line. How can I do this?
- sungchul park asked 1 year ago
- last active 1 year ago
Hi,
All MyGet systems which host the SciChart nuget feeds are down: https://status.myget.org/
Does someone know where to report this issue and how to get any more information on this downtime? E.g. is it planned and is there an estimate how long this is going to take?
Thanks!
- Christian Liebhardt asked 1 year ago
- last active 1 year ago
My application is written in .net 7 wpf using scichart will the application work on linux with scichart?
- Бектемир v asked 1 year ago
- last active 1 year ago