to have a line chart being filled from right to left, with the first point appearing to the right of the chart area? And is it possible to have the X axis labelled with 0 to the right and sample age from left? Say, a 10 minute graph updated at 2 Hz with reasonable ticks starting at the left part of a fixed 10 minute visible/data range?
I have tried to search for this in the documentation, but not found anything I can use. The xValues start at 0 and increase by 0.5 for each sample.
I have tried the flippedCoordinate property, but it is not quite what I wanted, as it just appends the latest value to the left rather than scrolling existing values to the left before adding the most recent at the right end of the graph.
As can be seen from the attached stacked graph example, I update a stacked graph with 4 values being read and appended to the FastLineRenderableSeries as the samples appear. I use scichart-angular with scichart in my Angular app.
I have attached another screen dump with an example of a graph appearing from right to left (scrolling per sample) with a time span axis with now at right and -(max span) to the left. It is rendered using the SciChart WPF library.
Any suggestion on how I could achieve a mix of the two is highly appreciated.
- Morten Skille asked 6 hours ago
- last active 4 hours ago
The main chart has multiple series. But the the SciChartOverview can hold single dataseries only. I is possible to show all the data series in the main chart in the SciChartOverview ?
I have set the visible range for the main chart to 460, 470. But in the overview i am able to see the data out of the range. I can’t zoom thoes points but I can see them on the SciChartOverview. Is there a way to hide points out of the set visible range?
- Priyanka Asawa asked 1 day ago
- last active 10 hours ago
Bug with chart rendering. It also occurs on your site:
https://www.scichart.com/documentation/js/current/The%20Candlestick%20Series%20type.html.
Problem description: after zooming using the scroll wheel or slider, if we change the chart type from candlestick to OHLC or vice versa, the new chart is only drawn after moving the mouse over it, and initially, only part of it is displayed.
Another related issue: after loading the chart on, for example, a daily interval (candlestick), when I change the chart to a different interval, which is by default a line chart, I get the following error: scichart2d.wasm:0x80b0f Error from chart in div userchart-15: Error: Index must be an integer. Even though we are using the same candleDataSeries, candleDataSeries is not empty and I can console log the values, there is an issue with drawing the line.
const candleDataSeries = new OhlcDataSeries(wasmContext, {
dataSeriesName: USER_CHART.DS_CANDLES,
containsNaN: false,
isSorted: true });
const candlestickSeries = new FastCandlestickRenderableSeries(wasmContext, {
strokeThickness: 1,
dataSeries: candleDataSeries,
dataPointWidth: 0.7,
id: CHART_SERIES.CANDLE,
isVisible: false, });
const lineSeries = new FastLineRenderableSeries(wasmContext, {
strokeThickness: 2,
stroke: this.theme.lineChartColor,
dataSeries: candleDataSeries,
id: CHART_SERIES.LINE,
isVisible: false, });
Is it possible to get additional information about https://www.scichart.com/questions/js/double-labels-for-line-annotations?
- Dmytro Smirnov asked 6 days ago
- last active 5 days ago
See attached image. I have put a green border in the hosting component, and I would like to have the scichart-angular area to be taller. There are obiously more to do with my chart, but I’d nonetheless like to get more vertical space.
The hosting component’s html specifies a min-height of 650 px and a green 1px border. Inspecting the scichart component in the debugger indicates 100% height and width. The height of the scichart-angular component is not reflected.
I tried to put the min-height style within the scichart-angular tag in my scichart component html, but it had no effect. Is there a ratio setting hidden somewhere in scichart-angular?
- Morten Skille asked 1 week ago
- last active 1 week ago
As I see in the chart surface you have VerticalSliceModifier. Why you don’t have HorizontalSliceModifier? It will be useful (for me))))
- Fedor Iudin asked 1 week ago
- last active 2 days ago
Hi, some of my colleagues are experiencing an error where the chart won’t render and there was an error message: WebGL context lost. It had been happening regularly.
They were using Windows 10 Dell laptop with Intel Core i7 10810U 1.1Ghz and Intel UHD graphics 1Gb memory, running Crome 131.
- Edwin Liu asked 1 week ago
- last active 1 week ago
Hello
Like in this SeriesValueModifier article
https://www.scichart.com/documentation/win/current/SeriesValueModifier.html
and example
https://www.scichart.com/documentation/win/current/webframe.html#SeriesValueModifier.html
Is is possible to show Calculate DataColumnInfo
eg: % based on (Open – Close) / Open
or get Metadata and show metadata ?
thanks
Praveen
- Praveen D asked 1 week ago
- last active 1 week ago
Hello,
I am trying to implement the keyboard functionality described here. However, I have several charts connected via a modifierGroup
. When I try to add the following code:
sciChartSurface.chartModifiers.add(new KeyboardZoomPanModifier({ scrollFactor: 0.1, modifierGroup: 'group1' }));
it works only for the chart that is currently focused. Is it possible to extend this functionality across multiple SciChart surfaces?
- Zino As asked 2 weeks ago
- last active 1 week ago
Hello,
I am wanting to place a floating button at the top right corner of my chart. What are some effective methods to do this within scichart?
Thank you,
Preston
- preston truong asked 2 weeks ago
- last active 1 week ago
Hello I am using this example to to MVVM Annoations
I would like to save user drawn annotation . I was able get the user Annotation into
AnnotationViewModels = new ObservableCollection();
But now I can’t serialize as mentioned in this post
https://www.scichart.com/questions/wpf/is-there-a-way-to-serialize-just-annotations
any way to serialize IAnnotationViewModel or convert IAnnotationViewModel to IAnnotation so I can serialize the AnnoationCollection.
Please guide
thanks
- Praveen D asked 2 weeks ago
- last active 1 week ago
Hi,
I have released a WPF application on .NET Framework 4.8 that uses the SciChart library.
Some users cannot start the program because when the license is checked they get an exception, this problem disappears if they launch the application with the “Run as administrator” option, but this is not acceptable for them.
I’d like to know if this is a know issue and how to resolve it.
Below the full exception and the system specs:
Frameworkversion: v4.0.30319
Beschreibung: Der Prozess wurde aufgrund einer unbehandelten Ausnahme beendet.
Ausnahmeinformationen: System.InvalidOperationException
bei Abt.Licensing.New.AbtLicensingNativeDIILoader.LoadDIIFromResource(System.Reflection.Assembly, System.String, System.String, Boolean)
Ausnahmeinformationen: System.InvalidOperationException
bei Abt.Licensing.New.AbtLicensingNativeDIILoader.LoadDIIFromResource(System.Reflection.Assembly, System.String, System.String, Boolean)
bei Abt.Licensing.New.AbtLicensingNativeDIILoader.InitNativeLibs(
bei Abt.Licensing.New.Credentials .. cctor(
Ausnahmeinformationen: System. TypelnitializationException
bei Abt.Licensing.New.Credentials.SetRuntimeLicenseKey(System.String)
Operating System Name: Microsoft Windows 11 Enterprise
Version: 10.0.22631 Build 22631
System Manufacturer: Dell Inc.
System Model: Latitude 5540
System Type: x64-based PC
Processor: 13th Gen Intel(R) Core(TM) i7-1365U, 1800 MHz, 10 cores
BIOS Version/Date: Dell Inc. 1.14.0, 12/06/2024
SMBIOS Version: 3.6
Embedded Controller Version: 1.19
BIOS Mode: UEFI
Platform Role: Mobile
Secure Boot State: On
- Alessio Diana asked 2 weeks ago
- last active 6 days ago
Hello
I am trying to add RolloverModifier to my chart. I want it to be enabled when any of the FastLineRenderableSeries is selected. I managed to do this with onSelectedChanged property. I simply set
it like: rolloverModifier.isEnabled = isSelected;
But there’s one problem – when the RolloverModifier is disabled on selecting the series the vertical line stays attached to the chart, it doesn’t move with cursor and doesn’t show tooltips, but it’s on the chart.
I would really appreciate help with that.
Maybe there’s a way to “manually” detach the line?
- Cezary Szymanski asked 2 weeks ago
- last active 1 week ago
Hello,
I have this in XAML
ViewModel
private ObservableCollection _annotations = new ObservableCollection();
This works great but we have few chart that we need to add dynamically in initial constructor of the window.
When we do SetBinding in code behind it doesn’t work. What am I missed. Please help
Binding annatBinding = new Binding(“Annotations”);
annatBinding.Mode = BindingMode.TwoWay;
chartOne.SetBinding(SciStockChart.AnnotationsProperty, annatBinding);
May be I should use AnnotationsBinding but need guidance
thanks
- Praveen D asked 2 weeks ago
- last active 1 week ago
We have previously assigned a CustomVerticalMarkerAnnotation
class which is extended from AxisMarkerAnnotation
, and would like to change the image of the annotation when we trigger the onClick
event. Is there a way to redraw the image without removing the annotation?
Here is our code sample of the annotation in question:
let svgString: string = this.getSvgIcon("orange-arrow-up", "#ee7a26").replace(/LABEL_HERE/g, "").replace(/COLOR_TEXT_HERE/g, "transparent").replace(/WIDTH_HERE/g, '50').replace(/HEIGHT_HERE/g, '30').toString();
let blob = new Blob([svgString], { type: 'image/svg+xml' });
let url = URL.createObjectURL(blob);
let image: HTMLImageElement = document.createElement('img');
image.src = url;
let customHorizontalReferenceAnnotation = new CustomVerticalMarkerAnnotation({
id: id,
x1: x1,
xAxisId: this.sciChartGraph.xAxes.get(2).id,
yAxisId: this.sciChartGraph.yAxes.getById('y-axis-marker').id,
xCoordinateMode: ECoordinateMode.DataValue,
image: image,
imageWidth: 150,
imageHeight: 35,
onClick: () => {
this.onClickHorizontalReference(x, id)
}
and we would like to change the image under the function this.onClickHorizontalReference
we tried this but it didn’t work out as the image remains the same
const selectedHorizontalReference = this.sciChartGraph.annotations.getById(id) as CustomVerticalMarkerAnnotation
let svgString: string = this.getSvgIcon("yellow-arrow-up", "#e7ee26").replace(/LABEL_HERE/g, "").replace(/COLOR_TEXT_HERE/g, "transparent").replace(/WIDTH_HERE/g, '50').replace(/HEIGHT_HERE/g, '30').toString();
let blob = new Blob([svgString], { type: 'image/svg+xml' });
let url = URL.createObjectURL(blob);
let image: HTMLImageElement = document.createElement('img');
image.src = url;
selectedHorizontalReference.image = image
- Suzanne Ong asked 3 weeks ago
- last active 4 days ago
In the Codepen example provided (https://codepen.io/scichart/pen/abRpzMv), is there a way to resolve the current subchart resizing issue within this implementation? any help is really appreciated
- Jeff Tran asked 3 weeks ago
- last active 1 week ago
Hi,
Is it possible to fill the FastMountainRenderableSeries with some patten set or svg images?
Instead of filling the color i want fill the area with pattern set images.
- Jerin Mathew asked 4 weeks ago
- last active 1 week ago
Hi,
I made a custom theme based on this documentation Creating a Custom Theme, Everything works fine, except the series are the same color.
I know I can change the color of the series through code, I was wondering if there is a way to have SciChart automatically set different colors instead of just using the color from the custom theme.
Thanks!
- anders chen asked 1 month ago
- last active 2 weeks ago
My team wants to buy your license for the Electron application. But first I would like to try the trial version. But the instructions do not explain how to connect the trial version to the Electron application. The Electron demo version on GitHub does not work… And can you somehow describe how the Electron application will work? Will a license be needed for each machine delivered or only for the application developers?
- Fedor Krivoy asked 1 month ago
- last active 2 weeks ago
I have following use-case:
- Multiple datasets should be displayed as a column chart
- The datasets have different units, 2 in my case, but in theory the datasets can
have 1-n units - For each unit I want to create a separate axis
- Datasets that have the same unit should be stacked above each other
Heres a screenshot (not implemented in SciChart, but I’d like to rebuild this chart in SciChart!):
See attachment or https://ibb.co/2S8fhZb
My approach was following:
– Create one y-axis per unit (so I have 2 y-axes in my example)
– Create one StackedColumnCollection
per unit, with the unit as their yAxisId
– Create a StackedColumnRenderableSeries
for each of my datasets and use the unit as the stackedGroupId
– Add the StackedColumnRenderableSeries
with the same unit to one StackedColumnCollection
– Add the StackedColumnCollection
to the chart
All my series render, in theory. But the last added series of the StackedColumnCollection
always overlaps the other StackedColumnCollection
s. In my 2 other attachments you can see, that the green series overlaps the blue series.
It works fine, when I only use one StackedColumnCollection
or don’t use them at all. But I didn’t see any possibility to use multiple axes in this case.
Am I going for the wrong approach? Is this not how StackedColumnCollection
s should be used? If so, is there any other possibility to cover my use-case?
- Max Geldner asked 1 month ago
- last active 3 weeks ago
I was playing with the example “ScrollbarMvvmAxis”. This project is in “SciChart.Wpf.Examples-master\Sandbox\CustomerExamples\ScrollbarMvvmAxis”. I noticed that it produced a binding error in both output window and Xaml Binding Window. The error read “System.Windows.Data Error: 4 : Cannot find source for binding with reference ‘RelativeSource FindAncestor, AncestorType=’SciChart.Charting.Visuals.SciChartScrollbar’, AncestorLevel=’1”. BindingExpression:Path=Orientation; DataItem=null; target element is ‘Line’ (Name=”); target property is ‘Visibility’ (type ‘Visibility’)”. Checked the code in the project and didn’t see binding related to this. It must be in the library itself. Anyone knows what could be it?
Thanks
- Ning Qiang asked 1 month ago
Hello,
I’m investigating an issue caused after upgrading from 8.0.0.27737 to 8.6.0.28199.
After feeding some data to display the graph users can pause the process and then navigate back and forth.
For that, our code sets AutoRange="Never"
and binds the “VisibleRange
” property to an IRange instance (DoubleRange).
In the ViewModel, the values are updated with this.XAxisRange.SetMinMax(...)
, which worked just fine in 8.0.0.
However, after the upgrade, the UI doesn’t reflect the change.
After reading through the docs and posts on this forum, I changed to reassign the property with a new instance of DoubleRange every time.
Is that the correct solution?
I wonder why it worked before and not anymore. I can see the PropertyChanged event args are different in 8.6.0 when calling SetMinMax(...)
TBF, it’s my first contact with the library, so any additional clarification is appreciated.
Regards,
- Josimar Pereira Santana asked 1 month ago
- last active 2 weeks ago
Hi,
We need to introduce a new functionality in our application based on SciChart v.8.5.0.28160:
“The user should have the possibility to display peak positions and additional information, via peak selection, with a new mode”.
I’m using a SciChartSurface to display several FastImpulseRenderableSeries. The user must be able to click on a peak to display the data (peak position and other details in the metadata) in a tooltip/rollover near the PointMarker of the peak selected. This information must remain visible even when the mouse leaves the selected peak area. In addition, the user must be able to select multiple peaks, so that the data of the other selected peaks are also displayed. With a second click on a selected peak, the tooltip/rollover must disappear.
By adding a RolloverModifier on the SciChartSurface.ChartModifier I’m able to display basic information of the peak selected:
<s:SciChartSurface
<s:SciChartSurface.ChartModifier>
<s:ModifierGroup s:MouseManager.MouseEventGroup="CustomMouseGroup">
<sciChartTools:RolloverModifier
IsEnabled="{Binding IsStickPatternModeActivated}"
ShowTooltipOn="MouseLeftButtonDown"
IncludeSeries="True"
ShowAxisLabels="False"
ReceiveHandledEvents="True"/>
</s:ModifierGroup>
</s:SciChartSurface.ChartModifier>
</s:SciChartSurface>
But I have some problems:
1. If the user clicks on a series’ peak all the nearest peaks are displayed (undesirable behaviour!).
Instead I want to display only the peak selected (not a nearest peak, but only the selected one).
-
The user must be able to select another peak to display the data related the new peak selected.
-
The data displayed must remain in the SciChartSurface either if the user moves the mouse (inside/outside the SciChartSurface).
-
The user must be able to select a selected peak to not display anymore the related data.
Thanks in advance.
- Simone Russo asked 2 months ago
- last active 2 weeks ago
Hi,
Im have a Scichart and above it i add editable annotations by using BoxAnnotations.
I want to adjust the cursor for the selected annotation, so on hover the corners i will show a resize cursor,
and when hover above the inner part of annotation i will show a drag cursor.
Couldnt find it in the docs.
Thanks
- Avital Rubin asked 2 months ago
- last active 1 month ago
We have provided the required styling of content template for VerticalSliceModifier. All the Y axis values that intersects with verticalLine of slice modifier should on one label body and the label should always stay on the top position of the graphsurface.
- Vinil Kumar asked 2 months ago
- last active 1 month ago
Hi iam trying to evaluate your library and got few questions.
this example Realtime Ghosted Traces looks weard with Gforce 4060 and win11.
- kir anderski asked 2 months ago
- last active 1 month ago
Hello,
I’m working on a chart in SciChart iOS and need to configure the X-axis to skip non-trading days and times (e.g., weekends and after-hours). I found a solution for this in the WPF version of SciChart using the DiscontinuousDateTimeAxis, as described here: Discontinuous DateTime Axis – SciChart WPF Documentation.
However, I haven’t been able to find a similar implementation or documentation for the iOS version of SciChart. Could you please guide me on how to achieve this in SciChart iOS?
I’ve attached a screenshot where the jump in the X-axis is visible to illustrate the issue.
Thank you in advance for your help!
- Libor Zapletal asked 2 months ago
- last active 3 weeks ago
Hello,
I have a question regarding line labels. We have a stock chart and we need to have the value/date of the line on the Y or X axis and a label. Currently (for example for HorizontalLineAnnotation), if I set:
labelPlacement to ‘Axis’ and do not set labelValue, then there is a value on the Y axis:
https://ibb.co/jrKtPzS
In the case of assigning the labelValue to ‘I would like to have text here’ and labelPlacement to Top, I get the text in the middle of the line:
https://ibb.co/N3Fq4Kk
I need a combination of these options, displaying both and, of course, changing the position as the user moves the line. We don’t have static lines, so moving a TextAnnotation assigned to a line would be troublesome (there could be a dozen of them on the chart).
https://ibb.co/Nn7cNWS
We will need this for every type of line. It would be a good solution to have, for example, 2 separate props: for the label, showLabel, labelValue, labelPlacement, and for the axis label: showAxisLabel, labelAxisValue.
Unless there is currently a way to achieve this effect?
- Kamil Macura asked 2 months ago
- last active 3 weeks ago
while (_CameraDataPlot.TryDequeue(out PlotData record))
{
Parallel.ForEach(record.Values, val =>
{
try
{
IRenderableSeriesViewModel render = CameraChannels
.First(x => x.ChannelId == val.Key)
.RenderableSeries
.FirstOrDefault(r => (int)(r as LineRenderableSeriesViewModel).Tag == record.Group);
if (render != null)
{
using (render.DataSeries.SuspendUpdates())
{
long ticks = record.Timestamp / 100;
(render.DataSeries as XyDataSeries<TimeSpan, double>).Append(new TimeSpan(ticks), val.Value);
}
}
}
catch (DivideByZeroException ex)
{
Console.WriteLine($"DivideByZeroException caught: {ex.Message}");
Console.WriteLine($"Timestamp: {record.Timestamp}, Value: {val.Value}");
Console.WriteLine($"Stack Trace: {ex.StackTrace}");
}
catch (Exception ex)
{
// Optional: Add logging or handling for general exceptions
}
});
}
Here is my code. When my frame rate is set to greater than 1, rendering is normal, but when I set the frame rate to less than 1, an error occurs at the “render.DataSeries as XyDataSeries<TimeSpan, double>).Append(new TimeSpan(ticks), val.Value);” position: attempting to divide by 0.
The detailed error message is as follows:
引发的异常:“System.DivideByZeroException”(位于 SciChart.Data.dll 中)
DivideByZeroException caught: 尝试除以零。
Timestamp: 2209466241, Value: 0.000170655727634525
Stack Trace: 在 puq1.nuo()
1.Add(a item)
在 puq
在 SciChart.Charting.Model.DataSeries.XyDataSeries2.Append(TX x, TY y, IPointMetadata metadata)
2.Append(TX x, TY y)
在 SciChart.Charting.Model.DataSeries.XyDataSeries
引发的异常:“System.DivideByZeroException”(位于 SciChart.Data.dll 中)
- zhang yu asked 2 months ago
- last active 2 weeks ago
I am using a draggable VerticalLineAnnotation to let the user select a X value. Vertical Modifier is not an option due to terrible performance. I tried with the following code but is not returning the expected value, sometimes returns a wrong value and sometimes is returning Nan:
const index = dataSeries?.findIndex(targetX, ESearchMode.Nearest);
const yValue = dataSeries?.getNativeYValues()?.get(index);
- Jhonatan Laguna asked 2 months ago
- last active 2 months ago
Hi,
I am seeing intermittent charting issues when plotting real-time data. The issue seems to be related to programmatic ranging of the x-axis, as I am unable to replicate the behavior when setting AutoRange="Always"
, and removing the programmatic ranging code.
I captured the behavior in a screen recording that can be viewed in the OneDrive link below (the file was too large to upload in this post). The behavior is replicated at time 0:00:01
. To me, it seems like the x-axis was somehow stretched in a section of the chart as the temporal distance between two consecutive data points seems to increase temporarily. In the video you can see that this behavior is transient and seems to rectify quite quickly; scrolling back to the time at which the glitch occurs, there seems to be no abnormalities in the data. The link to the video is below:
Below is the programmatic ranging method I am using:
private void AutoScaleAxes(double latestXPosition)
{
try
{
// force task to run on UI thread if not already
if (Thread.CurrentThread != _dispatcher.Thread)
{
_dispatcher.Invoke(() => AutoScaleAxes(latestXPosition));
}
else
{
var lowerBound = Math.Max(0, latestXPosition – DisplaySeconds);
if (Plots?.FirstOrDefault()?.DataSeries?.ParentSurface?.XAxes.First() is IAxis xaxis) xaxis.VisibleRange = new DoubleRange(lowerBound, latestXPosition);
var blockFirstScaling = _data.First().Count < 100; // don’t auto-scale first time until we have at least 100 data points
var autoScaleY = (_firstScaling && !blockFirstScaling) ? (!AutoScaleYAxis.HasValue) : (AutoScaleYAxis.HasValue && AutoScaleYAxis.Value);
}
}
Any thoughts on what code be causing this? Thanks!
- Jared Weyer asked 2 months ago
- last active 3 weeks ago
I want to display a tooltip on my scatter plot when the user hovers over a data point. However, the tooltip is getting clipped if the text is too long, even when there’s sufficient space within the chart (see attached image). Is there a way to ensure the tooltip can use the full width of the chart?
tooltipDataTemplate: (seriesInfo: SeriesInfo[]) => {
const tooltipContent: string[] = [];
seriesInfo.forEach(info => {
const metadata = info.pointMetadata as {
drift: number;
importance: number;
name: string;
weightedScore: number;
};
if (info?.isHit) {
const name = dialog ? metadata.name : metadata.name.length > 17 ? ${metadata.name.substring(0, 17)}...
: metadata.name;
tooltipContent.push(
name,
Drift: ${metadata.drift.toFixed(2)}
,
Importance: ${metadata.importance.toFixed(2)}
,
Weighted Score: ${metadata.weightedScore.toFixed(2)}
,
);
}
});
return tooltipContent;
},
I also tried to customize it using html and css, but no luck so far.
tooltipDataTemplate: (seriesInfo: SeriesInfo[]) => {
const tooltipContent: string[] = [];
seriesInfo.forEach(info => {
const metadata = info.pointMetadata as {
drift: number;
importance: number;
name: string;
weightedScore: number;
};
if (info?.isHit) {
tooltipContent.push(`
${metadata.name}
`);
}
});
return tooltipContent;
},
- Joseph Deng asked 2 months ago
- last active 2 months ago
Hi, when use dataPointWidthMode Absolute or Range and use hitTest for column, this error occurs.
im doing something wrong?
- rocket trade asked 2 months ago
- last active 2 months ago
I have one problem by printing the chart. I use one third part library for that job. This library work normally good but in this case the chart SCI will not display any curve or axis configurations.
The code .. maybe you see something.. visual is the report (UserControl) containing the chart SCI.
public static DrawingVisual BuildGraphVisual(PageMediaSize pageSize, Visual visual)
{
var drawingVisual = new DrawingVisual();
using (var drawingContext = drawingVisual.RenderOpen())
{
var visualContent = visual;
var rect = new Rect { X = 0, Y = 0, Width = pageSize.Width.Value, Height = pageSize.Height.Value };
var stretch = Stretch.None;
var visualBrush = new VisualBrush(visualContent) { Stretch = stretch };
drawingContext.DrawRectangle(visualBrush, null, rect);
drawingContext.PushOpacityMask(Brushes.White);
}
return drawingVisual;
}
- Norman Bürgi asked 2 months ago
- last active 1 month ago
We have discovered that Scichart is leaking memory on one of our machines.
Setting VisualXcceleratorEngine.IsEnabled=false prevents the memory leak.
In trying to produce a minimum reproduction I found that all I needed was a blank new WPF project with an empty SciChartSurface on it (https://grinstallers.blob.core.windows.net/public/Scichart%20Memory%20leak.zip as it would not let me attach it here).
Simply resizing the window would cause the leak. I have linked to a screen recording showing the leak occurring in real-time (https://grinstallers.blob.core.windows.net/public/Screen%20Recording%202024-11-21%20132048.mp4). The machine with the issue has an AMD Radeon RX 640 video card and I do not get the same leaking behaviour on another machine with Intel UHD Graphics 770. I have updated all drivers to the latest version and the leak still happens.
A memory dump of the process shows the majority of memory is unmanaged (Managed heap = ~450MB of 10GB).
I have gone back as far as version 8.0.0.27737 and the leaking behaviour is still there.
- Eamon asked 2 months ago
- last active 4 weeks ago
I found FifoCapacity Property for IDataSeries. As wrote in doc “If a value is set, when the point count reaches this value, older points will be discarded”. As I think it is very useful for real-time charts. But maybe you have the similar property (I not found it) which can set DataSeries not in dots but in bound axis values? It will be like axis length. As example, we set this value to 10 and if new added point has X coordinate between [current max X] and [current max X – 10] it will be added. Or if it more then [current max X]. And after adding all values less than [current max X – 10] will be discarded.
Or the best decision FOR ME: not delete values less than [current max X – 10] but just not display chart for them. It will be good for changing “length” property “on fly” or using zoom.
P.S. I completed decision like this to my project but now I thinking what if SciChart has it build-in?
- Fedor Iudin asked 2 months ago
- last active 2 months ago
Allow me to start with stating everything works beautifully without trying to sort my legend. See attached.
However; sorting the legend has been a problem. I created a LegendDataConverter class (IValueConverter) which felt like the appropriate method to achieve a sorted legend, but all I have managed to do is cause the Legend to stop working. I.e. an empty legend.
My SciChart instance uses a custom LegendModifier. Each series in my chart is a custom class derived from “IRenderableSeriesViewModel”, named “CustomLineRenderableSeriesViewModel”. There are several bindable properties in my derived class. These properties are used in XAML to customize the multiple series displayed.
My intent is to use those same properties in the Legend converter class to sort the items displayed in the legend. I’ve gone through several iterations of changes and have still not been successful. Here is the latest implementation, which does not provide appropriate results.
public class LegendDataConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
if (value is ChartDataObject)
{
IEnumerable<SeriesInfo> seriesInfo = (value as ChartDataObject).SeriesInfo;
// Extract the RenderableSeries from SeriesInfo
var renderableSeries = seriesInfo.Select(si => si.RenderableSeries).OfType<IRenderableSeries>().ToList();
// Separate the series based on the custom properties
var passingLineSeries = renderableSeries.FirstOrDefault(rs =>
((CustomLineRenderableSeriesViewModel)rs.DataContext).IsPassingLine &&
((CustomLineRenderableSeriesViewModel)rs.DataContext).IsSecondAxis);
var secondaryAxisSeries = renderableSeries.FirstOrDefault(rs =>
!((CustomLineRenderableSeriesViewModel)rs.DataContext).IsPassingLine &&
((CustomLineRenderableSeriesViewModel)rs.DataContext).IsSecondAxis);
var otherSeries = renderableSeries.Where(rs =>
!((CustomLineRenderableSeriesViewModel)rs.DataContext).IsSecondAxis).ToList();
// Create the ordered list
ObservableCollection<IRenderableSeriesViewModel> ordered = new ObservableCollection<IRenderableSeriesViewModel>();
otherSeries.ForEach(s => ordered.Add((CustomLineRenderableSeriesViewModel)s.DataContext));
if (secondaryAxisSeries != null)
{
ordered.Add((CustomLineRenderableSeriesViewModel)secondaryAxisSeries.DataContext);
}
if (passingLineSeries != null)
{
ordered.Add((CustomLineRenderableSeriesViewModel)passingLineSeries.DataContext);
}
return ordered;
}
return value;
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
throw new NotImplementedException();
}
}
I welcome any suggestions.
- Chris Kirkman asked 2 months ago
- last active 2 months ago
Can I integrate the WPF charts in react code to make it web-app compatible?
- Neeraj Mirashi asked 2 months ago
- last active 2 months ago
Hello,
I have already mentioned this access violation exception in this comment:
https://www.scichart.com/questions/wpf/how-can-you-ensure-that-boxplot-series-on-different-axes-have-the-same-width
Please see the screenshot of the call stack in the comment.
This exception occurs when unloading a SciChart. The entire application crashes!
- Tobias asked 2 months ago
- last active 2 months ago
Hi,
I am using scichart for Vue.js app (with npm for version 3.5.687 ) .
Added ‘chartModifiers’ of ‘rolloverModifier’ to show tooltip when hovering above the lines.
I have multiple datasets and i only want to show one tooltip at a time for the nearest chart.
I added snapToDataPoint: true
and it doesnt do anything.
Can I get some help with that?
Thanks
- Avital Rubin asked 3 months ago
- last active 3 months ago
We are considering SciChart to our development pipeline. We need to know that SciChart is capable for plotting polar chart and Event Timeline chart. We have uploaded the images for this chart. It will very helpful if you provide sample code snippet to test. We have tested your lineChart, which is great.
Polar chart : Radius (To determine length), angle (In clockwise direction)
Event Timeline chart : Device name (left side), X-Axis=Time, Red rectangular marking indicates the time where the device is on.
- Don Shaji asked 3 months ago
- last active 3 months ago
We get this error and stack trace pretty often when clearing a large number of annotations from our CustomSourceCollectionBase. While we are using a custom collection, the call is made on a SourceCollectionBase function (Clear()). We’ve tried figuring out how to avoid this and why this happens but it appears to be something in the style of a BoxAnnotationForMvvm. Any help/guidance on this?
2024-11-06 07:46:42.545 -06:00 [Error] Exception: Cyclic reference found while evaluating the Style property on element 'SciChart.Charting.Visuals.Annotations.BoxAnnotationForMvvm'. in TimeLineViewModel
at System.Windows.FrameworkElement.UpdateStyleProperty()
at System.Windows.TreeWalkHelper.InvalidateOnTreeChange(FrameworkElement fe, FrameworkContentElement fce, DependencyObject parent, Boolean isAddOperation)
at System.Windows.FrameworkElement.ChangeLogicalParent(DependencyObject newParent)
at System.Windows.FrameworkElement.AddLogicalChild(Object child)
at System.Windows.Controls.UIElementCollection.AddInternal(UIElement element)
at SciChart.Core.Extensions.PanelExtensions.SafeAddChild(Panel panel, Object child, Int32 index)
at csb.rsp(IAnnotationCanvas hmb, Object hmc, Int32 hmd)
at SciChart.Charting.Visuals.Annotations.AnnotationBase.Update(ICoordinateCalculator`1 xCoordinateCalculator, ICoordinateCalculator`1 yCoordinateCalculator)
at SciChart.Charting.Visuals.Annotations.AnnotationBase.TryUpdate(ICoordinateCalculator`1 xCalc, ICoordinateCalculator`1 yCalc)
at SciChart.Charting.Visuals.Annotations.AnnotationBase.Refresh()
at SciChart.Charting.Visuals.Annotations.AnnotationBase.OnRenderablePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
at System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp, Boolean preserveCurrentValue)
at System.Windows.StyleHelper.InvalidateContainerDependents(DependencyObject container, FrugalStructList`1& exclusionContainerDependents, FrugalStructList`1& oldContainerDependents, FrugalStructList`1& newContainerDependents)
at System.Windows.StyleHelper.DoStyleInvalidations(FrameworkElement fe, FrameworkContentElement fce, Style oldStyle, Style newStyle)
at System.Windows.StyleHelper.UpdateStyleCache(FrameworkElement fe, FrameworkContentElement fce, Style oldStyle, Style newStyle, Style& styleCache)
at System.Windows.FrameworkElement.OnStyleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
at System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp, Boolean preserveCurrentValue)
at System.Windows.FrameworkElement.UpdateStyleProperty()
at System.Windows.TreeWalkHelper.InvalidateOnTreeChange(FrameworkElement fe, FrameworkContentElement fce, DependencyObject parent, Boolean isAddOperation)
at System.Windows.FrameworkElement.ChangeLogicalParent(DependencyObject newParent)
at System.Windows.FrameworkElement.RemoveLogicalChild(Object child)
at System.Windows.Controls.UIElementCollection.RemoveInternal(UIElement element)
at SciChart.Core.Extensions.PanelExtensions.SafeAddChild(Panel panel, Object child, Int32 index)
at csb.rsp(IAnnotationCanvas hmb, Object hmc, Int32 hmd)
at SciChart.Charting.Visuals.Annotations.AnnotationBase.Update(ICoordinateCalculator`1 xCoordinateCalculator, ICoordinateCalculator`1 yCoordinateCalculator)
at SciChart.Charting.Visuals.Annotations.AnnotationBase.TryUpdate(ICoordinateCalculator`1 xCalc, ICoordinateCalculator`1 yCalc)
at SciChart.Charting.Visuals.Annotations.AnnotationBase.Refresh()
at SciChart.Charting.Visuals.Annotations.AnnotationBase.OnRenderablePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
at System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp, Boolean preserveCurrentValue)
at System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange)
at System.Windows.Data.BindingExpression.Activate(Object item)
at System.Windows.Data.BindingExpression.HandlePropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
at System.Windows.Data.BindingExpression.OnPropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
at System.Windows.DependentList.InvalidateDependents(DependencyObject source, DependencyPropertyChangedEventArgs sourceArgs)
at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
at SciChart.Charting.Model.ChartSeries.SourceCollectionBase`2.ClearItems()
at Orchid.Common.UserControls.Common.CustomSourceCollectionBase`2.OnSourceCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args) in D:\source\Orchid\Orchid\Orchid.Common.UserControls\Common\CustomSourceCollectionBase.cs:line 72
at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at DynamicData.Binding.ObservableCollectionExtended`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e) in /_/src/DynamicData/Binding/ObservableCollectionExtended.cs:line 158
at DynamicData.Binding.ObservableCollectionExtended`1.<SuspendNotifications>b__10_0() in /_/src/DynamicData/Binding/ObservableCollectionExtended.cs:line 143
at System.Reactive.Disposables.AnonymousDisposable.Dispose()
at DynamicData.Binding.ObservableCollectionAdaptor`1.Adapt(IChangeSet`1 changes) in /_/src/DynamicData/Binding/ObservableCollectionAdaptor.cs:line 67
at DynamicData.ObservableListEx.<>c__DisplayClass0_0`1.<Adapt>b__1(IChangeSet`1 changes) in /_/src/DynamicData/List/ObservableListEx.cs:line 53
at System.Reactive.Linq.ObservableImpl.Select`2.Selector._.OnNext(TSource value)
- Matthew Trahan asked 3 months ago
- last active 3 months ago
Hi ,
I am using Ternary scatter chart where in I am trying to fill each of Ellipse point marker in TernaryScatterRenderableSeries with different color using Custom palette provider inheriting IPointMarkerPaletteProvider but its not filling out with different colour, if single colour is mentioned then it fills all point single colour please do help me out whether TernaryScatterRenderableSeries supports custom palette provider or not.
Thanks
version 4.0.30319
- Namitha K asked 3 months ago
- last active 3 months ago
“I’m currently using WPF to create two curves, but why aren’t the 0 points of the two Y-axes parallel to the X-axis? Here’s my code:”
<!—->
<!–
–>
XAxisRange = new DoubleRange(0, datas[0].UNewData.Max());
LeftYAxisRange = new DoubleRange(-880, 300);
RightYAxisRange = new DoubleRange(-880, 300);
C# code
((XyDataSeries<double, double>)DataSeriesIV).Append(datas[0].UNewData, datas[0].INewData);
if (datas[0].PNewData != null)
{
((XyDataSeries<double, double>)DataSeriesPV).Append(datas[0].UNewData, datas[0].PNewData);
}
- jh jh asked 3 months ago
- last active 3 months ago
Hello,
I would like to ask if we can expect working labels for LineAnnotation anytime soon? It’s the only type of line that doesn’t have functioning labels. I need this information because we are planning to deploy a version with formations soon, and we cannot afford inconsistency in the labels. If this is not planned for the near future, we will temporarily disable this option for the other lines.
Best regards,
Kamil
- Kamil Macura asked 3 months ago
- last active 3 months ago
Hello,
we upgraded the version from 3.4.652 to 3.5.687, and problems with the Y-axis appeared on the charts. When moving the overviewChart sliders or using the scroll wheel to change the visibleRange, the Y-axis fails to set the min and max values correctly, resulting in the default values of 0 and 10 being displayed (Error: Argument max must be a real number (not infinite, not NAN)). We didn’t change anything in the code. I checked the data we provide, and all variables are of type Number, there are no other random things.
I’ll just include the axis parameters we use.
const yAxis = new NumericAxis(wasmContext, {
autoRange: EAutoRange.Always,
growBy: new NumberRange(0.1, 0.1),
drawMajorBands: false,
drawMajorTickLines: false,
drawMinorGridLines: false,
drawMinorTickLines: false,
labelStyle: {
fontSize: 11,
fontFamily: 'Open Sans, sans-serif',
padding: new Thickness(0, 3, 0, 0),
color: this.theme.lineChartColor,
alignment: ELabelAlignment.Right,
},
maxAutoTicks: 7,
axisAlignment: EAxisAlignment.Right,
labelProvider: this.getDynamicValueLabelProvider(),
isVisible: false
});
const yAxisVolume = new NumericAxis(wasmContext, {
id: USER_CHART.Y_AXIS_VOLUME_ID,
growBy: new NumberRange(0, 4),
isVisible: false,
autoRange: EAutoRange.Always,
allowFastMath: true,
});
https://ibb.co/tL5HgCz – in the screenshot, the incorrect axes are on the left side – sometimes only the volume axis (invisible), and in another case, both axes. The correct charts are on the right side.
Best regards,
Kamil
- Kamil Macura asked 3 months ago
- last active 2 months ago
Hello there,
The hit test provider for stackedColumnRenderableSeries returns ‘false’ for the ‘isHit’ boolean when hit testing stacked columns with negative values. However, stacked Columns with positive values correctly return ‘true’ for ‘isHit’ when used in the same setup.
I am trying to achieve that the hit test provider returns ‘true’ when hit testing stacked columns with negative values.
Here’s my demo:
https://codepen.io/maxgeldner/pen/rNXYjgX?editors=1010
I have tried exchanging the series in line 75 and 77 and clicking on the displayed columns afterwards in order to hit test them. Clicking on negative columns returns ‘false’ inside the hit test, clicking on positive columns returns ‘true’.
- Johannes Pungier asked 3 months ago
- last active 3 months ago
I’m developing an EEG medical application that has a main chart displaying an interval of sampling values from a EEG recording session. In addition, there is an overview chart displaying sampling values of the entire recording session. The overview chart which is an instance of the SciChartOverview object whose x-axis is bound to the main view.
FYI: A recording sessions typically span several hours (more than 20 hours is common) and thus data-series associated to the main chart contain an interval of the recording session in order to stay within reasonable memory resources.
The application adjust’s the main view’s x-axis visible range limit & visible range size (i.e. visibleRangeLimit & visibleRangeSize) properties based on what is loaded within the main view’s data-series.
Developers that are familiar with the SciChartOverview class, know that this allows users provides users with “grips” in the chart overview allowing them to extend/contract the main axis’ visible range property.
However, the main axis’ visible range properties aren’t being enforced.
In my humble opinion, the SciChartOverview class should restrict users from setting the overview’s “grips” that conflict with the main axis’ visible range limit & visible range size properties.
I’ve review the SciChartOverview & OverviewRangeSelectionModifier class https://www.scichart.com/documentation/js/current/webframe.html#SciChartOverview.html
and there is nothing that is evident that I’ve read that gives my expected behavior of the overview.
I’d appreciate any feedback or insight on this matter before I heading down having to write customized code as to restricting the chart overview’s “grips”.
- Steven Belbin asked 3 months ago
- last active 2 months ago
The chart works ok on date data. But I have weekly data, e.g.
xValues is set to x
yValues is set to y
xl is not used for drawing the chart.
I then get a tooltip that is out of sync with the x axis (see pic).
"a": {
"x": [
1,
2,
3,
4,
5,
6,
7
],
"xl": [
"Mon",
"Tue",
"Wed",
"Thu",
"Fri",
"Sat",
"Sun"
],
"y": [
46.8235294117647,
48.0,
49.34285714285714,
45.05714285714286,
42.114285714285714,
39.55882352941177,
40.970588235294116
]
},
My chart code
const initSciChart = async(series_id, target_element_id, xValues, yValues, zoomOn = false, labels = null) =& gt; {
// Initialize SciChartSurface. Don't forget to await!
const { sciChartSurface, wasmContext } = await SciChartSurface.create(target_element_id, {
theme: new SciChartJsNavyTheme(),
title: series_id,
titleStyle: { fontSize: 22 }
});
// Create an XAxis and YAxis with growBy padding
const growBy = new NumberRange(0.1, 0.1);
let labelProvider = new SmartDateLabelProvider();
if (labels) {
console.log('setting labels');
labelProvider = new TextLabelProvider({
// When passed as an array, labels will be used in order
labels: labels,
});
}
}
const xAxesOptions = {
//axisTitle: "Time",
maxAutoTicks: 10,
minorsPerMajor: 2,
drawMajorGridLines: true,
drawMinorGridLines: true,
axisAlignment: EAxisAlignment.Bottom,
labelProvider: labelProvider,
growBy,
labelStyle: {
alignment: ELabelAlignment.Center, // Auto,
fontFamily: "Arial",
fontSize: 16,
color: "White",
}, // type TTextStyle
};
sciChartSurface.xAxes.add(new CategoryAxis(wasmContext, xAxesOptions));
sciChartSurface.yAxes.add(new NumericAxis(wasmContext, {
//axisTitle: "Counts",
axisAlignment: EAxisAlignment.Right,
autoRange: EAutoRange.Alwags,
growBy
}));
// allow zooming in the x direction
if (zoomOn) {
sciChartSurface.chartModifiers.add(
new MouseWheelZoomModifier({ xyDirection: EXyDirection.XDirection }),
new ZoomPanModifier(),
new ZoomExtentsModifier(),
);
}
// Create a line series with some initial data
let lineSeries = new FastLineRenderableSeries(wasmContext, {
stroke: "steelblue",
strokeThickness: 3,
dataSeries: new XyDataSeries(wasmContext, {
//xValues: [0,1,2,3,4,5,6,7,8,9],
//yValues: [0, 0.0998, 0.1986, 0.2955, 0.3894, 0.4794, 0.5646, 0.6442, 0.7173, 0.7833]
xValues: xValues,
yValues: yValues,
dataIsSortedInX: true,
//dataEvenlySpacedInX: true,
//containsNaN: false
}),
pointMarker: new EllipsePointMarker(wasmContext, { width: 11, height: 11, fill: "#fff" }),
});
lineSeries.rolloverModifierProps.tooltipLabelX = 'Date';
lineSeries.rolloverModifierProps.tooltipLabelY = '';
sciChartSurface.renderableSeries.add(lineSeries);
// Add RolloverModifier behavior
sciChartSurface.chartModifiers.add(new RolloverModifier());
//sciChartSurface.useCommunityLicense();
};
- Anthony Leung asked 3 months ago
- last active 3 months ago