0d38635b40
- Aggiunta proprietà x colore esterno - cambio nome con maiuscole
76 lines
2.0 KiB
C#
76 lines
2.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
using Microsoft.AspNetCore.Components;
|
|
using Microsoft.AspNetCore.Components.Web;
|
|
|
|
namespace EgwCoreLib.Razor
|
|
{
|
|
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";
|
|
[Parameter]
|
|
public string StrokeColorValOuter { get; set; } = "#00FF66";
|
|
/// <summary>
|
|
/// Indica se mostrare o meno il btn centrale
|
|
/// </summary>
|
|
[Parameter]
|
|
public bool ShowCircleBtn { get; set; } = false;
|
|
|
|
/// <summary>
|
|
/// Valore da rappresentare
|
|
/// </summary>
|
|
[Parameter]
|
|
public int currVal { get; set; } = 0;
|
|
/// <summary>
|
|
/// Valore MASSIMO da rappresentare (=100%)
|
|
/// </summary>
|
|
[Parameter]
|
|
public int maxVal { get; set; } = 0;
|
|
|
|
|
|
/// <summary>
|
|
/// Spessore dei cerchi da disegnare
|
|
/// </summary>
|
|
[Parameter]
|
|
public int sWidth { get; set; } = 10;
|
|
|
|
|
|
/// <summary>
|
|
/// Raggio cerchio interno (0..100)
|
|
/// </summary>
|
|
[Parameter]
|
|
public int innRad { get; set; } = 70;
|
|
|
|
/// <summary>
|
|
/// Raggio cerchio esterno (0..100)
|
|
/// </summary>
|
|
[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;
|
|
}
|
|
|
|
}
|
|
} |