fix new client graph for smaller screen sizes
This commit is contained in:
parent
1e67f6e86c
commit
25fb5fdc14
@ -73,7 +73,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row server-history mb-4">
|
<div class="row server-history mb-4">
|
||||||
<div class="server-history-row" style="position:relative; width: 80vw" id="server_history_@Model.ID" data-serverid="@Model.ID"
|
<div class="server-history-row m-auto" style="position:relative; width: 100%" id="server_history_@Model.ID" data-serverid="@Model.ID"
|
||||||
data-clienthistory='@Html.Raw(Json.Serialize(Model.ClientHistory))'
|
data-clienthistory='@Html.Raw(Json.Serialize(Model.ClientHistory))'
|
||||||
data-clienthistory-ex='@Html.Raw(Json.Serialize(Model.ClientHistory.ClientCounts))'
|
data-clienthistory-ex='@Html.Raw(Json.Serialize(Model.ClientHistory.ClientCounts))'
|
||||||
data-online="@Model.Online">
|
data-online="@Model.Online">
|
||||||
|
@ -105,16 +105,13 @@ function getPlayerHistoryChart(playerHistory, i, width, maxClients) {
|
|||||||
options: {
|
options: {
|
||||||
responsive: true,
|
responsive: true,
|
||||||
maintainAspectRatio: false,
|
maintainAspectRatio: false,
|
||||||
onResize: function(chart, size) {
|
|
||||||
console.log(size);
|
|
||||||
},
|
|
||||||
legend: false,
|
legend: false,
|
||||||
defaultFontFamily: '-apple-system, BlinkMacSystemFont, "Open Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
|
defaultFontFamily: '-apple-system, BlinkMacSystemFont, "Open Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
|
||||||
tooltips: {
|
tooltips: {
|
||||||
callbacks: {
|
callbacks: {
|
||||||
// todo: localization at some point
|
// todo: localization at some point
|
||||||
|
title: context => moment(context[0].label).local().calendar(),
|
||||||
label: context => context.datasetIndex !== 1 ? `${context.value} players on ${playerHistory[context.index].mapAlias}` : context.value === '0' ? '' : 'Server Unreachable!',
|
label: context => context.datasetIndex !== 1 ? `${context.value} players on ${playerHistory[context.index].mapAlias}` : context.value === '0' ? '' : 'Server Unreachable!',
|
||||||
title: context => context[0].datasetIndex !== 1 ? moment(context[0].label).local().calendar() : ''
|
|
||||||
},
|
},
|
||||||
mode: 'nearest',
|
mode: 'nearest',
|
||||||
intersect: false,
|
intersect: false,
|
||||||
|
Loading…
Reference in New Issue
Block a user