I don't think I understand. This function is just a way of reporting statistical results that you have already calculated. So it's up to you to do your stats appropriately if your groups have different sizes.
Look through the examples, it should be clear(ish). You manually choose the x values want and tell it to draw the bar across those positions. This is pretty much the only way of doing it since there's no way for the function to know which locations you want to link. It can't know this because it doesn't know the structure of your data.