Aggiunto chart
This commit is contained in:
@@ -1,24 +1,36 @@
|
||||
|
||||
<p>grafico pareto versioni</p>
|
||||
|
||||
<table class="table table-sm table-striped table-responsive-lg">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Cliente</th>
|
||||
<th>PC</th>
|
||||
<th># Licenze</th>
|
||||
<th class="text-end">Versione</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var record in ListRecord)
|
||||
{
|
||||
<tr>
|
||||
<td>@record.Cliente</td>
|
||||
<td>@record.PcInst</td>
|
||||
<td>@record.NumImp</td>
|
||||
<td class="text-end">@record.VersNumInstall</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="card shadow">
|
||||
<div class="card-header">
|
||||
<b>Dettaglio Versioni</b>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between p-2">
|
||||
<div class="px-0">
|
||||
<Doughnut Id="RelVers" Type="@Doughnut.ChartType.Doughnut" Data="@ChartData" Labels="ChartLabels" BackgroundColor="@ChartColor"></Doughnut>
|
||||
</div>
|
||||
<div class="px-0 w-75">
|
||||
<div class="text-end">Vers. Corrente: <b>@CurrRecord.VersNumCurrent</b></div>
|
||||
<table class="table table-sm table-striped table-responsive-lg">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Cliente</th>
|
||||
<th>PC</th>
|
||||
<th># Licenze</th>
|
||||
<th class="text-end">Versione</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var record in ListRecord)
|
||||
{
|
||||
<tr>
|
||||
<td>@record.Cliente</td>
|
||||
<td>@record.PcInst</td>
|
||||
<td>@record.NumImp</td>
|
||||
<td class="text-end @cssVers(record)">@record.VersNumInstall</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,6 +1,9 @@
|
||||
using EgwCoreLib.Razor.Data;
|
||||
using LiMan.DB.DTO;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Org.BouncyCastle.Ocsp;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace LiMan.UI.Components
|
||||
{
|
||||
@@ -23,9 +26,65 @@ namespace LiMan.UI.Components
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
ListRecord = CurrRecord.DetailInstalled;
|
||||
ListRecord = CurrRecord.DetailInstalled.OrderByDescending(x => x.UpToDateStatus).ToList();
|
||||
// sistemo info x grafico...
|
||||
ChartData = ListRecord.Select(x => (double)x.NumImp).ToArray();
|
||||
ChartLabels = ListRecord.Select(x => x.VersNumInstall).ToArray();
|
||||
ChartColor.Clear();
|
||||
foreach (var item in ListRecord)
|
||||
{
|
||||
switch (item.UpToDateStatus)
|
||||
{
|
||||
case 4:
|
||||
ChartColor.Add(new DoughnutStyling("#28FF69", "00FF00"));
|
||||
break;
|
||||
case 3:
|
||||
ChartColor.Add(new DoughnutStyling("#EEFF33", "AAFF00"));
|
||||
break;
|
||||
case 2:
|
||||
ChartColor.Add(new DoughnutStyling("#99CC33", "AAFF00"));
|
||||
break;
|
||||
case 1:
|
||||
ChartColor.Add(new DoughnutStyling("#CC9933", "FFAA00"));
|
||||
break;
|
||||
case 0:
|
||||
ChartColor.Add(new DoughnutStyling("#CC6633", "FF3300"));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private string cssVers(AppRelStatusDTO rec)
|
||||
{
|
||||
string answ = "";
|
||||
switch (rec.UpToDateStatus)
|
||||
{
|
||||
case 4:
|
||||
answ = "text-success fw-bold";
|
||||
break;
|
||||
case 3:
|
||||
answ = "text-success";
|
||||
break;
|
||||
case 2:
|
||||
answ = "text-warning";
|
||||
break;
|
||||
case 1:
|
||||
answ = "text-danger";
|
||||
break;
|
||||
case 0:
|
||||
answ = "text-danger fw-bold";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
private string[] ChartLabels = new string[1];
|
||||
private double[] ChartData = new double[1];
|
||||
private List<DoughnutStyling> ChartColor = new List<DoughnutStyling>();
|
||||
#endregion Protected Methods
|
||||
}
|
||||
}
|
||||
@@ -52,7 +52,7 @@
|
||||
@if (CurrRecord != null)
|
||||
{
|
||||
<div class="col-9">
|
||||
pareto impieghi...
|
||||
<InstAppPareto CurrRecord="CurrRecord"></InstAppPareto>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
<script src="jquery/jquery.min.js"></script>
|
||||
<script src="lib/bootstrap/js/bootstrap.min.js"></script>
|
||||
<script src="lib/font-awesome/js/all.min.js"></script>
|
||||
<script src="lib/Chart.js/chart.umd.js"></script>
|
||||
|
||||
<script src="_framework/blazor.server.js" autostart="false"></script>
|
||||
|
||||
|
||||
@@ -9,6 +9,11 @@
|
||||
{
|
||||
"library": "font-awesome@6.7.2",
|
||||
"destination": "wwwroot/lib/font-awesome/"
|
||||
},
|
||||
{
|
||||
"provider": "cdnjs",
|
||||
"library": "Chart.js@4.4.1",
|
||||
"destination": "wwwroot/lib/Chart.js/"
|
||||
}
|
||||
]
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
+1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"helpers.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
||||
@@ -0,0 +1,9 @@
|
||||
/*!
|
||||
* Chart.js v4.4.1
|
||||
* https://www.chartjs.org
|
||||
* (c) 2023 Chart.js Contributors
|
||||
* Released under the MIT License
|
||||
*/
|
||||
export { H as HALF_PI, b2 as INFINITY, P as PI, b1 as PITAU, b4 as QUARTER_PI, b3 as RAD_PER_DEG, T as TAU, b5 as TWO_THIRDS_PI, R as _addGrace, X as _alignPixel, a2 as _alignStartEnd, p as _angleBetween, b6 as _angleDiff, _ as _arrayUnique, a8 as _attachContext, as as _bezierCurveTo, ap as _bezierInterpolation, ax as _boundSegment, an as _boundSegments, a5 as _capitalize, am as _computeSegments, a9 as _createResolver, aK as _decimalPlaces, aV as _deprecated, aa as _descriptors, ah as _elementsEqual, N as _factorize, aO as _filterBetween, I as _getParentNode, q as _getStartAndCountOfVisiblePoints, W as _int16Range, aj as _isBetween, ai as _isClickEvent, M as _isDomSupported, C as _isPointInArea, S as _limitValue, aN as _longestText, aP as _lookup, B as _lookupByKey, V as _measureText, aT as _merger, aU as _mergerIf, ay as _normalizeAngle, y as _parseObjectDataRadialScale, aq as _pointInLine, ak as _readValueToProps, A as _rlookupByKey, w as _scaleRangesChanged, aG as _setMinAndMaxByKey, aW as _splitKey, ao as _steppedInterpolation, ar as _steppedLineTo, aB as _textX, a1 as _toLeftRightCenter, al as _updateBezierControlPoints, au as addRoundedRectPath, aJ as almostEquals, aI as almostWhole, Q as callback, af as clearCanvas, Y as clipArea, aS as clone, c as color, j as createContext, ad as debounce, h as defined, aE as distanceBetweenPoints, at as drawPoint, aD as drawPointLegend, F as each, e as easingEffects, O as finiteOrDefault, a$ as fontString, o as formatNumber, D as getAngleFromPoint, aR as getHoverColor, G as getMaximumSize, z as getRelativePosition, az as getRtlAdapter, a_ as getStyle, b as isArray, g as isFinite, a7 as isFunction, k as isNullOrUndef, x as isNumber, i as isObject, aQ as isPatternOrGradient, l as listenArrayEvents, aM as log10, a4 as merge, ab as mergeIf, aH as niceNum, aF as noop, aA as overrideTextDirection, J as readUsedSize, Z as renderText, r as requestAnimFrame, a as resolve, f as resolveObjectKey, aC as restoreTextDirection, ae as retinaScale, ag as setsEqual, s as sign, aY as splineCurve, aZ as splineCurveMonotone, K as supportsEventListenerOptions, L as throttled, U as toDegrees, n as toDimension, a0 as toFont, aX as toFontString, b0 as toLineHeight, E as toPadding, m as toPercentage, t as toRadians, av as toTRBL, aw as toTRBLCorners, ac as uid, $ as unclipArea, u as unlistenArrayEvents, v as valueOrDefault } from './chunks/helpers.segment.js';
|
||||
import '@kurkle/color';
|
||||
//# sourceMappingURL=helpers.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"helpers.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
||||
@@ -0,0 +1 @@
|
||||
export{H as HALF_PI,b2 as INFINITY,P as PI,b1 as PITAU,b4 as QUARTER_PI,b3 as RAD_PER_DEG,T as TAU,b5 as TWO_THIRDS_PI,R as _addGrace,X as _alignPixel,a2 as _alignStartEnd,p as _angleBetween,b6 as _angleDiff,_ as _arrayUnique,a8 as _attachContext,as as _bezierCurveTo,ap as _bezierInterpolation,ax as _boundSegment,an as _boundSegments,a5 as _capitalize,am as _computeSegments,a9 as _createResolver,aK as _decimalPlaces,aV as _deprecated,aa as _descriptors,ah as _elementsEqual,N as _factorize,aO as _filterBetween,I as _getParentNode,q as _getStartAndCountOfVisiblePoints,W as _int16Range,aj as _isBetween,ai as _isClickEvent,M as _isDomSupported,C as _isPointInArea,S as _limitValue,aN as _longestText,aP as _lookup,B as _lookupByKey,V as _measureText,aT as _merger,aU as _mergerIf,ay as _normalizeAngle,y as _parseObjectDataRadialScale,aq as _pointInLine,ak as _readValueToProps,A as _rlookupByKey,w as _scaleRangesChanged,aG as _setMinAndMaxByKey,aW as _splitKey,ao as _steppedInterpolation,ar as _steppedLineTo,aB as _textX,a1 as _toLeftRightCenter,al as _updateBezierControlPoints,au as addRoundedRectPath,aJ as almostEquals,aI as almostWhole,Q as callback,af as clearCanvas,Y as clipArea,aS as clone,c as color,j as createContext,ad as debounce,h as defined,aE as distanceBetweenPoints,at as drawPoint,aD as drawPointLegend,F as each,e as easingEffects,O as finiteOrDefault,a$ as fontString,o as formatNumber,D as getAngleFromPoint,aR as getHoverColor,G as getMaximumSize,z as getRelativePosition,az as getRtlAdapter,a_ as getStyle,b as isArray,g as isFinite,a7 as isFunction,k as isNullOrUndef,x as isNumber,i as isObject,aQ as isPatternOrGradient,l as listenArrayEvents,aM as log10,a4 as merge,ab as mergeIf,aH as niceNum,aF as noop,aA as overrideTextDirection,J as readUsedSize,Z as renderText,r as requestAnimFrame,a as resolve,f as resolveObjectKey,aC as restoreTextDirection,ae as retinaScale,ag as setsEqual,s as sign,aY as splineCurve,aZ as splineCurveMonotone,K as supportsEventListenerOptions,L as throttled,U as toDegrees,n as toDimension,a0 as toFont,aX as toFontString,b0 as toLineHeight,E as toPadding,m as toPercentage,t as toRadians,av as toTRBL,aw as toTRBLCorners,ac as uid,$ as unclipArea,u as unlistenArrayEvents,v as valueOrDefault}from"./chunks/helpers.segment.js";import"@kurkle/color";
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
export * from './controllers/index.js';
|
||||
export * from './core/index.js';
|
||||
export * from './elements/index.js';
|
||||
export * from './platform/index.js';
|
||||
export * from './plugins/index.js';
|
||||
export * from './scales/index.js';
|
||||
import * as controllers from './controllers/index.js';
|
||||
import * as elements from './elements/index.js';
|
||||
import * as plugins from './plugins/index.js';
|
||||
import * as scales from './scales/index.js';
|
||||
export { controllers, elements, plugins, scales, };
|
||||
export declare const registerables: (typeof controllers | typeof elements | typeof plugins | typeof scales)[];
|
||||
@@ -0,0 +1,5 @@
|
||||
/**
|
||||
* @namespace Chart
|
||||
*/
|
||||
import Chart from './core/core.controller.js';
|
||||
export default Chart;
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Temporary entry point of the types at the time of the transition.
|
||||
* After transition done need to remove it in favor of index.ts
|
||||
*/
|
||||
export * from './index.js';
|
||||
/**
|
||||
* Explicitly re-exporting to resolve the ambiguity.
|
||||
*/
|
||||
export { BarController, BubbleController, DoughnutController, LineController, PieController, PolarAreaController, RadarController, ScatterController, Animation, Animations, Chart, DatasetController, Interaction, Scale, Ticks, defaults, layouts, registry, ArcElement, BarElement, LineElement, PointElement, BasePlatform, BasicPlatform, DomPlatform, Decimation, Filler, Legend, SubTitle, Title, Tooltip, CategoryScale, LinearScale, LogarithmicScale, RadialLinearScale, TimeScale, TimeSeriesScale, PluginOptionsByType, ElementOptionsByType, ChartDatasetProperties, UpdateModeEnum, registerables } from './types/index.js';
|
||||
export * from './types/index.js';
|
||||
Reference in New Issue
Block a user