An independent scale resolves a visualization scale separately for each component of a composed chart. This prevents layered or concatenated views from being forced onto shared x, y, or color scales. section 9.2.1
Applying independent scales in Altair
After combining context, annotations, an image, rectangles, lines, and labels, call resolve_scale(color='independent', x='independent', y='independent'). The resulting chart saves as an HTML file. section 9.2.1
Listing 9.6 Building the final chart
chart = ((context | (chart + annotation + img)) & (rect + line + text)
).configure_view(
strokeWidth=0
).resolve_scale(
color='independent',
x='independent',
y='independent'
).configure_axis(
grid=False
)
chart.save('pets-visualized-roadmap.html')
Inspect the complete composed-chart configuration, including independent color, x, and y scales. section 9.2.1
