Pre loader

DataPointSelectionModifier

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
0

We’re currently using the DataPointSelectionModifier which works great, however, we need some slight tweaks to it’s behaviour

  • The ability to disable marquee selection on demand (whilst still being able to multi select points by clicking each point)
  • Swap the Ctrl/Shift key combos

I was wondering if the source for the DataPointSelectionModifier could be made available for people to adapt to suit their needs? else it means trying to create it from scratch.

Perhaps you could post it in an area that only customers could access?

Version
7.0.2.27161
  • You must to post comments
1
0

Good questions

Making the modifier source open is not a problem however splitting up packages in the library is the challenge here – sharing or open sourcing the modifiers without making it a breaking change and managing versioning for maintenance.

If you set the property DataPointSelectionModifier.AllowsMultiSelection = false this will disable both rectangle and ctrl multi select.

Next, you will need to override GetSelectionMode() to change the behaviour.

    // Inherit DataPointSelectionModifier & override GetSelectionMode
   // This is OUR implementation
    protected virtual SelectionMode GetSelectionMode(MouseModifier modifierKey, bool isAreaSelection)
    {
        var selectionMode = SelectionMode.Replace;

        // Remove this if block 
        if (!AllowsMultiSelection)
        {
            return selectionMode;
        }

       // Change behaviour here to return SelectionMode.Union, Inverse or Replace depending on what you want
        if (modifierKey == MouseModifier.Ctrl)
        {
            selectionMode = isAreaSelection ? SelectionMode.Union : SelectionMode.Inverse;
        }
        else if (modifierKey == MouseModifier.Shift)
        {
            selectionMode = SelectionMode.Inverse;
        }

        return selectionMode;
    }

So long as the above returns SelectionMode.Union, even if AllowsMultiSelection is false, the modifier should let you CTRL click multiple points.

Does this help?

Best regards,
Andrew

  • You must to post comments
1
0

Thank you Andrew, I’ll give that a shot.

If it is tricky to make the live version opensource, maybe you could just opensource the current version as it stands now as copy into an example project (i.e so you don’t have to maintain it), it would still be super helpful to understand how everything hooks up.

  • You must to post comments
0
0

Hi Ben,

Thanks for your inquiry.
Let me suggest you considering the upgrade to the source code license type.
It will give you the full access to SciChart sources.

For more details, you can contact our Sales here:
https://www.scichart.com/contact-us/

Or email us at [email protected]

With best regards,
Lex
SciChart Technical Support Engineer

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.