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

theta encoding wrong for text mark #9392

Open
ondave opened this issue Jul 23, 2024 · 1 comment
Open

theta encoding wrong for text mark #9392

ondave opened this issue Jul 23, 2024 · 1 comment
Labels

Comments

@ondave
Copy link

ondave commented Jul 23, 2024

When using a text mark with theta ordinal encoding, the values get wrapped back onto the start rather than distributed evenly around the circle.

Example:

{
  "data":{
    "values":[
      {"quadrant":"N"},
      {"quadrant":"E"},
      {"quadrant":"S"},
      {"quadrant":"W"}
    ]
  },
  "encoding": {
    "theta":{
          "field":"quadrant",
          "type":"ordinal",
          "sort":null
        },
    "text":{
          "field":"quadrant", 
        }
  },
  "layer": [
    {
      "mark": {
        "type": "text",
        "radius":50
      }
    }
  ]
}

visualization (5)

However, this example for an arc mark give 4 equal segments as expected:

{
  "data":{
    "values":[
      {"quadrant":"N"},
      {"quadrant":"E"},
      {"quadrant":"S"},
      {"quadrant":"W"}
    ]
  },
  "encoding": {
    "theta":{
          "field":"quadrant",
          "type":"ordinal",
          "sort":null
        },
    "text":{
          "field":"quadrant", 
        }
  },
  "layer": [
    {
      "mark": {
        "type": "arc",
        "radius":50
      }
    }
  ]
}

visualization (7)

@PBI-David
Copy link
Contributor

The first generates a point scale and the second a band scale for some reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants