uneca/plotly-chart-editor
Reactive Plotly.js chart builder for Laravel via Livewire. Sidebar-driven editor to configure traces and layout, multi-language UI (EN/FR/PT/ES), multiple sync modes and persistence options. Requires Plotly.js 3.x (peer dep), Alpine, PHP 8.4+.
config/plotly-chart-editor.php approach allows flexible trace-type definitions, making it adaptable to different charting needs (e.g., line charts, scatter plots, heatmaps). This is a strong fit for applications requiring dynamic visualization customization.window.Plotly is globally available, requiring explicit dependency management by the consumer. This is a minor risk if Plotly.js is already in the project stack.--plotly-editor-*), reducing collision risk.JSON.parse(JSON.stringify()) for deep copies is inefficient and fragile (e.g., fails with circular references). A custom deep-clone utility or structuredClone() (if supported) would be preferable.<script src="https://cdn.plot.ly/plotly-latest.min.js"></script> or npm). A build step (e.g., Vite/Webpack) may be needed to avoid CDN latency.composer require uneca/plotly-chart-editor.npm install.resources/js/app.js or via CDN in Blade).php artisan vendor:publish --provider="Uneca\PlotlyChartEditor\PlotlyChartEditorServiceProvider".config/plotly-chart-editor.php for trace types and sync modes.<livewire:plotly-editor />.wire:model (e.g., <livewire:plotly-editor wire:model="chartData" />).resources/css/app.css:
@import 'plotly-chart-editor::plotly-chart-editor';
--plotly-editor-primary: #3b82f6).wire:model.auto, manual, hybrid).auto syncs may cause unnecessary network calls.localStorage) to reduce reprocessing.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Plotly.js CDN fails to load | Editor becomes non-functional | Fallback to npm-installed Plotly.js |
| Alpine.js version mismatch | State management breaks | Pin Alpine.js to v3.x in package.json |
How can I help you explore Laravel packages today?