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

XY-chart should default to 0 being the origin #5618

Open
RichardJECooke opened this issue Jul 2, 2024 · 0 comments
Open

XY-chart should default to 0 being the origin #5618

RichardJECooke opened this issue Jul 2, 2024 · 0 comments
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@RichardJECooke
Copy link

Description

This is a statistical bug, not a code bug.

Charts should always have 0 as the origin except under extremely rare circumstances. Having the Y-axis default to the range of the chart values, instead of starting from zero, completely visually misrepresents the difference between series.

The example chart should be changed too - https://mermaid.js.org/syntax/xyChart.html

Steps to reproduce

Dark anti-pattern stats:

xychart-beta
    title "Non-blank lines of code per SDK"
    x-axis [OG, SE]   
    bar [6722, 3316]
Loading

Honest stats:

xychart-beta
    title "Non-blank lines of code per SDK"
    x-axis [OG, SE]
    y-axis 0 --> 6722
    bar [6722, 3316]
Loading

Screenshots

No response

Code Sample

xychart-beta
    title "Non-blank lines of code per SDK"
    x-axis [OG, SE]   
    bar [6722, 3316]


```text
xychart-beta
    title "Non-blank lines of code per SDK"
    x-axis [OG, SE]
    y-axis 0 --> 6722
    bar [6722, 3316]


### Setup

- Mermaid version:
- Browser and Version: [Chrome, Edge, Firefox]

### Suggested Solutions

_No response_

### Additional Context

_No response_
@RichardJECooke RichardJECooke added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect
Projects
None yet
Development

No branches or pull requests

1 participant