예제 #1
0
        public static void AddNodes()
        {
            var chartService   = new ChartService();
            var resultAddNodes = chartService.AddNodes(new OptionsAddNodes
            {
                ChartId = "AddNodesChartName",
                Nodes   = new List <Dictionary <string, string> >
                {
                    new Dictionary <string, string> {
                        { "id", "1" }, { "Name", "John Smith" }
                    },
                    new Dictionary <string, string> {
                        { "id", "2" }, { "pid", "1" }, { "Name", "Jack Daniels" }
                    },
                    new Dictionary <string, string> {
                        { "id", "3" }, { "pid", "1" }, { "Name", "Mickey Mouse" }, { "tags", "blue,assistant" }
                    },
                    new Dictionary <string, string> {
                        { "id", "4" }, { "pid", "1" }, { "Name", "Ana Garson" }, { "Photo", "https://cdn.balkan.app/shared/2.jpg" }, { "Country", "USA" }, { "City", "Las Vegas" }, { "JobTitle", "IT Manager" }, { "Email", "*****@*****.**" }
                    }
                }
            });

            if (!resultAddNodes.IsSuccess)
            {
                Console.WriteLine(resultAddNodes.Error);
            }
        }