Bozza visualizzazione linee TRS

This commit is contained in:
Samuele Locatelli
2022-02-25 20:58:07 +01:00
parent 557a9510d6
commit ac0ef3f62a
4 changed files with 80 additions and 85 deletions
+21 -8
View File
@@ -8,18 +8,31 @@
[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; } = "100";
[Parameter]
public int lTens { get; set; } = 0;
@@ -35,10 +48,7 @@
/// <returns></returns>
protected override async Task OnAfterRenderAsync(bool firstRender)
{
//if (!firstRender)
//{
await renderChart();
//}
}
/// <summary>
@@ -68,7 +78,9 @@
ticks = new
{
maxTicksLimit = 10
}
},
suggestedMin = MinValue,
suggestedMax = MaxValue
},
xAxes = new
{
@@ -81,8 +93,9 @@
},
data = new
{
//labels = Labels.ToArray(),
datasets = new[]
{
{
new
{
data = DataTS,
@@ -90,7 +103,7 @@
backgroundColor= backColor,
lineTension= lTens,
stepped= false,
label= "Temperatura Rilevata"
label= Title
}
}
}