Giter Site home page Giter Site logo

Negative interval number about recharts HOT 5 OPEN

Kaiyrgali avatar Kaiyrgali commented on May 29, 2024
Negative interval number

from recharts.

Comments (5)

ckifer avatar ckifer commented on May 29, 2024 1

That helps, thanks!

The problem is that this was undocumented behavior that the current maintainers didn't know existed and it wasn't in any test cases. Not allowing a negative number makes sense logically, so that's what was done.

We should give a way back to you to accomplish the same end result if possible

@nikolasrieble any thoughts on this?

from recharts.

ckifer avatar ckifer commented on May 29, 2024

@Kaiyrgali previous to what, can you give more details? What version did this happen in, what version are you using?

Can you create a codesandbox example of what you had that worked, vs what does not work now?

from recharts.

Kaiyrgali avatar Kaiyrgali commented on May 29, 2024

@ckifer The problem probably starts with a pull request #3392

For example, in recharts version "2.0.6" the Y axis is thinned out with negative interval values
https://codesandbox.io/p/sandbox/recharts-negative-interval-v-2-0-6-k23tw4

image
image

The latest version already has a problem
https://codesandbox.io/p/sandbox/recharts-problem-negative-interval-v-2-12-4-mq5tl9

image
image

from recharts.

nikolasrieble avatar nikolasrieble commented on May 29, 2024

Thank you for reporting this. I likely introduced the bug some time earlier.
Admittedly, I am surprised that this ever worked, because it contradicts my understanding of the functionality. The interval is supposed to be the amount of ticks left out.

interval = 1 --> Every second tick is shown. 
interval = 0 --> Every tick is shown. 

In this mental model, I do not understand what a negative interval means.
How would you expect it to work?

What would the difference be between

interval = -1 --> ? 
interval = -2 --> ? 

from recharts.

Kaiyrgali avatar Kaiyrgali commented on May 29, 2024

interval = -1 all ticks were hidden
interval = -2 and further, some ticks were hidden according to some strange logic

from recharts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.