Yes, this can be done by setting a time unit on the x encoding and sorting by the fiscal year month. Here's an example with stock data:
import altair as alt
import polars as pl
from vega_datasets import data
source = data.stocks()
df = pl.DataFrame(source).filter(
pl.col("symbol") == "AAPL",
).with_columns(
fy=pl.col("date").dt.year() - pl.when(pl.col("date").dt.month() <= 3).then(1).otherwise(0),
fy_month=pl.col("date").dt.month() - 3 + pl.when(pl.col("date").dt.month() <= 3).then(12).otherwise(0)
).filter(
pl.col("fy").is_in([2004, 2005, 2006])
)
alt.Chart(df).mark_bar().encode(
x=alt.X("date:O", timeUnit="month", sort=alt.EncodingSortField("fy_month")),
xOffset=alt.XOffset("fy:N"),
y="mean(price)",
color=alt.Color("fy:N")
).properties(width=400)