SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components

0 votes
0 answers
3 views

Hi!

I would like to plot a series as a solid line AND include error bars. The way I do this now is to define a single series:

var fSeries    = new HlcDataSeries<double, double>();
fSeries.SeriesName = $"My Series!";

And then two different ViewModels:

var fLineVm = new LineRenderableSeriesViewModel();
var fErrorVm = new ErrorBarsRenderableSeriesViewModel();

And set the data series to belong to both:

fLineVm.DataSeries = fSeries;
fErrorVm.DataSeries = fSeries;

This looks ok. But when I show the legend, I see “My Series” in the legend twice, and I can control the error bars separately from the line series.

What I want to happen is that I see the series a single time in the legend and if I turn it off (uncheck it) everything disappears.

Right now, i’m adding those two ViewModels to an ObservableCollection of IRenderableSeriesViewModels and then SeriesBinding to display them.

0 votes
0 answers
5 views

I’m looking for a way to use the mouse wheel to adjust the range on whatever Y-Axis (NumericAxisViewModel) my mouse is over and came across a HasYAxisDragModifierIncludeAxis property.

I’ve set it to True and False and I don’t notice a difference on the axis.

0 votes
0 answers
4 views

I am doing all of my integration with SciChart using c# code.
Is there a way to simply customize the text of the Rollover modifier?

By default it shows

“`
x: somevalue
y: somevalue
z: somevalue

“`

when a data point is selected. I would like to simply change it to

“`

Time: somevalue
Profit: somevalue

“`
Is there a way to do this in pure c# without having to define xml templates etc?

0 votes
0 answers
9 views

Hi,

I am using VerticalLineAnnotation to point to a specific value of XAxis. I want to move this annotation by binding this X1 property and the SelectedX property of ViewModel. But even if SelectedX property was changed, the location of this annotation was not changed immediately. It was changed only after operating the chart (Zooming, etc).
Please let me know any solution to move an annotation immediately.

Thanks,

P.S.
This question is similar to the following:
https://www.scichart.com/questions/wpf/how-to-move-vertical-line-annotation-by-mvvm-command

I asked a question again because I was asking a question by a user whose priority support expired.
Please allow to become multi-post.

0 votes
13 views

Hello.

I am working on Xamarin Android project with C#. Since having a legend within the chart causes problems with too many axis’ (no scrolling is available thus selecting different series in a legend becomes unavailable) and having a legend outside of chart area, anywhere we desire, would be of a preference, is there a tutorial on how could I achieve such a thing? Our project needs this functionality for both Android and iOS.

Would be grateful if anyone could help out with this issue.

Thank you in advance!

  • pauzu asked 2 days ago
  • last active 22 hours ago
0 votes
0 answers
25 views

Hello,

I am trying to round the corners of the bars produced by a SCIFastImpulseRenderableSeries (pointMarker is hidden). Any suggestions how to do that?

Thanks!

0 votes
29 views

Hi…..
I could be able to set clip mode for X axis in ZoomPanModifier(), In the same way I would like to set clip mode Y axis but I couldn’t.
Is there is a way to do that?

  • sci chart asked 6 days ago
  • last active 22 hours ago
0 votes
33 views

Hi,

I have a simple digit chart with four possible values (0, 1, 2, 4).
I want to show all values on Y axis label, but it only shows 0 and 2, is there any solution?

Actual standing

0 votes
34 views

I recently needed to change the Rotation Angle of a polar plot from the default to 90 degrees. We have line annotations for different points on the polar plot. After the change, the annotation was still plotted on the default Rotation Angle.

I manually updated the points like this for the annotations to work:

var line = new LineAnnotation();

                var x1 = (double)NewSeries.DataSeries.XValues[0];
                var x2 = (double)NewSeries.DataSeries.XValues[1];

                if (x1.Between(0, 90) && x2.Between(0, 90))
                {
                    x1 += 270;
                    x2 += 270;
                }
                else
                {
                    x1 -= 90;
                    x2 -= 90;
                }

                line.X1 = x1;
                line.X2 = x2;

Is there another way to update the annotation or is something like this the preferred way?

0 votes
45 views

Dear scichart support.

I’d like to make the two map (Heat map and bubble chart) mixed like attached picture.

Is it possible?

and also I’d like to confirm that it is possible to bind heatmap with observableCollection.

0 votes
45 views

When putting a chart into a listbox, the listbox doesn’t detect if the chart is clicked.

How can i change this, or there is any workarround to it? because i need it to select the parent ListBoxItem.

The problem is that when you put an event listener on the chart it doesn’t know where it is in the list, and when you put it in the listbox it doesn’t see it at all.

Thanks.

PS: I attached an example project where this happens.

0 votes
44 views

hello, i use RolloverModifier on my chart, can i hide Pointmarker?

0 votes
0 answers
49 views

Hi,
I am using VerticalLineAnnotation to point to a specific value of XAxis. I want to move this annotation by binding this X1 property and the SelectedX property of ViewModel. But even if SelectedX property was changed, the location of this annotation was not changed immediately. It was changed only after operating the chart (Zooming, etc).
Please let me know any solution to move an annotation immediately.

Thanks,
Yo Kobayashi

0 votes
44 views

Hi,,
I am using RubberBandXyZoomModifier modifier to zoom the rectangular area of plot. It works fine when rectangle area is within the bound area of plot. But when rectangle area is goes out side the surface , zoom doesn’t happen
Please let me know any solution to zoom in this scenario.

Thanks
Deepak

  • deepak b asked 2 weeks ago
  • last active 2 weeks ago
0 votes
46 views

Hi!

I have a chart that display time-series data and sometimes I have a few minutes of data, other times I have hours. All of the data points are taken every minutes. The X-Axis starts at 0 minutes and progresses from there.

My goal is to have the Axis Title say “Minutes” if there are < 120 points of data. If there are > 120 points of data then I want the Axis to be titled “Hours” and then divide the X-Axis label by 60.

I’ve started with this: https://www.scichart.com/documentation/v5.x/webframe.html#Axis%20Labels%20-%20LabelProvider%20API.html

and it’s doing about what I expect. I check the AxisCore’s Range and if the range is > 120 I set the AxisCore.AxisTitle to “Hours”, otherwise “Minutes”. So far so good.

The problem is that doing it this way means I have labels such as “48.333333” for the hours.

If, on the other hand, when I create the XYSeries that I’m plotting I pass in the already-divided-by-60 values, SciChart seems to select whole numbers so instead of showing me something like “48.333333” it would either show me “48” or it would use 50 or another whole number for the tick marks.

So my question: Is this doable by just writing a custom LabelProvider? Do I need to write a custom Axis class instead? Or somehow tell the Axis that’s in-use to recalibrate itself by dividing all of the elements by 60 before computing tick marks?

In the images I’m attaching, one plot shows me plotting a series where when I create series the x-value is being divided by 60 before I call .Append() on the series. The other one shows what happens when I use my custom LabelProvider and divide by 60 when the Axis label is drawn.

Thanks!

-David

0 votes
42 views

I am still experiencing the effects of this defect despite using v2.5.0.2598 of the Android libraries. Can someone please explain to me how to circumvent this behavior? It seems silly to require a base series that is ultimately going to be replaced by real-time updates.

Cheers

  • TJ Cook asked 2 weeks ago
  • last active 1 week ago
0 votes
44 views

When I import my own .jar library after importing Scichart .aar libraries(core and data) my own .jar library generates an error(Error: findLibrary returned null). How can I overcome that error.

0 votes
57 views

I’m trying to control the size of the bubbles that are being plotted in the FastBubbleRenderableSeries.

I’ve tried all these things, but I can’t seem to figure it out:

  1. Changing values that are plotted: there seems to be some “normalization” that occurs behind-the-scenes, so whether I scale the raw values, the bubble size is identical.
  2. Changing ZScaleFactor: Regardless of what value I use for ZScaleFactor, the bubble size is still the same.

I’ve attached the problem I’m facing, would appreciate your help.

Thanks.

0 votes
51 views

Hello,

I have the problem, that sometimes only one label is shown on the X-Axis even when there is space to show some more, than only one.
The property “IsLabelCullingEnabled” would show them all, but than it is ugly if there is not enough space.
So what can I do to have some more Labels shown?

In the Screenshots you can see that with only a few pixels more, more labels are shown, but the could have been also shown with less pixels (Especially Label “1” and “22” could have been shown).

0 votes
0 answers
43 views

On Meizu X8 mobile phone, why does the axle label display change line? How to solve it?

IAxis yAxis = sciChartBuilder.newNumericAxis().withAxisAlignment(AxisAlignment.Left).withIsLabelCullingEnabled(false).withGrowBy(0.05d, 0.05d).withDrawMajorBands(false).withMaxAutoTicks(5).withDrawMajorTicks(true).withDrawMinorTicks(false).withAutoRangeMode(AutoRange.Always).build();
    yAxis.setTextFormatting(" 0.0");
    yAxis.setTickProvider(new CalendatTickProvider(6));
    Collections.addAll(surface.getYAxes(), yAxis);
0 votes
54 views

I’m working on a project that updates about 100,000 pointers in real time, but it takes too much time to change the individual colors of the pointers.
Is there any quick way to change pointer individual color?

0 votes
88 views

To whom this may concern:

I would like to create a custom data series where I can manipulate the X-Values more efficiently for a ColumnRenderableSeries, where if I remove a column from the chart or there is a gap in the data, I won’t have any spaces between any of the columns in the chart. I also haven’t found any documentation on creating a custom data series.

My approach is to treat the X values like a stack.
– If a point is appended, a value is pushed to the X values stack and the Y values list.
– If a point is to be removed using RemoveAt(), it only removes the Y-Axis value from the index and pops the X values stack so the order and spacing of the x-values remain the same.

This is similar to Microsoft Excel, where removing a data row linked to a chart deletes the X-axis value instead of leaving a gap.

My thinking is making the following derivation of XYDataSeries (in C# pseudocode):

ColumnDataSeries<TY> : XyDataSeries<int, TY> where TY : IComparable
{
    Stack<IComparable> XValues { get; set; }
    IList<IComparable> YValues { get; set; }

    Append (T value) 
    {
        XValues.Push (XMax + 1);
        YValues.Add (value);
    }

    RemoveAt (int index) 
    {
        XValues.Pop ();
        YValues.RemoveAt (index);
    }
}

Can you please advise or provide any documentation for this?

Thank you, and best regards!

— Ari

Edit: Sorry if the code doesn’t look right, I don’t know how to properly wrap C# code on the forums.
Edit 2: Second attempt at posting code. Should see the generics now.

  • Ari Sagiv asked 3 weeks ago
  • last active 7 days ago
0 votes
66 views

Hello,

I have created some ChartModifiers in a ModifierGroup in my ViewModel class (using Caliburn.Micro as MVVM framework, not code behind) and bound the group to my SciChartSurface in xaml. Now I want to apply some styles to my modfiers in xaml. Just creating styles with the specific target types don’t work so how do I do this?

  • Roland D asked 3 weeks ago
  • last active 2 days ago
0 votes
0 answers
39 views

Hello,

The problem is how to sign the X-axis (the time axis).
How can I change the date and time format on the x axis?
Is this possible when I use the SCICategoryDateTimeAxis?
We use the code from example to set the time format

0 votes
0 answers
36 views

How can I create CustomCategoryLabelProvider?
How can i do this?
This example does not work for me

0 votes
71 views

Hello

I have 2 charts, a 2D Heatmap and a 3D Waterfall chart, and I want to be able to programmatically change their color palettes.

The 2D heatmap is set up like this, with the GradientStops bound to an ObservableCollection:

...
<s:HeatmapColorPalette x:Key="HeatmapColorPalette" Maximum="{Binding MaxValue,Mode=TwoWay}"  GradientStops="{Binding ColorPalette}"/>
...
<s:SciChartSurface.RenderableSeries>
    <s:FastUniformHeatmapRenderableSeries 
        x:Name="heatmapSeries" 
        DataSeries="{Binding Data}"
        ColorMap="{StaticResource HeatmapColorPalette}">
    </s:FastUniformHeatmapRenderableSeries>
 </s:SciChartSurface.RenderableSeries>
...

This works as expected. When the binding changes the palette/heatmap changes.

The 3D waterfall is set up the similarly:

...
<s3D:GradientColorPalette x:Key="GradientColorPalette" IsStepped="False"  GradientStops="{Binding ColorPalette}" />
...
<s3D:SciChart3DSurface.RenderableSeries>
    <s3D:WaterfallRenderableSeries3D
        x:Name="waterfallSeries"
        DataSeries="{Binding Data3D}"
        YColorMapping="{StaticResource GradientColorPalette}"
        SliceThickness="1">
    </s3D:WaterfallRenderableSeries3D>
</s3D:SciChart3DSurface.RenderableSeries>
...

This, when passed the same data, doesn’t render the chart.
This chart otherwise works fine if I define the GradientStops statically in the XAML.

This is the GradientStops definition (in f#):

let BlueRed = 
        new ObservableCollection<GradientStop>([
            new GradientStop(Color.FromRgb(0x00uy,0x00uy,0xFFuy),0.0)
            new GradientStop(Color.FromRgb(0xFFuy,0x00uy,0x00uy),1.0)
        ])

I am not sure what I am missing.

(edit: apologies for formatting issues in the question)

0 votes
64 views

I just switched from using the CategoryDatetimeAxis to the DatetimeAxis. I need to use the DatetimeAxis because i first fetch datetime data that has an interval on a minute basis. After that the data will be in a one second interval. The CategoryDatetimeAxis results in a equidistant behaviour which does not reflect the usecase in this scenario. The distance of the values must be relative to their difference in time. That is why the DatetimeAxis fits my need.

However, the DatetimeAxis interpolates between two dates when there is no data available. Is there a way to disable this behaviour, such that no line is drawn between two dates, but just a gap. I have tried to use the DrawNaNAs = LineDrawMode.Gaps, but this only works on nan data. Which is not precisely the case.

I have attached a picture which reflects my point. The red circled area is what i don’t want to show. Ideally the two dates would just squash next to each other.

0 votes
0 answers
52 views
.

.

0 votes
42 views

Hi,
I am working on Scichart android appliication.By default it is appending infinite Yvalues which are randomly generated one by one. I want to append finite data in AnimatingLineChartFragment() but it will not accept it, like when I append arrayList of yValue it will generate an error and ask to add Collections.singleton(t) on 1st argument .Afterwards when I run the programme it works fine but when Fifo Capacity ends it starts to draw last line again and again. Plz help me that how can Animate Lines on my data?

0 votes
59 views

Why Scichart for Android Tutorial 09 – Linking Multiple Charts is not working properly?
The Upper surface is working properley but lower surface is not rendering data.
https://www.scichart.com/documentation/android/v2.x/webframe.html#Tutorial%2009%20-%20Linking%20Multiple%20Charts.html

0 votes
78 views

Hi,

I’m looking for the old version 3.1.0.5122. Where can I find it?

Best regards

  • miri asked 4 weeks ago
  • last active 7 days ago
0 votes
73 views

I am working on Scichart Android application .I am using two Scichart surfaces on a single activity ,I want to handle click event on scichart surface so that,whenever I click on surface it will start a new activity which contains a single Scichart.

0 votes
71 views

Dear support,

What is the best way to anchor a GroupBox to the top right corner of a SciChartSurface (as shown in the attached screenshot)? At the moment, I am using an absolute positioning that often fails at initialization or when the surface is resized. I am looking into the annotation API, but have not yet found a clean solution.

Thank you,
Lucas

0 votes
64 views

I am attempting to transfer a license from another developer to myself. That developer has deactivated the license using the licensing wizard yesterday, and his account shows the license as deactivated, but when I attempt to activated the license errors occur

Serial key ************************** has already been activated by UserName=catesax, ‘Andrew Cates’,

0 votes
60 views

I am using Abt.Controls.SciChart.Wpf dll(Version ) in our project and got an error ‘Object reference not set to an instance of an object’ when i do mousewheel scroll over symbol drop down and move the mouse over the scichart surface while scrolling and the error stack trace is

at Abt.Controls.SciChart.ChartModifiers.MouseWheelZoomModifier.OnModifierMouseWheel(ModifierMouseArgs e)
at Abt.Controls.SciChart.ChartModifiers.ModifierGroup.SB(Action2 C, ModifierEventArgsBase D)
at Abt.Controls.SciChart.Common.Extensions.EnumerableExtensions.[](IEnumerable
1 , Action`1 )
at Abt.Controls.SciChart.Utility.Mouse.MouseManager..(Object , MouseWheelEventArgs )
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at TradingSystemApp.Program.Main() in

0 votes
77 views

I am developing an Android application for ELD. I have also explored the graph options SciChart is offering but I could not see a very similar graph to the image I have attached.
Please help me in choosing an appropriate type graph. It would be more helpful if you could name type of the graph I have attached.
enter image description here

0 votes
77 views

I have a fairly simple multiple series line chart, which shows the history of a couple of variables within the last 5, 15, or 30 minutes.

The x axis is always ranged between Now – X mins and Now + 10 secs (to allow for clock error).

I’d like to have the x axis constantly scrolling, smoothly. I’ve not been able to achieve this using a timer. I’ve tried to use AnimatedVisibleRange, triggered from a 500ms timer, but there’s quite visible jerking.

I should add that the data comes in sporadically, but the chart should still scroll without any new data.

What am I missing? Thanks

0 votes
65 views

Hi!

I’ve put a couple of charts in a recyclerview based on this example. I’m using a custome theme that’s basically just a white background and grey gridlines. When the charts get recycled (after scrolling them out of view and then back) they start to look weird. Does anyone know what is causing this behavior? I’ve tried two different versions of SciChart, screenshots attached below. Additionally I used to only get some random black squares like this in version 2.0.0.1654, but I can’t seem to reproduce that now.

Chart normally:
Regular Chart

After recycle in version 2.0.0.1654:
After recycle version 2.0.0.1654

After recycle in version 2.5.0.2540:
After recycle version 2.5.0.2540

0 votes
67 views

I have created a CustomControl that have scichart surface which draws a FastLineRenderableSeries and some other controls like buttons etc for controlling how data is displayed.
I have some dependecy properties like
– VisibleRange
– Horizontal and vertical Anotations values
as well as the XyDataSeries<double,double>

When I use the control in a window I can data bind to a viewmodel and VisibleRange and the annotations are fine but not the update of the XyDataSeries.

Any ideas?

0 votes
78 views

Hi All,

I am new to SciChart world and need little assistance. I have to export scichart to image(format not matter right now). I am using WPF with MVVM. I have created a scichartsurface object in my viewmodel and now tryng to assign different properties that are bind to my actual scichartsurface in View. I am facing type casting error while assigning annotation preperty.

Here’s I define Annotation bind to actual graph in view

     public BindableCollection<TextAnnotationViewModel> GraphAnnotations;

here’s the code for where I am getting type mismatch error

    private void ChartToImage()
    {
        var chart = new SciChartSurface()
        {
            RenderableSeries = new RenderableSeriesSourceCollection(LineRenderSeries)
            Annotations = GraphAnnotations,
        };
    }

Here’s my View code

    <s:SciChartSurface
        Name="sciChart"
        Annotations="{s:AnnotationsBinding GraphAnnotations}"
        RenderableSeries="{s:SeriesBinding LineRenderSeries}">

It would be great if you also give example and details for X,Y Axis casting for my above ChartToImage method.

0 votes
88 views

Hi team,

How to access, enable and disable scrollbar in c# wpf?

My declaration is as of below.

            <sc:SciChartScrollbar Axis="{Binding ElementName=SciChart, Path=XAxis}" Height="18" Width="150" />

Thanks in advance.

  • Adrian Loh asked 1 month ago
  • last active 4 weeks ago
0 votes
93 views

Hi Team,

I added the PinchZoomModifier to my chart. However, when we do the gesture it does not zoom, instead, it pans the y-axis.
Here is the code:

<s:SciChartSurface s:ThemeManager.Theme="BrightSpark">
            <s:SciChartSurface.ChartModifier>
                <s:ModifierGroup>
                    <s:VerticalSliceModifier ShowTooltipOn="Never">
                        <s:VerticalSliceModifier.VerticalLines>
                            <s:VerticalLineAnnotation Style="{StaticResource SliceStyle}" X1="{Binding SelectedStartDate, Mode=TwoWay}" IsEditable="True"/>
                            <s:VerticalLineAnnotation Style="{StaticResource SliceStyle}" X1="{Binding SelectedEndDate, Mode=TwoWay}" IsEditable="True"/>
                        </s:VerticalSliceModifier.VerticalLines>
                    </s:VerticalSliceModifier>
                    <s:RubberBandXyZoomModifier ExecuteOn="MouseLeftButton"
                                                RubberBandFill="#AA34aeeb" RubberBandStroke="#AAFFFFFF"
                                                RubberBandStrokeDashArray="2 2"/>
                    <s:PinchZoomModifier XyDirection="XDirection"/>
                    <s:MouseWheelZoomModifier XyDirection="XDirection"/>
                    <s:ZoomExtentsModifier ExecuteOn="MouseDoubleClick" />
                    <s:YAxisDragModifier DragMode="Pan"/>
                    <s:XAxisDragModifier DragMode="Pan" ClipModeX="None"/>
                </s:ModifierGroup>
            </s:SciChartSurface.ChartModifier>
            <s:SciChartSurface.XAxis>
                <s:DateTimeAxis AxisTitle="Time" VisibleRange="{Binding XVisibleRange, Mode=TwoWay}"
                                TextFormatting="dd-MMM-yyyy" SubDayTextFormatting="HH:mm:ss" DrawMinorTicks="True" />
            </s:SciChartSurface.XAxis>
            <s:SciChartSurface.YAxis>
                <s:NumericAxis AxisTitle="Distance" VisibleRange="{Binding YVisibleRange, Mode=TwoWay}"/>
            </s:SciChartSurface.YAxis>
            <s:SciChartSurface.RenderableSeries>
                <s:XyScatterRenderableSeries DataSeries="{Binding Chirps}" >
                    <s:XyScatterRenderableSeries.PointMarker>
                        <s:EllipsePointMarker Width="9" Height="9" Fill="SteelBlue" Stroke="LightSteelBlue" StrokeThickness="2"/>
                    </s:XyScatterRenderableSeries.PointMarker>
                </s:XyScatterRenderableSeries>
            </s:SciChartSurface.RenderableSeries>
        </s:SciChartSurface>

Can you please help me to know what’s wrong here?

0 votes
129 views

Hello

I’m using RealTimeHeatmap, my vertion is v5.3.0.11954

I fond that when my data with maximum value below 20 (including) ,it works well;

however when my data with maximum value above 20,like 21 ,it dosen’t work. no warnings nor errors ,no map shows nor actions,just makes my program dead

I have read the example in Examples Suit, the values are OK in example, I dont know where the wrong is.

data with maximum value below 20

map shows,and works well

data with maximum value above 20,like 21

0 votes
110 views

Hello!

I am trying to programmatically set a range for HeatmapColorPalette and attached HeatmapColorMap to min and max of my data.

Binding HeatmapColorPalette.Maximum to a property in my View Model works well. However, when I add HeatmapColorMap everything breaks, the heat map no longer responds to changes in View Model.

What am I doing wrong?

Here is my View:

<Window x:Class="SciChartHeatMap.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:local="clr-namespace:SciChartHeatMap"
    xmlns:s="http://schemas.abtsoftware.co.uk/scichart"
    d:DataContext="{d:DesignInstance Type=local:HeatMapViewModel, IsDesignTimeCreatable=True}"
    mc:Ignorable="d"
    Title="MainWindow" Height="450" Width="800">
<Grid>
    <Grid.Resources>
        <s:GradientStopsToLinearGradientBrushConverter x:Key="ColorsToLinearGradientBrushConverter"/>
    </Grid.Resources>
    <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition Width="Auto"/>
    </Grid.ColumnDefinitions>
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition/>
    </Grid.RowDefinitions>
    <s:SciChartSurface Grid.Row="0" Grid.RowSpan="2">
        <s:SciChartSurface.RenderableSeries>
        <s:FastUniformHeatmapRenderableSeries x:Name="HeatMapSeries" DataSeries="{Binding Data}" Opacity="0.9">
            <s:FastUniformHeatmapRenderableSeries.ColorMap>
                <s:HeatmapColorPalette Maximum="{Binding ColorMaximum}">
                    <s:HeatmapColorPalette.GradientStops>
                        <GradientStop Offset="0" Color="DarkBlue"/>
                        <GradientStop Offset="0.2" Color="CornflowerBlue"/>
                        <GradientStop Offset="0.4" Color="DarkGreen"/>
                        <GradientStop Offset="0.6" Color="Chartreuse"/>
                        <GradientStop Offset="0.8" Color="Yellow"/>
                        <GradientStop Offset="1" Color="Red"/>
                    </s:HeatmapColorPalette.GradientStops>
                </s:HeatmapColorPalette>
            </s:FastUniformHeatmapRenderableSeries.ColorMap>
        </s:FastUniformHeatmapRenderableSeries>
        </s:SciChartSurface.RenderableSeries>
        <s:SciChartSurface.XAxis>
            <s:NumericAxis 
                FlipCoordinates="False" 
                ScientificNotation="None" 
                AutoTicks="False"
                MajorDelta="1"
                MinorDelta="0.5"
                AxisAlignment="Top"/>
        </s:SciChartSurface.XAxis>
        <s:SciChartSurface.YAxis>
            <s:NumericAxis 
                FlipCoordinates="True" 
                ScientificNotation="None"
                AxisAlignment="Left"/>
        </s:SciChartSurface.YAxis>
    </s:SciChartSurface>

    <!-- Enabling this will break the program
    <s:HeatmapColorMap
        Grid.Column="1"
        Grid.Row="0"
        Grid.RowSpan="2"
        Margin="5,0,5,0"
        HorizontalAlignment="Right"
        VerticalAlignment="Stretch"
        DataContext="{Binding Source={x:Reference Name=HeatMapSeries}, Mode=OneWay}"
        ColorMap="{Binding ColorMap.GradientStops, Converter={StaticResource ColorsToLinearGradientBrushConverter}}"
        Maximum="{Binding ColorMap.Maximum}"
        Orientation="Vertical">
    </s:HeatmapColorMap>
    -->

    <Label 
        Grid.Row="0" 
        Grid.Column="2" 
        Content="{Binding ColorMaximum}" 
        Width="50" 
        HorizontalContentAlignment="Center"/>
    <Slider 
        Grid.Column="2" 
        Grid.Row="1" 
        Orientation="Vertical" 
        Minimum="0" 
        Maximum="10" 
        HorizontalAlignment="Center"
        Value="{Binding ColorMaximum}"/>
</Grid>

The idea in this small example is for slider to control both HeatmapColorPalette.Maximum and s:HeatmapColorMap.Maximum

The code in my View Model is pretty simple:

private double mColorMax;

public double ColorMaximum
    {
        get => mColorMax;

        set
        {
            mColorMax = value;
            OnPropertyChanged();
        }
    }

My View Model implements INotifyPropertyChanged

I will appreciate any suggestions.

Thank you in advance!

0 votes
0 answers
80 views

I’ve made a candle stick chart.
It is displayed correctly on data of 1 to 23 minute in time series.
But for data above 23 minute in time series, it is not displayed correctly.
I attach a screen shot.
I’ve looked through all the data on chart with debugging, the data are all correct.
But the candles of the chart is not consistent to the data.
For the data below 23 minute in time series, it is all right.
I could not find the problem from my code.
The following is a part of my code for setting data on the chart.
private void setChartData(SmChartData chart_data) {
try {
if (chart_data == null)
return;

        chartType = chart_data.chartType;
        chartCycle = chart_data.cycle;


        final IRange visibleRange = surface.getXAxes().get(0).getVisibleRange();

        if (getSeriesType() == SmSeriesType.CandleStick || getSeriesType() == SmSeriesType.Ohlc) {
            if (ohlcDataSeries != null) {
                ohlcDataSeries.clear();
                ohlcDataSeries.append(chart_data.getDate(), chart_data.getOpen(), chart_data.getHigh(), chart_data.getLow(), chart_data.getClose());
                visibleRange.setMinMaxDouble(0, ohlcDataSeries.getCount() - 1);


            }
        } else {
            if (xyDataSeries != null) {
                xyDataSeries.clear();
                xyDataSeries.append(chart_data.getDate(), chart_data.getClose());
                visibleRange.setMinMaxDouble(0, xyDataSeries.getCount() - 1);
            }
        }

        // 주문의 위치를 다시 찾아 준다.
        refreshOrderAnnotation();
    } catch (Exception e) {
        String msg = e.getMessage();
    }
}

What is the problem?
Please let me know why It is not display its candles correctly for some time series values.
Thank you very much.

0 votes
85 views

Hello,

I had previously commented on an existing issue, but wanted to bump here since it’s impeding development.

When adding a DataPointSelectionModifier to a chart surface containing a FastUniformHeatmapRenderableSeries with a UniformHeatmapDataSeries, an exception is thrown on a mouse drag.

The modifier is added simply with:

<s:SciChartSurface.ChartModifier>
    <s:ModifierGroup>
        <s:DataPointSelectionModifier/>
    </s:ModifierGroup>
</s:SciChartSurface.ChartModifier>

After adding this modifier and using my mouse to select a part of the heatmap, I get the following System.InvalidOperationException (stack trace below):

"Metadata for his type cannot be returned as an one-dimentional array. Please use the IPointMetadata[,] Metadata property"

I’m assuming this is happening because DataPointSelectionModifier was by default not meant for data series with 2D arrays, but I’m not sure how to follow the exception message “Please use the IPointMetadata[,] Metadata property”.

Ultimately I am trying to run a calculation on the selected subset of the heatmap. Any help would be appreciated and thanks in advance!

Stack trace:

  at SciChart.Charting.Model.DataSeries.Heatmap2DArrayDataSeries.BaseHeatmapDataSeries`3.SciChart.Charting.Model.DataSeries.IDataSeries.get_Metadata()
   at SciChart.Charting.ChartModifiers.DataPointSelectionModifier.UpdateState()
   at SciChart.Charting.ChartModifiers.DataPointSelectionModifier.KUB()
   at A.MEB.D[D](D D, Boolean I, Func`1 J)
   at SciChart.Charting.ChartModifiers.DataPointSelectionModifier.get_SelectedPointMarkers()
   at SciChart.Charting.ChartModifiers.DataPointSelectionModifier.DeselectAllPointMarkers()
   at SciChart.Charting.ChartModifiers.DataPointSelectionModifier.SelectManyPoints(Point startPoint, Point endPoint, SelectionMode selectionMode)
   at SciChart.Charting.ChartModifiers.DataPointSelectionModifier.OnModifierMouseUp(ModifierMouseArgs e)
   at SciChart.Charting.ChartModifiers.ModifierGroup.FTB(Action`2 D, ModifierEventArgsBase I)
   at SciChart.Core.Extensions.EnumerableExtensions.ForEachDo[T](IEnumerable`1 enumerable, Action`1 operation)
   at SciChart.Core.Utility.Mouse.MouseManager.GB(IPublishMouseEvents D, IReceiveMouseEvents I, MouseEventArgs J, MouseButtons M, Action`3 O)
   at SciChart.Core.Utility.Mouse.MouseManager.AEB.S(Object D, MouseButtonEventArgs I)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at Main.main(String[] _arg1) in ...\App.fs:line 13
  • jsacks asked 1 month ago
  • last active 1 month ago
0 votes
107 views

Thank you for your support.

This time, I’d like to know
– how to get the position data on cursor in the heatmap.
– how to draw or remove the horizontal and vertical line on cursor point in the heatmap.

Thank you.

0 votes
86 views

Via MVVM I’m binding an ObservableCollection to my chart. I’m trying to support both a rollover modifier and a tooltip modifier based on a user selection (checkboxes). On the backend I only apply the StyleKey to “TooltipStyle” when one of these checkboxes are selected. I can verify that my model is being updated correctly and that I am able to assign the “StyleKey” to each series in my collection when these values change. However the “tooltips” are never displayed. The rollover works as expected, and I see the tooltip for it, but I can never get the tooltip to display when rollover is unchecked. See anything wrong?

<!-- Modifiers (zoom, panning, tooltips, cursor) -->
        <s:SciChartSurface.ChartModifier>
            <s:ModifierGroup>
                <s:RubberBandXyZoomModifier IsAnimated="True" IsXAxisOnly="False" />
                <s:ZoomExtentsModifier ExecuteOn="MouseDoubleClick" />
                <s:ZoomPanModifier ExecuteOn="MouseRightButton" />
                <s:MouseWheelZoomModifier ActionType="Zoom" XyDirection="XYDirection" />
                <s:XAxisDragModifier DragMode="Scale" />
                <s:YAxisDragModifier DragMode="Scale" />
                <s:TooltipModifier x:Name="ChartTooltip" IsEnabled="{Binding Path=ShowTooltips}" />
                <s:RolloverModifier IsEnabled="{Binding Path=SnapToPoints}" />
                <s:CursorModifier x:Name="ChartCursor" IsEnabled="False" ShowAxisLabels="True" Foreground="Red" />
            </s:ModifierGroup>
        </s:SciChartSurface.ChartModifier>

My styles are defined below. When I want to see either the tooltips or the rollover I assign the StyleKey to “TooltipStyle” and when neither of them is selected I assign the StyleKey to “NoTooltipStyle”.

            <!-- Template for regular tooltips -->
        <DataTemplate x:Key="TooltipDataTemplate" DataType="{x:Type s:XySeriesInfo}">
            <StackPanel Orientation="Vertical">
                <TextBlock Foreground="White">
                        <Run Text="Distance: " />
                        <Run Text="{Binding FormattedXValue, Mode=OneTime}" />
                        <Run Text=" cm" />
                </TextBlock>
                <TextBlock Foreground="White">
                        <Run Text="Relative dose: " />
                        <Run Text="{Binding FormattedYValue, Mode=OneTime}" />
                    <Run Text=" %" />
                </TextBlock>
            </StackPanel>
        </DataTemplate>

        <!-- Hover template for snap -->
        <DataTemplate x:Key="SnapDataTemplate" DataType="{x:Type s:XySeriesInfo}">
            <StackPanel Orientation="Vertical">
                <TextBlock Foreground="White">
                        <Run Text="Distance: " />
                        <Run Text="{Binding FormattedXValue, Mode=OneTime}" />
                        <Run Text=" cm" />
                </TextBlock>
                <TextBlock Foreground="White">
                        <Run Text="Relative dose: " />
                        <Run Text="{Binding FormattedYValue, Mode=OneTime}" />
                    <Run Text=" %" />
                </TextBlock>
            </StackPanel>
        </DataTemplate>

        <!-- Standard series with snap tooltip and regular tooltip -->
        <Style TargetType="{x:Type s:FastLineRenderableSeries}" x:Key="TooltipStyle">
            <Setter Property="s:TooltipModifier.TooltipTemplate" Value="{StaticResource TooltipDataTemplate}" />
            <Setter Property="s:SeriesValueModifier.IncludeSeries" Value="False" />
            <Setter Property="s:RolloverModifier.TooltipTemplate" Value="{StaticResource SnapDataTemplate}" />
        </Style>

        <!-- Standard series with no tooltip -->
        <Style TargetType="{x:Type s:FastLineRenderableSeries}" x:Key="NoTooltipStyle">
            <Setter Property="s:TooltipModifier.IncludeSeries" Value="False" />
            <Setter Property="s:SeriesValueModifier.IncludeSeries" Value="False" />
            <Setter Property="s:RolloverModifier.IncludeSeries" Value="False" /> 
        </Style>
0 votes
94 views

Dear SciChart Team:

My application is a time chart, the X axis is TimeSpan, the Y axis is a value, I want to append points with a fixed X axis length, but my current practice is to fix the number of points.

For example:
TimeSpan is fixed at ten seconds. After points is appended, if TimeSpan exceeds ten seconds, the first point is deleted, and the latest point are retained.

  • Johnny Yeh asked 1 month ago
  • last active 1 month ago
0 votes
94 views

Dear SciChart Team:

An exception occurs when I drag the X-axis to change the scale via the XAxisDragModifier (as shown in the attached image).
This happens when the X-axis scale is dragged out of view.
Is there any reason for this exception to occur? How can I rule out?

  • Johnny Yeh asked 1 month ago
  • last active 1 month ago
Showing 1 - 50 of 3k results