You can define multiple custom themes by adding extra keys to the themes object in PolarisVizProvider. Each key acts as a unique theme name. To use a specific theme on a chart, pass the corresponding name to the chart's theme prop.
<PolarisVizProvider
themes={{
AngryRed: {
seriesColors: {
single: ['black'],
},
chartContainer: {
backgroundColor: '#ff0025',
},
},
HappyGreen: {
seriesColors: {
single: ['black'],
},
chartContainer: {
backgroundColor: '#00ff64',
},
},
}}
>
<SparkLineChart series={...} theme='AngryRed'/>
<SparkLineChart series={...} theme='HappyGreen'/>
</PolarisVizProvider>