24 lines
543 B
C#
24 lines
543 B
C#
using System.Collections.Generic;
|
|
using System.Text.Json.Serialization;
|
|
|
|
public class ChartData
|
|
{
|
|
[JsonPropertyName("labels")]
|
|
public List<string> Labels { get; set; }=new();
|
|
|
|
[JsonPropertyName("datasets")]
|
|
public List<Dataset> Datasets { get; set; }=new();
|
|
}
|
|
|
|
public class Dataset
|
|
{
|
|
[JsonPropertyName("label")]
|
|
public string Label { get; set; } ="";
|
|
|
|
[JsonPropertyName("data")]
|
|
public List<string> Data { get; set; }= new();
|
|
|
|
[JsonPropertyName("borderWidth")]
|
|
public int BorderWidth { get; set; }=1;
|
|
}
|