Enhance dashboard widgets with advanced chart options

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 705f2157-ef97-4fbd-89e4-8c7f2ecaea90
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7ed01c5f-a82d-405a-b728-b2e3d127c60c/27b747f7-6777-469c-b2a8-4352fda5d8eb.jpg
This commit is contained in:
alphaeusmote
2025-04-10 00:56:22 +00:00
parent 8a9c8d4a3c
commit 2c30fa0521
3 changed files with 584 additions and 19 deletions
@@ -93,6 +93,15 @@ export function DashboardLayout({
showLegend: widget.config.showLegend ?? true,
stacked: widget.config.stacked ?? false,
precision: widget.config.precision ?? 2,
// Add new chart options with defaults
colors: widget.config.colors || [],
showGrid: widget.config.showGrid ?? true,
showTooltip: widget.config.showTooltip ?? true,
enableAnimation: widget.config.enableAnimation ?? true,
valueFormatter: widget.config.valueFormatter ?? "none",
currencySymbol: widget.config.currencySymbol ?? "$",
minValue: widget.config.minValue ?? null,
maxValue: widget.config.maxValue ?? null,
},
};
@@ -146,7 +155,15 @@ export function DashboardLayout({
showLegend: values.config.showLegend,
stacked: values.config.stacked,
precision: values.config.precision,
colors: ['#8884d8', '#82ca9d', '#ffc658', '#ff8042', '#0088fe'],
colors: values.config.colors || ['#8884d8', '#82ca9d', '#ffc658', '#ff8042', '#0088fe'],
// New chart options
showGrid: values.config.showGrid,
showTooltip: values.config.showTooltip,
enableAnimation: values.config.enableAnimation,
valueFormatter: values.config.valueFormatter,
currencySymbol: values.config.currencySymbol,
minValue: values.config.minValue,
maxValue: values.config.maxValue,
},
onEdit: handleEditWidget,
onDelete: handleDeleteWidget,