Skip to content

Commit

Permalink
ui: fix horizontal overflow in dashboard (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
andre8244 committed Jul 2, 2020
1 parent 6c5c59e commit 0254608
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 4 additions & 1 deletion ui/src/piechart.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

import c3 from 'c3'

export default function generatePieChart(bindto, data) {
export default function generatePieChart(bindto, data, size, tooltip, color) {
var $ = window.jQuery
var c3ChartDefaults = $().c3ChartDefaults()
var pieChartRightConfig = c3ChartDefaults.getDefaultPieConfig()
Expand All @@ -32,5 +32,8 @@ export default function generatePieChart(bindto, data) {
show: true,
position: 'right'
};
pieChartRightConfig.size = size;
pieChartRightConfig.tooltip = tooltip || {};
pieChartRightConfig.color = color;
return c3.generate(pieChartRightConfig)
}
6 changes: 5 additions & 1 deletion ui/src/views/Dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@
</div>
</div>
<div class="col-sm-6">
<div v-if="!view.isFilterChartLoaded" class="spinner spinner-lg view-spinner"></div>
<div v-show="!view.isFilterChartLoaded" class="spinner spinner-lg view-spinner"></div>
<div v-show="view.isFilterChartLoaded" class="row">
<div class="col-sm-12">
<div
Expand Down Expand Up @@ -525,6 +525,10 @@ export default {
requests: $.pfPaletteColors.green
},
columns: []
},
{
width: window.innerWidth * 0.4,
height: 175
});
}
context.filterPieChart.load({
Expand Down

0 comments on commit 0254608

Please sign in to comment.