feat: single-series bar chart uses different color per category
Each bar gets a different color from the palette, making color palette changes immediately visible for all chart configurations. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
2c4b1be806
commit
f203904aa8
|
|
@ -211,10 +211,10 @@ export function buildBarOption(
|
|||
option.series = [
|
||||
{
|
||||
type: 'bar',
|
||||
data: seriesData,
|
||||
itemStyle: {
|
||||
color: style.colors[0],
|
||||
},
|
||||
data: seriesData.map((val, idx) => ({
|
||||
value: val,
|
||||
itemStyle: { color: style.colors[idx % style.colors.length] },
|
||||
})),
|
||||
label,
|
||||
},
|
||||
];
|
||||
|
|
|
|||
Loading…
Reference in New Issue