Fixed display x chart vari
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
|
||||
namespace GWMS.Data
|
||||
{
|
||||
public class chartJsData
|
||||
{
|
||||
#region Public Classes
|
||||
|
||||
public class chartJsTSerie
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
public DateTime x { get; set; }
|
||||
public double y { get; set; }
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
|
||||
public class chartJsXY
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
public double x { get; set; }
|
||||
public double y { get; set; }
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
|
||||
#endregion Public Classes
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
@using GWMS.Data
|
||||
@inject IJSRuntime JSRuntime
|
||||
|
||||
<canvas id="@Id"></canvas>
|
||||
|
||||
@code {
|
||||
|
||||
[Parameter]
|
||||
public string Id { get; set; } = "MyTs";
|
||||
|
||||
[Parameter]
|
||||
public string Title { get; set; } = "Demo Line";
|
||||
|
||||
[Parameter]
|
||||
public List<chartJsData.chartJsTSerie> DataTS { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public List<string> Labels { get; set; } = new List<string>();
|
||||
|
||||
[Parameter]
|
||||
public List<string> lineColor { get; set; } = new List<string>();
|
||||
|
||||
[Parameter]
|
||||
public List<string> backColor { get; set; } = new List<string>();
|
||||
|
||||
[Parameter]
|
||||
public double AspRatio { get; set; } = 0;
|
||||
|
||||
|
||||
[Parameter]
|
||||
public string MinValue { get; set; } = "0";
|
||||
|
||||
[Parameter]
|
||||
public string MaxValue { get; set; } = "0";
|
||||
|
||||
[Parameter]
|
||||
public int lTens { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Inizializzazione rendering componente
|
||||
///
|
||||
/// partendo da qui:
|
||||
/// https://www.williamleme.com/posts/2020/003-chartjs-blazor/
|
||||
/// https://www.puresourcecode.com/dotnet/blazor/using-chart-js-with-blazor/
|
||||
/// https://www.tutorialsteacher.com/csharp/csharp-anonymous-type
|
||||
/// </summary>
|
||||
/// <param name="firstRender"></param>
|
||||
/// <returns></returns>
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
await renderChart();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Inizializzazione rendering componente
|
||||
///
|
||||
/// partendo da qui:
|
||||
/// https://www.williamleme.com/posts/2020/003-chartjs-blazor/
|
||||
/// https://www.puresourcecode.com/dotnet/blazor/using-chart-js-with-blazor/
|
||||
/// https://www.tutorialsteacher.com/csharp/csharp-anonymous-type
|
||||
/// </summary>
|
||||
/// <param name="firstRender"></param>
|
||||
/// <returns></returns>
|
||||
protected async Task renderChart()
|
||||
{
|
||||
// creazione di un oggetto anonymous type con tutte le opzioni da passare a chart.js
|
||||
var config = new
|
||||
{
|
||||
type = "line",
|
||||
options = new
|
||||
{
|
||||
responsive = true,
|
||||
scales = new
|
||||
{
|
||||
yAxes = new
|
||||
{
|
||||
display = true,
|
||||
ticks = new
|
||||
{
|
||||
maxTicksLimit = 10
|
||||
},
|
||||
suggestedMin = MinValue != MaxValue ? MinValue : "auto",
|
||||
suggestedMax = MinValue != MaxValue ? MaxValue : "auto"
|
||||
},
|
||||
xAxes = new
|
||||
{
|
||||
type = "time",
|
||||
distribution = "linear",
|
||||
}
|
||||
},
|
||||
Animation = false,
|
||||
AspectRatio = AspRatio == 0 ? "auto" : $"{AspRatio}"
|
||||
},
|
||||
data = new
|
||||
{
|
||||
labels = Labels,
|
||||
datasets = new[]
|
||||
{
|
||||
new
|
||||
{
|
||||
data = DataTS,
|
||||
borderColor= lineColor,
|
||||
backgroundColor= backColor,
|
||||
lineTension= lTens,
|
||||
stepped= false,
|
||||
label= Title
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
await JSRuntime.InvokeVoidAsync("setup", Id, config);
|
||||
}
|
||||
}
|
||||
@@ -4,16 +4,16 @@
|
||||
<div class="card-header table-primary py-1 px-1 px-md-2">
|
||||
@if (currItem != null)
|
||||
{
|
||||
<div class="row py-0">
|
||||
<div class="col-4 col-md-6 col-lg-8 pr-0 font-weight-bold">
|
||||
<h2 class="mb-0">@currItem.PlantCode</h2>
|
||||
<div class="row py-0">
|
||||
<div class="col-4 col-md-6 col-lg-8 pr-0 font-weight-bold">
|
||||
<h2 class="mb-0">@currItem.PlantCode</h2>
|
||||
</div>
|
||||
<div class="col-8 col-md-6 col-lg-4 text-right align-bottom">
|
||||
<button class="btn btn-primary btn-block" @onclick="() => ShowDetail(currItem.PlantId)">
|
||||
<b>@currItem.PlantDesc <i class="fas fa-angle-double-right"></i></b>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-8 col-md-6 col-lg-4 text-right align-bottom">
|
||||
<button class="btn btn-primary btn-block" @onclick="() => ShowDetail(currItem.PlantId)">
|
||||
<b>@currItem.PlantDesc <i class="fas fa-angle-double-right"></i></b>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="card-body p-0 p-md-1 p-lg-2">
|
||||
@@ -34,21 +34,21 @@
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center small p-1 p-md-2">
|
||||
@if (getPressData("BH", "N1") != "")
|
||||
{
|
||||
<span> Stoccaggio:</span> <span><b>@getPressData("BH", "N1")</b> <sub>bar</sub></span>
|
||||
<span> Stoccaggio:</span> <span><b>@getPressData("BH", "N1")</b> <sub>bar</sub></span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span> Stoccaggio:</span> <span><b>ND</b> <sub>bar</sub></span>
|
||||
<span> Stoccaggio:</span> <span><b>ND</b> <sub>bar</sub></span>
|
||||
}
|
||||
</li>
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center small p-1 p-md-2">
|
||||
@if (getPressData("BHA", "N1") != "")
|
||||
{
|
||||
<span> Alimentazione:</span> <span><b>@getPressData("BHA", "N1")</b> <sub>bar</sub></span>
|
||||
<span> Alimentazione:</span> <span><b>@getPressData("BHA", "N1")</b> <sub>bar</sub></span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span> Alimentazione:</span> <span><b>ND</b> <sub>bar</sub></span>
|
||||
<span> Alimentazione:</span> <span><b>ND</b> <sub>bar</sub></span>
|
||||
}
|
||||
</li>
|
||||
<li class="list-group-item-primary d-flex justify-content-between align-items-center p-2">
|
||||
@@ -57,21 +57,21 @@
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center small p-1 p-md-2">
|
||||
@if (getPressData("BL", "N1") != "")
|
||||
{
|
||||
<span> Stoccaggio:</span> <span><b>@getPressData("BL", "N1")</b> <sub>bar</sub></span>
|
||||
<span> Stoccaggio:</span> <span><b>@getPressData("BL", "N1")</b> <sub>bar</sub></span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span> Stoccaggio:</span> <span><b>ND</b> <sub>bar</sub></span>
|
||||
<span> Stoccaggio:</span> <span><b>ND</b> <sub>bar</sub></span>
|
||||
}
|
||||
</li>
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center small p-1 p-md-2">
|
||||
@if (getPressData("BLA", "N1") != "")
|
||||
{
|
||||
<span> Alimentazione:</span> <span><b>@getPressData("BLA", "N1")</b> <sub>bar</sub></span>
|
||||
<span> Alimentazione:</span> <span><b>@getPressData("BLA", "N1")</b> <sub>bar</sub></span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span> Alimentazione:</span> <span><b>ND</b> <sub>bar</sub></span>
|
||||
<span> Alimentazione:</span> <span><b>ND</b> <sub>bar</sub></span>
|
||||
}
|
||||
</li>
|
||||
</ul>
|
||||
@@ -93,12 +93,10 @@
|
||||
<li class="list-group-item align-items-center px-1 py-2">
|
||||
<div class="d-flex flex-column">
|
||||
<div class="p-1 flex-grow-1">
|
||||
<Progress>
|
||||
<ProgressBar Value="@currItem.LevelRatio" Striped="false" Animated="false" />
|
||||
</Progress>
|
||||
</div>
|
||||
<div class="p-1 py-md-2">
|
||||
<LineChart @ref="LevelVal" TItem="double" OptionsObject="lineChartOptions" />
|
||||
<ChartJs.Line Id="@($"PlotLevel_{currItem.PlantId}")" AspRatio="2" DataTS="@LevelVal" lineColor="@getLineColors(1f)" backColor="@getFillColors(0.25f)" lTens="0"></ChartJs.Line>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
@@ -106,21 +104,21 @@
|
||||
<div class="col-6">
|
||||
@if (currItem.SoldTS != null && currItem.SoldTS.Count > 0 && currItem.SoldTS[0].ValDouble > 0)
|
||||
{
|
||||
<span><i class="fas fa-file-invoice-dollar"></i> Venduto Ieri: </span> <span style="font-size:1em;"><b>@currItem.SoldTS[0].ValDouble.ToString("N1")</b> <span class="small"> <sub>kg</sub></span></span>
|
||||
<span><i class="fas fa-file-invoice-dollar"></i> Venduto Ieri: </span> <span style="font-size:1em;"><b>@currItem.SoldTS[0].ValDouble.ToString("N1")</b> <span class="small"> <sub>kg</sub></span></span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span><i class="fas fa-file-invoice-dollar"></i> Venduto Ieri: </span> <span style="font-size:1em;"><b>ND</b> <span class="small"> <sub>kg</sub></span></span>
|
||||
<span><i class="fas fa-file-invoice-dollar"></i> Venduto Ieri: </span> <span style="font-size:1em;"><b>ND</b> <span class="small"> <sub>kg</sub></span></span>
|
||||
}
|
||||
</div>
|
||||
<div class="col-6">
|
||||
@if (currItem.SoldTS != null && currItem.SoldTS.Count > 1 && currItem.SoldTS[1].ValDouble > 0)
|
||||
{
|
||||
<span><i class="fas fa-file-invoice-dollar"></i> Venduto Oggi: </span> <span style="font-size:1em;"><b>@currItem.SoldTS[1].ValDouble.ToString("N1")</b> <span class="small"> <sub>kg</sub></span></span>
|
||||
<span><i class="fas fa-file-invoice-dollar"></i> Venduto Oggi: </span> <span style="font-size:1em;"><b>@currItem.SoldTS[1].ValDouble.ToString("N1")</b> <span class="small"> <sub>kg</sub></span></span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span><i class="fas fa-file-invoice-dollar"></i> Venduto Oggi: </span> <span style="font-size:1em;"><b>ND</b> <span class="small"> <sub>kg</sub></span></span>
|
||||
<span><i class="fas fa-file-invoice-dollar"></i> Venduto Oggi: </span> <span style="font-size:1em;"><b>ND</b> <span class="small"> <sub>kg</sub></span></span>
|
||||
}
|
||||
</div>
|
||||
</li>
|
||||
|
||||
@@ -7,6 +7,7 @@ using GWMS.Data.DTO;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using System.Threading;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using GWMS.Data;
|
||||
|
||||
namespace GWMS.UI.Components
|
||||
{
|
||||
@@ -16,8 +17,9 @@ namespace GWMS.UI.Components
|
||||
|
||||
protected PlantDTO _currItem = new PlantDTO();
|
||||
|
||||
protected LineChart<double> LevelVal = new LineChart<double>();
|
||||
protected List<chartJsData.chartJsTSerie> LevelVal = new List<chartJsData.chartJsTSerie>();
|
||||
|
||||
#if false
|
||||
protected object lineChartOptions = new
|
||||
{
|
||||
Scales = new
|
||||
@@ -64,7 +66,8 @@ namespace GWMS.UI.Components
|
||||
{
|
||||
display = false
|
||||
}
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// fattore di riduzione x visualizzare meno punti (in base alla numerosità...
|
||||
@@ -181,6 +184,7 @@ namespace GWMS.UI.Components
|
||||
redFact = answ;
|
||||
}
|
||||
|
||||
#if false
|
||||
private LineChartDataset<double> GetLineChartDataset()
|
||||
{
|
||||
fixRedFactor();
|
||||
@@ -204,7 +208,8 @@ namespace GWMS.UI.Components
|
||||
fixRedFactor();
|
||||
var answ = _currItem.LevelTS.OrderByDescending(x => x.DtEvent).Where((cat, index) => index % redFact == 0).OrderBy(x => x.DtEvent).Select(x => x.DtEvent.ToString("dd/MM HH")).ToList();
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#endregion Private Methods
|
||||
|
||||
@@ -218,7 +223,7 @@ namespace GWMS.UI.Components
|
||||
protected List<string> getFillColors(float alpha)
|
||||
{
|
||||
List<string> answ = new List<string>();
|
||||
answ.Add(ChartColor.FromRgba(108, 164, 254, alpha));
|
||||
answ.Add($"rgba(108, 164, 254, {alpha}");
|
||||
return answ;
|
||||
}
|
||||
|
||||
@@ -230,17 +235,22 @@ namespace GWMS.UI.Components
|
||||
protected List<string> getLineColors(float alpha)
|
||||
{
|
||||
List<string> answ = new List<string>();
|
||||
answ.Add(ChartColor.FromRgba(54, 82, 254, alpha));
|
||||
answ.Add($"rgba(54, 82, 254, {alpha}");
|
||||
return answ;
|
||||
}
|
||||
|
||||
protected async Task HandleRedraw()
|
||||
{
|
||||
fixRedFactor();
|
||||
LevelVal = _currItem.LevelTS.OrderByDescending(x => x.DtEvent).Where((cat, index) => index % redFact == 0).OrderBy(x => x.DtEvent).Select(r => new chartJsData.chartJsTSerie() { x = r.DtEvent, y = r.ValDouble }).ToList();
|
||||
await Task.Delay(1);
|
||||
#if false
|
||||
if (LevelVal != null)
|
||||
{
|
||||
await LevelVal.Clear();
|
||||
await LevelVal.AddLabelsDatasetsAndUpdate(GetLineChartLabels(), GetLineChartDataset());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
protected void ShowDetail(int currPlantId)
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
<div class="progress">
|
||||
<div class="progress-bar" style="@cssClassWidth">@(Value)</div>
|
||||
</div>
|
||||
|
||||
@code {
|
||||
|
||||
|
||||
[Parameter]
|
||||
public bool Striped { get; set; } = false;
|
||||
[Parameter]
|
||||
public bool Animated { get; set; } = false;
|
||||
|
||||
[Parameter]
|
||||
public double Value { get; set; } = 0;
|
||||
|
||||
private string cssClassWidth
|
||||
{
|
||||
get => $"width: {Value}%;";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Version>1.0.2203.0114</Version>
|
||||
<Version>1.0.2203.0116</Version>
|
||||
<UserSecretsId>95c9f021-52d1-4390-a670-5810b7b777b0</UserSecretsId>
|
||||
<EnableNETAnalyzers>true</EnableNETAnalyzers>
|
||||
<RunAnalyzersDuringBuild>true</RunAnalyzersDuringBuild>
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
@*@Html.Partial("_Favicons")*@
|
||||
<partial name="Shared/_Favicons.cshtml">
|
||||
|
||||
<link rel="stylesheet" href="lib/bootstrap/css/bootstrap.min.css" />
|
||||
<link rel="stylesheet" href="lib/font-awesome/css/fontawesome.min.css" />
|
||||
<link rel="stylesheet" href="lib/bootstrap/css/bootstrap.css" />
|
||||
<link rel="stylesheet" href="lib/font-awesome/css/fontawesome.css" />
|
||||
<link href="css/site.css" rel="stylesheet" />
|
||||
<link href="GWMS.UI.styles.css" rel="stylesheet" />
|
||||
<link rel="stylesheet" href="~/Identity/css/site.css" />
|
||||
@@ -70,7 +70,7 @@
|
||||
<script src="~/Identity/lib/jquery/dist/jquery.min.js"></script>
|
||||
<script src="~/Identity/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="~/Identity/js/site.js" asp-append-version="true"></script>
|
||||
<script src="lib/font-awesome/js/all.js"></script>
|
||||
<script src="lib/font-awesome/js/all.min.js"></script>
|
||||
@RenderSection("Scripts", required: false)
|
||||
</body>
|
||||
</html>
|
||||
@@ -21,7 +21,7 @@
|
||||
<partial name="Shared/_Favicons.cshtml">
|
||||
|
||||
<link rel="stylesheet" href="lib/bootstrap/css/bootstrap.css" />
|
||||
<link rel="stylesheet" href="lib/font-awesome/css/fontawesome.min.css" />
|
||||
<link rel="stylesheet" href="lib/font-awesome/css/fontawesome.css" />
|
||||
<link rel="stylesheet" href="Chart.js/Chart.min.css" />
|
||||
<link href="css/site.css" rel="stylesheet" />
|
||||
<link href="GWMS.UI.styles.css" rel="stylesheet" />
|
||||
@@ -50,14 +50,18 @@
|
||||
|
||||
<!-- inside of body section and after the div/app tag -->
|
||||
<script src="jquery/jquery.min.js"></script>
|
||||
<script src="Chart.js/Chart.min.js"></script>
|
||||
<script src="lib/Chart.js/chart.js"></script>
|
||||
<script src="lib/luxon/luxon.js"></script>
|
||||
<script src="lib/chartjs-adapter-luxon/chartjs-adapter-luxon.js"></script>
|
||||
<script src="lib/chartBoot.js"></script>
|
||||
|
||||
<script src="popper.js/umd/popper.min.js"></script>
|
||||
<script src="lib/bootstrap/js/bootstrap.js"></script>
|
||||
|
||||
<script src="_content/ZXingBlazor/lib/barcodereader/zxing.js"></script>
|
||||
<script src="_content/ZXingBlazor/lib/barcodereader/barcode.js"></script>
|
||||
|
||||
<script src="font-awesome/js/all.min.js"></script>
|
||||
<script src="lib/font-awesome/js/all.min.js"></script>
|
||||
<script src="_framework/blazor.server.js"></script>
|
||||
|
||||
<script type="text/javascript" src="lib/qrcode.js"></script>
|
||||
|
||||
+8
-4
@@ -6,10 +6,6 @@
|
||||
"library": "font-awesome@5.15.4",
|
||||
"destination": "wwwroot/lib/font-awesome/"
|
||||
},
|
||||
{
|
||||
"library": "Chart.js@2.8.0",
|
||||
"destination": "wwwroot/Chart.js/"
|
||||
},
|
||||
{
|
||||
"library": "popper.js@1.16.1",
|
||||
"destination": "wwwroot/popper.js/"
|
||||
@@ -22,9 +18,17 @@
|
||||
"library": "bootstrap@4.6.1",
|
||||
"destination": "wwwroot/lib/bootstrap/"
|
||||
},
|
||||
{
|
||||
"library": "chartjs-adapter-luxon@1.1.0",
|
||||
"destination": "wwwroot/lib/chartjs-adapter-luxon/"
|
||||
},
|
||||
{
|
||||
"library": "Chart.js@3.7.1",
|
||||
"destination": "wwwroot/lib/Chart.js/"
|
||||
},
|
||||
{
|
||||
"library": "luxon@2.3.1",
|
||||
"destination": "wwwroot/lib/luxon/"
|
||||
}
|
||||
]
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -1,47 +0,0 @@
|
||||
/*
|
||||
* DOM element rendering detection
|
||||
* https://davidwalsh.name/detect-node-insertion
|
||||
*/
|
||||
@keyframes chartjs-render-animation {
|
||||
from { opacity: 0.99; }
|
||||
to { opacity: 1; }
|
||||
}
|
||||
|
||||
.chartjs-render-monitor {
|
||||
animation: chartjs-render-animation 0.001s;
|
||||
}
|
||||
|
||||
/*
|
||||
* DOM element resizing detection
|
||||
* https://github.com/marcj/css-element-queries
|
||||
*/
|
||||
.chartjs-size-monitor,
|
||||
.chartjs-size-monitor-expand,
|
||||
.chartjs-size-monitor-shrink {
|
||||
position: absolute;
|
||||
direction: ltr;
|
||||
left: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
overflow: hidden;
|
||||
pointer-events: none;
|
||||
visibility: hidden;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.chartjs-size-monitor-expand > div {
|
||||
position: absolute;
|
||||
width: 1000000px;
|
||||
height: 1000000px;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.chartjs-size-monitor-shrink > div {
|
||||
position: absolute;
|
||||
width: 200%;
|
||||
height: 200%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
Vendored
-14680
File diff suppressed because it is too large
Load Diff
-1
@@ -1 +0,0 @@
|
||||
@keyframes chartjs-render-animation{from{opacity:.99}to{opacity:1}}.chartjs-render-monitor{animation:chartjs-render-animation 1ms}.chartjs-size-monitor,.chartjs-size-monitor-expand,.chartjs-size-monitor-shrink{position:absolute;direction:ltr;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1}.chartjs-size-monitor-expand>div{position:absolute;width:1000000px;height:1000000px;left:0;top:0}.chartjs-size-monitor-shrink>div{position:absolute;width:200%;height:200%;left:0;top:0}
|
||||
-7
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
+13
File diff suppressed because one or more lines are too long
@@ -0,0 +1,7 @@
|
||||
/*!
|
||||
* Chart.js v3.7.1
|
||||
* https://www.chartjs.org
|
||||
* (c) 2022 Chart.js Contributors
|
||||
* Released under the MIT License
|
||||
*/
|
||||
export { H as HALF_PI, aX as INFINITY, P as PI, aW as PITAU, aZ as QUARTER_PI, aY as RAD_PER_DEG, T as TAU, a_ as TWO_THIRDS_PI, Q as _addGrace, V as _alignPixel, a0 as _alignStartEnd, p as _angleBetween, a$ as _angleDiff, _ as _arrayUnique, a6 as _attachContext, aq as _bezierCurveTo, an as _bezierInterpolation, av as _boundSegment, al as _boundSegments, a3 as _capitalize, ak as _computeSegments, a7 as _createResolver, aH as _decimalPlaces, aP as _deprecated, a8 as _descriptors, af as _elementsEqual, M as _factorize, aJ as _filterBetween, F as _getParentNode, U as _int16Range, ah as _isBetween, ag as _isClickEvent, K as _isDomSupported, z as _isPointInArea, w as _limitValue, aI as _longestText, aK as _lookup, x as _lookupByKey, S as _measureText, aN as _merger, aO as _mergerIf, aw as _normalizeAngle, ao as _pointInLine, ai as _readValueToProps, A as _rlookupByKey, aD as _setMinAndMaxByKey, am as _steppedInterpolation, ap as _steppedLineTo, az as _textX, $ as _toLeftRightCenter, aj as _updateBezierControlPoints, as as addRoundedRectPath, aG as almostEquals, aF as almostWhole, O as callback, ad as clearCanvas, W as clipArea, aM as clone, c as color, h as createContext, ab as debounce, j as defined, aC as distanceBetweenPoints, ar as drawPoint, D as each, e as easingEffects, N as finiteOrDefault, aU as fontString, o as formatNumber, B as getAngleFromPoint, aL as getHoverColor, E as getMaximumSize, y as getRelativePosition, ax as getRtlAdapter, aT as getStyle, b as isArray, g as isFinite, a5 as isFunction, k as isNullOrUndef, q as isNumber, i as isObject, l as listenArrayEvents, L as log10, a2 as merge, a9 as mergeIf, aE as niceNum, aB as noop, ay as overrideTextDirection, G as readUsedSize, X as renderText, r as requestAnimFrame, a as resolve, f as resolveObjectKey, aA as restoreTextDirection, ac as retinaScale, ae as setsEqual, s as sign, aR as splineCurve, aS as splineCurveMonotone, J as supportsEventListenerOptions, I as throttled, R as toDegrees, n as toDimension, Z as toFont, aQ as toFontString, aV as toLineHeight, C as toPadding, m as toPercentage, t as toRadians, at as toTRBL, au as toTRBLCorners, aa as uid, Y as unclipArea, u as unlistenArrayEvents, v as valueOrDefault } from './chunks/helpers.segment.js';
|
||||
@@ -0,0 +1 @@
|
||||
export{H as HALF_PI,aX as INFINITY,P as PI,aW as PITAU,aZ as QUARTER_PI,aY as RAD_PER_DEG,T as TAU,a_ as TWO_THIRDS_PI,Q as _addGrace,V as _alignPixel,a0 as _alignStartEnd,p as _angleBetween,a$ as _angleDiff,_ as _arrayUnique,a6 as _attachContext,aq as _bezierCurveTo,an as _bezierInterpolation,av as _boundSegment,al as _boundSegments,a3 as _capitalize,ak as _computeSegments,a7 as _createResolver,aH as _decimalPlaces,aP as _deprecated,a8 as _descriptors,af as _elementsEqual,M as _factorize,aJ as _filterBetween,F as _getParentNode,U as _int16Range,ah as _isBetween,ag as _isClickEvent,K as _isDomSupported,z as _isPointInArea,w as _limitValue,aI as _longestText,aK as _lookup,x as _lookupByKey,S as _measureText,aN as _merger,aO as _mergerIf,aw as _normalizeAngle,ao as _pointInLine,ai as _readValueToProps,A as _rlookupByKey,aD as _setMinAndMaxByKey,am as _steppedInterpolation,ap as _steppedLineTo,az as _textX,$ as _toLeftRightCenter,aj as _updateBezierControlPoints,as as addRoundedRectPath,aG as almostEquals,aF as almostWhole,O as callback,ad as clearCanvas,W as clipArea,aM as clone,c as color,h as createContext,ab as debounce,j as defined,aC as distanceBetweenPoints,ar as drawPoint,D as each,e as easingEffects,N as finiteOrDefault,aU as fontString,o as formatNumber,B as getAngleFromPoint,aL as getHoverColor,E as getMaximumSize,y as getRelativePosition,ax as getRtlAdapter,aT as getStyle,b as isArray,g as isFinite,a5 as isFunction,k as isNullOrUndef,q as isNumber,i as isObject,l as listenArrayEvents,L as log10,a2 as merge,a9 as mergeIf,aE as niceNum,aB as noop,ay as overrideTextDirection,G as readUsedSize,X as renderText,r as requestAnimFrame,a as resolve,f as resolveObjectKey,aA as restoreTextDirection,ac as retinaScale,ae as setsEqual,s as sign,aR as splineCurve,aS as splineCurveMonotone,J as supportsEventListenerOptions,I as throttled,R as toDegrees,n as toDimension,Z as toFont,aQ as toFontString,aV as toLineHeight,C as toPadding,m as toPercentage,t as toRadians,at as toTRBL,au as toTRBLCorners,aa as uid,Y as unclipArea,u as unlistenArrayEvents,v as valueOrDefault}from"./chunks/helpers.segment.js";
|
||||
@@ -0,0 +1,16 @@
|
||||
///Setup del chart desiderato con id univoco
|
||||
window.setup = (id, config) => {
|
||||
var ctx = document.getElementById(id).getContext('2d');
|
||||
//let currentDate = new Date();
|
||||
//console.log(currentDate + " - Calling setup...");
|
||||
//console.log(id);
|
||||
if (window['chart-' + id] instanceof Chart) {
|
||||
//window.myChart.destroy();
|
||||
window['chart-' + id].destroy();
|
||||
//console.log("Chart " + id + " destroyed!");
|
||||
}
|
||||
|
||||
window['chart-' + id] = new Chart(ctx, config);
|
||||
//console.log("Chart " + id + " created!");
|
||||
//console.log(window['chart-' + id]);
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
/*!
|
||||
* chartjs-adapter-luxon v1.1.0
|
||||
* https://www.chartjs.org
|
||||
* (c) 2021 chartjs-adapter-luxon Contributors
|
||||
* Released under the MIT license
|
||||
*/
|
||||
import { _adapters } from 'chart.js';
|
||||
import { DateTime } from 'luxon';
|
||||
|
||||
const FORMATS = {
|
||||
datetime: DateTime.DATETIME_MED_WITH_SECONDS,
|
||||
millisecond: 'h:mm:ss.SSS a',
|
||||
second: DateTime.TIME_WITH_SECONDS,
|
||||
minute: DateTime.TIME_SIMPLE,
|
||||
hour: {hour: 'numeric'},
|
||||
day: {day: 'numeric', month: 'short'},
|
||||
week: 'DD',
|
||||
month: {month: 'short', year: 'numeric'},
|
||||
quarter: "'Q'q - yyyy",
|
||||
year: {year: 'numeric'}
|
||||
};
|
||||
|
||||
_adapters._date.override({
|
||||
_id: 'luxon', // DEBUG
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
_create: function(time) {
|
||||
return DateTime.fromMillis(time, this.options);
|
||||
},
|
||||
|
||||
formats: function() {
|
||||
return FORMATS;
|
||||
},
|
||||
|
||||
parse: function(value, format) {
|
||||
const options = this.options;
|
||||
|
||||
if (value === null || typeof value === 'undefined') {
|
||||
return null;
|
||||
}
|
||||
|
||||
const type = typeof value;
|
||||
if (type === 'number') {
|
||||
value = this._create(value);
|
||||
} else if (type === 'string') {
|
||||
if (typeof format === 'string') {
|
||||
value = DateTime.fromFormat(value, format, options);
|
||||
} else {
|
||||
value = DateTime.fromISO(value, options);
|
||||
}
|
||||
} else if (value instanceof Date) {
|
||||
value = DateTime.fromJSDate(value, options);
|
||||
} else if (type === 'object' && !(value instanceof DateTime)) {
|
||||
value = DateTime.fromObject(value);
|
||||
}
|
||||
|
||||
return value.isValid ? value.valueOf() : null;
|
||||
},
|
||||
|
||||
format: function(time, format) {
|
||||
const datetime = this._create(time);
|
||||
return typeof format === 'string'
|
||||
? datetime.toFormat(format, this.options)
|
||||
: datetime.toLocaleString(format);
|
||||
},
|
||||
|
||||
add: function(time, amount, unit) {
|
||||
const args = {};
|
||||
args[unit] = amount;
|
||||
return this._create(time).plus(args).valueOf();
|
||||
},
|
||||
|
||||
diff: function(max, min, unit) {
|
||||
return this._create(max).diff(this._create(min)).as(unit).valueOf();
|
||||
},
|
||||
|
||||
startOf: function(time, unit, weekday) {
|
||||
if (unit === 'isoWeek') {
|
||||
weekday = Math.trunc(Math.min(Math.max(0, weekday), 6));
|
||||
const dateTime = this._create(time);
|
||||
return dateTime.minus({days: (dateTime.weekday - weekday + 7) % 7}).startOf('day').valueOf();
|
||||
}
|
||||
return unit ? this._create(time).startOf(unit).valueOf() : time;
|
||||
},
|
||||
|
||||
endOf: function(time, unit) {
|
||||
return this._create(time).endOf(unit).valueOf();
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
import{_adapters}from"chart.js";import{DateTime}from"luxon";const FORMATS={datetime:DateTime.DATETIME_MED_WITH_SECONDS,millisecond:"h:mm:ss.SSS a",second:DateTime.TIME_WITH_SECONDS,minute:DateTime.TIME_SIMPLE,hour:{hour:"numeric"},day:{day:"numeric",month:"short"},week:"DD",month:{month:"short",year:"numeric"},quarter:"'Q'q - yyyy",year:{year:"numeric"}};_adapters._date.override({_id:"luxon",_create:function(t){return DateTime.fromMillis(t,this.options)},formats:function(){return FORMATS},parse:function(t,e){var r=this.options;if(null==t)return null;var a=typeof t;return"number"==a?t=this._create(t):"string"==a?t="string"==typeof e?DateTime.fromFormat(t,e,r):DateTime.fromISO(t,r):t instanceof Date?t=DateTime.fromJSDate(t,r):"object"!=a||t instanceof DateTime||(t=DateTime.fromObject(t)),t.isValid?t.valueOf():null},format:function(t,e){const r=this._create(t);return"string"==typeof e?r.toFormat(e,this.options):r.toLocaleString(e)},add:function(t,e,r){const a={};return a[r]=e,this._create(t).plus(a).valueOf()},diff:function(t,e,r){return this._create(t).diff(this._create(e)).as(r).valueOf()},startOf:function(t,e,r){if("isoWeek"!==e)return e?this._create(t).startOf(e).valueOf():t;{r=Math.trunc(Math.min(Math.max(0,r),6));const a=this._create(t);return a.minus({days:(a.weekday-r+7)%7}).startOf("day").valueOf()}},endOf:function(t,e){return this._create(t).endOf(e).valueOf()}});
|
||||
@@ -0,0 +1,96 @@
|
||||
/*!
|
||||
* chartjs-adapter-luxon v1.1.0
|
||||
* https://www.chartjs.org
|
||||
* (c) 2021 chartjs-adapter-luxon Contributors
|
||||
* Released under the MIT license
|
||||
*/
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('chart.js'), require('luxon')) :
|
||||
typeof define === 'function' && define.amd ? define(['chart.js', 'luxon'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Chart, global.luxon));
|
||||
}(this, (function (chart_js, luxon) { 'use strict';
|
||||
|
||||
const FORMATS = {
|
||||
datetime: luxon.DateTime.DATETIME_MED_WITH_SECONDS,
|
||||
millisecond: 'h:mm:ss.SSS a',
|
||||
second: luxon.DateTime.TIME_WITH_SECONDS,
|
||||
minute: luxon.DateTime.TIME_SIMPLE,
|
||||
hour: {hour: 'numeric'},
|
||||
day: {day: 'numeric', month: 'short'},
|
||||
week: 'DD',
|
||||
month: {month: 'short', year: 'numeric'},
|
||||
quarter: "'Q'q - yyyy",
|
||||
year: {year: 'numeric'}
|
||||
};
|
||||
|
||||
chart_js._adapters._date.override({
|
||||
_id: 'luxon', // DEBUG
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
_create: function(time) {
|
||||
return luxon.DateTime.fromMillis(time, this.options);
|
||||
},
|
||||
|
||||
formats: function() {
|
||||
return FORMATS;
|
||||
},
|
||||
|
||||
parse: function(value, format) {
|
||||
const options = this.options;
|
||||
|
||||
if (value === null || typeof value === 'undefined') {
|
||||
return null;
|
||||
}
|
||||
|
||||
const type = typeof value;
|
||||
if (type === 'number') {
|
||||
value = this._create(value);
|
||||
} else if (type === 'string') {
|
||||
if (typeof format === 'string') {
|
||||
value = luxon.DateTime.fromFormat(value, format, options);
|
||||
} else {
|
||||
value = luxon.DateTime.fromISO(value, options);
|
||||
}
|
||||
} else if (value instanceof Date) {
|
||||
value = luxon.DateTime.fromJSDate(value, options);
|
||||
} else if (type === 'object' && !(value instanceof luxon.DateTime)) {
|
||||
value = luxon.DateTime.fromObject(value);
|
||||
}
|
||||
|
||||
return value.isValid ? value.valueOf() : null;
|
||||
},
|
||||
|
||||
format: function(time, format) {
|
||||
const datetime = this._create(time);
|
||||
return typeof format === 'string'
|
||||
? datetime.toFormat(format, this.options)
|
||||
: datetime.toLocaleString(format);
|
||||
},
|
||||
|
||||
add: function(time, amount, unit) {
|
||||
const args = {};
|
||||
args[unit] = amount;
|
||||
return this._create(time).plus(args).valueOf();
|
||||
},
|
||||
|
||||
diff: function(max, min, unit) {
|
||||
return this._create(max).diff(this._create(min)).as(unit).valueOf();
|
||||
},
|
||||
|
||||
startOf: function(time, unit, weekday) {
|
||||
if (unit === 'isoWeek') {
|
||||
weekday = Math.trunc(Math.min(Math.max(0, weekday), 6));
|
||||
const dateTime = this._create(time);
|
||||
return dateTime.minus({days: (dateTime.weekday - weekday + 7) % 7}).startOf('day').valueOf();
|
||||
}
|
||||
return unit ? this._create(time).startOf(unit).valueOf() : time;
|
||||
},
|
||||
|
||||
endOf: function(time, unit) {
|
||||
return this._create(time).endOf(unit).valueOf();
|
||||
}
|
||||
});
|
||||
|
||||
})));
|
||||
@@ -0,0 +1,7 @@
|
||||
/*!
|
||||
* chartjs-adapter-luxon v1.1.0
|
||||
* https://www.chartjs.org
|
||||
* (c) 2021 chartjs-adapter-luxon Contributors
|
||||
* Released under the MIT license
|
||||
*/
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("chart.js"),require("luxon")):"function"==typeof define&&define.amd?define(["chart.js","luxon"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Chart,e.luxon)}(this,(function(e,t){"use strict";const n={datetime:t.DateTime.DATETIME_MED_WITH_SECONDS,millisecond:"h:mm:ss.SSS a",second:t.DateTime.TIME_WITH_SECONDS,minute:t.DateTime.TIME_SIMPLE,hour:{hour:"numeric"},day:{day:"numeric",month:"short"},week:"DD",month:{month:"short",year:"numeric"},quarter:"'Q'q - yyyy",year:{year:"numeric"}};e._adapters._date.override({_id:"luxon",_create:function(e){return t.DateTime.fromMillis(e,this.options)},formats:function(){return n},parse:function(e,n){const r=this.options;if(null==e)return null;const i=typeof e;return"number"===i?e=this._create(e):"string"===i?e="string"==typeof n?t.DateTime.fromFormat(e,n,r):t.DateTime.fromISO(e,r):e instanceof Date?e=t.DateTime.fromJSDate(e,r):"object"!==i||e instanceof t.DateTime||(e=t.DateTime.fromObject(e)),e.isValid?e.valueOf():null},format:function(e,t){const n=this._create(e);return"string"==typeof t?n.toFormat(t,this.options):n.toLocaleString(t)},add:function(e,t,n){const r={};return r[n]=t,this._create(e).plus(r).valueOf()},diff:function(e,t,n){return this._create(e).diff(this._create(t)).as(n).valueOf()},startOf:function(e,t,n){if("isoWeek"===t){n=Math.trunc(Math.min(Math.max(0,n),6));const t=this._create(e);return t.minus({days:(t.weekday-n+7)%7}).startOf("day").valueOf()}return t?this._create(e).startOf(t).valueOf():e},endOf:function(e,t){return this._create(e).endOf(t).valueOf()}})}));
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
+1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,7 +1,7 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.32106.194
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.0.32126.317
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GWMS.Data", "GWMS.Data\GWMS.Data.csproj", "{50690414-013C-4A2E-9255-F5CB4BF03420}"
|
||||
EndProject
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>GWMS - Gas Warehouse Management System</i>
|
||||
<h4>Versione: 1.0.2203.0114</h4>
|
||||
<h4>Versione: 1.0.2203.0116</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.0.2203.0114
|
||||
1.0.2203.0116
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>1.0.2203.0114</version>
|
||||
<version>1.0.2203.0116</version>
|
||||
<url>http://nexus.steamware.net/repository/SWS/GWMS/stable/0/GWMS.UI.zip</url>
|
||||
<changelog>http://nexus.steamware.net/repository/SWS/GWMS/stable/0/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
Reference in New Issue
Block a user