public async Task <string> GetAllTSFAJson(byte id, byte x, decimal y, GraphTypes z) { Chart chart = new(_context); List <TsfforAge> result = await chart.ListTsfforAge((Sexes)id, x, y); ChartDataTable gChart = new(); gChart.cols = ChartDataTable.GetCols(z, GrowthTypes.TSF); gChart.rows = ChartDataTable.GetTsfRows(z, GrowthTypes.TSF, result); string sJson = JsonSerializer.Serialize(gChart); return(sJson); }
public async Task <string> GetAllWFLJson(byte id, decimal x, decimal y, GraphTypes z) { Chart chart = new(_context); List <WeightForLength> result = await chart.ListWeightForLength((Sexes)id, x, y); ChartDataTable gChart = new(); gChart.cols = ChartDataTable.GetCols(z, GrowthTypes.WFL); gChart.rows = ChartDataTable.GetWflRows(z, GrowthTypes.WFL, result); string sJson = JsonSerializer.Serialize(gChart); return(sJson); }
public async Task <string> GetAllLHFAJson(byte id, byte x, decimal y, GraphTypes z) { Chart chart = new(_context); List <LengthHeightForAge> result = await chart.ListLengthHeightForAge((Sexes)id, x, y); ChartDataTable gChart = new(); gChart.cols = ChartDataTable.GetCols(z, GrowthTypes.LHFA); gChart.rows = ChartDataTable.GetLhfaRows(z, GrowthTypes.LHFA, result); string sJson = JsonSerializer.Serialize(gChart); return(sJson); }