Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linking 2D and 3D charts #208

Open
Bobby-88 opened this issue Apr 1, 2024 · 1 comment
Open

Linking 2D and 3D charts #208

Bobby-88 opened this issue Apr 1, 2024 · 1 comment

Comments

@Bobby-88
Copy link

Bobby-88 commented Apr 1, 2024

Hello. I'm working on a visualization of flight trajectories and i would like to have a view with 1 big 3D view for trajectory visualization and several smaller 2d graphs for different scalar values.
I've selected SciChart as i like it's "techy" look and i am believer of wasm for such applications.

Now everything works great, but I would like to implement a sync between 2d chart and 3d chart. You have this functionality between 2D and 2D charts via new RolloverModifier({modifierGroup: "group1"}) but i don't see how to do that between 2D and 3D. I understand you will not develop it just because i'm asking - and that makes total sense. However, i want to ask you on the possible way forward: here are the options as i see them:

  1. programatically reading which point you have selected in 2d chart and programatically setting it on 3d chart.
    2.programatically reading which point you have selected in 3d chart and programatically setting it on 2d chart.

i've found some :TODO in your examples here
Examples/Charts2D/TooltipsAndHittest/DatapointSelection/index.tsx
which suggests there may be a way to do this...
I'll appreciate your response.

@antichaosdb
Copy link
Contributor

Sorry for not spotting this earlier. Send questions to [email protected] for quickest replies.

You are right that modifier sync between 2D and 3D charts does not just work. This is because they use separate wasm instances so you cannot do the kind of low level data sharing that is possible between 2D charts. However, doing this programmatically via the hitTest api is definitely possible. Docs at https://www.scichart.com/documentation/js/current/webframe.html#Hit-Test%20API.html. HitTest for 3D is fairly new and not well documented yet, but the api is basically the same was as in 2D. As such both options 1 and 2 are possible.

The suggested approach is to wrap your hitTesting in a custom modifier (https://www.scichart.com/documentation/js/current/webframe.html#CustomChartModifierAPI.html) rather than adding extra even subscriptions to the canvas. SciChart handles all those events internally and deals with cleaning up after.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants