Toolkit
TK.Gauge
{
_: TK.Gauge,
Width: 400,
Height: 200,
Ranges: [
{ MinValue: 0, MaxValue: 5, Color: "#C00" },
{ MinValue: 5, MaxValue: 15, Color: "#FC0" },
{ MinValue: 15, MaxValue: 30, Color: "#090" }
],
Label: "Gauge 1",
Value: 25
}
Gauge with indicators
{
_: TK.Gauge,
Width: 400,
Height: 300,
Ranges: [
{ MinValue: 0, MaxValue: 5, Color: "#C00" },
{ MinValue: 5, MaxValue: 15, Color: "#FC0" },
{ MinValue: 15, MaxValue: 30, Color: "#090" }
],
Indicators: [
{ Value: 0, Color: "#C00", Text: "Danger" },
{ Value: 15, Color: "#FC0", Text: "Average", Height: 15, Width: 12 },
{ Value: 30, Color: "#090", Text: "OK" },
],
Label: "Gauge 2",
Value: 25
}
Gauge with some customization
{
_: TK.Gauge,
Width: 400,
Height: 200,
Ranges: [
{ MinValue: 0, MaxValue: 5, Color: "#333" },
{ MinValue: 5, MaxValue: 10, Color: "#666" },
{ MinValue: 10, MaxValue: 15, Color: "#999" }
],
Value: 30,
DonutSize: 0.5,
TextValue: "OK",
EnableShadow: false,
ColorCursor: "#339"
}
Horizontal Gauge
{
_: TK.Gauge,
Width: 400,
Height: 125,
Ranges: [
{ MinValue: 0, MaxValue: 5, Color: "#C00" },
{ MinValue: 5, MaxValue: 15, Color: "#FC0" },
{ MinValue: 15, MaxValue: 30, Color: "#090" }
],
Label: "Gauge 1",
Value: 25,
Style: 1
}
Horizontal Gauge with indicator
{
_: TK.Gauge,
Width: 400,
Height: 125,
Ranges: [
{ MinValue: 0, MaxValue: 5, Color: "#C00" },
{ MinValue: 5, MaxValue: 15, Color: "#FC0" },
{ MinValue: 15, MaxValue: 30, Color: "#090" }
],
Indicators: [
{ Value: 15, Text: "OK", Color: "#090" }
],
Label: "Gauge 1",
Value: 17,
Style: 1
}