Pre loader

Tag: Selection

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

Hi there,

I am currently evaluating SciChart for use within a new piece of software we are developing. One important feature that we need to provide is to be able to draw a polygon and determine which points are contained within it. Then the colour, visibility, etc of these points can be changed. I can see from your documentation that this could be achieved by creating a custom chart modifier to draw lines that make up the shape and then implement my own algorithm to determine which points are contained within it. Before I embark on this route, could you tell me if I have missed any implementation that already exists? Will the drawn polygon zoom and pan with the graph, therefore enclosing the same points?

Kind Regards,

Kathryn

1 vote
15k 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?

2 votes
11k views

Hi,
I am currently trying the iOS Charting Library and want to implement a Column series with the drill-down functionality (when touching one of column points by end user). Does the charting component supports the hit-testing or selection feature to determine which point has been clicked at runtime?
Thanks!
Liza

  • liza yudup asked 8 years ago
  • last active 7 years ago
0 votes
11k views

Hello,

Is there a mechanism for binding, in a two way fashion, the collection of Selected points when using the IPointmetadata mechnism?

Basically, I have a view which contains a table (DevExpress Datagrid) and a SciChart plot, where all of the rows are plotted on a line series. When the user highlights a row or rows in the table, the appropriate points should be selected on the graph. Also, if the user selects the points on the graph, the rows should be selected in the table. Ideally, I would like to bind each view’s SelectedRows (or SelectedPoints) to a common ObservableCollection.

The trouble I am seeing is that the two views use different paradigms to represent Selected-ness. The point is only selectable if it is given an object that implements IPointMetadata, and its selection state is represented by the BizObjectViewModel’s IsSelected property. The selection state in the table is represented by its presence in the SelectedRows collection.

No opinions as to which is better, I am simply trying to get the two to work together nicely. OnCollectionChanged of the bound SelectedRows is a great place for me to set/unset IsSelected for the affected object, and the chart reacts:

switch (e.Action)
        {
            case System.Collections.Specialized.NotifyCollectionChangedAction.Add:
                foreach (var p in e.NewItems.Cast<SolverDetailRow>())
                {
                    p.IsSelected = true;
                }
                break;
            case System.Collections.Specialized.NotifyCollectionChangedAction.Remove:
                foreach (var p in e.OldItems.Cast<SolverDetailRow>())
                {
                    p.IsSelected = false;
                }
                break;
            case System.Collections.Specialized.NotifyCollectionChangedAction.Replace:
                break;
            case System.Collections.Specialized.NotifyCollectionChangedAction.Move:
                break;
            case System.Collections.Specialized.NotifyCollectionChangedAction.Reset:
                foreach (var row in SolverRows)
                {
                    foreach (var detRow in row.Observations)
                    {
                        detRow.IsSelected = false;
                    }
                }
                break;
            default:
                break;
        }

However, I can’t find the best place to update the collection when the chart updates the IsSelected property itself. The BizObjectViewModel won’t (and shouldn’t) know about the collection he is in. Right now I am using a Messenger model from DevExpress to notify anyone who cares that the IsSelected property has changed:

private bool _isSelected;
    public virtual bool IsSelected
    {
        get { return _isSelected; }
        set
        {
            if (value != _isSelected)
            {
                _isSelected = value;
                RaisePropertyChanged("IsSelected");
                Messenger.Default.Send(new PointSelectionChangedMessage() { Object = this });
                Messenger.Default.Send(new ChartRefreshRequestedMessage());
            }
            _isSelected = value;
        }
    }

This at least decouples the view model from knowing about the collection, but it kind of muddies the Viewmodel with piping that seems superfluous. It would be nice if I could bind the DataPointSelectionModifier’s SelectedPoints to the same collection that the table is bound to, but it appears that this is Readonly.

Am I missing something? I suppose I can extend the DataPointSelectionModifier to provide something, but I am hoping I am overlooking a feature…

Thanks for your time,
Mike.

1 vote
10k views

Hello,

I have the need to be able to select a single column or a set of columns from either a FastColumnRenderableSeries or a StackedColumnRenderableSeries.

Is there an out-of-the-box way to do this?

If negative, could you provide me some guidance as to what I could do?

Thank you.

Kind regards,
Sebastian

1 vote
10k views

Hi,

I would like to ask if there is any easy way to select distict time intervals.
I have thought of creating vertical slices on mouse down and up events,
and highlighting the surface between the slices. Is there an easier way
to do this?

Thanks,
Chris

0 votes
8k views

I have several BandRenderableSeriesViewModel in my chart that the user can click on to select. The issue is that they pop up into the foreground when selected and hide everything else that is now behind them. Is there a way to keep them where they are upon selection?

0 votes
7k views

When I select a series/plot, I would like to identify where it came with more than just the Name member. How can I do that?

Background:
I have a list of unsigned integer values taken from a data logger. I bundle the values up in a class with some other information, such as the name of the sample and an ID string.

Since I can’t data bind to the logged samples as-is, I convert them to a SciChart friendly “LineRenderableSeriesViewModel” and add them to a list of “ObservableCollection” that I data bind to a SciChart.

ViewModel.cs:

// Where "loggedSamples" is a SamplesContainer 
//class SamplesContainer
//{
//    public string Name;
//    public string ID;  **<=== I want to get this somehow when I select something**
//    public Uint16 data {get;set;}
//}

// Convert Samples => XyDataSeries => LineRenderableSeriesViewModel

SamplesContainer loggedSamples = GetLoggedSample();
XyDataSeries<double, double> xySeries = ConvertSamplesToXyDataSeries(loggedSamples);
xySeries.SeriesName = loggedSamples.Name;

LineRenderableSeriesViewModel lineSeries = new LineRenderableSeriesViewModel() {
    DataSeries = xySeries, StyleKey = "LineStyle", Stroke = Colors.Blue };

RenderableSeriesViewModelForChannels.Add(lineSeries);

MainWindow.xaml:

   <s:SciChartSurface Name="sciChartItemView" Grid.Column="2"
    AllowDrop="True"
    DragDrop.Drop="sciChartItemView_Drop"
    DragDrop.DragEnter="sciChartItemView_DragEnter"
    MinHeight="80"
    s:ThemeManager.Theme="BrightSpark"  
    RenderableSeries="{s:SeriesBinding RenderableSeriesViewModelForChannels}"
    ViewportManager="{Binding SampleSetViewMod.ViewportManager}"                                                                           
    DebugWhyDoesntSciChartRender="True"
    s:SciChartGroup.VerticalChartGroup="sharedYAxisWidth"
    >

    <s:SciChartSurface.XAxis>
        <s:NumericAxis   
        DrawMajorGridLines="True"
        DrawMinorGridLines="False"
        DrawMajorBands="False"  
        VisibleRange="{Binding SampleSetViewMod.SharedXVisibleRange, Mode=TwoWay}"
        Visibility="Hidden" 
        TextFormatting="0.######"/>
    </s:SciChartSurface.XAxis>

    <s:SciChartSurface.YAxis>
        <s:NumericAxis AxisAlignment="Left"
        DrawMajorGridLines="False"
        DrawMinorGridLines="False"
        DrawMajorBands="False"
        Visibility="Visible">
            <s:NumericAxis.GrowBy>
                <s:DoubleRange Min="0.1" Max="0.1" />
            </s:NumericAxis.GrowBy>
        </s:NumericAxis>

    </s:SciChartSurface.YAxis>

    <s:SciChartSurface.ChartModifier>
        <s:ModifierGroup>
            <s:ZoomExtentsModifier XyDirection="YDirection"/>

            <s:ZoomPanModifier ExecuteOn="MouseMiddleButton" XyDirection="XYDirection" ClipModeX="ClipAtExtents" />

            <local:ExtendedMouseWheelZoomModifier />

            <s:RubberBandXyZoomModifier IsEnabled="True"
                IsXAxisOnly="False"
                ReceiveHandledEvents="True" />
            <s:LegendModifier ShowLegend="True" Orientation="Vertical" Margin="10"
                GetLegendDataFor="AllSeries"
                ShowVisibilityCheckboxes="False" 
                HorizontalAlignment="Right"
                LegendPlacement="Inside"
                Background="White"
                />

            <local:ExtendedSeriesSelectionModifier SelectionChanged="SeriesSelectionModifier_OnSelectionChanged">
                <local:ExtendedSeriesSelectionModifier.SelectedSeriesStyle>
                    <Style TargetType="s:FastLineRenderableSeriesForMvvm">
                        <Setter Property="StrokeDashArray" Value="10,5"/>
                    </Style>
                </local:ExtendedSeriesSelectionModifier.SelectedSeriesStyle>
            </local:ExtendedSeriesSelectionModifier>


            <!--<s:CursorModifier x:Name="cursorModifier" IsEnabled="True" />
        <s:RolloverModifier x:Name="rolloverModifier" IsEnabled="True"/>-->
        </s:ModifierGroup>
    </s:SciChartSurface.ChartModifier>
</s:SciChartSurface>
0 votes
6k views

Greetings!

I am interested in drawing lines segments/cylinders on a WPF 3D plot in a manner that allows them to be selected or allow hit testing. I have looked at:

1) Selecting a vertex on a SciChart3DSurface, but I need to select the line
2) Drawing CylinderPointMarker3D’s but I need to set the length of each one

These lines only need to be drawn in the XY, XZ, and YZ planes so I have thought about using the ImpulseRenderableSeries3D but I need to control where the line segments start and end – and this doesn’t look like it allows control of the start.

Any ideas?

–Jonathan

2 votes
6k views

Hi ,

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

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

Best Regards.

1 vote
0 answers
2k views

I have issues with the selection box of the textannotation in firefox.

Code for the annotation:

    return new TextAnnotation({
    id,
    text: text,
    verticalAnchorPoint: EVerticalAnchorPoint.Center,
    horizontalAnchorPoint: EHorizontalAnchorPoint.Left,
    xCoordinateMode: ECoordinateMode.DataValue,
    yCoordinateMode: ECoordinateMode.DataValue,
    x1: x1,
    y1: y1,
    fontSize: 16,
    fontWeight: "Bold",
    textColor: annotation.color,
    isEditable: isEditable,
    annotationLayer: EAnnotationLayer.AboveChart
})

Please see the differences in the images attached. In the Firefox browser it seems that the svg takes on the size of the scichart surface. Can you help me to fix this problem? The parameters selectionBoxDelta and selectionBoxThickness work in both browsers but do not fix the problem.

Thank you.

Showing 11 results

Try SciChart Today

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

Start TrialCase Studies