Hello!
I’ve recently been improving our app performance by converting some things from annotations to renderable series. I’ve done this for a custom annotation we used to use and it sped things up tremendously (makes sense, we had 4000+ annotations in one case whereas it’s now down to 40 renderable series).
Now, I’m looking at converting our 2000+ BoxAnnotationViewModel and 2000+ AxisMarkerAnnotationViewModels into 1 renderable series each. I think it’s pretty straightforward to do the boxes through the render context API, but I am failing at my first attempts of drawing the axis markers through a renderable series. The main issue is that I don’t think a renderable can be drawn outside of the viewport like the axis markers would require.
Any ideas or guidance?
Thanks so much,
Matthew
- Matthew Trahan asked 2 days ago
I am trying to bind StrokeDashArray to a property in my ViewModel, which is an enum (Solid, Dash, Dot), using a value converter.
The binding works as expected for HorizontalLineAnnotation, but it does not work for FastLineRenderableSeries or MajorGridLineStyle.
Works
<s:HorizontalLineAnnotation StrokeDashArray="{Binding LineStyle, Converter={StaticResource DashConverter}}" />
<s:FastLineRenderableSeries StrokeDashArray="4,4" />
Does NOT work, always display solid line
<s:FastLineRenderableSeries StrokeDashArray="{Binding LineStyle, Converter={StaticResource DashConverter}}" />
Converter Code
public enum LineStyle { Solid, Dash, Dot }
public class DashConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
Enum.TryParse(value.ToString(), out LineStyle lineStyle);
switch (lineStyle)
{
case LineStyle.Dash:
return new DoubleCollection(new double[] { 4, 4 });
case LineStyle.Dot:
return new DoubleCollection(new double[] { 1, 4 });
}
return new DoubleCollection();//Solid
}
}
- Rachel Shavdron asked 3 days ago
- last active 22 hours ago
Greetings – We are using SciChartJS in our financial application running under Openfin framework.
I would like to inquire if SciChart provides any recommended machine specifications for running such applications on its platform, specifically regarding CPU, core count, GPU, RAM, and other relevant factors.
Additionally, we are interested in understanding any potential performance impacts on SciChart if the machine lacks a GPU.
Best Regards,
Sachin Patel.
- sachin patel asked 3 days ago
- last active 3 days ago
Hi,
When switching intervals, we have an animation set for the price and volume charts. The animation time is 800ms. Unfortunately, when quickly switching between intervals, we encounter two bugs that occur randomly:
- The line chart has an incorrect appearance – it contains data from a different interval: https://ibb.co/S44xqWPG.
- The line chart disappears, and if intervals are switched for a longer period, the line chart disappears completely: https://ibb.co/8D12CcR2.
Here is the project that contains the animations and data on the chart that we use: https://codesandbox.io/p/sandbox/animation-v624lh. It seems that the animations are not being cleared, and the data remains in some buffer. According to the documentation, there doesn’t seem to be a way to stop and/or clear the animations. It should stop when visible = false changes.
Regards
- Dmytro Smirnov asked 1 week ago
- last active 3 days ago
Hi everyone,
I’m working on a multi-pane chart using JavaScript and Next.js based on the SciChart.JS Examples((https://github.com/ABTSoftware/SciChart.JS.Examples/blob/master/Examples/src/components/Examples/Charts2D/CreateStockCharts/MultiPaneStockCharts/drawExample.ts). I’m experiencing an intermittent issue related to double rendering that I haven’t been able to track down.
Issue Details:
• Symptom:
• Before Data Loads: I see a double set of loading spinners.
• After Data Loads: The chart disappears entirely.
• Environment Variability:
• The issue appears to be environment-specific. For example:
• It works as expected in my development Chrome browser.
• In Safari, the chart either doesn’t render or behaves inconsistently.
• The bug occurs in both the deployed version on Vercel and on localhost.
• At one point, a colleague reported it not working in Chrome browser, but later it seemed to work—so the behavior is not consistently reproducible.
Tech Stack:
• Next.js with TypeScript
• Vercel deployment
• SciChart version: “scichart”: “^3.5.711”
• SciChart React version: “scichart-react”: “^0.1.9”
Relevant Code Snippet:
<SciChartReact
initChart={chartsInitializationAPI.drawPriceChart}
style={{ flexBasis: 400, flexGrow: 1, flexShrink: 1 }}
/>
{/* OHLC Chart */}
{/* RSI Chart */}
{/* Z-Score Chart */}
Questions:
1. What could be causing the component to double-render and then eventually make the chart disappear?
2. How can I isolate the cause (e.g., determining if it’s due to React Strict Mode, asynchronous updates, or some other side effect)?
Any insights or suggestions on how to debug and resolve this issue would be greatly appreciated!
Thanks in advance!
- Geunwoo Kim asked 1 week ago
- last active 1 week ago
Hello,
I have an overview where the displayed series max end time stops the overview from viewing all of the data on my main chart. For example, if the dataseries I have displayed on the overview ends at 9AM but I have additional data that spans till 2 PM, I am unable to use the overview to span the full visible range of all of the data on that chart.
In photo 1, you can see that the annotation ends and the overview only goes to the end of the blue annotation labeled 25 in the top chart.
There is additional data after that annotation that can be seen in photo 2. This data is out of range of the overview so the only way to see it is to pan on the chart itself.
How can I have my overview span the full length of my data PLUS extra padding time on the beginning and end of the chart?
I’ve tried to directly set the visibleRange property through the overviewXAxisOptions but that did not seem to do anything.
I am still pretty new to sci-chart so please feel free to let me know if I am missing something obvious!
Thank you,
Preston Truong
- preston truong asked 1 week ago
- last active 3 days ago
Hi Team,
I am getting exception in sticky tooltip behaviour in below scenario , Please help me on this.
Note –
[ Using “SciChart” Version=”8.6.0.28199″ – getting exception]
[ Using “SciChart” Version=”8.3.0.28019″ – No exception]
Scenario – Create two tabbed chart windows. Add a sticky tooltip to one chart, then try switching to the other tab and back again throws exception as object reference not set.
Not sure why? your help would be appreciated.
- Gaurav Srivastava asked 2 weeks ago
- last active 3 days ago
Hello,
I am working on a chart using the MVVM pattern, and I need to allow editing of the properties of a series. I am using LineRenderableSeriesViewModel, and when I modify properties such as Stroke, StrokeThickness, and PointMarker, the changes apply correctly to the series. However, while Stroke and StrokeThickness are reflected in the legend, PointMarker is not.
Is there a way to make PointMarker changes also reflect in the legend?
Attached is a screenshot of the issue where disabling DrawMarker in the CustomPointMarker example affects the series but not the legend’s PointMarker.
Thank you!
- Hyunji Jeon asked 2 weeks ago
Which options should I use 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 2 weeks ago
- last active 1 week 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 3 weeks ago
- last active 19 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 3 weeks ago
- last active 7 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 4 weeks ago
- last active 3 weeks 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 4 weeks ago
- last active 2 weeks 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 4 weeks ago
- last active 4 weeks 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 4 weeks ago
- last active 2 weeks 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 4 weeks ago
- last active 4 weeks 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 4 weeks ago
- last active 4 weeks 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 4 weeks ago
- last active 3 weeks 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 1 month ago
- last active 3 weeks 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 1 month ago
- last active 4 weeks 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 1 month ago
- last active 3 weeks 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 1 month ago
- last active 1 week 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 1 month ago
- last active 4 weeks 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 2 months ago
- last active 3 weeks 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 2 months ago
- last active 1 month 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 2 months ago
- last active 4 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 2 months ago
- last active 1 month 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 2 months 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 2 months ago
- last active 4 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 4 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 2 months 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 2 months 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 2 months 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 1 month 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 3 months ago
- last active 4 days 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 3 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 3 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 3 months ago
- last active 1 month 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 3 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 3 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 3 months ago
- last active 2 months 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 3 months ago
- last active 2 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 3 months ago
- last active 3 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 3 months ago
- last active 3 months ago
Can I integrate the WPF charts in react code to make it web-app compatible?
- Neeraj Mirashi asked 3 months ago
- last active 3 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 3 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