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

fix: FunctionSeries #380

Merged
merged 6 commits into from
Apr 10, 2022
Merged

Conversation

wadjih-bencheikh18
Copy link
Member

@wadjih-bencheikh18 wadjih-bencheikh18 commented Apr 8, 2022

closes : #377
closes : #378
fixes : #379
closes : #385

@netlify
Copy link

netlify bot commented Apr 8, 2022

Deploy Preview for react-plot ready!

Name Link
🔨 Latest commit 6d6b945
🔍 Latest deploy log https://app.netlify.com/sites/react-plot/deploys/625043ffac78c40008deb313
😎 Deploy Preview https://deploy-preview-380--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.

@wadjih-bencheikh18
Copy link
Member Author

wadjih-bencheikh18 commented Apr 8, 2022

The problem now with FunctionSeries after these changes is that we have to specifie max,min of vertical axis too

Implementation detail:
how FunctionSeries work?
it take max/ min from horizantal axis if this latter exist and draw lineSeries in [min, max] domain

to specifie max / min we need to either:

  • axis max, min props
  • or add another series => axis will calculate automatically max, min

=> logically we need just to specifie max /min of horizontal axis to draw it .
but the problem is When Plot is empty

<Plot {...DEFAULT_PLOT_CONFIG}>
      <FunctionSeries
        getY={getY}
      />
      <Axis
        min={0}
        max={20}
        position="bottom"
      />
      <Axis position="left"/>
</Plot>

=> vertical axis domain is not defined => no horizantal axis

image

@targos
Copy link
Member

targos commented Apr 8, 2022

I hope the above will also be fixed with #316

@targos
Copy link
Member

targos commented Apr 8, 2022

The new story updates infinitely and crashes. Is that expected?

@wadjih-bencheikh18
Copy link
Member Author

wadjih-bencheikh18 commented Apr 9, 2022

@targos here i made simple solution but not the best ,
i just added ~ in functionSeries id so it won't be considered while calculating Max, Min

@targos targos merged commit 786bc3d into zakodium-oss:main Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants