It did not happened all the time. I guess that some GC strategy could cause the error! When an interrupt occurs, it will jump to List.cs. I have checked the code of application and found nothing wrong with it.
Exception Information:
(1)The crash information when Debuging
“System.ArgumentOutOfRangeException” Unhandled exceptions of type System.Private.CoreLib.dll. Happen in “Index was out of range. Must be non-negative and less than the size of the collection.”
(2)the log catched in the running status Before crash
Exception Message: Native collection has been destructed!
Exception Source: SciChart.Charting3D
Exception Line: Client.App.Main()
- chen yl asked 12 hours ago
HI,
I am using Scichart for drawing multiple line series on the same chart.
sciChart Image
video to make it more clear https://youtu.be/O0WiocmldXY , when we have many channels we face a performance issue due to that, and the update rate of the lines become much higher and the responsive of the UI becomes bad.
this kind of graph called segmented graph, what it does it cuts a small portion from other line chart, and draw the data that crosses a specified threshold that the user choose.
we want to draw, up to 100 lines at the same time. each line has 30,000 points.
we assume that the high number of data series causes bad performance.
what can we do, to increase performance? is there a different line series we can use?
- suhib ghreir asked 2 days ago
- last active 18 hours ago
Hello,
I have created a custom “polygon geometry” based on the BaseSceneEntity class. Since it can be any shape, all non-closed shapes like a plane (in 3D space) are only lit from the side from which the normal vector of my triangles points. The other side is pitch black. Is there a way to illuminate both sides when I rotate the shape?
- Roland D asked 1 day ago
- last active 18 hours 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.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?
- John Flemmer asked 2 years ago
- last active 2 days ago
Hi There,
I have 2 FastColumnRenderableSeries, one of which has 4 points and the 2nd has 2 points in dataseries.
Please see the attached image.
Is there a way to make all the columns have the same width ?
Thanks in advance!
-Harut
- Harutyun Tovmasyan asked 1 week ago
- last active 4 days ago
The first question: Where did the example go (link below)?
https://support.scichart.com/support/solutions/articles/101000513349-tutorial-custom-legend-with-color-picker-and-custom-point-markers
I want to do like what and time ago I saved link but now this page is deleted. I need it because it is good example for resolve my 2nd question I think.
And the second question: I have chart
<s:SciChartSurface Grid.Row="0" Grid.Column="0" x:Name="SciChartSurface" Margin="5" Padding="5"
ChartTitle="{mainVM:Localization MainChartSciChartSurface}" RenderableSeries="{s:SeriesBinding RenderableSeries}" Annotations="{s:AnnotationsBinding Annotations}">
<s:SciChartSurface.XAxis>
<s:NumericAxis AxisTitle="{mainVM:Localization XNumericAxis}" VisibleRange="{Binding VisibleRangeXAxis, Mode=TwoWay}" />
</s:SciChartSurface.XAxis>
<s:SciChartSurface.YAxis>
<s:NumericAxis GrowBy="0.1,0.1"
AxisTitle="{mainVM:Localization YNumericAxis}" VisibleRange="{Binding VisibleRangeYAxis, Mode=TwoWay}" AutoRange="{Binding IsStaticYAxis, Converter={StaticResource StaticAxisToSciChartAutoRangeConverter}}" />
</s:SciChartSurface.YAxis>
<s:SciChartSurface.ChartModifier>
<s:ModifierGroup>
<s:SeriesValueModifier />
<s:CursorModifier IsEnabled="{Binding IsShowValuesCursor}" />
<s:LegendModifier x:Name="SciChartLegendModifier" GetLegendDataFor="AllSeries" ShowLegend="False"
SeriesData="{Binding SeriesData, Mode=TwoWay}" />
</s:ModifierGroup>
</s:SciChartSurface.ChartModifier>
</s:SciChartSurface>
Legend of chart placed in another panel
<s:SciChartLegend x:Name="SciChartLegendControl" s:ThemeManager.Theme="Chrome" Margin="5,5" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto"
LegendData="{Binding SeriesData, Mode=OneWay}" ShowVisibilityCheckboxes="True" />
SeriesData is
private ChartDataObject _seriesData;
public ChartDataObject SeriesData
{
get => _seriesData;
set => SetProperty(ref _seriesData, value, nameof(SeriesData));
}
I want to see chart values in additional fields near the chart. I made this
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<ListView Grid.Column="0" x:Name="ChartsListView" BorderBrush="Transparent" ItemContainerStyle="{StaticResource ListViewItemContainerDefaultStyle}"
ItemsSource="{Binding SeriesData.SeriesInfo}">
<ListView.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Style="{StaticResource LabelDefaultStyle}"
Content="{Binding SeriesName}" Visibility="{Binding IsVisible, Converter={StaticResource BooleanToVisibilityConverter}}" />
<Label Grid.Column="1" Style="{StaticResource LabelIndicatorStyle}"
Content="{Binding YValue}" />
</Grid>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Grid>
All working correctly. But I want to bind Legend visibility checkboxes to my custom controls for values: when I uncheck chart checkbox control bound to this chart must becomes invisible. In code above I write
Visibility="{Binding IsVisible, Converter={StaticResource BooleanToVisibilityConverter}}"
but it not worked. How can I make it like I want?
And 3rd question: how can I guarantee the order of SeriesData lines? I have to be sure that charts in legend and custom controls ordered in the same ordering
- Fedor Iudin asked 2 weeks ago
- last active 4 days 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.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?
- Aysan Afrand asked 8 years ago
- last active 5 days ago
I am using a GradientColorPalette to apply a color mapping to a WaterfallRenderableSeries3D. It appears that the gradient positions determined by GradientColorPalette are dynamically set based on the maximum and minimum value displayed on the chart.
I would like the gradient positions to be determined by a static value, similar to how setting the “Minimum” and “Maximum” properties of a HeatmapColorPalette class works.
Is there a way to do this using GradientColorPalette?
Thanks
- Cole Bagshaw asked 1 week ago
Hi,
When I created the FastBandRenderableSeries type, I encountered an aliasing problem. When I used AntiAliasing, it still didn’t work.
There is an example of used code:
List<double> xData = GetData("D:\\x.txt");
List<double> yData = GetData("D:\\y.txt");
List<double> y1Data = GetData("D:\\y1.txt");
XyyDataSeries<double, double> splineBanDataSeries = new XyyDataSeries<double, double>();
splineBanDataSeries.Append(xData, yData, y1Data);
var bandSeries = new FastBandRenderableSeries()
{
DataSeries = splineBanDataSeries,
//Name = id,
StrokeThickness = 1,
Fill = Colors.Transparent,
FillY1 = Colors.Transparent,
StrokeY1 = Colors.LightGray,
AntiAliasing = true,
StrokeDashArrayY1 = new double[] { 5, 1 }
};
sciChart.RenderableSeries.Add(bandSeries);
sciChart.ZoomExtents();
Is there any way to correct this error?
Thank you.
- li xiaohang asked 1 week ago
- last active 1 week ago
Hi,
I know that when I use MouseWheelZoomModifier with my chart surface, the default behavior is:
1. On mouse wheel (No keyboard mod) – Zoom according to the “ActionType” propery, and direction according to the “XYDirection” property.
2. On mouse wheel + CTRL – X-Axis pan
3. On mouse wheel + Shift – Y-Axis pan
I want to achieve this behavior:
1. On mouse wheel (No keyboard mod) – Zoom according to the “ActionType” propery, and direction according to the “XYDirection” property.
2. On mouse wheel + CTRL – XY-Axis Zoom
3. On mouse wheel + Shift – Y-Axis Zoom
Any idea how to achieve this behavior?
Thanks, Ben.
- Ben Mendel asked 3 weeks ago
- last active 2 weeks 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.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?
- Lawson McWhorter asked 2 months ago
- last active 2 weeks ago
Hello,
I have issues when I want to apply a custom CustomPolygonRenderableSeries.
For implementation it was used sci-chart documentation from
enter link description here
enter link description here
It takes a while to show just 10000 polygons from 40000 points! When I tried to slide or zoom main window it got some freezes for 1-1.5 seconds. The main problem is in redrawing several times(protected override void Draw). There is an example of used code:
public class CustomPolygonRenderableSeries : CustomRenderableSeries
{
protected override void Draw(IRenderContext2D renderContext, IRenderPassData renderPassData)
{
var dataPointSeries = renderPassData.PointSeries as XyzPointSeries;
if (dataPointSeries == null) return;
if (dataPointSeries.XValues.All(double.IsNaN)) return;
var xCalc = renderPassData.XCoordinateCalculator;
var yCalc = renderPassData.YCoordinateCalculator;
// try to filter some polygons by visible range
var xVisibleRange = XAxis.VisibleRange;
var yVisibleRange = YAxis.VisibleRange;
var points = new Point[4];
var step = 4;
for (var index = 0; index < dataPointSeries.Count; index += step)
{
if (!xVisibleRange.IsValueWithinRange(dataPointSeries.XValues[index + 3]) ||
!yVisibleRange.IsValueWithinRange(dataPointSeries.YValues[index + 3])) continue;
for (int i = 0; i < step; ++i)
{
points[i].X = xCalc.GetCoordinate(dataPointSeries.XValues[index + i]);
points[i].Y = yCalc.GetCoordinate(dataPointSeries.YValues[index + i]);
}
var intColor = (int)dataPointSeries.ZPoints[index];
var color = System.Drawing.Color.FromArgb(intColor).ToMediaColor();
var brush = new SolidColorBrush(color);
using var sBrush = renderContext.CreateBrush(brush, Opacity);
renderContext.FillPolygon(sBrush, points);
}
}
}
public class CustomPolygonRenderableSeriesViewModel : BaseRenderableSeriesViewModel
{
public override Type ViewType => typeof(CustomPolygonRenderableSeries);
}
Is this a known performance issue? Is there some way to by-pass it?
Thank you.
Sincerely, Roman
- Raman Sharkovich asked 2 weeks ago
- last active 2 weeks ago
Hello SciChart Community,
I am currently working on a Windows Forms C# application where I need to visualize a 2D byte array (A[MxN]) on a 3D chart using SciChart. However, I’m facing some difficulties in achieving this task.
My goal is to display the contents of the byte array A on a 3D surface plot or another suitable 3D chart type provided by SciChart. Each byte value in the array represents some intensity or elevation value.
I have explored the documentation and examples provided by SciChart, but I couldn’t find specific guidance on how to achieve this.
Could you please provide some assistance or guidance on how I can achieve this visualization using SciChart in a Windows Forms C# application? Any code snippets, examples, or documentation references would be greatly appreciated.
Thank you in advance for your help.
Best regards,
Namblue73.
- Mr Nha asked 2 weeks ago
- last active 2 weeks ago
If there is a ChartModifier on the SciChart Surface, the Focus moves to the chart just by moving the mouse up without clicking the mouse.
The v6.2.0.13254 version does not have this problem, but the v8.0.0.27737 version does.
You can see that the focus is moving just by moving the mouse through the video.
How can i solve it?
- JONGBOG JOUNG asked 3 weeks ago
- last active 3 weeks 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.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?
- Mohamed Ben Amar asked 2 months ago
- last active 3 weeks ago
We’re allowing our users to place down annotations on the chart with an annotation creation modifier. One of these annotations is a Text annotation.
We then allow users to save these annotations into our own proprietary file format and load them back in with the chart data. To do this we iterate through the AnnotationCollection of the chart and parse the SciChart annotations to data we save to our files.
To save the content of the text for the TextAnnotation we read the TextAnnotation.Text property. However, we’ve noticed that this property is not set until the annotation has lost focus (we click away from the annotation somewhere else on the chart). If we save the annotation before we click away from it, we do not get the current text from the TextAnnotation.Text property.
The process to reproduce this is:
1. Place down a TextAnnotation.
2. Edit the TextAnnotation content. Do not click away from the text so to annotation remains in “Editing” mode
3. Save the data.
4. As we’re saving we read the TextAnnotation.Text property to save to our file. However, the TextAnnotation.Text property returns a blank string because its still being edited.
Is there a way from within our code that we can finish the editing of the text annotation, so that when we get the TextAnnotation.Text property it is the current text the user typed in? Or is there a way to get the current text within the TextAnnotation without finishing the editing or changing the focus?
- Jamie Agate asked 1 month ago
- last active 3 weeks ago
<s:SciChartSurface x:Name="U_DataChart"
Grid.Row="0"
Margin="20"
s:ThemeManager.Theme="BrightSpark"
Background="{StaticResource BackColorBrush}"
BorderBrush="{Binding BorderColor}"
BorderThickness="{Binding BorderThinkness}"
MouseDoubleClick="U_DataChart_MouseDoubleClick"
MouseLeftButtonDown="U_DataChart_MouseLeftButtonDown"
Style="{StaticResource SciChartSurfaceStyle}">
<s:SciChartSurface.XAxes>
<s:NumericAxis x:Name="xAxis"
Margin="0,10,0,0"
Padding="0,0,0,0"
AxisTitle="{Binding XAxisTitle}"
DrawMajorBands="False"
DrawMajorGridLines="False"
DrawMajorTicks="False"
Id="WaveRange"
Style="{StaticResource AxisStyle}"
VisibleRangeLimitMode="MinMax">
<s:NumericAxis.TickLabelStyle>
<Style TargetType="s:DefaultTickLabel">
<Setter Property="Foreground" Value="{StaticResource FontColorGrayBrush}" />
<Setter Property="FontSize" Value="25" />
</Style>
</s:NumericAxis.TickLabelStyle>
<s:NumericAxis.TitleStyle>
<Style TargetType="s:AxisTitle">
<Setter Property="Foreground" Value="{StaticResource FontColorGrayBrush}" />
<Setter Property="FontSize" Value="25" />
</Style>
</s:NumericAxis.TitleStyle>
</s:NumericAxis>
</s:SciChartSurface.XAxes>
<s:SciChartSurface.YAxes>
<s:NumericAxis x:Name="yAxis"
Margin="0,0,0,0"
Padding="0,0,0,0"
AxisAlignment="Left"
AxisTitle="{Binding YAxisTitle}"
DrawMajorBands="False"
DrawMajorTicks="False"
Id="ValueRange"
Style="{StaticResource AxisStyle}"
VisibleRangeLimitMode="MinMax">
<s:NumericAxis.TickLabelStyle>
<Style TargetType="s:DefaultTickLabel">
<Setter Property="Foreground" Value="{StaticResource FontColorGrayBrush}" />
<Setter Property="FontSize" Value="25" />
</Style>
</s:NumericAxis.TickLabelStyle>
<s:NumericAxis.TitleStyle>
<Style TargetType="s:AxisTitle">
<Setter Property="Foreground" Value="{StaticResource FontColorGrayBrush}" />
<Setter Property="FontSize" Value="25" />
</Style>
</s:NumericAxis.TitleStyle>
</s:NumericAxis>
</s:SciChartSurface.YAxes>
<s:SciChartSurface.ChartModifier>
<s:ModifierGroup x:Name="U_ChartModifier" />
</s:SciChartSurface.ChartModifier>
</s:SciChartSurface>
<!--<s:SciChartOverview Grid.Row="1"
Height="100"
Margin="20,0,20,10"
Padding="0,0,0,0"
s:ThemeManager.Theme="BrightSpark"
Background="{StaticResource BackColorBrush}"
BorderBrush="{Binding BorderColor}"
BorderThickness="1"
DataSeries="{Binding ElementName=m_view, Path=U_DataChart.RenderableSeries}"
ParentSurface="{Binding Source={x:Reference Name=U_DataChart}}"
SelectedRange="{Binding Source={x:Reference Name=U_DataChart}, Path=XAxis.VisibleRange, Mode=TwoWay}"
Visibility="{Binding OverViewVisibility}" />-->
<!-- DataSeries="{Binding Source={x:Reference Name=U_DataChart}, Path=RenderableSeries}" -->
<s:SciChartSurface x:Name="OverviewSurface"
Grid.Row="1"
Height="100"
Margin="20,0,20,10"
Padding="0,0,0,0"
s:ThemeManager.Theme="BrightSpark"
Background="{StaticResource BackColorBrush}"
BorderBrush="{Binding BorderColor}"
BorderThickness="1"
Style="{StaticResource SciChartSurfaceStyle}"
Visibility="{Binding OverViewVisibility}">
<!--<s:SciChartSurface.RenderableSeries>
<s:FastLineRenderableSeries DataSeries="{Binding Path=Series}" />
</s:SciChartSurface.RenderableSeries>-->
<s:SciChartSurface.XAxis>
<s:NumericAxis DrawMajorGridLines="False"
DrawMinorGridLines="False"
Style="{StaticResource AxisStyle}"
Visibility="Collapsed" />
</s:SciChartSurface.XAxis>
<s:SciChartSurface.YAxis>
<s:NumericAxis DrawMajorGridLines="False"
DrawMinorGridLines="False"
Style="{StaticResource AxisStyle}"
Visibility="Collapsed" />
</s:SciChartSurface.YAxis>
</s:SciChartSurface>
<s:SciChartScrollbar Grid.Row="1"
Height="100"
Margin="20,0,20,10"
Axis="{Binding Source={x:Reference Name=xAxis}}"
Background="Transparent"
BorderThickness="{Binding BorderThinkness}"
Visibility="{Binding OverViewVisibility}" />
Viewmodel.cs
public ObservableCollection<IRenderableSeries> Series
{
get
{
return m_view.U_DataChart.RenderableSeries;
}
set
{
m_view.U_DataChart.RenderableSeries = value;
OnPropertyChanged(nameof(Series));
}
}
private void UpdateChartEvent(Point p_well, ObservableCollection<MeasureDataSt> p_data, PlateSetting p_ps)
{
if (p_data.Count == 0)
{
this.SCIChartControlVM.ClearChart();
return;
}
this.SCIChartControlVM.ClearChart();
{
ObservableCollection<(double, double)> tempData = new ObservableCollection<(double, double)>();
foreach (MeasureDataSt sample in p_data)
tempData.Add((sample.Wave, sample.Intensity));
var Color = Application.Current.FindResource("ChartInitSeriesBrush") as Brush;
var Series = SCIChartSeries.SetChartDataForScatterLine(tempData, this.SCIChartControlVM.GetXAxis, this.SCIChartControlVM.GetYAxis,
ref this.SCIChartControlVM.FixedColorIndex, Color);
this.SCIChartControlVM.Series.Add(Series);
if (this.SCIChartControlVM.Series.LastOrDefault().DataSeries is XyDataSeries<double, double> data)
{
var AnnoColor = Application.Current.FindResource("ChartHZLineAnnotation") as Brush;
this.SCIChartControlVM.AddHorizontalLineAnnotation(data.YValues.Max(), Brushes.White, AnnoColor, false, true);
}
}
this.SCIChartControlVM.CalibrationChart();
}
I am manually adding series to the m_view.U_DataChart.RenderableSeries collection. I would like to directly bind m_view.U_DataChart.RenderableSeries to SciChartSurface (x:Name=”OverviewSurface”). I understand that using IRenderableSeriesViewModel for binding from the beginning would have been the correct approach, but it’s too late for major modifications at this point. Therefore, I have no choice but to pursue this method.
Is there a way to accomplish this?
- jeong younghoon asked 4 weeks ago
- last active 4 weeks ago
Hi!
I have next error crash in my desktop app:
Application: DRYERRPP.NET.exe
CoreCLR Version: 8.0.123.58001
.NET Version: 8.0.1
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Stack:
at ukt.aafs(System.Runtime.InteropServices.HandleRef)
at ukt.aafs(System.Runtime.InteropServices.HandleRef)
at SciChart.Charting2D.Interop.TSRWPFTarget.ResolveFinalImage()
at nki.ysm()
at naj.nmo(nkf, SciChart.Charting2D.Interop.SCRTRenderContext)
at nkk.Dispose()
at SciChart.Charting.Visuals.SciChartSurface.DoDrawingLoop()
at SciChart.Charting.Visuals.SciChartSurface.ses(System.Object, SciChart.Drawing.Common.DrawEventArgs)
at SciChart.Drawing.Common.RenderSurfaceBase.OnDraw()
at SciChart.Drawing.Common.RenderSurfaceBase.OnRenderTimeElapsed()
at SciChart.Drawing.Common.RenderTimer.nqv()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(System.Object)
at System.Windows.Media.MediaContext.RenderMessageHandler(System.Object)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
at System.Windows.Application.RunDispatcher(System.Object)
at System.Windows.Application.RunInternal(System.Windows.Window)
at DRYERRPP.NET.App.Main()
Can somebody help me?
- Gera Daniloff asked 4 weeks ago
Hi there,
Here is my xaml setting :
<s:SciStockChart.XAxisStyle>
<Style TargetType="s:CategoryDateTimeAxis">
<Setter Property="VisibleRange" Value="{Binding ParentViewModel.XRange}" />
<Setter Property="AutoRange" Value="{Binding ParentViewModel.AutoRangeX}"/>
</Style>
</s:SciStockChart.XAxisStyle>
And I also set, XRange = new IndexRange(0, 9), AutoRangeX = AutoRange.Never, but the chart show like image, always has gap there.
What should I do?
- CHIA CHUN TANG asked 1 month ago
- last active 4 weeks ago
Hi,
we recently updated SciChart to 8.3.0.28019 and now we got an issue with double y axis title.
They should only be on the left side. Any ideas what could have caused this? I have also attached the definition of the axis, hopefully this helps.
vm.YAxes.Add(new NumericAxisViewModel
{
Id = YNumericAxis,
StyleKey = YAxisStyleKey,
AxisTitle = vm.YAxisTitle,
FontSize = groupViewOptions.AxisLabelFontSize,
TitleFontSize = groupViewOptions.AxisTitleFontSize,
DrawMinorGridLines = false,
DrawLabels = true,
CursorTextFormatting = "0.###",
TextFormatting = "0.########"
});
vm.YAxes.Add(new LogarithmicNumericAxisViewModel()
{
Id = YLogAxis,
StyleKey = YAxisStyleKey,
AxisTitle = vm.YAxisTitle,
FontSize = groupViewOptions.AxisLabelFontSize,
TitleFontSize = groupViewOptions.AxisTitleFontSize,
DrawMinorGridLines = false,
DrawLabels = true,
TextFormatting = "0.0###E0",
CursorTextFormatting = "0.000E0",
EnableHighPrecisionTicks = groupViewOptions.EnableHighPrecisionTicks
});
Yes, there are two axis’s defined and if I try to change the visibility of the one that is active, both axis title’s disappear. What do you think could be the cause of this? I did some research thru the structure and didn’t have any luck.
Thanks in advance.
Boštjan
- Boštjan Arzenšek asked 1 month ago
- last active 1 month ago
Hi,
I want to get the currently selected series like isCheckedChangedCallback in js. But there is no similar method in the documentation, how should I implement this function.
- yu dexiu asked 1 month ago
- last active 1 month 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.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?
- Ben Green asked 2 months ago
- last active 1 month 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.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?
- Simone Russo asked 2 months ago
- last active 1 month ago
Hi,
I am currently facing an issue related to our implementation.
We want the graph to zoom in whenever the user drags the y-axis upward, and conversely, zoom out when the user drags the y-axis downward. Importantly, this behavior should remain consistent regardless of whether the user drags the graph from the positive or negative side.
- Ziv Tziyonit asked 2 months ago
- last active 2 months ago
Previously I used AnnotationCreationModifier and my custom annotations were added by one left button mouse click on the chart surface (the annotation was added to the collection and the event handler “AnnotationCreated” fired). Now I’m trying to switch to using the mvvm pattern and I have problems adding my custom annotations using AnnotationCreationModifierMVVM.
Now it works like this:
1) I click (mouse left button) on the chart surface to add an annotation and it is added to the collection and displayed.
2) I click on the chart surface again, and only after that the event handler “AnnotationCreated” is called.
If I carry out some external manipulations with the added annotation between first and second click (for example, moving to the given coordinates by the button click), annotation moved, but when I hover the mouse over the chart surface, it returns to it’s original position. And this behavior will be until I click again on the chart surface so that the event handler “AnnotationCreated” is called.
The built-in annotations work fine though (for examle, VerticalLineAnnotationViewModel or HorizontalLineAnnotationViewModel are successfully added to the collection and call the event handler “AnnotationCreated” by one click on chart surface).
Is it possible to somehow fix this behavior of the custom annotation so that it is added to the collection and triggers an event “AnnotationCreated” for one click on the chart surface, as was the case with AnnotationCreationModifier? I am attaching an example code:
MainWindow.xaml
<Window x:Class="WpfAppMvvm.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:s="http://schemas.abtsoftware.co.uk/scichart"
xmlns:ext="http://schemas.abtsoftware.co.uk/scichart/exampleExternals"
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:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Grid>
<s:SciChartSurface Annotations="{s:AnnotationsBinding Annotations}">
<s:SciChartSurface.XAxis>
<s:NumericAxis AxisTitle="X"/>
</s:SciChartSurface.XAxis>
<s:SciChartSurface.YAxis>
<s:NumericAxis AxisAlignment="Left" AxisTitle="Y"/>
</s:SciChartSurface.YAxis>
<s:SciChartSurface.ChartModifier>
<s:ModifierGroup>
<s:AnnotationCreationModifierMVVM IsEnabled="True" AnnotationViewModelsCollection="{Binding Annotations}" AnnotationViewModelType="{Binding AnnotationType}">
<i:Interaction.Behaviors>
<ext:EventToCommandBehavior Command="{Binding AnnotationCreatedCommand}" Event="AnnotationCreated" PassArguments="True"/>
</i:Interaction.Behaviors>
</s:AnnotationCreationModifierMVVM>
</s:ModifierGroup>
</s:SciChartSurface.ChartModifier>
</s:SciChartSurface>
</Grid>
MainWindow.xaml.cs
using System.Windows;
namespace WpfAppMvvm
{
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
DataContext = new MainWindowViewModel();
}
}
}
MainWindowViewModel.cs
using SciChart.Charting.ChartModifiers;
using SciChart.Charting.Common.Helpers;
using SciChart.Charting.Model.ChartSeries;
using SciChart.Examples.ExternalDependencies.Common;
using System;
using System.Collections.ObjectModel;
using System.Windows;
namespace WpfAppMvvm
{
internal class MainWindowViewModel:BaseViewModel
{
public ObservableCollection<IAnnotationViewModel> Annotations { get; private set; }
public Type AnnotationType { get; private set; }
public ActionCommand<AnnotationCreationMVVMArgs> AnnotationCreatedCommand { get; private set; }
public MainWindowViewModel()
{
Annotations = new ObservableCollection<IAnnotationViewModel>();
AnnotationType = typeof(MyCustomAnnotationViewModel);
AnnotationCreatedCommand = new ActionCommand<AnnotationCreationMVVMArgs>(ExecCmd, e => true);
}
private void ExecCmd(AnnotationCreationMVVMArgs e)
{
MessageBox.Show("OnAnnotationCreated executed");
}
}
}
MyCustomAnnotation.xaml
<s:CustomAnnotationForMvvm x:Class="WpfAppMvvm.MyCustomAnnotation"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
xmlns:s="http://schemas.abtsoftware.co.uk/scichart"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
<Ellipse
Width="20"
Height="20"
Fill="Transparent"
Stroke="Red"
StrokeThickness="3"
/>
</Grid>
MyCustomAnnotation.xaml.cs
using SciChart.Charting.Visuals.Annotations;
namespace WpfAppMvvm
{
public partial class MyCustomAnnotation : CustomAnnotationForMvvm
{
public MyCustomAnnotation()
{
InitializeComponent();
}
}
}
MyCustomAnnotationViewModel.cs
using SciChart.Charting.Model.ChartSeries;
using System;
namespace WpfAppMvvm
{
public class MyCustomAnnotationViewModel:CustomAnnotationViewModel
{
public override Type ViewType => typeof(MyCustomAnnotation);
}
}
- Maksim Rumyantsev asked 1 year ago
- last active 2 months ago
Hi,
I feel this should be obvious but I cannot find the answer in the docs. I have multiple Y axis and I want all of them to start at 0 and autoRange only the max value. Also, the zooming should not be affected, it should have normal behavior. I just want the axis to go from 0 to auto max value when we call ZoomExtents(). The default behavior of the ZoomExtents() is auto min value to auto max value.
Is there any way we can achieve this with SciChart?
Thank you,
Alex
- Alexandru Neamtu asked 2 months ago
- last active 2 months ago
Hello all,
I am trying to create multiple Y axes using below example. I am not able to render the left Y axis as per the data series. Any input would help fixing this issue. Please see the attached screenshot.
Thanks.
Naveen
- Naveen Mandava asked 2 years ago
- last active 2 months ago
Hello,
I have two questions regarding implementing annotations in MVVM:
I’m currently using the MeasureXYAnnotation as demonstrated in an example, and it works well in the code-behind using the CompositeAnnotation class. However, when trying to implement this in MVVM with CompositeAnnotationViewModel, I’ve noticed that the Update method is missing. This omission prevents me from dynamically updating the measures. Is there a way to achieve the same dynamic behavior in MVVM as in code-behind? If so, could you please guide me on how to do it?
My second question is about the BrushAnnotationViewModel, which I’ve seen used in the trade annotation example. Is this ViewModel exclusive to trade charts, or can it be applied to XYCharts as well?
Thank you,
Best Regards
- Nicolas MARTINEZ asked 4 months ago
- last active 2 months ago
Hello.
I’d checked examples from your Demo ‘SciChart.Examples.Demo’ and looks like the example “SciChart.Examples.Examples.CreateRealtimeChart.UsingSeriesValueModifier” is applicable for me because I need functionality like this.
But as I understand Legend as LegendModifier component is a part of chart and it ‘know’ about chart data and can manipulate layout of it. In my application I want to have chart settings not in chart layout but in separate part of application. Can I bind chart settings with my custom controls? At start I want to set visibility for chart series which created in code
private XyDataSeries<double, double> _lineDataDiameter1;
private XyDataSeries<double, double> _lineDataDiameter2;
private XyDataSeries<double, double> _lineDataCovering1;
private XyDataSeries<double, double> _lineDataCovering2;
private XyDataSeries<double, double> _lineDataCovering3;
private void InitCharts()
{ // TODO names and color maybe make as settings
_lineDataDiameter1 = InitChart(new InitChartRequest() { ChartName = CHART_NAME_DIAMETER_1, LineColor = Colors.OrangeRed, ChartStyle = CHART_LINE_STYLE, LineThickness = CHART_LINE_THICKNESS });
_lineDataDiameter2 = InitChart(new InitChartRequest() { ChartName = CHART_NAME_DIAMETER_2, LineColor = Colors.BlueViolet, ChartStyle = CHART_LINE_STYLE, LineThickness = CHART_LINE_THICKNESS });
_lineDataCovering1 = InitChart(new InitChartRequest() { ChartName = CHART_NAME_COVERING_1, LineColor = Colors.LimeGreen, ChartStyle = CHART_LINE_STYLE, LineThickness = CHART_LINE_THICKNESS });
_lineDataCovering2 = InitChart(new InitChartRequest() { ChartName = CHART_NAME_COVERING_2, LineColor = Colors.DeepSkyBlue, ChartStyle = CHART_LINE_STYLE, LineThickness = CHART_LINE_THICKNESS });
_lineDataCovering3 = InitChart(new InitChartRequest() { ChartName = CHART_NAME_COVERING_3, LineColor = Colors.White, ChartStyle = CHART_LINE_STYLE, LineThickness = CHART_LINE_THICKNESS });
}
private XyDataSeries<double, double> InitChart(InitChartRequest request)
{
XyDataSeries<double, double> lineData = new()
{
SeriesName = request.ChartName,
};
RenderableSeries.Add(new LineRenderableSeriesViewModel()
{
StrokeThickness = request.LineThickness,
Stroke = request.LineColor,
DataSeries = lineData,
StyleKey = request.ChartStyle,
});
return lineData;
}
And additional little question. How can I make CursorModifier visible or not?
<s:SciChartSurface.ChartModifier>
<s:ModifierGroup>
<s:SeriesValueModifier/>
<s:CursorModifier/>
</s:ModifierGroup>
</s:SciChartSurface.ChartModifier>
Even if I make it like this
<s:SciChartSurface.ChartModifier>
<s:ModifierGroup>
<s:SeriesValueModifier/>
<s:CursorModifier Visibility="Hidden"/>
</s:ModifierGroup>
</s:SciChartSurface.ChartModifier>
I see it
- Fedor Iudin asked 3 months ago
- last active 2 months ago
We’re working on a Nyquist plot using the latest SciChart SDK for WPF.
We have quite a MVVM dependent structure already in place.
We are working with 3D frequency based Complex data. The Nyquist plot would have 2 axes – Y for Imaginary values and X axis for Real values. We apply some averaging and post-processing of the 3D data to put in 2D form and show it in the Nyquist plot.
However, we’d like to be able to scroll the data at certain frequency ranges without showing the actual frequency graph in the plot. Is there a possibility to implement an independent scrollbar containing a averaged magnitude graph (similar idea to the processing of the Nyquist data) over a frequency range? We’d like to scroll this frequency range and on selected range changed to recalculate data in the Nyquist plot.
We have quite an extensive graphing structure implemented already. The main issue I’m currently facing is that the scrollbar is bound to the SciChartSurface and I cannot seem to figure out how to build it more like a “sexy” frequency range selector while staying within the SciChart library? Is there any possibility to not be bound to the SciChartSurface? And of course, the axes are quite different – in the Nyquist we have linear real and imaginary values (-2 to +2, for example) whereas the frequency range would extend much further data-wise (0 – 3000 Hz, for example).
Any help would be appreciated. Feel free to ask for more details.
- Kaloyan Krastev asked 9 months ago
- last active 2 months ago
Hello,
I’m attempting to build one of the WPF examples on a machine that has no internet access. I get the error mentioned in the title. When I exported the project, I selected the “Installation Folder” option rather than the “NuGet Package”.
How can I fix this error?
Thanks, Brett S.
- Brett Stahlman asked 2 months ago
- last active 2 months ago
Hi,
I would like to use the UniformXyDataSeries because I have different Y values that are equidistant in time. I then assumed that I could use UniformXyDataSeries when X values are equidistant. I created an object of type UniformXyDataSeries but this class expects the XStart and XStep to be double values. I would like to provide TimeSpan values instead of double values. Is there any class that lets us have this setup (uniform data series with Y being double values and X equidistant TimeSpan values)?
Now, if I create a UniformXyDataSeries and provide XStep to be 0.0001 (double value) seconds and set the X axis being a TimeSpanAxis, the chart will not be rendered because it is saying it cannot convert the double value of XStep into a TimeSpan.
Thank you!
Alex
- Alexandru Neamtu asked 2 months ago
- last active 2 months ago
I have a 3D surface chart.
I programmatically add some custom entities derived from BaseSceneEntity, invoked by a user action on some other part of my UI.
When I add the items, to get the screen to refresh I use this loop after adding a number of entities:
foreach(var item in _zone_items)
{
item.InvalidateScene();
}
_zone_items is a List holding the custom entities which have been added to the chart using
MainSurfaceChart.Viewport3D.RootEntity.Children.Add(cube);
This works fine, and even if I have removed some items from the _zone_items list, the screen still refreshes correctly and shows only the current items in _zone_items (and in RootEntity.Children)
The problem I have is when I remove all items from _zone_items. When I do this I use this loop:
foreach (var item in _zone_items)
{
MainSurfaceChart.Viewport3D.RootEntity.Children.Remove(item);
}
_zone_items.Clear();
(I use Remove(item) rather than Clear as in future I may have other entities which are not in _zone_items).
but now I have no way to refresh the screen as I have no entities to call InvalidateScene(). If I touch the mouse on the chart surface and move just slightly it re-renders and the entities are not re-drawn – so they have been removed.
How can I get the chart to refresh/re-render so as to remove the entities which are no longer in the RootEntity.Children? I would have hoped removing them from Children would remove them from the screen?
Thanks
Andrew M
- Andrew Milford asked 2 months ago
- last active 2 months ago
I am currently using the ImpulseRenderableSeries3D chart for dynamic data plotting, but I’ve encountered an issue where the data points are sometimes being plotted outside the axis boundaries. I have attached an image to illustrate the problem. Could you please assist me in addressing this issue?
Thank you
- Ammar Khan asked 3 months ago
- last active 2 months ago
Hi everyone,
I have a chart with a ZoomPanModifier that allows to pan over the X axis only, what I’d like to accomplish is to append more data when the user reaches the max value of the axis while panning.
Is there an event to bind to a command or some other way to do something like this in MVVM?
I’d like to avoid using visible range events and only have this behaviour while panning if possible.
Thanks a lot,
Marco
- Marco Bilardi asked 2 months ago
- last active 2 months ago
I have a SciChartLegend below my chart that was using the default item template in v6.4, and I could change the color of my legend labels simply by setting the Foreground property of the SciChartLegend. However, when I updated to SciChart 6.5.1, the font of my legend labels changed to all black. If I investigate my UI using Snoop, I see the following Binding error on the TextBlock.Foreground property for one of my legend items:
System.Windows.Data Error: 4 : Cannot find source for binding with reference ‘RelativeSource FindAncestor, AncestorType=’SciChart.Charting.Visuals.RenderableSeries.LegendPlaceholder’, AncestorLevel=’1”. BindingExpression:Path=Foreground; DataItem=null; target element is ‘TextBlock’ (Name=”); target property is ‘Foreground’ (type ‘Brush’)
I also tried v6.5.0, and this behavior did not occur – it is new in v6.5.1
Below is the definition of my legend.
<s:SciChartLegend x:Name="legend"
LegendData="{Binding ElementName=LegendModifier, Path=LegendData}"
Orientation="Horizontal"
BorderBrush="White"
FontSize="14"
BorderThickness="1"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
ShowVisibilityCheckboxes="True">
<s:SciChartLegend.ItemsPanel>
<ItemsPanelTemplate>
<chartUtils:UniformWrapPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</s:SciChartLegend.ItemsPanel>
</s:SciChartLegend>
- Brandon Dybala asked 2 years ago
- last active 2 months ago
Hi
I recently updated my SciChart license previously was using 6.3.0 but now using 8.3.0. Without changing any code other than the SetRuntimeLicenseKey I noticed a bunch of binding errors.
Warning 4 null Foreground TextBlock.Foreground Brush Cannot find source: RelativeSource FindAncestor, AncestorType=’SciChart.Charting.Visuals.RenderableSeries.LegendPlaceholder’, AncestorLevel=’1′.
Code below:
<SciChart:SciChartLegend
HorizontalAlignment="Left"
VerticalAlignment="Top"
LegendData="{Binding LegendData, ElementName=mainLegend}"
ShowVisibilityCheckboxes="True">
<SciChart:SciChartLegend.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel ItemWidth="150" Orientation="Horizontal" />
</ItemsPanelTemplate>
</SciChart:SciChartLegend.ItemsPanel>
Searching for same problem I noticed someone else had exactly the same issue with an earlier version. This was addressed at the time with an update. Wondered if the issue had creeped back in?
- Miles Merckel asked 2 months ago
When using an ObservableCollection of IAnnotationViewModel for Annotations I can add Custom annotations (using CustomAnnotationForMvvm) but not been able to use CompositeAnnotationForMvvm in my view.
I have seen the MeasureXAnnotation example in SciChart_CompositeAnnotations but that is not using mvvm pattern.
MyCompositeAnnotation View
<s:CompositeAnnotationForMvvm x:Class="MyCompositeAnnotation"
s:CompositeAnnotationForMvvm.Annotations>
<s:LineAnnotationForMvvm X1="0.5"
X2="0"
Y1="0.5"
Y2="0.5"
CoordinateMode = "Relative"
DragDirections = "XYDirection"
ResizeDirections = "XDirection"
StrokeThickness = "1"
Stroke ="White"
IsEditable = "False"/>
MyCompositeAnnotation view Behind code
public partial class MyCompositeAnnotation : CompositeAnnotationForMvvm
{
public MyCompositeAnnotation()
{
this.InitializeComponent();
}
}
MyCompositeAnnotation ViewModel
public class MyCompositeAnnotationViewModel : CompositeAnnotationViewModel
{
public override Type ViewType => typeof(MyCompositeAnnotation);
}
Main View Model
public ObservableCollection<IAnnotationViewModel> Annotations { get; set; } = new ObservableCollection<IAnnotationViewModel>();
private void OnAddAnnotation()
{
var min = ((TimeSpan)this.sourceRange.Min).Ticks;
this.Annotations.Add(new MyCompositeAnnotationViewModel ()
{
X1 = min + ((TimeSpan)this.sourceRange.Diff).Ticks * 0.1,
X2 = min + ((TimeSpan)this.sourceRange.Diff).Ticks * 0.3,
Y1 = 0.1,
Y2 = 0.3,
CoordinateMode = AnnotationCoordinateMode.Absolute,
DragDirections = XyDirection.XYDirection,
ResizeDirections = XyDirection.XYDirection,
// StyleKey = "LineArrowAnnotationStyle",
IsEditable = true
});
Do I need to set the style so the annotation are hooked up correctly? I tried this but it did not work:
<Style BasedOn="{StaticResource MvvmCompositeAnnotationStyle}" TargetType="{x:Type annotations:MyCompositeAnnotationViewModel}">
<Setter Property="s:CompositeAnnotation.Annotations" Value="{s:AnnotationsBinding Annotations}"/>
</Style>
- Chris Morris asked 3 months ago
- last active 2 months ago
Hi
I used trial license. and I would like to know if it is possible to implement it as shown in the attached Image.
I want to put multiple items into one series.
And I would like to display the units in milliseconds or Numberics.
- Kang minyoung asked 3 months ago
I am showing a dialog window with a ChartSurface in it. I have a context menu option to export to an image, and on window load I export to an XPS file. The dialog works fine if I do not use either feature, but once I do, I intermittently get an exception when showing the dialog. It appears to regularly take 3 instances of the dialog after the export feature is used to throw the exception, and the exception gets thrown twice the first time, threes times the second time, and so on. Again, if I do not use the export feature (no call to ExportToFile), I do not get any exceptions no matter how many times I show the dialog.
The exception message is “The provided DependencyObject is not a context for this Freezable. Parameter name: context”.
There are no other useful details in the exception from what I can see. Its all pretty abstract WPF stuff. The exported file/image seem to be generated accurately regardless of the exception.
I am using SciChart 4.2.2.9724, Visual Studio 2017 Professional, C#, WPF
Any ideas?
- Jeramy Soucy asked 5 years ago
- last active 3 months ago
With these settings
<s3D:SciChart3DSurface.RenderableSeries>
<s3D:SurfaceMeshRenderableSeries3D x:Name="surfaceMeshRenderableSeries"
DrawMeshAs="Wireframe"
ContourStrokeThickness="2"
ContourInterval="10"
ContourOffset="0"
Stroke="black" Maximum="150" StrokeThickness="1.0" DrawSkirt="True"
Opacity="0.9"
MeshColorPalette="{StaticResource HeightColorMap}"/>
</s3D:SciChart3DSurface.RenderableSeries>
No mesh is visible
Change Stoke to #FF000001 and the mesh appears.
Or
Change DrawMeshAs to SolidWireFrame and the mesh appears
Just with DrawMeshAs=Wireframe and Stroke=black or Stroke=#FF000000 no mesh is drawn.
This is a problem as we allow the user to select the colour for the Stroke through a color picker UI and they can (and likely will) select black!
(Can workaround by changing black to #FF000001 – but would be nice if didn’t have to)
- Andrew Milford asked 3 months ago
Style is set thus:
<Grid.Resources>
<Style x:Key="MajorGridLineStyle" TargetType="Line">
<Setter Property="Stroke" Value="Red"/>
<Setter Property="StrokeDashArray" Value="1,5"></Setter>
</Style>
</Grid.Resources>
and
<s3D:SciChart3DSurface.YAxis>
<s3D:NumericAxis3D DrawMajorGridLines="True" DrawMinorGridLines="False" MajorGridLineStyle="{StaticResource MajorGridLineStyle}" />
</s3D:SciChart3DSurface.YAxis>
but grid lines shown in solid red, no dots nor dash.
The Stroke and StrokeThickness properties work but not StrokeDashArray
but documentation here:
says
To style a MajorGridline or MinorGridLine create a Style with TargetType=Line and set properties such as Stroke, StrokeThickness, StrokeDashArray etc…
- Andrew Milford asked 3 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 5 months ago
- last active 3 months ago
I want to visualize Contour in my application and set the Contour Interval.
But the visualization is not as the expected value.
From your Example application: 3D Charts > Create A Surface Mesh Chart > Surface Mesh 3D With Contours. (Screenshot in attachment)
I have set the Contour Interval property slider to the maximum value (30).
But the result is less than 20, about 10.
How to make the Interval 30, and the visualization is really 30?
Are there any interval scaling property?
- Yohanes Wahyu Nurcahyo asked 5 years ago
- last active 3 months ago
I want to implement something like, if a certain analysis value/custom logic is true for one of the values in the loop, –> set this bar color to ‘orange’ as an example, how can i do this?
// Create a dataset of type x=DateTime, y=Double
var dataSeries = new OhlcDataSeries<DateTime, double>();
// Prices are in the format Time, Open, High, Low, Close (all IList)
var prices = smallerList;
// Append data to series. SciChart automatically redraws
for (var i = 0; i < prices.Count(); i++)
{
// Convert TIME to a 4-digit string (e.g., 5 becomes "0005", 15 becomes "0015")
string timeString = prices[i].Value.TIME.ToString("D4");
// Parse the TIME field
int hour = int.Parse(timeString.Substring(0, 2));
int minute = int.Parse(timeString.Substring(2, 2));
// Create the DateTime object
DateTime dateTime = new DateTime(prices[i].Value.YEAR, prices[i].Value.MONTH, prices[i].Value.DAY, hour, minute, 0);
Dispatcher.Invoke(() =>
{
//here we append values in 'dataSeries', how do i do something like, 'bool condition =
// returnCustomLogic('dataValues') --> outputs true, if true --> set this bar color to orange
// Update the UI element on the UI thread
dataSeries.Append(
dateTime,
(double)prices[i].Value.OPEN,
(double)prices[i].Value.HIGH,
(double)prices[i].Value.LOW,
(double)prices[i].Value.CLOSE);
});
}
Dispatcher.Invoke(() =>
{
StockChart.RenderableSeries[0].DataSeries = dataSeries;
// Zoom Extents - necessary as we have AutoRange=False
StockChart.ZoomExtents();
});
- Adan Ramirez asked 3 months ago
- last active 3 months ago
The SciChart.Core.ExportType.Xps value was deprecated in a recent SciChart release. Are there plans to change this to another vector format? Or will this feature no longer be available?
Thanks!
- Matt Robey asked 3 months ago
- last active 3 months ago
Hello,
I have this
private readonly string CHART_MARKER_TEXT = "Marker";
private readonly string CHART_MARKER_STYLE = "VerticalLineAnnotationStyle"; // defined in Chart.xaml
AddVerticalLineAnnotation(new AnnotationRequest() { XValue = 3, LabelText = CHART_MARKER_TEXT, AnnotationStyle = CHART_MARKER_STYLE });
private void AddVerticalLineAnnotation(AnnotationRequest request)
{
Annotations.Add(new VerticalLineAnnotationViewModel
{
X1 = request.XValue,
LabelValue = !string.IsNullOrEmpty(request.LabelText) ? request.LabelText : null,
VerticalAlignment = VerticalAlignment.Stretch,
LabelPlacement = LabelPlacement.Left,
LabelsOrientation = System.Windows.Controls.Orientation.Vertical,
StyleKey = request.AnnotationStyle,
});
}
And this
<Style x:Key="VerticalLineAnnotationStyle" TargetType="{x:Type s:VerticalLineAnnotation}">
<Setter Property="Stroke" Value="Orange" />
<Setter Property="StrokeThickness" Value="2" />
<Setter Property="FontSize" Value="12" />
<Setter Property="FontWeight" Value="Bold" />
</Style>
Why I can’t see Label?
- Fedor Iudin asked 3 months ago
- last active 3 months ago
Hi, I have a problem with the Y-axis mouse scroll sensitivity regarding values, if you take a look here, you can see that it will take a lot of separate scrolls to reach the desired Y-axis value
due to a low level of sensitivity
how can I solve this problem
my code
“`
<s:SciChartSurface x:Name="scs"
RenderableSeries="{s:SeriesBinding Series}"
ViewportManager="{Binding ViewportManager}"
BorderThickness="2,2,2,0"
s:VisualXcceleratorEngine.EnableImpossibleMode="True"
LeftAxesPanelTemplate="{StaticResource YAxesPanel}"
Grid.Row="0"
MouseDoubleClick="OnChartMouseDown">
<s:SciChartSurface.XAxes>
<!-- Hidden Axis that tracks the data -->
<s:NumericAxis AutoRange="Always"
DrawMinorGridLines="False"
DrawMinorTicks="False"
DrawMajorGridLines="False"
DrawMajorTicks="False"
Visibility="Collapsed"
/>
<!--Hidden Axis that track the annotations' locations (All the added annotations have the same XAxis Id-->
<s:NumericAxis Name="SharedXAxisCommon"
AutoRange="Never"
VisibleRangeLimit="0,10"
Height="1"
Visibility="Hidden"
Id="CommonID_X"/>
</s:SciChartSurface.XAxes>
<s:SciChartSurface.YAxes >
<s:NumericAxis AutoRange="Never"
AutoTicks="True"
DrawMinorGridLines="False"
DrawMinorTicks="False"
DrawMajorGridLines="False"
DrawMajorTicks="True"
VisibleRange="0,8128000"
Visibility="Collapsed"/>
</s:SciChartSurface.YAxes>
<s:SciChartSurface.ChartModifier>
<s1:ModifierGroup>
<s1:YAxisDragModifier/>
<s:SeriesSelectionModifier >
<s:SeriesSelectionModifier.SelectedSeriesStyle>
<Style TargetType="s:BaseRenderableSeries">
</Style>
</s:SeriesSelectionModifier.SelectedSeriesStyle>
</s:SeriesSelectionModifier>
</s1:ModifierGroup>
</s:SciChartSurface.ChartModifier>
</s:SciChartSurface>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.3*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="1" x:Name="InportValueTextBlock" Text="{Binding InportValue}" Margin="20,0,0,0" FontSize="14"/>
</Grid>
</Grid>
“`
- Nasim Yehia asked 3 months ago
- last active 3 months ago
Hi, I have problem with the Y axis values, if you take a look here,
the numbers are not intuitive is there a way to fix it?
I tried to set the AutoTicks=”True” but it did nothing
the code
“`
<UserControl.Resources>
<BooleanToVisibilityConverter x:Key="b2vc"/>
<local:BoolToAxisAutoRangeConverter x:Key="AutoRangeConverter" />
<local:StarsConverter x:Key="conv"/>
<ItemsPanelTemplate x:Key="YAxesPanel" >
<Grid local:GridHelpers.RowCount="{Binding RowsCount}"
local:GridHelpers.StarRows="{Binding RowsCount, Converter={StaticResource conv}, Mode=OneWay}"
local:GridHelpers.ColumnCount="1"
>
</Grid>
</ItemsPanelTemplate>
<Style x:Key="MinorTickLineStyle" TargetType="Line">
<Setter Property="Stroke" Value="White"/>
</Style>
</UserControl.Resources>
<Grid x:Name="MainGrid">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- Toolbar -->
<Border Style="{DynamicResource OriginalBorderBright}" BorderThickness="0" Canvas.ZIndex="9999" Visibility="Collapsed">
<StackPanel Orientation="Vertical">
<RadioButton x:Name="RunBtn" Command="{Binding RunCommand}" IsChecked="True" Visibility="Hidden"/>
<RadioButton x:Name="PauseBtn" Visibility="Hidden"/>
</StackPanel>
</Border>
<!-- Chart Surface -->
<Grid Grid.Column="1" >
<s:SciChartSurface x:Name="scs"
RenderableSeries="{s:SeriesBinding Series}"
ViewportManager="{Binding ViewportManager}"
BorderThickness="2,2,2,0"
s:VisualXcceleratorEngine.EnableImpossibleMode="True"
LeftAxesPanelTemplate="{StaticResource YAxesPanel}"
Grid.Row="0"
MouseDoubleClick="OnChartMouseDown">
<s:SciChartSurface.XAxes>
<!-- Hidden Axis that tracks the data -->
<s:NumericAxis AutoRange="Always"
DrawMinorGridLines="False"
DrawMinorTicks="False"
DrawMajorGridLines="False"
DrawMajorTicks="False"
Visibility="Collapsed"
/>
<!--Hidden Axis that track the annotations' locations (All the added annotations have the same XAxis Id-->
<s:NumericAxis Name="SharedXAxisCommon"
AutoRange="Never"
VisibleRangeLimit="0,10"
Height="1"
Visibility="Hidden"
Id="CommonID_X"/>
</s:SciChartSurface.XAxes>
<s:SciChartSurface.YAxes >
<s:NumericAxis AutoRange="Never"
AutoTicks="True"
DrawMinorGridLines="False"
DrawMinorTicks="False"
DrawMajorGridLines="False"
DrawMajorTicks="True"
VisibleRange="0,8128000"
Visibility="Collapsed"/>
</s:SciChartSurface.YAxes>
<s:SciChartSurface.ChartModifier>
<s1:ModifierGroup>
<s1:YAxisDragModifier/>
<s:SeriesSelectionModifier >
<s:SeriesSelectionModifier.SelectedSeriesStyle>
<Style TargetType="s:BaseRenderableSeries">
</Style>
</s:SeriesSelectionModifier.SelectedSeriesStyle>
</s:SeriesSelectionModifier>
</s1:ModifierGroup>
</s:SciChartSurface.ChartModifier>
</s:SciChartSurface>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.3*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="1" x:Name="InportValueTextBlock" Text="{Binding InportValue}" Margin="20,0,0,0" FontSize="14"/>
</Grid>
</Grid>
<Border Grid.Column="1" Style="{DynamicResource OriginalBorderBright}" Visibility="{Binding IsLoading, Mode=OneWay, Converter={StaticResource b2vc}}">
<StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
<ProgressBar Background="Transparent" BorderThickness="0" HorizontalAlignment="Center" IsIndeterminate="True" Height="10" Width="{Binding ActualWidth, Mode=OneWay, ElementName=Test}"/>
<TextBlock x:Name="Test" Text="{Binding LoadingMessage, Mode=OneWay}" FontSize="16" Foreground="{DynamicResource ControlDefaultForeground}" Margin="0,10" TextAlignment="Center" Opacity="0.7"/>
</StackPanel>
</Border>
</Grid>
“`
- Nasim Yehia asked 3 months ago
- last active 3 months ago
Hello,
I am trying to select a single X value on my chart and get the data values from the X value that I selected. I am still pretty new to SciChart but I was looking around and saw that there is a DataPointSelectionModifier. My goal is to create a VerticalLineAnnotation for the user to use and once that annotation is created, to pull the data values from that X value. Could this be done? Any advice or help is greatly appreciated!
Thanks,
Preston
- preston truong asked 3 months ago
- last active 3 months ago