busiest-day-of-week.blade.php
1 year ago
busiest-time-of-day.blade.php
1 year ago
layout.blade.php
1 year ago
line-chart.blade.php
1 year ago
map.blade.php
1 year ago
new-sessions.blade.php
1 year ago
pie-chart.blade.php
1 year ago
quick-stats.blade.php
1 year ago
recent-conversions.blade.php
1 year ago
recent-views.blade.php
1 year ago
top-ten.blade.php
1 year ago
line-chart.blade.php
34 lines
| 1 | @php /** @var \IAWP\Env $env */ @endphp |
| 2 | @php /** @var \IAWP\Overview\Modules\Module $module */ @endphp |
| 3 | @php /** @var bool $is_loaded */ @endphp |
| 4 | @php /** @var ?array $dataset */ @endphp |
| 5 | |
| 6 | @extends('overview.modules.layout') |
| 7 | |
| 8 | @section('content') |
| 9 | @if($is_loaded) |
| 10 | <div data-controller="chart" |
| 11 | class="module-chart" |
| 12 | data-chart-labels-value="{{ json_encode($dataset['labels']) }}" |
| 13 | data-chart-data-value="{{ json_encode([ |
| 14 | $dataset['primary_dataset_id'] => $dataset['primary_dataset'], |
| 15 | $dataset['secondary_dataset_id'] => $dataset['secondary_dataset'], |
| 16 | ]) }}" |
| 17 | data-chart-locale-value="{{ esc_attr(get_bloginfo('language')) }}" |
| 18 | data-chart-currency-value="{{ esc_attr(iawp()->get_currency_code()) }}" |
| 19 | data-chart-is-preview-value="1" |
| 20 | data-chart-primary-chart-metric-id-value="{{ esc_attr($dataset['primary_dataset_id']) }}" |
| 21 | data-chart-primary-chart-metric-name-value="{{ esc_attr($dataset['primary_dataset_name']) }}" |
| 22 | data-chart-secondary-chart-metric-id-value="{{ esc_attr($dataset['secondary_dataset_id']) }}" |
| 23 | data-chart-secondary-chart-metric-name-value="{{ esc_attr($dataset['secondary_dataset_name']) }}" |
| 24 | data-chart-secondary-has-multiple-datasets-value="{{ is_array($dataset['secondary_dataset']) ? '1' : '0' }}" |
| 25 | > |
| 26 | <canvas data-chart-target="canvas" height="300"></canvas> |
| 27 | </div> |
| 28 | @else |
| 29 | <div class="loading-message"> |
| 30 | <img src="<?php echo esc_url(iawp_url_to('img/loading.svg')) ?>" /> |
| 31 | <p>{{ esc_html__('Loading data...', 'independent-analytics') }}</p> |
| 32 | </div> |
| 33 | @endif |
| 34 | @endsection |