Pre loader

Category: WPF

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0 votes
0 answers
45 views

Hello,

I am working on a heatmap chart with contours. The dataSeries are binded to DataSeriesInViewModel in the viewmodel, where DataSeriesInViewModel is defined as:

DataSeriesInViewModel = new UniformHeatmapDataSeries<int, int, double>(zValues2d, 0, 1, 0, 1)

where zValues2d contains the grid values data.

In addition there is binding to ZMax, ZMin which are the max, min values of zValues2d and also ZStep which is the number of steps for the contours.

The problem is that one can see two tootips and that those are not showing the same value.

<s:SciChartSurface x:Name="sciChart" Grid.Column="0" ChartTitle="{Binding ChartTitle}">

    <s:SciChartSurface.RenderableSeries>

        <s:FastUniformContourRenderableSeries x:Name="ContourSeries"
                                              AntiAliasing="True" ZMax="{Binding ZMax}"
                                              ZMin="{Binding ZMin}" ZStep="{Binding ZStep}"
                                              DataSeries="{Binding DataSeriesInViewModel}">
            <s:FastUniformContourRenderableSeries.ColorMap>
                <s:HeatmapColorPalette  Maximum="{Binding ZMax}" Minimum="{Binding ZMin}">
                    <s:HeatmapColorPalette.GradientStops>
                        <GradientStop Offset="0.0" Color="{StaticResource ColorMapColor_1}"/>
                        <GradientStop Offset="0.2" Color="{StaticResource ColorMapColor_2}"/>
                        <GradientStop Offset="0.4" Color="{StaticResource ColorMapColor_3}"/>
                        <GradientStop Offset="0.6" Color="{StaticResource ColorMapColor_4}"/>
                        <GradientStop Offset="0.8" Color="{StaticResource ColorMapColor_5}"/>
                        <GradientStop Offset="1.0" Color="{StaticResource ColorMapColor_6}"/>
                    </s:HeatmapColorPalette.GradientStops>
                </s:HeatmapColorPalette>
            </s:FastUniformContourRenderableSeries.ColorMap>
        </s:FastUniformContourRenderableSeries>

            <s:FastUniformHeatmapRenderableSeries  x:Name="HeatmapSeries"
                                                   Opacity="0.8"
                                                   UseLinearTextureFiltering="True"
                                                   AntiAliasing="True"
                                                   DataSeries="{Binding DataSeriesInViewModel}">
            <s:FastUniformHeatmapRenderableSeries.ColorMap>
                <s:HeatmapColorPalette  Maximum="{Binding ZMax}" Minimum="{Binding ZMin}">
                    <s:HeatmapColorPalette.GradientStops>
                        <GradientStop Offset="0.0" Color="{StaticResource ColorMapColor_1}"/>
                        <GradientStop Offset="0.2" Color="{StaticResource ColorMapColor_2}"/>
                        <GradientStop Offset="0.4" Color="{StaticResource ColorMapColor_3}"/>
                        <GradientStop Offset="0.6" Color="{StaticResource ColorMapColor_4}"/>
                        <GradientStop Offset="0.8" Color="{StaticResource ColorMapColor_5}"/>
                        <GradientStop Offset="1.0" Color="{StaticResource ColorMapColor_6}"/>
                    </s:HeatmapColorPalette.GradientStops>
                </s:HeatmapColorPalette>
            </s:FastUniformHeatmapRenderableSeries.ColorMap>

        </s:FastUniformHeatmapRenderableSeries>
    </s:SciChartSurface.RenderableSeries>

    <s:SciChartSurface.XAxis>
        <s:NumericAxis DrawMajorBands="True" AutoRange="Always" LabelProvider="{Binding XAxisLabelProvider}"/>
    </s:SciChartSurface.XAxis>

    <s:SciChartSurface.YAxis>
        <s:NumericAxis DrawMajorBands="True" AutoRange="Always" LabelProvider="{Binding YAxisLabelProvider}"/>
    </s:SciChartSurface.YAxis>

    <s:SciChartSurface.ChartModifier>
        <s:ModifierGroup>
            <s:RolloverModifier ShowTooltipOn="Always" UseInterpolation="True" ReceiveHandledEvents="True"/>               
        </s:ModifierGroup>
    </s:SciChartSurface.ChartModifier>
</s:SciChartSurface>

<s:HeatmapColorMap Grid.Column="1" Margin="2"
                   HorizontalAlignment="Right"
                   VerticalAlignment="Stretch"
                   Background="{StaticResource ThemedSurfaceChartBackground}" 
                   Foreground="{Binding Source={x:Reference Name=sciChart}, Path=Foreground}"
                   ColorMap="{Binding Source={x:Reference Name=HeatmapSeries}, Path=ColorMap.GradientStops, Converter={StaticResource ColorsToLinearGradientBrushConverter}}"
                   Minimum="{Binding ZMin}" 
                   Maximum="{Binding ZMax}" 
                   TextFormatting="0.00" Opacity="0.8" BorderBrush="#777" BorderThickness="1" Orientation="Vertical"/>

I also tried to assign to the contour chart the colormap from the heatmap using:

 <s:FastUniformContourRenderableSeries x:Name="ContourSeries"
                                   AntiAliasing="True" ZMax="{Binding ZMax}"
                                   ZMin="{Binding ZMin}" ZStep="{Binding ZStep}"
                                   DataSeries="{Binding DataSeriesInViewModel}"
                                   ColorMap="{Binding Source={x:Reference Name=HeatmapSeries}, 
 Path=ColorMap.GradientStops,
 Converter={StaticResource ColorsToLinearGradientBrushConverter}}">

but then I still see two tooltips but no contours anymore.
In fact i would like to know what I do wrong here, and how to see only one tooltip.

thanks a lot for your help,

Thomas

0 votes
0 answers
71 views

Hello, I am using the scichart example : SciChart_CustomTooltipsWithModifiers.
I want to double click the RolloverModifier to trigger en event.
The xaml(wpf) is as follows:


The c# :
private void RolloverModifier_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
MessageBox.Show(“nihao11111111111111”);
}

But it didn’t work. Can you help me to solve this problem?
Thank you.

0 votes
67 views

Hello,

I am trying to Zoom to the contents of the graph. I have a custom annotation that is anchored to the bottom left position. When I zoom into the data contents using the method ViewPortManager.AnimateZoomExtents(), the top of the annotation gets cut of, but it shows the anchor point. Is there a way I can show the entire custom annotation when zooming or is there a way to get the top right coordinate position of the custom annotation?

Kind regards

0 votes
0 answers
83 views

Hello. I have been playing around with SciChart_SurfaceMesh3DNonUniformData example solution of yours. I have modified the data in it, some of the properties, etc.
I have managed to get the cursor to display and snap to the nearest points while still being able to rotate and zoom the graph.

What I have not been able to figure out, have tried many different things, are the following:

  1. I would like to change the tooltip. Right now it is showing the default one which shows something like this:
    Nonuniform Surface Mesh
    Cell Index: z=6, x=8
    X Data: 3200.00
    Y Data: 0.60
    Z Data: 20.00

I would like to just show the X, Y, and Z values and maybe use my own labels instead of “X Data”, etc.
2. Would also be nice if I could position the tooltip a little further away from the cursor position so that it does not obscure the surface so much.
3. Lastly, as the user moves the cursor across the surface I would like to have the active point that it snaps to be displayed with a yellow ellipse to make it more obvious where the cursor is positioned.

I have attached my solution. It had a directory called SciChart8 where I had all the SciChart DLLs but I removed that before zipping it up so you will need to fix up the SciChart references to point to your own copies. I also removed my license key.

Thanks in advance for any help you can provide. I have spent about 4 hours trying to get these things working without success.

Jeff Skory

0 votes
139 views

When using the Orientation.Horizontal attribute in using LegendModifier 3D, Legend items are displayed in a single line.
I want to print in two lines but I’m not looking for a way to implement that feature.
If there’s a way to print it out, I’d appreciate it if you could let me know.

The development language is C#.

0 votes
130 views

Here’s the English translation of your message:

I cannot change the Background Color of the LegendModifier3D that I’m using.
The methods I’ve tried so far are:

1.
csharp
Legend = new CustomLegendModifier3D
{
Background = new SolidColorBrush(Colors.Red)
}

2.
csharp
ControlTemplate template = new ControlTemplate(typeof(LegendModifier3D));
template.VisualTree = new FrameworkElementFactory(typeof(System.Windows.Controls.Grid));
template.VisualTree.SetValue(Border.BackgroundProperty, new SolidColorBrush(Colors.Red));
Legend.Template = template;

I’ve tried these methods, but while the background color of each TextBlock has changed, I’ve found that the background color of the container wrapping the TextBlocks doesn’t change no matter what method I use.

I’m inquiring whether it’s impossible to completely change the background color of the LegendModifier3D container when using LegendModifier3D, or if I’m using the wrong method.

0 votes
137 views

Hello!

I am dealing with a problem in my WPF app similar to the one described here (https://www.scichart.com/questions/js/why-does-my-candle-sticks-bodies-have-different-width). However, I am using WPF and binding to ColumnRenderableSeriesViewModel.

I was also able to reproduce the issue by modifying the demo program (https://www.scichart.com/example/wpf-chart/wpf-chart-example-histogram/) I changed it to have RedSeriesData and GreenSeriesData to have just one datapoint to make the problem happen.

Could you suggest a workaround? I need to render a bar plot where bars may have different colors. I am accomplishing it by creating a collection of ColumnRenderableSeriesViewModel objects, one for each color. The issue appears when one or more of ColumnRenderableSeriesViewModel objects have just one datapoint.

The attached screenshot shows the modified histogram example with two bars near the right edge appearing much narrower than the rest.

0 votes
235 views

Hello,

I have some FastLineRenderableSeries with XyDataSeires that I’m plotting to a chart. On each of these series I’m highlighting one specific point using the IPointMetadata IsSelected interface (Image 1). On this selected point I want to show a series tooltip the same way a VerticalSliceModifier would when it interacts with a series (see image 2 for an example of what I want). How would I do this?

For now I’m setting the SelectedPointMarker for my series to an EllipsePointMarker.

0 votes
227 views

Hello everyone.
Is there a way to set the max width for a Stacked Column Chart?
Best regards,
Michael

0 votes
274 views

Hello.
I want to save some lines’ parameters from RenderableSeries items collection. As example, if I have legend for chart I have IsVisible checkbox for each line on it. What the best way to get ‘feedback’ from legend in case if I unclicked several checkboxes? How to catch this event? I need it because after catch this event I want to save current line state and after restart application will have a possibility to restore RenderableSeries state.
P.S. I want to make it under MVVM pattern

0 votes
311 views

Is there any way to show the label of the bubble all the time instead of hovering at the center of the bubble?
I have tried annotation, but I wonder if there is any easier way to set the visibility of the bubble marker to always.
I am using BubbleRenderableSeriesViewModel to build bubble chart and using XyzDataSeries to build the chart.

0 votes
318 views

Hi, i want to change the GradientStops of FastUniformHeatmapRenderableSeries from ViewModel
Here is the Code below

                    <s:SciChartSurface
                    Width="330"
                    Height="630"
                    s:VisualXcceleratorEngine.EnableImpossibleMode="True"
                    s:VisualXcceleratorEngine.IsEnabled="True"
                    Cursor="Cross">
                    <s:SciChartSurface.RenderableSeries>
                        <s:FastUniformHeatmapRenderableSeries DataSeries="{Binding DataSeries}">
                            <s:FastUniformHeatmapRenderableSeries.ColorMap>
                                <s:HeatmapColorPalette
                                    GradientStops="{Binding ColorMap}"
                                    Maximum="100"
                                    Minimum="0" />
                            </s:FastUniformHeatmapRenderableSeries.ColorMap>
                        </s:FastUniformHeatmapRenderableSeries>
                    </s:SciChartSurface.RenderableSeries>

                    <s:SciChartSurface.XAxis>
                        <s:NumericAxis
                            AxisAlignment="Left"
                            FlipCoordinates="True"
                            Width="30"
                            MajorDelta="60"
                            MinorDelta="20"
                            AutoTicks="True"
                            DrawMajorGridLines="False"
                            DrawMinorGridLines="False"
                            DrawMinorTicks="False"
                            VisibleRange="0, 600" />
                    </s:SciChartSurface.XAxis>
                    <s:SciChartSurface.YAxis>
                        <s:NumericAxis
                            x:Name="YAxis"
                            AxisAlignment="Bottom"
                            FlipCoordinates="True"
                            Height="30"
                            AutoTicks="True"
                            DrawMajorGridLines="False"
                            DrawMinorGridLines="False"
                            DrawMinorTicks="False"
                            MajorDelta="30"
                            MinorDelta="10"
                            VisibleRange="0, 300" />
                    </s:SciChartSurface.YAxis>
                </s:SciChartSurface>

When I change the ColorMap at ViewModel, I can check that GradientStops Property in View is changed. But Chart’s color is not changed.
How can I change the GradientStops of FastUniformHeatmapRenderableSeries from ViewModel ?

0 votes
366 views

Hello everyone,

I’m trying to display a tooltip when I hover over an annotation in our WPF project using MVVM.

I attempted to override the MouseMove event on the SciChart surface to identify which annotation the mouse was over by cycling through each annotation. However, it didn’t seem like a very good way to proceed to me and I didn’t try to display the desired information at that point.

While reviewing the documentation, I noticed that annotations have a “Cursor” property. Is there a way to bind that property from the viewmodel? That would make my job so much easier.

If anyone has suggestions on how to proceed, they would be greatly appreciated.

Thanks,
Andrea

0 votes
365 views

I have a UserControl which contains a chart and some wpf controls. How can I print this UserControl to PDF or XPS? All examples I see are for the chart only.

  • j chatlein asked 1 month ago
  • last active 7 hours ago
1 vote
403 views

I’ve got an X axis that is int/numeric based that I have a custom labeler on to display strings. For example, let’s say my data is 1-26, but I want to show the letters in the alphabet rather than the number. The labeler piece is sorted out and is working for me as I’m seeing the letters as labels on the axis.

At this point, I’m trying to work on a tick provider that will only show labels corresponding to data in the series. Is this possible? Say I have A, E, I, O, and U as my data in the series, those are the only labels I want to see on the axis. I’m having trouble getting the TickProvider API to work in this way.

Thank you for the help!
Matthew

0 votes
411 views

Boxplot series on the second axis have a different width (very small on second series) when there are multiple Y-axes and the values ​​of the first series of the first axis are between 0.1-0.6 and those of the second between 41400-41900.

  • Tobias asked 2 months ago
  • last active 2 weeks ago
0 votes
441 views

Hi together,

my XValues = e.g [1,2,3,4,5]

im currently using a VerticalSliceModifier with UseInterpolation set to false but the VerticalLine Label still displays values like 1.22.
When using a rollover modifier with UseInterpolation set to false i only get the expected dataValue e.g 1.

Why is the verticalSlice modifier ignoring this and how do i fix this.

ps: I´ve attached an screenshot from an sample project.

Thank you in advance.

Best regards,
Armin

  • Armin Wild asked 2 months ago
  • last active 1 month ago
0 votes
447 views

I’ve played around with the DataPointSelectionModifier and the ability to select a data point in a series on the chart (visually). Now I want the user to be able to relocate it on the chart by dragging it. I’m also going to need to allow the user to delete the point as well, perhaps click it and then hit the delete button on the keyboard.

I’m not finding any way to do this, but it seems this must be a feature.

0 votes
471 views

Are there any native tools that will a user to drag/drop/delete points on a line series? I have a customer requirement that will allow the user to manually edit my series.

0 votes
534 views

Hello,
we have a problem while executing our unit tests on our jenkins server.
The unit tests are run via the Nunit Console Runner.
In one specific Test project the unit test aborts with a “SocketException”.
The output looks like this:

Test Files D:\dev\jenkins\workspace\c\build\test....\source\Exec64_Release\Test.dll
Writing out DLLs to C:\Users\user\AppData\Local\SciChart\Dependencies\v8.1.0.27856\x64
System.Net.Sockets.SocketException : No connection could be made because the target machine actively refused it 127.0.0.1:65018

So because there is the line with “Writing out Dlls ….” which contains SciChart and the next line is the SocketException I just wanted to ask if there is something in SciChart which tries to connect to the localhost, I don’t know e.g. the licensing?
I don’t want to blame SciChart, I just want to ask if it could be possible. Because it is not easy to debug this scenario reliantly.

Best Regards,
Nick

0 votes
468 views

Hello,

I am building an application where I use a WPF class library that calls sciChartSurface multiple times within my MainWindow application. Please refer to the attached screenshot.
I want to ensure that the Y-axis label widths are consistent across multiple chart surfaces. Specifically, I need a way to measure the total Y-axis label area of each chart and then set all the charts (with smaller Y-axis label areas) to match the chart with the largest Y-axis label area.
Additionally, I need the X-axis labels of all the charts to be synchronized, even when they contain different series configured as either single-axis or multi-axis.
Any suggestions or solutions to achieve this would be greatly appreciated.

Thank you.

0 votes
519 views

The real-time graph only shows the data of the last minute on the x-axis, and the VisibleRange property setting is invalid

private void InitializeChart()
{
    for (int i = 0; i < 50; i++)
    {
        var dataSeries = new XyDataSeries<DateTime, double> { FifoCapacity = 10 };
        Color color = Color.FromArgb(0xAA, (byte)random.Next(1, 256), (byte)random.Next(1, 256), (byte)random.Next(1, 256));
        var lineSeries = new FastLineRenderableSeries()
        {
            DataSeries = dataSeries,
            StrokeThickness = 2,
            Stroke = color
        };
        sciChart.RenderableSeries.Add(lineSeries);
        fastLines.Add(dataSeries);
    }
}

private void StartTimer()
{
var timer = new Timer(1000);
timer.Elapsed += (sender, e) =>
{
Dispatcher.Invoke(() =>
{
var currentDate = DateTime.Now;
for (int i = 0; i < fastLines.Count; i++)
{
var xAxis = sciChart.XAxes.OfType().FirstOrDefault();
if (xAxis != null&& xAxis.DataRange!=null)
{
var newRange = new DateRange(currentDate.AddSeconds(-60), currentDate);

                fastLines[i].XRange.Min = newRange.Min;
                //xAxis.VisibleRange = newRange;
                Application.Current.Dispatcher.BeginInvoke((Action)(() =>
                {
                    xAxis.InvalidateElement();
                }));
                sciChart.ZoomExtents();
            }
            if (fastLines[i].Count > 5 &&i>40)
            {
                break;
            }
            double y = (i + 1);
            fastLines[i].Append(currentDate, y);
        }
    });
};
timer.Start();

}

  • jyj jyj asked 2 months ago
  • last active 3 weeks ago
0 votes
564 views

I have an older version of SciChart, and I get this SystemException when I try to set the runtime license key.

System.Exception
HResult=0x80131500
Message=The registry key specified by the RegistryStoragePath property could not be opened.
Source=SciChart.Core

What am I doing wrong?

Thanks a lot

0 votes
583 views

I’m migrating from LiveCharts to SciChart. With LiveCharts, adding a new point to the series is smooth, and you can see the animation playing as the new point is added.

I’m appending points to a FastLineRenderableSeries with FIFO mode. How can I implement the same effect, just like in LiveCharts?

  • Sami Lamb asked 2 months ago
  • last active 2 months ago
0 votes
602 views

Hi,
I have a chart with VerticalLineAnnotation in VerticalSliceModifier,
new VerticalLineAnnotation()
{
XAxisId = XAxis.Id,
YAxisId =YAxis.Id,
LabelPlacement = LabelPlacement.BottomLeft,
ShowLabel =true,
X1 = 0.3,
CoordinateMode = AnnotationCoordinateMode.RelativeX,
IsEditable = true
};

Is there a easy way to set label to show axis value, not the Relative?
By the way VerticalLineAnnotation label can auto fit LabelPlacement? When I drag to edge, the label will be sheltered.

  • wei zhao asked 2 months ago
  • last active 1 month ago
0 votes
598 views

Hi, I am currently doing MVVM development with SciChart. Previously I was using thousands of LineRenderableSeriesViewModel to represent vertical lines along a profile. I noticed that this may be the cause for a slow-down, so I have attempted to merge all the LineRenderableSeriesViewModels into one view model, using double.NaN’s in between vertical lines to get gaps. This works fine, except if the first point is off-screen then everything else disappears. I am currently using the VisualXcceleratorEngine in my surface. The screenshots show what happens if I pan to the right a little bit and the first point goes off-screen. One thing I thought it was at first was the stationing was not monotonically increasing, but I have made it that way and it didn’t fix the problem. Tips would be appreciated.

0 votes
610 views

Hello,

I want to display statistical data using a violin plot. Is it possible to create a violin plot using SciChart?
A violin plot is similar to a box plot, with the addition of a rotated kernel density plot on each side.

https://en.wikipedia.org/wiki/Violin_plot

regards,
Tobias

  • Tobias asked 3 months ago
  • last active 1 month ago
0 votes
597 views

In the “Central XAxis and YAxis” example, I saw how I could use IsCenterAxis to have the X-axis and Y-axis centers intersect vertically and appear in the center of the view, but the version I was using did not have the IsCenterAxis attribute.

  • Du Yeming asked 3 months ago
  • last active 2 months ago
0 votes
650 views

Hi,

I have prepared a test solution for the issues major and minot tick issue and for the issue of double axis titles. Please check the pdf, that I have attached and try testing my solution with versions v7.x and v8.x.
You should see the issues described in the report.

Kind regards,
Boštjan

0 votes
649 views

I know it is possible to create a dashed line annotation by using the StrokeDashArray property of a VerticalLineAnnotation or HorizontalLineAnnotation.

Is it possible to create a BoxAnnotation with a dashed border?

0 votes
701 views

Hi,

I am working on an application that involves realtime graphing of large amounts of data. Plotting the data in realtime is working flawlessly, except the legend checkboxes associated with the DataSeries are quite temperamental.

By temperamental, I mean that attempting to toggle a checkbox in the legend (via clicking the checkbox), only works sporadically. Resultantly, the users are required to click the checkbox multiple times until the checkbox is successfully toggled.

This only occurs while plotting realtime data, and I’m assuming it is related to the UI thread being bogged down.

I’ve tried setting the SciChartSurface.RenderPriority to low, but this failed to fix the issue. I’m unsure if there is anything you guys can do on your side; however, I figured I’d reach out just in case. Any tips would be much appreciated!

0 votes
713 views

Hello.
I have real-time chart. It updates and X-axis always moving. When I added annotation like VerticalLineAnnotationViewModel to chart I choose the certain point on X-axis and after adding annotation it start moving with X-axis. It is OK.
But now I need to add VerticalLineAnnotationViewModel with calculated point on X-axis. I will be looks like constant static vertical line on moving chart. Can I make something like this?

0 votes
710 views

Hi,
am implementing a context menu that has the option to export screen shots of the chart as jpeg.
As soon as i click on the context menu, I loose the cursor modifier.

Possible to export/print the chart with the cursors with the contextmenu??

Thanks

  • P S asked 3 months ago
  • last active 3 months ago
0 votes
832 views

SciChartOne and sciChartTwo are bound to each other through AxisTitle.

However, I now need to display only the modified AxisLabelContainerStyle and AxisLabelTemplate when the mouse cursor is on SciChartOne. I noticed that besides the XAxis setting’s Style, there is also a default Style present, resulting in an orange label with a default green label underneath.

Could you please advise on how to completely override the green label when the mouse cursor is selected on this chart for SciChartOne?

Additionally, if the mouse cursor is not selected on this chart, I would like the XAxis to display a blue label.

Chart Code:(Both are the same)

                <Style x:Key="CursorLineStyle" TargetType="Line">
                    <Setter Property="StrokeThickness" Value="2"></Setter>
                    <Setter Property="Stroke" Value="Red"></Setter>
                    <Setter Property="StrokeDashArray" Value="2 2"></Setter>
                </Style>
                <Style x:Key="CursorModAxisLabelStyle" TargetType="s:AxisLabelControl">
                    <Setter Property="Background" Value="#AAFF6600"></Setter>
                    <Setter Property="BorderBrush" Value="#FFFF6600"></Setter>
                    <Setter Property="BorderThickness" Value="1"></Setter>
                </Style>
                <DataTemplate x:Key="CursorModAxisLabelTemplate" DataType="s:AxisInfo">
                    <StackPanel>
                        <TextBlock Foreground="White" FontFamily="Arial" FontSize="11" Margin="2" Text="{Binding DataValue, StringFormat='{}{0:0.00}'}"></TextBlock>
                    </StackPanel>
                </DataTemplate>


            <s:SciChartSurface.XAxis>
                <s:NumericAxis AxisTitle="{Binding XAxisTitle}" s:CursorModifier.AxisLabelContainerStyle="{StaticResource CursorModAxisLabelStyle}" s:CursorModifier.AxisLabelTemplate="{StaticResource CursorModAxisLabelTemplate}" VisibleRange="{Binding SharedXVisibleRange, Mode=TwoWay}"></s:NumericAxis>
            </s:SciChartSurface.XAxis>
            <s:SciChartSurface.ChartModifier>
                <s:ModifierGroup DataContext="{Binding Path=DataContext, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Grid}}}" s:MouseManager.MouseEventGroup="myCustomGroup">
                    <s:RubberBandXyZoomModifier IsEnabled="{Binding EnableZoom}"></s:RubberBandXyZoomModifier>
                    <s:ZoomPanModifier IsEnabled="{Binding EnablePan}" ClipModeX="None"></s:ZoomPanModifier>
                    <s:ZoomExtentsModifier></s:ZoomExtentsModifier>
                    <s:LegendModifier ShowLegend="True" Orientation="Horizontal" VerticalAlignment="Top" HorizontalAlignment="Center"></s:LegendModifier>
                    <s:RolloverModifier ShowTooltipOn="MouseHover"></s:RolloverModifier>
                    <s:CursorModifier LineOverlayStyle="{StaticResource CursorLineStyle}"></s:CursorModifier>
                    <s:XAxisDragModifier DragMode="Pan"></s:XAxisDragModifier>
                    <s:YAxisDragModifier DragMode="Scale"></s:YAxisDragModifier>
                    <s:MouseWheelZoomModifier></s:MouseWheelZoomModifier>
                </s:ModifierGroup>
            </s:SciChartSurface.ChartModifier>
        </s:SciChartSurface>
0 votes
737 views

One of our users have a setup where they have a VM with very little graphics capabilities and it appears that when we open one of our SciChart panels for the first time, it takes about 4 minutes for everything to populate. The next time, it only takes a couple seconds as expected. This is a bit of a long shot question, but have you ever seen such an issue on any sort of machine? I’ve attached the settings we use for the VisualXcelleratorEngine.

Thanks for any help!
Matthew

0 votes
753 views

Hello
We were using wpf version prior to 6, we just purchased new license and downloaded latest, but we found the HitTest api is gone, below is our code, it tries to figure out the line being clicked and get its data series.
Could you please let us know how to replace HitTest api?
Thanks

Sally

private void ChartPointClicked(object sender, MouseButtonEventArgs e)
{
e.Handled = true;

        Point mousePoint = e.GetPosition(Chart.GridLinesPanel as UIElement);
        double datapointRadius = 8;
        bool useInterpolation = false;
        HitTestInfo result;
        if (LineSeries.DataSeries != null)
            result = LineSeries.HitTest(mousePoint,datapointRadius, useInterpolation);
        else if (BoxSeries.DataSeries != null)
            result = BoxSeries.HitTest(mousePoint, datapointRadius, useInterpolation);
        else
            return;

        if (!result.IsHit)
            return;

        if (result.DataSeriesIndex <= Events.Count)
        {
            List<wExportEvent> runs = new List<wExportEvent>();
            runs = Events.Select(x => x.Wsdl).ToList();
            OpenRunSummary(runs, result.DataSeriesIndex);
        }
    }
  • sally an asked 3 months ago
  • last active 3 months ago
0 votes
0 answers
3k views
<s:DataPointSelectionModifier Name="PointMarkersSelectionModifier"
                              IsEnabled="True"
                              SelectionChanged="PointMarkersSelectionModifier_SelectionChanged"
                              SelectionFill="Blue"
                              SelectionStroke="red" />
<s:MouseWheelZoomModifier IsEnabled="True" />
<s:RubberBandXyZoomModifier IsEnabled="False" />

I am developing in a wpf environment.
When first creating a chart, DataPointSelectionModifier was added in xaml. And every time specific data was created, I manually added XyScatterRenderableSeries to the series.

public static XyScatterRenderableSeries SetChartDataFotScatter(
    double x, double y,
    NumericAxis p_xaxis,
    NumericAxis p_yaxis,
    Brush color = null,
    Brush sel_color = null,
    MyMetadata selected = null)
{
    Color blue = color == null ? (Color)Application.Current.FindResource("Blue") : ((SolidColorBrush)color).Color;
    Color red = sel_color == null ? (Color)Application.Current.FindResource("Red") : ((SolidColorBrush)sel_color).Color;

    ///차트 생성
    var scatter = new XyScatterRenderableSeries();

    ///기본 marker
    EllipsePointMarker marker = new EllipsePointMarker() { Width = 10, Height = 10, StrokeThickness = 1, Opacity = 0.6 };

    ///MyMetadata에 의한 속성 값 변경시 특수하게 작동
    if (selected != null)
    {
        Binding binding            = new Binding("IsChecked");
        binding.Source             = selected;
        binding.Converter          = ScatterCheckToColor;
        binding.ConverterParameter = blue;
        marker.SetBinding(BasePointMarker.FillProperty, binding);
        marker.SetBinding(BasePointMarker.StrokeProperty, binding);
    }
    else
    {
        marker.Fill = blue;
        marker.Stroke = blue;
    }

    scatter.PointMarker = marker;

    ///선택시 marker style
    scatter.SelectedPointMarker = new EllipsePointMarker() { Width = 10, Height = 10, Fill = red, Stroke = red, StrokeThickness = 1, Opacity = 0.6 };

    ///축 적용
    scatter.XAxisId = p_xaxis.Id;
    scatter.YAxisId = p_yaxis.Id;

    ///데이터 생성
    XyDataSeries<double, double> data = new XyDataSeries<double, double>();

    if (selected != null)
        data.Append(x, y, selected);
    else
        data.Append(x, y);

    ///데이터 적용
    scatter.DataSeries = data;
    return scatter;
}






private Dictionary<string, IRange> wgp(Point gwe, Point gwf, IEnumerable<IAxis> gwg)
{
    srq.Clear();
    IEnumerator<IAxis> enumerator = gwg.GetEnumerator();
    try
    {
        while (enumerator.MoveNext() ? true : false)
        {
            IAxis current = enumerator.Current;
            bool isXAxis = current.IsXAxis;
            IComparable comparable = current.GetDataValue((isXAxis ? true : false) ? gwe.X : gwe.Y);
            IComparable comparable2 = current.GetDataValue((isXAxis ? true : false) ? gwf.X : gwf.Y);
            if (comparable.CompareTo(comparable2) > 0)
            {
                IComparable comparable3 = comparable;
                comparable = comparable2;
                comparable2 = comparable3;
            }
            IRange value = RangeFactory.NewWithMinMax(current.VisibleRange, comparable, comparable2);
            srq.Add(current.Id, value);
        }
    }
    finally
    {
        if (enumerator != null || 1 == 0)
        {
            enumerator.Dispose();
        }
    }
    return srq;
}

Then, if you try to select the scatter part with the drag drop, a nullException error occurs. It says IAxis current =null.
Why does this error occur?

0 votes
3k views

Is there a plan to add WinUI3 and/or Maui support? We’ve decided to move to WinUI3 and now seen to be stuck with a WebView and JS libraries for 3Dcharts

0 votes
813 views

Hi,

In short, I am trying to do the same thing done here (https://www.scichart.com/questions/wpf/extend-latest-value-of-line-chart-to-right-of-view-port), except the types I am using are different and I am having trouble making it work.

We are using MVVM, where our data series is an XyDataSeries<DateTime, double> and our view models are LineRenderableSeriesViewModels. I am trying to make a custom class that inherits from one of those types so I can override the draw function just like the question I linked to did, so I don’t have to change away from any of the types we are already using. The problem is I am not seeing any overridable internal draw type of function for either of those two types. Is there one that I’m missing or is there a different way to approach this?

Thanks,
Clayton

0 votes
850 views

Sorry if this isn’t the best way to post this but I wasn’t sure what was a better approach. I made this post last week:
https://www.scichart.com/questions/wpf/stacked-y-axes-with-stacked-mountain-plots
I have created a test project which reproduces the issue, it is attached

Edit: I’ve uploaded a second attempt at sharing the test project

0 votes
927 views

Hello,

I am creating a very demanding application with several vertically stacked charts. I would like to use the best approach for using brushes / pens / sprites and textures.

  1. Can I leave the resources between render passes or do I have to always dispose it after a render pass?
  2. Which method is the most performant when drawing images? Should I use ISprite2d or ITexture2d. Is the DrawSprites the most performant?
0 votes
898 views

Hi,
I’ve been working on getting stacked mountain plots going on multiple stacked y axes. It all works well until I try and put a series on one axes and then a series with a different count on another axes. At that point I get this error:

SciChartSurface didn’t render, because an exception was thrown:
Message: Index was outside the bounds of the array.

Stack Trace: at xpj.tkj(IEnumerable`1 cka) at
xpj.DrawStackedSeries(IRenderContext2D renderContext) at
SciChart.Charting.Visuals.RenderableSeries.BaseRenderableSeries.SciChart.Charting.Visuals.IDrawable.OnDraw(IRenderContext2D
renderContext, IRenderPassData renderPassData) at
xlh.jsy(RenderPassInfo hc, IRenderContext2D hd, Int32 he) at
xlh.jsx(ISciChartSurface gz, RenderPassInfo ha, IRenderContext2D hb)
at xlh.RenderLoop(IRenderContext2D renderContext) at
SciChart.Charting.Visuals.SciChartSurface.DoDrawingLoop()

The 2 series have the same x range but different x values from each other. It doesn’t seem to happen for every set of values but I haven’t been able to work out what triggers it and have no access to the drawstackedseries code to see where the indexing is going off. This is happening on log axes but all y values are >0 and the ZeroLineY value is set to 0.1

0 votes
984 views

Hi,
I need to make Radar to visualize position of some point. It is the picture like this
enter image description here
The coordinates of red circle center always changing and need to repaint it in real time. Can I realize something like that via SciChart?

0 votes
964 views

I’ve been trying to get stacked y axes work when each is in log space but the data seems to ignore the positioning of the axes in this case. When stacking linear axes the data associated with each axes just plots in the space for each axis.

I’m using a grid panel for y axis layout

0 votes
1k views

Hello,

I need to draw a lot of annotations. Those are pretty simple figures/icons. The gotchas:

  1. The axis (ticks/labels) should be inside of the chart area.
  2. The annotation should be drawn on the border of the axis/chart.

I started to use the immediate mode for this. Was pretty happy to see there are Layers in the render context and I thought I could schedule or manipulate the rendereings when it comes to what I want. Unfotunately it is immutable.

The first thing I could come over by manipulating the template at runtime although I do not want to re-template it in fear of bigger template changes than the change of Grid.Row at runtime.
The second part is more tricky now. I would like to have fine grained control over the ordering of what is drawn. At least above/below the RenderableSeries but best to select the layers as wanted.

One big deal I did overcome is some mouse hover action for the drawn annotations.

So my idea now would be to add custom rendering layers like the HighQualityRenderSurface but I have no Idea how this impacts the performance. I already have a target of ~30 charts. Fortunately visible ones would be only around 8 so I could manipualte the visibility on scroll to prevent render.

I attached an example of the idea.

What I tried before was interfering with The ISciChartRenderer to wrap a before and after render. The problem is the Services are registered and the value is asigned to a property so that my re-register (swap) has no effect. Finally I got it working using a IAnnotationsDrawingProvider wrapper.

You can find the related post on StackOverflow:
https://stackoverflow.com/questions/78436617/immediate-mode-scichart-rendering-with-ordering-and-axis-positioning-custom-fas

EDIT:
For the fine grained control over the rendering order I managed to use the Layers just need to do it before any counterpart manages to schedule an action (ISciChartRenderer worked just the base class private variable assignment is nasty).

0 votes
1k views

Hello,
I have charts

    <s:SciChartSurface Grid.Row="0" Grid.Column="0" x:Name="SciChartSurface" Margin="3" Padding="3"
                       ChartTitle="{mainVM:Localization ChartMainSciChartSurface}" YAxes="{s:AxesBinding YAxes}" RenderableSeries="{s:SeriesBinding RenderableSeries}" Annotations="{s:AnnotationsBinding Annotations}">
        <s:SciChartSurface.XAxis>
            <s:NumericAxis AxisTitle="{mainVM:Localization ChartAxisXTitle}" VisibleRange="{Binding VisibleRangeXAxis, Mode=TwoWay}" />
        </s:SciChartSurface.XAxis>
        <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>

As you see I have SeriesValueModifier tag but I cant see markers and values

enter image description here

I found rule “The SeriesValueModifier works on a single axis. You can change which axis by setting the SeriesValueModifier.YAxisId Property”. Is it mean what I can add markers only on one of Y axis?

0 votes
1k views

Hi team,
I have upgraded dll as mentioned above. While exporting the image both x and y axes are deviating from it’s position. I have attached export1.png image for your reference .
The deviation is happening only when we use Window.Show().

We are using this to generate the report. so we are using window.show().after exporting the image we are closing the window using Window.close()

If we use Window.ShowDialog() exporting as png is working fine. But in our use case we cant use showDialogue, coz here user need to close the window while generating the report.

Before upgrading the Dll, it’s working fine.

I have attached sample code for your reference(SampleCode.txt).
Under Mainwindow.xaml consists two button’s
One button to export png using show window – Here x axes values are deviating as shown in the export1.png
another button to export png as Show Dialogue window. – Here X axes value are plotting correctly

Chart.xaml will use to draw the chart.

Thanks and Regards
Hemanth Patel BS

0 votes
1k views

Hi,

I have problem with Major and MinorTickLinesStyle on axis. The same code produces different results in version 7.x and 8.x. Can you please take a look and let me know what was changed between versions.

Thanks in advance.

Kind regards,
Boštjan

0 votes
1k views

Hello,
I have real-time chart with sorted X axis. It is OK for me because data which displayed on chart comes from industrial equipment with “always incremented” X value. But sometimes process stop. In this case industrial equipment received values near last before stop (differed by 5th or 6th decimal sing). And in this case I don’t need to build chart. I will want check new X values for they next value must be more than previous, because now I have error “Data has been Appended to a DataSeries which is unsorted in the X-Direction. Unsorted data can have severe performance implications in SciChart”.
For Y values DataSeries has DataSeries.LatestYValue and I can compare it to new value. What the best way to avoid adding ‘less than last’ value for X axis.

0 votes
1k views

In a scenario where two numeric axis (X, Y) both have IsCenterAxis set to true, is it then possible to force MouseWheelZoomModifier to use center point of current view when zooming, rather than using mouse point as center point when zooming ?

Showing 1 - 50 of 3k results