Update Explosion plot widget with event counts and add theme support
This commit is contained in:
@@ -5,14 +5,14 @@ export default function ExplosionEventsSettings({ widgetId, currentSettings }) {
|
||||
const updateSettings = useDashboardStore(state => state.updateWidgetSettings);
|
||||
|
||||
// 1. Convert the saved string into a boolean for the toggle UI
|
||||
const isSymlog = currentSettings?.yAxisScale === 'symlog';
|
||||
const isSymlog = currentSettings?.yAxisScale === 'log';
|
||||
|
||||
const handleToggle = (details) => {
|
||||
// 2. Chakra v3 passes { checked: boolean } in the details object.
|
||||
// Convert it back to the string Plotly expects.
|
||||
console.log("1. Toggle Clicked! Raw details from Chakra:", details);
|
||||
|
||||
const newScale = details.checked ? 'symlog' : 'normal';
|
||||
const newScale = details.checked ? 'log' : 'normal';
|
||||
|
||||
updateSettings(widgetId, { yAxisScale: newScale });
|
||||
};
|
||||
@@ -30,7 +30,7 @@ export default function ExplosionEventsSettings({ widgetId, currentSettings }) {
|
||||
<Switch.Control>
|
||||
<Switch.Thumb />
|
||||
</Switch.Control>
|
||||
<Switch.Label>Use Symlog Scale</Switch.Label>
|
||||
<Switch.Label>Use Log Scale</Switch.Label>
|
||||
</Switch.Root>
|
||||
</Box>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user