Pre loader

Questions

2 votes
12k views

Hi

Has anyone implemented or has any thoughts on how to implement keyboard shortcuts to zoom and pan? Something like key up/down/right/left to pan and shift+up/down/right/left to zoom?

2 votes
11k views

I want to have a BoxAnnotation where Y1 (- double.Infinity) and Y2 (+ double.Infinity). Basically I wanna specify only X1 and X2. And the behaviour must ensure always the box annotations Y1 & Y2 stretch to visible area even when I resize (zoomout) the chart.

In the screen shot its not stretched.

2 votes
7k views

Now I using white collor for backgrounds:

 <!-- Background defaults -->
<item name="sciChartBackground">@color/white</item>
<item name="legendBackground">@color/white</item>
<item name="axisTooltipBackground">@color/white</item>

But I whant to display text view uhder chart
When I set backgrounds as transparent I see black lines

And questions is:
1. how can I setup chart to display text under chart component
2. where I can read/see information about styles and for which each parameter is needed.

On first screenshot its what I needed
On second one what I have

2 votes
13k views

Hi,

Now that I’m binding to a SeriesSource instead of creating my RenderableSeries in XAML, I don’t know how to apply a RolloverMarkerTemplate.

In XAML I had the following:

                        <SciChart:FastLineRenderableSeries SeriesColor="Blue">
                            <SciChart:FastLineRenderableSeries.Style>
                                <Style TargetType="{x:Type SciChart:FastLineRenderableSeries}">
                                    <Setter Property="RolloverMarkerTemplate">
                                        <Setter.Value>
                                            <ControlTemplate>
                                                <Ellipse Width="7" Height="7" Fill="SlateGray" Stroke="SlateGray" StrokeThickness="1" />
                                            </ControlTemplate>
                                        </Setter.Value>
                                    </Setter>
                                </Style>
                            </SciChart:FastLineRenderableSeries.Style>
                        </SciChart:FastLineRenderableSeries>

But now I do something like this:

    _chartSeries.Add(New ChartSeriesViewModel(rawSeries, New FastLineRenderableSeries()))
            With _chartSeries(0).RenderSeries
                .SeriesColor = Colors.Blue
            End With

I’m able to set the SeriesColor = Colors.Blue in code, but I don’t know how to generate the RolloverMarkerTemplate to control other features such as the ellipse shape.

Thanks,
–George

2 votes
11k views

Hi,
How can I get my application to do the following:

  • RubberBandXyZoomModifier execute on left mouse
  • ZoomPanModifier execute on left mouse + ctrl

I tried extending the ZoomPanModifier as such:

public class ZoomPanModifierEx : ZoomPanModifier
{
   public override void OnModifierMouseDown(ModifierMouseArgs e)
   {
      IsEnabled = (e.MouseButtons == MouseButtons.Left) && (e.Modifier == MouseModifier.Ctrl);
      base.OnModifierMouseDown(e);
   }
}

This did not work though.

Thanks in advance.

Johnny

2 votes
6k views

Trying to install SciChart.iOS NuGet package for Xamarin.iOS project results the following error:

Package SciChart.iOS 2.0.1.527 is not compatible with xamarinios10 (Xamarin.iOS,Version=v1.0). Package SciChart.iOS 2.0.1.527 supports: xamarinios (xamarin-ios,Version=v0.0)

Wondering what the heck is “xamarin-ios,Version=v0.0”? It must be xamarinios10. We’re considering to buy SciChart but right now our build server is stuck on this error. As a workaround, we raname xamarin-ios to xamarinios10 in the lib directory but this not an option for a cloud build server.

  • rubs00 asked 6 years ago
  • last active 6 years ago
2 votes
13k views

Hi guys,

I’m tackling a difficult problem in my solution here. Our chart will allow users to add as many as 50 different series at any one time.

As well as this – the user will be able to specify the RenderableSeries (Chart Type) of each of these between; column, line and mountain.

One solution is to replicate the method found in your own SciChart SciTrader demonstration (in which each type of RenderableSeries is added to the xaml once for each data series, they share a DataSeries and then the Visibility property within the style is managed to only show the one the user requests), but this would require 150 (50 placeholders for 50 possible series * 3 definitions per series) definitions of different RenderableSeries, each with their own Style defined.

Is there any way to create a custom RenderableSeries that extends BaseRenderableSeries and add a DependencyProperty that allows a binding from the xaml to modify the type of RenderableSeries that is displayed?

Even better – is there a way to add RenderableSeries using MVVM (I noticed the add/remove dynamic series tutorial has a note to standby for such a tutorial). I will attempt to find a solution by going down this path as it sounds much less verbose.

Thanks in advance for all your help!
Miles

  • bstapylton asked 11 years ago
  • last active 1 month ago
2 votes
9k views

Hi, I’m trying to just create a simple WPF MVVM application that binds to the ViewportManager and add series dynamically. The data range (X and Y) will vary and I’d like to zoom to fit after a new series is added. Seems simple, but I cannot get it to work. I’ve tried calling ZoomExtents on a bound DefaultViewportManager as well as InvalidateElement() and InvalidateParentSurface(RangeMode.ZoomToFit) and they all have no affect. I was assuming I was doing something wrong, but if you try the WPF demo/sample application it does the same thing. If you go to 2D Charts -> MVVM Examples -> Manipulate Series MVVM, there is a call to AnimateZoomExtents that doesn’t work either after you add a series. You still have to double click on the graph after clicking the plus button to make it fit the graph. I just want to zoom to fit the data and not use code behind. The functionality is clearly there because if you define <s:ZoomExtentsModifier ExecuteOn="MouseDoubleClick"/> it works perfectly, so how do I force that to happen from my view model? Thank you!

  • Andy None asked 6 years ago
  • last active 6 years ago
2 votes
8k views

Since many of the modifiers throw an exception if there isn’t exactly 1 primary axis, is there a built-in controller to maintain that?

I ended up having to put an event on all created axes to check if IsPrimaryAxis changes to True.
If it does, then it goes through all the surfaces other axes and sets the others to False.
Without this, the modifier.XAxis get accessor function throws an exception saying either “too many items found” or “no items found” while looking for the single primary axis.

I have a small sample I can include that demonstrates this, but this seems like I’m just missing something simple…

Thanks!

  • dwoerner asked 8 years ago
  • last active 8 years ago
2 votes
8k views

I’ve been trying to get SciChart to work with good performance and as part of my experimentation am trying to see how RenderPriority.Manual works. As far as I can tell, it doesn’t.

I haven’t been able to find much in terms of samples or docs. According to the little documentation here:
https://www.scichart.com/documentation/v4.x/SciChart.Charting~SciChart.Charting.Visuals.RenderPriority.html

It says

Manual — Never redraws automatically. You must manually call
InvalidateElement() or ZoomExtents() on the SciChartSurface in order
to get it to redraw

Now, when I try to call either of those functions on my SciChartSurface, nothing visually happens. I’ve tried other Invalidate methods as well, and still no refresh love.

I’ve attached the small sample application that repro’s the issue.

Please let me know what I’m doing wrong.

Thanks,
Brian

2 votes
10k views

Hi, in the Dynamically Create Annotations demo, the method on how annotations are created is by (for example a line):

1) First Click on the annotation button
2) Click on the SciChart Surface. This creates the first point of a line
3) Click again on the end point of the line.

Instead of having to do two clicks, is there a way to click and drag instead? eg.

1) First Click on the annotation button
2) Click on the SciChart Surface. This creates the first point of a line
3) drag to the end point of the line.

I just want to mimic Microsoft power point behaviour as our users are more familiar with it.

Thanks

  • Azrin Sani asked 8 years ago
  • last active 9 months ago
2 votes
11k views

I am using the SciChart control to render real-time data as it arrives from a data source. This source could be producing data many times per second. New values are appended to the series. If I leave my application running for a long time, the data series gets very long and rendering slows down. I can remove data points from the series when they are older than the VisibleRange and that certainly helps.

My problem is that the user might set the VisibleRange to span several days. If the data source is sending data at 10Hz then that would be 6 million data values per week, redrawing at 10Hz, which I guess will cause some CPU loading. I would like to be able to remove intermediate data from the series if new data being appended to the series would render in the same horizontal pixel as the previous data and is neither the maximum nor minimum Y value at that pixel. In order to do that I need to be able to examine the DateTime of the incoming value and determine its X pixel, then walk back through the existing data to see if it would be visible if rendered (in a new X pixel, or a new min or max in the same pixel as the previous value).

So, finally, to the question: Is there a method for determining the X,Y pixel coordinate for a give X and Y value?

  • asthomas asked 10 years ago
  • last active 9 years ago
2 votes
13k views

Hello,

based on your sample Screenshots, XPS Printing, X-Axis Text Labels i render a offscreen SciChart and copy it to the clipboard. It seems to works, but the Axis labels of X and Y axes are at the wrong positions (they are all at the same position). Please see the sample attached.

Many thanks,
Robin

2 votes
7k views

From your documentation:

4.9 Annotations

SciChart features a rich Annotations API, that allows you to place UIKit UIElements over the chart.
SciChat provides a number of built-in annotations, but you can also create your own.

SCIBoxAnnotation, SCILineAnnotation and SCITextAnnotation are cool, but sometimes it’s not enough.

Is it possible to render UIView on the chart (at least UIImage)?
Is it possible to draw dashed line annotation?
Could you provide an example of creating custom annotation class?

2 votes
0 answers
7k views

Hi, we are updating our scichart component to version 5. Now we had to change our Series Binding which is obsolete now to RenderableSeries binding.

In the most graphs it works fine but I have also graphs that uses ElementName with paths for the binding and that does not work.

I tried the following versions which all did not work, is there a different way to do it?

<!-- old scichart version which is not allowed anymore-->
    <s:SciChartSurface Style="{StaticResource SciChartSurfaceStyle}" 
                       SeriesSource ="{Binding ElementName=GraphRoot, Path=Series}"
                       BorderThickness="1 0 0 0"
                       Background="Transparent">

<!-- First try with new version which is not working because we don't use seriesBinding-->
    <s:SciChartSurface Style="{StaticResource SciChartSurfaceStyle}" 
                       RenderableSeries ="{Binding ElementName=GraphRoot, Path=Series}"
                       BorderThickness="1 0 0 0"
                       Background="Transparent">

<!-- Second try with new version which is also not working -->
    <s:SciChartSurface Style="{StaticResource SciChartSurfaceStyle}" 
                       RenderableSeries ="{s:SeriesBinding ElementName=GraphRoot, Path=Series}"
                       BorderThickness="1 0 0 0"
                       Background="Transparent">

<!-- Last try with new version which is also not working becaus without ElementName he cannot find the Series-->
    <s:SciChartSurface Style="{StaticResource SciChartSurfaceStyle}" 
                       RenderableSeries ="{s:SeriesBinding Series}"
                       BorderThickness="1 0 0 0"
                       Background="Transparent">

Please is there any idea how to solve this?

2 votes
12k views

Hi folks,

I haven’t been able to produce scatter charts using a XyScatterRenderableSeries. To demonstrate, I took a sample project you sent me earlier and replaced one line as shown below:

_chartSeries = new ObservableCollection<IChartSeriesViewModel>();
//var renderableSeries = new FastLineRenderableSeries { SeriesColor = Colors.BlueViolet};
var renderableSeries = new XyScatterRenderableSeries { SeriesColor = Colors.BlueViolet};
_chartSeries.Add(new ChartSeriesViewModel(ds0, renderableSeries));

With the original FastLineRenderableSeries, I see the chart. But with XyScatterRenderableSeries, the data does not appear. (Annotations remain visible, of course.)

Am I doing something wrong, or does the ChartSeriesViewModel not work with scatter charts?

Thanks,
–George

  • yefchak asked 10 years ago
  • last active 8 years ago
2 votes
12k views

I have a situation where I need to have a lot of independent realtime charts rendered on the screen at the same time. I have put a scichart into a user control and that user control into a list so I can reuse my configuration.

Unfortunately, the behavior I am seeing is that when I have more than 5 charts, the charts stutter really badly. I’m using the SciChartPerformanceOverlay to determine what the FPS is of each of the charts.

I can see that in my 5 chart situation, if my mouse cursor is NOT over the window or NOT moving on the window, each chart has an FPS of ~18 for SciChartSurface and an FPS of >500 for Composition Target. When I start to move the mouse around on top of the window, the SciChartSurface FPS value drops to < 5 and the Composition Target drops to ~300.

I’ve got no mouse events hooked up, I’ve set TryApplyDirectXRenderer to true and it seems to accept it. I’ve double-checked the following values:

Direct3D10CompatibilityHelper.HasDirectX10CapableGpu: True
Direct3D10CompatibilityHelper.HasDirectX10RuntimeInstalled: True
Direct3D10CompatibilityHelper.IsSupportedOperatingSystem: True
Direct3D10CompatibilityHelper.SupportsDirectX10: True

I’m suspending the chart before adding points. Each chart only has 1000 points inside a XyDataSeries<int, double> that is databound to a FastLineRenderableSeries. I’m even using Update instead of Append to try to reuse the same memory, in case that makes a difference.

I’ve played with the MaxFrameRate and nothing seems to help.

My dev machine is a bit old and the graphics card is Intel-based, but I never imagined the performance would get so bad so quickly. I’m hoping there’s something I’m missing here as I’ve read such good things about SciChart.

Please let me know if there’s any advice.

Thanks

2 votes
4k views

I would like to dynamically add and remove columns from a ColumnRenderableSeriesViewModel in code behind.

I am using MVVM and the SeriesBinding. I assigned a XyDataSeries<double, double> to the ColumnRenderableSeriesViewModel .DataSeries.

The chart initially draws all the bars for each item in the XYDataSeries, but If I append or remove one of them, the chart does not update and show the new bar or remove the old bar.

Here is my XAML:

        <s:SciChartSurface RenderableSeries="{s:SeriesBinding RenderableSeries}">
            <s:SciChartSurface.XAxis>
                <s:NumericAxis />
            </s:SciChartSurface.XAxis>

            <s:SciChartSurface.YAxis>
                <s:NumericAxis />
            </s:SciChartSurface.YAxis>
        </s:SciChartSurface>

And some of my view model:

using SciChart.Charting.Model.ChartSeries;
using SciChart.Charting.Model.DataSeries;
using System.Collections.ObjectModel;

namespace ChartExample {
    public class ChartViewModel {
        ColumnRenderableSeriesViewModel _seriesViewModel = new ColumnRenderableSeriesViewModel();
        XyDataSeries<double, double> _dataSeries = new XyDataSeries<double, double>();

        public ChartViewModel() {
            RenderableSeries.Add(_seriesViewModel);
            _seriesViewModel.DataSeries = _dataSeries;
        }


        public ObservableCollection<IRenderableSeriesViewModel> RenderableSeries { get; } = new ObservableCollection<IRenderableSeriesViewModel>();


        public void AddSeries() {
            _dataSeries.Append(_dataSeries.Count, _dataSeries.Count);
        }


        public void RemoveSeries(int seriesIndex) {
            _dataSeries.RemoveAt(seriesIndex);
        }
    }
}

Can you please tell me what I might be doing wrong?

  • Doug Witt asked 5 years ago
  • last active 5 years ago
2 votes
3k views

After update to SciChart.6.2.1.13304 we get an InvalidOperationException:

    This SciChartSurface instance is disposed, you cannot set a RenderSurface on it at this time
System.InvalidOperationException: This SciChartSurface instance is disposed, you cannot set a RenderSurface on it at this time
   at SciChart.Charting.Visuals.SciChartSurfaceBase.OnRenderSurfaceDependencyPropertyChanged(DependencyPropertyChangedEventArgs e)
   at SciChart.Charting.Visuals.SciChartSurface.OnRenderSurfaceDependencyPropertyChanged(DependencyPropertyChangedEventArgs e)
   at SciChart.Charting.Visuals.SciChartSurfaceBase.eit(DependencyObject ph, DependencyPropertyChangedEventArgs pi)
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at System.Windows.DependencyObject.SetCurrentValue(DependencyProperty dp, Object value)
   at SciChart.Charting.VisualXcceleratorEngine.bov.nmx()
   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)

I have no idea what happen. This is how we initalize SciChart:

<s:SciChartSurface x:Name="sciChart"
                           Grid.Column="2"
                           RenderPriority ="Low"
                           s:PerformanceHelper.EnableExtremeDrawingManager="True"
                           s:PerformanceHelper.EnableExtremeResamplers="True"
                           s:VisualXcceleratorEngine.DowngradeWithoutException="True"
                           s:VisualXcceleratorEngine.FallbackType="{x:Type s:HighQualityRenderSurface}"
                           s:VisualXcceleratorEngine.AvoidBlacklistedGpu="False"
                           s:VisualXcceleratorEngine.EnableImpossibleMode="True"
                           s:VisualXcceleratorEngine.IsEnabled="{Binding Path=DirectXSupport, FallbackValue=True}"
                           s:SciChartGroup.VerticalChartGroup="{Binding Path=ChartViewModel.VerticalChartGroupKey}"
                           Style="{StaticResource SciChartSurfaceStyle}"
                           GridLinesPanelStyle="{StaticResource DefaultGridLinesPanelStyle}"
                           RenderableSeries="{s:SeriesBinding RenderableSeriesViewModels, UpdateSourceTrigger=PropertyChanged}">

Any idea?

  • Tobias asked 3 years ago
  • last active 2 years ago
2 votes
12k views

I’m new to SciCharts, so this might be a terminology issue or something like that.

I’m trying to add a vertical line annotation to my chart that the user can drag around. So far so good. However, I’d like it to also display the values of the series data the line intersects with. This is where I’m unsure of the best way to proceed. What I want is basically the behavior of the RolloverModifier, which displays tooltips when it intersects with series data, but it’s always visible rather than triggered by a rollover. It may be possible to use the RolloverModifier for this, but I ran into an issue where I couldn’t have both a VerticalLineAnnotation with IsEditable=true and a RolloverModifier, and I need to add another VerticalLineAnnotation in addition to this one.

Any advice?

Hopefully I just missed something in the documentation.

2 votes
11k views

Hi,

I’ve got a chart with several XyScatterRenderableSeries and I want to add functionality to switch between Logarithmic and normal Numeric axes. Could you please let me know the best approach to do that?

Thanks & Regards,
Charith

2 votes
3k views

var lineData = new XyDataSeries<DateTime, double>();

if I have a XyDataSeries<DateTime, double> then I can get the sweeping animation to work. If I change the XyDataSeries to XyDataSeries<DateTime, int> it fails to produce the chart and gives an exception stating

SciChartSurface didn’t render, because an exception was thrown:
Message: Specified cast is not valid.

Stack Trace: at SciChart.Charting.Visuals.RenderableSeries.Animations.Transformations.Point2DSeriesTransformation1.SweepTransform(T pointSeries, Double currentProgress)
at SciChart.Charting.Visuals.RenderableSeries.Animations.Transformations.Point2DSeriesTransformation
1.O(IPointSeries D, Double I)
at SciChart.Charting.Visuals.RenderableSeries.Animations.SweepAnimation.Animate(IRenderPassData rpd, Double currentProgress)
at SciChart.Charting.Visuals.RenderableSeries.Animations.SeriesAnimationBase.OnRender(IRenderPassData rpd)
at SciChart.Charting.Visuals.RenderableSeries.BaseRenderableSeries.WFB(IRenderContext2D D, IRenderPassData I)
at A.IJ.T(ISciChartSurface D, RenderPassInfo I, IRenderContext2D J, Int32 M)
at A.IJ.M(ISciChartSurface D, RenderPassInfo I, IRenderContext2D J)
at A.IJ.RenderLoop(IRenderContext2D renderContext)
at SciChart.Charting.Visuals.SciChartSurface.DoDrawingLoop()

Is this possible or does yaxis have to be a double? If I use fade animation it works properly. Thanks.

  • John asked 4 years ago
  • last active 4 years ago
2 votes
11k views

I’m currently using the MouseWheelZoomModifier to allow the user to zoom into charts (XyDirection=”XYDirection”), but I’ve now had a request to provide an way for the user to zoom X only, Y only, or both. I realise it’s possible to change the XyDirection property (e.g. using checkboxes, like in your demo), but the PM is asking if a more “user friendly” solution is possible.

One option might be to change the zoom direction based on where the mouse is, e.g. if it’s over the X-axis then zoom X only, over the Y-axis then zoom Y only, otherwise zoom XY.

Another option may be to use modifier keys, e.g. wheel + Ctrl = X only, wheel + Shift = Y only, wheel on its own = XY.

Can you offer some pointers towards a suitable solution, if such a thing is possible? Ideally it would be nice if I could implement a customer modifier, if it’s not too complicated, rather than combining the out-of-the-box modifier with mouse events.

  • andyste1 asked 10 years ago
  • last active 7 years ago
2 votes
9k views

I am implementing a feature to load more historical data when users pan to the left side on a CategoryDateAxis.
To load more, i need to have 2 Date which is the earliest data point i have and the Date that is shown on the X-Axis

For the earliest data point, i can get via IXyDataSeries#getXMin()
But for the other Date, i’m not sure how to get it. I can listen to range changes via IAxisCore#VisibleRangeChangeListener, but the range returns Double. I cant figure out to convert it into a Date

  • abc def asked 6 years ago
  • last active 6 years ago
2 votes
13k views

attachment is one type chart used in our product. could the sciChart implement this functions?

great thanks.

  • darkgone asked 11 years ago
  • last active 7 years ago
2 votes
10k views

I am attempting to replace an existing chart (Infragistics) as we have now moved this application to a tablet with less processing power and the current solution is using 40 – 50% cpu on said tablet. I am hoping to create a replacement that is much more efficient.

The current chart has 4 wave forms, each displays 8 seconds (which is 4000 points) of data and wraps around on itself with a moving gap just like an ECG machine in a hospital room. The way I get this behavior currently is to create an ObservableCollection with 4000 elements all with NaN values and then update the collection by index resetting the index to 0 when the far right is hit. This is updated from a buffer of incoming datapoints that I create to ensure all points are equidistant by adding points if there are time gaps or dropping points if time overlapped. From what I have read in the forums and samples on how SciChart ECG charts are created that is not the method used. Can anyone suggest the absolute most efficient way to create such a chart using SciChart?

  • mdutra asked 9 years ago
  • last active 9 years ago
2 votes
4k views

Hi ,

I am currently using the DataPointSelectionModifier for StackedColumnRenderableSeriesViewModel and I am having an issue trying to have a single selection that is togglable.

I am currently not AllowingMultiSelection so the default value is SelectionMode.Replace, which, in case you click on the same column, it will deselect that column and then select it again. Is there a way around this?

Best Regards.

2 votes
7k views

Hello, I am currently importing and displaying a .obj file as a ObjectModel3D object similar to the following syntax of the code provided in the AddObjectsToA3DChart.xaml example:

object:ObjectModel3D TextureSource=”{StaticResource BlackTexture}” Source=”{StaticResource KnightLowObj3DSource}” Position=”0.0625, 0.6, 0.8125″ CoordinateMode=”Relative” Scale=”0.2, 0.2, 0.2″ Rotation=”{StaticResource ObjRotationState}”

Where ObjRotationState is : object:Rotation3D x:Key=”ObjRotationState” Axis=”YAxis” Angle=”180″

The above code excerpt sets the rotation angle at 180 degrees on the Y-axis only for the ObjectModel3D object.

However, I would like to set the rotation angle for the X, Y, and Z axis of the ObjectModel3D object at the same time. Is it possible to set the rotational angle for multiple axis as described? If not, are there suggested workarounds to achieve the same behavior?

Thank you for your assistance.

2 votes
10k views

Is there any documentation besides the tutorials? Something like the one found on MSDN, with all the Properties of the SciChart elements that can be styled.

  • catalin asked 11 years ago
  • last active 7 years ago
2 votes
13k views

Hi!

I want SciChart to display always the first and last value of an axis. I created a chart wich shows volume on the y-axis and time in seconds on the y-axis. The axis are initialized in the view model with fixed axis dimensions like this:

this.TimeAxis = new NumericAxis();
this.TimeAxis.VisibleRange.SetMinMax(0, 60);
this.TimeAxis.AxisTitle = "Time [s]";
((AxisBase)this.TimeAxis).Style =        (Style)Application.Current.FindResource("DefaultSciChartAxisStyle");

this.VolumeAxis = new NumericAxis();
this.VolumeAxis.VisibleRange.SetMinMax(0, 8);
this.VolumeAxis.AxisTitle = "Volume [l]";
this.VolumeAxis.AxisAlignment = AxisAlignment.Left;
((AxisBase)this.VolumeAxis).Style = (Style)Application.Current.FindResource("DefaultSciChartAxisStyle");

How is it possible to display the first and last value of the axis as shown with red numbers in the attached example.png which are not shown by default?

Best regards,
Joerg

2 votes
11k views

Hi Guys,

I am just wondering if you can help us with the following issue.
We are trying to create a scatter char. The data series set looks like :

public IDataSeriesSet<float, float> ChartDatafloat

The problem that we are having is that there are points that are missing on the chart when it gets generated. so, we would like if you guys could test with the points that I am attaching (scattercsv.csv) and figure out why this is happening… We have seen that points around 14 and between 2000 and 2050 in the Xaxis are not displaying.

<SciChart:SciChartSurface x:Name="SciChartSurface" SciChart:ThemeManager.Theme="BrightSpark"
                              DataSet="{Binding ChartDataXfloat, Mode=TwoWay}">

        <!-- Declare RenderableSeries -->
        <SciChart:SciChartSurface.RenderableSeries>
            <SciChart:XyScatterRenderableSeries>
                <SciChart:XyScatterRenderableSeries.PointMarkerTemplate>
                    <ControlTemplate>
                        <Grid Height="7" Width="7">
                            <Viewbox>
                                <Path Data="M0,0 L10,10 M0,10 L10,0 M0,5 L10,5" Stretch="Uniform" Stroke="Blue" StrokeThickness="1"/>
                            </Viewbox>
                        </Grid>
                    </ControlTemplate>
                </SciChart:XyScatterRenderableSeries.PointMarkerTemplate>
            </SciChart:XyScatterRenderableSeries>
        </SciChart:SciChartSurface.RenderableSeries>

        <!-- Create an X Axis with Growby -->
        <SciChart:SciChartSurface.XAxis>
            <SciChart:NumericAxis VisibleRange="0,2800">
                <SciChart:NumericAxis.GrowBy>
                    <SciChart:DoubleRange Min="0.1" Max="0.1"/>
                </SciChart:NumericAxis.GrowBy>
            </SciChart:NumericAxis>
        </SciChart:SciChartSurface.XAxis>

        <!-- Create a Y Axis with Growby -->
        <SciChart:SciChartSurface.YAxis>
            <SciChart:NumericAxis>
                <SciChart:NumericAxis.GrowBy>
                    <SciChart:DoubleRange Min="0.1" Max="0.1"/>
                </SciChart:NumericAxis.GrowBy>
            </SciChart:NumericAxis>
        </SciChart:SciChartSurface.YAxis>

    </SciChart:SciChartSurface>

I am attaching as well an image that shows how the chart should looks like. I am only trying to display the blue points. So, chart number 1 displays all the points that I am attaching in the spreadsheet and chart number 2 is the one that I am trying to create with the same points and as you can see is missing some of the points.

Hope you can help us….

Thanks very much

2 votes
9k views

Hi,
I have a SciChartSurfacewith one xaxis an four yaxis and a dynamic number of series which are added at runtime.
Also I have some modifiers especially the ZoomExtentsModifier( ExecuteOn=”MouseDoubleClick” XyDirection=”XDirection”) and for each yaxis a yaxisdragmodifier.
Is it possible to double click on a single yaxis and ZoomExtends only this yaxis?

Regards Markus

2 votes
8k views

Hi SciChart Team,

Thank you all for your help and support.

I finally got the multiple symbols on the stock chart with reference to this and with this clear explanation
IAnnotation annotation = builder.newCustomAnnotation().withContent(R.layout.example_custom_annotation_view).withYAxisId(PRICES).withPosition(i, prices.getHighData().get(i)).withVerticalAnchorPoint(VerticalAnchorPoint.Bottom).build();
this.annotations.add(annotation);

The above code worked for me and hope it helps to others too who all are trying this.

Thanks,
Ghousia

2 votes
8k views

Basically I want to do something like this:
https://finviz.com/map.ashx?t=sec

It’s a hierarchical dataset, displayed visually. Is there a way to do this with SciChart?

  • kelias asked 5 years ago
  • last active 5 years ago
2 votes
8k views

Hi guys,

I’ve been trying to select data points in my heat map for the whole without success. I’ve read, re-read and re-re-read the documentation, but I can’t figure out what I’m doing wrong.

Here’s the XAML.

...

<s:SciChartSurface.RenderableSeries>
    <s:FastUniformHeatmapRenderableSeriesForMvvm
        x:Name="heatmapSeries" 
        Opacity="0.9" 
        DataSeries="{Binding UniformHeatmapDataSeries}"
        s:DataPointSelectionModifier.IncludeSeries="True" >

        <s:FastUniformHeatmapRenderableSeriesForMvvm.ColorMap>
            <s:HeatmapColorPalette Maximum="60" Minimum="6">
                <s:HeatmapColorPalette.GradientStops>
                    <GradientStop Offset="0" Color="Transparent"/>
                    <GradientStop Offset="0.1" Color="DarkBlue"/>
                    <GradientStop Offset="0.2" Color="CornflowerBlue"/>
                    <GradientStop Offset="0.4" Color="DarkGreen"/>
                    <GradientStop Offset="0.6" Color="Chartreuse"/>
                    <GradientStop Offset="0.8" Color="Yellow"/>
                    <GradientStop Offset="1" Color="Red"/>
                </s:HeatmapColorPalette.GradientStops>
            </s:HeatmapColorPalette>
        </s:FastUniformHeatmapRenderableSeriesForMvvm.ColorMap>

        <s:FastUniformHeatmapRenderableSeriesForMvvm.PointMarker>
            <s:XPointMarker Fill="Pink" Width="5" Height="5"/>
        </s:FastUniformHeatmapRenderableSeriesForMvvm.PointMarker>

        <s:FastUniformHeatmapRenderableSeriesForMvvm.SelectedPointMarker>
            <s:TrianglePointMarker Fill="White" Width="12" Height="12"/>
        </s:FastUniformHeatmapRenderableSeriesForMvvm.SelectedPointMarker>

    </s:FastUniformHeatmapRenderableSeriesForMvvm>

    ...

</s:SciChartSurface.RenderableSeries>
...

Here’s the MVVM code.

...
class SelectedPointMetadata : IPointMetadata
{
    public bool IsSelected { get; set; }

    public event PropertyChangedEventHandler PropertyChanged;
}
...

double[,] heatMap = new double[heatMapHeight + glowRadius * 2, heatMapWidth + glowRadius * 2];
double[,] glowMatrix = this.getGlowEffectMatrix(glowRadius);

SelectedPointMetadata[,] selectablePoints = new SelectedPointMetadata[heatMapHeight + glowRadius * 2, heatMapWidth + glowRadius * 2];

for (int i = 0; i < spectrogram.SpectrogramAtoms.Count; i++) {
    var atom = spectrogram.SpectrogramAtoms[i];
    int x = Math.Min((int)(atom.Frequency.Hertz / frequencyStep) + glowRadius, heatMapHeight - 1);
    int y = Math.Min((int)(atom.Time.Seconds / xStep) + glowRadius, heatMapWidth - 1);
    this.applyEffectMatrix(x, y, atom.SNR, ref heatMap, ref glowMatrix, glowRadius);

}

var xBound = heatMap.GetLength(0);
var yBound = heatMap.GetLength(1);

Random rnd = new Random();

for (var i = 0; i < xBound; i++)
{
    for (var j = 0; j < yBound; j++)
    {
        var x = rnd.Next(1, 10);

        selectablePoints[i, j] = new SelectedPointMetadata() { IsSelected = false };

        if (x == 5)
        {
            selectablePoints[i, j].IsSelected = true;
        }

    }
}

this.UniformHeatmapDataSeries = new UniformHeatmapDataSeries<double, double, double>(
    heatMap,
    (-xStep * glowRadius),
    xStep,
    (-frequencyStep * glowRadius),
    frequencyStep,
    selectablePoints
    );

...

What am I missing?

2 votes
9k views

hello

I have problems with RolloverModifier while dataseries are UnsortedXyDataSeries. If I change to (sorted)XyDataSeries everything OK. I didn’t find any information in documentation that this modifier has such restriction.
Second question about sorted series: does Append(x,y) of XyDataSeries require to be last point of x range or it can append to any place of existing range?

1 vote
5k views

I have a DateTimeAxis.

While I can see a way to template the format the text for all the axis tick labels, I need a way to completely override what is being rendered for each item. I want, for example, today’s date to be in bold, and to apply other text/buttons below the axis label conditionally, depending on logic specific to that date.

Is this possible?

1 vote
10k views

Hello everyone.

I have chart with adding data every second.

What i want to do:
– by dragging finger left, right – chart scrolls left and right (can go to past data, etc)
– by two fingers zoom gesture – it zooms (only horizontally with autorange by Y axis)
– i set a visible range limit to the right in this way: user can scroll to the right xMax to be in the middle (currently this part not working – and axis zooming, when i continue scrolling to the right)

I tried a lot of different modifiers, but none of them was ok.

My setup:

lineDataSeries.addObserver(new IDataSeriesObserver() {
            @Override
            public void onDataSeriesChanged(IDataSeries<?, ?> iDataSeries, int i) {

                long addTime = 30_000 * currentTimeframe;

                runOnUiThread(() -> {
                    DateRange dateRange = new DateRange();

                    dateRange.setMinMax(new Date(0), new Date(lineDataSeries.getXRange().getMax().getTime() + addTime));

                    mSciChartSurface.getXAxes().getDefault().setVisibleRangeLimit(dateRange);
                });
            }
        });

final DateAxis dateAxis = sciChartBuilder.newDateAxis()
            .withAutoRangeMode(AutoRange.Never)
            .withDrawMajorTicks(true)
            .withDrawMinorTicks(false)
            .withDrawMinorGridLines(false)
            .withAutoFitMarginalLabels(false)
            .withTextFormatting("HH:mm:ss")
            .build();
    dateAxis.setMinimalZoomConstrain(25_000L * currentTimeframe); // 25 - 300 points
    dateAxis.setMaximumZoomConstrain(300_000L * currentTimeframe);

final NumericAxis yAxis = sciChartBuilder.newNumericAxis()
            .withAutoRangeMode(AutoRange.Always)
            .withGrowBy(new DoubleRange(0.1d, 0.1d))
            .withTextFormatting("#.000000")
            .withAutoFitMarginalLabels(false)
            .withDrawMinorTicks(false)
            .withDrawMinorGridLines(false)
            .build();
    yAxis.setMinimalZoomConstrain(0d);

ModifierGroup additionalModifiers = sciChartBuilder.newModifierGroup()
            .withPinchZoomModifier().withXyDirection(Direction2D.XDirection).withScaleFactor(2).build()
            .withZoomPanModifier().withReceiveHandledEvents(true).withXyDirection(Direction2D.XDirection).withClipModeX(ClipMode.ClipAtMax).build()
            //.withZoomExtentsModifier().withReceiveHandledEvents(true).withXyDirection(Direction2D.XDirection).build()
           //
            .withXAxisDragModifier().withReceiveHandledEvents(true).withDragMode(AxisDragModifierBase.AxisDragMode.Pan).withClipModeX(ClipMode.ClipAtMax).build()
            //.withYAxisDragModifier().withReceiveHandledEvents(false).withDragMode(AxisDragModifierBase.AxisDragMode.Scale).build()
            .build();
1 vote
12k views

Hello…

It is me again….

As I have said before, our application is using MVVM and WPF (C#) and I am wondering if you guys have an example or if you could give me some suggestion of how to implement a menu when ALT-right-click on the chart, like in the picture attached?

Hope you can help me…

Thanks very much.. 🙂

  • vaquita50 asked 10 years ago
  • last active 8 years ago
1 vote
12k views

Is it possible to render a SciChartSurface instance to an SVG (scalable vector graphics) file? Preferably, I would like to accomplish this without displaying the surface in a window or dialog.

I have working code to render a surface directly to a bitmap.

RenderTargetBitmap bmp = new RenderTargetBitmap(GraphWidth, GraphHeight, 96, 96, PixelFormats.Pbgra32);
bmp.Render(this.Surface);

BitmapEncoder encoder = new PngBitmapEncoder();
encoder.Frames.Add(BitmapFrame.Create(bmp));
encoder.Save(myFileStream);

Can the same phenomenon be achieved, but with SVG?

  • jccockre asked 9 years ago
  • last active 1 year ago
1 vote
13k views

Hi
I want to plot line chart on BoxAnnotation, so that BoxAnnotion become as a container.
i.e dataSeries.Append(100, 100);
dataSeries.Append(200, 150;
on BoxAnnotation
Please have a lool into the picture.

1 vote
1k views

I’m building a chart where I’m plotting range vs doppler and the range has some error in it. There is a need for me to show the upper and lower bounds of that error. The issue I’m having is that for this particular chart the range is the x value. I have an estimated range but I need to show that there is some error in it. How do I make the error bar horizontal? I saw in the Android SDK there is a method to set the error bar direction. Is there something I can do in WPF to change the orientation of the error bar?

1 vote
13k views

Hello everybody,

my project is very similar to “Quad Left-Right Y-Axes”-Example. If you have a look at this, the Gridlines only math the Left Axis 1. All other Axes have their Major/Minor Ticks randomly spread. It’s not easy to see fast what value has another series then the first because the Gridlines simply dont match.

Is there a way to have all the Major/Minor Ticks Aligned to the Left Axis 1 ones? (i attached a picture which it should look like) But the Series don’t have the same Range. So the Major steps should only match in Grid, not in value (except 0 should be on one line).

I hope you understand my problem.

thx in advance for help

PS: i use full dynamic MVVM approach, the only code in View is ->

<s:SciChartSurface
Style="{StaticResource SciChartSurfaceStyle}"
GridLinesPanelStyle="{StaticResource GridLinesPanelStyle}"
ChartModifier="{Binding chartModifier}"
SeriesSource="{Binding seriesSource}"
YAxes="{Binding yAxes}"
XAxes="{Binding xAxes}"
Annotations="{Binding annotations}"
>
</s:SciChartSurface>

1 vote
15k views

Hi,

I have a chart showing data sets composed of multiple renderable series. Each data set is displayed using one FastLineRenderableSeries and three XyScatterRenderableSeries. All four series show in the legend for each data set, but I would only like to show the FastLineRenderableSeries in the legend for each data set. How can I do this?

I’ve seen the legendModifier.GetLegendDataFor property, but that can only be set to show options from this enum

public enum SourceMode
{
    AllSeries = 0,
    AllVisibleSeries = 1,
    SelectedSeries = 2,
    UnselectedSeries = 3,
}

which aren’t what I need. Some kind of flag on the renderable series saying whether they should be shown in the legend, or some way to specify the items source for the legend would be good.

Thanks!

1 vote
875 views

Hello, we are developing a finance application that contains sciChart. Our main chart and optionally RSI, MACD etc. There are indicators. I want the user to screenshot and share the graph and the indicators, but I’m having trouble doing this. Although I tried more than one way for this, I encountered different problems in all of them.
First of all, I take a screenshot with the createBitmap and Canvas method of the Layout where my graphics are located, but the graphic contents are not visible in the screenshot content.
As the second method, I tried the exportToBitmap method in sciChart, but here I only take a screenshot of 1 chart, I cannot take a screenshot of a graph + RSI + MACD at the same time. As another problem, the opening, closing, high, etc. of the parity on the chart. The texts containing the data are not visible in the screenshot.

Below I will share the screenshots I took with both the first method and the second method, the image on the phone at that moment, and the codes I used.
What I wanted to use was to take a screenshot of more than one graph and the data on it at the same time as in the first method. How can I do that?

Method 1

Bitmap bitmap = Bitmap.createBitmap(view.getWidth(),
            view.getHeight(), Bitmap.Config.ARGB_8888);
    Canvas canvas = new Canvas(bitmap);
    view.draw(canvas);

Method 2

surface.exportToBitmap()
1 vote
13k views

I am trying to find a possible problem why I see the effect in the picture after resizing.
Everything was fine in a sample with very high data sample rates. Now I refactored into my real life code and started using WPF Binding and the like. But now I see this effect on the real life code.

I am already:

  • appending the new data inside a separate worker thread
  • calling suspendupdate on the control
  • using XySeriesData<double, double>. Before that I used XySeriesData<DateTime, double> and thought it was the new DateTime I was using. But still see the effect when I switched back to double.

What I did change from the example to real life:

  • Mainly added databinding for RenderSurface and RenderableSeries. They are only set and changed at the beginning of the test run.

I don’t really know where to check from here on. What else could cause this effect?

  • Uwe Hafner asked 8 years ago
  • last active 8 years ago
1 vote
0 answers
3k views

Hi,

I have annotation, users can it drag and drop. But for it first need select this annotation and after drag it(with re-touching).
How to immediately drag annotation(without re-touching)?

Thanks in advance.

Regards,
Batyr

1 vote
465 views

I tried to add a cursorModifier and then modify the stroke color later. But the color changes don’t work. Anything wrong with my codes?

Add cursorModified:

        let cursorModifier = new CursorModifier({
            crosshairStroke: #fff,
            crosshairStrokeThickness: 1,
            showTooltip: true,
            showAxisLabels: false,
            tooltipContainerBackground: "transparent",
            tooltipTextStroke: #fff,
        });
        sciChartSurfaceRef.chartModifiers.add(cursorModifier);

Change the stroke color:

        let cursorModifier = sciChartSurfaceRef.chartModifiers.get(0);
        if (cursorModifier) {
            cursorModifier.crosshairStroke = #333;
            cursorModifier.tooltipTextStroke = #333;
        }
  • Kelly Chan asked 7 months ago
  • last active 7 months ago
1 vote
380 views

The SciChart Legend and Cursor Tooltip (Showed only Y axis value) are not display after changing the graph layout.
I need to show the graph legend and Tooltip for all the Y axis.

The chart should also show the x axis value and y axis value on the Tooltip for more clarity.

Before changing the layout the legend was showing the five series vertically one below the other. But i need to show the five legends in horizontally (One after the another).

I have added the chart definition code. The data is added though Ajax call and code for that ajax call is not added.

I have attached the image for your reference.

I have attached the zip file with the html file.

  • Leo Leslin asked 5 months ago
  • last active 5 months ago
1 vote
295 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:

Showing 51 - 100 of 4k results

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies