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

Read bandSize config if the scale does not exist #1286

Merged
merged 2 commits into from
Apr 10, 2016
Merged

Read bandSize config if the scale does not exist #1286

merged 2 commits into from
Apr 10, 2016

Conversation

kanitw
Copy link
Member

@kanitw kanitw commented Apr 6, 2016

Fix #1244

Now the following no longer throws error

{
  "data": {"url": "data/cars.json"},
  "mark": "point",
  "encoding": {
    "x": {"field": "Horsepower","type": "quantitative"},
    "size": {"field": "Origin","type": "ordinal"}
  }
}

@domoritz
Copy link
Member

domoritz commented Apr 6, 2016

Can you write a test for pointBandSize?

@kanitw
Copy link
Member Author

kanitw commented Apr 6, 2016

Sounds like a task for our junior colleagues :)

// TODO: X
});

describe('y', function() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is testing the right thing. We should test what happens if there is only x and x and y.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's irrelevant for rangeMixins().

rangeMixins() of x and y scales are independent.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay. Maybe I'm missing the point of this fix then. I thought this pr fixes the issue that we don't have a scale when we only define an x scale because a spec only defines y.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see. That case is size's scale, not x, y scale, and thus should be in line 422.

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

Successfully merging this pull request may close these issues.

2 participants