You can consider to create it as a simple stacked bar chart. You can leave some bars as empty by using NoValue as the data, and set their corrresponding x-axis label as empty by using "~" as the label. This empty position becomes the gap between bars.
I notice the gap seems to have a different background color from the bar positions. This can be achieved by adding a vertical zone (see XYChart.addZone) at the gap positions.
For the texts at the top, I would add it using custom textboxes (BaseChart.addText), configured to have the proper size and position (see Box.setSize).
Yes, just use BaseChart.addText to add the text at the top as mentioned in my previous message.
The y-coordinates is the top of the plot area, which your code already knows. For the x-coordinate, if you have 50 x-axis positions, and the plot area width is 500 pixels, then each position must occupy 500 / 50 = 10 pixels. So the x-coordinates can also be determined without drawing the image.