Describe the bug
When toggling type between stacked and stacked100 using a ternary prop (as recommended by the Evidence best practices doc), the stacked100 mode renders incorrectly: the Y axis displays raw values (in millions) instead of 0–100%, and all series collapse to a single color. The correct way to work around this is to use {#if}/{:else} blocks, which forces a full component remount.
Steps to Reproduce
- Create a BarChart with stacked type and a series prop
- Add a toggle (ButtonGroup or Dropdown) to switch between
"stacked" and "stacked100"
- Use a ternary to change the type prop:
type={inputs.mode === 'pct' ? 'stacked100' : 'stacked'}
- Switch to "stacked100" mode
Minimal reproducible example : See attached md
bug.md
Logs
System Info
Severity
annoyance
Additional Information, or Workarounds
No response
Describe the bug
When toggling type between stacked and stacked100 using a ternary prop (as recommended by the Evidence best practices doc), the stacked100 mode renders incorrectly: the Y axis displays raw values (in millions) instead of 0–100%, and all series collapse to a single color. The correct way to work around this is to use {#if}/{:else} blocks, which forces a full component remount.
Steps to Reproduce
"stacked" and "stacked100"
type={inputs.mode === 'pct' ? 'stacked100' : 'stacked'}
Minimal reproducible example : See attached md
bug.md
Logs
System Info
Severity
annoyance
Additional Information, or Workarounds
No response