anychart.onDocumentReady(function () {
{id: "A", duration: 1, name: "A"},
{id: "B", duration: 3, name: "B"},
{id: "C", duration: 2, name: "C"},
{id: "D", duration: 1, name: "D", dependsOn: ["A"]},
{id: "E", duration: 2, name: "E", dependsOn: ["B"]},
{id: "F", duration: 2, name: "F", dependsOn: ["C"]},
{id: "G", duration: 2, name: "G", dependsOn: ["D", "E", "F"]}
var chart = anychart.pert();
chart.data(data, "as-table");
chart.milestones().labels().fontSize(10);
chart.milestones().shape("rectangle");
chart.milestones().size(80);
chart.milestones().labels().format(function() {
for (i = 0; i < this.predecessors.length; i++){
comma = i == this.predecessors.length - 1 ? "" : ",";
result += this.predecessors[i].get("name") + comma;
for (i = 0; i < this.successors.length; i++){
comma = i == this.successors.length - 1 ? "" : ",";
result += this.successors[i].get("name") + comma;
return this.isStart ? "S" : "F";
chart.criticalPath({milestones: {fill: "#ffcc80", hoverFill: "#ffab91", selectFill: "#ff6e40"}});
chart.title("PERT Chart");
chart.container("container");