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

change auto conversion of text to number on x axis (current is misleading) #7031

Open
zurferr opened this issue Jun 19, 2024 · 0 comments
Open
Labels
feature something new P3 not needed for current cycle

Comments

@zurferr
Copy link

zurferr commented Jun 19, 2024

I found this somewhat related issue (it's about dates).

When I pass the following data with 5 rows. I get a visualization with 2 bars.

{
  "data": [
    {
      "alignmentgroup": "True",
      "hovertemplate": "Line Code=%{x}<br>Score=%{y}<extra></extra>",
      "legendgroup": "",
      "marker": {
        "color": "#eb7a2e",
        "pattern": {
          "shape": ""
        }
      },
      "name": "",
      "offsetgroup": "",
      "orientation": "v",
      "showlegend": false,
      "textposition": "auto",
      "x": [
        "1710",
        "700",
        "N1700",
        "N1710",
        "N700"
      ],
      "xaxis": "x",
      "y": [
        -77.308,
        8.893,
        -24.069,
        -60.96,
        -9.385
      ],
      "yaxis": "y",
      "type": "bar"
    }
  ],
  "layout": {
    "barmode": "relative",
    "legend": {
      "tracegroupgap": 0
    },
    "title": {
      "text": "Scores per Line"
    },
    "xaxis": {
      "anchor": "y",
      "domain": [
        0,
        1
      ],
      "title": {
        "text": "Line Code"
      }
    },
    "yaxis": {
      "anchor": "x",
      "domain": [
        0,
        1
      ],
      "rangemode": "tozero",
      "title": {
        "text": "Score"
      }
    },
    "template": {
      "layout": {
        "colorway": [
          "#eb7a2e",
          "#f7b62a",
          "#1fa5de",
          "#57bebe",
          "#7f7977",
          "#b1a898",
          "#5e4a86",
          "#8e80b9",
          "#4a4c51",
          "#8a8b94"
        ],
        "font": {
          "color": "#212121",
          "family": "Inter, sans-serif",
          "size": 12
        },
        "hovermode": "closest",
        "margin": {
          "b": 70,
          "l": 70,
          "r": 70,
          "t": 80
        },
        "paper_bgcolor": "#FFFFFF",
        "plot_bgcolor": "#FFFFFF",
        "title": {
          "font": {
            "size": 18
          },
          "x": 0.02,
          "xanchor": "left",
          "y": 0.93
        },
        "xaxis": {
          "automargin": true,
          "gridcolor": "#f2f2f2",
          "linecolor": "#d9d9d9",
          "showgrid": false,
          "zeroline": true,
          "zerolinecolor": "#d9d9d9"
        },
        "yaxis": {
          "automargin": true,
          "gridcolor": "#f2f2f2",
          "linecolor": "#d9d9d9",
          "showgrid": true,
          "zeroline": true,
          "zerolinecolor": "#d9d9d9"
        },
        "yaxis2": {
          "showgrid": false
        }
      }
    }
  }
}

grafik

I understand that I can pass an option for the category, but I would rather:

  • have it fail, because it can't display all data
  • not do the conversion by default
@gvwilson gvwilson self-assigned this Jul 12, 2024
@gvwilson gvwilson removed their assignment Aug 2, 2024
@gvwilson gvwilson changed the title plotly misleading auto conversion of text to number on x axis misleading auto conversion of text to number on x axis Aug 9, 2024
@gvwilson gvwilson changed the title misleading auto conversion of text to number on x axis change auto conversion of text to number on x axis (current is misleading) Aug 9, 2024
@gvwilson gvwilson added feature something new P3 not needed for current cycle labels Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature something new P3 not needed for current cycle
Projects
None yet
Development

No branches or pull requests

2 participants