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

Labels don't show up for input type="range" #87

Closed
Casyfill opened this issue May 20, 2018 · 4 comments
Closed

Labels don't show up for input type="range" #87

Casyfill opened this issue May 20, 2018 · 4 comments

Comments

@Casyfill
Copy link

here is the example I was working on

{
  "$schema": "https://vega.github.io/schema/vega/v3.json",
  "width": 400,
  "height": 200,
  "padding": 5,
  "data": [
    {
      "name": "table",
      "values": [
        {"category": "A", "amount": 28},
        {"category": "B", "amount": 55},
        {"category": "C", "amount": 43},
        {"category": "D", "amount": 91},
        {"category": "E", "amount": 81},
        {"category": "F", "amount": 53},
        {"category": "G", "amount": 19},
        {"category": "H", "amount": 87}
      ]
    }
  ],

  "signals": [
    {"name":"test",
   "value":1,
   "bind":{
     "type":"range",
     "max":10,
     "min":1,
     "step":1
   }} 
  ],

  "scales": [
    {
      "name": "xscale",
      "type": "band",
      "domain": {"data": "table", "field": "category"},
      "range": "width",
      "padding": 0.05,
      "round": true
    },
    {
      "name": "yscale",
      "domain": {"data": "table", "field": "amount"},
      "nice": true,
      "range": "height"
    }
  ],

  "axes": [
    { "orient": "bottom", "scale": "xscale" },
    { "orient": "left", "scale": "yscale" }
  ],

  "marks": [
    {
      "type": "rect",
      "from": {"data":"table"},
      "encode": {
        "enter": {
          "x": {"scale": "xscale", "field": "category"},
          "width": {"scale": "xscale", "band": 1},
          "y": {"scale": "yscale", "field": "amount"},
          "y2": {"scale": "yscale", "value": 0}
        },
        "update": {
          "fill": {"value": "steelblue"}
        },
        "hover": {
          "fill": {"value": "red"}
        }
      }
    }
  ]
}

@domoritz
Copy link
Member

I see this:

screen shot 2018-05-20 at 14 38 08

@Casyfill
Copy link
Author

Casyfill commented May 20, 2018

yes; slider on my homebrewed app has a label on the right:

screenshot 2018-05-20 17 47 30

@domoritz
Copy link
Member

@Casyfill
Copy link
Author

Casyfill commented May 21, 2018

hm, then it is probably tweaked by my normalize.css? Sorry for the false alarm then. It would be awesome to be able to edit those labels from the specs in the future versions...

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