Giter Club home page Giter Club logo

Comments (4)

tannerdolby avatar tannerdolby commented on June 6, 2024 1

@ckifer Yeah, I agree this is expected behavior since we don't want any lines past the edges of the chart when using allowDataOverflow.

I think this was mainly a "want to have" because I'm mostly using line charts with allowDataOverflow on the YAxis (due to variance of some data) and customers mention the lines "looking thinner / halved" on the edges of the chart. No worries on fixes or actions at the moment, just wanted to start the conversation around this in case others were wanting something similar.

from recharts.

ckifer avatar ckifer commented on June 6, 2024 1

Cool, thanks for the context.

It might be reasonable to say "if there is an line that will be clipped horizontally in half, expand the domain slightly but cut off everything after that"

but if you had a larger strokeWidth (say 10 or something), one might not want the graph domain expanded by 5 units to accommodate the entire item. Especially if the domain starts at something like 0. Or if you had another shape/line that expanded further down under the domain minimum

from recharts.

ckifer avatar ckifer commented on June 6, 2024

I guess to me this is expected? There is a clip path and that clip path is at the edge of the chart - if there is a line exactly at that edge it will clip half of the line.

We will have a conundrum if some people want things clipped and some do not.

This might be a start of a larger conversation around what allowDataOverflow actually does and how things are affected based on other settings. I don't really have any great answers or quick fixes at the moment though

from recharts.

tannerdolby avatar tannerdolby commented on June 6, 2024

No problem, thank you for taking a look.

It might be reasonable to say "if there is an line that will be clipped horizontally in half, expand the domain slightly but cut off everything after that"

Exactly this. Lines on the edges should be fully visible (no longer clipped in half) from the slightly expanded domain and lines that actually cross the edges due to data points going out the top or bottom of the graph should still be clipped/hidden because they will potentially be "behind" the lines strokeWidth directly on the edges and then cut off everything after that.

Ya, that's a good point about larger strokeWidths. Definitely agree there should be a limit or rules where this domain expanding doesn't always happen if the strokeWidth is greater than some value.

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.