+
📦 Presets
+
+
{[
- { label: '🌐 Bandwidth', config: { type: 'semicircle', minValue: 0, maxValue: 1000000, arc: { width: 0.2, subArcs: [{ limit: 100, color: '#5BE12C' }, { limit: 1000, color: '#F5CD19' }, { limit: 10000, color: '#F58B19' }, { limit: 100000, color: '#EA4228' }, { color: '#8B0000' }] }, labels: { valueLabel: { formatTextValue: (v: number) => v >= 1000000 ? `${(v/1000000).toFixed(1)} Tbps` : v >= 1000 ? `${(v/1000).toFixed(0)} Gbps` : `${v} Mbps` }, tickLabels: { type: 'outer', ticks: [{ value: 0 }, { value: 100 }, { value: 1000 }, { value: 10000 }, { value: 100000 }, { value: 1000000 }], defaultTickValueConfig: { formatTextValue: (v: number) => v >= 1000000 ? '1T' : v >= 1000 ? `${v/1000}G` : `${v}M` } } }, pointer: { type: 'needle' } }, value: 50000 },
- { label: '🌡️ Temp', config: { type: 'semicircle', minValue: -40, maxValue: 150, arc: { width: 0.2, subArcs: [{ limit: 0, color: '#00bcd4' }, { limit: 25, color: '#4caf50' }, { limit: 80, color: '#ff9800' }, { color: '#f44336' }] }, labels: { valueLabel: { formatTextValue: (v: number) => `${v}°C` }, tickLabels: { type: 'outer', ticks: [{ value: -40 }, { value: 0 }, { value: 50 }, { value: 100 }, { value: 150 }] } }, pointer: { type: 'blob' } }, value: 23 },
- { label: '🔊 Audio', config: { type: 'radial', minValue: -60, maxValue: 20, arc: { width: 0.15, gradient: true, subArcs: [{ limit: -20, color: '#2d5a27' }, { limit: 0, color: '#5BE12C' }, { limit: 10, color: '#F5CD19' }, { color: '#EA4228' }] }, labels: { valueLabel: { formatTextValue: (v: number) => `${v > 0 ? '+' : ''}${v} dB` }, tickLabels: { type: 'outer', ticks: [{ value: -60 }, { value: -40 }, { value: -20 }, { value: 0 }, { value: 20 }] } }, pointer: { type: 'needle', color: '#00ff88' } }, value: -12 },
- { label: '🔋 Battery', config: { type: 'grafana', minValue: 0, maxValue: 100, arc: { width: 0.25, subArcs: [{ limit: 20, color: '#EA4228' }, { limit: 40, color: '#F58B19' }, { limit: 60, color: '#F5CD19' }, { color: '#5BE12C' }] }, labels: { valueLabel: { formatTextValue: (v: number) => `${v.toFixed(1)}%`, matchColorWithArc: true }, tickLabels: { type: 'inner', ticks: [{ value: 0 }, { value: 25 }, { value: 50 }, { value: 75 }, { value: 100 }] } }, pointer: { type: 'arrow' } }, value: 73.5 },
- { label: '⚙️ RPM', config: { type: 'semicircle', minValue: 0, maxValue: 10000, arc: { width: 0.2, subArcs: [{ limit: 2000, color: '#5BE12C' }, { limit: 6000, color: '#F5CD19' }, { limit: 8000, color: '#F58B19' }, { color: '#EA4228' }] }, labels: { valueLabel: { formatTextValue: (v: number) => `${(v/1000).toFixed(1)}k` }, tickLabels: { type: 'outer', ticks: [{ value: 0 }, { value: 2000 }, { value: 4000 }, { value: 6000 }, { value: 8000 }, { value: 10000 }], defaultTickValueConfig: { formatTextValue: (v: number) => `${v/1000}k` } } }, pointer: { type: 'needle', color: '#ff4444' } }, value: 3500 },
- { label: '💨 PSI', config: { type: 'radial', minValue: 0, maxValue: 300, arc: { width: 0.18, subArcs: [{ limit: 50, color: '#00bcd4' }, { limit: 150, color: '#5BE12C' }, { limit: 250, color: '#F5CD19' }, { color: '#EA4228' }] }, labels: { valueLabel: { formatTextValue: (v: number) => `${v} PSI` }, tickLabels: { type: 'outer', ticks: [{ value: 0 }, { value: 100 }, { value: 200 }, { value: 300 }] } }, pointer: { type: 'needle' } }, value: 125 },
- { label: '💻 CPU', config: { type: 'semicircle', minValue: 0, maxValue: 100, arc: { width: 0.3, gradient: true, subArcs: [{ limit: 40, color: '#5BE12C' }, { limit: 60, color: '#F5CD19' }, { limit: 80, color: '#F58B19' }, { color: '#EA4228' }] }, labels: { valueLabel: { formatTextValue: (v: number) => `${v.toFixed(0)}%` }, tickLabels: { hideMinMax: true } }, pointer: { type: 'blob' } }, value: 67 },
- { label: '⛽ Fuel', config: { type: 'semicircle', minValue: 0, maxValue: 100, arc: { width: 0.15, subArcs: [{ limit: 15, color: '#EA4228' }, { limit: 25, color: '#F58B19' }, { color: '#5BE12C' }] }, labels: { valueLabel: { hide: true }, tickLabels: { type: 'outer', ticks: [{ value: 0, valueConfig: { formatTextValue: () => 'E' } }, { value: 50, valueConfig: { formatTextValue: () => '½' } }, { value: 100, valueConfig: { formatTextValue: () => 'F' } }] } }, pointer: { type: 'needle', color: '#fff' } }, value: 35 },
+ { icon: '🌐', label: 'Bandwidth', config: { type: 'grafana', minValue: 0, maxValue: 3000, arc: { nbSubArcs: 150, colorArray: ['#5BE12C', '#F5CD19', '#EA4228'], width: 0.3, padding: 0.003 }, labels: { valueLabel: { style: { fontSize: 40 }, formatTextValue: (v: number) => v >= 1000 ? (Number.isInteger(v/1000) ? `${(v/1000).toFixed(0)} mbit/s` : `${(v/1000).toFixed(1)} mbit/s`) : `${v.toFixed(0)} kbit/s` }, tickLabels: { type: 'outer', ticks: [{ value: 100 }, { value: 200 }, { value: 300 }, { value: 400 }, { value: 500 }, { value: 600 }, { value: 700 }, { value: 800 }, { value: 900 }, { value: 1000 }, { value: 1500 }, { value: 2000 }, { value: 2500 }, { value: 3000 }], defaultTickValueConfig: { formatTextValue: (v: number) => v >= 1000 ? `${(v/1000).toFixed(0)}m` : `${v}k` } } }, pointer: { type: 'needle' } }, value: 900 },
+ { icon: '🌡️', label: 'Temp', config: { type: 'semicircle', minValue: -40, maxValue: 150, arc: { width: 0.2, subArcs: [{ limit: 0, color: '#00bcd4' }, { limit: 25, color: '#4caf50' }, { limit: 80, color: '#ff9800' }, { color: '#f44336' }] }, labels: { valueLabel: { formatTextValue: (v: number) => `${v}°C` }, tickLabels: { type: 'outer', ticks: [{ value: -40 }, { value: 0 }, { value: 50 }, { value: 100 }, { value: 150 }] } }, pointer: { type: 'blob' } }, value: 23 },
+ { icon: '🔊', label: 'Audio', config: { type: 'radial', minValue: -60, maxValue: 20, arc: { width: 0.15, gradient: true, subArcs: [{ limit: -20, color: '#2d5a27' }, { limit: 0, color: '#5BE12C' }, { limit: 10, color: '#F5CD19' }, { color: '#EA4228' }] }, labels: { valueLabel: { formatTextValue: (v: number) => `${v > 0 ? '+' : ''}${v} dB` }, tickLabels: { type: 'outer', ticks: [{ value: -60 }, { value: -40 }, { value: -20 }, { value: 0 }, { value: 20 }] } }, pointer: { type: 'needle', color: '#00ff88' } }, value: -12 },
+ { icon: '🔋', label: 'Battery', config: { type: 'grafana', minValue: 0, maxValue: 100, arc: { width: 0.25, subArcs: [{ limit: 20, color: '#EA4228' }, { limit: 40, color: '#F58B19' }, { limit: 60, color: '#F5CD19' }, { color: '#5BE12C' }] }, labels: { valueLabel: { formatTextValue: (v: number) => `${v.toFixed(1)}%`, matchColorWithArc: true }, tickLabels: { type: 'inner', ticks: [{ value: 0 }, { value: 25 }, { value: 50 }, { value: 75 }, { value: 100 }] } }, pointer: { type: 'arrow' } }, value: 73.5 },
+ { icon: '⚙️', label: 'RPM', config: { type: 'grafana', minValue: 0, maxValue: 8000, arc: { nbSubArcs: 30, colorArray: ['#5BE12C', '#5BE12C', '#F5CD19', '#F5CD19', '#EA4228'], width: 0.3, padding: 0.02 }, labels: { valueLabel: { formatTextValue: (v: number) => `${v.toFixed(0)} RPM` }, tickLabels: { type: 'outer', ticks: [{ value: 0 }, { value: 1000 }, { value: 2000 }, { value: 3000 }, { value: 4000 }, { value: 5000 }, { value: 6000 }, { value: 7000 }, { value: 8000 }], defaultTickValueConfig: { formatTextValue: (v: number) => `${v/1000}` } } }, pointer: { type: 'needle', color: '#EA4228' } }, value: 3500 },
+ { icon: '⚡', label: 'Voltage', config: { type: 'grafana', minValue: 0, maxValue: 16, arc: { width: 0.25, subArcs: [{ limit: 10, color: '#EA4228' }, { limit: 12, color: '#F5CD19' }, { limit: 14.5, color: '#5BE12C' }, { color: '#EA4228' }] }, labels: { valueLabel: { renderContent: (value: number) => React.createElement('div', { style: { textAlign: 'center', color: '#fff' } }, React.createElement('div', { style: { fontSize: '1.5rem' } }, '⚡'), React.createElement('div', { style: { fontSize: '1.2rem', fontWeight: 'bold' } }, `${value.toFixed(1)} V`)) }, tickLabels: { type: 'outer', ticks: [{ value: 0 }, { value: 4 }, { value: 8 }, { value: 10 }, { value: 12 }, { value: 14 }, { value: 16 }] } }, pointer: { type: 'arrow' } }, value: 12.6 },
+ { icon: '💻', label: 'CPU', config: { type: 'semicircle', minValue: 0, maxValue: 100, arc: { width: 0.3, gradient: true, subArcs: [{ limit: 40, color: '#5BE12C' }, { limit: 60, color: '#F5CD19' }, { limit: 80, color: '#F58B19' }, { color: '#EA4228' }] }, labels: { valueLabel: { formatTextValue: (v: number) => `${v.toFixed(0)}%` }, tickLabels: { hideMinMax: true } }, pointer: { type: 'blob' } }, value: 67 },
+ { icon: '⛽', label: 'Fuel', config: { type: 'semicircle', minValue: 0, maxValue: 100, arc: { width: 0.15, subArcs: [{ limit: 15, color: '#EA4228' }, { limit: 25, color: '#F58B19' }, { color: '#5BE12C' }] }, labels: { valueLabel: { hide: true }, tickLabels: { type: 'outer', ticks: [{ value: 0, valueConfig: { formatTextValue: () => 'E' } }, { value: 50, valueConfig: { formatTextValue: () => '½' } }, { value: 100, valueConfig: { formatTextValue: () => 'F' } }] } }, pointer: { type: 'needle', color: '#fff' } }, value: 35 },
].map((p) => (
-
+
))}