Pre loader

Forums

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

1 vote
1k views

Hello,

I am experiencing an issue with the BoxAnnotation in SciChart where the precision of the box’s boundaries does not accurately match the data points it is supposed to represent. When dynamically creating a BoxAnnotation to highlight a range of values on a chart, the upper boundary (y2) is set to match the maximum value within the specified range. Despite the calculation seeming accurate, the rendered annotation’s top edge is visually lower than the top of the highest column it encompasses, creating a slight discrepancy. In my application, I am creating a lot of charts, and this issue occurs only on charts with a big data range.

Environment:

SciChart Version: 3.2.532
Browser: Chrome

Attaching code snippet on jsfiddle:
https://jsfiddle.net/c9dekx6v/2/

Regards,
Dmytro

0 votes
5k views

Hello,

i’ve created the following sample application were i tried to use CategoryDateTimeAxisViewModel as x axis:

class MainViewModel : INotifyPropertyChanged
{
    private IAxisViewModel _xAxis;
    private IAxisViewModel _yAxis;

    public event PropertyChangedEventHandler PropertyChanged;

    public IAxisViewModel XAxis
    {
        get { return _xAxis; }
        set
        {
            if (_xAxis != value)
            {
                _xAxis = value;
                OnPropertyChanged();
            }
        }
    }

    public IAxisViewModel YAxis
    {
        get { return _yAxis; }
        set
        {
            if (_yAxis != value)
            {
                _yAxis = value;
                OnPropertyChanged();
            }
        }
    }

    public MainViewModel()
    {
        XAxis = new CategoryDateTimeAxisViewModel
        {
            AxisTitle = "X-Achse",
            Id = "DefaultAxisId",
            AxisAlignment = AxisAlignment.Bottom,
            AutoRange = AutoRange.Always,
            TickProvider = new DateTimeTickProvider()
        };
        YAxis = new NumericAxisViewModel
        {
            AxisTitle = "Y-Achse",
            Id = "DefaultAxisId",
            AxisAlignment = AxisAlignment.Left,
            AutoRange = AutoRange.Always,
            TickProvider = new NumericTickProvider()
        };
    }

    [NotifyPropertyChangedInvocator]
    protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
    {
        PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
    }
}

<Window x:Class="WpfApp1.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:WpfApp1"
    xmlns:s="http://schemas.abtsoftware.co.uk/scichart"
    mc:Ignorable="d"
    Title="MainWindow" Height="450" Width="800">
<Window.DataContext>
    <local:MainViewModel/>
</Window.DataContext>
<DockPanel>
    <s:SciChartSurface DockPanel.Dock="Top"
                       ChartTitle="Testdiagramm"
                       XAxis="{s:AxesBinding XAxis}"
                       YAxis="{s:AxesBinding YAxis}">
    </s:SciChartSurface>
</DockPanel>

When i run the application i can see only the axis titles but no axes, gridlines etc. However when i replace CategoryDateTimeAxisViewModel with DateTimeAxisViewModel everything works fine and looks like expected. What am i doing wrong?

Best regards
Alexander

0 votes
4k views

Hi all,

I have another question about SciChart.js, I hope someone can teach me.

First, please download this video

This chart in video is made by d3.js, I hope I can use SciChart.js to make the same features,
please watch from 7 second to the end, when I click the mouse and move to the right direction, then click mouse again,
the section from first click to the second click will make different color, someone can teach me how to do that

PS: English is not my mother language, I wish you all can understand what I mean, Please download the video and watch, thanks.

1 vote
18k views

Hi

I would like to do some logic after zooming in but can not find to witch event I should subscribe or overwrite ?

3 votes
20k views

I’m wondering what the established methods would be for the following scenario:

You generate data in your own assembly and dump it into an XyDataSeries and point or line render series with an IChartSeriesViewModel object and bind that using the SeriesSource api.

But it is relatively common to have additional metdata about a given datapoint that is keyed to something other than an X or Y value. For example, the plot may be based on the a computed number that is independent of a time value, but you still want to display the time value for that chart in the rollover tooltip.

What are the options for dealing with this in scichart?

Best and thanks!

  • dsantimore asked 11 years ago
  • last active 2 years ago
0 votes
18k views

Good day, everybody!
I’ve got a problem. I’m working with inherited class from LineAnnotation- MarkerLineAnnotation. I’ve added some fields to the class. When I set X1=0 and X2=100000, displayed the element on SciChartSurface, I tried to zoom in. But after a few zooms my MarkerLineAnnotations had disappeared.
After that situation I set X1=0 and X2=10000 and tried to zoom in. I could zoom in my custom annotations for a long time, but they had disappeared too.

How can I solve this problem?
I’ve attached screenshots describing this problem. (Image 1-normal size for line with X1=0 and X2=10000 , Image 2-zoom, when disappearing took place for line with X1=0 and X2=10000; Image 3-normal size for line with X1=0 and X2=100000 , Image 4-zoom, when disappearing took place for line with X1=0 and X2=10000)
Thanks in advance.

  • Egor asked 10 years ago
  • last active 10 years ago
0 votes
12k views

To whom this may concern:

I’m having a slight issue (bug, possibly?) with custom annotations. I have created a custom annotation with an image (XAML shown below)

<s:CustomAnnotation x:Class="Dashboard.SciChartCustomComponents.CustomAnnotations.MicrostructureAnnotation"
                    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" 
                    xmlns:s="http://schemas.abtsoftware.co.uk/scichart"
                    xmlns:local="clr-namespace:Dashboard.SciChartCustomComponents.CustomAnnotations"
                    mc:Ignorable="d">

    <Border BorderBrush="White" BorderThickness="2" Background="Black">
        <StackPanel>
            <Image x:Name="annotationImage" Stretch="None" Width="150" Height="100" Visibility="Collapsed"/>
            <TextBlock x:Name="annotationText" HorizontalAlignment="Center"/>
            <TextBlock x:Name="parameterText" HorizontalAlignment="Center" Visibility="Collapsed"/>
        </StackPanel>
    </Border>

</s:CustomAnnotation>

The image is applied with the following code (note the anchor points are bottom-right):

var annotation = new MicrostructureAnnotation
{
    HorizontalAnchorPoint = HorizontalAnchorPoint.Right,
    VerticalAnchorPoint = VerticalAnchorPoint.Bottom,
    IsEditable = true,
    X1 = xValue, // Both Obtained from hitpoint X- and Y-Values
    Y1 = yValue
};

annotation.annotationImage.Source = // some image Uri
annotation.annotationText.Text = // some text
annotation.parameterText.Text = // some other text

So this successfully shows the annotation as i liked, shown in 1.png.

Now I have a function that collapses the visibility of the image, which yields an annotation that is removed from its anchor point (although the top-left location remains the same), shown in 2.png.

If I try to move the annotation after removing the image, the anchor point is in the location of where the top-left anchor should be when the image collapses but the image is still in the wrong location, shown in 3.png.

When I finally do move the annotation, the annotation moves away from the cursor to the top-left anchor point, shown in 4.png.

Again i’m not sure if this is a bug, but could someone please advise?

Thanks kindly!

— Ari

Edit: I don’t have this problem when setting the anchor points to top-left.

  • Ari Sagiv asked 8 years ago
  • last active 8 years ago
0 votes
12k views

hi

any plans to support xamarin forms in the future.

  • SPS asked 7 years ago
  • last active 4 years ago
0 votes
8k views

I have CategoryDateAxis and whant to setup range limit from series size – 50 to series size + 10

mBottomAxis.setVisibleRangeLimit(new DoubleRange(series.size() - 50d, series.size() + 10d));
mBottomAxis.setVisibleRangeLimitMode(RangeClipMode.MinMax);

And this code works but not as I expected
When I scrol chalt and hits the range limit scroll is stopped BUT chart is zooming in

How to disable zooming when I hits the limit?

0 votes
5k 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
7k views

I’v tried the latest version[6.5] of SciChart WPF suite and THEN I activated an older version [6.2] in the same computer. Of course, the serial key was left by an ex-colleague. It’s strange that I can activate ver 6.2 and succeed to get a run-time key. But the key cannot be recongnized by the program. It said I didn’t input a run time key in the render surface.
What’ worse, there are no entities rendered in the SciChartSurface. Just show a blank one.

This issue could be reproduced by the following steps:
1. use a trial version of the latest SciChart;
2. activate an older version using an expired license key. [royalty use, right?]

If I reinstall the OS, and use ver 6.2 directly, all works well.

We’ve brought several 6.2 s, I think reinstall OS is not a smart method to solve this. Could it be solved in a more easy way?

  • Niu mag asked 2 years ago
  • last active 2 years ago
0 votes
9k views
  <s:SciChartSurface x:Name="sciChart" Grid.Row="0"
                       s:ThemeManager.Theme="Chrome"
                       LeftAxesPanelTemplate="{StaticResource YAxesPanel}"
                       RightAxesPanelTemplate="{StaticResource YAxesPanel}">

        <s:SciChartSurface.RenderableSeries>
            <s:FastLineRenderableSeries SeriesColor="#FFFF1919" YAxisId="Ch0" />
            <s:FastLineRenderableSeries SeriesColor="#FFFC9C29" YAxisId="Ch1" />
            <s:FastLineRenderableSeries SeriesColor="#FFFF1919" YAxisId="Ch2" />
            <s:FastLineRenderableSeries SeriesColor="#FFFC9C29" YAxisId="Ch3" />
        </s:SciChartSurface.RenderableSeries>

        <s:SciChartSurface.YAxes>
            <s:NumericAxis x:Name="Ch0" Style="{StaticResource YAxisStyle}" Id="Ch0" Grid.Row="0" DrawMajorTicks="False" DrawLabels="False" />
            <s:NumericAxis x:Name="Ch1" Style="{StaticResource YAxisStyle}" Id="Ch1" Grid.Row="2" />
            <s:NumericAxis x:Name="Ch2" Style="{StaticResource YAxisStyle}" Id="Ch2" Grid.Row="4" />
            <s:NumericAxis x:Name="Ch3" Style="{StaticResource YAxisStyle}" Id="Ch3" Grid.Row="6" />
        </s:SciChartSurface.YAxes>

        <s:SciChartSurface.XAxis>
            <s:NumericAxis Name="xAxis" />
        </s:SciChartSurface.XAxis>


        <s:SciChartSurface.Annotations>
                    <s:BoxAnnotation YAxisId="Ch1" Name="boxAnnotationCh1" Background="#33FF6600" BorderBrush="#77FF6600" BorderThickness="1" CornerRadius="3" IsEditable="true" />
            <s:BoxAnnotation YAxisId="Ch2" Name="boxAnnotationCh2"  Background="#33FF6600" BorderBrush="#77FF6600" BorderThickness="1" CornerRadius="3" IsEditable="true" />
            <s:BoxAnnotation YAxisId="Ch3" Name="boxAnnotationCh3"  Background="#33FF6600" BorderBrush="#77FF6600" BorderThickness="1" CornerRadius="3" IsEditable="true" />
                     </s:SciChartSurface.Annotations>
    </s:SciChartSurface>

How can I make BoxAnnotations editable?
I can’t move the boxes in the chart.

1 vote
2k views

Hi Andrew,

I have 2 independent questions,

Q1.
I have been working with uniform heatmap and I need a way to fix the aspect ratio to 1, for all resize, zoom events, is there an option in heatmap to fix an aspect ration? Please see the attached video
https://youtu.be/obhH6KLExYw

Q2.
I am trying to implement a lasso select method to select and highlight the heatmap data. I did not find lasso select in the documentation hence I went ahead and implemented my own method.

I am drawing an svg using D3 (offsetX and offsetY variables) and then adding it to the annotation as you will see in the video and trying to get all the hitTest data inside the lasso.

If I use the customAnnotation then heatmap is able to draw correct size and location of the SVG
customAnnotation:
https://youtu.be/gL34sAbxYSE

But it does not pan and zoom with the plot data. after looking through documentation I came across OverviewCustomResizableAnnotation which seems designed for zooming and panning with the data.

But while using the OverviewCustomResizableAnnotation the SVG size keeps changing during the update and is not located at the correct location relative to the data.

sciChartSurfaceRef.current.annotations.add(
new OverviewCustomResizableAnnotation({
id: "lassoSVG",
x1: shortestXinData,
y1: shortestYinData,
isEditable: false,
isSelected: false,
yCoordinateMode: ECoordinateMode.DataValue,
xCoordinateMode: ECoordinateMode.DataValue,
verticalAnchorPoint: EVerticalAnchorPoint.Top,
horizontalAnchorPoint: EHorizontalAnchorPoint.Left,
svgString: new XMLSerializer().serializeToString(svg.node())
})
)

OverviewCustomResizableAnnotation:
https://youtu.be/-AOJ9V3l-xI

Thanks,

Pramod

0 votes
17k views

Hello,
I would like to allow user click on Legend and highlight the corresponding Series on the chart but I don’t know if this feature is supported or not.

I tried to add mouse events to the Legend Modified but it seems like mouse events are not triggered

This is the simple code that I am using

<s:LegendModifier x:Name="chlLegend" ShowLegend="True" LegendPlacement="Top" Orientation="Horizontal" MouseDown="chlLegend_MouseDown" ScrollViewer.HorizontalScrollBarVisibility="Auto" />

Before investigating more I would like to ask you if you have any hints which is the correct way to implement this behavior.
Is the LegendModifier suitable for this or should I override instead the Legend Control Template?

Thank you in advance for the support

1 vote
5k views

I know there was a bit of mention in the 2021 end of year announcement about porting code over to C++ which would enable there to be future builds of SciChart for WinUI or other platforms… I’m just curious if there is any timeline / estimated timeframe that scichart would have WinUI 3 charts?

1 vote
2k views

Dear SciChart team,

We have been subscribing SciChart WPF 2D Pro for a few years, usually I made some WPF user controls which have SciChartSurface in it, and we use it to display some data in the form of charts. Since my colleagues do not have the developer’s license, so they can’t see these charts on their laptop when they were debugging the solution, but it was fine, they do not care the charts.

Last week I updated the SciChart on my laptop, it works fine on my PC. but it always crashed when my colleagues debugging the solution.

The error info is:
Cannot attach VerticalLineAnnotation, because it is already used.

The call stack is full of SciChart’s calling

at SciChart.Charting.ChartModifiers.VerticalSliceModifier.sfp(VerticalLineAnnotation hhv)
at SciChart.Charting.ChartModifiers.VerticalSliceModifier.sge()
at SciChart.Charting.ChartModifiers.VerticalSliceModifier.OnAttached()
at SciChart.Charting.ChartModifiers.ModifierGroup.geq(IChartModifier gwl)
at SciChart.Core.Extensions.EnumerableExtensions.ForEachDo[T](IEnumerable1 enumerable, Action1 operation)
at SciChart.Charting.ChartModifiers.ModifierGroup.gep(IEnumerable`1 gwk)
at SciChart.Charting.ChartModifiers.ModifierGroup.OnAttached()
at SciChart.Charting.Visuals.SciChartSurface.sjj(IChartModifier anx)
at SciChart.Charting.Visuals.SciChartSurface.sht()
at SciChart.Charting.Visuals.SciChartSurface.OnSciChartSurfaceLoaded()
at SciChart.Charting.Visuals.SciChartSurfaceBase.gtm(Object aqg, RoutedEventArgs aqh)
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.RaiseEvent(RoutedEventArgs e)
at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)
at MS.Internal.LoadedOrUnloadedOperation.DoWork()
at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
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.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(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.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run(Window window)
at System.Windows.Application.Run()
at ABB.Motion.WorkBench.App.Main()

  • Chris Chen asked 2 years ago
  • last active 2 years ago
1 vote
1k views

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>
1 vote
14k views

Here is XAML code which works:

                                <!--  Defines the renderable series. Each series may be styled  -->
                                <visuals:SciChartSurface.RenderableSeries>
                                    <visuals:FastLineRenderableSeries SeriesColor="Red" DataSeries="{Binding Measured1StPointsSeries}" IsVisible="{Binding Is1StMeasured}">
                                    </visuals:FastLineRenderableSeries>

                                    <visuals:FastLineRenderableSeries SeriesColor="Green" DataSeries="{Binding Measured2NdPointsSeries}"  IsVisible="{Binding Is2NdMeasured}">
                                    </visuals:FastLineRenderableSeries>

                                    <visuals:FastLineRenderableSeries SeriesColor="Blue" DataSeries="{Binding Measured3RdPointsSeries}"  IsVisible="{Binding Is3RdMeasured}">
                                    </visuals:FastLineRenderableSeries>
                                </visuals:SciChartSurface.RenderableSeries>

                                <!--  Defines the XAxis, using an explicit VisibleRange  -->
                                <visuals:SciChartSurface.XAxis >
                                    <visuals:NumericAxis AxisTitle="RA Pump Current, A" DrawMajorTicks="True" FontSize="30" TitleFontSize="35" Orientation="Horizontal"  MajorDelta="5" MinorDelta="1" AutoTicks="True" AutoRange="Always" VisibleRange="{Binding PowerXRange}">
                                    </visuals:NumericAxis>
                                </visuals:SciChartSurface.XAxis>

                                <!--  Defines the YAxis  -->
                                <visuals:SciChartSurface.YAxis>
                                    <visuals:NumericAxis AxisAlignment="Left" FontSize="30" TitleFontSize="35" AxisTitle="Power, W" MajorDelta="0.2" MinorDelta="0.1" AutoTicks="False" AutoRange="Always" VisibleRange="{Binding PowerYRange}"/>
                                </visuals:SciChartSurface.YAxis>

                                <!--  Declare ChartModifiers  -->
                                <visuals:SciChartSurface.ChartModifier>

                                    <visuals:LegendModifier x:Name="PowerLegendModifier" Background="White" GetLegendDataFor="AllVisibleSeries"/>

                                </visuals:SciChartSurface.ChartModifier>

                            </visuals:SciChartSurface>
                            <visuals:SciChartLegend  x:Name="PowerChartLegend" Foreground="Black" FontSize="28" Background="White"  LegendData="{Binding LegendData, ElementName=PowerLegendModifier, Mode=OneWay}" Margin="125,23,0,0"  />

But I tried to create chart programaticall to render it in memory and export to bitmap, but I can not add legend:

        //Scichart thing

        var series1St = new FastLineRenderableSeries() {
            SeriesColor = Colors.Red,
            DataSeries = Measured1StPointsSeries,
            IsVisible = Is1StMeasured

        };
        var series2Nd = new FastLineRenderableSeries() {
            SeriesColor = Colors.Green,
            DataSeries = Measured2NdPointsSeries
        };
        var series3Rd = new FastLineRenderableSeries() {
            SeriesColor = Colors.Blue,
            DataSeries = Measured3RdPointsSeries
        };


        var xAxes = new AxisCollection() { new NumericAxis() };

        var yAxes = new AxisCollection() { new NumericAxis() };

        //var powerLegendModifier = new LegendModifier() {
        //    Background = Brushes.White,
        //    GetLegendDataFor = SourceMode.AllVisibleSeries

        //};

        var surface = new SciChartSurface() {
            //ChartTitle = "Rendered In Memory",
            XAxes = xAxes,
            YAxes = yAxes,
            RenderableSeries = new ObservableCollection<IRenderableSeries>() { series1St, series2Nd, series3Rd },
            ChartModifier = new LegendModifier() {
                Background = Brushes.White,
                GetLegendDataFor = SourceMode.AllVisibleSeries
            }
        };

Seems like SourceMode.AllVisibleSeries to be the culprit – tries to update non existing data. How could I have chart modifier added with c# direct code?

1 vote
2k views

Hello, I need to use tooltips to display information to users. However, after using the tooltip, there will be a jam after the tooltip appears and when zooming. How can I optimize the performance.

The following is the code. I use the js example: “Load 500 Series x 500 Points Performance Demo” for transformation

import { NumericAxis } from "scichart/Charting/Visuals/Axis/NumericAxis";
import { FastLineRenderableSeries } from "scichart/Charting/Visuals/RenderableSeries/FastLineRenderableSeries";
import { EllipsePointMarker } from "scichart/Charting/Visuals/PointMarkers/EllipsePointMarker";
import {
  RolloverModifier,
  TRolloverTooltipDataTemplate
} from "scichart/Charting/ChartModifiers/RolloverModifier";
import { ZoomPanModifier } from "scichart/Charting/ChartModifiers/ZoomPanModifier";
import { ZoomExtentsModifier } from "scichart/Charting/ChartModifiers/ZoomExtentsModifier";
import { MouseWheelZoomModifier } from "scichart/Charting/ChartModifiers/MouseWheelZoomModifier";
import { SciChartSurface } from "scichart";
import {
  IXyDataSeriesOptions,
  XyDataSeries
} from "scichart/Charting/Model/XyDataSeries";
import { NumberRange } from "scichart/Core/NumberRange";
import { EAutoRange } from "scichart/types/AutoRange";
import { convertRgbToHexColor } from "scichart/utils/convertColor";
// eslint-disable-next-line
SciChartSurface.useWasmFromCDN();

const divElementId = "scichart-root";

const color = "#368BC1";

const SERIES = 1500;
const POINTS = 188;


const drawExample = async (updateTimeSpans) => {
  const { sciChartSurface, wasmContext } = await SciChartSurface.create(
    divElementId,{ widthAspect: 3, heightAspect: 2}
  );
  const xAxis = new NumericAxis(wasmContext, {
    visibleRange: new NumberRange(0, POINTS),
    autoRange: EAutoRange.Never
});
sciChartSurface.xAxes.add(xAxis);
const dataSeriesArray= new Array(SERIES);;
const rendSeriesArray=new Array(SERIES);
const yAxis = new NumericAxis(wasmContext, {
    visibleRange: new NumberRange(-5000, 5000),
    autoRange: EAutoRange.Never
});
// yAxis.labelProvider.numericFormat = ENumericFormat.Decimal_0;
sciChartSurface.yAxes.add(yAxis);
for (let i = 0; i < SERIES; i++) {
  const dataSeries= new XyDataSeries(wasmContext);
  const rendSeries= new FastLineRenderableSeries(wasmContext, {
      dataSeries,
     stroke: color,
      strokeThickness: 3,
      pointMarker: new EllipsePointMarker(wasmContext, {
        width: 5,
        height: 5,
        strokeThickness: 2,
        fill: "white",
        stroke: color
      })
  });
  dataSeriesArray[i] = dataSeries;
  rendSeriesArray[i] = rendSeries;
sciChartSurface.renderableSeries.add(rendSeries);
}
sciChartSurface.chartModifiers.add(new ZoomExtentsModifier(), new ZoomPanModifier(), new MouseWheelZoomModifier(),new RolloverModifier(wasmContext));
const loadPoints = () => {
  const newTimeSpans=[];

  // Start counting Points generation time
  const generateTimestamp = Date.now();

  const xValuesArray = new Array(SERIES);
  const yValuesArray = new Array(SERIES);
  const strokeArray =  new Array(SERIES);
  for (let i = 0; i < SERIES; i++) {
      // Allocate data arrays
      xValuesArray[i] = new Array(POINTS);
      yValuesArray[i] = new Array(POINTS);

      // Clear data, if any
      dataSeriesArray[i].clear();

      // Generate stroke
      const r = Math.random();
      const g = Math.random();
      const b = Math.random();
      strokeArray[i] = convertRgbToHexColor(r, g, b);

      // Generate points
      let prevYValue = 0;
      for (let j = 0; j < POINTS; j++) {
          const curYValue = Math.random() * 10 - 5;

          xValuesArray[i][j] = j;
          yValuesArray[i][j] = prevYValue + curYValue;

          prevYValue += curYValue;
      }
  }

  // Add the first time span: Generating 1M data points
  newTimeSpans.push({
      title: "Generate 500x500 Data Points",
      durationMs: Date.now() - generateTimestamp
  });

  // Start counting batch append time
  const appendTimestamp = Date.now();
  for (let i = 0; i < SERIES; i++) {
      dataSeriesArray[i].appendRange(xValuesArray[i], yValuesArray[i]);
      rendSeriesArray[i].stroke = strokeArray[i];
  }

  // Add the second time span: Generation of data point
  newTimeSpans.push({
      title: "Append 500x500 Data Points",
      durationMs: Date.now() - appendTimestamp
  });

  // Subscribe to sciChartSurface.rendered event,
  // and calculate time duration between the append and
  // the first frame after it
  const firstFrameTimestamp = Date.now();
  let frameIndex = 0;
  let nextFramesTimestamp;
  const handler = () => {
      if (frameIndex === 0) {
          // Add the third time span: Render the first frame
          newTimeSpans.push({
              title: "Render the frame",
              durationMs: Date.now() - firstFrameTimestamp
          });
          nextFramesTimestamp = Date.now();
      } else {
          // Unsubscribe from sciChartSurface.rendered
          updateTimeSpans(newTimeSpans);
          sciChartSurface.rendered.unsubscribe(handler);

          // Zoom extents at the end of performance measurement
          sciChartSurface.zoomExtents();
      }
      setTimeout(sciChartSurface.invalidateElement, 0);
      // Increment frame index
      frameIndex++;
  };
  sciChartSurface.rendered.subscribe(handler);
};
  loadPoints()
};

drawExample();
1 vote
2k views

Following the “How to Template the Axis Title” sample and using a simple TextBlock with TextWrapping=”Wrap” I am seeing strange resizing of the main chart elements especially with a scrollbar.

The attached image shows an example app (code available).

The first chart is normal (title clipped).
The second chart has the wrapping textblock and a scrollbar. The scrollbar is off the edge, the chart view area is off the edge. The entire axis label is still not visible (“Lorem ipsum dolor sit amet, consectetur”)
The third chart has no scrollbar so fits elements on the window, but still does not show all text.

The components creeping offscreen is the big problem I cannot figure out how to fix. Please

Note also happens in v7

1 vote
2k views

Hi Folks,

Wanted to ensure I’m working in the right direction here. Requirement is to add inline series labels on the plot surface. It’s an awkward requirement at times, but it keeps coming up with because other providers do this sometimes.

I’ve been playing with the examples of using data labels ( https://github.com/ABTSoftware/SciChart.JS.Examples/blob/master/Examples/src/components/Examples/Charts2D/TooltipsAndHittest/UsingVerticalSliceModifier/index.tsx ).

This might work. It’s a little strange since I only need to show at most one label per series. So I use the data label provider I assume and have to manually space them along the index range.

The only alternative I’m aware of is the annotations api, which of course is quite robust and probably a little too fancy for this case.

Appreciate any thoughts on the approach here — thanks!

EDIT: Attached very contrived example. The idea is to supply a label to name the series inline (apparently a legend is not sufficient), but in a way that is reasonably useful visually (similar to the spacing capabilities in the data labels api). The text would be some piece of metadata that is derived from the series (or at least has a 1:1 relationship with the series).

0 votes
7k views

Hi, I am trying to export an XyScatterRenderableSeries based on a XyzDataSeries<double,double,double> to XPS. The coloring is based on the z value and works perfectly in the application itself. The problem is that when exporting all the data and labels are perfectly visible ( no more vertical mirroring etc.), however all points are grey. I do see by setting a breakpoint on the OverridePointMarker below that the palette is used, just don’t see it in the end result. Anyone any tips or ideas what is going wrong?

Part of the Palette Provider;

    public PointPaletteInfo? OverridePointMarker(IRenderableSeries rSeries, int index, IPointMetadata metadata)
    {
        var rxyz = rSeries as XyScatterRenderableSeries;
        var xyz = rxyz?.DataSeries as XyzDataSeries<double, double, double>;
        if (xyz == null) return null;
        var z = xyz.ZValues[index];
        var i = Convert.ToInt32((_colormap.GetUpperBound(0) * z) / _max);
        var c = _colormap[i];
        return new PointPaletteInfo()
        {
            Fill = c,
            Stroke = c
        };
    }

Code to generate the chart in memory and export it to XPS

        var colormap = new ColorMappingAgain((Brush)Resources["DefaultBrush"], 100);
        var x = new ObservableCollection<IRenderableSeries>() {HeatmapSeries};

        foreach (var y in x)
            y.PaletteProvider = colormap;

        var surface = new SciChartSurface()
        {
            RenderSurface = new XamlRenderSurface(),
            ChartTitle = name,
            FontSize = (double) dpi * fontsize / 96,
            XAxes = xAxes,
            YAxes = yAxes,
            RenderableSeries = x,
        };

        foreach (var y in x)
            y.PaletteProvider = colormap;

        SciChart.ExportToFile(@"C:\Temp\again.xps",ExportType.Xps,true);
        SciChart.ExportToFile(@"C:\Temp\again2.xps", ExportType.Xps, false);
0 votes
4k views

Hi,
I want to know how to set FastBandRenderableSeries withSeriesInfoProvider to null?

If i set null like sciChartBuilder.newBandSeries().withSeriesInfoProvider(null) i’m getting error on debug logs:

E/Exception: null
java.lang.NullPointerException: Attempt to invoke interface method ‘com.scichart.charting.visuals.renderableSeries.tooltips.ISeriesTooltip com.scichart.charting.visuals.renderableSeries.hitTest.ISeriesInfoProvider.getSeriesTooltip(java.lang.Class)’ on a null object reference
at com.scichart.charting.modifiers.behaviors.TooltipBehaviorBase.func(SourceFile:120)
at com.scichart.charting.modifiers.behaviors.TooltipBehaviorBase.func(SourceFile:35)
at com.scichart.core.utility.ListUtil.select(SourceFile:249)
at com.scichart.core.observable.ProjectionCollection.onCollectionChanged(SourceFile:186)
at com.scichart.core.observable.ObservableCollection.a(SourceFile:302)
at com.scichart.core.observable.ObservableCollection.a(SourceFile:79)
at com.scichart.core.observable.ObservableCollection.add(SourceFile:93)
at java.util.Collections.addAll(Collections.java:5447)
at com.ikon.prodigy.Fragments.FragmentUI.SciChartFragmentUI$1$3.run(SciChartFragmentUI.java:1057)
at com.scichart.core.framework.UpdateSuspender.using(SourceFile:122)
at com.ikon.prodigy.Fragments.FragmentUI.SciChartFragmentUI$1.run(SciChartFragmentUI.java:1013)
at android.os.Handler.handleCallback(Handler.java:793)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:173)
at android.app.ActivityThread.main(ActivityThread.java:6698)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:782)

1 vote
9k views

Hello,

I just purchased this library 2 days ago, and my first impression is WOW! Very happy with my purchase for my small team. That being said I have a unique design requirement and I’m struggling to figure out how to resolve.

Our app utilizes a cursor indicator in the form of a vertical line, this indicator is used as a visual reference and synced across multiple charts. The behavior needs to be similar to how a RollOver modifier works, however the vertical line needs to stay in place, when the user is not “Mouse – Left Down”. Because the RollOver indicator goes away when not hovering over the chart, I decided to make a custom mouse modifier.

Essentially I created a “vertical line annotation” then disabled the dragging (want it to be moved only by mouse cursor movement, and not requiring the user to drag). Made a custom mouse modifier, where OnMouseModiferDown I set a bool flag, then OnMouseMoodiferMove I get the mouse cursor position and update the X1 binding of the cursor, finally OnMouseModiferUp I set the bool flag to false.

The Issue: With my custom mouse modifier the Vertical Line annotation lags the mouse position, It almost looks like there is some sort of smoothing applied to the movement? Is there a way to turn this effect off or reduce it? Here is a link to the behavior to highlight what I’m seeing.
Video of Behavior

My Code is given below.

Xaml

<local:mouseMove ExecuteOn="MouseMove"/>

<s:VerticalSliceModifier IsEnabled="True">
    <s:VerticalSliceModifier.VerticalLines>
        <s:VerticalLineAnnotation IsEditable="False" LabelPlacement="Axis" ShowLabel="False" X1="{Binding cursorPoint Mode=TwoWay}" Style="{StaticResource sliceStyle}" />
    </s:VerticalSliceModifier.VerticalLines>
</s:VerticalSliceModifier>

C#, Mouse Modifier (MouseMove)

public class mouseMove : XAxisDragModifier
    {
        private bool moveCursor { get; set; }
        public override void OnModifierMouseDown(ModifierMouseArgs e)
        {
            if (e.MouseButtons == MouseButtons.Left)
            {
                moveCursor = true;
            }
        }
        public override void OnModifierMouseUp(ModifierMouseArgs e)
        {
            if (e.MouseButtons == MouseButtons.Left)
            {
                moveCursor = false;
            }
        }
        public override void OnModifierMouseMove(ModifierMouseArgs e)
        {
            if ((Keyboard.Modifiers == ModifierKeys.Control))
            {
                //This is my keybind for the RuberBandXY, ignore this mouse event if Ctrl + Left Mouse Down
            }
            else
            {
                if (moveCursor)
                {
                    // Get mouse point
                    var mousePoint = e.MousePoint;

                    mousePoint = ParentSurface.RootGrid.TranslatePoint(mousePoint, ParentSurface.ModifierSurface);
                    var xDataValue = ParentSurface.XAxis.GetDataValue(mousePoint.X);
                    ParentSurface.Annotations[0].X1 = xDataValue;
                }

            }
        }
    }
1 vote
6k views

Hi,
i have some candles and i want to force the chart for removing candles with
open = Double.NaN
high = Double.NaN
low = Double.NaN
close = Double.NaN
openTime – special day (timestamp)

What I see:

1 vote
6k views

Hi,

I am creating an application where, we fetch data and display it in multiple heatmaps. The user can manipulate the heatmaps with changing colormap or changing ranges on the colormap.

Data from these multiple heatmaps is composited to another chart for visualization.

I was able to get a reference to the series, but adding the series to another chart errors with a message:

Invalid operation in sciChartSurface.attachSeries, this series has already been attached to a SciChartSurface. Please detach it from a SciChartSurface before attaching to another
at BaseRenderableSeries.onAttach (BaseRenderableSeries.js:634:1)
at __webpack_modules__../node_modules/scichart/Charting/Visuals/SciChartSurface.js.SciChartSurface.attachSeries (SciChartSurface.js:1385:1)

of course this means we cannot attach the same series to two different charts, but is there a way around this such as deepcloning?

renderable series: attached image

sample code: attached image

0 votes
11k views

Hi!

Connecting to my latest reply on this thread
https://www.scichart.com/questions/question/strange-behaviour-of-collapsing-panes#sabai-entity-content-8887
I still can’t make panes disappear correctly with multiple panes.

Here is the sample project demonstrating what you proposed on the previous thread, the first chartpane is shown but the panes do not resize.
https://drive.google.com/open?id=0B19IHNOVxrKCR21aeG4tOHlRNmM

Please make this project work as expected (i.e. there is 3 panes in the list, but only the second displayed in the list on the area of the 3 panes) to show me, how this works.

thanks.

Kristóf

0 votes
12k views

V. 2.11.4972.38029:
Hello,

in my application I want to use a RubberBandXyZoomModifier and a CursorModifier simultaneously.

my Code:

                    <SciChart:LegendModifier x:Name="legend" GetLegendDataFor="AllSeries"/>
                    <SciChart:XAxisDragModifier/>
                    <SciChart:YAxisDragModifier/>
                    <SciChart:ZoomExtentsModifier ExecuteOn="MouseDoubleClick"/>
                    <SciChart:CursorModifier ShowTooltip="True" ShowAxisLabels="False" ShowTooltipOn="Always" TooltipLabelTemplate="{StaticResource ToolTipLabelTemplate}"/>
                    <SciChart:RubberBandXyZoomModifier x:Name="rubberBandZoomModifier" IsEnabled="True" IsXAxisOnly="False" ZoomExtentsY="False" IsAnimated="True" />
                    <SciChart:MouseWheelZoomModifier />

The zoom function works but there is no highlighter visible. If I remove the CursorModifier then it works great.

How can I resolve this?
Thanks!

  • miri asked 11 years ago
  • last active 8 years ago
1 vote
7k views

Hello,
I have a polar chart in my wpf application and I want to get data value from pixel coordinates, once the user has
clicked on scichart surface. This is what I tried:

   mouseClick = (s, arg) =>
        {
            var mousePoint = arg.GetPosition((UIElement)this.sciChartSurface.GridLinesPanel);

    //From cartesian to polar conversion
            double xpolar = Math.Atan(mousePoint2.Y / mousePoint2.X);
            double ypolar = Math.Sqrt(Math.Pow(mousePoint2.X, 2) + Math.Pow(mousePoint2.Y, 2));

            double a = sciChartSurface.RenderableSeries[_trace_index].XAxis.GetCurrentCoordinateCalculator().GetDataValue(xpolar);
            double b = sciChartSurface.RenderableSeries[_trace_index].YAxis.GetCurrentCoordinateCalculator().GetDataValue(ypolar);
};

This code gets mouse point coordinates, then it converts pixel coordinates to polar, and then (a,b) data are obtained with
GetCurrentCoordinateCalculator().GetDataValue(), but a and b have some strange values. I’ve tried just the opposite (from data value to pixel coordinate using GetCoordinate()), but it still doesn’t work. Any ideas? Is it possible to get data from pixel coordinates in polar chart?

Thanks in advance,
Juan

0 votes
7k views

Hello,

I need to plot an arrow line serie, that is, a fastLine rendearable serie where the point markers are connected by arrow
(in the middle or the end) lines.

Screenshots attached.

Thanks in advance.

  • argonte asked 7 years ago
  • last active 7 years ago
0 votes
9k views

I want to paint my time axis like this:
Chessboard ruler
Or just highlight last week, day, hour.
Is there way to apply style only on part of axis?

0 votes
6k views

Can you help me please!
I was searching forum and see all different questions with dfferent ansvers but no one help for me.

I’m using CategoryDateAxis and whant to show to users vertical lines between days, weeks or month
Its depends from timestamp and visible period.
I need to opportunity to provide themself when to display vertical line.

In chart I display CandlestickSeries from stosk market and users whant to know when one day is ended and new day is begin.

How can I do that?

0 votes
4k views

[remind]
Please tell me how to add licence to 2 computer I have.

0 votes
5k views

Hello!

Tell me what I’m doing wrong?
The error does not always appear (floating error).

enter image description here

In my code, along the stack, it will go to your product

enter image description here

1 vote
6k views

Hi. Is it possible to implement a depth chart like in the screenshot using scichart?! depth chart

0 votes
9k views

Hi All,
i have a problem when i added the Abt.Controls.Scichart.Core.Wpf.Example in my project like in the picture ! Thank you !
Best Regards Sahar

  • sahar Les asked 9 years ago
  • last active 9 years ago
1 vote
11k views

Hi,
I have a SciChartGroup with 2 SciChartSurfaces…
It seems the SciChartGroup is adding the surface Title on its own somewhere.
What do I have to do to not display the 2nd surfaces title in white in the top-left corner?
Thanks!

(I’d attach the project, but the buttons on the ask page aren’t attaching anything – in chrome anyway…)

Here is the codebehind:

using System;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Windows;
using System.Windows.Input;
using Abt.Controls.SciChart;
namespace nameOn2ndSurface
{
    public partial class MainWindow : Window
{
    public MainWindow()
    {
        InitializeComponent();
    }
}
public class datamodel : INotifyPropertyChanged
{
    #region PropertyChanged

    public event PropertyChangedEventHandler PropertyChanged;
    protected void OnPropertyChanged(PropertyChangedEventArgs e)
    {
        if (PropertyChanged != null)
            PropertyChanged(this, e);
    }
    protected void notifyPropertyChanged(string propertyName)
    {
        PropertyChangedEventArgs e = new PropertyChangedEventArgs(propertyName);
        OnPropertyChanged(e);
    }

    #endregion

    ObservableCollection<DataModelGraph> graphs;

    public datamodel()
    {
        graphs = new ObservableCollection<DataModelGraph>();
        graphs.Add(new DataModelGraph() { Title = "graph1" });
        graphs.Add(new DataModelGraph() { Title = "graph2" });
    }
    public ObservableCollection<DataModelGraph> Graphs
    {
        get
        {
            return graphs;
        }
    }
}
public class DataModelGraph : IChildPane, INotifyPropertyChanged
{
    #region PropertyChanged

    public event PropertyChangedEventHandler PropertyChanged;
    protected void OnPropertyChanged(PropertyChangedEventArgs e)
    {
        if (PropertyChanged != null)
            PropertyChanged(this, e);
    }
    protected void notifyPropertyChanged(string propertyName)
    {
        PropertyChangedEventArgs e = new PropertyChangedEventArgs(propertyName);
        OnPropertyChanged(e);
    }

    #endregion

    string title;
    public DataModelGraph()
    {
        title = "graph";
    }
    public string Title
    {
        get
        {
            return title;
        }
        set
        {
            if (title != value)
            {
                title = value;
                notifyPropertyChanged("Title");
            }
        }
    }

    public ICommand ClosePaneCommand { get; set; }
    public void ZoomExtents()
    {
    }
}

}

Here is the xaml:

<Window x:Class="nameOn2ndSurface.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:s="http://schemas.abtsoftware.co.uk/scichart" 
    xmlns:local="clr-namespace:nameOn2ndSurface"
    Title="MainWindow" Height="350" Width="525">
<Window.Resources>
    <local:datamodel x:Key="data" />
    <Style TargetType="s:SciChartSurface">
        <Setter Property="Foreground" Value="Red"/>
        <Setter Property="ChartTitle" Value="{Binding Title}"/>
    </Style>
</Window.Resources>
<Grid DataContext="{DynamicResource data}">
    <s:SciChartGroup x:Name="group"
                     ItemsSource="{Binding Graphs}"
                     >
        <s:SciChartGroup.ItemTemplate>
            <DataTemplate>
                <s:SciChartSurface />
            </DataTemplate>
        </s:SciChartGroup.ItemTemplate>
    </s:SciChartGroup>
</Grid>

  • dwoerner asked 9 years ago
  • last active 5 months ago
0 votes
10k views

Hello all,

I am implementing polar chart in my wpf application, and I am trying to customize the next with no success:
– Xaxis data range is between the lowest and the highest value. I need that xaxis goes from 0º to 360º, but sometimes my angle dataseries does not cover the whole range (i.e. it goes from 15º to 270º). I’ve tried a customtickprovider, setting VisibleRange from 0 to 360º, but it doesn’t work. Any ideas?
– I need that the line connecting to points is a straight, but a curve is drawn instead. Is there any property in PolarXAxis or FastLineRenderableSeries to achieve this?

Regards,
Juan

0 votes
2k views

Hi there,

I am using scichart on a web application to plot 4 different plots simultaneously ( three using FastBandRenderableSeries and one using UniformHeatmapDataSeries).

When running on local environment everything works as expected (browser is very responsive) but when I push it to the production website it lags and my computer seems to be having hard time with the browser. I am still debugging it but thought to ask in case you have any recommendations ? Do you have performance related tips you can share?

I was reading on other posts about SciChartSurface.RenderPriority but it does not seem to exist in JS Scichart. Is there a workaround you can suggest?

Thank you,

  • Ihab Skafi asked 3 years ago
  • last active 3 years ago
0 votes
10k views

Is there a sample or documentation that you can point me to be able to create the chart panels on the fly?

1 vote
2k views

Hi,

I am using the scichart for WPF an came across a problem. I am trying to create a thumbnail image of a size 300×200 pixels of my chart. I have tried using the ExportToStream method with option of specifying the size output, but that creates a smaller resolution image of my chart. I was hoping that it will resize the chart to the desired size and then make an image.
So I tried a second option which was to put the chart in a user control of a certain size and then use the RenderTargetBitmap to render the user control in an image. That resulted in a partial chart without the chart lines. Take a look at the attached?

Any ideas how to make the chart to be rendered in memory in full for a certain size?

Kind regards,
Boštjan

0 votes
14k views

Hello.

Thank you for creating great chart library.
I’m now using a trial version for test that is enable to use at project that I’m concerned.

I have one problem that when I set zoom function to chart, and zoomed too much, axis label disappears.
(I used mouse scroll zoom, I attached zoom before image and after image)

How can I control this problem?
Is there any properties or setting for this?

1 vote
11k views

I have created a chart that displays real-time instrument data with a sample arriving every 10ms or so. I am displaying this with a CateoryDateTimeAxis:

                <!--  Create an X Axis  -->
                <s:SciChartSurface.XAxis>
                    <s:CategoryDateTimeAxis  MinHeight="50" AutoRange="Always" VisibleRange="{Binding XAxisVisibleRange, Mode=TwoWay}"
                            AxisTitle="Time" DrawMinorGridLines="False" DrawMinorTicks="False"  TextFormatting="hh:mm:ss.ss">
                    </s:CategoryDateTimeAxis>
                </s:SciChartSurface.XAxis>

My probem is that the TextFormatting is ignored and I get labels in the form HH:mm which is not much use. Is there a way round this?

Secondly if I try to use a DateTimeAxis to show the actual times (with any gaps) the automatic scaling resets the axis to cover about two days.

Any guidance would be appreciated.

Mike

0 votes
8k views

I would like add checkbox to collapse/hide VerticalSliceModifier, but can’t find properties that do it.
Here is my code:

              <s:VerticalSliceModifier ShowTooltipOn = "MouseOver">
                    <s:VerticalSliceModifier.VerticalLines>
                        <s:VerticalLineAnnotation X1="{Binding VerticalLinePosition}" ShowLabel="True"   Stroke="White"/>
                    </s:VerticalSliceModifier.VerticalLines>
                </s:VerticalSliceModifier>
0 votes
4k views

Hello,

I am wanting to “force” an axis label on a specific value. For example, right now in my datetime graph it always shows a “5PM” time on the axis regardless of the data. Instead, I would like to “anchor” the axis ticks on a different time value, like local Noon. We were able to do this in our previous charting solution, but I have not yet figured out how to do it with SciChart.

Thank you.

  • C Bolton asked 4 years ago
  • last active 4 years ago
1 vote
2k views

Hi I have an application where I would like to get the color information of the the pixel clicked on the uniformheatmap.

I am of course able to get the value, x, y using the hitTestProvider.hitTest but it does not contain any additional information regarding the color of the clicked pixel

Any help of direction is appreciated.

Pramod

0 votes
8k views

I’m trying to set the visible range property of a CategoryDateTimeAxis through MVVM. I’m following the general instructions detailed here for converting between pixel & data coordinates on the axis:

https://www.scichart.com/questions/question/categorydatetimeaxis-in-mvvm#sabai-inline-nav

I have the following code in my viewmodel:

XAxis.OnBeginRenderPass();
var calc = XAxis.GetCurrentCoordinateCalculator();
var coordCalc = calc as ICategoryCoordinateCalculator;

XAxis is a CategoryDateTimeAxis injected from the view. I call OnBeginRenderpass as I saw in another forum post that this will ensure that the CoordinateCalculator is initialized.

calc shows in the debugger as:

  • calc {A.} Abt.Controls.SciChart.Numerics.CoordinateCalculators.ICoordinateCalculator {A.}

The coordCalc variable ends up assigned to NULL, as the ICoordinateCalculator< double > cannot be cast to the interface.

How do I accomplish the above?

Thanks, Asher

  • ashernew asked 8 years ago
  • last active 8 years ago
1 vote
9k views

Hello,
I’ve been looking for the documentation of how to customize the look of the chart. I have a black/dark gray checker pattern that seems to be the default. I would like to:
1. Change the background to white, no checkerboard pattern
here is the documentation for chart background but it does not show me how to change it to white. https://www.scichart.com/documentation/ios/v2.x/webframe.html#The%20SciChartSurface%20Type.html
I have found through experimentation the I can call

surface.backgroundColor

But that just changes the axis background color

2. Make the text larger on the axis.
here is the documentation for the axis https://www.scichart.com/documentation/ios/v2.x/webframe.html#Adding%20an%20Axis%20to%20a%20SciChartSurface.html
I see these lines that were provided but they won’t compile because Xcode doesn’t know what defaultFontSize is and there are no other references to it and I still don’t see a way to set the size.

textFormat.fontName = SCSFontsName.defaultFontName
textFormat.fontSize = SCSFontSizes.defaultFontSize

I think it would be helpful to create a walkthrough for iOS that shows how to customize the background and axis. I’ve looked through the samples provided but the files are huge and I get lost trying to figure it out.
Thanks,
Warren

1 vote
6k views

Hello, I am using SciChartJS and have a new requirement from our users as follows that I need help with the implementation. Any pointers from anyone would be a great help.

**Requirements: **

  • Assume that x-axis is Time and y-axis is prices.
  • There are multiple series in the chart (e.g., Bid Price, Ask Price)
  • Allow user to select a time on xAxis using CTRL + CLICK
  • When the user selects the time, show the rollover line and the tooltip for all series at the selected time
  • This rollover line and tooltip should remain visible until the user selects a new time on the x-axis at which point the rollover tooltip should display the tooltip for the new point.

I started inheriting the RolloverModifier but couldn’t find an appropriate method to show the tooltip.

So, I started implementing the above feature using CustomModifierBase2d and adding a VerticalLineAnnotation for the rollover line. But again, struggling with the tooltip.

If someone could help me out or give me pointers, that would be highly appreciated.

Best Regards,
Sachin Patel.

0 votes
8k views

Does scichart support smith charts? If not, it is possible to build a smith chart based on polar chart?

Thanks!
Manuel

Showing 101 - 150 of 4k results