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

Adding cartesian lines for X and Y that goes through the zero / origin point #2459

Closed
OmerMessing opened this issue Nov 12, 2023 · 1 comment

Comments

@OmerMessing
Copy link

OmerMessing commented Nov 12, 2023

Is your feature request related to a problem? Please describe.
I couldn't find a solution for this seemingly simple problem, I want the X and Y lines like in a cartesian system (that runs through the [0,0] point) to be displayed on the Line graph.

Describe the solution you'd like
Just a simple way to draw the X and Y lines.

Describe alternatives you've considered
I've looked a lot but couldn't find a good one.

@OmerMessing OmerMessing changed the title Adding a cartesian lines for X and Y that goes through the zero / origin point Adding cartesian lines for X and Y that goes through the zero / origin point Nov 12, 2023
@plouc
Copy link
Owner

plouc commented Nov 20, 2023

You can use the theme to show the axes line, something like this:

const theme = {
  axis: {
    domain: {
      line: {
        stroke: "#777777",
        strokeWidth: 1
      }
    }
  }
};

You can see an example of this applied to a bar and line chart here.

Screenshot 2023-11-21 at 8 40 11

@plouc plouc closed this as completed Nov 20, 2023
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