I need to create a code that after passing some parameters it generates a graphic similar to the image below, I thought of creating a table for each activity. Does anyone have any tips, or do you know an article that can help me? I think of using Json to pass the data (I know how to work with Json ), my problem would be to create this function in Javascript
Thistableisdefinedbydependencies,asweseeintheimagetheactivityBisdependentontheactivityA
MyJsonwillhaveastructuresimilartotheonebelow:
<script>$(document).ready(function(){$.ajax({type:"GET",
url: "/Venda/GetDadosItensVenda",
success: function (itensVenda) {
if (itensVenda != null) {
$('#tbody').children().remove();
$(itensVenda).each(function (i) {
var tbody = $('#tbody');
var tr = "<tr>";
tr +=
tr += "<td>" + itensVenda[i].CodigoProduto;
tr += "<td>" + itensVenda[i].Quantidade;
tr += "<td>" + itensVenda[i].PrecoUnitario;
tr += "<td>" + "<button class='btn btn-info' onclick=Editar(" + itensVenda[i].Id + ")>" + "Editar";
tr += "<td>" + "<button class='btn btn-danger' onclick=Deletar(" + itensVenda[i].Id + ")>" + "Deletar";
tbody.append(tr);
});
}
}
});
});
'