Pre loader

Tag: VerticalSliceModifier

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
7k views

Hi.

In my application every series (FastLineRenderableSeries) has it’s own y axis (e.g. surface with 3 serieses will have 3 Y axes). When series is created I’m creating NumericAxis and adding it to YAxes collection. So my chart surface declared as follows (simplified view):
<s:SciChartSurface>
<s:SciChartSurface.XAxis>
<s:DateTimeAxis />
</s:SciChartSurface.XAxis>
<s:SciChartSurface>

Problem 1: when I do not declare YAxis in xaml I have problem with VerticalSliceModifier: when slice is added by user on surface the crosspoint with series is positioned correctly, but slice vertical line itself is drawn on the left side of surface and positioned correctly on some redraw (e.g. panning).
enter image description here

I found out that VerticalSliceModifier does not work properly if Axis is not declared, so I declared it:
<s:SciChartSurface.YAxis>
<s:NumericAxis Visibility="Collapsed"/>
</s:SciChartSurface.YAxis>

Now VerticalSliceModifier works fine, but now we come to problem 2.
Problem 2: when YAxis declared with Visibility=”Collapsed” the chart surface squares gets wrong color (look at blinks on panning).
enter image description here

So I’ve got stuck in search of magic combination when everything works as expected :-).

1 vote
0 answers
7k views

Hi Sci Chart,

I am using WPF with MVVM.

What i want to achieve is by reading the rollover modifier current hit point data, when user click left click, i want to add VerticalSliceModifier in the graph based on the hit point.

Attach is my code from xaml and viewmodel.

I have two issues which are:
“if (DistanceSeriesData.SeriesInfo.Count > 0)”, i always get zero count of seriesinfo.

In DistanceVerticalLines?.Add(new VerticalLineAnnotation(), the added Distance Vertical Lines data did not reflect in graph.

0 votes
7k views

Hi,

I am using in my chart a VerticalSliceModifer with a VerticalLineAnnotation.
It works as expected, but I would like to modify the aspect of my VerticalLineAnnotation by adding a marker on the axis on top of the line, exactly as in the attached picture (not a scichart).
Is there a way to do that ?

Best regards,
Jean-Charles Durand

0 votes
9k views

Hi,

I am currently adding a Vertical Slice Modifier with just on Vertical Line inside of it.
The idea is to create a vertical cursor to display Y values for a given X value.
As my chart is a real time chart, I don’t want my cursor position changed expect on user interaction, I set to Relative the CoordinateMode property of my Annotation.

<s:VerticalSliceModifier Name="sliceModifier" ShowTooltipOn="Always" IsEnabled="True">
                    <s:VerticalSliceModifier.VerticalLines>
                        <s:VerticalLineAnnotation IsEditable="True" X1="0.5" Stroke="#D62D15" CoordinateMode="Relative"/>
                    </s:VerticalSliceModifier.VerticalLines>
                </s:VerticalSliceModifier>

The vertical line is correctly displayed at the centre of the surface but point markers and tooltips are not displayed at the line position, it seems the relative coordinate mode is not handle on this area.

Thanks for your help
Jean-Charles

0 votes
7k views

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

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

Hi,

I’m creating lines chart with data from CSV file.
I have multiple series and each serie has its own YAxis.
As it comes from different CSV files, the number of series and their names are not known in advance.

I create the series in the code (MVVM) .

I’m using the trial version for 2 weeks now and before I purchase the licence, I have two questions:

1) I need to implement a function allowing the user to create multiple VerticalSliceModifier and display data for each serie on the graph and store data to a list or datatable.

Is it possible to have Vertical Slice Tooltip with multiple YAxis ?
If I create a vertical line annotation, can I get data for each serie crossing the line?

2) I need to be able to add annotation dynamically (measure, text, box, lines…).
Is there a way to save annotations to a list (and then to a file) so that if the user reopens the same CSV file he can load and display the corresponding annotations?

Thank you in advance for your answer,
Regards
Nicolas

0 votes
7k views

Hello Team,

I am evaluating Sci Chart for using in our production applications. I am creating a POC for the same if it fits our requirements.

I have created a scattered chart successfully. Our next requirement is to select a part of the chart, basically, like data from this date to this date. I was trying to explore VerticalSlice Modifier for it. My purpose was that the user will place the sliders on the start date and end date and we will get those values. Can you tell me if this approach is correct or suggest a different technique, annotation or marker, any other modifier to select data between two dates?

<Grid Grid.Row="1">
        <s:SciChartSurface s:ThemeManager.Theme="BrightSpark">
            <s:SciChartSurface.ChartModifier>
                <s:ModifierGroup>
                    <s:VerticalSliceModifier Name="sliceModifier">
                        <s:VerticalSliceModifier.VerticalLines>
                            <s:VerticalLineAnnotation X1="{Binding SelectedStartDate, Mode=TwoWay}" IsEditable="True"/>
                            <s:VerticalLineAnnotation X1="{Binding SelectedEndDate, Mode=TwoWay}" IsEditable="True"/>
                        </s:VerticalSliceModifier.VerticalLines>
                    </s:VerticalSliceModifier>
                </s:ModifierGroup>
            </s:SciChartSurface.ChartModifier>
            <s:SciChartSurface.XAxis>
                <s:DateTimeAxis AxisTitle="Number of Samples (per Series)"/>
            </s:SciChartSurface.XAxis>
            <s:SciChartSurface.YAxis>
                <s:NumericAxis AxisTitle="Value"/>
            </s:SciChartSurface.YAxis>
            <s:SciChartSurface.RenderableSeries>
                <s:XyScatterRenderableSeries x:Name="scatterSeries" Stroke="OrangeRed" DataSeries="{Binding Chirps}">
                    <s:XyScatterRenderableSeries.PointMarker>
                        <s:EllipsePointMarker Width="9" Height="9" Fill="SteelBlue" Stroke="LightSteelBlue" StrokeThickness="2"/>
                    </s:XyScatterRenderableSeries.PointMarker>
                </s:XyScatterRenderableSeries>
            </s:SciChartSurface.RenderableSeries>
        </s:SciChartSurface>
    </Grid>

Thanks for the help and support

0 votes
8k views

I have 2 series displayed on my chart. I have placed a VerticalLineAnnotation in VerticalSliceModifie to display rollover marker on a series. By default it gets displayed for each series plotted. How can I set it to be displayed only for one of the series?

I tried to set SeriesData Binding Path to specific series, but it did not work.

<visuals:VerticalSliceModifier Name="SliceModifier" ShowAxisLabels="False"  ShowTooltipOn="Never" SeriesData="{Binding Path=Series[1]}">
       <visuals:VerticalSliceModifier.VerticalLines>
                <visuals:VerticalLineAnnotation X1="45" 
                Y1="80" 
                Stroke="Red"
                StrokeThickness="1"
                IsEditable="True" 
                x:Name="LRed"
                ResizeDirections="XDirection" 
                DragDirections="XDirection"  
                VerticalAlignment="Bottom">
     </visuals:VerticalLineAnnotation>
</visuals:VerticalSliceModifier.VerticalLines>
</visuals:VerticalSliceModifier>
  • Anil Soman asked 5 years ago
  • last active 5 years ago
0 votes
11k views

I’m using Vertical Slice Modifier but, I don’t want to show Tooltip where series intersects.

How can I hide it?

0 votes
15k views

I want to put one vertical line to chart, when mouse left button click inside the chart.
And, I want to put vertical line where nearest plotted X value to mouse cursor location in the chart.
No interpolation.

  • Also, I’m using RubberBandXyZoomModifier ExecuteOn=”MouseLeftButton”
    and

  • ZoomPanModifier ExecuteOn=”MouseRigthButton”

What is the best Modifier to use?
And how can it set like that?

0 votes
10k views

I have an issue with the latest version of Scichart. I have a chart which we are exporting to an image after cloning. We are using the CreateCloneOfSurfaceInMemory API call to take the clone. The problem is that, the annotations are getting lost from the cloned surface. I spent some time debugging and found that this is getting lost when we have VerticalSliceModifier in the Modifier group. I have attached the SciChart_CreateAnnotationsDynamically example which is modified to replicate this issue.

0 votes
9k views

I am have a vertical stacked chart setup which shares the same x- axis ranges. I am trying to find a way to add vertical lines in both the charts at once and further I need the vertical lines to be dragged in sync. When one vertical line annotation is dragged, I need the same movement to happen in the other chart as well. I can share a prototype if you want. Please suggest a solution.

0 votes
0 answers
6k views

Hi,

I’m trying to enable the use of multiple VerticalLineAnnotations and show the corresponding SeriesInfo in an extra legend to the user. Utilizing the RolloverModifier Tooltips example, this works quite easily for the position and values of the VerticalLineAnnotations. However, I would like to show differences (X and Y) between the values of two VerticalLineAnnotations in the same manner.

My approach was to subclass ChartDataObject and add an ObservableCollection of a custom class (SeriesDifferenceInfo) providing properties, which exhibit DeltaX and DeltaY for binding in the surface. For keeping this collection up to date when adding or removing a VerticalLineAnnotation, I registered for the CollectionChanged event of SeriesInfo in my subclassed ChartDataObject and wanted to update the Collection of SeriesDifferenceInfo subsequently. But somehow this event appears not to be triggered on a change in the list of SeriesInfo. Am I doing something wrong or is this intended behaviour? Of course, I could simply call a method UpdateDifferenceCollection(), when adding/removing a VerticalLineAnnotation, but is this really neccessary?

Also, the next problem is triggering PropertyChanged for the DeltaX and DeltaY values when the values of one SeriesInfo changed. I guess this could be done by listening to e.g. a drag event of VerticalLineAnnotation, but is there a more straightforward way to do this?

Best regards
Phil

0 votes
10k views

In the Knowledge Base, an article discusses a rollover modifier that utilises a vertical hit test to draw a vertical line at the cursor and highlight the nearest point: http://support.scichart.com/index.php?/Knowledgebase/Article/View/17235/32/custom-chartmodifiers—part-1—creating-a-custom-rollover-modifier

This is perfect for data which moves/is unique along the X axis (such as time series data).

How can I best replicate this modifier for data which moves/is unique along the Y axis? Drawing a horizontal line is easy, but there is no HorizontalSliceHitTest function.

  • Rick C asked 7 years ago
  • last active 7 years ago
1 vote
9k views

Hi,

is it possible to make the Touch Area of a SliceModifiers’ LineAnnotation bigger?

Right now the area has the same size as the MouseClick area, which is a bit too small if you want to drag a modifier with your finger.

Maybe I didn’t look hard enough, but I couldn’t find an overridable HitTest Method in VerticalSliceModifier/VerticalSliceModifierBase.
Or is it possible to override a HitTest (like the “IsPointWithinBounds()” method?) in the LineAnnotation class and use this custom VerticalLineAnnotation as my VerticalLine?

Thank you very much!

Regards,

dowe

  • dowe asked 8 years ago
  • last active 8 years ago
1 vote
18k views

Hello,
I am trying to get a right charting control for my boss , excuse me if am not using the right terms I am new to both WPF and SciCharts. Based on this example https://www.scichart.com/Abt.Controls.SciChart.SL.ExampleTestPage.html#/Abt.Controls.SciChart.Example;component/Examples/IWantTo/InspectDatapoints/SeriesVerticalSlicesExample.xaml , I am having the following difficulties:

  1. Changing label background color of a VerticalLineAnnotation ( the one in blue lying below the X axis in the example)
    I have been trying to figure out how to change the Vertical Slices’ labels background color (or make the label’s box transparent in order to see only the labels’ values and not the color around the label) but am not gettting a way out.

  2. Position the Curve – ‘Vertical slice’ intersection point y-axis value at the top end of the slice ( from the example, assuming i have only one curve say Curve A, the label ‘Curve A : 0.69’ shouldn’t appear right at the point of intersection between the curve and the slice but at the top end of the slice)

Would someone help please. Thank you in advance.

0 votes
12k views

Hello, SciChart team, i’m trying to implement vertical slices on my chart surface, but X axis is a DateTimeAxis, but i’m getting nullReferenceException when trying to move (just click on it).

“System.NullReferenceException occurred
_HResult=-2147467261
_message=Ссылка на объект не указывает на экземпляр объекта.
HResult=-2147467261
IsTransient=false
Message=Ссылка на объект не указывает на экземпляр объекта.
Source=Abt.Controls.SciChart.Wpf
StackTrace:
в Abt.Controls.SciChart.Visuals.Annotations.AnnotationBase.GetBasePoints()
InnerException: “

trying to solve this problem i downloaded scischart 3.42 but this didn’t help, it even made things worse underlining my scichartsurface declaration in .xaml file saying “2 is not a valid value for property orintation”
which is not used, and this chart worked before upgrade.
please help me out,
Volkov Alexander

Update: full rebuilding solved the latter problem. i’m adding zip containing txt with scichartsurface definition and methods from .cs which add and remove slices

1 vote
11k views

Hi,

I have a dataseries I need to display on a log Axis – i have stripped out the <= 0 Y values and replaced them with NaN’s and set the chart to draw NaN’s as gaps which is all working as expected. The axis is a datetime x-axis and I’m plotting several Scatterseries on it.
I have a VerticalSliceModifier which the user sets to a particular point and the X value of that point is used to acquire further information from the database so for this feature the Y value is of no interest. I’ve overridden the MoveAnnotationTo() method in order to get the slicemodfier to “snap” to the next nearest point of any of the series shown.In order to do this I use :

HitTestInfo hitTestResult = _seriesToSnapTo.VerticalSliceHitTest(new Point(coordinates.X1Coord + horizOffset, 1));

The problem is that if the point is one of those with a Y Value of NaN the HitTestResult comes back as everything being “null” and I can’t get the XAxis Value i need.

I would have expected the HitTest to have returned an X value regardless of the Y value being a NaN. I really just want to snap to the next X Axis point ignoring the Y value. Is there something else I should be using to get the next X-axis point I need?

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

A question was recently asked on priority support tickets – how to to apply a Template Selector to the RolloverModifier, to display different tooltips based on series type?

We are answering the question below so that other users can benefit from it!

0 votes
12k views

Hi,
I have done everything possible, but I can’t seem to get the vertical slice modifier to appear. I have wired the function just how the ‘InspectDataPoints => Create Verticle Slices’ SciCharts Example.

Unfortunately, it just doesn’t seem to work! Nothing is popping up when I press the ‘Add Slice’ button. The only difference with the example from SciCharts is that I am using a DateTime Axis.

private void OnCreateSliceClick(object sender, RoutedEventArgs e)
        {
            MouseButtonEventHandler mouseClick = null;
            mouseClick = (s, arg) =>
            {
                this.MouseLeftButtonUp -= mouseClick;
                hintText.Visibility = Visibility.Collapsed;
                var mousePoint = arg.GetPosition((UIElement)this.sciChart.GridLinesPanel).X;

                var slice = new VerticalLineAnnotation()
                {           
                    //X1 = new DateTime(2012, 1, 7, 8, 0, 0),
                    X1 = this.sciChart.XAxis.GetDataValue(mousePoint),
                    Style = (Style)Resources["sliceStyle"]
                };

                sliceModifier.VerticalLines.Add(slice);
            };

            hintText.Visibility = Visibility.Visible;
            this.MouseLeftButtonUp += mouseClick;
        }

And then I tried changing the Date Axis using the following code

var mousePoint = arg.GetPosition((UIElement)this.sciChart.GridLinesPanel).X;
var categoryCoordCalc = sciChart.XAxis.GetCurrentCoordinateCalculator() as ICategoryCoordinateCalculator;
var dataPointIndex = (int)categoryCoordCalc.GetDataValue(mousePoint);

unfortunately, the ‘categoryCoordCalc’ value returns a null!!!

I am so stuck!! Please help me!

  • Azrin Sani asked 9 years ago
  • last active 9 years ago
1 vote
13k views

Hi,

I have a vertical slice modifier. Currently whenever a series has a point near the marker, a kind of tooltip is displayed showing th value of that series at that point. I want to turn off this tooltip functionality (not sure if its called AxisLabel, SeriesValue or something else).

Ive tried setting various properties but I’m still getting the tooltip. Can someone point me in the right direction :

               <s:VerticalSliceModifier  s:SeriesValueModifier.IsSeriesValueModifierEnabled="False" ShowAxisLabels="False" >
                                    <s:VerticalSliceModifier.VerticalLines>
                                        <s:VerticalLineAnnotation 
                                            X1="{Binding ...}" 
                                            YAxisId="DefaultYAxis" 
                                            s:SeriesValueModifier.IsSeriesValueModifierEnabled="False"
                                            ShowLabel="False"
                                            />
                                    </s:VerticalSliceModifier.VerticalLines>
                                </s:VerticalSliceModifier>  
  • F W asked 9 years ago
  • last active 8 years ago
1 vote
15k views

The VerticalSliceModifier does not seem to work with a DateTimeCategory X axis. Only the very top and the base of the line are shown and even they disappear on attempt to drag. Is slicing on DateTimeCategory Axis not supported?

The same code, taken from the official example, works well with a Numeric axis.

1 vote
17k views

I would like to show the Y values of the slice on a special panel. So far I have not yet found out how to disable the tooltips that appear next to the annotation line. I have tried to add a ToolTipOpening handler to the anntotated line, to the modifier and to the chart surface but it does not get called.

What should I do?

Showing 24 results

Try SciChart Today

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

Start TrialCase Studies