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

1 vote
8k views

I try using the EllipsePointMarker with the following code

new EllipsePointMarker
{
   Width = 4,
   Height = 4,
   StrokeThickness = 2
}

the markers usually draw looking like a plus sign or a diamond.

It only looks like a circle if I use a Width and Height of 8.

See attached.

0 votes
6k views

Hi,
How can i get smooth lines in FastLineRenderableSeries. Please see the attached image, specially when the stroke thickness is high, you see lots of small steps in the line.

Thanks
Aysan

0 votes
6k views

Hi,

Is possible in SciChart to plot just points in the chart, with no line connecting the points?

0 votes
7k views

Hi, I’m trying to create an effect similar to the FastErrorBarsRenderableSeries, but I only want to render the horizontal min & max lines, and not the vertical line. Can you suggest a way to achieve this?

0 votes
0 answers
3k views

Hello,

I have another question on the Heatmap 3D.

I have attached a sample app to show what I’m trying to accomplish. Essentially, I want my data points to contain NaN whenever there’s no data available for it. In that way if I want I could find out which are the points that have no data and create an interpolation throughout those points.

The problem is that If I initialize all my data points to NaN, and then I add the actual valid data, that data won’t be shown in the heatmap. I suspect it has something to do with the GradientColorPalette that probably doesn’t know what to do with a NaN.

Can you help me solve this issue? Maybe I’m using the API in a wrong way.

NOTE: If you comment the code lines inside the HeatmapModel class where it is initializing the data points with NaN and run it, you should get all red and some thin lines of different colors, which would be the ones that contain actual data. The idea is that all the red is not colored and show empty space and only show the fine lines, because 0 is a valid value.

NOTE: due to limiting uploading size, you’ll have to add the SciChart DLLs to the project manually.

Thank you!
Best regards,
Sebastian

0 votes
4k views

Hello again!
I’m creating fastlinerenderableseries and I need to show only one part of this line. For this purpose I’m using palette provider. But there is a strange side effect: when I set transparent color for line segment, it also paints lines on the chart (see pictures below-1 before switching on segment painting, 2 – after).
How can I fix it.

Thanks in advance
P.S. I ‘ve also attached project below.

  • Egor asked 6 years ago
  • last active 5 years ago
0 votes
6k views

Hi,

in a MVVM scenario, I bind the AnimatedVisibleRange to a property in the view model.

 <s:SciChartSurface SeriesSource="{Binding ChartSeries}">
   <s:SciChartSurface.XAxis>
     <s:NumericAxis AxisTitle="x" AnimatedVisibleRange="{Binding XVisibleRange, Mode=TwoWay}" AutoRange="Never" />
   </s:SciChartSurface.XAxis>
   <s:SciChartSurface.YAxis>
     <s:NumericAxis AxisTitle="y" AnimatedVisibleRange="{Binding YVisibleRange, Mode=TwoWay}" AutoRange="Never" />
   </s:SciChartSurface.YAxis>
   <s:SciChartSurface.ChartModifier>
     <s:ModifierGroup>
       <s:MouseWheelZoomModifier IsEnabled="True" XyDirection="XDirection"/>
     </s:ModifierGroup>
   </s:SciChartSurface.ChartModifier>
 </s:SciChartSurface>

Setting the XVisibleRange property in the view model smoothly animates the view. However, when I zoom in the chart with the mouse wheel, the view model property receives no updates (so the XVisibleRange property in the view model always stays on the value initially set by the view model).

The same thing works when I bind he VisibleRange instead of the AnimatedVisibleRange, i.e. in that case I get an update of the view model property on every mouse wheel zoom.

Is this intendend, or a bug? Building a workaround would require additional bindings, which I would like to avoid.

Best regards,

Andree

0 votes
5k views

The colors are applied correctly, but the position of the bubbles is screwed. They are all centered at the top left corner of the surface. They stay at the same position even when panning/zooming/etc.

Works as expected when the PaletteProvider is not set.

1 vote
7k views

Is there an easy way to rotate the Chart(swapping X and Y-Axis) inclusive Annotations, Modifiers,…?

0 votes
7k views

Hello.

Found a bug: when working with the axis-X scales the Y-axis
To get started, you need to configure in SciChart so zooming and moving only happened on the axis-X

Next:

  1. Take any chart (1.png)
  2. Highly scalable any point (2.png)
  3. Try to move the schedule of shifts sharply to the side, Y-axis scale changes (3.png)
  4. increase the scale to its original condition(4.png)

At the same time if you do everything except the third paragraph then all is well

This is a bug or need to configure something else?

  • Nicholas asked 7 years ago
  • last active 7 years ago
0 votes
6k views

Hi Support Team,

I am a SL developer and i am trying to save the scichart surface as a png file.

I have seen you example “First download the source code, you can find i.e. here: ScreenshotsXpsAndXLabels.zip”

but unfortunally it only works in Wpf , any suggestions would be appreciated.

Cheers

Giuseppe

  • jp13 asked 8 years ago
0 votes
7k views

Does anyone know why I would use a SciChartGroup instead of a simple ItemsControl? I tried to use an ItemsControl to show a vertical stack of charts, but I’m getting some weird internal exceptions in SciChart. I’m wondering if the SciChartGroup is a workaround for that?

  • F W asked 6 years ago
  • last active 6 years ago
0 votes
7k views

HI,

After reading the example annotation code and articles in the forum, I still can’t find a way to achieve my purpose: My app has a thread to receive data sent by a server, the data may trigger an annotation created lively. My app also need to maintain all created annotations and change their properties like X/Y values or remove them later. So far I only see the way of creating annotation by clicking some button. I tries different ways but failed.

Please help me out with some detailed guides. I am a beginner for WPF.

regards
Chunxi

I try to do this in user thread:

LineAnnotation annotationBase = new LineAnnotation();
change annotationBase properties.

But get this exception:

2014-11-09 13:42:20,623 [11] ERROR WpfApplication2.MainWindow [(null)] – at System.Windows.Input.InputManager..ctor()
at System.Windows.Input.InputManager.GetCurrentInputManagerImpl()
at System.Windows.Input.KeyboardNavigation..ctor()
at System.Windows.FrameworkElement.FrameworkServices..ctor()
at System.Windows.FrameworkElement.EnsureFrameworkServices()
at System.Windows.FrameworkElement..ctor()
at System.Windows.Controls.Control..ctor()
at System.Windows.Controls.ContentControl..ctor()
at Abt.Controls.SciChart.ChartModifiers.ApiElementBase..ctor()
at Abt.Controls.SciChart.Visuals.Annotations.AnnotationBase..ctor()
at Abt.Controls.SciChart.Visuals.Annotations.LineAnnotationBase..ctor()
at Abt.Controls.SciChart.Visuals.Annotations.LineAnnotation..ctor()
at WpfApplication2.InstrumentViewModel.addZone() in c:\Users\jokeslala\Documents\Visual Studio 2013\Projects\WpfApplication2\WpfApplication2\InstrumentViewModel.cs:line 134
at WpfApplication2.InstrumentViewModel.addMA20(Int32 barIdx, Double ma) in c:\Users\jokeslala\Documents\Visual Studio 2013\Projects\WpfApplication2\WpfApplication2\InstrumentViewModel.cs:line 128
at WpfApplication2.MainWindow.processEMA(String str) in c:\Users\jokeslala\Documents\Visual Studio 2013\Projects\WpfApplication2\WpfApplication2\MainWindow.xaml.cs:line 222
at WpfApplication2.MainWindow.consumeQueue() in c:\Users\jokeslala\Documents\Visual Studio 2013\Projects\WpfApplication2\WpfApplication2\MainWindow.xaml.cs:line 155

  • chunxi asked 7 years ago
  • last active 7 years ago
1 vote
0 answers
7k views

Hallo,

Once again I have a strange behaivour with the labeltextformating.

I have xaml code wich wont work. If i do the same in code behind it works perfectly. Why is that?

Code wich won’t work:

<Style x:Key="VerticalLineAnnotationStyle" TargetType="s:VerticalLineAnnotation">
            <Setter Property="Stroke" Value="#FFFF6600"/>
            <Setter Property="StrokeThickness" Value="2"/>
            <Setter Property="ShowLabel" Value="False"/>
            <Setter Property="LabelPlacement" Value="Axis"/>
            <Setter Property="VerticalAlignment" Value="Stretch"/>
            <Setter Property="LabelTextFormatting" Value="dd MMM yyyy HH:mm:ss"/>
        </Style>

<s:SciChartSurface.Annotations>
               
                <pp:CustomVerticalLineAnnotation x:Name="FVert" YAxisId="GenYAxis" FontSize="12" ShowLabel="True" IsEditable="True" IsEnabled="True" Height="600"
                                          Style="{StaticResource VerticalLineAnnotationStyle}" IsHidden="True"/>


            </s:SciChartSurface.Annotations>

Code wich works:

internal void AddVerticalLineDiff(string annotationType)
        {
            var type = _annotationTypes[annotationType];
            var resourceName = String.Format(&quot;{0}Style&quot;, type.Name);

            CustomVerticalLineAnnotation HAnot = new CustomVerticalLineAnnotation();
            HAnot.Name = &quot;VAnot1&quot;;
            HAnot.YAxisId = &quot;GenYAxis&quot;;
            // HAnot.YAxisId = &quot;GenYAxis&quot;;
            HAnot.Style = (Style)Resources[resourceName];
            HAnot.DragDirections = XyDirection.XDirection;
            HAnot.Height = sciChart.RenderSurface.ActualHeight;
            HAnot.IsEnabled = true;
            HAnot.IsEditable = true;
            HAnot.ShowLabel = true;

            // Perform the hit test relative to the GridLinesPanel
            HitTestInfo hitTestInfo = sciChart.RenderableSeries[0].HitTest(new Point(0, 0));
            HAnot.X1 = hitTestInfo.XValue;

            //HAnot.AnnotationLabels[0].Template = (ControlTemplate)Resources[&quot;VerAnnotLabelTemplate&quot;];
            sciChart.Annotations.Add(HAnot);

        }
private readonly IDictionary<string, Type> _annotationTypes = new Dictionary<string, Type>()
        {
            { "LineAnnotation", typeof(LineAnnotation)},
            { "LineArrowAnnotation", typeof(LineArrowAnnotation)},
            { "TextAnnotation", typeof(TextAnnotation)},
            { "BoxAnnotation", typeof(BoxAnnotation)},
            { "HorizontalLineAnnotation", typeof(HorizontalLineAnnotation)},
            { "VerticalLineAnnotation", typeof(VerticalLineAnnotation)},
            { "AxisMarkerAnnotation", typeof(AxisMarkerAnnotation)}
        };
0 votes
9k views

Now I am trying to add MVVM bindings for a Chart Legend

I have

        <SciChart:SciChartSurface x:Name="sciChart" DataSet="{Binding DataSeriesSet}" 
            SciChart:ThemeManager.Theme="Oscilloscope" 
            Grid.Row="1" 
            RenderableSeries="{Binding RenderableSeries}"
            ChartModifier="{Binding ChartModifier}"
            XAxis="{Binding XAxis}" 
            YAxes="{Binding YAxes}">
                   </SciChart:SciChartSurface>
        <SciChart:SciChartLegend x:Name="legendControl" Grid.Row="1" Margin="23,23" ShowVisibilityCheckboxes="True" LegendData="{ Binding LegendDataSource,  Mode=OneWay}"/>

and in My ViewModel

        public AnalogueChartViewModel()
        {
            XAxis = new DateTimeAxis
            {
                VisibleRange = RangeFactory.NewRange(DateTime.Now.AddDays(-2), DateTime.Now),
                DrawMinorGridLines = false,
                AxisTitle = "X-Axis"
            };
            RenderableSeries = new ObservableCollection<IRenderableSeries>();
            YAxes = new AxisCollection();
            DataSeriesSet = new DataSeriesSet<DateTime, double>();
            var xAxisDrag = new XAxisDragModifier();
            var zoomExtents = new ZoomExtentsModifier();
            var rubberBandZoom = new RubberBandXyZoomModifier();
            var panModifier = new ZoomPanModifier { ExecuteOn = ExecuteOn.MouseRightButton };
            _legendDataSource = new LegendModifier { GetLegendDataFor = 0 };

            ChartModifier = new ModifierGroup(xAxisDrag, zoomExtents, rubberBandZoom, panModifier, _legendDataSource);

        }

        private LegendModifier _legendDataSource;

        public LegendModifier LegendDataSource
        {
            get { return _legendDataSource; }
            set 
            { 
                _legendDataSource = value;
                OnPropertyChanged("LegendDataSource");
            }
        }


But not sure how to bind to the LegendData

Sorry I keep troubling you, but after all this there should be some good MVVM code for others to follow too.

  • wilx asked 8 years ago
1 vote
7k views

I am trying to use a line series to display digital values (0,1) Is it possible to have the line series remain at 1 if there is no data after the reading until it reaches the next value read. Currently the line goes to 1 and then starts to fall until it reaches zero as there is no data to tell it otherwise

0 votes
6k views

XyDataSeries when querying for series’ XMax on a series with no values, I get DateTime.MinValue, and when querying for XMin on a series with no values, I get DateTime.MaxValue. Shouldn’t it be the other way around?
Same thing for YMax and YMin on that series… I get the negative number as the YMax and viceversa.

0 votes
4k views

Is it possible to create a BoxRendableSeries with outliers by a predefined range (e.g. 2%-98%) and everything which exceeds will be drawn as a outlier (a ellipse a like dot)?

What I want to do is, given each box, I want to mark the box with a dot if parameters exceed certain values. Is this something that SciChart supports?

0 votes
4k views

Hi,
I’d rather have one tooltips for all my series like a legend.
But I want this special legend to be placed on the first (main) series tooltip coordinates.

I understand using a rollover is the best way to do it.

1 vote
9k views

My previous example/question worked because I hard coded to use two charts each with their own chart modifiers as follows all in the same class.

_chartModifiers = new ModifierGroup();
MouseManager.SetMouseEventGroup(_chartModifiers, "MyGroup");
_chartModifiers2 = new ModifierGroup();
MouseManager.SetMouseEventGroup(_chartModifiers2, "MyGroup");

I am now building the ui that allows me to add and remove a graph from an items control. Each graph now binds to a view model to get its data and a parent class manages a collection of graphs (view models). I set the mouse event group in the constructor which is empty when I call SetMouseEventGroup. This causes some weird behavior when zooming as both graphs zoom together plus scrolling the yaxis scolls both yaxis at the same time and sometimes crashes.

Note: in my code now this gets call two times; once for each chart.

public GraphViewModel()
{
  _chartModifiers = new ModifierGroup();
  MouseManager.SetMouseEventGroup(_chartModifiers, &quot;MyGroup&quot;);
}

private ModifierGroup _chartModifiers;
public ModifierGroup ChartModifiers
{
  get { return _chartModifiers; }
  set
  {
    _chartModifiers = value;
    NotifyPropertyChanged(_chartModifierArgs);
  }
}

I also tried to manage the number of items that I add to the mouse event group and while that stopped linking the zoom and yaxis scoll in this case I can no longer get the rollover to work.

ModifierGroup total = new ModifierGroup();
foreach (GraphViewModel www in vm.HistoricalHealthViewModel.DisplayedGraphs)
{
   foreach (IChartModifier chartModifier in <a target="_blank" href="http://www.ChartModifiers.ChildModifiers)"  target="_blank">www.ChartModifiers.ChildModifiers)</a> 
   {
      // do not add the drag modifiers
      if (!(chartModifier is YAxisDragModifier))
      {
         total.ChildModifiers.Add(chartModifier);
      }
   }
}
MouseManager.SetMouseEventGroup(total, &quot;MyGroup&quot;);

Can you please suggest how to use the mouse event group?

0 votes
8k views

Hello again,

ChartModifiers do not work if bound to a collection in the Viewmodel. If specified in XAML everything works fine (SingleTabControl.xaml)

Best regards,
Robin

1 vote
4k views

I have enabled the cursor to get the coordinates of the mouse. The code is very straightforward – attachment CursorModifier.txt.

The result is show in screenshot CursorModifier.png

(1) How can I disable the x-axis cursor and show only y-axis coordinate values?
(2) According to the code, the font size should be 16pt and the background should be yellow. This is not the case (attachment CursorModifier.png). How can I control these properties?
(3) If I decide to keep x-axis cursor, how v]=can I display the custom content which will be based on the mapping between the current value of X and the array or strings, ex. round up 28.858819 -> 29 and display string[29].

  • agolebio asked 5 years ago
  • last active 5 years ago
0 votes
4k views

Hi,
Can I draw chart manually? I want to give user possibility to draw line chart by mouse. Is it possible?
Thank you

0 votes
0 answers
4k views

Hi,

I wonder, if it’s possible to force the SciChartSurface control to resize itself depending on a size of the actual data area, given that axis are in the auto-range mode. For example, when the Y range is large than X range, the entire control resizes into the portrait orientation, thus keeping square pixels in the data area.

Thank you in advance!
Ilia

  • corvex asked 6 years ago
  • last active 6 years ago
0 votes
6k views

Since Google have dropped their support for Silverlight in Chrome the online demo pages no longer work. Just wondering if you will be fixing this so that people can view the demos in Chrome again? Thank you.

  • sdavies asked 6 years ago
  • last active 5 years ago
0 votes
17k views

I have the following code and want to move this portion to code-behind but have problems understanding how I can programmatically set the properties in Style:

<s:SciChartSurface.ChartModifier>

                <!-- Provides Interactivity -->
                <s:RubberBandXyZoomModifier IsAnimated = "False" IsXAxisOnly = "True" ExecuteOn = "MouseRightButton"/>
                <s:ZoomPanModifier XyDirection="XYDirection" ClipModeX = "ClipAtExtents" ExecuteOn ="MouseLeftButton" />
                <s:MouseWheelZoomModifier XyDirection = "XYDirection"/>
                <s:ZoomExtentsModifier IsAnimated = "False" ExecuteOn = "MouseDoubleClick" />
                <s:XAxisDragModifier  DragMode = "Scale"/>
                <s:CursorModifier SourceMode="AllSeries"  UseInterpolation="True"/>

                <!-- Provides selection of series and custom styling to the selected series -->
                <s:SeriesSelectionModifier ReceiveHandledEvents="True" SelectionChanged="SeriesSelectionModifier_OnSelectionChanged">
                    <s:SeriesSelectionModifier.SelectedSeriesStyle>
                        <Style TargetType="s:BaseRenderableSeries">
                            <Setter Property="SeriesColor" Value="White"/>
                            <Setter Property="PointMarkerTemplate">
                                <Setter.Value>
                                    <ControlTemplate>
                                        <s:EllipsePointMarker Fill="#FF00DC" Stroke="White" Width="7" Height="7"/>
                                    </ControlTemplate>
                                </Setter.Value>
                            </Setter>
                        </Style>
                    </s:SeriesSelectionModifier.SelectedSeriesStyle>
                </s:SeriesSelectionModifier>

                <!-- Provides a data source for the legend control -->
                <s:LegendModifier ShowLegend="True" GetLegendDataFor="SelectedSeries" Margin="10"/>

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

Particularly the SeriesSelectionModifier and its property setters seem difficult for me to implement in code-behind. Can you please provide some sample code how I would actually implement the SeriesSelectionModifier with above Property Setters above in C# code rather than in XAML?

Thanks

  • bbmat asked 6 years ago
  • last active 6 years ago
1 vote
10k views

Hi,

I have a scichart surface defined in xaml like this,

<local:SciChartSurface x:Name="_ChartSurface"  Annotations="{Binding ChartAnnotations}">

        </local:SciChartSurface>

In the code behind I have ChartAnnotations defined as,

 public const string ChartAnnotationsPropertyName = "ChartAnnotations";
        private AnnotationCollection _ChartAnnotations = new AnnotationCollection();
        public AnnotationCollection ChartAnnotations
        {
            get { return _ChartAnnotations; }
            set
            {
                if (_ChartAnnotations == value)
                    return;

                _ChartAnnotations = value;
                RaisePropertyChanged(ChartAnnotationsPropertyName);
            }
        }

 public ViewModelExample()
{  
  ChartAnnotations.CollectionChanged += ChartAnnotations_CollectionChanged;    
}

 void ChartAnnotations_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
        {
            RaisePropertyChanged(ChartAnnotationsPropertyName);          
        }

Than in the code behind, I just initialize and add some annotations to the ChartAnnotations collection to populate my chart. The problem is that my Annotations property on the scichart surface is still null, and the RaisePropertyChanged() is not affecting the Bindings at all. I’m certain that the DataContext is set right as other stuff in the graph works fine. I works when I explicitly set the surface’s Annotations property with my ChartAnnotations collection, but obviously this is less than ideal.

Is there an additional step that I’m missing here?

Thanks

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

Hey guys,

I am setting the GridLinesPanelStyle property of my SciChartSurface to the following Style from the Resources of the parent Border element:

<Style x:Key="GridLinesPanelStyle" TargetType="{x:Type axes:GridLinesPanel}">
    <Setter Property="KeyboardNavigation.ControlTabNavigation" Value="None" />
    <Setter Property="IsTabStop" Value="False" />
    <Setter Property="Background" Value="Transparent" />
    <Setter Property="BorderBrush" Value="{StaticResource ChartBorderBrush}" />
</Style>

When snooping down into the “PART_GridLinesArea” I see that the Background is set to #FF353535 from the “Parent Template”. It gets interesting; I can Delve into the Style property of the same element and see my setters from the above snippet of code.

This approach was working pre-SciChart 2.0 and it appears to be the approach being used by the Examples suite as well, but I can’t yet get that running with my licence (there is another thread asking for help to fix this too ;)!).

Thanks for your support,
Miles

0 votes
0 answers
5k views

Hi there,

if I use a ScaleTransform, the Fonts (e.g. axis text) are rendered with higher resolution – the chart is only scaled.
Is there a possibility to increase the render resolution for the chart also?

The intent is to print the chart with higher resolution.

Thanks and regards

  • miri asked 6 years ago
0 votes
10k views

We were recently asked on priority support tickets ‘How do I ZoomExtents a SciChartSurface to a specific range, e.g. VisibleRangeLimit, when double clicking on the chart’.

For the benefit of our user-base our solution is below.

0 votes
8k views

Hi,

I have a chart with 4 axes (two X and two Y), when I try use AnnotationCreationModifier to create annotation, I get next error:

at Abt.Controls.SciChart.Visuals.Annotations.AnnotationBase.FromCoordinates(Double xCoord, Double yCoord)
at Abt.Controls.SciChart.Visuals.Annotations.AnnotationBase.FromCoordinates(Point coords)
at Abt.Controls.SciChart.Visuals.Annotations.AnnotationBase.UpdatePosition(Point point1, Point point2)
at Abt.Controls.SciChart.ChartModifiers.AnnotationCreationModifier.OnModifierMouseUp(ModifierMouseArgs mouseButtonEventArgs)
at Abt.Controls.SciChart.ChartModifiers.ModifierGroup.c9fd5ab524d787e8439d8933aeb87fdc5(IChartModifier c6b1effd112e5355cd5f051dd91cd4f67, ModifierMouseArgs cbb39038dde40bfc3fdcfa70f4bbf8778)
at Abt.Controls.SciChart.ChartModifiers.ModifierGroup.c9e8960a6a8527c20ac9e46e162c72b22(Action`2 c4bd4ab823835cf92d221476b6fb65a17, ModifierMouseArgs c4c23d80d4d060e409c3479ef17d6c65e)
at Abt.Controls.SciChart.ChartModifiers.ModifierGroup.OnModifierMouseUp(ModifierMouseArgs e)
at Abt.Controls.SciChart.Utility.Mouse.MouseManager.cad56cb88fe961ec17710025afdf79607(ModifierMouseArgs cbb39038dde40bfc3fdcfa70f4bbf8778, IReceiveMouseEvents c18509698be3f9366c690e7d2b107b62c, Boolean c3791a1b71c1577bde30b55c12b2a5583)
at Abt.Controls.SciChart.Utility.Mouse.MouseManager.cf88844ca415efe316ebbc6460c4d5477.c017276be757b162458755f3f8e0c9aa6.cd7319400482f82418e9a97b614eab2ca(IReceiveMouseEvents c133657388cc0f6f6615e21e129ac4b3a)
at A.c19dd4d74f6373c95c517d29624d76e4b.cacf72b657252e3e73860afb89d70cb9f[c13c28af86f0b14202b9c7ef43b1bd11a](IEnumerable`1 c40a30a1bb6416cd164565919fdef15a9, Action`1 c885aac61bc9832561b7ff07903c88d5e)
at Abt.Controls.SciChart.Utility.Mouse.MouseManager.cf88844ca415efe316ebbc6460c4d5477.cef5451dcf09f913b48c9730b7cb0d11d(Object cae49ecc8585f35e8dd5ce624f7fb7ab5, MouseButtonEventArgs c4c23d80d4d060e409c3479ef17d6c65e)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
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.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
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.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 MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, 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.RunInternal(Window window)
at System.Windows.Application.Run()
at SciTest.App.Main() in d:\Projects\Test\SciChart\SciTest1\SciTest\obj\Debug\App.g.cs:line 0
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
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 System.Threading.ThreadHelper.ThreadStart()

My Xaml code:

<s:SciChartSurface x:Name="sciChart" Grid.Row="1" ClipModifierSurface="True" s:ThemeManager.Theme="Chrome">

    <s:SciChartSurface.RenderableSeries>
        <s:FastCandlestickRenderableSeries XAxisId="X" YAxisId="Y"/>
    </s:SciChartSurface.RenderableSeries>

    <s:SciChartSurface.XAxes>
        <s:CategoryDateTimeAxis Id="X"/>
        <s:CategoryDateTimeAxis Id="X2"/>
    </s:SciChartSurface.XAxes>

    <s:SciChartSurface.YAxes>
        <s:NumericAxis TextFormatting="0.0#" Id="Y"/>
        <s:NumericAxis TextFormatting="0.0#" Id="Y1"/>
    </s:SciChartSurface.YAxes>

    <s:SciChartSurface.ChartModifier>
        <s:ModifierGroup>
            <s:AnnotationCreationModifier YAxisId="Y" x:Name="annotationCreation" AnnotationCreated="OnAnnotationCreated"/>
            <s:YAxisDragModifier/>
            <s:XAxisDragModifier/>
        </s:ModifierGroup>
    </s:SciChartSurface.ChartModifier>

</s:SciChartSurface>
1 vote
7k views

I need to be able to show the user pre- and postmarket phases on a chart. Above is the screenshot of another control that does what I need.

To my understanding, I just need to implement the read only vertical range annotation and place it behind the series.

As I don’t have the source code license, could you please give me some advice from where to start the implementation process?

  • gman asked 8 years ago
0 votes
8k views

Is there a way to guarantee a label at the minimum and maximum axis values?

The min of my data is 0, but I can’t seem to get an axis label to appear at 0. The same goes for the maximum value. This would be very helpful in framing the chart data.

  • Todd asked 8 years ago
0 votes
8k views

Hi,

I have some plots that lay vertically, and I want them align well, how to sync the Y Axis that is located at left width to have same width of X Axis which is located at the bottom.

Thanks.

0 votes
6k 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 5 years ago
  • last active 5 years ago
0 votes
7k views

Hi guys,

Update: Based on some other desired functionality about how the mouse should interact with this element, I’ve developed my own modifier to handle the roll-over functionality. As such, this ticket doesn’t need a reply any more. Thanks – and my apologies if it consumed any resources in the meantime!

This is a strange one. I am using seven XyScatterRenderableSeries on the one SciChart, in conjunction with a style for each of these to display seven different icons (in my case, I use path geometry or ellipses to define a full-circle, a circle with a divider down the middle or a circle split into three from the centre – each section then gets its own color).

Have a look at the attached screenshot for an idea of what it looks like – not a conventional chart by any means. The YAxis range is hard-coded in to only allow three possible values, whereas the XAxis is a Date axis and can allow values at any week. To allow the circles to sit where they are they are assigned a Y-coordinate of either 0.5, 1.5 or 2.5 (this allows them to sit between the gridllines I’ve defined in the xaml.

My problem is that the RolloverModifier is not following all of the RendereableSeries at all, and is acting strange and not providing me with a tooltip for some circles some of the time. It all seems very random.

Are RolloverModifiers working for multiple scatter series, where each series may have a different number of points to all others?

Note that it is possible in my example for one of the DataSeries to have two values (Y) for the one DateTime (X) as well.

I have attached some snippets of code – pasting it in here was not working for me, apologies!

If you require any further information, please let me know.

Cheers,
Miles

P.S. I had originally attempted to do this using your annotations example in the demo (with the Trade Markers for buy/sell). The Control Template I created to add the circles in and the looping that followed at run-time made rendering any sizeable number of these simply too expensive. Everything was slowing down. After going down this new route and using the SciChart itself to render everything – there are no performance issues at all! So bravo, whatever you’re doing to render geometries is paying dividends. Everything is very quick.

0 votes
9k views

Hi,

I have a simple chart with FastLineRenderableSeries with a DateTime X axis and a numeric Y axis. I’ve also added a RubberBandXyZoomModifier and a ZoomExtentsModifier. In this chart I want to be able to zoom out to previous visible range. E. g. the user use the rubber band to zoom in to range A, then he zooms in a second time to range B, then he should have the opportunity to zoom out from range B and back to range A. Do you have a recommendation for how I can achieve this?

My first thought was to override the ZoomExtensModifier to allow the user to both use the full zoom out functionality, and also, by holding shift or something, zoom out to previous. In addition I can handle the VisibleRangeChanged event to collect the ranges.

Then I noticed that the VisibleRangeChanged event always seems to get fired twice after a user modification of the visible range. For example if I test with a slightly modified version of the line chart in http://http://www.scichart.com/documentation/webframe.html#BuildingASimpleLineChart.html, and zoom from X (205,431) to (250,300); the first time VisibleRangeChanged is fired the e.NewVisibleRange is (215,404), the second time it is as expected (250,300). Why is that? Will it always fire two times, or can I also expect it to fire one or three times? Is this something that can or will change in future releases of scichart?

  • Olav
1 vote
0 answers
4k views

Hi,

I previously asked a question about a flickering chart. (https://www.scichart.com/questions/question/flickering-chart)

After stripping down my application I think I have found the root cause, and the information in that question seem to be completely irrelevant. If it is ok I’d rather delete that question.

I have extracted the relevant code out of my application and put it in the attached test application. After clicking the start button data should be added in real time. To reproduce change the visible area to a part of the chart and then hold to right scrollbar grip and move it, don’t release, just hold still, the chart starts to flicker.

0 votes
4k views

Hi,

I have 2 separate charts (SciChartSurface) and my goal is to enable mouse selection of a series on only the chart surface that contains the series. I do not share renderable series and not even data series between different chart surfaces. I am not sure why a series on the second chart surface is selected when I click on an area within the first chart surface. How can I prevent this from happening?

Could it be this is a bug in that SeriesSelectionModifier checks for hitpoints beyond the chart surface on which the mouse hit occurred? I verified and this problem only occurs when sharing Chart Modifiers via MouseManager. Attaching the MouseManager.MouseEventGroup to each individual modifier does not seem to work, it looks like it has to be attached to “ModifierGroup”. So I am still stuck with this problem.

<s:SciChartSurface.ChartModifier>
            <s:ModifierGroup s:MouseManager.MouseEventGroup="MyMouseEventGroup">

                <s:SeriesSelectionModifier ReceiveHandledEvents="True">
                    <s:SeriesSelectionModifier.SelectedSeriesStyle>
                        <Style TargetType="s:BaseRenderableSeries">
                            <Setter Property="StrokeThickness" Value="10"/>
                        </Style>
                    </s:SeriesSelectionModifier.SelectedSeriesStyle>
                </s:SeriesSelectionModifier>

                <s:RubberBandXyZoomModifier ReceiveHandledEvents="True" IsAnimated = "False" IsXAxisOnly = "True" ExecuteOn = "MouseRightButton"/>
                <s:CursorModifier ReceiveHandledEvents="True" SourceMode="AllSeries" ShowAxisLabels="True" />
                <s:ZoomPanModifier ReceiveHandledEvents="True" XyDirection="XYDirection" ClipModeX = "ClipAtExtents" ExecuteOn ="MouseLeftButton"/>
                <s:MouseWheelZoomModifier ReceiveHandledEvents="True" XyDirection = "XDirection"/>
                <s:ZoomExtentsModifier ReceiveHandledEvents="True" IsAnimated = "False" ExecuteOn = "MouseDoubleClick"/>
                <s:LegendModifier ReceiveHandledEvents="True" Name="GeneralLegend" ShowLegend="True" LegendPlacement ="Inside" GetLegendDataFor="AllSeries" Margin="10" LegendItemTemplate="{StaticResource LegendItemTemplate}"/>


            </s:ModifierGroup>
        </s:SciChartSurface.ChartModifier>
  • bbmat asked 5 years ago
  • last active 5 years ago
0 votes
5k views

In the oil industry a well survey is usually displayed by a series of points connected by arcs. An arc is very close to the actual path a drill will take between points on a survey. Survey points are about 90 feet apart, so connecting them with a straight line looks ugly. Which method should I override to accomplish this?

If I get ambitious, I may also consider using Bezier curves to connect points, as this could be useful to represent geological boundaries as a background for my well survey plots.

I have attached a picture showing the type of plots I need to make. The red line is a survey and the background represents geological layers. The survey is presently connected with straight lines, which makes it difficult to determine precisely where the survey intercept the boundaries.

0 votes
6k views

I successfully set my x-axis visible range between 0.0 and 5.0. I would like to have major grid lines every 1.0. How can I do this? I see a MajorDelta property which I set to 1.0. This did not work. Instead, the major grid lines are every 0.5 on the x axis.

0 votes
7k views

Hello,

I am getting started with Scichart (again) and was hoping you could help me with a question.
I am attempting to plot a data series on a scatter plot. Is it possible to set the color for each individual point (either manually, or based on another piece of data)?

I thought I remember seeing an example on this a while back, but I can’t seem to find it now.

Thanks.

0 votes
0 answers
6k views

HI,
My code works well with 3.1. Today I switch to 3.2. Get exception, please see the attached file.

my code is based on SciChart Trader. When mouse click the chart. the exception happens.

0 votes
8k views

Hello,

I’m working with scicharts graphics and I need to paint (or create surface), which looks like this (image in the attachments, but only with offsets of straight line). So I have some ideas, how to do this:
1)(Non-Prefered as it is very slow) I’m creating the fastlinerenderable series for each value and put it on the image-in this method: how can I speed up my algorithm or make the program take less memory
2)(Prefered) We have got a matrix of values to draw on the surface. How can we put it dot by dot in this method? Is there any authomatic method?

So if there is another good variant of making it, please, tell us!

Thank you in advance!

0 votes
9k views

Hi,

I’ve got couple of questions.

  1. Is there a way to automatically change the visible x axis range once we change the DataSeriesSet?

  2. What is the purpose of AutoRange property? If AutoRange is true, it doesn’t allow to zoom the chart. Is there a way to enable zooming when AutoRange true?

Thanks,
Charith

0 votes
9k views

I’m trying to have a two charts which have a x-axis points (datetime) that doesn’t intersect. And i want charts was synchronized like this:
enter image description here

How you can see here upper chart doesn’t have a point at 10.12.2013, but lower has. Can i reach same effect by SciChart?

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

I’m trying to adapt the real time with cursors sample to my application, and I am getting the errors:

A first chance exception of type ‘System.InvalidOperationException’ occurred in Abt.Controls.SciChart.Wpf.2.2.dll
SciChartSurface didn’t render, because an exception was thrown:
Message: Could not draw an annotation of type Abt.Controls.SciChart.Visuals.Annotations.CustomAnnotation. YAxis with Id == DefaultAxisId doesn’t exist. Please ensure that the YAxisId property is set to a valid value.

Stack Trace: at Abt.Controls.SciChart.Visuals.Annotations.AnnotationCollection.cdf2bd7561b58306ecd5089a541681211(IDictionary`2 cb584733576aa785c01756f543bd52bbd, IAnnotation c7816e538855bcbae71ae0f6efa624460, String cc81d01f2a94a35bb5f140e91f56aab32, Boolean ce46347a6d5ff6106322b900dd6b47b62)
at Abt.Controls.SciChart.Visuals.Annotations.AnnotationCollection.RefreshPositions(RenderPassInfo rpi)
at A.cda144392e546b245ef5bb1ee71f22b3a.c7f1b2d02c5ccbd19621131cda68e2518(SciChartSurface c17037e8328cd0abc02d2a6957dfa450c, RenderPassInfo c16b8d70d2b6ecad8f9fca7ac3f5177b8)
at A.cda144392e546b245ef5bb1ee71f22b3a.RenderLoop(IRenderContext2D renderContext)
at Abt.Controls.SciChart.Visuals.SciChartSurface.ca065c0b6712A first chance exception of type ‘System.InvalidOperationException’ occurred in Abt.Controls.SciChart.Wpf.2.2.dll
21e0e603d0e9bf2792494()

Can you look at my XAML and tell me what I have wrong? I’m sure it something simple, but I can’t seem to figure it out.

XAML

<UserControl x:Class="Analyze.Controls.LivePlot"
xmlns=" http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;
xmlns:x=" http://schemas.microsoft.com/winfx/2006/xaml&quot;
xmlns:mc=" http://schemas.openxmlformats.org/markup-compatibility/2006&quot;
xmlns:d=" http://schemas.microsoft.com/expression/blend/2008&quot;
xmlns:sources="clr-namespace:Analyze.Sources"
xmlns:sc=" http://schemas.abtsoftware.co.uk/scichart&quot;
mc:Ignorable="d"
d:DesignHeight="600" d:DesignWidth="400">
<UserControl.Resources>
<!– Converter used by feedback panel below SciChartSurface–>
<sc:ColorToBrushConverter x:Key="ColorToBrushConverter"/>

    &lt;!-- Common TextBlock style, uses ColorToBrushConverter to convert RenderableSeries.SeriesColor to a brush for textblocks --&gt;
    &lt;Style TargetType=&quot;TextBlock&quot; x:Key=&quot;tbStyle&quot;&gt;
        &lt;Setter Property=&quot;Margin&quot; Value=&quot;2,4&quot;/&gt;
        &lt;Setter Property=&quot;Foreground&quot; Value=&quot;{Binding SeriesColor, Converter={StaticResource ColorToBrushConverter}}&quot;/&gt;
        &lt;Setter Property=&quot;FontWeight&quot; Value=&quot;Bold&quot;/&gt;
        &lt;Setter Property=&quot;FontSize&quot; Value=&quot;11&quot;/&gt;
    &lt;/Style&gt;

    &lt;sources:DriverLapSignalSource x:Key=&quot;ThrottleSource&quot; 
                                   XSignal=&quot;LapDist&quot; XFactor=&quot;3.2808398950131233595800524934383&quot;
                                   YSignal=&quot;Throttle&quot; YFactor=&quot;100.0&quot; /&gt;
    &lt;sources:DriverLapSignalSource x:Key=&quot;BrakeSource&quot; 
                                   XSignal=&quot;LapDist&quot; XFactor=&quot;3.2808398950131233595800524934383&quot;
                                   YSignal=&quot;Brake&quot; YFactor=&quot;100.0&quot; /&gt;
    &lt;sources:DriverLapSignalSource x:Key=&quot;SpeedSource&quot; 
                                   XSignal=&quot;LapDist&quot; XFactor=&quot;3.2808398950131233595800524934383&quot;
                                   YSignal=&quot;Speed&quot; YFactor=&quot;2.2369362920544022906227630637079&quot; /&gt;
    &lt;sources:DriverLapSignalSource x:Key=&quot;RPMSource&quot; 
                                   XSignal=&quot;LapDist&quot; XFactor=&quot;3.2808398950131233595800524934383&quot;
                                   YSignal=&quot;RPM&quot; YFactor=&quot;1.0&quot; /&gt;
&lt;/UserControl.Resources&gt;

&lt;Grid&gt;
    &lt;sc:SciChartSurface x:Name=&quot;chart&quot; Grid.Row=&quot;0&quot; Grid.Column=&quot;0&quot;
                                Background=&quot;Black&quot; &gt;

        &lt;sc:SciChartSurface.XAxis&gt;
            &lt;sc:NumericAxis AutoRange=&quot;Never&quot; AxisTitle=&quot;Distance&quot; TitleFontWeight=&quot;Bold&quot;
                                    DrawMajorBands=&quot;True&quot; MajorDelta=&quot;1000&quot; MinorDelta=&quot;500&quot;&gt;
                &lt;sc:NumericAxis.VisibleRange&gt;
                    &lt;sc:DoubleRange Max=&quot;0&quot; Min=&quot;5200&quot;/&gt;
                &lt;/sc:NumericAxis.VisibleRange&gt;
            &lt;/sc:NumericAxis&gt;
        &lt;/sc:SciChartSurface.XAxis&gt;

        &lt;sc:SciChartSurface.YAxes&gt;
            &lt;sc:NumericAxis AutoRange=&quot;Never&quot; AxisTitle=&quot;%&quot; TitleFontWeight=&quot;Bold&quot; 
                                    AxisAlignment=&quot;Left&quot;
                                    MajorDelta=&quot;20&quot; MinorDelta=&quot;5&quot; Id=&quot;Percent&quot;&gt;
                &lt;sc:NumericAxis.VisibleRange&gt;
                    &lt;sc:DoubleRange Min=&quot;0&quot; Max=&quot;100&quot; /&gt;
                &lt;/sc:NumericAxis.VisibleRange&gt;
            &lt;/sc:NumericAxis&gt;
            &lt;sc:NumericAxis AxisTitle=&quot;RPM&quot; TitleFontWeight=&quot;Bold&quot; 
                                    AxisAlignment=&quot;Left&quot;
                                    MajorDelta=&quot;20&quot; MinorDelta=&quot;5&quot; Id=&quot;RPM&quot;
                                    AutoRange=&quot;Always&quot; GrowBy=&quot;0.1, 0.1&quot; /&gt;
            &lt;sc:NumericAxis AxisTitle=&quot;MPH&quot; TitleFontWeight=&quot;Bold&quot; 
                                    AxisAlignment=&quot;Left&quot;
                                    MajorDelta=&quot;20&quot; MinorDelta=&quot;5&quot; DrawMajorBands=&quot;True&quot; Id=&quot;MPH&quot;
                                    AutoRange=&quot;Always&quot; GrowBy=&quot;0.1, 0.1&quot; /&gt;
        &lt;/sc:SciChartSurface.YAxes&gt;
        &lt;sc:SciChartSurface.RenderableSeries&gt;
            &lt;sc:FastLineRenderableSeries x:Name=&quot;brakeSeries&quot; ResamplingMode=&quot;MinMax&quot;
                                                 SeriesColor=&quot;OrangeRed&quot; AntiAliasing=&quot;True&quot;
                                                 StrokeThickness=&quot;1&quot; 
                                                 YAxisId=&quot;Percent&quot; 
                                                 DataSeries=&quot;{Binding Source={StaticResource BrakeSource}, Path=Series}&quot;
                                                  /&gt;
            &lt;sc:FastLineRenderableSeries x:Name=&quot;refBrakeSeries&quot; ResamplingMode=&quot;MinMax&quot;
                                                 SeriesColor=&quot;Red&quot; AntiAliasing=&quot;True&quot;
                                                 StrokeThickness=&quot;1&quot;
                                                 StrokeDashArray=&quot;5,5&quot;   
                                                 YAxisId=&quot;Percent&quot;/&gt;
            &lt;sc:FastLineRenderableSeries x:Name=&quot;throttleSeries&quot; ResamplingMode=&quot;MinMax&quot;
                                                 SeriesColor=&quot;LightGreen&quot; AntiAliasing=&quot;True&quot;
                                                 StrokeThickness=&quot;1&quot; 
                                                 YAxisId=&quot;Percent&quot;
                                                 DataSeries=&quot;{Binding Source={StaticResource ThrottleSource}, Path=Series}&quot;
                                         /&gt;
            &lt;sc:FastLineRenderableSeries x:Name=&quot;refThrottleSeries&quot; ResamplingMode=&quot;MinMax&quot;
                                                 SeriesColor=&quot;Green&quot; AntiAliasing=&quot;True&quot;
                                                 StrokeThickness=&quot;1&quot;
                                                 StrokeDashArray=&quot;5,5&quot;   
                                                 YAxisId=&quot;Percent&quot;/&gt;
            &lt;sc:FastLineRenderableSeries x:Name=&quot;speedSeries&quot; ResamplingMode=&quot;MinMax&quot;
                                                 SeriesColor=&quot;LightBlue&quot; AntiAliasing=&quot;True&quot;
                                                 StrokeThickness=&quot;1&quot; 
                                                 YAxisId=&quot;MPH&quot;
                                                 DataSeries=&quot;{Binding Source={StaticResource SpeedSource}, Path=Series}&quot;
                                         /&gt;
            &lt;sc:FastLineRenderableSeries x:Name=&quot;refSpeedSeries&quot; ResamplingMode=&quot;MinMax&quot;
                                                 SeriesColor=&quot;Blue&quot; AntiAliasing=&quot;True&quot;
                                                 StrokeThickness=&quot;1&quot;
                                                 StrokeDashArray=&quot;5,5&quot;   
                                                 YAxisId=&quot;MPH&quot;/&gt;
            &lt;sc:FastLineRenderableSeries x:Name=&quot;rpmSeries&quot; ResamplingMode=&quot;MinMax&quot;
                                                 SeriesColor=&quot;Gold&quot; AntiAliasing=&quot;True&quot;
                                                 StrokeThickness=&quot;1&quot; 
                                                 YAxisId=&quot;RPM&quot;
                                                 DataSeries=&quot;{Binding Source={StaticResource RPMSource}, Path=Series}&quot;
                                         /&gt;
            &lt;sc:FastLineRenderableSeries x:Name=&quot;refRPMSeries&quot; ResamplingMode=&quot;MinMax&quot;
                                                 SeriesColor=&quot;Goldenrod&quot; AntiAliasing=&quot;True&quot;
                                                 StrokeThickness=&quot;1&quot;
                                                 StrokeDashArray=&quot;5,5&quot;   
                                                 YAxisId=&quot;RPM&quot;/&gt;
        &lt;/sc:SciChartSurface.RenderableSeries&gt;

        &lt;sc:SciChartSurface.ChartModifier&gt;
            &lt;sc:ModifierGroup&gt;
                &lt;sc:LegendModifier x:Name=&quot;legendModifier&quot; GetLegendDataFor=&quot;AllSeries&quot;/&gt;
                &lt;sc:RolloverModifier x:Name=&quot;rolloverModifier&quot; ShowAxisLabels=&quot;False&quot; UseInterpolation=&quot;True&quot;/&gt;
            &lt;/sc:ModifierGroup&gt;
        &lt;/sc:SciChartSurface.ChartModifier&gt;

        &lt;!-- A nice technique is to put the rollover legend inside an annotation with relative coordinates, then it is always inside the chart surface --&gt;
        &lt;sc:SciChartSurface.Annotations&gt;
            &lt;sc:CustomAnnotation CoordinateMode=&quot;Relative&quot; X1=&quot;0.01&quot; Y1=&quot;0.02&quot; HorizontalAnchorPoint=&quot;Left&quot; VerticalAnchorPoint=&quot;Top&quot;&gt;
                &lt;sc:CustomAnnotation.Content&gt;
                    &lt;!-- Define a panel to display rollover results --&gt;
                    &lt;Border Grid.Row=&quot;1&quot; BorderBrush=&quot;#55000000&quot; BorderThickness=&quot;2&quot; Background=&quot;#77FFFFFF&quot; VerticalAlignment=&quot;Top&quot; HorizontalAlignment=&quot;Left&quot; Padding=&quot;5&quot;&gt;
                        &lt;ItemsControl DataContext=&quot;{Binding ElementName=rolloverModifier}&quot; ItemsSource=&quot;{Binding SeriesData.SeriesInfo}&quot;&gt;
                            &lt;ItemsControl.ItemTemplate&gt;
                                &lt;!-- Template will be instantiated for each SeriesInfo in the RolloverModifier.SeriesInfo collection --&gt;
                                &lt;!-- See the SciChart API Documentation for SeriesInfo types, there is a different type for OHLC and XyzDataSeries for instance --&gt;
                                &lt;!-- SeriesInfo is the datacontext for the below. Note you can access the original RenderableSeries via SeriesInfo.RenderableSeries --&gt;
                                &lt;DataTemplate&gt;
                                    &lt;Grid HorizontalAlignment=&quot;Left&quot;&gt;
                                        &lt;Grid.ColumnDefinitions&gt;
                                            &lt;ColumnDefinition/&gt;
                                            &lt;ColumnDefinition/&gt;
                                            &lt;ColumnDefinition/&gt;
                                            &lt;ColumnDefinition/&gt;
                                        &lt;/Grid.ColumnDefinitions&gt;

                                        &lt;Ellipse Fill=&quot;{Binding SeriesColor, Converter={StaticResource ColorToBrushConverter}}&quot; Width=&quot;9&quot; Height=&quot;9&quot; Margin=&quot;3&quot;/&gt;

                                        &lt;TextBlock Grid.Column=&quot;1&quot; Text=&quot;{Binding SeriesName}&quot; Width=&quot;90&quot; Style=&quot;{StaticResource tbStyle}&quot;/&gt;

                                        &lt;!-- When binding to XValue, YValue of type IComparable, StringFormat is mandatory due to a --&gt;
                                        &lt;!-- XAML bug that cannot convert IComparable to text, even though underlying type is double --&gt;
                                        &lt;StackPanel Orientation=&quot;Horizontal&quot; Grid.Column=&quot;2&quot;&gt;
                                            &lt;TextBlock Text=&quot;X: &quot; Style=&quot;{StaticResource tbStyle}&quot;/&gt;
                                            &lt;TextBlock Text=&quot;{Binding XValue, StringFormat=\{0:0.00\}}&quot; Style=&quot;{StaticResource tbStyle}&quot;/&gt;
                                        &lt;/StackPanel&gt;
                                        &lt;StackPanel Orientation=&quot;Horizontal&quot; Grid.Column=&quot;3&quot;&gt;
                                            &lt;TextBlock Text=&quot;Y: &quot; Margin=&quot;3&quot; Style=&quot;{StaticResource tbStyle}&quot;/&gt;
                                            &lt;TextBlock Text=&quot;{Binding YValue, StringFormat=\{0:0.00\}}&quot; Style=&quot;{StaticResource tbStyle}&quot;/&gt;
                                        &lt;/StackPanel&gt;

                                    &lt;/Grid&gt;
                                &lt;/DataTemplate&gt;
                            &lt;/ItemsControl.ItemTemplate&gt;
                        &lt;/ItemsControl&gt;
                    &lt;/Border&gt;
                &lt;/sc:CustomAnnotation.Content&gt;
            &lt;/sc:CustomAnnotation&gt;
        &lt;/sc:SciChartSurface.Annotations&gt;
    &lt;/sc:SciChartSurface&gt;

    &lt;sc:SciChartLegend x:Name=&quot;legendControl&quot;
                       HorizontalAlignment=&quot;Left&quot;
                       VerticalAlignment=&quot;Bottom&quot;
                       LegendData=&quot;{Binding LegendData, ElementName=legendModifier, Mode=OneWay}&quot;
                       ShowVisibilityCheckboxes=&quot;true&quot; 
                           /&gt;
&lt;/Grid&gt;

</UserControl>

I am very impressed with your product and after having a false start with Visiblox components I am really excited to be using your tool. It’s easy to use, works as advertised with plenty of samples to get almost everything up and running in no time what so ever.

Thanks,
Doug

  • Doug asked 8 years ago
0 votes
7k views

I am trying to use SciChart to graph a logarithmic spiral with a fast line renderable series. I am also using the zoom pan and mouse wheel zoom chart modifiers to allow the user to zoom and pan the chart.

However, panning the chart so part of the spiral goes off the right side of the screen causes the corresponding left part of the spiral to disappear. Moving the center of the spiral off the right side of the screen causes the entire chart disappear.

I suspect SciChart is attempting to optimizing the line drawing and does not expect the line to loop back into the visible region. Is there a setting I can change to prevent the spiral in the visible region from disappearing?

I am using SciChart version 1.55.4761 and have noticed this behavior with the x-y scatter renderable series as well.

3 votes
11k views
  • bstapylton asked 8 years ago
  • last active 7 years ago
Showing 1 - 50 of 3k results