Pre loader

Forums

Welcome to the SciChart Forums!

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

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

1 vote
11k views

Hi,

I’m using the TooltipModifier to show a tooltip for a series.

The tooltip is defined globally in the ‘ChartModifier’ section. However I have multiple series, and I would only like to show the tooltip for a specific series, and not the others.

How can I achieve this?

Thanks.

  • Yonatan D asked 8 years ago
  • last active 4 years ago
0 votes
8k views

After updating to SciChart 3.1, I started getting the following binding error:

System.Windows.Data Error: 4 : Cannot find source for binding with reference ‘RelativeSource FindAncestor, AncestorType=’Abt.Controls.SciChart.Visuals.SciChartSurfaceBase’, AncestorLevel=’1”. BindingExpression:Path=MaxFrameRate; DataItem=null; target element is ‘HighSpeedRenderSurface’ (Name=”); target property is ‘MaxFramerate’ (type ‘Nullable`1’)

I’m not binding MaxFrameRate anywhere nor do I have a HighSpeedRenderSurface explicitly defined in my code, so I’m guessing this error is occurring somewhere in a SciChart control.

I have several SciChartSurface elements across different controls in my application. I tried setting a global style:

<Style TargetType="{x:Type s:SciChartSurfaceBase}">
    <Setter Property="MaxFrameRate" Value="24"/>
</Style>

This had no effect on the binding error.

Any help would be appreciated since I think these errors are affecting the loading speed of my UI.

0 votes
8k views

Hi support. I currently evaluating SciChart and using FastOhlcRenderableSeries with CategoryDateTimeAxis to display stock chart intraday data. As you know, when I display many days of 1 minute intraday data (9h30 to 16h00) it is confusing to distinguish trading days since the XAxis is only showing time:sec format. I want to achieve to add tickmarks or any vertical lines to separate the first data for each day. How could I do that?
Thanks for your help.

1 vote
11k views

Hi all, me again !

I’m looking for inverting the Y axis. I want to make a chart which chronology goes from top to the bottom. I don’t see any property that talks about this and there is no example showing that kind of feature. Is it possible to do ?

Thank you

0 votes
4k views

If i do this:

  public void createTestGraph()
    {
        var series = new FastLineRenderableSeries()
        {
            SeriesColor = Colors.Red,
            DataSeries = GetDataSeries()
        };

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

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

        var surface = new SciChartSurface()
        {
            ChartTitle = "Rendered In Memory",
            XAxes = xAxes,
            YAxes = yAxes,
            RenderableSeries = new ObservableCollection<IRenderableSeries>() { series },
            Annotations = new AnnotationCollection()
        {
            new BoxAnnotation()
            {
                X1 = 10,
                X2 = 30,
                Y1 = 10,
                Y2 = 40,
                Background = new SolidColorBrush(Colors.Green),
            },

            new VerticalLineAnnotation()
              {
                X1 = 35,
                Stroke = new SolidColorBrush(Colors.Yellow),
                StrokeThickness = 3,
                ShowLabel = true,
                LabelPlacement = LabelPlacement.Axis
              }
            }
        };

        ThemeManager.SetTheme(surface, "Chrome");
        surface.Width = 1000;
        surface.Height = 1000;

        // Export to bitmap
        var bitmapSource = surface.ExportToBitmapSource();
        GraphTools.SaveBitmapToFile(bitmapSource, "D:\\TestChart.png");
        bitmapSource = surface.ExportToBitmapSource();
        GraphTools.SaveBitmapToFile(bitmapSource, "D:\\TestChart2.png");

I get the following:

In TestChart.png everything is as expected,
in TestChar2.png the BoxAnnotation is missing…

The effect of missing BoxAnnotations occors also in other not so clearly defined circumstances which gives me major headaches when trying to produce graphs for reports… Is there a bug oder an oversight of my part ?

(Using Old Version 3.1.0.4549)

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

Please look at screenshot. There is SeriesValueModifier with 27.68 price, but it is not fit into YAxis. Questinos:
1) How can I bind YAxis width to always fit SeriesValueModifier ?
2) How can I set font size and text formatting for value in SeriesValueModifier , not changing text on YAxis labels?

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

Hi guys,

I have a custom Modifier on my SciChart which will function by allowing a user to click and drag a symbol (an Ellipse, for argument’s sake) along the XAxis (just below the labels). Dragging this will move a verticle line drawn on the Modifier Surface to be positioned above the symbol. Bindings on where the symbol (and line) are located will be used in the VM for ends not relevant to this question 🙂

So, I can handle drawing the vertical line on the ModifierSurface just fine – but I cannot seem to add the Ellipse underneath the XAxis. I have increased the height of the XAxis so there is room for it, but it’s just the drawing that is painful.

Could I get a helping hand? 🙂

Thanks,
Miles

1 vote
13k views

Hi,

Thank you for adding the shifted axis support in SciChart. There is still a problem though, the axis labels are on the right side of the axis overlapping the graph. I want to place the labels on the left side of the axis. I have tried giving the LabelTickStyle with HorizontalAnchorPoint.Left with no avail. I have also tried scaling the axis to -1, which you might have guessed flips the labels 180 degrees as well.

I have also tried AxisAlignment = Left, but it doesn’t seem to work with the shifted axis, if I mark the axis IsCenter =false it does place the labels on the left, but no longer shifts them. I have also tried doing the same thing with IsCenter = true ofcourse, but that seems to just flip the labels in place with their tick lines.

Is there a way to place the labels on the left side of the Y axis while shifted?

Thank you.

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

Afternoon gurus, I’m currently playing around with the various modifiers that’re available and I’ve noticed something odd keeps happening. When I modify the axes of a series with the drag modifier DragMode.Scale, the ZoomExtents modifier for that series stops working. DragMode.Pan doesn’t produce the same issue, it zooms just fine. Is this a known issue or am I creating it with my code? For clarification, the drag modifier starts with IsEnabled = False and ZoomExtents works just fine.

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

Hi Guys,

I have successfully added text labels to my charts using ILabelProvider.

However, some of the charts are showing duplicate labels for each bar, and others are not showing the labels for all bars (even though there is space to do so).

Any idea how to fix these? See the attached images for more details.

Thanks in advance.
Andre.

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

Hi,

some time I got this exception if data series are empty:

SciChartSurface didn't render, because an exception was thrown:
  Message: Der Index war außerhalb des Arraybereichs.

  Stack Trace:    bei A.`1.(Int32 )
   bei A.`1.(Int32 )
   bei A.`1.get_(Int32 )
   bei A.`1.get_Item(Int32 index)
   bei Abt.Controls.SciChart.Model.DataSeries.DataSeries`2.XB(IRange C, SearchMode D, SearchMode I)
   bei Abt.Controls.SciChart.Model.DataSeries.DataSeries`2.WB(IRange C, SearchMode D, SearchMode I)
   bei Abt.Controls.SciChart.Model.DataSeries.DataSeries`2.GetIndicesRange(IRange range)
   bei A..(AxisCollection , IRenderableSeries , RenderPassInfo , IPointResamplerFactory , IDataSeries& , IndexRange& , IPointSeries& )
   bei A..(ISciChartSurface , Size )
   bei A..RenderLoop(IRenderContext2D renderContext)
   bei Abt.Controls.SciChart.Visuals.SciChartSurface.DoDrawingLoop()

I use SciChart 3.1.0.5114

regrads

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

Hi,

By default I get a slight gradient on all chart surfaces(see attached image). Is there any way to get rid of it?

Thanks & Regards!

0 votes
7k views

Hi,
Is there solution to always display series name below the line on the chart, not in legen, but I need to hide legend and I do not know what is series name. Thank You

0 votes
8k views

Hello.
I wanna deactivate the scichart on machine that doesn’t work because a reach activation limit.
How can i do this?

1 vote
0 answers
8k views

Hallo once again,

Im trying to set/control my YAxis visiblerange. With good help I was able to come up with the piece of code below. However one more problem arrives with this solution. When i double click on the chart and there is no fixed visiblerange to set, then the corresponding YAxis must go back to normal (sse code). However this has bugs undesirably i must doubleclick twice in order for the YAxisRange to go back to normal. The first time does change the YAxisRange but not good. The second time finish the job correctly.
Does anyone has any idea why this happens? It should go back to normal from the first doubleclick.

    public class CustomZoomExtentsModifier : ChartModifierBase
    {
        public override void OnModifierDoubleClick(ModifierMouseArgs e)
        {
            base.OnModifierDoubleClick(e);

            //This piece of code is for setting the YAxis Limit, the limmit is Set only OnZoomExtends           
            
                if (this.YAxis.IsFixedRange)
                {
                    this.YAxis.VisibleRange = RangeFactory.NewWithMinMax(this.YAxis.VisibleRange, this.YAxis.YMinRange, this.YAxis.YMaxRange);
                }
                else
                {
                    var newYRange = this.YAxis.GetMaximumRange();
                    if (newYRange != null && newYRange.IsDefined) this.YAxis.VisibleRange = newYRange;
                }

            // And we must calculate the VisibleRange of X Axis, otherwise it will not zoom back to normal
            var newXRange = this.XAxis.GetMaximumRange();
            if (newXRange != null && newXRange.IsDefined) this.XAxis.VisibleRange = newXRange;
            
        }
    }
  • bochelie asked 9 years ago
  • last active 9 years ago
0 votes
9k views

Hi,

In our application there are several different Chart types. We want to add a slider (similarly in the screenshot) for each chart to zoom it. Have you got any example at all for this purpose or what is the recommended way to do this?

Thanks,

Best Regards,
Charith

1 vote
7k views

Hello,

How would I go about creating a modifier (or extending an existing one?) that will allow the user to doubleclick on the y-axis to set the y-axis extents to the y-values in the visible x-range? can I capture a doubleclick on the y-axis?

I would like to reserve the doubleclick on the surface for other features, that’s why I don’t use the zoomextents modifier.

Thank you
Mathias

1 vote
10k views

How to create custom annotation which has BoxAnnotation with a VerticalLine Annotation at one end.

At present I’m achieving this by creating both annotations and synchronizing them in ChartModifier.
Look at the attached image where you can see two BoxAnnotations both having a VerticalLineAnnotation at one end. I’m disabling editing for BoxAnnotation and enabling editing only for VerticalLineAnnotation.

When VerticalLineAnnotation is dragged in X-Direction, I get the X1 value from it and manually set it to BoxAnnotations X2.

This is not good implementation. I can see lag between sync events. Is it possible to create a custom annotation which incorporates both Box and Vertical line annotations ? Or is it possible to set IsEditing for BoxAnnotations One End only ?

0 votes
9k views

Hello.
Using SciChart v2.2.
BaseRenderableSeries.HitTest(MousePoint) triggers not only in series pane, but also in other panes.

My hit-test code is below, called from public override void OnModifierMouseMove(ModifierMouseArgs mouseEventArgs)

foreach (var renderSeries in ParentSurface.RenderableSeries)
            {
                var series = renderSeries as BaseRenderableSeries;
                bool isCandleSeries = ((series as FastCandlestickRenderableSeries) != null);

                if (series != null && series.DataSeries != null)
                {
                    var hitTest = series.HitTest(mouseEventArgs.MousePoint);

                    if (hitTest.DataSeriesType == DataSeriesType.Ohlc)
                    {
                        seriesAnnotaion[k].X1 = hitTest.DataSeriesIndex;
                        seriesAnnotaion[k].Y1 = hitTest.CloseValue;

                        if (hitTest.IsHit)
                        {
                            //show tooltip
                        }
                     }
                  }
               }
0 votes
8k views

I have a SciChartSurface with several FastLineRenderableSeries. I may have several days worth of per second data in each series. I have set my XVisibleRange to 10 minutes and I update it every second to make sure the view stays current. I want to also allow the user to either pan or zoom that view but only on the x axis. I see the demo of the SciStockChart using the IsPanEnabled that allows the functionality I want but that does not appear to be available on the SciChartSurface. Is there another way to accomplish this or do I need a different type of chart?

0 votes
6k views
 private void VerticalLineAnnotation_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
    {
        if (e.PropertyName.Equals("PositionChanged"))
        {
            // Code here
        }
    }

I am trying to get the new Y1 intercept. I have bound this to both the VerticalLineAnnotations (y1 and y2 on those elements are NaN and null respectively) and to the VerticalSliceModifier which seems to give me the old values, instead of the new ones. I currently have this attached to the property changed event.

Essentially, the datacontext is staying the same but the collection is updating with new values. When it updates with new values, I need to update my LineAnnotation with the new Y1 and Y2 values.

Thanks!

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

Hi Guys,

I am creating and placing my custom annotation on my chart and its all fine.

Just a simple question :

When the annotation is created and placed I can see its anchor point which disappears (hide) when I select (click) on the chart surface.

Is there a way (programmatically) to “unselect” the custom annotation just after it has been placed in order the anchor points disappear ?

Thanks to you all

Kind Regards

Giuseppe

  • jp13 asked 8 years ago
  • last active 8 years ago
0 votes
8k 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
7k views

The SciChart FAQ knowledgebase is a valuable learning tool, but sometimes I need to print articles to pdf to have offline. Unfortunately, the article format is not printer friendly. the left navigation column consumes bout 30% of the page width, and the content of example code boxes is clipped if the box contains a scrollbar.

Would it be possible to define print CSS that eliminates the left column, and wraps the example code? – or alternatively, to provide a way to download the rendered pdf ala Wikipedia.

Similarly, being able to generate a pdf version of the API documentation would be extremely useful when working offline.

  • wrlear asked 9 years ago
  • last active 9 years ago
0 votes
0 answers
9k views

Hi,

Is this possible to plot a wpf graph by binding DataTable in Scichart control. If it is possible can any body suggest or post sample code for me. It would be much appreciated.

Regards:-
Rajanikanth

3 votes
15k 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
6k views

hi,
I have a vertical annotation and I want to restrict the scrolling of annotation between an x axis range.

ie, When I drag and reach left most point, it should not move beyond that point. Same should happen when I reach right most point.

How can I do that?

1 vote
15k views

I have the requirement of using a line series, but not displaying certain data points in the series (essentially breaking the line between points).

Do you have any recommendations on how to do this?

Thanks,
Jason

  • morseja asked 9 years ago
  • last active 9 years ago
0 votes
8k views

Hi!

I was wondering if there is any way to make the Y-axis wrap around?

We are using SciChart in a maritime application that handles the heading of a ship. The heading goes from 0 degrees to 360 degrees (or rather back to 0 degrees). When using a normal Y-axis from 0 to 360 a fluctuating value around 0 degrees (0 degrees +- 0.5 degrees for instance) will draw a line all over the chart’s Y-range, but in real life this is really a small change with little amplitude. A correct representation would be to put 359 degrees at the position of -1 degrees. But if we use negative angles we would still get the problem of large amplitudes at some point in our range (for instance using a range from -180 to 180 would lead to problems when fluctuating around 180).

Regards,
Bjørn Terje Svennes

0 votes
12k views

I successfully migrated my wpf project from v3 to v4 today using the upgrader tool addin for visual studio. All of my charts had previously had solid color backgrounds that changed depending on application state. This still works, but everything is overlaid with a vertical and horizontal zebra-striping, resembling a picnic blanket. I can’t seem to find the documentation for where that’s happening (currently I’m overwriting the renderable background to change the solid base color, but the striping persists) where is the documentation for that particular feature.

The v3 examples had garrish colors to help you out with the styling, but the new one has everything looking good and it’s hard to tell where in the source I should be looking.

1 vote
8k views

Hello, everybody

I am working with drawing text in InternalDraw of FastLineRenderableSeries method.
I have got two questions:

1) When I am changing FontSize dynamically, I get this picture (img 1). How can I fix this problem? P.S. this problem starts to appear when I display two or more renderable series.

2) Is there any method or simple way to get all visible points from FastLineRenderableSeries?
Thanks in advance

0 votes
9k views

Hello.

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

Next:

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

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

This is a bug or need to configure something else?

  • Nicholas asked 9 years ago
  • last active 9 years ago
0 votes
13k views

Hi Guys,

Can you please help me with the following functionality?
I have got a context menu attached to the SciChartSurface and one of the items is to add an annotation(as it is shown in the image attached). So, the idea is that when I open the menu and select the “Add annotation” It will pick up the nearest point in the chart related to where the click was done and then it will add the annotation to the chart as it is shown in the image attached.
I have already figured out with reading some of the question in this forum, to get the mouse points and the nearest Y point in the series related to that mouse click… like this:

private void AddAnnotationOnClick(object sender, RoutedEventArgs e)
{
// Hit tests are done per renderable series, so get a renderable series
// or iterate over all RenderableSeries
var renderableSeries = SciChartSurface.RenderableSeries[0];

        // Perform the hit test relative to the GridLinesPanel
        var hitTest = renderableSeries.HitTest(MousePoint);

        SciChartSurface.Annotations.Add(new CustomAnnotation { DataContext = hitTest.YValue });
    }


    private Point MousePoint { get; set; }

    private void OnMouseUp(object sender, MouseButtonEventArgs e)
    {
        MousePoint = e.GetPosition(SciChartSurface.GridLinesPanel as UIElement);
    }

As it can be noticed, I have already two annotations that are fix, they are always displayed…

Sorry for my terrible English… hope you guys get the idea…

Thanks very much. 🙂

0 votes
15k views

I am trying to implement the DigitalFastLine Series from the example given in ‘http://support.scichart.com/index.php?/Knowledgebase/Article/View/17224/37/how-to-make-line-series-draw-to-the-right-edge-of-the-chart’

public class LinesEnumerable : IEnumerable<Point>
{
    protected readonly IPointSeries _pointSeries;
    protected readonly ICoordinateCalculator<double> _xCoordinateCalculator;
    protected readonly ICoordinateCalculator<double> _yCoordinateCalculator;
    protected readonly bool _isDigitalLine;

    /// <summary>
    /// Initializes a new instance of the <see cref="LinesEnumerable" /> class.
    /// </summary>
    /// <param name="pointSeries">The point series.</param>
    /// <param name="xCoordinateCalculator">The x coordinate calculator.</param>
    /// <param name="yCoordinateCalculator">The y coordinate calculator.</param>
    /// <param name="isDigitalLine">if set to <c>true</c> return a digital line .</param>
    public LinesEnumerable(IPointSeries pointSeries, ICoordinateCalculator<double> xCoordinateCalculator, ICoordinateCalculator<double> yCoordinateCalculator, bool isDigitalLine)
    {
        _pointSeries = pointSeries;
        _xCoordinateCalculator = xCoordinateCalculator;
        _yCoordinateCalculator = yCoordinateCalculator;
        _isDigitalLine = isDigitalLine;
    }

    /// <summary>
    /// Returns an enumerator that iterates through a collection.
    /// </summary>
    /// <returns>
    /// An <see cref="T:System.Collections.IEnumerator" /> object that can be used to iterate through the collection.
    /// </returns>
    public virtual IEnumerator<Point> GetEnumerator()
    {
        return _isDigitalLine ?
            (IEnumerator<Point>)new DigitalLinesIterator(_pointSeries, _xCoordinateCalculator, _yCoordinateCalculator) :
            new LinesIterator(_pointSeries, _xCoordinateCalculator, _yCoordinateCalculator);
    }

    /// <summary>
    /// Returns an enumerator that iterates through a collection.
    /// </summary>
    /// <returns>
    /// An <see cref="T:System.Collections.IEnumerator" /> object that can be used to iterate through the collection.
    /// </returns>
    IEnumerator IEnumerable.GetEnumerator()
    {
        return GetEnumerator();
    }
}

However, when I try to do the following:

linesEnumerable = linesEnumerable.Concat(new[] { new Point(viewportWidth, lastYCoordinate) });

it says ‘System.Collections.IEnumerable’ does not contain a definition for ‘Concat’ and the best extension method overload ‘System.Linq.Queryable.Concat(System.Linq.IQueryable, System.Collections.Generic.IEnumerable)’ has some invalid arguments

I already have System.Linq and Collections namespace added

using System;
using System.Data;
using System.Linq;
using System.ComponentModel;
using System.Collections;
using System.Collections.Generic;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Abt.Controls.SciChart;
using Abt.Controls.SciChart.Model.DataSeries;
using Abt.Controls.SciChart.Utility;
using Abt.Controls.SciChart.Visuals;
using Abt.Controls.SciChart.Visuals.Axes;
using Abt.Controls.SciChart.Visuals.RenderableSeries;
using System.Globalization;
using System.Windows.Data;
using Abt.Controls.SciChart.Rendering.Common;
using Abt.Controls.SciChart.Numerics.CoordinateCalculators;

What’s going on here? Can you improve your sample?

Thanks!

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

After online activation failed I tried offline twice and response to my email both times was: Username or password is not valid. Yet I’ve successfully logged onto scichart with same credentials. Help!

1 vote
0 answers
8k views

Hallo,

Once again I have a strange behaivour with the labeltextformating.

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

Code wich won’t work:

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

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


            </s:SciChartSurface.Annotations>

Code wich works:

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

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

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

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

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

Hi,

I am hoping that someone can help me with the following issue…
I am implementing a Multiple Charts binding where the itemsControl is binding to the RolloverData.SeriesInfo (Like the example of the rollover feedback) so I display a little panel at the top of the diagram displaying the x and y values.
unfortunately, when the mouse moves over a chart it shows the values but then if I move to the next chart it shows the X and Y values in both charts and what I want to happen is that when the mouse moves to the another chart the previous chart don’t display the panel with the values.
I am attaching a picture of what happens thanks:)

<SciChart:SciChartSurface x:Name="sciChartSurface" 
                                  DataSet="{Binding ChartData}" 
                                  SciChart:ThemeManager.Theme="Chrome" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
            <SciChart:SciChartSurface.RenderableSeries>
                <SciChart:FastLineRenderableSeries SeriesColor="Red"/>
            </SciChart:SciChartSurface.RenderableSeries>

            <!--  Declare Axes  -->
            <SciChart:SciChartSurface.YAxis >
                <SciChart:NumericAxis AxisTitle="{Binding ChartName}" AxisAlignment="Left">
                    <SciChart:NumericAxis.GrowBy>
                        <SciChart:DoubleRange Min="0.1" Max="0.1"/>
                    </SciChart:NumericAxis.GrowBy>
                </SciChart:NumericAxis>
            </SciChart:SciChartSurface.YAxis>
            <SciChart:SciChartSurface.XAxis>
                <SciChart:DateTimeAxis AxisTitle="Time"
                                       DrawMajorGridLines="True"
                                       DrawMinorGridLines="True"  
                                       TextFormatting="HH:mm MMM dd" SubDayTextFormatting="HH:mm MMM dd">
                    <SciChart:DateTimeAxis.GrowBy>
                        <SciChart:DoubleRange Min="0.1" Max="0.1"/>
                    </SciChart:DateTimeAxis.GrowBy>
                </SciChart:DateTimeAxis>
            </SciChart:SciChartSurface.XAxis>

            <!--  Declare ChartModifiers  -->
            <SciChart:SciChartSurface.ChartModifier>
                <SciChart:ModifierGroup>
                    <SciChart:ModifierGroup SciChart:MouseManager.MouseEventGroup="myCustomGroup">
                        <SciChart:RubberBandXyZoomModifier IsEnabled="True"
                                                IsXAxisOnly="True" 
                                                ReceiveHandledEvents="True" />
                        <SciChart:ZoomPanModifier IsEnabled="False"/>
                        <SciChart:MouseWheelZoomModifier IsEnabled="False"/>
                        <SciChart:RolloverModifier x:Name="rolloverModifier" 
                                                   IsEnabled="True" 
                                                   ReceiveHandledEvents="True"/>
                        <SciChart:CursorModifier IsEnabled="False" ReceiveHandledEvents="True"/>
                        <SciChart:YAxisDragModifier/>
                        <SciChart:XAxisDragModifier/>
                        <SciChart:ZoomExtentsModifier/>
                </SciChart:ModifierGroup>
                </SciChart:ModifierGroup>
            </SciChart:SciChartSurface.ChartModifier>
        </SciChart:SciChartSurface>

        <Border Grid.Row="1"
                HorizontalAlignment="Left"
                VerticalAlignment="Top"
                Background="#77FFFFFF"
                BorderBrush="#55000000"
                BorderThickness="2">
            <ItemsControl DataContext="{Binding ElementName=rolloverModifier}" 
                          ItemsSource="{Binding RolloverData.SeriesInfo}">
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition></RowDefinition>
                                <RowDefinition></RowDefinition>
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition />
                                <ColumnDefinition />
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Row="0" Grid.Column="0"
                                       FontSize="12"
                                       FontWeight="Bold"
                                       Foreground="Black"
                                       Text="Y Axis:"/>
                            <TextBlock Grid.Row="0" Grid.Column="1"
                                       FontSize="12"
                                       FontWeight="Normal"
                                       Foreground="Red"
                                       Text="{Binding  YValue, Converter={StaticResource toStringConverterConverter}}" />
                            <TextBlock Grid.Row="1" Grid.Column="0"
                                       FontSize="12"
                                       FontWeight="Bold"
                                       Foreground="Black"
                                       Text="DateTime:"/>
                            <TextBlock Grid.Row="1" Grid.Column="1"
                                       FontSize="12"
                                       FontWeight="Normal"
                                       Foreground="Red"
                                       Text="{Binding  XValue, Converter={StaticResource toStringConverterConverter}}" />
                        </Grid>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
            </ItemsControl>
        </Border>
  • vaquita50 asked 11 years ago
  • last active 7 years ago
0 votes
0 answers
0 views
0 votes
12k views

Hi All,

I’ve noticed under certain circumstances that the tooltip for a VerticalSliceModifier is sometimes not completely shown on the chart. i noticed it in our application and reproduced it in a test app.

I’ve attached a couple of images to show what i mean.

Is there anything I can do about this issue?

0 votes
8k views

Hello again

Now, im trying to make AnnotationCreationModifier without xaml, but i cant find any event like ‘AnnotationCreated’ and couldnt find any topics/tutorials how to create it without using xaml

0 votes
8k views

I have a MouseWheelZoomModifier. It works fine when I first run my app but if I click a control outside of the chart (in this case a control on a Telerik RibbonBar) the mouse wheel zoom stops working. All other legends continue to work ok (RubberBand, ZoomPan, ZoomExtents).

Any idea what the problem could be? This is my code:

var zm = MouseWheelZoomModifier();
zm.IsEnabled = true;
zm.ActionType = ActionType.Zoom;

0 votes
9k views

Hi,

I have a chart which has its YAxes and Series bound to a view Model. When I try to add an axis in real time I get an “InvalidOperationException” –
“Could not draw an annotation of type Abt.Controls.SciChart.Visuals.Annotations.AxisMarkerAnnotation. YAxis with Id == DefaultAxisId doesn’t exist. Please ensure that the YAxisId property is set to a valid value.”

I believe this might be because I don’t have an axis set up at start. Here are my Chart Modifiers <s:SciChartSurface.ChartModifier>
<s:ModifierGroup >
<s:SeriesValueModifier/>
<s:AnnotationCreationModifier x:Name="annotationCreation" AnnotationCreated="OnAnnotationCreated" YAxisId="Y1"/>
<s:XAxisDragModifier ClipModeX="None" />
<s:YAxisDragModifier IsEnabled="True" ReceiveHandledEvents="True" AxisId="Y1"/></s:ModifierGroup>
</s:SciChartSurface.ChartModifier>

Can you tell me what I need to do to avoid this exception. Also, I don’t see the Series Values Modifier working, I’m sure its related to this problem.

Please let me know,
Thanks,
Deepak

1 vote
8k views

I’m reworking existing functionality to use SciChart. I need the resulting graph to look identical to original solution (or as close as possible).

In the screenshot you can see where I got so far (top) compared to the old solution (bottom). I got stuck trying to make the labels work.

I implemented a custom label provider as described here https://www.scichart.com/screenshots-xps-printing-x-axis-text-labels/ (I basically just took the CustomLabelProviderClass from there) I use the same list of labels as the old solution. What you see is as far as I got, using the following axis properties:

VisibleRange=”0,115″
DrawMajorGridLines=”False”
DrawMinorGridLines=”False”
LabelProvider =”{Binding LabelProvider}”
TickLabelStyle=”{StaticResource AxisLabelStyle}”
AutoTicks=”False”
MajorDelta=”0.5″
MinorsPerMajor=”1″
MinorDelta=”0.5″

The old graph does actually skip some of the values as well (about every other, unless I zoom in) but it still displays them with about double the density of the SciChart. Is there a way to make SciChart behave the same?

Also, I applied rotation transform on the labels to get them vertical. As you can see, now they stick into the graph. Is there a way to move them down a bit?

0 votes
0 answers
8k views

SciChart v1.3.1.1107 has been released on the 22nd July 2012.

Full release notes and the MSI Installer can be found at http://www.scichart.com/downloads . Fixes and features in this version include:

Features

  • Added RenderPriority flag to allow for lowering, or raising priority of render operations. This can help resolve issues where mouse interaction plus real-time locks the chart
  • Allowed Scichart to be rendered off-screen (i.e. in a server environment). To use this feature, set RenderPriority = RenderPriority.Immediate and render the SciChartsurface to a bitmap
  • Added AxisBase.Clear(); Can be used to programmatically clear ticks, gridlines off an axis

Fixes

  • Fixed startup logic
  • zooming to extents on axis only if individual axis ranges are not set
  • Fixed removing last series/axis does not clear the chart
  • Fixed XyScatterRenderableSeries not drawing first data-point
  • Fixed issue in multi-axis where only the last axis could draw grid lines
  • Improvement to axis visible range handling in an MVVM scenario
  • Fixed FastColumnRenderableSeries now centres on data-point (not left edge)
  • Fixed a bug in RolloverModifier where template did not show in certain circumstances
  • Fixed a bug in RolloverModifier where selecting a series caused tooltips to remain on the screen
  • Fixed NumericAxis/DateTimeAxis.AutoTicks=False having no effect
  • Fixed Oscilloscope/Electric theme background colours which had incorrect alpha channel, showing through underlying control colour

Examples

  • Added two new examples: ECG Monitor and Spectrum Analyzer, you can find them under “IWantTo/ViewFeaturedApplication”
  • Added new tutorials: Controlling VisibleRange, where we demonstrate how to build the ECG, Oscilloscope and Spectrum Analyzer style scrolling
0 votes
0 answers
14k views

In the chart, I may need programmally add one RenderableSeries, and add data into its dataseries. But how to fire the ‘OnPropertyChangeEvent’ programmaly for the lively added RenderableSeries?

In the example, a binding between dataseries in the view and a property in the model is created manually. Then we change the data and fire the ‘OnPropertyChangeEvent’ event in the model. How to achieve this affect programmally?

best regards
Chunxi

  • chunxi asked 9 years ago
  • last active 9 years ago
0 votes
10k views

my Horizontal Annotation is having stroke property to white and thats why my lables are also in white color i want them to set in black but not able to get any property for the same ,, screen shot is attached for the same
kindly help me

0 votes
6k views

Hi

We have a requirement of creating a Time line chart similar to Gantt Chart,
Now we have created the same by increasing the thickness of Line chart,
But the main problem we are facing is line end cap, Currently it is rounded shape we could’t find a solution to make it flat.
We tried customrendarables series also but faced lot of issues while zooming and panning.

My question is whether you include following functionalities in the coming versions
1. Provide Gantt charts ?
2. Provide an API to change like end cap to flat ?

Regards
Abhilash R

  • Abhilash R asked 8 years ago
  • last active 8 years ago
1 vote
16k views

Hi,

I have a scichart surface defined in xaml like this,

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

        </local:SciChartSurface>

In the code behind I have ChartAnnotations defined as,

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

                _ChartAnnotations = value;
                RaisePropertyChanged(ChartAnnotationsPropertyName);
            }
        }

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

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

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

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

Thanks

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

Hi!

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 to set the visibility to collapsed but, when i do that the panes only disappear,
but the remaining pane does not resize.

As I see the panes have two small buttons on the upper right corner for collapse and close,
This collapse button is similar to what i would want but I have no idea how to reach the collapse
functionality throgh code. Is it possible to collapse a pane withouth removing it from the container
for the ItemTemplate?

Thanks
Chris

Showing 1 - 50 of 4k results

Try SciChart Today

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

Start TrialCase Studies