resolve_scale() controls whether scales are shared or independent across composed Altair charts. Independent scales let each chart component use its own color, x, and y domains. section 9.2.1
Independent scales in a visualized roadmap
Apply the method after composing the context, main chart, annotation, image, rectangles, lines, and labels: chart = ((context | (chart + annotation + img)) & (rect + line + text))\n .resolve_scale(color='independent', x='independent', y='independent') This lets the dogs-and-cats data story combine components with different scale requirements. 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 composition and its resolve_scale() call in the final chart listing. section 9.2.1
