I have:
Y X
1 1
1 0
1 1
2 1
2 0

I want to have a bar graphs that displays two bars for each value of Y variable, displaying percentage of X=1 for each category.

graph bar (percent) X, over(Y) produces this (not sure what the utility of that is):
1 60%
2 40%

graph bar X, over(Y) produces this:
1 0.67
2 0.5

I cannot find out how to make what I want:
1 67%
2 50%

Is there a clear and easy way to do that with bar graph command without creating any more variables?