Merge pull request #2958 from JordyvanDortmont/2.4
Fix metrics fill theme color application
This commit is contained in:
40
public/dist/js/all.js
vendored
40
public/dist/js/all.js
vendored
File diff suppressed because one or more lines are too long
2
public/dist/js/app.js
vendored
2
public/dist/js/app.js
vendored
File diff suppressed because one or more lines are too long
@@ -42,6 +42,9 @@ Chart.defaults.global.legend.display = false
|
||||
module.exports = {
|
||||
props: [
|
||||
'metric',
|
||||
'theme',
|
||||
'theme-light',
|
||||
'theme-dark'
|
||||
],
|
||||
data () {
|
||||
return {
|
||||
@@ -137,12 +140,12 @@ module.exports = {
|
||||
labels: data_keys,
|
||||
datasets: [{
|
||||
data: _.values(this.data),
|
||||
// backgroundColor: "{{ $theme_metrics }}",
|
||||
// borderColor: "{{ color_darken($theme_metrics, -0.1) }}",
|
||||
// pointBackgroundColor: "{{ color_darken($theme_metrics, -0.1) }}",
|
||||
// pointBorderColor: "{{ color_darken($theme_metrics, -0.1) }}",
|
||||
// pointHoverBackgroundColor: "{{ color_darken($theme_metrics, -0.2) }}",
|
||||
// pointHoverBorderColor: "{{ color_darken($theme_metrics, -0.2) }}"
|
||||
backgroundColor: this.themeLight,
|
||||
borderColor: this.theme,
|
||||
pointBackgroundColor: this.theme,
|
||||
pointBorderColor: this.theme,
|
||||
pointHoverBackgroundColor: this.themeDark,
|
||||
pointHoverBorderColor: this.themeDark
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<ul class="list-group">
|
||||
@foreach($metrics as $metric)
|
||||
<li class="list-group-item metric" data-metric-id="{{ $metric->id }}">
|
||||
<metric-chart :metric="{{ $metric->toJson() }}"></metric-chart>
|
||||
<metric-chart :metric="{{ $metric->toJson() }}" :theme-light="{{ json_encode($theme_metrics) }}" :theme="{{ json_encode(color_darken($theme_metrics, -0.1)) }}" :theme-dark="{{ json_encode(color_darken($theme_metrics, -0.2)) }}"></metric-chart>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user