zakodium-oss / react-plot

Library of React components to render SVG 2D plots. You can check the story book https://react-plot.pages.dev/ or have a look to the extensive documentation
https://react-plot.zakodium.com
MIT License
12 stars 6 forks source link

fix: no default axis hooks bug #424

Closed wadjih-bencheikh18 closed 2 years ago

wadjih-bencheikh18 commented 2 years ago

closes : https://github.com/zakodium-oss/react-plot/issues/423

netlify[bot] commented 2 years ago

Deploy Preview for react-plot ready!

Name Link
Latest commit a31c862b78373581db1181a2108b4cf5050f97f5
Latest deploy log https://app.netlify.com/sites/react-plot/deploys/62bae2aec439bd0008e85adc
Deploy Preview https://deploy-preview-424--react-plot.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

targos commented 2 years ago

Do we already have a story with this case? If not, can you add one?

wadjih-bencheikh18 commented 2 years ago

Do we already have a story with this case? If not, can you add one?

the problem is in https://github.com/zakodium-oss/analysis-ui-components/pull/166

https://deploy-preview-166--analysis-ui-components.netlify.app/storybook/?path=/story/layout-measurementexplorer--control choose xVariable : "t"

wadjih-bencheikh18 commented 2 years ago

i will try to create a story with the problem

wadjih-bencheikh18 commented 2 years ago

@targos story added

targos commented 2 years ago

How can I reproduce the problem with the story? I tried to add a log when the value is undefined but nothing happens.

targos commented 2 years ago

I think it would be better to show the bug with a very simple story instead of this one.

wadjih-bencheikh18 commented 2 years ago

I think it would be better to show the bug with a very simple story instead of this one.

the problem happend while changing the data after the plot loaded so i added a story where u can change horizantal and vertical variables

wadjih-bencheikh18 commented 2 years ago

the bug always happend if we revert this modification https://github.com/zakodium-oss/react-plot/pull/424/commits/2aac5826cb1cd4373d0c2cfe1eafccc6709185b4

targos commented 2 years ago

But for me this is not the correct fix. The crosshair doesn't work as expected.

wadjih-bencheikh18 commented 2 years ago

But for me this is not the correct fix. The crosshair doesn't work as expected.

Sorry, i didn't notice that,I will check

wadjih-bencheikh18 commented 2 years ago

@targos i found the problem and fix it the thing that hooks were not genralized to use with no default axis variables

targos commented 2 years ago

Vertical zoom doesn't work (it's horizontal), but apart from that, good job! https://deploy-preview-424--react-plot.netlify.app/?path=/story/examples-measurement--measurement&args=xAxis:a;yAxis:t;hook:Vertical+Zoom

wadjih-bencheikh18 commented 2 years ago

Vertical zoom doesn't work (it's horizontal)

Sorry about that , it's fixed now