diff --git a/resources/views/components/ib-apex-chart.blade.php b/resources/views/components/ib-apex-chart.blade.php index cf31202..a197862 100644 --- a/resources/views/components/ib-apex-chart.blade.php +++ b/resources/views/components/ib-apex-chart.blade.php @@ -82,12 +82,10 @@ this.data.chart.events = { mounted: function (chartContext, config) { - console.log('moount', chartContext) - renderCustomLegend(chartContext); + renderLegend(chartContext); }, updated: function (chartContext, config) { - console.log('update') - renderCustomLegend(chartContext); + renderLegend(chartContext); } } @@ -95,7 +93,15 @@ chart.render(); - function renderCustomLegend(chartContext) { + // reset custom zoom button + var resetZoomButton = document.querySelector('#chart-reset-zoom-{{ $name }}'); + resetZoomButton.addEventListener('click', function () { + chart.resetSeries() + + }); + + // generate custom legend view + function renderLegend(chartContext) { var legendContainer = document.querySelector('#chart-legend-{{ $name }}'); if (!legendContainer) return; @@ -146,6 +152,6 @@ } }" > -
+ diff --git a/resources/views/livewire/portfolio-performance-cards.blade.php b/resources/views/livewire/portfolio-performance-cards.blade.php index 2c9b336..7702ff6 100644 --- a/resources/views/livewire/portfolio-performance-cards.blade.php +++ b/resources/views/livewire/portfolio-performance-cards.blade.php @@ -88,21 +88,24 @@ new class extends Component { - -