Pre loader

Category: WPF

Welcome to the SciChart Forums!

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

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0 votes
12k views

ZoomPanModifier provides Pan+Zoom functionality. But, is there modifier for Pan only?

I don’t want to zoom the chart when edges are reached during panning.

  • anth asked 10 years ago
0 votes
12k views

I am using SciChart to draw some graph on my application.
I use ZoomPanModifier to be able to zoom and drag the graph (with range limit).

<s:ZoomPanModifier ClipModeX="ClipAtExtents" XyDirection="XYDirection" ZoomExtentsY="True" ExecuteOn="MouseLeftButton" IsEnabled="True"/>

But the problem is when I drag to the edge of the graph, it will scale up automatically when I keep dragging.

Is there any way so that I can zoom in/out, drag graph (after zooming in), and no dragging and scaling up when I get to the edge of graph?

0 votes
0 answers
12k views

Hi,

I’m looking to draw a BoxAnnotation onto a SciChartGroup ItemTemplate SciStockChart where the user will left mouse click, drag to define the size and releases to create the BoxAnnotation.

How should I go about doing this? Should I be looking at CustomModifiers or CustomAnnotations?

Any pointers will be very helpful

Thanks

David

0 votes
0 answers
9k views

SciChart v2.0.1.2815

SciChart v2.0 is finally here! This is the first full release of SciChart v2.0 after two Beta releases to our customers. Thank you for your feedback and your patience. We have really worked hard to bring you this release and appreciate the input you have had into it.

To download the latest installer, please visit our Downloads page.

New Features at a glance include:

Change Log since v2.0 Beta 2

Breaking Changes

  • Renamed AutoRange.Auto to AutoRange.Once. The three values for AutoRange are: AutoRange.Never (never autorange), AutoRange.Once (once on first render), AutoRange.Always (always autorange)

Bug Fixes

  • Fixed zoommodifier overlay not appearing in Silverlight
  • Fixed drawing defects with UnsortedXyDataSeries
  • Fixed Shifted Cursor Axis Labels in Silverlight
  • Fixed Sync Multi Charts example, cannot pan the bottom chartv
  • Fixed stacked bars and columns – intensive zoom on the laters joining the rendered objects
  • Fixed regression bug, when the line is out of the chart points stay on the chart borders
  • Fixed bug with MajorTickLineStyle setter in AxisBase
  • Fixed ViewportManagerBase issue, Invalidate Parent Surface with RangeMode set to ZoomToFitY ignored
  • Fixed chart does not render if series only has one data-point in logarithmic or linear mode
  • Fixed SeriesSelectionModifier does not work with MountainSeries
  • Fixed no pointmarkers visible in Impulse Chart example (regression issue)
  • Fixed Chart does not render if 1 out of N RenderableSeries does not have data
  • Fixed design time error Invalid XmlnsDeclaration occurs in assembly ‘Abt.Controls.SciChart.Wpf’ … ‘XmlnsDeclaration references a namespace Abt.Controls.SciChart.Rendering that is not in the assembly’
  • Fixed instability in axis layout algorithm causing axis to ‘wobble’
  • Fixed VerticalLineAnnotation.LabelsOrientation issue
  • Fixed IsPointWithinBounds for VerticalLineAnnotation
  • Fixed CursorModifier throws if axis is changed
  • Fixed BoxPlot, when zoomed, series remains on the chart sides
  • Fixed HitTest for impulse series, which fixes TooltipModifier inconsistent behaviour on Impulse Series
  • Fixed heatmap crashing on panning in some circumstances
  • Fixed axis labels issue when Y/XAxes collections are reset
  • Fixed FastLineRenderableSeries not disabling the line when SeriesColor = Transparent (regression issue in v2.0)
  • Fixed exception when using AxisCollection.Move
  • Fixed Margin applied twice in SciChartSurface control templatev
  • Fixed Memory Leak when SciChartGroup.VerticalChartGroup attached behaviour is applied
  • Fixed Axis alignment incorrect when Axis is on the left and SciChartGroup is applied
  • Fixed line-clipping algorithm not drawing lines to the edge of the chart
  • Fixed an issue in MouseManager which caused horizontally aligned charts sharing a MouseEventGroup to receive incorrect mouse-coordinates.
  • Fixed PointMarkerTemplate could not be re-applied (every marker after first was ignored)
  • Improved toggle on/off behaviour for SciChartGroup
  • Added ability to show Axis Labels for RolloverModifier
  • Added HitTest for BoxPlot series, added default styles
  • Added new example ‘Use High Quality Rendering’. Shows how to switch renderer per-chart
  • Added default style for TooltipModifier
  • Added Debug log to console if Axis has Invalid VisibleRange
  • Added how to disable debug logging in the console window (how to disable is printed to console)
0 votes
6k views

Hi:

In v3.60 ,I use BasePointMarker to create what I need(fig 1). Second row test count is follow the points’ Y-Axis value 1~1000.
But in SciChart v4.0, “Draw(IRenderContext2D context, IEnumerable centers)” replace “DrawInternal(IRenderContext2D context, double x, double y, IPen2D pen, IBrush2D brush)”. The “double x, double y” disappear ,I can not get the Y value to implement count. There is other problem. In V3.60 , VisibleRange change cause pointmarker redraw. In V4.0 VisibleRange change cause nothing.(fig 2).

V3.60 code

protected override void DrawInternal(IRenderContext2D context, double x, double y, IPen2D pen, IBrush2D brush)
    {

        var dataValue = XAIS.GetDataValue(y);
        int Y_VALUE = (int)Math.Round((Double)dataValue) + 1;
        context.DrawText(new Rect(x - 20, 0, 50, 20), brush.Color, 12, TimeSet.ToString() + "/" + Period.ToString());
        context.DrawText(new Rect(x - 10, 16, 25, 20), brush.Color, 12, Y_VALUE.ToString());
        context.DrawText(new Rect(x - 10, 30, 30, 20), Color.FromScRgb(255, 255, 255, 255), 12, (Addr + Y_VALUE).ToString());
    }

V4.0 code

public override void Draw(IRenderContext2D context, IEnumerable<Point> centers)
    {
        var fill = context.CreateBrush(Fill);
        var stroke = context.CreatePen(Stroke, AntiAliasing, (float)StrokeThickness);

        float width2 = (float)(Width * 0.5);
        float height2 = (float)(Height * 0.5);
        foreach (var center in centers)
        {
            var dataValue = AXIS.GetDataValue(center.Y);
            int Y_VALUE = (int)Math.Round((Double)dataValue) + 1;
            context.DrawText(new Rect(center.X - 20, 0, 50, 20), fill.Color, 12, TimeSet.ToString() + "/" + Period.ToString());
            context.DrawText(new Rect(center.X - 10, 16, 25, 20), fill.Color, 12, Y_VALUE.ToString());
            context.DrawText(new Rect(center.X - 10, 30, 30, 20), Color.FromScRgb(255, 255, 255, 255), 12, (Addr + Y_VALUE).ToString());
        }
    }

Best regards,
Xuan

1 vote
10k views

In our application we use a CAT5 USB to Ethernet extender to achieve a 50 ft distance from computer to monitor. At the monitor end we then use a Startech USB to VGA adapter. We found that with this configuration there is an issue with screen redraw whenever we run a WPF-based application – it shows up as flickering screen artifacts, portions of background windows showing through the foreground window, etc. Clearly wrong behavior, very repeatable, and only seen when a WPF application is running (it effects the entire display and any/all other applications currently running).

After much investigation we found that this could be fixed by a registry key that forces software-based rendering of WPF on a system-wide level, and setting this key completely solves the problem (with, we would assume, a degradation in WPF performance but it certainly isn’t noticeable to us):

HKEY_CURRENT_USER\Software\Microsoft\Avalon.Graphics\DisableHWAcceleration DWORD set to 1

https://msdn.microsoft.com/en-us/library/aa970912%28v=vs.110%29.aspx#overview

My question is, how would this setting affect the performance of your charting controls? In our application we certainly wouldn’t be pushing the speed of your real time charts, probably maximum update is 4 to 8 points per second added to the chart, but I am concerned that it doesn’t cause display issues or result in undue processor utilization.

0 votes
8k views

How can I implement to my CustomChartModifer(like custom RollOverModifier) a Storyboard:
The Storyboard shall change the Visibility(or Opacity) of my RollOverModifer to Visible (MousePosition changed), wait 5 s and change back to Hidden?

0 votes
8k views

Hi, SciChart team.

In FormattedText class constructor textAlignment parameter is used only for calculating measurement, it does not apply to any TextBlock.

Is it bug or feature?

1 vote
7k views

Hi,

is it somehow possible to have a print dialog that allows for a preview?

thank you,
Bruno

0 votes
9k views

Hello

I have requirement do change majorDelta/autoTicks for different ranges
for example:
If the max is <= 10,000, MaxAutoTicks should be 5
If the 10,000 < max < 20,000, MaxAutoTicks should be 4

what is the best way to achieve this taking into account user zooming and adding data in the background?

0 votes
10k views

Hello,

I am evaluating SciChart and have been very impressed so far with the power and ease of use.

I have a need to plot a single series Mountain style chart with 64K data points and then update around 10 times a second. The X values are fixed, the Y values may vary from update to update.

Is there a way to prevent redraws while I am updating the data in the series (planning on using a loop calling dataSeries.Update(TX, TY) for each point unless you can suggest a better way)

Thanks and Kind Regards

Mark

0 votes
10k views

Hi,

I want to add additional ticks to an axis, which is what I’m doing by overriding the NumericTickProvider and adding items into it, but I don’t want some of these ticks to show their values in the axis, I just want the longer tick in there. How would I go around doing that? So in the screenshot, I don’t want to display 4.5, only the tick.

Thank you,
kewur

  • kewur asked 9 years ago
  • last active 9 years ago
0 votes
12k views

Hi folks,

In order to test something, I decided to load the sample Abt.Controls.SciChart.Core.Wpf.Example which installs with SciChart. When I try to run it, I get the following VS2012 error. I did a reinstall (or rather, a “repair” install), but nothing changed.

Error 1 The command “pushd “C:\Program Files (x86)\ABT Software Services Ltd\SciChart v2.1.1\Examples\Abt.Controls.SciChart.Wpf.Example\Examples”
UpdateWpfExamples.bat
popd
if exist “C:\Program Files (x86)\ABT Software Services Ltd\SciChart v2.1.1\Examples\Abt.Controls.SciChart.Wpf.Example\bin\Debug\Abt.Controls.SciChart.Example.exe.locked” del “C:\Program Files (x86)\ABT Software Services Ltd\SciChart v2.1.1\Examples\Abt.Controls.SciChart.Wpf.Example\bin\Debug\Abt.Controls.SciChart.Example.exe.locked”
if not exist “C:\Program Files (x86)\ABT Software Services Ltd\SciChart v2.1.1\Examples\Abt.Controls.SciChart.Wpf.Example\bin\Debug\Abt.Controls.SciChart.Example.exe.locked” move “C:\Program Files (x86)\ABT Software Services Ltd\SciChart v2.1.1\Examples\Abt.Controls.SciChart.Wpf.Example\bin\Debug\Abt.Controls.SciChart.Example.exe” “C:\Program Files (x86)\ABT Software Services Ltd\SciChart v2.1.1\Examples\Abt.Controls.SciChart.Wpf.Example\bin\Debug\Abt.Controls.SciChart.Example.exe.locked”” exited with code 1. Abt.Controls.SciChart.Core.Wpf.Example

0 votes
11k views

Hello,
The SciChartOverview is great, it provides exactly the functionality that I needed for panning and zooming. The only problem is that from what I have found until now it works only on the x axis.

Is there an easy way to have exactly the same zooming and panning functionality provided by the SciChartOverview on the Y Axes? I just need the zooming and panning, not the data preview.

I tried to do this by modifying the ControlTemplate of the NumericAxis control, but I quickly got into trouble, and this seems like a little bit too much work anyway.

Is there a simple way to do it with SciChart?
I added an image with a similar control that does this.

  • Straliciuc asked 12 years ago
  • last active 5 years ago
0 votes
13k views

I have a scichart surface and i plot the chart after that i add max and min limits line to the chart surface.but i can’t able to view the limits line untill i double click the chart surface (Zoom Extents Modifier is used).how can i refresh the chart surface when the y axis scale value changed.In my limits function i call chartsurface.zoomextents but i will not helped.

  • Raghupathy asked 9 years ago
  • last active 9 years ago
0 votes
9k views

Hi

I would like to use a converter for my chart ohlc data,
So a bar that is appended with some set of values, should be displayed in a factor of 10.
for example:
open price of 15.41 would be displayed -> 154.1
is it possible?
thanks.

1 vote
22k views

Please help to provide a tutorial example to implement IThemeProvider interface in order to make a custom theme.

Thanks,
Tanmay

0 votes
0 answers
8k views

Hello again!
I’m working with new scichart version (5th august). In view XAML file I have this code snippet:

visuals:SciChartSurface Annotations="{Binding AnnotationCollection}"  SeriesSource="{Binding GraphicsCollection}" XAxis="{Binding XAxis, Mode=TwoWay}" YAxes="{Binding YAxisCollection}"  >

When I try to run the application, I get this NullReferenceException:

   Đ² A. .Convert(Object value, Type targetType, Object parameter, CultureInfo culture)
   Đ² System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange)
   Đ² System.Windows.Data.BindingExpression.Activate(Object item)
   Đ² System.Windows.Data.BindingExpression.AttachToContext(AttachAttempt attempt)
   Đ² System.Windows.Data.BindingExpression.AttachOverride(DependencyObject target, DependencyProperty dp)
   Đ² System.Windows.Data.BindingExpressionBase.OnAttach(DependencyObject d, DependencyProperty dp)
   Đ² System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   Đ² System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   Đ² System.Windows.Data.BindingOperations.SetBinding(DependencyObject target, DependencyProperty dp, BindingBase binding)
   Đ² System.Windows.FrameworkElement.SetBinding(DependencyProperty dp, BindingBase binding)
   Đ² Abt.Controls.SciChart.Visuals.Annotations.LineAnnotationWithLabelsBase.VB()
   Đ² Abt.Controls.SciChart.Visuals.Annotations.LineAnnotationWithLabelsBase.TB()
   Đ² Abt.Controls.SciChart.Visuals.Annotations.LineAnnotationWithLabelsBase.OnXAxesCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
   Đ² Abt.Controls.SciChart.Visuals.Annotations.AnnotationBase.Abt.Controls.SciChart.Visuals.Annotations.IAnnotation.OnXAxesCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
   Đ² Abt.Controls.SciChart.Visuals.Annotations.AnnotationCollection.OnXAxesCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
   Đ² Abt.Controls.SciChart.Visuals.SciChartSurface.OnXAxesCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
   Đ² System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)

But if I change my xaml file this way:

visuals:SciChartSurface SeriesSource="{Binding GraphicsCollection}" XAxis="{Binding XAxis, Mode=TwoWay}" YAxes="{Binding YAxisCollection}" 
Annotations="{Binding AnnotationCollection}"   >

there won’t be any exceptions. I’ve attached project with exception below.

P.S. in the previuous version it works fine.

  • Egor asked 9 years ago
0 votes
9k views

In FastLineRenderableSeries, when I draw lines that go backwards, zoom functionality does not work properly. When I zoom-in graph is not visible.
You can try with following x,y values
{x=2010, y=0.15} {x=100, y=0.15} {x=100, y=-0.15} {x=2010, y=-0.15} {x=2010, y=0.15}

0 votes
7k views

HI,
I’m new in scichart. I would like to ask you if it’s possible to build a graph with custom candles.
I want to build a footprint graph, something like this:

http://footprintchart.com/wp-content/uploads/2011/06/Shade_Dominant_Side.png

could you tell me if It’s possible to build this kind of graph and suggest me some links with documentation?

Thank you

  • lorenzo522 asked 8 years ago
  • last active 8 years ago
0 votes
13k views

Hi~ supporter

On testing scichart for a migration of our chart library, I had a some problems.

Because I tested scichart for just two days so It maybe my mistakes..^^

  1. MouseWheelZoomModifier does not work.

– If There is no series on chart area, MouseWheellZoom works well but After add curve, It stop working.

  1. Rubber Band Zoom for Stacked bar chart

– After adding serveral stacked bar charts, When I try to do rubber band zoom for stacked bar chart, Stacked bar often disappear.

  1. ZoomExtants for Stacked bar chart

– After adding several stacked bar charts, When I call “ZoomExtants()”, all stacked bar charts does not fit in chart area.

I attached a sample program.
I will looking forward to your answer.

Regards,
Sunchul

0 votes
10k views

Hi All,
Although this issue isn’t currently stopping me doing what I need to do I’m just a tad worried that I’m doing something more fundamental wrong which probably will. Anyway the question…

I have a chart with a DateTime axis to which I add two series (red and blue points) from the code behind as per the code snippet. When I run it both series are displayed correctly but the rollover bar only snaps to the second series points. If a run the mouse over a point from the first series it seems to be acknowledged as the fill colour changes but the rollover doesn’t snap to it.

The method is invoked by a button press on a parent control

public void AddTestDataSeries(double seedvalue)
{ 
    DateTime StartPoint = DateTime.Now;
    DateTime[] Axis = new DateTime[] { StartPoint.AddMinutes(1), StartPoint.AddMinutes(2), StartPoint.AddMinutes(3), StartPoint.AddMinutes(4), StartPoint.AddMinutes(5), StartPoint.AddMinutes(6), StartPoint.AddMinutes(7), StartPoint.AddMinutes(8) };
    double[] Series1 = new double[]{1,2,3,5,7,12,19,37};
    double[] Series2 = new double[]{10,20,30,40,50,60,70,80};

    XyDataSeries<DateTime, double> dataSeries1 = new XyDataSeries<DateTime, double> { SeriesName = "Series1" };
    for (int x = 0; x < Series1.Count(); x++)
    {
        dataSeries1.Append(Axis[x], Series1[x]);
    }
    XyScatterRenderableSeries scatterRenderSeries1 = new XyScatterRenderableSeries();
    scatterRenderSeries1.DataSeries = dataSeries1;
    scatterRenderSeries1.PointMarker = new EllipsePointMarker()
    {
        Fill = Colors.Red,
        Stroke = Colors.White,
        StrokeThickness = 2,
        Width = 10,
        Height = 10,
    };
    this.UserControlSciChartSurface.RenderableSeries.Add(scatterRenderSeries1);

    XyDataSeries<DateTime, double> dataSeries2 = new XyDataSeries<DateTime, double> { SeriesName = "Series2" };
    for (int x = 0; x < Series2.Count(); x++)
    {
        dataSeries2.Append(Axis[x].AddSeconds(30), Series2[x]);
    }
    XyScatterRenderableSeries scatterRenderSeries2 = new XyScatterRenderableSeries();
    scatterRenderSeries2.DataSeries = dataSeries2;
    scatterRenderSeries2.PointMarker = new EllipsePointMarker()
    {
        Fill = Colors.Blue,
        Stroke = Colors.White,
        StrokeThickness = 2,
        Width = 10,
        Height = 10,
    };
    this.UserControlSciChartSurface.RenderableSeries.Add(scatterRenderSeries2);

}

And the XAML is simply

<UserControl
         x:Class="SummaryDrillDownCharting.SummaryDataChartUserControl"
         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"  
         mc:Ignorable="d" 
         d:DesignHeight="300" d:DesignWidth="300">

<Grid>
    <s:SciChartSurface x:Name="UserControlSciChartSurface" s:ThemeManager.Theme="Chrome">

        <s:SciChartSurface.XAxis>
            <s:DateTimeAxis GrowBy="0.1, 0.1"/>                
        </s:SciChartSurface.XAxis>

        <s:SciChartSurface.YAxis>
            <s:NumericAxis GrowBy="0.1, 0.1" DrawMajorBands="True"/>
        </s:SciChartSurface.YAxis>

        <s:SciChartSurface.ChartModifier>
            <s:ModifierGroup>
                <s:RolloverModifier IsEnabled="True"></s:RolloverModifier>
            </s:ModifierGroup>
        </s:SciChartSurface.ChartModifier>

    </s:SciChartSurface>
</Grid>

ADDITIONAL INFO: I Just ran the same code changing the scatter to a FastLineRenderableSeries – same problem exists.

0 votes
10k views

Hi,

I’ve got several line chart series in my ChartSurface and it’s possible to collapse and show them dynamically. If I collapse all series and only one series visible I would like to see that one in the OverView chart. But I cannot find a way to get it done. DataSeriesIndex always get the first series in the parentSurface regardless of it’s visibility. Is there any way to show the first visible Series in the Overview chart?

<chart:SciChartOverview ParentSurface=".." DataSeriesIndex=”1″ SelectedRange=”{Binding ElementName=.., Path=XAxis.VisibleRange, Mode=TwoWay}”>

Best Regards,
Charith

1 vote
7k views

I am trying to implement a peak detection functionality in wpf. I have a DateTime axis as X and double as Y. When I add the second series (containing the peaks) to the chart it renders the points by their index, not by their date. (picture second chart red dots)

Is there any way I can plot two series with different sampling in a way that the sample points are aligned according to their dateTime values?

I attached some of my codes below.

1 vote
12k views

I am considering applying server-side licensing for my javerScript application.

In the document below, there is a phrase “Our server-side licensing component is written in C++.”
(https://support.scichart.com/index.php?/Knowledgebase/Article/View/17256/42/)

However, there is only asp.net sample code on the provided github.
(https://github.com/ABTSoftware/SciChart.JS.Examples/tree/master/Sandbox/demo-dotnet-server-licensing)

I wonder if there is a sample code implemented in C++ for server-side licensing.

Can you provide c++ sample code?
Also, are there any examples to run on Ubuntu?

0 votes
9k views

I constantly have OutOfMemoryException when I set IChartSeriesViewModel.DataSeries.FifoCapacity and there are 4 or more chart on a single SciChartSurface.
Exception’s code block is

viewModel.DataSeries.FifoCapacity = 1000000;

where viewModel is newly created instance of ChartSeriesViewModel class.
What it could be?

Exception stack trace is

A.  `1..ctor(Int32  )
Abt.Controls.SciChart.Model.DataSeries.XyDataSeries`2.ClearColumns()
Abt.Controls.SciChart.Model.DataSeries.DataSeries`2.Clear()
Abt.Controls.SciChart.Model.DataSeries.DataSeries`2.set_FifoCapacity(Nullable`1 value)

p.s. I have no opportunity to set x64 as target platform. My SciChart version is 3.1 but there is the same problem with 3.22.

0 votes
11k views

I am binding to the Rollover Data Series Info and displaying the YValue in a grid. I want to also display the XValue, however when I bind using XValue nothing is returned. It only seems to display data for the Value property and the seriesname property

1 vote
6k views

Hi,

I am using the 2D heatmap as follows:

mData = new double[dataSize, dataSize];
DataSeries = new Heatmap2DArrayDataSeries<int, int, double>(mData, x => x, y => y);

In my application the displayed data size can be changed by the users – e.g. 200 x 300, but there is also a known maximum size – e.g. 500 x 500 for the data. Since I would like to avoid unnecessary large object allocations, is there a way for me to reuse the data buffer and display only the required data?

I tried setting the visible range over the data that would need to be displayed, which worked, but unfortunately the performance is still the same as when rendering the maximum size image. Is there any other way to achieve the goal?

  • Rok Rode asked 8 years ago
  • last active 8 years ago
0 votes
10k views

Hi,

Quick question regarding stock charts. I am maintaining the Ohlc data series and appending values when the timeframe threshold is reached.. what the BarTimeFrame property is used for in StockChart?

Thanks

Paul

0 votes
13k views

I am using SciChart for WPF version 1.3.1.1107 with the MVVM pattern.

I have several lines in one chart where the data from for each line covers the same date time range. I’d like to be able to move a line to the front so that I can better see its data. Currently the order in which I add the lines seems to impact the zindex of the lines series.

Is this possible?

0 votes
14k views

Hi all,
I developed my application in real time where i introduce my WPF in winforms
So i developed the class Graph.xaml.cs where i defined my function :
public void CreateDataSetAndSeries(List lstX, List lstY)
{
series0 = new XyDataSeries<DateTime, double>();
using (this.sciChartSurface.SuspendUpdates())
{
series0.Append(lstX, lstY);
}
lineSeries.DataSeries = series0;
sciChartSurface.ZoomExtentsY();
}

i don’t make the code of charting in the constructor also not in the function sciChartSurface_Loaded() because i must filling those list from the winforms frame after this i make the code for zooming in the Graph.xaml :

<SciChart:SciChartSurface.ChartModifier>

<SciChart:RubberBandXyZoomModifier/>

                <SciChart:ZoomPanModifier ExecuteOn="MouseRightButton"/>
                    <SciChart:ZoomExtentsModifier ExecuteOn="MouseDoubleClick"/>

                <SciChart:CursorModifier ReceiveHandledEvents="True" ShowAxisLabels="True"  ShowTooltip="True" ShowTooltipOn="MouseRightButtonDown"/>

But the problem i have the two cursor (like the picture) but i can’t did the zoom pan (also i put stop for my application to make a Zoom but i have the same problem ) !! i am blocked in this step someone can help me it’s urgent ! and Thank you !

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

Hi, I have a couple inquiries:

  1. After I load all my data to the chart, how can I force to re-render the chart? The problem I’m having is that after I load my data the labels on both axis are not rendered correctly or rendered at all until I interact with the chart or a data point is updated/added (look at the pictures attached).

  2. I have ZoomPanModifier enabled on my chart but I would like to be able to pan beyond the last data point in my dataset, is that possible? In case I’m not clear, when I’m dragging the chart left and right I cannot move beyond the first or last data point in the chart.

Thanks, Diego

0 votes
9k views

Hi, is it possible to use html or other kind of formatting on a NumericAxis.AxisTitle? I would like to have text in different colors and bold/normal options. Thanks.

1 vote
0 answers
16k views

I’m trying to MouseEventGroup:

        <s:ModifierGroup s:MouseManager.MouseEventGroup="{Binding SharedMouseGroupId}">

Where SharedMouseGroupId is

    private String sharedMouseGroupId;
    public String SharedMouseGroupId
    {
        get { return this.sharedMouseGroupId; }
        set
        {
            this.sharedMouseGroupId = value;
            RaisePropertyChanged(() => SharedMouseGroupId);
        }
    }

And init:

        SharedMouseGroupId = Guid.NewGuid().ToString();

But this doesn’t work.
If i subscribe on Loaded event of surface and manually set MouseEventGroup, this work.

        MouseManager.SetMouseEventGroup((DependencyObject)c.ChartModifier, ViewModel.Parent.SharedMouseGroupId);
0 votes
10k views

Hello all,
I have a candle-chart with the following x-Axis:

<s:SciStockChart.XAxisStyle>
    <Style TargetType="s:CategoryDateTimeAxis">
        <Setter Property="BarTimeFrame" Value="{Binding BarTimeFrame, Mode=OneWay}"/>
        <Setter Property="DrawMinorGridLines" Value="False"/>
        <Setter Property="DrawMajorBands" Value="True"/>
        <Setter Property="VisibleRange" Value="{Binding XVisibleRange, Mode=TwoWay}"/>
        <Setter Property="DrawMinorGridLines" Value="False"/>
        <Setter Property="AutoRange" Value="{Binding AutoRange, Mode=TwoWay}" />
        <Setter Property="GrowBy" Value="0, 0.1"/>
    </Style>
</s:SciStockChart.XAxisStyle>

I want to add a vertical line at a specific date:

VerticalLineAnnotation newVerticalLine = new VerticalLineAnnotation();
newVerticalLine.X1 = ((DateTime)pAnnotationAttributes.GetValue(GUI_AnnotationAttributes.TimeValue)).;

Doing this I get the following exception:
Ein Ausnahmefehler des Typs “System.InvalidCastException” ist in mscorlib.dll aufgetreten.
Zusätzliche Informationen: Invalid cast from ‘DateTime’ to ‘Int32’.

Regards

Michael

0 votes
16k views

Hi there

I have written a stock chart application. As part of that I have a drop down box that allows the selection of the bar timeframe (e.g. 1m , 5m, … 1r, 4h etc). It all works fine. However, if I bring up a chart and then do some zooming and panning AND THEN select a new timeframe, sometimes the data is not initially visible and I have to scroll the chart to find it ! Should I be resetting the visible range in some way?

Thanks

Paul

0 votes
0 answers
6k views

Hi,

I like to display a chart with time series values in Y (Pa) and distance series in X (mm). The Y values comes from a microphone and the X values comes from a hall sensor counter module. Both signals has the same samlesrate. Normaly you display the time in X with delta t. But in this use case I like to use the distance series in X.
The problem is I guess that the distance series looks like this [0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,…]. If we use delta t to calculate the X values than the values looks like this [0,0.1,0.2,0.3,0.4,0.5,0.6,…]

If I display the microphone data as time series it looks like:
See SciChart2.png

If I display the hall sensor counter data as time signal it looks like:
See SciChart3.png

I like to display the sinus values form the microphone in Y but the hall sensor counter data in X as distance. But the sinus is damaged:
See SchiChart1.png

Is there any option to display the real Y values (the sinus)? Or should I change the X data to a evenly rising signal, or what?

regards,
Tobias Goll

0 votes
10k views

Hello,

I would like to use the RolloverModifier to display a given datapoint’s identification (string) metadata. The solution suggested in this link on correlating metadata to datapoints seems promising, but for the fact that I have multiple charts to display simultaneously, hence I need multiple lookup arrays. I originally thought to use a ValueConverter that would manage lookup of the identification value based a chart view model instance code (ChartId) and the index provided in the XyzDataSeries. As control charts are instantiated, they register with the ValueConverter, which maintains a static lookup dictionary. In the XAML, the ZValue is passed as the value and the chartID is passed as a parameter to the ValueConverter. I have run into a couple key challenges, however:

  1. ConverterParameters cannot be bound; hence I cannot bind to the ChartId, whether it is stored in a viewmodel or in a different XAML element.
  2. WPF does not allow use of nested value converters in XAML; this prevents me from nesting the ValueConverter within the chart view model (where reference to the ChartId is readily available).

I’m exploring some other options, but they are getting ugly fast, so I figured it’s time to ask for assistance. Is there another way to do this (desirably adhering to MVVM practices)?

Key excerpts of my code are pasted below:

Surface:

<TextBlock x:Name="ChartIdBlock" IsEnabled="False" Text="{Binding ChartId}"/>
<s:SciChartSurface x:Name="ScsControlChart" MinHeight="200" s:ThemeManager.Theme="BlackSteel">
<s:SciChartSurface.RenderableSeries>
    <s:FastLineRenderableSeries x:Name="Data" SeriesColor="White" DataSeries="{Binding Chart, Converter={StaticResource ChartDataToDataSeriesConverter}}" IsSelected="True"/>
   <!-- More data series in same chart -->
</s:SciChartSurface.RenderableSeries>
<s:SciChartSurface.XAxis>
    <s:DateTimeAxis  VisibleRange="{Binding XRange, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" TickLabelStyle="{StaticResource AxisLabelStyle}" />
</s:SciChartSurface.XAxis>
<s:SciChartSurface.YAxis>
    <s:NumericAxis DrawMajorBands="True" VisibleRange="{Binding YRange, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" TickLabelStyle="{StaticResource AxisLabelStyle}"/>
</s:SciChartSurface.YAxis>
<s:SciChartSurface.ChartModifier>
    <s:ModifierGroup>
        <s:RolloverModifier x:Name="RolloverModifier" DrawVerticalLine="True" SourceMode="SelectedSeries" TooltipLabelTemplate="{StaticResource RolloverLabelTemplate}"/>
    </s:ModifierGroup>
</s:SciChartSurface.ChartModifier>

RolloverLabelTemplate:

<ControlTemplate x:Key="RolloverLabelTemplate" TargetType="s:TemplatableControl">
    <Border Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Top" Background="#77FFFFFF" BorderBrush="#55000000" BorderThickness="1" Padding="5">
        <ItemsControl ItemsSource="{Binding ElementName=RolloverModifier, Path=SeriesData.SeriesInfo}">
            <ItemsControl.ItemTemplate>
                <DataTemplate>
                        <StackPanel Grid.Column="2" Orientation="Horizontal" Margin="3,3,20,3">
                            <TextBlock FontSize="13" FontWeight="Bold" Foreground="{Binding SeriesColor, Converter={StaticResource ColorToBrushConverter}}"
                                       Text="{Binding ZValue, Converter={StaticResource IndexToIdConverter}, ConverterParameter={Binding ElementName=ChartIdBlock, Path=Text}}"/>
                        </StackPanel>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
        </ItemsControl>
    </Border>

Value Converter:

public sealed class ChartIndexToIdConverter : IValueConverter
{
    private readonly static Dictionary<int, Tuple<int, string[]>> _lookup = new Dictionary<int, Tuple<int, string[]>>();
    private readonly static Random _rnd = new Random();

    public static int Register(IControlChart chart)
    {
        var key = _rnd.Next();
        while (_lookup.ContainsKey(key)) key = _rnd.Next();
        _lookup.Add(key, new Tuple<int, string[]>(chart.First().Index, chart.Select(d => d.Id).ToArray()));
        return key;
    }

    public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
    {
        if (value == null) throw new ArgumentNullException("value");
        if (parameter == null) throw new ArgumentNullException("parameter");
        var tuple = _lookup[(int)parameter];
        return tuple.Item2[(int)value - tuple.Item1];
    }
}
0 votes
12k views

Hi everyone,

i’m just looking for a polar chart that can plot 3D-Data like Heatmap Chart. Anyone has an idea about it?

0 votes
19k views

Hi all,
I want to capture the XY coordinate related to XY axis of my scichartsurface after a MouseLeftButtonDown. At first I try this:
Point mousePoint = e.GetPosition(((SciChartSurface)sender));
but the coordinates are in pixel? instead I want my xy that are double…

Then I try this code from an example:

Point mousePoint = e.GetPosition(((SciChartSurface)sender).GridLinesPanel as UIElement);
var hitTest = ((SciChartSurface)sender).RenderableSeries[0].HitTest(mousePoint);

now hitTest.XValue and hitTest.YValue are the correct data of the nearest point, but I want the exactly coordinates of the point where I clicked, not the nearest. It is possible? How can I do?
Thanks for reply

0 votes
7k views

I am trying to use SciChartGroupPane and ChildPanes for my application, and
want to collapse a pane , so that the remaining space is filled with the remaining graphs.

I tried binding the Visibility property to the charts itemcontainer style, but it only partially helped.
I got all the panes collapsing except for the first one. I attached a sample project, where I try to collapse all panes but the last one.

I asked the question here
https://www.scichart.com/questions/question/collapse-pane-in-grouppane-charts
but got no answer since then. The project could probably not be uploaded beacuse of the size.
I uploaded it here:
https://drive.google.com/file/d/0B19IHNOVxrKCYlUzQjRnOF9ZRnc/view?usp=sharing

Is this behaviour normal? Is it a bug? Please help.

KristĂ³f

0 votes
10k views

Hello,

it would be fantastic to be able to select the series visualized in the overview control. If i understood correctly, it’s always the first serie that is shown currently.

I added a screenshot, where 2 overviews are used. Both are based on the same first series (Curve 1). To be able to select another curve for overview 2 would be awesome.

Thank’s a lot!

Regards,
Robin

1 vote
13k views

I want to be able to set opacity on a FastColumnRenderableSeries so that it doesn’t hide the values of other series rendered on the same chart. I have tried setting the Opacity property on the FillBrush but this is ignored. I have also tried setting the UIElement.Opacity property on the FastColumnRenderableSeries itself but that is also ignored.

Both FastMountainRenderableSeries and StackedColumnRenderableSeries can do this by setting UIElement.Opacity on the series itself but it doesn’t seem to work with FastColumnRenderableSeries.

Anyone come across this before?

I guess there is a workaround if you ensure your column series is rendered first, but this is trickier in my case as I am using databinding to populate my series and I don’t know until runtime what series will need to be rendered.

many thanks,

Bill

  • Bill Dines asked 9 years ago
  • last active 7 years ago
0 votes
11k views

Hi!

I am trying out a feature in my application with editable vertical lines annotations. My problem is that my set method needs to perform some calculations when the vertical line is moved, and since the set method is being called multiple times when moving the annotation, it slows it down and doesn’t give the user that great feeling that it should

Is there any way of delaying the set method being called until the user actually drops the annotation?

1 vote
6k views

Hello,
The style/theme you have in the example suite looks very good and I would like to build a POC component with the same look and feel. Are things like a button/combobox style exposed?
Thanks

0 votes
9k views

i have the data values as shown below.
0″,”0.1004″
“0”,”0″
“0”,”0.200801″
“0”,”0.1004″
“0”,”0″
“0”,”0″
“0”,”0.1004″
“0”,”0.1004″
“0”,”0″
“0”,”0″
“0”,”0.200801″
“0”,”0″
“0”,”0.1004″
“0”,”0″
“0”,”-0.1004″
“0”,”-0.1004″
“0”,”0″
“-0.409378″,”0”
“-1.09167″,”-0.200801″
“-1.77397″,”-0.1004″
“-2.86565″,”-0.200801″
“-4.3667″,”-0.1004″
“-5.73129″,”-0.200801″
“-7.50526″,”-0.200801″
“-9.4157″,”-0.200801″
“-11.872″,”-0.200801″
“-14.4647″,”-0.200801″
“-16.921″,”0”
“-20.196″,”-0.1004″
“-23.471″,”-0.301201″
“-26.6096″,”0”
“-30.5669″,”-0.1004″
“-34.5242″,”-0.301201″
“-38.4815″,”-0.200801″
“-43.2576″,”-0.200801″
“-47.8972″,”0”
“-52.5368″,”-0.1004″
“-57.9952″,”-0.301201″
“-63.3171″,”0.1004”
“-68.7755″,”0”
“-74.2339″,”-0.1004″
“-79.5558″,”0.1004”
“-85.0142″,”-0.200801″
“-90.3361″,”0”
“-95.7945″,”-0.200801″
“-101.253″,”-0.1004″
“-106.575″,”0”
“-112.033″,”0”
“-117.355″,”0”
“-122.813″,”-0.200801″
“-128.272″,”0”
“-133.594″,”0.1004”
“-139.052″,”0.1004”
“-144.374″,”0.301201”
“-149.832″,”0”
“-155.154″,”0”
“-160.613″,”-0.1004″
“-166.071″,”0.1004”
“-171.393″,”0”
“-176.851″,”-0.1004″
“-182.173″,”-0.301201″
“-187.632″,”0”
“-193.09″,”-0.1004″
“-198.412″,”-0.301201″
“-203.87″,”0”
“-209.192″,”-0.200801″
“-214.651″,”-0.401601″
“-220.109″,”0”
“-225.431″,”-0.200801″
“-230.889″,”-0.1004″
“-236.211″,”0”
“-241.67″,”0”
“-246.991″,”0”
“-252.45″,”-0.301201″
“-257.908″,”0.1004”
“-263.23″,”0”
“-268.688″,”-0.301201″
“-274.01″,”-0.1004″
“-279.469″,”0”
“-284.927″,”-0.301201″
“-290.249″,”0”
“-295.707″,”0”
“-301.029″,”0.1004”
“-306.488″,”0”
“-311.946″,”-0.301201″
“-317.268″,”0.1004”
“-322.726″,”0”
“-328.048″,”-0.301201″
“-333.507″,”0”
“-338.829″,”-0.301201″
“-344.287″,”-0.1004″
“-349.745″,”-0.301201″
“-355.067″,”-0.301201″
“-360.526″,”-0.301201″
“-365.848″,”-0.1004″
“-370.897″,”-0.401601″
“-376.355″,”-0.301201″
“-381.813″,”-0.401601″
“-387.135″,”-0.301201″
“-392.594″,”-0.1004″
“-397.915″,”0”
“-403.374″,”-0.301201″
“-408.696″,”-0.301201″
“-414.154″,”-0.200801″
“-419.612″,”0”
“-424.934″,”0”
“-430.393″,”0.1004”
“-435.715″,”0”
“-441.173″,”-0.200801″
“-446.631″,”-0.1004″
“-451.953″,”-0.301201″
“-457.412″,”-0.1004″
“-462.734″,”-0.1004″
“-468.192″,”-0.1004″
“-473.65″,”0”
“-478.972″,”0”
“-484.431″,”0”
“-489.753″,”0”
“-495.211″,”-0.1004″
“-500.533″,”0”

.3382″,”0.401601″
“109.44”,”-0.1004″
“125.679”,”0.301201″
“141.918”,”0.401601″
“158.156”,”0.200801″
“174.259”,”0.301201″
“190.497”,”-0.1004″
“206.736”,”-0.1004″
“222.975”,”0.200801″
“239.077”,”0.200801″
“255.315”,”0.401601″
“271.554”,”0.200801″
“287.793”,”0.1004″
“303.895”,”0.200801″
“320.134”,”0.1004″
“336.372”,”0.301201″
“352.611”,”-0.200801″
“368.85”,”-0.200801″
“384.952”,”0.200801″
“401.19”,”0.1004″
“417.429”,”0.1004″
“433.668”,”0.200801″
“449.77”,”-0.301201″
“466.009”,”0.502002″
“482.247”,”0.200801″
“498.077”,”0.602402″
“514.315”,”0.1004″
“530.554”,”-0.1004″
“546.656”,”-0.1004″
“562.895”,”0.200801″
“579.133”,”-0.200801″
“595.372”,”0.1004″
“611.474”,”0.301201″
“627.713”,”-0.200801″
“643.952”,”0.200801″
“660.19”,”0.200801″
“676.293”,”-0.301201″
“692.531”,”0.200801″
“708.77”,”-0.200801″
“725.009”,”0.1004″
“741.111”,”0.200801″
“757.349”,”-0.200801″
“773.588”,”0.200801″
“789.827”,”-0.301201″
“806.065”,”-0.401601″
“822.168”,”0.301201″
“838.406”,”-0.602402″
“854.645”,”0.200801″
“870.884”,”-0.1004″
“886.986”,”0.200801″
“903.224”,”0.301201″
“919.463”,”0.200801″
“935.702”,”0.301201″
“951.804”,”-0.200801″
“968.043”,”-0.301201″
“984.281”,”0.200801″
“1000.52”,”0″
“1016.62”,”0.1004″
“1032.86”,”-0.200801″
“1049.1”,”-0.401601″
“1065.34”,”0″
“1081.58”,”0.1004″
“1097.68”,”0.200801″
“1113.92”,”-0.200801″
“1130.16”,”-0.301201″
“1146.4”,”-0.1004″
“1162.5”,”0.200801″
“1178.74”,”0.301201″
“1194.97”,”0.401601″
“1211.21”,”0.301201″
“1227.32”,”0.401601″
“1243.55”,”0.1004″
“1259.79”,”0.200801″
“1276.03”,”-0.200801″
“1292.13”,”-0.401601″
“1308.37”,”-0.200801″
“1324.61”,”0.200801″
“1340.85”,”0.200801″
“1357.09”,”0.1004″
“1373.19”,”-0.301201″
“1389.43”,”0.301201″
“1405.67”,”-0.401601″
“1421.91”,”0.301201″
“1438.01”,”-0.301201″
“1454.25”,”0.301201″
“1470.49”,”-0.200801″
“1486.72”,”-0.301201″
“1502.83”,”0.301201″
“1519.07”,”0.301201″
“1535.3”,”-0.602402″
“1551.54”,”0.200801″
“1567.65”,”-0.401601″
“1583.88”,”-0.200801″
“1600.12”,”0.1004″
“1616.36”,”0.200801″
“1632.6”,”0.1004″
“1648.7”,”-0.301201″
“1664.94”,”0.200801″
“1681.18”,”0.301201″
“1697.42”,”0.401601″
“1713.52”,”-0.401601″
“1729.35”,”-0.200801″
“1746”,”-0.301201″
“1762.24”,”0.1004″
“1778.07”,”0.1004″
“1794.3”,”0″
“1810.82”,”0.1004″
“1827.05”,”0.1004″
“1842.88”,”0″
“1859.12”,”0.200801″
“1875.63”,”0.200801″
“1891.87”,”-0.301201″
“1907.7”,”0.1004″
“1923.94”,”-0.301201″
“1940.45”,”0.401601″
“1956.69”,”-0.200801″
“1972.52”,”0.200801″
“1988.76”,”-0.200801″
“2004.86”,”-0.301201″
“2021.1”,”0.200801″
“2037.34”,”-0.1004″
“2053.58”,”0.301201″
“2069.82”,”0.1004″

But the negative values are not plotted when XAxis is set to AutoRange? Does the dataset need to be ordered for the graph to render properly? How do I set the range to display negative values. I am using FastLinerenderable series.

3 votes
16k views

I am currently adding line to a chart to show when a value is ON and using the gap in a series feature to indicate when the value is OFF. In order for this to work I need to update the chart every few seconds when the value is ON; however, I do not want to add additional points; instead I want to either update a point in the line series or I want to remove a point and then add a new point. In my case its the x-axis value that I need to change.

Can you please suggest if this is possible?
If yes I am also wondering how to best find a specific point in a line series.

0 votes
9k views

How do i copy two Scicharts placed vertically on grid in a application.
By now i can copy at a time single SciChart.
Attached is a runtime window where i need to copy both SciCharts with single right click on copy.
Currently i am using 3.1Version.

  • Raghupathy asked 9 years ago
  • last active 9 years ago
1 vote
10k views

Hi,
in my application I’m recording values. All parameters are shown in a GridView Control. Now I want to show the RolloverModifier Values in this GridView.
Therefore I make a binding to the SeriesData property to my ViewModel:

     
            
                
            

            
                
                    
                    
                    
                    
                
            
        

In my ChartModel I have the property:

    private ChartDataObject _seriesData;

        public ChartDataObject SeriesData
        {
            get { return _seriesData; }
            set
            {
                _seriesData = value; 
            }
        }

When application starts the property will be set to null. And when I load some values into the graph and move over the RolloverModifier I got an Nullreference exception stacktrace is in the txt file.

Regards Markus

0 votes
10k views

I have an application that has a MainWindow that launches new ChartWindows (contains SciChart code) when you click a button. Each ChartWindow is launched on a new thread to avoid UI freezes. Also each one of the windows has a background thread that received live data from the exchange and updates the chart. Everything was working fine on version 1.7, but then I decided to update version 2.1.1 this week and that’s when the issues started.

After I open my first ChartWindow and try opening a new one I get a XmalParseException (see attached picture and exception.txt file). The only changed I made besided replacing the .dll file was updating the way DataSeries are created on the v2.

I am attaching the .cs and .xaml file for my ChartWindow, and this is the code I use to launch those windows:

    private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
    {
        Thread thread = new Thread(() =&gt;
        {
            ChartWindow w = new ChartWindow();
            w.Show();

            w.Closed += (sender2, e2) =&gt;
             w.Dispatcher.InvokeShutdown();

            Dispatcher.Run();
        });

        thread.SetApartmentState(ApartmentState.STA);
        thread.Start();
    }

Besides that code, there is nothing else in the MainWindow.xaml.cs.

As I said before this was working fine on v1.7 (the code for v1.7 is still there but commented).

I appreciate any help I can get, thanks.

Showing 1 - 50 of 3k results