using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Web;
namespace Egw.Core.Razor.Comp.Components
{
public partial class CircleGauge
{
[Parameter]
public string Titolo { get; set; } = "Titolo";
[Parameter]
public string Testo { get; set; } = "Testo";
[Parameter]
public string StyleTitolo { get; set; } = "font-size: 3em; font-weight:bold; fill: white;";
[Parameter]
public string StyleTesto { get; set; } = "font-size: 1em; fill: gray;";
[Parameter]
public string strokeColorVal { get; set; } = "#00FF66";
///
/// Valore da rappresentare
///
[Parameter]
public int currVal { get; set; } = 0;
///
/// Valore MASSIMO da rappresentare (=100%)
///
[Parameter]
public int maxVal { get; set; } = 0;
///
/// Spessore dei cerchida disegnare
///
[Parameter]
public int sWidth { get; set; } = 10;
///
/// Raggio cerchio interno (0..100)
///
[Parameter]
public int innRad { get; set; } = 70;
///
/// Raggio cerchio esterno (0..100)
///
[Parameter]
public int outRad { get; set; } = 85;
private bool showOuter
{
get => currVal > maxVal;
}
private int valInner
{
get => currVal < maxVal ? currVal : maxVal;
}
private int valOuter
{
get => currVal < maxVal ? 0 : currVal - maxVal;
}
}
}